]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/Chaoticity/AliFourPion.h
fix fcollisiontype assignment bug
[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 = 104,// was 44
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   = 2;
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=0x0, TH3D *histopPb=0x0, TH3D *histopp=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 SetPairSeparationCutEta(Float_t pairsep) {fMinSepPairEta = pairsep;}
93   void SetPairSeparationCutPhi(Float_t pairsep) {fMinSepPairPhi = pairsep;}
94   void SetNsigmaTPC(Float_t nsig) {fSigmaCutTPC = nsig;}
95   void SetNsigmaTOF(Float_t nsig) {fSigmaCutTOF = nsig;}
96   void SetRMax(Int_t rbin) {fRMax = rbin;}
97   void SetfcSq(Float_t fcSq) {ffcSq = fcSq;}
98   void SetMixedChargeCut(Bool_t mcCut) {fMixedChargeCut = mcCut;}
99   void SetMinPt(Float_t minPt) {fMinPt = minPt;}
100   void SetMaxPt(Float_t maxPt) {fMaxPt = maxPt;}
101   void SetKT3transition(Float_t KT3trans) {fKT3transition = KT3trans;}
102   void SetKT4transition(Float_t KT4trans) {fKT4transition = KT4trans;}
103   void SetTriggerType(Int_t tt) {fTriggerType = tt;}
104   //
105  
106
107  private:
108
109   void ParInit();
110   Bool_t AcceptPair(AliFourPionTrackStruct, AliFourPionTrackStruct);
111   Bool_t AcceptPairPM(AliFourPionTrackStruct, AliFourPionTrackStruct);
112   Float_t Gamov(Int_t, Int_t, Float_t);
113   void Shuffle(Int_t*, Int_t, Int_t);
114   Float_t GetQinv(Float_t[], Float_t[]);
115   void GetQosl(Float_t[], Float_t[], Float_t&, Float_t&, Float_t&);
116   void GetWeight(Float_t[], Float_t[], Float_t&, Float_t&);
117   Float_t FSICorrelation(Int_t, Int_t, Float_t);
118   Float_t MCWeight(Int_t[2], Float_t, Float_t, Float_t, Float_t);
119   Float_t MCWeightOSL(Int_t, Int_t, Int_t, Int_t, Float_t, Float_t, Float_t, Float_t);
120   Float_t MCWeight3(Int_t, Float_t, Float_t, Int_t[3], Float_t[3], Float_t[3]);
121   Float_t MCWeightFSI3(Int_t, Float_t, Float_t, Int_t[3], Float_t[3]);
122   Float_t MCWeight4(Int_t, Float_t, Float_t, Int_t[4], Float_t[6], Float_t[6]);
123   Float_t MCWeightFSI4(Int_t, Float_t, Float_t, Int_t[4], Float_t[6]);
124   //
125   void SetFillBins2(Int_t, Int_t, Int_t&, Int_t&);
126   void SetFillBins3(Int_t, Int_t, Int_t, Short_t, Int_t&, Int_t&, Int_t&, Bool_t&, Bool_t&, Bool_t&);
127   void SetFillBins4(Int_t, Int_t, Int_t, Int_t, Int_t&, Int_t&, Int_t&, Int_t&, Int_t, Bool_t[13]);
128   void SetFSIindex(Float_t);
129   //
130   Float_t cubicInterpolate(Float_t[4], Float_t);
131   Float_t nCubicInterpolate(Int_t, Float_t*, Float_t[]);
132   
133   
134   const char* fname;// name of class
135   AliAODEvent            *fAOD; //!    // AOD object
136   TList                  *fOutputList; //! Compact Output list
137   AliPIDResponse         *fPIDResponse; //! PID response object; equivalent to AliAODpidUtil
138   
139   
140   AliFourPionEventCollection ***fEC; //!
141   AliFourPionEventStruct *fEvt; //!
142   AliFourPionTrackStruct *fTempStruct; //!
143   TRandom3* fRandomNumber; //!
144
145   
146  
147   //////////////////////////////
148   // histogram structures
149
150   
151   struct St6 {
152     TH1D *fNorm3; //!
153     TH1D *fTerms3; //!
154     TH3D *fTerms33D; //!
155     TProfile *fKfactor; //!
156     TProfile3D *fKfactor3D; //!
157     TProfile *fKfactorWeighted; //!
158     TProfile *fMeanQinv; //!
159     TH2D *fIdeal; //!
160     TH2D *fSmeared; //!
161     //
162     TH3D *fMuonSmeared; //!
163     TH3D *fMuonIdeal; //!
164     TH3D *fMuonPionK3; //!
165     TH3D *fPionPionK3; //!
166     //
167     TH2D *fTwoPartNorm; //!
168     TH2D *fTwoPartNegNorm; //!
169     TH2D *fTwoPartNormErr; //!
170   };
171   struct St7 {
172     TH3D *fTerms2OSL; //!
173     TH3D *fTerms2OSLQW; //!
174   };
175   struct St5 {
176     TH2D *fTerms2; //!
177     TH2D *fTerms2QW; //!
178     TH3D *fTerms2ThreeD; //!
179     TProfile2D *fAvgP; //!
180     TH2D *fIdeal; //!
181     TH2D *fSmeared; //!
182     TH2D *fUnitMultBin; //!
183     //
184     TH2D *fMuonSmeared; //!
185     TH2D *fMuonIdeal; //!
186     TH2D *fMuonPionK2; //!
187     TH2D *fPionPionK2; //!
188     TH1D *fMCqinv; //!
189     TH1D *fMCqinvQW; //!
190     TH2D *fPIDpurityDen; //!
191     TH3D *fPIDpurityNum; //!
192     struct St7 OSL_ktbin[2];
193   };
194   struct StFourPT {
195     TH1D *fNorm4; //!
196     TH1D *fTerms4; //!
197     TProfile *fKfactor; //!
198     TProfile *fKfactorWeighted; //!
199     TH2D *fIdeal; //!
200     TH2D *fSmeared; //!
201     //
202     TH3D *fMuonSmeared; //!
203     TH3D *fMuonIdeal; //!
204     TH3D *fMuonPionK4; //!
205     TH3D *fPionPionK4; //!
206     //
207     TH2D *fTwoPartNorm; //!
208     TH2D *fTwoPartNegNorm; //!
209     TH2D *fTwoPartNormErr; //!
210     TH3D *fFullBuildFromFits; //!
211     TH3D *fPartialBuildFromFits; //!
212   };
213   struct St_EDB {
214     struct St5 TwoPT[2];
215     struct St6 ThreePT[5];
216     struct StFourPT FourPT[13];
217   };
218   struct St_M {
219     struct St_EDB EDB[fEDbins];
220   };
221   struct St4 {
222     struct St_M MB[fCentBins];
223   };
224   struct St3 {
225     struct St4 Charge4[2];
226     struct St_M MB[fCentBins];
227   };
228   struct St2 {
229     struct St3 Charge3[2];
230     struct St_M MB[fCentBins];
231   };
232   struct St1 {
233     struct St2 Charge2[2];
234   };
235   struct St1 Charge1[2];//!
236
237
238   /////////////////////
239   // 4D r3 denominator
240   struct St_Ky {
241     struct St_M MB[fCentBins];
242   };
243   struct St_Kt {
244     struct St_Ky KY[fKbinsY];
245   };
246   struct St_Kt KT[fKbinsT];//!
247   
248  
249   Bool_t fLEGO;
250   Bool_t fMCcase;
251   Bool_t fAODcase;
252   Short_t fCollisionType;
253   Bool_t fGenerateSignal;
254   Bool_t fGeneratorOnly;
255   Bool_t fTabulatePairs;
256   Bool_t fLinearInterpolation;
257   Bool_t fMixedChargeCut;
258   Int_t fRMax;
259   Float_t fRstartMC;
260   Float_t ffcSq;
261   Float_t ffcSqMRC;
262   UInt_t fFilterBit;
263   Float_t fMaxChi2NDF;
264   Int_t fMinTPCncls;
265   Double_t fBfield;
266   Int_t fMbin;
267   Int_t fFSIindex;
268   Int_t fEDbin;
269   Int_t fMbins;
270   Int_t fMultLimit;      
271   Int_t fCentBinLowLimit;
272   Int_t fCentBinHighLimit;
273   Int_t fTriggerType;
274   Int_t fEventCounter;
275   Int_t fEventsToMix;
276   Int_t fZvertexBins;
277   Int_t fMultLimits[kMultBinspp+1];
278   Float_t fMinPt;
279   Float_t fMaxPt;
280   Float_t fQcut;
281   Float_t fQLowerCut;
282   Float_t fNormQcutLow;
283   Float_t fNormQcutHigh;
284   Float_t fKupperBound;
285   Float_t fQupperBoundQ2;
286   Float_t fQupperBoundQ3;
287   Float_t fQupperBoundQ4;
288   Float_t fQbinsQ2;
289   Float_t fQbinsQ3;
290   Float_t fQbinsQ4;
291   Float_t fQupperBoundWeights;
292   Float_t fQbinsQinv3D;
293   Float_t fQupperBoundQinv3D;
294   Float_t fKstepT[fKbinsT];
295   Float_t fKstepY[fKbinsY];
296   Float_t fKmeanT[fKbinsT];
297   Float_t fKmeanY[fKbinsY];
298   Float_t fKmiddleT[fKbinsT];
299   Float_t fKmiddleY[fKbinsY];
300   Float_t fQstep;
301   Float_t fQstepWeights;
302   Float_t fQmean[kQbinsWeights];
303   Float_t fDampStart;
304   Float_t fDampStep;
305   
306   Float_t fTPCTOFboundry;
307   Float_t fTOFboundry;
308   Float_t fSigmaCutTPC;
309   Float_t fSigmaCutTOF;
310   
311   Float_t fMinSepPairEta;
312   Float_t fMinSepPairPhi;
313   Float_t fShareQuality;
314   Float_t fShareFraction;
315   
316   Float_t fTrueMassP, fTrueMassPi, fTrueMassK, fTrueMassKs, fTrueMassLam;
317  
318   Int_t fKtIndexL,fKtIndexH;
319   //
320   Int_t fQoIndexL,fQoIndexH;
321   Int_t fQsIndexL,fQsIndexH;
322   Int_t fQlIndexL,fQlIndexH;
323
324   Bool_t fDummyB;
325
326   Float_t fKT3transition;
327   Float_t fKT4transition;
328   
329   Float_t farrP1[4][4][4];
330   Float_t farrP2[4][4][4];
331   
332  
333   //
334   Char_t fDefaultsCharSwitch[kMultLimitPbPb];//!
335   TArrayC *fLowQPairSwitch_E0E0[kMultLimitPbPb];//!
336   TArrayC *fLowQPairSwitch_E0E1[kMultLimitPbPb];//!
337   TArrayC *fLowQPairSwitch_E0E2[kMultLimitPbPb];//!
338   TArrayC *fLowQPairSwitch_E0E3[kMultLimitPbPb];//!
339   TArrayC *fLowQPairSwitch_E1E1[kMultLimitPbPb];//!
340   TArrayC *fLowQPairSwitch_E1E2[kMultLimitPbPb];//!
341   TArrayC *fLowQPairSwitch_E1E3[kMultLimitPbPb];//!
342   TArrayC *fLowQPairSwitch_E2E3[kMultLimitPbPb];//!
343   //
344   TArrayC *fNormQPairSwitch_E0E0[kMultLimitPbPb];//!
345   TArrayC *fNormQPairSwitch_E0E1[kMultLimitPbPb];//!
346   TArrayC *fNormQPairSwitch_E0E2[kMultLimitPbPb];//!
347   TArrayC *fNormQPairSwitch_E0E3[kMultLimitPbPb];//!
348   TArrayC *fNormQPairSwitch_E1E1[kMultLimitPbPb];//!
349   TArrayC *fNormQPairSwitch_E1E2[kMultLimitPbPb];//!
350   TArrayC *fNormQPairSwitch_E1E3[kMultLimitPbPb];//!
351   TArrayC *fNormQPairSwitch_E2E3[kMultLimitPbPb];//!
352
353   
354
355  public:
356   TH2D *fMomResC2SC;
357   TH2D *fMomResC2MC;
358   TH2D *fWeightmuonCorrection;
359   TH3D *fPbPbc3FitEA;
360   TH3D *fpPbc3FitEA;
361   TH3D *fppc3FitEA;
362   TH1D *fFSIss[12];
363   TH1D *fFSIos[12];
364   TH3F *fNormWeight[fKbinsT][fCentBins];
365   TF1 *ExchangeAmpPointSource[2][50];
366
367   ClassDef(AliFourPion, 1); 
368 };
369
370 #endif