1 #ifndef AliEbyENetChargeFluctuationTask_cxx
2 #define AliEbyENetChargeFluctuationTask_cxx
4 //=========================================================================//
6 // AliEbyE Analysis for Net-Charge Fluctuation //
7 // Author: Deepika Rathee || Satyajit Jena //
8 // drathee@cern.ch || sjena@cern.ch //
10 //=========================================================================//
16 #include "TProfile2D.h"
23 class AliESDtrackCuts;
24 class AliInputEventHandler;
25 class AliESDInputHandler;
26 class AliAODInputHandler;
29 class AliAODMCParticle;
35 #include "AliAnalysisTaskSE.h"
37 class AliEbyENetChargeFluctuationTask: public AliAnalysisTaskSE {
41 AliEbyENetChargeFluctuationTask( const char *name = "HigherMomentAnalysis");
42 virtual ~AliEbyENetChargeFluctuationTask();
44 virtual void UserCreateOutputObjects();
45 virtual void UserExec(Option_t *option);
46 virtual void Terminate(Option_t *);
48 void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) {
49 fVxMax = vx;fVyMax = vy; fVzMax = vz;
51 void SetKinematicsCuts(Double_t ptl, Double_t pth, Double_t eta, Double_t rap) {
52 fPtMin = ptl; fPtMax = pth; fEtaMin = -eta; fEtaMax = eta; fRapMin = -rap; fRapMax = rap;
54 void SetTrackFilterBit(Int_t bit) {fAODtrackCutBit = bit; }
55 void SetCentralityEstimator(const char* cent) { fCentralityEstimator = cent;}
56 void SetSystemType(Int_t i) { fSystemType = i; }
58 void SetPhi(Double_t phil) {fPhiMax = phil;}
59 void SetIsMC() {fIsMC = kTRUE;}
60 void SetNSubSamples(Int_t i) {fNSubSamples = i;}
61 void Debug() {fDebug = kTRUE;}
62 void SetIsAOD() {fIsAOD = kTRUE;}
63 void SetAnal(Int_t i);
64 void SetHelperPID(AliHelperPID* pid){ fHelperPID = pid; }
67 void SetAnalysisCutObject(AliESDtrackCuts *const trackCuts) {
68 fESDtrackCuts = trackCuts;}
73 Int_t GetPDG(Int_t i) {
74 if (i == 0) return 0; else if (i == 1) return 211;
75 else if (i == 2) return 321; else if (i == 3) return 2212;
77 Double_t *CreateLogAxis(Int_t nbins, Double_t xmin, Double_t xmax);
79 /*---- Setup events ----*/
85 Int_t SetupEventCR(AliESDInputHandler *esdHandler, AliAODInputHandler *aodHandler, AliMCEvent *mcEvent);
86 void ResetCurrentEvent();
87 /* ---- Check Events/Track/AOD/ESD ---- */
89 Bool_t ChargedTrack(AliVTrack* track);
90 Bool_t TriggeredEvents();
91 Bool_t RejectedEvent();
92 Bool_t ParticleRapidity(AliVParticle *particle, Double_t &yP, Int_t gCurPid);
93 Bool_t TrackRapidity(AliVTrack *track, Double_t &yP, Int_t gCurPid);
94 Bool_t IsFindableInTPC(Int_t label);
95 Bool_t AcceptEvent(AliAODEvent *event, Int_t cent) const; //! accept eventc
96 Bool_t IsEventStats(Int_t *aEventCuts);
97 Bool_t AcceptTrack(AliVTrack *track) const;
98 Bool_t AcceptTrackMC(AliVParticle *particle, Int_t idxMC) const;
100 /* ------ Containers ------ */
104 void CreateBasicQA();
105 void CreateBasicHistos(const Char_t *name, const Char_t *title);
106 void CreateRatioHistos(const Char_t *name, const Char_t *title,Bool_t isPer);
107 void CreateGroupHistos(const Char_t *name, const Char_t *title, Int_t nSample,Bool_t isPer);
108 void FillBasicHistos(const Char_t *name, Bool_t isMC);
109 void FillRatioHistos(const Char_t *name,Bool_t isMC,Bool_t isPer);
110 void FillGroupHistos(const Char_t *name, Int_t iSub, Bool_t isMC,Bool_t isPer);
113 void FillCC(Int_t i);
114 void FillRCC(Int_t i);
115 void FillRecCE(Int_t i);
116 void FillRecDE(Int_t i);
117 void FillRecDED(Int_t i);
118 void FillGenCE(Int_t i);
119 void FillQAThnRec(AliVTrack *track, Int_t gPid, Double_t rap);
120 void FillQAThnMc(AliVParticle *particle, Int_t gPid, Double_t rap);
122 /* ------ Get-Calculate-Fill ------ */
132 void CalculateCE(Int_t gPid);
133 void CalculateDE(Int_t gPid);
134 void CalculateDED(Int_t gPid);
136 /* Global Members Private */
138 AliInputEventHandler *fInputEventHandler; //!
139 AliESDEvent *fESD; //!
140 AliAODEvent *fAOD; //!
141 AliMCEvent *fMCEvent; //!
142 AliStack *fStack; //!
143 AliAODInputHandler *fAODHandler; //!
144 AliESDInputHandler *fESDHandler; //!
145 AliStack *fMCStack; //!
146 TClonesArray *fArrayMC; //!
147 AliESDtrackCuts *fESDtrackCuts; //!
149 TList *fQaList; //! Tree of QA
150 TList *fPhyList; //! For Analysis
151 TList *fDcaList; //! dca for Both Data and MC
152 TList *fEffList; //! Correction List
154 Int_t fSystemType; //! "pp", "pA", "AA"
155 TString fCentralityEstimator; //! "V0M","TRK","TKL","ZDC","FMD"
157 Double_t fVxMax; //! X vertex Range
158 Double_t fVyMax; //! Y vertex Range
159 Double_t fVzMax; //! Z vertex Range
160 Double_t fPhiMin; //! Phi Minimum
161 Double_t fPhiMax; //! Phi Maximum
162 Double_t fPtMin; //! pT Minimum
163 Double_t fPtMax; //! Pt Maximum
164 Double_t fEtaMin; //! Eta Minimum
165 Double_t fEtaMax; //! Eta Maximum
166 Double_t fRapMin; //! Rapidity Minimum
167 Double_t fRapMax; //! Rapidity Maximum
168 Double_t fCentralityBin; // Centrality bin of current event within max centrality bin
169 Double_t fCentralityPercentile; // Centrality percentile of current event
170 Double_t **fNp; // Array of particle/anti-particle counts
171 Double_t **fMCNp; // Array of MC particle/anti-particle counts
172 Double_t **fRedFactp; // Array of particle/anti-particle reduced factorial
173 Double_t fCurGen[8]; //
174 Double_t fCurGenD[8]; //
175 Double_t fCurRecD[7]; //
176 Double_t fCurRec[5]; //
177 Double_t fCurCont[6]; //
179 Float_t fMinTrackLengthMC; //! Min track length for MC tracks
180 Int_t fAODtrackCutBit; //!
181 Int_t fNSubSamples; //! N subsamples
182 Int_t fSubSampleIdx; // Subsample idx for current event
183 Int_t fOrder; //! Max order of higher order distributions
184 Int_t fNTriggers; //! N triggers used
185 Int_t fHEventStatMax; //! Max N cuts to be included in HEventSta
186 Int_t fNCentralityBins; //! N centrality bins used
187 Int_t fCentralityBinMax; //!
190 Bool_t fIsMC; //! Is MC event
191 Bool_t fIsRatio; //! Is Ratio
192 Bool_t fIsAOD; //! analysis mode: 0 = ESDs | 1 = AODs
193 Bool_t fIsSub; //! analysis mode SS
194 Bool_t fIsBS; //! analysis mode BS
195 Bool_t fIsPer; //! analysis mode PER
196 Bool_t fIsEff; //! analysis mode Eff
197 Bool_t fDebug; //! Check for QA
198 Bool_t fIsQa; //! Check for QA
199 Bool_t fIsPhy; //! Check for QA
200 Bool_t fIsDca; //! Check for QA
202 TRandom3 *fRan; //! Radom Number BS
203 TRandom3 *fRanIdx; //! Random Number SS
205 AliHelperPID *fHelperPID; //! Customised HelperPID class
207 AliEbyENetChargeFluctuationTask(const AliEbyENetChargeFluctuationTask&);
208 AliEbyENetChargeFluctuationTask& operator = (const AliEbyENetChargeFluctuationTask&);
209 ClassDef(AliEbyENetChargeFluctuationTask, 1);