]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.h
Added computation of mothers in acceptance (Massimo) + macros for D0 analysis updated
[u/mrichter/AliRoot.git] / PWGCF / EBYE / PIDFluctuation / task / AliEbyEPidRatioHelper.h
CommitLineData
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
22class AliESDtrack;
23class AliMCEvent;
24class AliStack;
25class AliPIDResponse;
26class AliESDtrackCuts;
27class AliInputEventHandler;
28class AliESDInputHandler;
29class AliAODInputHandler;
30class AliAODEvent;
31class AliAODTrack;
32class AliAODMCParticle;
33class AliMCParticle;
34
35class 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;}
f7ea34d2 55
0a28d543 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;}
f7ea34d2 72 Bool_t GetIsRatio() {return fIsRatio;}
0a28d543 73 Int_t GetAODtrackCutBit() {return fAODtrackCutBit;}
74 AliInputEventHandler* GetInputEventHandler() {return fInputEventHandler;}
75 AliMCEvent* GetMCEvent() {return fMCEvent;}
76
77 /** Initialize Helper */
f7ea34d2 78 Int_t Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Bool_t isRatio, Int_t trackCutBit, Int_t modeDistCreation);
0a28d543 79
80 /** Setup Event */
81 Int_t SetupEvent(AliESDInputHandler *esdHandler, AliAODInputHandler *aodHandler, AliMCEvent *mcEvent);
82
83 /** Check if event is triggred */
84 Bool_t IsEventTriggered();
85
86 /** Fill event cut statistics */
87 Bool_t IsEventRejected();
88
89 /** Check if charged MC particle is accepted for basic parameters */
90 Bool_t IsParticleAcceptedBasicCharged(AliVParticle *particle, Int_t idxMC);
91
92 /** Check if neutral MC particle is accepted for basic parameters */
93 Bool_t IsParticleAcceptedBasicNeutral(AliVParticle *particle, Int_t idxMC);
94
95 /** Check if MC particle is accepted for Rapidity */
96 Bool_t IsParticleAcceptedRapidity(AliVParticle *particle, Double_t &yP, Int_t gCurPid);
97
98 /** Check if MC particle is accepted for Phi */
99 Bool_t IsParticleAcceptedPhi(AliVParticle *particle);
100
101 /** Check if MC particle is findable tracks */
102 Bool_t IsParticleFindable(Int_t label);
103
104 /** Check if track is accepted for basic parameters */
105 Bool_t IsTrackAcceptedBasicCharged(AliVTrack *track);
106
107 /** Check if track is accepted for Rapidity */
108 Bool_t IsTrackAcceptedRapidity(AliVTrack *track, Double_t &yP, Int_t gCurPid);
109
110 /** Check if track is accepted for DCA */
111 Bool_t IsTrackAcceptedDCA(AliVTrack *track);
112
113 /** Check if track is accepted for PID */
114 Bool_t IsTrackAcceptedPID(AliVTrack *track, Double_t *pid, AliPID::EParticleType gCurPid);
115
116 /** Check if trackis accepted for Phi */
117 Bool_t IsTrackAcceptedPhi(AliVTrack *track);
f7ea34d2 118
119
0a28d543 120 /** Method for the correct logarithmic binning of histograms
121 * and Update MinPtForTOFRequired, using the pT log-scale
122 */
123 void BinLogAxis(const THnBase *h, Int_t axisNumber, AliESDtrackCuts* cuts = NULL);
124
125 static const Float_t fgkfHistBinWitdthRap; // Histogram std bin width for rapidity/eta
126 static const Float_t fgkfHistBinWitdthPt; // Histogram std bin width for pt
127
128 static const Float_t fgkfHistRangeCent[]; // Histogram range for centrality
129 static const Int_t fgkfHistNBinsCent; // Histogram N bins for centrality
130 static const Float_t fgkfHistRangeEta[]; // Histogram range for eta
131 static const Int_t fgkfHistNBinsEta; // Histogram N bins for eta
132 static const Float_t fgkfHistRangeRap[]; // Histogram range for rapidity
133 static const Int_t fgkfHistNBinsRap; // Histogram N bins for rapidity
134 static const Float_t fgkfHistRangePhi[]; // Histogram range for phi
135 static const Int_t fgkfHistNBinsPhi; // Histogram N bins for phi
136 static const Float_t fgkfHistRangePt[]; // Histogram range for pt
137 static const Int_t fgkfHistNBinsPt; // Histogram N bins for pt
138 static const Float_t fgkfHistRangeSign[]; // Histogram range for sign
139 static const Int_t fgkfHistNBinsSign; // Histogram N bins for sign
140
141 static const Char_t* fgkEventNames[]; // Event names
142 static const Char_t* fgkCentralityMaxNames[]; // Centrality names
143 static const Char_t* fgkTriggerNames[]; // Trigger names
144 static const Char_t* fgkCentralityNames[]; // Centrality names
145 static const Char_t* fgkPidName[4];
146 static const Char_t* fgkPidLatex[4][2];
147 static const Char_t* fgkPidTitles[4][2];
148
149 private:
150
151 AliEbyEPidRatioHelper(const AliEbyEPidRatioHelper&); // not implemented
152 AliEbyEPidRatioHelper& operator=(const AliEbyEPidRatioHelper&); // not implemented
153
154 void InitializeEventStats();
155 void InitializeTriggerStats();
156 void InitializeCentralityStats();
157 Bool_t FillEventStats(Int_t *aEventCuts);
158
159 Int_t fModeDistCreation; // Dist creation mode : 1 = on | 0 = off
160 AliInputEventHandler *fInputEventHandler; //! Ptr to input event handler (ESD or AOD)
161 AliPIDResponse *fPIDResponse; //! Ptr to PID response Object
162 AliESDEvent *fESD; //! Ptr to ESD event
163 AliESDtrackCuts *fESDTrackCuts; //! Ptr to ESD cuts
164 AliAODEvent *fAOD; //! Ptr to AOD event
165 Int_t fAODtrackCutBit; // Track filter bit for AOD tracks
166 Bool_t fIsMC; // Is MC event
167 AliMCEvent *fMCEvent; //! Ptr to MC event
168 AliStack *fStack; //! Ptr to stack
169 Int_t fCentralityBin; // Centrality bin of current event within max centrality bin
170 Float_t fCentralityPercentile; // Centrality percentile of current event
171 Int_t fCentralityBinMax; // Max centrality bin to be used
172 Float_t fVertexZMax; // VertexZ cut
173 Float_t fRapidityMax; // Rapidity cut
174 Float_t fPhiMin; // Phi min cut
175 Float_t fPhiMax; // Phi max cut
176 Float_t fMinTrackLengthMC; // Min track length for MC tracks
177 Float_t fNSigmaMaxCdd; // N Sigma for dcar / sqrt(cdd) - turn off with 0.
178 Float_t fNSigmaMaxCzz; // N Sigma for dcaz / sqrt(czz) - turn off with 0.
179
180 Int_t fPIDStrategy; // PID Strategy to be used
181 Float_t fNSigmaMaxITS; // N Sigma for ITS PID
182 Float_t fNSigmaMaxTPC; // N Sigma for TPC PID
183 Float_t fNSigmaMaxTPClow; // N Sigma for TPC PID lower part
184 Float_t fNSigmaMaxTOF; // N Sigma for TOF PID
185 Float_t fMinPtForTOFRequired; // Min pt from where TOF is required
186 Float_t fMaxPtForTPClow; // Max pt until TPClow is used
187 TH1F *fHEventStat0; // Event cut statistics
188 TH1F *fHEventStat1; // Event cut statistics - incremental
189 Int_t fHEventStatMax; // Max N cuts to be included in HEventStat
190 TH1F *fHTriggerStat; // Trigger statistics
191 Int_t fNTriggers; // N triggers used
192 TH1F *fHCentralityStat; // Centrality statistics
193 Int_t fNCentralityBins; // N centrality bins used
194 TRandom3 *fRandom; // Random generator
f7ea34d2 195 Bool_t fIsRatio;
196
0a28d543 197
198 ClassDef(AliEbyEPidRatioHelper, 1);
199};
200
201#endif