]>
Commit | Line | Data |
---|---|---|
0a28d543 | 1 | #ifndef ALIEBYEPIDRATIOHELPER_H |
2 | #define ALIEBYEPIDRATIOHELPER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | //=========================================================================// | |
7 | // AliEbyE Analysis for Particle Ratio Fluctuation // | |
8 | // Deepika Rathee | Satyajit Jena // | |
9 | // drathee@cern.ch | sjena@cern.ch // | |
10 | // Date: Wed Jul 9 18:38:30 CEST 2014 // | |
11 | // New approch to find particle ratio to reduce memory // | |
12 | // (Test Only) // | |
13 | //=========================================================================// | |
14 | ||
15 | #include "THnBase.h" | |
16 | #include "THn.h" | |
17 | #include "TH1F.h" | |
18 | #include "TF1.h" | |
19 | #include "TProfile2D.h" | |
20 | #include "TRandom3.h" | |
21 | ||
22 | class AliESDtrack; | |
23 | class AliMCEvent; | |
24 | class AliStack; | |
25 | class AliPIDResponse; | |
26 | class AliESDtrackCuts; | |
27 | class AliInputEventHandler; | |
28 | class AliESDInputHandler; | |
29 | class AliAODInputHandler; | |
30 | class AliAODEvent; | |
31 | class AliAODTrack; | |
32 | class AliAODMCParticle; | |
33 | class AliMCParticle; | |
34 | ||
35 | class AliEbyEPidRatioHelper : public TNamed { | |
36 | ||
37 | public: | |
38 | ||
39 | AliEbyEPidRatioHelper(); | |
40 | virtual ~AliEbyEPidRatioHelper(); | |
41 | ||
42 | void SetCentralityBinMax(Int_t d) {fCentralityBinMax = d;} | |
43 | void SetVertexZMax(Float_t f) {fVertexZMax = f;} | |
44 | void SetRapidityMax(Float_t f) {fRapidityMax = f;} | |
45 | void SetMinTrackLengthMC(Float_t f) {fMinTrackLengthMC = f;} | |
46 | void SetNSigmaMaxCdd(Float_t f) {fNSigmaMaxCdd = f;} | |
47 | void SetNSigmaMaxCzz(Float_t f) {fNSigmaMaxCzz = f;} | |
48 | void SetPIDStrategy(Int_t i) {fPIDStrategy = i;} | |
49 | void SetNSigmaMaxITS(Float_t f) {fNSigmaMaxITS = f;} | |
50 | void SetNSigmaMaxTPC(Float_t f) {fNSigmaMaxTPC = f;} | |
51 | void SetNSigmaMaxTPClow(Float_t f) {fNSigmaMaxTPClow = f;} | |
52 | void SetNSigmaMaxTOF(Float_t f) {fNSigmaMaxTOF = f;} | |
53 | void SetMinPtForTOFRequired(Float_t f) {fMinPtForTOFRequired = f;} | |
54 | void SetMaxPtForTPClow(Float_t f) {fMaxPtForTPClow = f;} | |
55 | ||
56 | void SetPhiRange(Float_t f1, Float_t f2); | |
57 | ||
58 | TH1F* GetHEventStat0() {return fHEventStat0;} | |
59 | TH1F* GetHEventStat1() {return fHEventStat1;} | |
60 | TH1F* GetHTriggerStat() {return fHTriggerStat;} | |
61 | TH1F* GetHCentralityStat() {return fHCentralityStat;} | |
62 | Int_t GetCentralityBin() {return fCentralityBin;} | |
63 | Float_t GetCentralityPercentile() {return fCentralityPercentile;} | |
64 | ||
65 | Float_t GetMinPtForTOFRequired() {return fMinPtForTOFRequired;} | |
66 | Float_t GetMaxPtForTPClow() {return fMaxPtForTPClow;} | |
67 | Float_t GetRapidityMax() {return fRapidityMax;} | |
68 | Float_t GetPhiMin() {return fPhiMin;} | |
69 | Float_t GetPhiMax() {return fPhiMax;} | |
70 | AliESDtrackCuts* GetESDTrackCuts() {return fESDTrackCuts;} | |
71 | Bool_t GetIsMC() {return fIsMC;} | |
72 | Int_t GetAODtrackCutBit() {return fAODtrackCutBit;} | |
73 | AliInputEventHandler* GetInputEventHandler() {return fInputEventHandler;} | |
74 | AliMCEvent* GetMCEvent() {return fMCEvent;} | |
75 | ||
76 | /** Initialize Helper */ | |
77 | Int_t Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Int_t trackCutBit, Int_t modeDistCreation); | |
78 | ||
79 | /** Setup Event */ | |
80 | Int_t SetupEvent(AliESDInputHandler *esdHandler, AliAODInputHandler *aodHandler, AliMCEvent *mcEvent); | |
81 | ||
82 | /** Check if event is triggred */ | |
83 | Bool_t IsEventTriggered(); | |
84 | ||
85 | /** Fill event cut statistics */ | |
86 | Bool_t IsEventRejected(); | |
87 | ||
88 | /** Check if charged MC particle is accepted for basic parameters */ | |
89 | Bool_t IsParticleAcceptedBasicCharged(AliVParticle *particle, Int_t idxMC); | |
90 | ||
91 | /** Check if neutral MC particle is accepted for basic parameters */ | |
92 | Bool_t IsParticleAcceptedBasicNeutral(AliVParticle *particle, Int_t idxMC); | |
93 | ||
94 | /** Check if MC particle is accepted for Rapidity */ | |
95 | Bool_t IsParticleAcceptedRapidity(AliVParticle *particle, Double_t &yP, Int_t gCurPid); | |
96 | ||
97 | /** Check if MC particle is accepted for Phi */ | |
98 | Bool_t IsParticleAcceptedPhi(AliVParticle *particle); | |
99 | ||
100 | /** Check if MC particle is findable tracks */ | |
101 | Bool_t IsParticleFindable(Int_t label); | |
102 | ||
103 | /** Check if track is accepted for basic parameters */ | |
104 | Bool_t IsTrackAcceptedBasicCharged(AliVTrack *track); | |
105 | ||
106 | /** Check if track is accepted for Rapidity */ | |
107 | Bool_t IsTrackAcceptedRapidity(AliVTrack *track, Double_t &yP, Int_t gCurPid); | |
108 | ||
109 | /** Check if track is accepted for DCA */ | |
110 | Bool_t IsTrackAcceptedDCA(AliVTrack *track); | |
111 | ||
112 | /** Check if track is accepted for PID */ | |
113 | Bool_t IsTrackAcceptedPID(AliVTrack *track, Double_t *pid, AliPID::EParticleType gCurPid); | |
114 | ||
115 | /** Check if trackis accepted for Phi */ | |
116 | Bool_t IsTrackAcceptedPhi(AliVTrack *track); | |
117 | ||
118 | /** Method for the correct logarithmic binning of histograms | |
119 | * and Update MinPtForTOFRequired, using the pT log-scale | |
120 | */ | |
121 | void BinLogAxis(const THnBase *h, Int_t axisNumber, AliESDtrackCuts* cuts = NULL); | |
122 | ||
123 | static const Float_t fgkfHistBinWitdthRap; // Histogram std bin width for rapidity/eta | |
124 | static const Float_t fgkfHistBinWitdthPt; // Histogram std bin width for pt | |
125 | ||
126 | static const Float_t fgkfHistRangeCent[]; // Histogram range for centrality | |
127 | static const Int_t fgkfHistNBinsCent; // Histogram N bins for centrality | |
128 | static const Float_t fgkfHistRangeEta[]; // Histogram range for eta | |
129 | static const Int_t fgkfHistNBinsEta; // Histogram N bins for eta | |
130 | static const Float_t fgkfHistRangeRap[]; // Histogram range for rapidity | |
131 | static const Int_t fgkfHistNBinsRap; // Histogram N bins for rapidity | |
132 | static const Float_t fgkfHistRangePhi[]; // Histogram range for phi | |
133 | static const Int_t fgkfHistNBinsPhi; // Histogram N bins for phi | |
134 | static const Float_t fgkfHistRangePt[]; // Histogram range for pt | |
135 | static const Int_t fgkfHistNBinsPt; // Histogram N bins for pt | |
136 | static const Float_t fgkfHistRangeSign[]; // Histogram range for sign | |
137 | static const Int_t fgkfHistNBinsSign; // Histogram N bins for sign | |
138 | ||
139 | static const Char_t* fgkEventNames[]; // Event names | |
140 | static const Char_t* fgkCentralityMaxNames[]; // Centrality names | |
141 | static const Char_t* fgkTriggerNames[]; // Trigger names | |
142 | static const Char_t* fgkCentralityNames[]; // Centrality names | |
143 | static const Char_t* fgkPidName[4]; | |
144 | static const Char_t* fgkPidLatex[4][2]; | |
145 | static const Char_t* fgkPidTitles[4][2]; | |
146 | ||
147 | private: | |
148 | ||
149 | AliEbyEPidRatioHelper(const AliEbyEPidRatioHelper&); // not implemented | |
150 | AliEbyEPidRatioHelper& operator=(const AliEbyEPidRatioHelper&); // not implemented | |
151 | ||
152 | void InitializeEventStats(); | |
153 | void InitializeTriggerStats(); | |
154 | void InitializeCentralityStats(); | |
155 | Bool_t FillEventStats(Int_t *aEventCuts); | |
156 | ||
157 | Int_t fModeDistCreation; // Dist creation mode : 1 = on | 0 = off | |
158 | AliInputEventHandler *fInputEventHandler; //! Ptr to input event handler (ESD or AOD) | |
159 | AliPIDResponse *fPIDResponse; //! Ptr to PID response Object | |
160 | AliESDEvent *fESD; //! Ptr to ESD event | |
161 | AliESDtrackCuts *fESDTrackCuts; //! Ptr to ESD cuts | |
162 | AliAODEvent *fAOD; //! Ptr to AOD event | |
163 | Int_t fAODtrackCutBit; // Track filter bit for AOD tracks | |
164 | Bool_t fIsMC; // Is MC event | |
165 | AliMCEvent *fMCEvent; //! Ptr to MC event | |
166 | AliStack *fStack; //! Ptr to stack | |
167 | Int_t fCentralityBin; // Centrality bin of current event within max centrality bin | |
168 | Float_t fCentralityPercentile; // Centrality percentile of current event | |
169 | Int_t fCentralityBinMax; // Max centrality bin to be used | |
170 | Float_t fVertexZMax; // VertexZ cut | |
171 | Float_t fRapidityMax; // Rapidity cut | |
172 | Float_t fPhiMin; // Phi min cut | |
173 | Float_t fPhiMax; // Phi max cut | |
174 | Float_t fMinTrackLengthMC; // Min track length for MC tracks | |
175 | Float_t fNSigmaMaxCdd; // N Sigma for dcar / sqrt(cdd) - turn off with 0. | |
176 | Float_t fNSigmaMaxCzz; // N Sigma for dcaz / sqrt(czz) - turn off with 0. | |
177 | ||
178 | Int_t fPIDStrategy; // PID Strategy to be used | |
179 | Float_t fNSigmaMaxITS; // N Sigma for ITS PID | |
180 | Float_t fNSigmaMaxTPC; // N Sigma for TPC PID | |
181 | Float_t fNSigmaMaxTPClow; // N Sigma for TPC PID lower part | |
182 | Float_t fNSigmaMaxTOF; // N Sigma for TOF PID | |
183 | Float_t fMinPtForTOFRequired; // Min pt from where TOF is required | |
184 | Float_t fMaxPtForTPClow; // Max pt until TPClow is used | |
185 | TH1F *fHEventStat0; // Event cut statistics | |
186 | TH1F *fHEventStat1; // Event cut statistics - incremental | |
187 | Int_t fHEventStatMax; // Max N cuts to be included in HEventStat | |
188 | TH1F *fHTriggerStat; // Trigger statistics | |
189 | Int_t fNTriggers; // N triggers used | |
190 | TH1F *fHCentralityStat; // Centrality statistics | |
191 | Int_t fNCentralityBins; // N centrality bins used | |
192 | TRandom3 *fRandom; // Random generator | |
193 | ||
194 | ClassDef(AliEbyEPidRatioHelper, 1); | |
195 | }; | |
196 | ||
197 | #endif |