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