]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/Chaoticity/AliChaoticity.h
histogram declaration change for LEGO
[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     //
139     struct St_DT DT[kDENtypes];
140   };
141   struct St7 {
142     TH3D *fExplicit2OSL; //!
143     TH3D *fExplicit2OSLQW; //!
144   };
145   struct St5 {
146     TH2D *fExplicit2; //!
147     TH2D *fExplicit2QW; //!
148     TH3I *fExplicit2ThreeD; //!
149     TH2D *fIdeal; //!
150     TH2D *fSmeared; //!
151     //
152     TH1D *fMCqinv; //!
153     TH1D *fMCqinvQW; //!
154     struct St7 OSL_ktbin[2];
155   };
156   struct St_EDB {// SC structure
157     struct St5 TwoPT[2];
158     struct St6 ThreePT[5];
159   };
160   struct St_M {
161     struct St_EDB EDB[kEDbins];
162   };
163   struct St4 {
164     struct St_M MB[kCentBins];
165   };
166   struct St3 {
167     struct St4 SC[kSCLimit3];
168   };
169   struct St2 {
170     struct St3 Charge3[2];
171     struct St4 SC[kSCLimit2];
172   };
173   struct St1 {
174     struct St2 Charge2[2];
175   };
176   struct St1 Charge1[2];//!
177
178
179   /////////////////////
180   // 4D r3 denominator
181   struct St_Ky {
182     struct St_M MB[kCentBins];
183   };
184   struct St_Kt {
185     struct St_Ky KY[kKbinsY];
186   };
187   struct St_Kt KT[kKbinsT];//!
188   
189  
190   Bool_t fLEGO;
191   Bool_t fMCcase;
192   Bool_t fAODcase;
193   Bool_t fPbPbcase;
194   Bool_t fPdensityExplicitLoop;
195   Bool_t fPdensityPairCut;
196   Bool_t fTabulatePairs;
197   Double_t fBfield;
198   Int_t fMbin;
199   Int_t fEDbin;
200   Int_t fMbins;
201   Int_t fMultLimit;      
202   Int_t fCentBinLowLimit;
203   Int_t fCentBinHighLimit;
204   Int_t fEventCounter;
205   Int_t fEventsToMix;
206   Int_t fZvertexBins;
207   Int_t fMultLimits[kMultBinspp+1];
208   Float_t fQcut[3];
209   Float_t fQLowerCut;
210   Float_t fNormQcutLow[3];
211   Float_t fNormQcutHigh[3];
212   Float_t fKupperBound;
213   Float_t fQupperBound;
214   Float_t fQupperBoundWeights;
215   Float_t fKstepT[kKbinsT];
216   Float_t fKstepY[kKbinsY];
217   Float_t fKmeanT[kKbinsT];
218   Float_t fKmeanY[kKbinsY];
219   Float_t fKmiddleT[kKbinsT];
220   Float_t fKmiddleY[kKbinsY];
221   Float_t fQstep;
222   Float_t fQstepWeights;
223   Float_t fQmean[kQbinsWeights];
224   Float_t fDampStart;
225   Float_t fDampStep;
226   
227   Float_t fTPCTOFboundry;
228   Float_t fTOFboundry;
229   Float_t fSigmaCutTPC;
230   Float_t fSigmaCutTOF;
231   
232   Float_t fMinSepTPCEntrancePhi;
233   Float_t fMinSepTPCEntranceEta;
234   Float_t fShareQuality;
235   Float_t fShareFraction;
236   
237   Float_t fTrueMassP, fTrueMassPi, fTrueMassK, fTrueMassKs, fTrueMassLam;
238  
239   Int_t fKtbinL,fKtbinH;
240   Int_t fKybinL,fKybinH;
241   //
242   Int_t fQobinL,fQobinH;
243   Int_t fQsbinL,fQsbinH;
244   Int_t fQlbinL,fQlbinH;
245
246   Bool_t fDummyB;
247
248   
249   Char_t fDefaultsCharMult[kMultLimitPbPb];//!
250   Char_t fDefaultsCharSE[kPairLimit];//!
251   Char_t fDefaultsCharME[2*kPairLimit];//!
252   Int_t fDefaultsInt[kMultLimitPbPb];//!
253   TArrayI *fPairLocationSE[kMultLimitPbPb];//!
254   TArrayI *fPairLocationME[kMultLimitPbPb];//!
255   TArrayC *fTripletSkip1[kPairLimit];//!
256   TArrayC *fTripletSkip2[2*kPairLimit];//!
257   TArrayI *fOtherPairLocation1[2][kMultLimitPbPb];//!
258   TArrayI *fOtherPairLocation2[2][kMultLimitPbPb];//!
259   TArrayC *fNormPairSwitch[3][kMultLimitPbPb];//!
260   TArrayC *fPairSplitCut[4][kMultLimitPbPb];//!
261   
262   AliChaoticityNormPairStruct *fNormPairs[3];//!
263   
264  public:
265   TH2D *fFSI2SS;
266   TH2D *fFSI2OS;
267   TH3D *fFSIOmega0SS;
268   TH3D *fFSIOmega0OS;
269   //
270   TH2D *fMomResC2;
271   TH3D *fMomRes3DTerm1;
272   TH3D *fMomRes3DTerm2;
273   TH3D *fMomRes3DTerm3;
274   TH3D *fMomRes3DTerm4;
275   TH3D *fMomRes3DTerm5;
276   //
277   Float_t *******fNormWeight;//! osl kt binning
278   Float_t *******fNormWeightErr;//! osl kt binning
279   
280
281   ClassDef(AliChaoticity, 1); 
282 };
283
284 #endif