]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliDimuCombinator.h
All coding rule violations except RS3 corrected
[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 #include <TParticle.h>
8 #include <TObject.h>
9
10 class TClonesArray;
11 class TParticle;
12
13
14 class AliDimuCombinator:
15     public TObject 
16 {
17 public:
18     AliDimuCombinator(TClonesArray* Partarray);
19     AliDimuCombinator(const AliDimuCombinator &combinator);
20 //    
21 //  Iterators
22 //  Single muons
23     TParticle* FirstMuon();
24     TParticle* NextMuon();
25 //  Single muons selected
26     TParticle* FirstMuonSelected();
27     TParticle* NextMuonSelected();
28 //  Dimuons    
29     void FirstMuonPair(TParticle* & muon1, TParticle* & muon2);
30     void NextMuonPair(TParticle* & muon1, TParticle* & muon2);
31 //  Dimuons selected    
32     void FirstMuonPairSelected(TParticle* & muon1, TParticle* & muon2);
33     void NextMuonPairSelected(TParticle* & muon1, TParticle* & muon2);
34 //  Loop over all prticles    
35     void ResetRange();
36 //  Set two ranges for dimuon loop    
37     void SetFirstRange (Int_t from, Int_t to);
38     void SetSecondRange(Int_t from, Int_t to);    
39 //  Cuts
40     void SetPtMin(Float_t ptmin) {fPtMin=ptmin;}
41     void SetEtaCut(Float_t etamin, Float_t etamax)
42         {fEtaMin=etamin; fEtaMax=etamax;}
43     Bool_t Selected(TParticle* part);
44     Bool_t Selected(TParticle* part1, TParticle* part2);
45 // Kinematics
46     Float_t Mass(TParticle* part1, TParticle* part);
47     Float_t PT(TParticle* part1, TParticle* part);
48     Float_t Pz(TParticle* part1, TParticle* part);
49     Float_t Y(TParticle* part1, TParticle* part);
50 // Response
51     void SmearGauss(Float_t width, Float_t & value);
52 // Weight
53     Bool_t  Correlated(TParticle* part1, TParticle* part2);
54     void    SetRate(Float_t rate){fRate1=rate;}
55     void    SetRate(Float_t rate1, Float_t rate2 ){fRate1=rate1; fRate2=rate2;}
56     Float_t Weight(TParticle* part);
57     Float_t Weight(TParticle* part1, TParticle* part);
58     Float_t DecayProbability(TParticle* part);
59     AliDimuCombinator & operator=(const AliDimuCombinator & rhs);
60     
61  private:
62     void FirstPartner();
63     void NextPartner();
64     void FirstPartnerSelected();
65     void NextPartnerSelected();
66     Int_t Origin(TParticle* part);
67     TParticle* Parent(TParticle* part);
68     TParticle* Partner();
69     Int_t Type(TParticle *part) {return part->GetPdgCode();}
70 private:
71     TClonesArray *fPartArray;      // MC Event
72     Int_t fNParticle;              // Number of particles
73     Int_t fimuon1;                 // Index of first muon
74     Int_t fimuon2;                 // Index of second muon
75     Int_t fimin1;                  // Lowest index for first   muon  
76     Int_t fimin2;                  // Lowest index for second  muon 
77     Int_t fimax1;                  // Highest index for first  muon  
78     Int_t fimax2;                  // Highest index for second muon 
79     Float_t fRate1;                // weight factor  
80     Float_t fRate2;                // weight factor
81     TParticle *fmuon1;             // First muon
82     TParticle *fmuon2;             // Second muon
83     Float_t fPtMin;                // pT-cut 
84     Float_t fEtaMin;               // Minimum pseudorapidity cut
85     Float_t fEtaMax;               // Maximum pseudorapidity cut
86     
87     ClassDef(AliDimuCombinator,1)  // Tools for dimuon combinatoric studies
88 };
89 #endif
90
91
92
93
94