]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliDimuCombinator.h
This commit was generated by cvs2svn to compensate for changes in r1018,
[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 #include "TParticle.h"
9 #include <TBrowser.h>
10 #include <TList.h>
11 #include <TTree.h>
12 #include <TROOT.h>
13
14
15 class AliDimuCombinator:
16     public TObject 
17 {
18 public:
19     AliDimuCombinator(TClonesArray* Partarray){
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 //    
38 //  Iterators
39 //  Single muons
40     TParticle* FirstMuon();
41     TParticle* NextMuon();
42 //  Single muons selected
43     TParticle* FirstMuonSelected();
44     TParticle* NextMuonSelected();
45 //  Dimuons    
46     void FirstMuonPair(TParticle* & muon1, TParticle* & muon2);
47     void NextMuonPair(TParticle* & muon1, TParticle* & muon2);
48 //  Dimuons selected    
49     void FirstMuonPairSelected(TParticle* & muon1, TParticle* & muon2);
50     void NextMuonPairSelected(TParticle* & muon1, TParticle* & muon2);
51 //  Loop over all prticles    
52     void ResetRange();
53 //  Set two ranges for dimuon loop    
54     void SetFirstRange (Int_t from, Int_t to);
55     void SetSecondRange(Int_t from, Int_t to);    
56 //  Cuts
57     void SetPtMin(Float_t ptmin) {fPtMin=ptmin;}
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);
60 // Kinematics
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);
65 // Response
66     void SmearGauss(Float_t width, Float_t & value);
67 // Weight
68     Bool_t  Correlated(TParticle* part1, TParticle* part2);
69     void    SetRate(Float_t rate){fRate1=rate;}
70     void    SetRate(Float_t rate1, Float_t rate2 ){fRate1=rate1; fRate2=rate2;}
71     Float_t Weight(TParticle* part);
72     Float_t Weight(TParticle* part1, TParticle* part);
73     Float_t Decay_Prob(TParticle* part);
74     
75  private:
76     void FirstPartner();
77     void NextPartner();
78     void FirstPartnerSelected();
79     void NextPartnerSelected();
80     Int_t Origin(TParticle* part);
81     TParticle* Parent(TParticle* part);
82     TParticle* Partner();
83     Int_t Type(TParticle *part){return part->GetPdgCode();}
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;
95     TParticle *fmuon1;
96     TParticle *fmuon2;
97     Float_t fPtMin;
98     Float_t fEtaMin;
99     Float_t fEtaMax;
100   ClassDef(AliDimuCombinator,1) // Dimuon Combinator
101 };
102 #endif
103
104
105
106