dafbc1c5 |
1 | #ifndef _AliDimuCombinator_H |
2 | #define _AliDimuCombinator_H |
1578254f |
3 | #include "TParticle.h" |
fe4da5cc |
4 | #include <TBrowser.h> |
5 | #include <TList.h> |
6 | #include <TTree.h> |
7 | #include <TROOT.h> |
8 | |
9 | |
dafbc1c5 |
10 | class AliDimuCombinator: |
fe4da5cc |
11 | public TObject |
12 | { |
13 | public: |
dafbc1c5 |
14 | AliDimuCombinator(TClonesArray* Partarray){ |
fe4da5cc |
15 | fPartArray=Partarray; |
16 | fNParticle=fPartArray->GetEntriesFast(); |
17 | |
18 | fimuon1 =0; |
19 | fimuon2 =0; |
20 | fmuon1 =0; |
21 | fmuon2 =0; |
22 | fimin1 = 0; |
23 | fimin2 = 0; |
24 | fimax1 = fNParticle; |
25 | fimax2 = fNParticle; |
26 | fPtMin =0; |
27 | fEtaMin =-10; |
28 | fEtaMax =-10; |
29 | fRate1=1.; |
30 | fRate2=1.; |
31 | } |
32 | // |
7d566a7d |
33 | // Iterators |
34 | // Single muons |
1578254f |
35 | TParticle* FirstMuon(); |
36 | TParticle* NextMuon(); |
7d566a7d |
37 | // Single muons selected |
1578254f |
38 | TParticle* FirstMuonSelected(); |
39 | TParticle* NextMuonSelected(); |
7d566a7d |
40 | // Dimuons |
1578254f |
41 | void FirstMuonPair(TParticle* & muon1, TParticle* & muon2); |
42 | void NextMuonPair(TParticle* & muon1, TParticle* & muon2); |
7d566a7d |
43 | // Dimuons selected |
1578254f |
44 | void FirstMuonPairSelected(TParticle* & muon1, TParticle* & muon2); |
45 | void NextMuonPairSelected(TParticle* & muon1, TParticle* & muon2); |
7d566a7d |
46 | // Loop over all prticles |
fe4da5cc |
47 | void ResetRange(); |
7d566a7d |
48 | // Set two ranges for dimuon loop |
fe4da5cc |
49 | void SetFirstRange (Int_t from, Int_t to); |
50 | void SetSecondRange(Int_t from, Int_t to); |
51 | // Cuts |
7d566a7d |
52 | void SetPtMin(Float_t ptmin) {fPtMin=ptmin;} |
1578254f |
53 | void SetEtaCut(Float_t etamin, Float_t etamax){fEtaMin=etamin; fEtaMax=etamax;} Bool_t Selected(TParticle* part); |
54 | Bool_t Selected(TParticle* part1, TParticle* part2); |
fe4da5cc |
55 | // Kinematics |
1578254f |
56 | Float_t Mass(TParticle* part1, TParticle* part); |
57 | Float_t PT(TParticle* part1, TParticle* part); |
58 | Float_t Pz(TParticle* part1, TParticle* part); |
59 | Float_t Y(TParticle* part1, TParticle* part); |
fe4da5cc |
60 | // Response |
61 | void SmearGauss(Float_t width, Float_t & value); |
fe4da5cc |
62 | // Weight |
1578254f |
63 | Bool_t Correlated(TParticle* part1, TParticle* part2); |
fe4da5cc |
64 | void SetRate(Float_t rate){fRate1=rate;} |
65 | void SetRate(Float_t rate1, Float_t rate2 ){fRate1=rate1; fRate2=rate2;} |
1578254f |
66 | Float_t Weight(TParticle* part); |
67 | Float_t Weight(TParticle* part1, TParticle* part); |
68 | Float_t Decay_Prob(TParticle* part); |
7d566a7d |
69 | |
fe4da5cc |
70 | private: |
71 | void FirstPartner(); |
72 | void NextPartner(); |
73 | void FirstPartnerSelected(); |
74 | void NextPartnerSelected(); |
1578254f |
75 | Int_t Origin(TParticle* part); |
76 | TParticle* Parent(TParticle* part); |
77 | TParticle* Partner(); |
78 | Int_t Type(TParticle *part){return part->GetPdgCode();} |
fe4da5cc |
79 | private: |
80 | TClonesArray *fPartArray; |
81 | Int_t fNParticle; |
82 | Int_t fimuon1; |
83 | Int_t fimuon2; |
84 | Int_t fimin1; |
85 | Int_t fimin2; |
86 | Int_t fimax1; |
87 | Int_t fimax2; |
88 | Float_t fRate1; |
89 | Float_t fRate2; |
1578254f |
90 | TParticle *fmuon1; |
91 | TParticle *fmuon2; |
fe4da5cc |
92 | Float_t fPtMin; |
93 | Float_t fEtaMin; |
94 | Float_t fEtaMax; |
dafbc1c5 |
95 | ClassDef(AliDimuCombinator,1) // Dimuon Combinator |
fe4da5cc |
96 | }; |
97 | #endif |
98 | |
99 | |
100 | |
101 | |