]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/Chaoticity/AliThreePionRadii.h
Code for Three Pion Radii Analysis
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / Chaoticity / AliThreePionRadii.h
1 #ifndef AliThreePionRadii_cxx
2 #define AliThreePionRadii_cxx
3 //
4 // Class AliThreePionRadii
5 //
6 // AliThreePionRadii
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 "AliThreePionRadii.h"
34
35 class AliThreePionRadii : public AliAnalysisTaskSE {
36  public:
37
38   AliThreePionRadii();
39   AliThreePionRadii(const Char_t *name);
40   virtual ~AliThreePionRadii();
41   AliThreePionRadii(const AliThreePionRadii &obj); 
42   AliThreePionRadii &operator=(const AliThreePionRadii &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     kMCarrayLimit = 110000,
55     kQbins = 20,
56     kQbinsWeights = 40,
57     kQbinsPP = 40,
58     kQbinsWeightsPP = 40,
59     kNDampValues = 16,
60     kRmin = 2,// min radii for Momentum resolution calculations
61     kDENtypes = 1,// was (kRVALUES)*kNDampValues
62     kSCLimit2 = 1,// 1, 6
63     kSCLimit3 = 1// 1, 10
64   };
65
66   static const Int_t fEDbins   = 1;
67   static const Int_t fCentBins = 20;// 0-50%
68   static const Int_t fRVALUES  = 10;// 
69
70
71   Int_t GetNumRValues() const {return AliThreePionRadii::fRVALUES;}
72   Int_t GetNumCentBins() const {return AliThreePionRadii::fCentBins;}
73   Int_t GetNumEDBins() const {return AliThreePionRadii::fEDbins;}
74   void SetFSICorrelations(Bool_t legoCase=kTRUE, TH1D *temp1DSS[10]=0x0, TH1D *temp1DOS[10]=0x0);
75   //
76   void SetMCdecision(Bool_t mc) {fMCcase = mc;}
77   void SetPbPbCase(Bool_t pbpb) {fPbPbcase = pbpb;}
78   void SetGenerateSignal(Bool_t gen) {fGenerateSignal = gen;}
79   void SetCentBinRange(Int_t low, Int_t high) {fCentBinLowLimit = low; fCentBinHighLimit = high;}
80   void SetLEGOCase(Bool_t lego) {fLEGO = lego;}
81   void SetFilterBit(UInt_t filterbit) {fFilterBit = filterbit;}
82   void SetMaxChi2NDF(Float_t MaxChi2NDF) {fMaxChi2NDF = MaxChi2NDF;}
83   void SetMinTPCncls(Int_t MinTPCncls) {fMinTPCncls = MinTPCncls;}
84   void SetPairSeparationCutEta(Float_t pairsep) {fMinSepPairEta = pairsep;}
85   void SetPairSeparationCutPhi(Float_t pairsep) {fMinSepPairPhi = pairsep;}
86   void SetNsigmaTPC(Float_t nsig) {fSigmaCutTPC = nsig;}
87   void SetNsigmaTOF(Float_t nsig) {fSigmaCutTOF = nsig;}
88   void SetRMax(Int_t rbin) {fRMax = rbin;}
89   //
90
91
92  private:
93
94   void ParInit();
95   Bool_t AcceptPair(AliChaoticityTrackStruct, AliChaoticityTrackStruct);
96   Float_t GamovFactor(Int_t, Int_t, Float_t);
97   void Shuffle(Int_t*, Int_t, Int_t);
98   Short_t FillIndex2part(Short_t);
99   Short_t FillIndex3part(Short_t);
100   Short_t SetQcutBin(Short_t);
101   Short_t SetNormBin(Short_t);
102   void SetFillBins2(Short_t, Short_t, Short_t, Int_t, Int_t, Int_t&, Int_t&);
103   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&);
104   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&);
105   Float_t GetQinv(Short_t, Float_t[], Float_t[]);
106   void GetQosl(Float_t[], Float_t[], Float_t&, Float_t&, Float_t&);
107   Float_t FSICorrelation2(Int_t, Int_t, Float_t);
108   Float_t MCWeight(Int_t, Int_t, Float_t, Int_t, Float_t);
109   Float_t MCWeight3D(Bool_t, Int_t, Int_t, Float_t, Float_t, Float_t);
110   //
111   
112   
113   const char* fname;// name of class
114   AliAODEvent            *fAOD; //!    // AOD object
115   TList                  *fOutputList; //! Compact Output list
116   AliPIDResponse         *fPIDResponse; //! PID response object; equivalent to AliAODpidUtil
117   
118   
119   AliChaoticityEventCollection ***fEC; //!
120   AliChaoticityEventStruct *fEvt; //!
121   AliChaoticityTrackStruct *fTempStruct; //!
122   TRandom3* fRandomNumber; //!
123
124   
125  
126   //////////////////////////////
127   // histogram structures
128
129   struct St6 {
130     TH1D *fExplicit3; //!
131     TH1D *fNormEx3; //!
132     //
133     TH1D *fNorm3; //!
134     TH3D *fTerms3; //!
135     TH1D *fTermsQ3; //!
136     TH1D *fIdeal; //!
137     TH1D *fSmeared; //!
138   };
139   struct St5 {
140     TH2D *fExplicit2; //!
141     TH2D *fExplicit2QW; //!
142     TH3D *fExplicit2ThreeD; //!
143     TProfile2D *fAvgP; //!
144     TH2D *fIdeal; //!
145     TH2D *fSmeared; //!
146     //
147     TH1D *fMCqinv; //!
148     TH1D *fMCqinvQW; //!
149     TH2D *fPIDpurityDen; //!
150     TH2D *fPIDpurityNum; //!
151   };
152   struct St_EDB {// SC structure
153     struct St5 TwoPT[2];
154     struct St6 ThreePT[5];
155   };
156   struct St_M {
157     struct St_EDB EDB[fEDbins];
158   };
159   struct St4 {
160     struct St_M MB[fCentBins];
161   };
162   struct St3 {
163     struct St4 SC[kSCLimit3];
164   };
165   struct St2 {
166     struct St3 Charge3[2];
167     struct St4 SC[kSCLimit2];
168   };
169   struct St1 {
170     struct St2 Charge2[2];
171   };
172   struct St1 Charge1[2];//!
173
174
175  
176   Bool_t fLEGO;
177   Bool_t fMCcase;
178   Bool_t fAODcase;
179   Bool_t fPbPbcase;
180   Bool_t fGenerateSignal;
181   Bool_t fPdensityPairCut;
182   Int_t fRMax;
183   UInt_t fFilterBit;
184   Float_t fMaxChi2NDF;
185   Int_t fMinTPCncls;
186   Double_t fBfield;
187   Int_t fMbin;
188   Int_t fFSIindex;
189   Int_t fEDbin;
190   Int_t fMbins;
191   Int_t fMultLimit;      
192   Int_t fCentBinLowLimit;
193   Int_t fCentBinHighLimit;
194   Int_t fEventCounter;
195   Int_t fEventsToMix;
196   Int_t fZvertexBins;
197   Int_t fMultLimits[fCentBins+1];
198   Float_t fQcut[3];
199   Float_t fQLowerCut;
200   Float_t fQlimitC2;
201   Int_t fQbinsC2;
202   Float_t fNormQcutLow[3];
203   Float_t fNormQcutHigh[3];
204   Float_t fKupperBound;
205   Float_t fQupperBound;
206   Float_t fQupperBoundWeights;
207   Int_t   fQbins;
208   Int_t   fQbinsWeights;
209   Float_t fQstep;
210   Float_t fQstepWeights;
211   Float_t fQmean[kQbinsWeights];
212   Float_t fQmeanPP[kQbinsWeightsPP];
213   Float_t fDampStart;
214   Float_t fDampStep;
215   
216   Float_t fTPCTOFboundry;
217   Float_t fTOFboundry;
218   Float_t fSigmaCutTPC;
219   Float_t fSigmaCutTOF;
220   
221   Float_t fMinSepPairEta;
222   Float_t fMinSepPairPhi;
223   Float_t fShareQuality;
224   Float_t fShareFraction;
225   
226   Float_t fTrueMassP, fTrueMassPi, fTrueMassK, fTrueMassKs, fTrueMassLam;
227
228   Bool_t fDummyB;
229
230   
231   Char_t fDefaultsCharMult[kMultLimitPbPb];//!
232   Char_t fDefaultsCharSE[kPairLimit];//!
233   Char_t fDefaultsCharME[2*kPairLimit];//!
234   Int_t fDefaultsInt[kMultLimitPbPb];//!
235   TArrayI *fPairLocationSE[kMultLimitPbPb];//!
236   TArrayI *fPairLocationME[kMultLimitPbPb];//!
237   TArrayC *fTripletSkip1[kPairLimit];//!
238   TArrayC *fTripletSkip2[2*kPairLimit];//!
239   TArrayI *fOtherPairLocation1[2][kMultLimitPbPb];//!
240   TArrayI *fOtherPairLocation2[2][kMultLimitPbPb];//!
241   TArrayC *fNormPairSwitch[3][kMultLimitPbPb];//!
242   TArrayC *fPairSplitCut[4][kMultLimitPbPb];//!
243   
244   AliChaoticityNormPairStruct *fNormPairs[3];//!
245   
246  public:
247   TH1D *fFSI2SS[10];
248   TH1D *fFSI2OS[10];
249
250   ClassDef(AliThreePionRadii, 1); 
251 };
252
253 #endif