]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/Chaoticity/AliChaoticity.h
adjusted MC histograms
[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, Bool_t MCdecision=kFALSE, Bool_t Tabulatedecision=kFALSE, Bool_t PbPbdecision=kTRUE, Int_t lowCentBin=0, Int_t highCentBin=1.,  Bool_t lego=kTRUE);
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 ChaoticityConstants {
50     kPairLimit = 15000,//15000
51     kNormPairLimit = 45000,
52     kMultLimitPbPb = 2000,//2000
53     kMultLimitpp = 300,
54     kMultBinspp = 11,//20 or 11
55     kKbinsT = 3,// Set fKstep as well !!!!
56     kKbinsY = 1,// Set fKstep as well !!!!
57     kQbins = 20,
58     kQbinsWeights = 40,
59     kEDbins = 1,
60     kRVALUES = 6+1,// 6 Gaussian radii (3-8fm), last slot for Therminator source
61     kNDampValues = 16,
62     kDENtypes = 1,// was (kRVALUES)*kNDampValues
63     kCentBins=10,// 0-50%
64     kSCLimit2 = 1,// 1, 6
65     kSCLimit3 = 1,// 1, 10
66     kMCfixedRbin = 4,// 4 normally, (Rbin=4 (R=7fm)), 5 for systematic variation
67     kMCfixedLambdabin = 5// 5 normally, (Lambdabin=5 (lambda=0.4)), 8 for systematic variation
68  };
69
70   Int_t GetNumKtbins() const {return kKbinsT;}
71   Int_t GetNumRValues() const {return kRVALUES;}
72   Int_t GetNumCentBins() const {return kCentBins;}
73   void SetWeightArrays(Bool_t legoCase=kTRUE, TH3F ***histos=0x0);
74   void SetMomResCorrections(Bool_t legoCase=kTRUE, TH2D *temp2D=0x0, TH3D *temp3D[5]=0x0);
75   void SetFSICorrelations(Bool_t legoCase=kTRUE, TH2D *temp2D[2]=0x0, TH3D *temp3D[5]=0x0);
76   //
77
78
79  private:
80
81   void ParInit();
82   Bool_t AcceptPair(AliChaoticityTrackStruct, AliChaoticityTrackStruct);
83   Float_t GamovFactor(Int_t, Int_t, Float_t);
84   void Shuffle(Int_t*, Int_t, Int_t);
85   Short_t FillIndex2part(Short_t);
86   Short_t FillIndex3part(Short_t);
87   Short_t SetQcutBin(Short_t);
88   Short_t SetNormBin(Short_t);
89   void SetFillBins2(Short_t, Short_t, Short_t, Int_t, Int_t, Int_t&, Int_t&);
90   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&);
91   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&);
92   Float_t GetQinv(Short_t, Float_t[], Float_t[]);
93   void GetQosl(Float_t[], Float_t[], Float_t&, Float_t&, Float_t&);
94   void GetWeight(Float_t[], Float_t[], Float_t&, Float_t&);
95   Float_t FSICorrelation2(Int_t, Int_t, Int_t, Float_t);
96   Float_t MCWeight(Int_t, Int_t, Int_t, Int_t, Float_t);
97   Float_t MCWeight3D(Bool_t, Int_t, Int_t, Int_t, Float_t, Float_t, Float_t);
98   Double_t FSICorrelationOmega0(Bool_t, Double_t, Double_t, Double_t);
99   //
100   
101   
102   const char* fname;// name of class
103   AliAODEvent            *fAOD; //!    // AOD object
104   TList                  *fOutputList; //! Compact Output list
105   AliPIDResponse         *fPIDResponse; //! PID response object; equivalent to AliAODpidUtil
106   
107   
108   AliChaoticityEventCollection ***fEC; //!
109   AliChaoticityEventStruct *fEvt; //!
110   AliChaoticityTrackStruct *fTempStruct; //!
111   TRandom3* fRandomNumber; //!
112
113   
114  
115   //////////////////////////////
116   // histogram structures
117
118   struct St_DT {
119     TH3D *fTwoPartNorm; //!
120     //TH3D *fTwoPartNormErr; //!
121     TH3D *f4VectProd1TwoPartNorm; //!
122     TH3D *f4VectProd2TwoPartNorm; //!
123   };  
124   struct St6 {
125     TH1D *fExplicit3; //!
126     TH1D *fNormEx3; //!
127     //
128     TH1D *fNorm3; //!
129     TH3D *fTerms3; //!
130     TH3D *f4VectProd1TermsCC3; //!
131     TH3D *f4VectProd1TermsCC2; //!
132     TH3D *f4VectProd1TermsCC0; //!
133     TH3D *f4VectProd2TermsCC3; //!
134     TH3D *f4VectProd2TermsCC2; //!
135     TH3D *f4VectProd2TermsCC0; //!
136     TH3D *fIdeal; //!
137     TH3D *fSmeared; //!
138     TH3D *fQW12; //!
139     TH3D *fQW13; //!
140     //
141     struct St_DT DT[kDENtypes];
142   };
143   struct St7 {
144     TH3D *fExplicit2OSL; //!
145     TH3D *fExplicit2OSLQW; //!
146   };
147   struct St5 {
148     TH2D *fExplicit2; //!
149     TH2D *fExplicit2QW; //!
150     TH3I *fExplicit2ThreeD; //!
151     TH2D *fIdeal; //!
152     TH2D *fSmeared; //!
153     //
154     TH1D *fMCqinv; //!
155     TH1D *fMCqinvQW; //!
156     TH2D *fPIDpurityDen; //!
157     TH2D *fPIDpurityNum; //!
158     struct St7 OSL_ktbin[2];
159   };
160   struct St_EDB {// SC structure
161     struct St5 TwoPT[2];
162     struct St6 ThreePT[5];
163   };
164   struct St_M {
165     struct St_EDB EDB[kEDbins];
166   };
167   struct St4 {
168     struct St_M MB[kCentBins];
169   };
170   struct St3 {
171     struct St4 SC[kSCLimit3];
172   };
173   struct St2 {
174     struct St3 Charge3[2];
175     struct St4 SC[kSCLimit2];
176   };
177   struct St1 {
178     struct St2 Charge2[2];
179   };
180   struct St1 Charge1[2];//!
181
182
183   /////////////////////
184   // 4D r3 denominator
185   struct St_Ky {
186     struct St_M MB[kCentBins];
187   };
188   struct St_Kt {
189     struct St_Ky KY[kKbinsY];
190   };
191   struct St_Kt KT[kKbinsT];//!
192   
193  
194   Bool_t fLEGO;
195   Bool_t fMCcase;
196   Bool_t fAODcase;
197   Bool_t fPbPbcase;
198   Bool_t fPdensityExplicitLoop;
199   Bool_t fPdensityPairCut;
200   Bool_t fTabulatePairs;
201   Double_t fBfield;
202   Int_t fMbin;
203   Int_t fEDbin;
204   Int_t fMbins;
205   Int_t fMultLimit;      
206   Int_t fCentBinLowLimit;
207   Int_t fCentBinHighLimit;
208   Int_t fEventCounter;
209   Int_t fEventsToMix;
210   Int_t fZvertexBins;
211   Int_t fMultLimits[kMultBinspp+1];
212   Float_t fQcut[3];
213   Float_t fQLowerCut;
214   Float_t fNormQcutLow[3];
215   Float_t fNormQcutHigh[3];
216   Float_t fKupperBound;
217   Float_t fQupperBound;
218   Float_t fQupperBoundWeights;
219   Float_t fKstepT[kKbinsT];
220   Float_t fKstepY[kKbinsY];
221   Float_t fKmeanT[kKbinsT];
222   Float_t fKmeanY[kKbinsY];
223   Float_t fKmiddleT[kKbinsT];
224   Float_t fKmiddleY[kKbinsY];
225   Float_t fQstep;
226   Float_t fQstepWeights;
227   Float_t fQmean[kQbinsWeights];
228   Float_t fDampStart;
229   Float_t fDampStep;
230   
231   Float_t fTPCTOFboundry;
232   Float_t fTOFboundry;
233   Float_t fSigmaCutTPC;
234   Float_t fSigmaCutTOF;
235   
236   Float_t fMinSepTPCEntrancePhi;
237   Float_t fMinSepTPCEntranceEta;
238   Float_t fShareQuality;
239   Float_t fShareFraction;
240   
241   Float_t fTrueMassP, fTrueMassPi, fTrueMassK, fTrueMassKs, fTrueMassLam;
242  
243   Int_t fKtbinL,fKtbinH;
244   Int_t fKybinL,fKybinH;
245   //
246   Int_t fQobinL,fQobinH;
247   Int_t fQsbinL,fQsbinH;
248   Int_t fQlbinL,fQlbinH;
249
250   Bool_t fDummyB;
251
252   
253   Char_t fDefaultsCharMult[kMultLimitPbPb];//!
254   Char_t fDefaultsCharSE[kPairLimit];//!
255   Char_t fDefaultsCharME[2*kPairLimit];//!
256   Int_t fDefaultsInt[kMultLimitPbPb];//!
257   TArrayI *fPairLocationSE[kMultLimitPbPb];//!
258   TArrayI *fPairLocationME[kMultLimitPbPb];//!
259   TArrayC *fTripletSkip1[kPairLimit];//!
260   TArrayC *fTripletSkip2[2*kPairLimit];//!
261   TArrayI *fOtherPairLocation1[2][kMultLimitPbPb];//!
262   TArrayI *fOtherPairLocation2[2][kMultLimitPbPb];//!
263   TArrayC *fNormPairSwitch[3][kMultLimitPbPb];//!
264   TArrayC *fPairSplitCut[4][kMultLimitPbPb];//!
265   
266   AliChaoticityNormPairStruct *fNormPairs[3];//!
267   
268  public:
269   TH2D *fFSI2SS;
270   TH2D *fFSI2OS;
271   TH3D *fFSIOmega0SS;
272   TH3D *fFSIOmega0OS;
273   //
274   TH2D *fMomResC2;
275   TH3D *fMomRes3DTerm1;
276   TH3D *fMomRes3DTerm2;
277   TH3D *fMomRes3DTerm3;
278   TH3D *fMomRes3DTerm4;
279   TH3D *fMomRes3DTerm5;
280   //
281   Float_t *******fNormWeight;//! osl kt binning
282   Float_t *******fNormWeightErr;//! osl kt binning
283   
284
285   ClassDef(AliChaoticity, 1); 
286 };
287
288 #endif