]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/Chaoticity/AliFourPion.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / Chaoticity / AliFourPion.h
1 #ifndef AliFourPion_cxx
2 #define AliFourPion_cxx
3 //
4 // Class AliFourPion
5 //
6 // AliFourPion
7 // author:
8 //        Dhevan Gangadharan (dhevan.raja.gangadharan@cern.ch)
9 //
10
11
12
13 class TH1F;
14 class TH3F;
15 class TH1D;
16 class TH2D;
17 class TH3D;
18
19 class TProfile;
20 class TProfile2D;
21 class TProfile3D;
22 class TRandom3;
23
24 class AliESDEvent;
25 class AliAODEvent;
26 class AliESDtrackCuts;
27 class AliESDpid;
28
29 #include "AliAnalysisTask.h"
30 #include "AliAnalysisTaskSE.h"
31 #include "AliESDpid.h"
32 #include "AliAODPid.h"
33 #include "AliFourPionEventCollection.h"
34 #include "AliCentrality.h"
35
36 class AliFourPion : public AliAnalysisTaskSE {
37  public:
38
39   AliFourPion();
40   AliFourPion(const Char_t *name);
41   virtual ~AliFourPion();
42   AliFourPion(const AliFourPion &obj); 
43   AliFourPion &operator=(const AliFourPion &obj);
44   
45
46   virtual void   UserCreateOutputObjects();
47   virtual void   UserExec(Option_t *option);
48   virtual void   Terminate(Option_t *);
49
50   enum {
51     kPairLimit = 10000,//10000
52     kNormPairLimit = 45000,
53     kMultLimitPbPb = 1800,//1800
54     kMultLimitpp = 300,
55     kMultBinspp = 10,
56     kMCarrayLimit = 150000,// 110000
57     kQbinsWeights = 40,
58     kNDampValues = 16,
59     kRmin = 5,// EW min radii 5 fm
60     kDENtypes = 179,// was 104
61   };
62
63   static const Int_t fKbinsT   = 4;// Set fKstep as well !!!!
64   static const Int_t fKbinsY   = 1;// Set fKstep as well !!!!
65   static const Int_t fEDbins   = 4;
66   static const Int_t fCentBins = 10;// 0-50%
67   static const Int_t fMbinsMixing = 10;// 5% widths
68   static const Int_t fRVALUES  = 7;// 7 EW radii (5-11) , was 8 Gaussian radii (3-10fm)
69
70
71   Int_t GetNumKtBins() const {return AliFourPion::fKbinsT;}
72   Int_t GetNumRValues() const {return AliFourPion::fRVALUES;}
73   Int_t GetNumCentBins() const {return AliFourPion::fCentBins;}
74   Int_t GetNumEDBins() const {return AliFourPion::fEDbins;}
75   void SetWeightArrays(Bool_t legoCase=kTRUE, TH3F *histos[AliFourPion::fKbinsT][AliFourPion::fCentBins]=0x0);
76   void SetMomResCorrections(Bool_t legoCase=kTRUE, TH2D *temp2DSC=0x0, TH2D *temp2DMC=0x0);
77   void SetFSICorrelations(Bool_t legoCase=kTRUE, TH1D *tempss[12]=0x0, TH1D *tempos[12]=0x0);
78   void SetMuonCorrections(Bool_t legoCase=kTRUE, TH2D *tempMuon=0x0);
79   void Setc3FitEAs(Bool_t legoCase=kTRUE, TH3D *histoPbPb[2]=0x0, TH3D *histopPb[2]=0x0, TH3D *histopp[2]=0x0);
80   //
81   void SetMCdecision(Bool_t mc) {fMCcase = mc;}
82   void SetTabulatePairs(Bool_t tabulate) {fTabulatePairs = tabulate;}
83   void SetInterpolationType(Bool_t linearInterp) {fLinearInterpolation = linearInterp;}
84   void SetCollisionType(Short_t ct) {fCollisionType = ct;}
85   void SetGenerateSignal(Bool_t gen) {fGenerateSignal = gen;}
86   void SetGeneratorOnly(Bool_t genOnly) {fGeneratorOnly = genOnly;}
87   void SetCentBinRange(Int_t low, Int_t high) {fCentBinLowLimit = low; fCentBinHighLimit = high;}
88   void SetLEGOCase(Bool_t lego) {fLEGO = lego;}
89   void SetFilterBit(UInt_t filterbit) {fFilterBit = filterbit;}
90   void SetMaxChi2NDF(Float_t MaxChi2NDF) {fMaxChi2NDF = MaxChi2NDF;}
91   void SetMinTPCncls(Int_t MinTPCncls) {fMinTPCncls = MinTPCncls;}
92   void SetEAtype(Int_t eat) {fEAtype = eat;}
93   void SetPairSeparationCutEta(Float_t pairsep) {fMinSepPairEta = pairsep;}
94   void SetPairSeparationCutPhi(Float_t pairsep) {fMinSepPairPhi = pairsep;}
95   void SetNsigmaTPC(Float_t nsig) {fSigmaCutTPC = nsig;}
96   void SetNsigmaTOF(Float_t nsig) {fSigmaCutTOF = nsig;}
97   void SetRMax(Int_t rbin) {fRMax = rbin;}
98   void SetfcSq(Float_t fcSq) {ffcSq = fcSq;}
99   void SetMixedChargeCut(Bool_t mcCut) {fMixedChargeCut = mcCut;}
100   void SetMinPt(Float_t minPt) {fMinPt = minPt;}
101   void SetMaxPt(Float_t maxPt) {fMaxPt = maxPt;}
102   void SetKT3transition(Float_t KT3trans) {fKT3transition = KT3trans;}
103   void SetKT4transition(Float_t KT4trans) {fKT4transition = KT4trans;}
104   void SetTriggerType(Int_t tt) {fTriggerType = tt;}
105   void SetNormLow(Float_t nl) {fNormQcutLow = nl;}
106   void SetNormHigh(Float_t nh) {fNormQcutHigh = nh;}
107   void SetFSIindexSmallSystem(Int_t ind) {fFSIindexSmallSystem = ind;}
108   void Setq2Binning(Bool_t qb) {fq2Binning = qb;}
109   void Setq2Index(Int_t q2i) {fq2Index = q2i;}
110   void Setq2CutLow(Float_t q2l) {fq2CutLow = q2l;}
111   void Setq2CutHigh(Float_t q2h) {fq2CutHigh = q2h;}
112   //
113   
114
115  private:
116
117   void ParInit();
118   Bool_t AcceptPair(AliFourPionTrackStruct, AliFourPionTrackStruct);
119   Bool_t AcceptPairPM(AliFourPionTrackStruct, AliFourPionTrackStruct);
120   Float_t Gamov(Int_t, Int_t, Float_t);
121   void Shuffle(Int_t*, Int_t, Int_t);
122   Float_t GetQinv(Float_t[], Float_t[]);
123   void GetQosl(Float_t[], Float_t[], Float_t&, Float_t&, Float_t&);
124   void GetWeight(Float_t[], Float_t[], Float_t&, Float_t&);
125   Float_t FSICorrelation(Int_t, Int_t, Float_t);
126   Float_t MCWeight(Int_t[2], Float_t, Float_t, Float_t, Float_t);
127   Float_t MCWeightOSL(Int_t, Int_t, Int_t, Int_t, Float_t, Float_t, Float_t, Float_t);
128   Float_t MCWeight3(Int_t, Float_t, Float_t, Int_t[3], Float_t[3], Float_t[3]);
129   Float_t MCWeightFSI3(Int_t, Float_t, Float_t, Int_t[3], Float_t[3]);
130   Float_t MCWeight4(Int_t, Float_t, Float_t, Int_t[4], Float_t[6], Float_t[6]);
131   Float_t MCWeightFSI4(Int_t, Float_t, Float_t, Int_t[4], Float_t[6]);
132   //
133   void SetFillBins2(Int_t, Int_t, Int_t&, Int_t&);
134   void SetFillBins3(Int_t, Int_t, Int_t, Short_t, Int_t&, Int_t&, Int_t&, Bool_t&, Bool_t&, Bool_t&);
135   void SetFillBins4(Int_t, Int_t, Int_t, Int_t, Int_t&, Int_t&, Int_t&, Int_t&, Int_t, Bool_t[13]);
136   void SetFSIindex(Float_t);
137   //
138   Float_t cubicInterpolate(Float_t[4], Float_t);
139   Float_t nCubicInterpolate(Int_t, Float_t*, Float_t[]);
140   
141   
142   const char* fname;// name of class
143   AliAODEvent            *fAOD; //!    // AOD object
144   TList                  *fOutputList; //! Compact Output list
145   AliPIDResponse         *fPIDResponse; //! PID response object; equivalent to AliAODpidUtil
146   
147   
148   AliFourPionEventCollection ***fEC; //!
149   AliFourPionEventStruct *fEvt; //!
150   AliFourPionTrackStruct *fTempStruct; //!
151   TRandom3* fRandomNumber; //!
152
153   
154  
155   //////////////////////////////
156   // histogram structures
157
158   
159   struct St6 {
160     TH1D *fNorm3; //!
161     TH1D *fTerms3; //!
162     TH3D *fTerms33D; //!
163     TProfile *fKfactor; //!
164     TProfile3D *fKfactor3D; //!
165     TProfile *fKfactorWeighted; //!
166     TProfile *fMeanQinv; //!
167     TH2D *fIdeal; //!
168     TH2D *fSmeared; //!
169     //
170     TH3D *fMuonSmeared; //!
171     TH3D *fMuonIdeal; //!
172     TH3D *fMuonPionK3; //!
173     TH3D *fPionPionK3; //!
174     //
175     TH2D *fBuild; //!
176     TH2D *fBuildNeg; //!
177     TH2D *fBuildErr; //!
178   };
179   struct St7 {
180     TH3D *fTerms2OSL; //!
181     TH3D *fTerms2OSLQW; //!
182   };
183   struct St5 {
184     TH2D *fTerms2; //!
185     TH2D *fTerms2QW; //!
186     TH3D *fTerms2ThreeD; //!
187     TProfile2D *fAvgP; //!
188     TH2D *fIdeal; //!
189     TH2D *fSmeared; //!
190     TH2D *fUnitMultBin; //!
191     //
192     TH2D *fMuonSmeared; //!
193     TH2D *fMuonIdeal; //!
194     TH2D *fMuonPionK2; //!
195     TH2D *fPionPionK2; //!
196     TH1D *fMCqinv; //!
197     TH1D *fMCqinvQW; //!
198     TH2D *fPIDpurityDen; //!
199     TH3D *fPIDpurityNum; //!
200     struct St7 OSL_ktbin[2];
201   };
202   struct StFourPT {
203     TH1D *fNorm4; //!
204     TH1D *fTerms4; //!
205     TProfile *fKfactor; //!
206     TProfile *fKfactorWeighted; //!
207     TH2D *fIdeal; //!
208     TH2D *fSmeared; //!
209     //
210     TH3D *fMuonSmeared; //!
211     TH3D *fMuonIdeal; //!
212     TH3D *fMuonPionK4; //!
213     TH3D *fPionPionK4; //!
214     //
215     TH2D *fBuild; //!
216     TH2D *fPrimeBuild; //!
217     TH2D *fPrimePrimeBuild; //!
218     TH2D *fCumulantBuild; //!
219     TH2D *fBuildNeg; //!
220     TH2D *fPrimeBuildNeg; //!
221     TH2D *fPrimePrimeBuildNeg; //!
222     TH2D *fCumulantBuildNeg; //!
223     //
224     TH2D *fBuildErr; //!
225     //
226     TH3D *fBuildFromFits; //!
227     TH3D *fPrimeBuildFromFits; //!
228     TH3D *fPrimePrimeBuildFromFits; //!
229     TH3D *fCumulantBuildFromFits; //!
230   };
231   struct St_EDB {
232     struct St5 TwoPT[2];
233     struct St6 ThreePT[5];
234     struct StFourPT FourPT[13];
235   };
236   struct St_M {
237     struct St_EDB EDB[fEDbins];
238   };
239   struct St4 {
240     struct St_M MB[fCentBins];
241   };
242   struct St3 {
243     struct St4 Charge4[2];
244     struct St_M MB[fCentBins];
245   };
246   struct St2 {
247     struct St3 Charge3[2];
248     struct St_M MB[fCentBins];
249   };
250   struct St1 {
251     struct St2 Charge2[2];
252   };
253   struct St1 Charge1[2];//!
254
255
256   /////////////////////
257   // 4D r3 denominator
258   struct St_Ky {
259     struct St_M MB[fCentBins];
260   };
261   struct St_Kt {
262     struct St_Ky KY[fKbinsY];
263   };
264   struct St_Kt KT[fKbinsT];//!
265   
266  
267   Bool_t fLEGO;
268   Bool_t fMCcase;
269   Bool_t fAODcase;
270   Short_t fCollisionType;
271   Bool_t fGenerateSignal;
272   Bool_t fGeneratorOnly;
273   Bool_t fTabulatePairs;
274   Bool_t fLinearInterpolation;
275   Bool_t fMixedChargeCut;
276   Int_t fRMax;
277   Float_t fRstartMC;
278   Float_t ffcSq;
279   Float_t ffcSqMRC;
280   UInt_t fFilterBit;
281   Float_t fMaxChi2NDF;
282   Int_t fMinTPCncls;
283   Int_t fEAtype;
284   Double_t fBfield;
285   Int_t fMbin;
286   Int_t fFSIindex;
287   Int_t fFSIindexSmallSystem;
288   Int_t fEDbin;
289   Int_t fMbins;
290   Int_t fMultLimit;      
291   Int_t fCentBinLowLimit;
292   Int_t fCentBinHighLimit;
293   Int_t fTriggerType;
294   Int_t fEventCounter;
295   Int_t fEventsToMix;
296   Int_t fZvertexBins;
297   Int_t fMultLimits[kMultBinspp+1];
298   Float_t fMinPt;
299   Float_t fMaxPt;
300   Float_t fQcut;
301   Float_t fQLowerCut;
302   Float_t fNormQcutLow;
303   Float_t fNormQcutHigh;
304   Float_t fKupperBound;
305   Double_t fQupperBoundQ2;
306   Double_t fQupperBoundQ3;
307   Double_t fQupperBoundQ4;
308   Int_t fQbinsQ2;
309   Int_t fQbinsQ3;
310   Int_t fQbinsQ4;
311   Double_t fQupperBoundWeights;
312   Int_t fQbinsQinv3D;
313   Double_t fQupperBoundQinv3D;
314   Float_t fKstepT[fKbinsT];
315   Float_t fKstepY[fKbinsY];
316   Float_t fKmeanT[fKbinsT];
317   Float_t fKmeanY[fKbinsY];
318   Float_t fKmiddleT[fKbinsT];
319   Float_t fKmiddleY[fKbinsY];
320   Float_t fQstep;
321   Float_t fQstepWeights;
322   Float_t fQmean[kQbinsWeights];
323   Float_t fDampStart;
324   Float_t fDampStep;
325   Bool_t fq2Binning;
326   Int_t fq2Index;
327   Float_t fq2CutLow;
328   Float_t fq2CutHigh;
329   Float_t fTPCTOFboundry;
330   Float_t fTOFboundry;
331   Float_t fSigmaCutTPC;
332   Float_t fSigmaCutTOF;
333   
334   Float_t fMinSepPairEta;
335   Float_t fMinSepPairPhi;
336   Float_t fShareQuality;
337   Float_t fShareFraction;
338   
339   Float_t fTrueMassP, fTrueMassPi, fTrueMassK, fTrueMassKs, fTrueMassLam;
340  
341   Int_t fKtIndexL,fKtIndexH;
342   //
343   Int_t fQoIndexL,fQoIndexH;
344   Int_t fQsIndexL,fQsIndexH;
345   Int_t fQlIndexL,fQlIndexH;
346
347   Bool_t fDummyB;
348
349   Float_t fKT3transition;
350   Float_t fKT4transition;
351   
352   Float_t farrP1[4][4][4];
353   Float_t farrP2[4][4][4];
354   
355  
356   //
357   Char_t fDefaultsCharSwitch[kMultLimitPbPb];//!
358   TArrayC *fLowQPairSwitch_E0E0[kMultLimitPbPb];//!
359   TArrayC *fLowQPairSwitch_E0E1[kMultLimitPbPb];//!
360   TArrayC *fLowQPairSwitch_E0E2[kMultLimitPbPb];//!
361   TArrayC *fLowQPairSwitch_E0E3[kMultLimitPbPb];//!
362   TArrayC *fLowQPairSwitch_E1E1[kMultLimitPbPb];//!
363   TArrayC *fLowQPairSwitch_E1E2[kMultLimitPbPb];//!
364   TArrayC *fLowQPairSwitch_E1E3[kMultLimitPbPb];//!
365   TArrayC *fLowQPairSwitch_E2E3[kMultLimitPbPb];//!
366   //
367   TArrayC *fNormQPairSwitch_E0E0[kMultLimitPbPb];//!
368   TArrayC *fNormQPairSwitch_E0E1[kMultLimitPbPb];//!
369   TArrayC *fNormQPairSwitch_E0E2[kMultLimitPbPb];//!
370   TArrayC *fNormQPairSwitch_E0E3[kMultLimitPbPb];//!
371   TArrayC *fNormQPairSwitch_E1E1[kMultLimitPbPb];//!
372   TArrayC *fNormQPairSwitch_E1E2[kMultLimitPbPb];//!
373   TArrayC *fNormQPairSwitch_E1E3[kMultLimitPbPb];//!
374   TArrayC *fNormQPairSwitch_E2E3[kMultLimitPbPb];//!
375
376   
377
378  public:
379   TH2D *fMomResC2SC;
380   TH2D *fMomResC2MC;
381   TH2D *fWeightmuonCorrection;
382   TH3D *fPbPbc3FitEA[2];
383   TH3D *fpPbc3FitEA[2];
384   TH3D *fppc3FitEA[2];
385   TH1D *fFSIss[13];
386   TH1D *fFSIos[13];
387   TH3F *fNormWeight[fKbinsT][fCentBins];
388   TF1 *ExchangeAmp[7][50][2];
389
390   ClassDef(AliFourPion, 1); 
391 };
392
393 #endif