]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliDimuCombinator.h
Have to create Digits trees and branches by hand in the case of multiple event files.
[u/mrichter/AliRoot.git] / EVGEN / AliDimuCombinator.h
1 #ifndef ALIDIMUCOMBINATOR_H
2 #define ALIDIMUCOMBINATOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8
9 //  Class for dimuon analysis and fast dimuon simulation.
10 //  It uses the AliRun particle tree.
11 //  Comments and suggestions to andreas.morsch@cern.ch
12
13
14 #include <TObject.h>
15
16 class TClonesArray;
17 class TParticle;
18
19
20 class AliDimuCombinator:
21     public TObject 
22 {
23 public:
24     AliDimuCombinator(TClonesArray* Partarray);
25     void  Copy(AliDimuCombinator &combi) const;
26 //    
27 //  Iterators
28 //  Single muons
29     TParticle* FirstMuon();
30     TParticle* NextMuon();
31 //  Single muons selected
32     TParticle* FirstMuonSelected();
33     TParticle* NextMuonSelected();
34 //  Dimuons    
35     void FirstMuonPair(TParticle* & muon1, TParticle* & muon2);
36     void NextMuonPair(TParticle* & muon1, TParticle* & muon2);
37 //  Dimuons selected    
38     void FirstMuonPairSelected(TParticle* & muon1, TParticle* & muon2);
39     void NextMuonPairSelected(TParticle* & muon1, TParticle* & muon2);
40 //  Loop over all prticles    
41     void ResetRange();
42 //  Set two ranges for dimuon loop    
43     void SetFirstRange (Int_t from, Int_t to);
44     void SetSecondRange(Int_t from, Int_t to);    
45 //  Cuts
46     void SetPtMin(Float_t ptmin) {fPtMin=ptmin;}
47     void SetEtaCut(Float_t etamin, Float_t etamax)
48         {fEtaMin=etamin; fEtaMax=etamax;}
49     Bool_t Selected(TParticle* part);
50     Bool_t Selected(TParticle* part1, TParticle* part2);
51 // Kinematics
52     Float_t Mass(TParticle* part1, TParticle* part);
53     Float_t PT(TParticle* part1, TParticle* part);
54     Float_t Pz(TParticle* part1, TParticle* part);
55     Float_t Y(TParticle* part1, TParticle* part);
56 // Response
57     void SmearGauss(Float_t width, Float_t & value);
58 // Weight
59     Bool_t  Correlated(TParticle* part1, TParticle* part2);
60     void    SetRate(Float_t rate) {fRate1=rate;}
61     void    SetRate(Float_t rate1, Float_t rate2 ) {fRate1=rate1; fRate2=rate2;}
62     Float_t Weight(TParticle* part);
63     Float_t Weight(TParticle* part1, TParticle* part);
64     Float_t DecayProbability(TParticle* part);
65     
66  private:
67     void FirstPartner();
68     void NextPartner();
69     void FirstPartnerSelected();
70     void NextPartnerSelected();
71     Int_t Origin(TParticle* part);
72     TParticle* Parent(TParticle* part);
73     TParticle* Partner();
74     Int_t Type(TParticle *part);
75     AliDimuCombinator(const AliDimuCombinator &combinator);
76     AliDimuCombinator & operator=(const AliDimuCombinator & rhs);
77
78  private:
79     TClonesArray *fPartArray;      // MC Event
80     Int_t fNParticle;              // Number of particles
81     Int_t fImuon1;                 // Index of first muon
82     Int_t fImuon2;                 // Index of second muon
83     Int_t fImin1;                  // Lowest index for first   muon  
84     Int_t fImin2;                  // Lowest index for second  muon 
85     Int_t fImax1;                  // Highest index for first  muon  
86     Int_t fImax2;                  // Highest index for second muon 
87     Float_t fRate1;                // weight factor  
88     Float_t fRate2;                // weight factor
89     TParticle *fMuon1;             // First muon
90     TParticle *fMuon2;             // Second muon
91     Float_t fPtMin;                // pT-cut 
92     Float_t fEtaMin;               // Minimum pseudorapidity cut
93     Float_t fEtaMax;               // Maximum pseudorapidity cut
94     
95     ClassDef(AliDimuCombinator,1)  // Tools for dimuon combinatoric studies
96 };
97 #endif
98
99
100
101
102
103
104
105