end-of-line normalization
[u/mrichter/AliRoot.git] / PWGCF / EBYE / BalanceFunctions / AliAnalysisTaskToyModel.h
1 #ifndef ALIANALYSISTASKTOYMODEL_CXX
2 #define ALIANALYSISTASKTOYMODEL_CXX
3
4 // Analysis task for a simple toy model, currently used for the 
5 // balance function
6 // Authors: Panos Christakoglou@nikhef.nl
7
8 class TList;
9 class TH1F;
10 class TH2F;
11 class TH3F;
12 class TF1;
13
14 class AliBalancePsi;
15 class AliEventPoolManager;
16
17 class AliAnalysisTaskToyModel : public TObject {
18  public:
19   AliAnalysisTaskToyModel();
20   virtual ~AliAnalysisTaskToyModel(); 
21   
22   virtual void   Init();
23   virtual void   CreateOutputObjects();
24   virtual void   Run(Int_t nEvents);
25   virtual void   FinishOutput();
26   
27   void SetDebugFlag() {fUseDebug = kTRUE;}
28
29   void SetAnalysisObject(AliBalancePsi *const analysis) {
30     fBalance         = analysis;
31   }
32   void SetShufflingObject(AliBalancePsi *const analysisShuffled) {
33     fRunShuffling = kTRUE;
34     fShuffledBalance = analysisShuffled;
35   }
36   void SetMixingObject(AliBalancePsi *const analysisMixed) {
37     fRunMixing = kTRUE;
38     fMixedBalance = analysisMixed;
39   }
40
41   //============Toy model: List of setters============//
42   void SetTotalMultiplicity(Double_t mean, Double_t sigma) {
43     fTotalMultiplicityMean = mean;
44     fTotalMultiplicitySigma = sigma;}
45   void SetNetCharge(Double_t mean, Double_t sigma) {
46     fNetChargeMean = mean;
47     fNetChargeSigma = sigma;}
48
49   //Acceptance
50   void SetKinematicsCutsMC(Double_t ptmin, Double_t ptmax,
51                            Double_t etamin, Double_t etamax){
52     fPtMin  = ptmin; fPtMax  = ptmax;
53     fEtaMin = etamin; fEtaMax = etamax;
54   }
55
56   //Acceptance filter
57   void SetAcceptanceParameterization(TF1 *parameterization) {
58     fUseAcceptanceParameterization = kTRUE;
59     fAcceptanceParameterization = parameterization;}
60
61   //Acceptance - simulate detector effects/inefficiencies
62   void SimulateDetectorEffects() {fSimulateDetectorEffects = kTRUE;}
63   void SetNumberOfInefficientSectorsInPhi(Int_t numberOfInefficientSectors) {
64     fNumberOfInefficientSectors = numberOfInefficientSectors;
65     fInefficiencyFactorInPhi = 0.5;}
66   void SetInefficiencyFactor(Double_t gInefficiencyFactorInPhi) {
67     fInefficiencyFactorInPhi = gInefficiencyFactorInPhi;}
68   void SetNumberOfDeadSectorsInPhi(Int_t numberOfDeadSectors) {
69     fNumberOfDeadSectors = numberOfDeadSectors;}
70   void EnableEfficiencyDropNearEtaEdges() {
71     fEfficiencyDropNearEtaEdges = kTRUE;}
72
73   //All charges
74   void SetSpectraTemperatureForAllCharges(Double_t temperature) {
75     fUseAllCharges = kTRUE;
76     fTemperatureAllCharges = temperature;}
77   void SetDirectedFlowForAllCharges(Double_t v1) {
78     fUseAllCharges = kTRUE;
79     fDirectedFlowAllCharges = v1;}
80   void SetEllipticFlowForAllCharges(Double_t v2) {
81     fUseAllCharges = kTRUE;
82     fEllipticFlowAllCharges = v2;}
83   void SetTriangularFlowForAllCharges(Double_t v3) {
84     fUseAllCharges = kTRUE;
85     fTriangularFlowAllCharges = v3;}
86   void SetQuandrangularFlowForAllCharges(Double_t v4) {
87     fUseAllCharges = kTRUE;
88     fQuandrangularFlowAllCharges = v4;}
89   void SetPentangularFlowForAllCharges(Double_t v5) {
90     fUseAllCharges = kTRUE;
91     fPentangularFlowAllCharges = v5;}
92
93   //Pions
94   void SetPionPercentage(Double_t percentage) {
95     fPionPercentage = percentage;}
96   void SetSpectraTemperatureForPions(Double_t temperature) {
97     fTemperaturePions = temperature;}
98   void SetDirectedFlowForPions(Double_t v1) {
99     fDirectedFlowPions = v1;}
100   void SetEllipticFlowForPions(Double_t v2) {
101     fEllipticFlowPions = v2;}
102   void SetTriangularFlowForPions(Double_t v3) {
103     fTriangularFlowPions = v3;}
104   void SetQuandrangularFlowForPions(Double_t v4) {
105     fQuandrangularFlowPions = v4;}
106   void SetPentangularFlowForPions(Double_t v5) {
107     fPentangularFlowPions = v5;}
108   
109   //Kaons
110   void SetKaonPercentage(Double_t percentage) {
111     fKaonPercentage = percentage;}
112   void SetSpectraTemperatureForKaons(Double_t temperature) {
113     fTemperatureKaons = temperature;}
114   void SetDirectedFlowForKaons(Double_t v1) {
115     fDirectedFlowKaons = v1;}
116   void SetEllipticFlowForKaons(Double_t v2) {
117     fEllipticFlowKaons = v2;}
118   void SetTriangularFlowForKaons(Double_t v3) {
119     fTriangularFlowKaons = v3;}
120   void SetQuandrangularFlowForKaons(Double_t v4) {
121     fQuandrangularFlowKaons = v4;}
122   void SetPentangularFlowForKaons(Double_t v5) {
123     fPentangularFlowKaons = v5;}
124
125   //Protons
126   void SetProtonPercentage(Double_t percentage) {
127     fProtonPercentage = percentage;}
128   void SetSpectraTemperatureForProtons(Double_t temperature) {
129     fTemperatureProtons = temperature;}
130   void SetDirectedFlowForProtons(Double_t v1) {
131     fDirectedFlowProtons = v1;}
132   void SetEllipticFlowForProtons(Double_t v2) {
133     fEllipticFlowProtons = v2;}
134   void SetTriangularFlowForProtons(Double_t v3) {
135     fTriangularFlowProtons = v3;}
136   void SetQuandrangularFlowForProtons(Double_t v4) {
137     fQuandrangularFlowProtons = v4;}
138   void SetPentangularFlowForProtons(Double_t v5) {
139     fPentangularFlowProtons = v5;}
140
141   //Dynamical correlations
142   void SetCorrelationPercentage(Double_t percentage) {
143     fUseDynamicalCorrelations = kTRUE; 
144     fDynamicalCorrelationsPercentage = percentage;
145   }
146
147   //Jet-like structures
148   void SetUseJets() {fUseJets = kTRUE;}
149   //============Toy model: List of setters============//
150
151  private:
152   void SetupEfficiencyMatrix();
153
154   Bool_t fUseDebug; //Debug flag
155
156   AliBalancePsi *fBalance; //BF object
157   Bool_t fRunShuffling;//run shuffling or not
158   AliBalancePsi *fShuffledBalance; //BF object (shuffled)
159   Bool_t fRunMixing;//run mixing or not
160   AliBalancePsi *fMixedBalance; //BF object (mixed)
161   AliEventPoolManager*     fPoolMgr;         //! event pool manager
162   TList *fList; //fList object
163   TList *fListBF; //fList object
164   TList *fListBFS; //fList object (shuffling)
165   TList *fListBFM; //fList object (mixing)
166
167   TH1F *fHistEventStats; //event stats
168   TH1F *fHistNumberOfAcceptedParticles; //number of accepted particles
169   TH1F *fHistReactionPlane; //reaction plane angle
170   TH1F *fHistEtaTotal; //pseudo-rapidity (full phase space)
171   TH1F *fHistEta; //pseudo-rapidity (acceptance)
172   TH2F *fHistEtaPhiPos; //eta-phi pos
173   TH2F *fHistEtaPhiNeg; //eta-phi neg
174   TH1F *fHistRapidity; //rapidity (acceptance)
175   TH1F *fHistRapidityPions; //rapidity (acceptance)
176   TH1F *fHistRapidityKaons; //rapidity (acceptance)
177   TH1F *fHistRapidityProtons; //rapidity (acceptance)
178   TH1F *fHistPhi; //phi (acceptance)
179   TH1F *fHistPhiPions; //phi (acceptance)
180   TH1F *fHistPhiKaons; //phi (acceptance)
181   TH1F *fHistPhiProtons; //phi (acceptance)
182   TH1F *fHistPt; //pt (acceptance)
183   TH1F *fHistPtPions; //pt (acceptance)
184   TH1F *fHistPtKaons; //pt (acceptance)
185   TH1F *fHistPtProtons; //pt (acceptance)
186
187   //Toy model input
188   Double_t fTotalMultiplicityMean; //mean for the total multiplicity
189   Double_t fTotalMultiplicitySigma; //sigma for the total multiplicity
190   Double_t fNetChargeMean; //mean for the net charge
191   Double_t fNetChargeSigma; //sigma for the net charge
192   Double_t fPtMin; //pt min for acceptance
193   Double_t fPtMax; //pt max for acceptance
194   Double_t fEtaMin; //eta min for acceptance
195   Double_t fEtaMax; //eta max for acceptance
196
197   //Acceptance parameterization
198   Bool_t fUseAcceptanceParameterization; //flag acceptance parameterization
199   TF1 *fAcceptanceParameterization; //acceptance parameterization
200
201   //Simulate detector effects
202   Bool_t fSimulateDetectorEffects;//simulate detector effects in pT
203   Int_t fNumberOfInefficientSectors;//inefficient secotrs in phi
204   Double_t fInefficiencyFactorInPhi;//efficiency factor < 1
205   Int_t fNumberOfDeadSectors;//number of dead sectors
206   Bool_t fEfficiencyDropNearEtaEdges;//efficiency drop in eta edges
207   TH3F *fEfficiencyMatrix; //efficiency matrix in eta-pt-phi
208
209   //Kinematics
210   Bool_t   fUseAllCharges; //use all charges
211   Double_t fParticleMass; //particle mass
212   TF1     *fPtSpectraAllCharges; //spectra for all charges
213   Double_t fTemperatureAllCharges; //temperature for pt spectra
214   Double_t fReactionPlane; //reaction plane angle
215   TF1     *fAzimuthalAngleAllCharges; //azimuthal angle
216   Double_t fDirectedFlowAllCharges; //directed flow value
217   Double_t fEllipticFlowAllCharges; //elliptic flow value
218   Double_t fTriangularFlowAllCharges; //triangular flow value
219   Double_t fQuandrangularFlowAllCharges; //quadrangular flow value
220   Double_t fPentangularFlowAllCharges; //pentangular flow value
221
222   Double_t fPionPercentage; //percentage of pions
223   Double_t fPionMass; //pion mass
224   TF1     *fPtSpectraPions; //spectra for pions
225   Double_t fTemperaturePions; //temperature for pt spectra
226   TF1     *fAzimuthalAnglePions; //azimuthal angle for pions
227   Double_t fDirectedFlowPions; //directed flow value
228   Double_t fEllipticFlowPions; //elliptic flow value
229   Double_t fTriangularFlowPions; //triangular flow value
230   Double_t fQuandrangularFlowPions; //quadrangular flow value
231   Double_t fPentangularFlowPions; //pentangular flow value
232
233   Double_t fKaonPercentage; //percentage of kaons
234   Double_t fKaonMass; //kaon mass
235   TF1     *fPtSpectraKaons; //spectra for kaons
236   Double_t fTemperatureKaons; //temperature for pt spectra
237   TF1     *fAzimuthalAngleKaons; //azimuthal angle for kaons
238   Double_t fDirectedFlowKaons; //directed flow value
239   Double_t fEllipticFlowKaons; //elliptic flow value
240   Double_t fTriangularFlowKaons; //triangular flow value
241   Double_t fQuandrangularFlowKaons; //quadrangular flow value
242   Double_t fPentangularFlowKaons; //pentangular flow value
243
244   Double_t fProtonPercentage; //percentage of protons
245   Double_t fProtonMass; //proton mass
246   TF1     *fPtSpectraProtons; //spectra for protons
247   Double_t fTemperatureProtons; //temperature for pt spectra
248   TF1     *fAzimuthalAngleProtons; //azimuthal angle for protons
249   Double_t fDirectedFlowProtons; //directed flow value
250   Double_t fEllipticFlowProtons; //elliptic flow value
251   Double_t fTriangularFlowProtons; //triangular flow value
252   Double_t fQuandrangularFlowProtons; //quadrangular flow value
253   Double_t fPentangularFlowProtons; //pentangular flow value
254
255   Bool_t fUseDynamicalCorrelations; //Usage of dynamical correlations
256   Double_t fDynamicalCorrelationsPercentage; //Percentage of correlations
257
258   Bool_t fUseJets;//Usage of jet-like structures
259   TF1 *fPtAssoc;//pt of associated
260
261   AliAnalysisTaskToyModel(const AliAnalysisTaskToyModel&); // not implemented
262   AliAnalysisTaskToyModel& operator=(const AliAnalysisTaskToyModel&); // not implemented
263   
264   ClassDef(AliAnalysisTaskToyModel, 1); // example of analysis
265 };
266
267 #endif