]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.h
changed behavior cut on integer values
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowEventSimpleMakerOnTheFly.h
1 /* 
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. 
3  * See cxx source for full Copyright notice 
4  * $Id$ 
5  */
6
7 /********************************** 
8  * create an event and perform    *
9  * flow analysis 'on the fly'     * 
10  *                                * 
11  * authors: Raimond Snellings     *
12  *           (snelling@nikhef.nl) * 
13  *          Ante Bilandzic        * 
14  *           (anteb@nikhef.nl)    *
15  *********************************/ 
16
17 #ifndef ALIFLOWEVENTSIMPLEMAKERONTHEFLY_H
18 #define ALIFLOWEVENTSIMPLEMAKERONTHEFLY_H
19
20 class TF1;
21 class TRandom3;
22
23 #include "AliFlowEventSimple.h"  //needed as include
24 #include "AliFlowTrackSimpleCuts.h"
25     
26 class AliFlowEventSimpleMakerOnTheFly {
27
28  public:
29
30   AliFlowEventSimpleMakerOnTheFly(UInt_t);    // constructor
31   virtual ~AliFlowEventSimpleMakerOnTheFly(); // destructor
32
33   virtual void Init(); 
34   
35   Int_t DetermineMultiplicity(); // determine multiplicity for current event
36   virtual void DetermineV1(); // determine flow harmonics v1 for current event (if v1 is not pt or eta dependent)
37   virtual void DetermineV2(); // determine flow harmonics v2 for current event (if v2 is not pt or eta dependent)
38   virtual void DetermineV4(); // determine flow harmonics v4 for current event (if v4 is not pt or eta dependent)
39   Int_t GlauberModel(); // determine multiplicity and flow harmonics for current event from Glauber moder
40   AliFlowEventSimple* CreateEventOnTheFly(AliFlowTrackSimpleCuts *cutsRP, AliFlowTrackSimpleCuts *cutsPOI);  // create an event on the fly
41  
42     
43   //                        *****************************
44   //                        **** SETTERS AND GETTERS ****
45   //                        *****************************
46   //................................................................................................
47   // setters and getters for global parameters:
48   void SetUseGlauberModel(Bool_t const ugm) {this->fUseGlauberModel = ugm;};
49   Bool_t GetUseGlauberModel() const {return this->fUseGlauberModel;};
50   
51   void SetMultDistrOfRPsIsGauss(Bool_t const mdorig) {this->fMultDistrOfRPsIsGauss = mdorig;};
52   Bool_t GetMultDistrOfRPsIsGauss() const {return this->fMultDistrOfRPsIsGauss;};
53   
54   void SetMultiplicityOfRP(Int_t multRP) {this->fMultiplicityOfRP = multRP;}
55   Int_t GetMultiplicityOfRP() const {return this->fMultiplicityOfRP;} 
56   
57   void SetMultiplicitySpreadOfRP(Double_t multSpreadRP) {this->fMultiplicitySpreadOfRP = multSpreadRP;}
58   Double_t GetMultiplicitySpreadOfRP() const {return this->fMultiplicitySpreadOfRP;} 
59   
60   void SetMinMultOfRP(Int_t minmr) {this->fMinMultOfRP = minmr;}
61   Int_t GetMinMultOfRP() const {return this->fMinMultOfRP;} 
62   
63   void SetMaxMultOfRP(Int_t maxmr) {this->fMaxMultOfRP = maxmr;}
64   Int_t GetMaxMultOfRP() const {return this->fMaxMultOfRP;} 
65   
66   void SetTemperatureOfRP(Double_t temperatureRP) {this->fTemperatureOfRP = temperatureRP;}
67   Double_t GetTemperatureOfRP() const {return this->fTemperatureOfRP;} 
68   
69   void SetPtDependentHarmonicV1(Bool_t const pdhV1) {this->fPtDependentHarmonicV1 = pdhV1;};
70   Bool_t GetPtDependentHarmonicV1() const {return this->fPtDependentHarmonicV1;};
71   
72   void SetEtaDependentHarmonicV1(Bool_t const edhV1) {this->fEtaDependentHarmonicV1 = edhV1;};
73   Bool_t GetEtaDependentHarmonicV1() const {return this->fEtaDependentHarmonicV1;};
74   
75   void SetPtDependentHarmonicV2(Bool_t const pdhV2) {this->fPtDependentHarmonicV2 = pdhV2;};
76   Bool_t GetPtDependentHarmonicV2() const {return this->fPtDependentHarmonicV2;};
77   
78   void SetEtaDependentHarmonicV2(Bool_t const edhV2) {this->fEtaDependentHarmonicV2 = edhV2;};
79   Bool_t GetEtaDependentHarmonicV2() const {return this->fEtaDependentHarmonicV2;};
80   
81   void SetPtDependentHarmonicV4(Bool_t const pdhV4) {this->fPtDependentHarmonicV4 = pdhV4;};
82   Bool_t GetPtDependentHarmonicV4() const {return this->fPtDependentHarmonicV4;};
83   
84   void SetEtaDependentHarmonicV4(Bool_t const edhV4) {this->fEtaDependentHarmonicV4 = edhV4;};
85   Bool_t GetEtaDependentHarmonicV4() const {return this->fEtaDependentHarmonicV4;};
86   
87   // constant harmonics:  
88   void SetV1RP(Double_t dV1RP) {this->fV1RP = dV1RP;}
89   Double_t GetV1RP() const {return this->fV1RP;} 
90   
91   void SetV1SpreadRP(Double_t dV1SpreadRP) {this->fV1SpreadRP = dV1SpreadRP;}
92   Double_t GetV1SpreadRP() const {return this->fV1SpreadRP;} 
93   
94   void SetConstantV2IsSampledFromGauss(Bool_t const cV2isfg) {this->fConstantV2IsSampledFromGauss = cV2isfg;};
95   Bool_t GetConstantV2IsSampledFromGauss() const {return this->fConstantV2IsSampledFromGauss;};
96   
97   void SetV2RP(Double_t dV2RP) {this->fV2RP = dV2RP;}
98   Double_t GetV2RP() const {return this->fV2RP;} 
99   
100   void SetV2SpreadRP(Double_t dV2SpreadRP) {this->fV2SpreadRP = dV2SpreadRP;}
101   Double_t GetV2SpreadRP() const {return this->fV2SpreadRP;} 
102   
103   void SetMinV2RP(Double_t dMinV2RP) {this->fMinV2RP = dMinV2RP;}
104   Double_t GetMinV2RP() const {return this->fMinV2RP;} 
105   
106   void SetMaxV2RP(Double_t dMaxV2RP) {this->fMaxV2RP = dMaxV2RP;}
107   Double_t GetMaxV2RP() const {return this->fMaxV2RP;} 
108   
109   void SetV4RP(Double_t dV4RP) {this->fV4RP = dV4RP;}
110   Double_t GetV4RP() const {return this->fV4RP;} 
111   
112   void SetV4SpreadRP(Double_t dV4SpreadRP) {this->fV4SpreadRP = dV4SpreadRP;}
113   Double_t GetV4SpreadRP() const {return this->fV4SpreadRP;} 
114   
115   void SetV1vsPtEtaMax(Double_t dV1vsPtEtaMax) {this->fV1vsPtEtaMax = dV1vsPtEtaMax;}
116   Double_t GetV1vsPtEtaMax() const {return this->fV1vsPtEtaMax;} 
117   
118   void SetV1PtCutOff(Double_t dV1PtCutOff) {this->fV1PtCutOff = dV1PtCutOff;}
119   Double_t GetV1PtCutOff() const {return this->fV1PtCutOff;} 
120   
121   void SetV2vsPtEtaMax(Double_t dV2vsPtEtaMax) {this->fV2vsPtEtaMax = dV2vsPtEtaMax;}
122   Double_t GetV2vsPtEtaMax() const {return this->fV2vsPtEtaMax;} 
123   
124   void SetV2PtCutOff(Double_t dV2PtCutOff) {this->fV2PtCutOff = dV2PtCutOff;}
125   Double_t GetV2PtCutOff() const {return this->fV2PtCutOff;} 
126   
127   void SetV2vsEtaSpread(Double_t dV2vsEtaSpread) {this->fV2vsEtaSpread = dV2vsEtaSpread;}
128   Double_t GetV2vsEtaSpread() const {return this->fV2vsEtaSpread;} 
129   
130   void SetFirstSectorPhiMin(Double_t dPhiMin1) {this->fPhiMin1 = dPhiMin1;}
131   Double_t GetFirstSectorPhiMin() const {return this->fPhiMin1;} 
132   
133   void SetFirstSectorPhiMax(Double_t dPhiMax1) {this->fPhiMax1 = dPhiMax1;}
134   Double_t GetFirstSectorPhiMax() const {return this->fPhiMax1;}
135   
136   void SetFirstSectorProbability(Double_t dProbability1) {this->fProbability1 = dProbability1;}
137   Double_t GetFirstProbability() const {return this->fProbability1;}  
138   
139   void SetSecondSectorPhiMin(Double_t dPhiMin2) {this->fPhiMin2 = dPhiMin2;}
140   Double_t GetSecondSectorPhiMin() const {return this->fPhiMin2;} 
141   
142   void SetSecondSectorPhiMax(Double_t dPhiMax2) {this->fPhiMax2 = dPhiMax2;}
143   Double_t GetSecondSectorPhiMax() const {return this->fPhiMax2;}
144   
145   void SetSecondSectorProbability(Double_t dProbability2) {this->fProbability2 = dProbability2;}
146   Double_t GetSecondProbability() const {return this->fProbability2;}  
147   //................................................................................................
148   
149   void SetNoOfLoops(Int_t noofl) {this->fNoOfLoops = noofl;}
150   Int_t GetNoOfLoops() const {return this->fNoOfLoops;} 
151   void SetPhiRange(Double_t phr) {this->fPhiRange = phr;}
152   Double_t GetPhiRange() const {return this->fPhiRange;}   
153   void SetPtRange(Double_t pr) {this->fPtRange = pr;}
154   Double_t GetPtRange() const {return this->fPtRange;}   
155   void SetEtaRange(Double_t er) {this->fEtaRange = er;}
156   Double_t GetEtaRange() const {return this->fEtaRange;} 
157   void SetNonflowSectorMin(Double_t nsMin) {this->fNonflowSectorMin = nsMin;}
158   Double_t GetNonflowSectorMin() const {return this->fNonflowSectorMin;} 
159   void SetNonflowSectorMax(Double_t nsMax) {this->fNonflowSectorMax = nsMax;}
160   Double_t GetNonflowSectorMax() const {return this->fNonflowSectorMax;} 
161   void SetSubeventEtaRange(Double_t minA,Double_t maxA,Double_t minB,Double_t maxB) 
162   {this->fEtaMinA = minA; this->fEtaMaxA = maxA;this->fEtaMinB = minB; this->fEtaMaxB = maxB;};
163   // jets:
164   void SetCreateJets(Bool_t const cj) {this->fCreateJets = cj;};
165   Bool_t GetCreateJets() const {return this->fCreateJets;};
166   void SetJetProbability(Double_t jp) {this->fJetProbability = jp;}
167   Double_t GetJetProbability() const {return this->fJetProbability;}  
168   void SetJetTracksFraction(Double_t jtf) {this->fJetTracksFraction = jtf;}
169   Double_t GetJetTracksFraction() const {return this->fJetTracksFraction;}    
170   void SetJetCone(Double_t jc) {this->fJetCone = jc;}
171   Double_t GetJetCone() const {return this->fJetCone;}   
172      
173  private:
174  
175   AliFlowEventSimpleMakerOnTheFly(const AliFlowEventSimpleMakerOnTheFly& anAnalysis);            // copy constructor
176   AliFlowEventSimpleMakerOnTheFly& operator=(const AliFlowEventSimpleMakerOnTheFly& anAnalysis); // assignment operator
177   
178   //................................................................................................
179   // global parameters:
180   Bool_t    fUseGlauberModel;        // if kTRUE multiplicity and flow harmonics are determined e-b-e from Glauber model
181   Bool_t    fMultDistrOfRPsIsGauss;  // 1.) if kTRUE  = multiplicitiy of RPs is sampled e-b-e from Gaussian distribution with
182                                      //                 mean = fMultiplicityOfRP and spread = fMultiplicitySpreadOfRP
183                                      // 2.) if kFALSE = multiplicitiy of RPs is sampled e-b-e uniformly from 
184                                      //                 interval [fMinMultOfRP,fMaxMultOfRP]
185   Int_t     fMultiplicityOfRP;       // mean multiplicity of RPs (if sampled from Gaussian)
186   Double_t  fMultiplicitySpreadOfRP; // multiplicity spread of RPs (if sampled from Gaussian)
187   Int_t     fMinMultOfRP;            // minimal multiplicity of RPs (if sampled uniformly)
188   Int_t     fMaxMultOfRP;            // maximum multiplicity of RPs (if sampled uniformly)
189   Double_t  fTemperatureOfRP;        // "temperature" of RPs in GeV/c (increase this parameter to get more high pt RPs) 
190   Bool_t    fPtDependentHarmonicV1;  // harmonic V1 is a function of pt     
191   Bool_t    fEtaDependentHarmonicV1; // harmonic V1 is a function of eta     
192   Bool_t    fPtDependentHarmonicV2;  // harmonic V2 is a function of pt     
193   Bool_t    fEtaDependentHarmonicV2; // harmonic V2 is a function of eta     
194   Bool_t    fPtDependentHarmonicV4;  // harmonic V4 is a function of pt     
195   Bool_t    fEtaDependentHarmonicV4; // harmonic V4 is a function of eta     
196   
197   // constant harmonics: 
198   Double_t  fV1RP;                   // directed flow of RPs
199   Double_t  fV1SpreadRP;             // directed flow spread of RPs
200   
201   Bool_t    fConstantV2IsSampledFromGauss; // 1.) if kTRUE  = elliptic flow of RPs is sampled e-b-e from Gaussian distribution with
202                                            //                 mean = fV2RP and spread = fV2SpreadRP
203                                            // 2.) if kFALSE = elliptic flow of RPs is sampled e-b-e uniformly from 
204                                            //                 interval [fMinV2RP,fMaxV2RP]
205   Double_t  fV2RP;                   // mean elliptic flow of RPs (if sampled from Gaussian)
206   Double_t  fV2SpreadRP;             // elliptic flow spread of RPs (if sampled from Gaussian)
207   Double_t  fMinV2RP;                // minimal elliptic flow of RPs (if sampled uniformly)
208   Double_t  fMaxV2RP;                // minimal elliptic flow of RPs (if sampled uniformly)
209   
210   Double_t  fV4RP;                   // harmonic V4 of RPs
211   Double_t  fV4SpreadRP;             // harmonic V4's spread of RPs
212   // (pt,eta) dependent harmonic V1:
213   Double_t  fV1vsPtEtaMax;           // max value of (pt,eta) dependent V1
214   Double_t  fV1PtCutOff;             // V1(pt) is linear up to pt = dV1PtCutOff and for pt > dV1PtCutOff it is constant, V1(pt) = dV1vsPtEtaMax
215   // (pt,eta) dependent harmonic V2:
216   Double_t  fV2vsPtEtaMax;           // max value of (pt,eta) dependent V2
217   Double_t  fV2PtCutOff;               // V2(pt) is linear up to pt = dV2PtCutOff and for pt > dV2PtCutOff it is constant, V2(pt) = dV2vsPtEtaMax
218   Double_t  fV2vsEtaSpread;          // V2(eta) is Gaussian centered at midrapidity (eta=0) with spread = dV2vsEtaSpread
219   // non-uniform acceptance:
220   Double_t  fPhiMin1;                // first non-uniform sector starts at azimuth fPhiMin1
221   Double_t  fPhiMax1;                // first non-uniform sector ends at azimuth fPhiMax1
222   Double_t  fProbability1;           // particles emitted in fPhiMin1 < phi < fPhiMax1 are taken with probability fProbability1 
223   Double_t  fPhiMin2;                // second non-uniform sector starts at azimuth fPhiMin2
224   Double_t  fPhiMax2;                // second non-uniform sector starts at azimuth fPhiMax2
225   Double_t  fProbability2;           // particles emitted in fPhiMin2 < phi < fPhiMax2 are taken with probability fProbability2
226   //................................................................................................
227   
228   //................................................................................................
229   // equations for distributions: 
230   TF1*      fPtSpectra;  // transverse momentum distribution
231   TF1*      fPhiDistribution; // azimuthal distribution
232   //................................................................................................
233   
234   TRandom3* fMyTRandom3;        // our TRandom3 generator
235   Int_t     fCount;             // count number of events 
236   Int_t     fNoOfLoops;         // number of times to use the same particle (nonflow)
237   Double_t  fPhiRange;          // splitted track phi range (+/- from original track's phi) for uniform sampling
238   Double_t  fPtRange;           // splitted track pt range (+/- from original track's pt) for uniform sampling
239   Double_t  fEtaRange;          // splitted track eta range (+/- from original track's eta) for uniform sampling
240   Double_t  fNonflowSectorMin;  // detector's sector in which tracks are splitted starts at angle fNonflowSectorMin
241   Double_t  fNonflowSectorMax;  // detector's sector in which tracks are splitted ends at angle fNonflowSectorMin
242   Double_t  fEtaMinA;           // minimum eta of subevent A eta range
243   Double_t  fEtaMaxA;           // maximum eta of subevent A eta range
244   Double_t  fEtaMinB;           // minimum eta of subevent B eta range
245   Double_t  fEtaMaxB;           // maximum eta of subevent B eta range  
246   Bool_t    fCreateJets;        // enable to study nonflow fluctuations via jet creation
247   Double_t  fJetProbability;    // probability than event will have a jet
248   Double_t  fJetTracksFraction; // percentage of total tracks in an event belonging to the jet
249   Double_t  fJetCone;           // angular size of jet cone (in degrees)                   
250
251   ClassDef(AliFlowEventSimpleMakerOnTheFly,0) // macro for rootcint
252 };
253  
254 #endif
255
256
257