]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/Chaoticity/AliChaoticity.h
Switch to 2 Kt3 bins
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / Chaoticity / AliChaoticity.h
1 #ifndef AliChaoticity_cxx
2 #define AliChaoticity_cxx
3 //
4 // Class AliChaoticity
5 //
6 // AliChaoticity
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 TRandom3;
22
23 class AliESDEvent;
24 class AliAODEvent;
25 class AliESDtrackCuts;
26 class AliESDpid;
27
28 #include "AliAnalysisTask.h"
29 #include "AliAnalysisTaskSE.h"
30 #include "AliESDpid.h"
31 #include "AliAODPid.h"
32 #include "AliChaoticityEventCollection.h"
33 #include "AliCentrality.h"
34
35 class AliChaoticity : public AliAnalysisTaskSE {
36  public:
37
38   AliChaoticity();
39   AliChaoticity(const Char_t *name);
40   virtual ~AliChaoticity();
41   AliChaoticity(const AliChaoticity &obj); 
42   AliChaoticity &operator=(const AliChaoticity &obj);
43   
44
45   virtual void   UserCreateOutputObjects();
46   virtual void   Exec(Option_t *option);
47   virtual void   Terminate(Option_t *);
48
49   enum {
50     kPairLimit = 15000,//15000
51     kNormPairLimit = 45000,
52     kMultLimitPbPb = 2000,//2000
53     kMultLimitpp = 300,
54     kMultBinspp = 11,//20 or 11
55     kMCarrayLimit = 110000,
56     kQbins = 20,
57     kQbinsWeights = 40,
58     kNDampValues = 16,
59     kRmin = 5,// EW min radii 5 fm
60     kDENtypes = 1,// was (kRVALUES)*kNDampValues
61     kSCLimit2 = 1,// 1, 6
62     kSCLimit3 = 1// 1, 10
63   };
64
65   static const Int_t fKbinsT   = 4;// Set fKstep as well !!!!
66   static const Int_t fKbinsY   = 1;// Set fKstep as well !!!!
67   static const Int_t fEDbins   = 2;
68   static const Int_t fCentBins = 10;// 0-50%
69   static const Int_t fRVALUES  = 7;// 7 EW radii (5-11) , was 8 Gaussian radii (3-10fm)
70
71
72   Int_t GetNumKtBins() const {return AliChaoticity::fKbinsT;}
73   Int_t GetNumRValues() const {return AliChaoticity::fRVALUES;}
74   Int_t GetNumCentBins() const {return AliChaoticity::fCentBins;}
75   Int_t GetNumEDBins() const {return AliChaoticity::fEDbins;}
76   void SetWeightArrays(Bool_t legoCase=kTRUE, TH3F *histos[AliChaoticity::fKbinsT][AliChaoticity::fCentBins]=0x0);
77   void SetMomResCorrections(Bool_t legoCase=kTRUE, TH2D *temp2D=0x0);
78   void SetFSICorrelations(Bool_t legoCase=kTRUE, TH2D *temp2DGaus[2]=0x0, TH2D *temp2DTherm[6]=0x0, TH3D *temp3Dos[6]=0x0, TH3D *temp3Dss[6]=0x0);
79   //
80   void SetMCdecision(Bool_t mc) {fMCcase = mc;}
81   void SetTabulatePairs(Bool_t tabulate) {fTabulatePairs = tabulate;}
82   void SetPbPbCase(Bool_t pbpb) {fPbPbcase = pbpb;}
83   void SetGenerateSignal(Bool_t gen) {fGenerateSignal = gen;}
84   void SetCentBinRange(Int_t low, Int_t high) {fCentBinLowLimit = low; fCentBinHighLimit = high;}
85   void SetLEGOCase(Bool_t lego) {fLEGO = lego;}
86   void SetFilterBit(UInt_t filterbit) {fFilterBit = filterbit;}
87   void SetMaxChi2NDF(Float_t MaxChi2NDF) {fMaxChi2NDF = MaxChi2NDF;}
88   void SetMinTPCncls(Int_t MinTPCncls) {fMinTPCncls = MinTPCncls;}
89   void SetPairSeparationCutEta(Float_t pairsep) {fMinSepPairEta = pairsep;}
90   void SetPairSeparationCutPhi(Float_t pairsep) {fMinSepPairPhi = pairsep;}
91   void SetNsigmaTPC(Float_t nsig) {fSigmaCutTPC = nsig;}
92   void SetNsigmaTOF(Float_t nsig) {fSigmaCutTOF = nsig;}
93   void SetRMax(Int_t rbin) {fRMax = rbin;}
94   void SetFixedLambdaBinMomRes(Int_t lbin) {fFixedLambdaBinMomRes = lbin;}
95   void SetFixedLambdaBinr3(Int_t lbin) {fFixedLambdaBinr3 = lbin;}
96   //
97
98
99  private:
100
101   void ParInit();
102   Bool_t AcceptPair(AliChaoticityTrackStruct, AliChaoticityTrackStruct);
103   Float_t GamovFactor(Int_t, Int_t, Float_t);
104   void Shuffle(Int_t*, Int_t, Int_t);
105   Short_t FillIndex2part(Short_t);
106   Short_t FillIndex3part(Short_t);
107   Short_t SetQcutBin(Short_t);
108   Short_t SetNormBin(Short_t);
109   void SetFillBins2(Short_t, Short_t, Short_t, Int_t, Int_t, Int_t&, Int_t&);
110   void SetFillBins3(Short_t, Short_t, Short_t, Short_t, Int_t, Int_t, Int_t, Short_t, Int_t&, Int_t&, Int_t&, Bool_t&, Bool_t&, Bool_t&);
111   void ArrangeQs(Short_t, Short_t, Short_t, Short_t, Int_t, Int_t, Int_t, Float_t, Float_t, Float_t, Short_t, Short_t, Float_t&, Float_t&, Float_t&);
112   Float_t GetQinv(Short_t, Float_t[], Float_t[]);
113   void GetQosl(Float_t[], Float_t[], Float_t&, Float_t&, Float_t&);
114   void GetWeight(Float_t[], Float_t[], Float_t&, Float_t&);
115   void FourVectProdTerms(Float_t [], Float_t [], Float_t [], Float_t&, Float_t&, Float_t&, Float_t&, Float_t&);
116   Float_t FSICorrelationGaus2(Int_t, Int_t, Int_t, Float_t);
117   Float_t FSICorrelationTherm2(Int_t, Int_t, Float_t);
118   Float_t MCWeight(Int_t, Int_t, Int_t, Int_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 MCWeight3D(Bool_t, Int_t, Int_t, Float_t, Float_t, Float_t);
121   Double_t FSICorrelationOmega0(Bool_t, Double_t, Double_t, Double_t);
122   //
123   
124   
125   const char* fname;// name of class
126   AliAODEvent            *fAOD; //!    // AOD object
127   TList                  *fOutputList; //! Compact Output list
128   AliPIDResponse         *fPIDResponse; //! PID response object; equivalent to AliAODpidUtil
129   
130   
131   AliChaoticityEventCollection ***fEC; //!
132   AliChaoticityEventStruct *fEvt; //!
133   AliChaoticityTrackStruct *fTempStruct; //!
134   TRandom3* fRandomNumber; //!
135
136   
137  
138   //////////////////////////////
139   // histogram structures
140
141   struct St_DT {
142     TH3D *fTwoPartNorm; //!
143     //TH3D *fTwoPartNormErr; //!
144     TH3D *f4VectProd1TwoPartNorm; //!
145     TH3D *f4VectProd2TwoPartNorm; //!
146     TH3D *f4VectProd1TwoPartNormIdeal; //!
147     TH3D *f4VectProd2TwoPartNormIdeal; //!
148     TH3D *f4VectProd1TwoPartNormSmeared; //!
149     TH3D *f4VectProd2TwoPartNormSmeared; //!
150   };  
151   struct St6 {
152     TH1D *fExplicit3; //!
153     TH1D *fNormEx3; //!
154     //
155     TH1D *fNorm3; //!
156     TH3D *fTerms3; //!
157     TH3D *f4VectProd1Terms; //!
158     TH3D *f4VectProd2Terms; //!
159     TH3D *f4VectProd1TermsIdeal; //!
160     TH3D *f4VectProd2TermsIdeal; //!
161     TH3D *f4VectProd1TermsSmeared; //!
162     TH3D *f4VectProd2TermsSmeared; //!
163     TH3D *f4VectProd1TermsSumK3; //!
164     TH3D *f4VectProd2TermsSumK3; //!
165     TH3D *f4VectProd1TermsEnK3; //!
166     TH3D *f4VectProd2TermsEnK3; //!
167     TH3D *f4VectProd1TermsSumK2; //!
168     TH3D *f4VectProd2TermsSumK2; //!
169     TH3D *f4VectProd1TermsEnK2; //!
170     TH3D *f4VectProd2TermsEnK2; //!
171     TH3D *fIdeal; //!
172     TH3D *fSmeared; //!
173     TH3D *fQW12; //!
174     TH3D *fQW13; //!
175     TH3D *fSumK3; //!
176     TH3D *fEnK3; //!
177     TH3D *f4VectProd1Q3W; //!
178     TH3D *f4VectProd2Q3W; //!
179     //
180     struct St_DT DT[kDENtypes];
181   };
182   struct St7 {
183     TH3D *fExplicit2OSL; //!
184     TH3D *fExplicit2OSLQW; //!
185   };
186   struct St5 {
187     TH2D *fExplicit2; //!
188     TH2D *fExplicit2QW; //!
189     TH3D *fExplicit2ThreeD; //!
190     TProfile2D *fAvgP; //!
191     TH2D *fIdeal; //!
192     TH2D *fSmeared; //!
193     //
194     TH1D *fMCqinv; //!
195     TH1D *fMCqinvQW; //!
196     TH2D *fPIDpurityDen; //!
197     TH2D *fPIDpurityNum; //!
198     struct St7 OSL_ktbin[2];
199   };
200   struct St_EDB {// SC structure
201     struct St5 TwoPT[2];
202     struct St6 ThreePT[5];
203   };
204   struct St_M {
205     struct St_EDB EDB[fEDbins];
206   };
207   struct St4 {
208     struct St_M MB[fCentBins];
209   };
210   struct St3 {
211     struct St4 SC[kSCLimit3];
212   };
213   struct St2 {
214     struct St3 Charge3[2];
215     struct St4 SC[kSCLimit2];
216   };
217   struct St1 {
218     struct St2 Charge2[2];
219   };
220   struct St1 Charge1[2];//!
221
222
223   /////////////////////
224   // 4D r3 denominator
225   struct St_Ky {
226     struct St_M MB[fCentBins];
227   };
228   struct St_Kt {
229     struct St_Ky KY[fKbinsY];
230   };
231   struct St_Kt KT[fKbinsT];//!
232   
233  
234   Bool_t fLEGO;
235   Bool_t fMCcase;
236   Bool_t fAODcase;
237   Bool_t fPbPbcase;
238   Bool_t fGenerateSignal;
239   Bool_t fPdensityExplicitLoop;
240   Bool_t fPdensityPairCut;
241   Bool_t fTabulatePairs;
242   Int_t fRMax;
243   Int_t fFixedLambdaBinMomRes;
244   Int_t fFixedLambdaBinr3;
245   UInt_t fFilterBit;
246   Float_t fMaxChi2NDF;
247   Int_t fMinTPCncls;
248   Double_t fBfield;
249   Int_t fMbin;
250   Int_t fFSIbin;
251   Int_t fEDbin;
252   Int_t fMbins;
253   Int_t fMultLimit;      
254   Int_t fCentBinLowLimit;
255   Int_t fCentBinHighLimit;
256   Int_t fEventCounter;
257   Int_t fEventsToMix;
258   Int_t fZvertexBins;
259   Int_t fMultLimits[kMultBinspp+1];
260   Float_t fQcut[3];
261   Float_t fQLowerCut;
262   Float_t fNormQcutLow[3];
263   Float_t fNormQcutHigh[3];
264   Float_t fKupperBound;
265   Float_t fQupperBound;
266   Float_t fQupperBoundWeights;
267   Float_t fKstepT[fKbinsT];
268   Float_t fKstepY[fKbinsY];
269   Float_t fKmeanT[fKbinsT];
270   Float_t fKmeanY[fKbinsY];
271   Float_t fKmiddleT[fKbinsT];
272   Float_t fKmiddleY[fKbinsY];
273   Float_t fQstep;
274   Float_t fQstepWeights;
275   Float_t fQmean[kQbinsWeights];
276   Float_t fDampStart;
277   Float_t fDampStep;
278   
279   Float_t fTPCTOFboundry;
280   Float_t fTOFboundry;
281   Float_t fSigmaCutTPC;
282   Float_t fSigmaCutTOF;
283   
284   Float_t fMinSepPairEta;
285   Float_t fMinSepPairPhi;
286   Float_t fShareQuality;
287   Float_t fShareFraction;
288   
289   Float_t fTrueMassP, fTrueMassPi, fTrueMassK, fTrueMassKs, fTrueMassLam;
290  
291   Int_t fKtIndexL,fKtIndexH;
292   //
293   Int_t fQoIndexL,fQoIndexH;
294   Int_t fQsIndexL,fQsIndexH;
295   Int_t fQlIndexL,fQlIndexH;
296
297   Bool_t fDummyB;
298
299   
300   Char_t fDefaultsCharMult[kMultLimitPbPb];//!
301   Char_t fDefaultsCharSE[kPairLimit];//!
302   Char_t fDefaultsCharME[2*kPairLimit];//!
303   Int_t fDefaultsInt[kMultLimitPbPb];//!
304   TArrayI *fPairLocationSE[kMultLimitPbPb];//!
305   TArrayI *fPairLocationME[kMultLimitPbPb];//!
306   TArrayC *fTripletSkip1[kPairLimit];//!
307   TArrayC *fTripletSkip2[2*kPairLimit];//!
308   TArrayI *fOtherPairLocation1[2][kMultLimitPbPb];//!
309   TArrayI *fOtherPairLocation2[2][kMultLimitPbPb];//!
310   TArrayC *fNormPairSwitch[3][kMultLimitPbPb];//!
311   TArrayC *fPairSplitCut[4][kMultLimitPbPb];//!
312   
313   AliChaoticityNormPairStruct *fNormPairs[3];//!
314   
315  public:
316   TH2D *fFSI2SS[2];
317   TH2D *fFSI2OS[2];
318   TH3D *fFSIOmega0SS[6];
319   TH3D *fFSIOmega0OS[6];
320   TH2D *fMomResC2;
321   TH3F *fNormWeight[fKbinsT][fCentBins];
322   
323
324   ClassDef(AliChaoticity, 1); 
325 };
326
327 #endif