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"
25 class AliESDtrackCuts;
26 class AliInputEventHandler;
27 class AliESDInputHandler;
28 class AliAODInputHandler;
31 class AliAODMCParticle;
36 #include "AliAnalysisTaskSE.h"
38 class AliEbyENetChargeFluctuationTask: public AliAnalysisTaskSE {
42 AliEbyENetChargeFluctuationTask( const char *name = "NetChargeFluctuation");
43 virtual ~AliEbyENetChargeFluctuationTask();
45 virtual void UserCreateOutputObjects();
46 virtual void UserExec(Option_t *option);
47 virtual void Terminate(Option_t *);
49 void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) {
50 fVxMax = vx;fVyMax = vy; fVzMax = vz;
52 void SetKinematicsCuts(Double_t ptl, Double_t pth, Double_t eta, Double_t rap) {
53 fPtMin = ptl; fPtMax = pth; fEtaMin = -eta; fEtaMax = eta; fRapMin = -rap; fRapMax = rap;
55 void SetTrackFilterBit(Int_t bit) {fAODtrackCutBit = bit; }
56 void SetCentralityEstimator(const char* cent) { fCentralityEstimator = cent;}
57 void SetSystemType(Int_t i) { fSystemType = i; }
59 void SetPhi(Double_t phil) {fPhiMax = phil;}
60 void SetIsMC() {fIsMC = kTRUE;}
61 void SetNSubSamples(Int_t i) {fNSubSamples = i;}
62 void Debug() {fDebug = kTRUE;}
63 void SetIsAOD() {fIsAOD = kTRUE;}
64 void SetAnal(Int_t i);// {fAnalType = i; };
65 void SetHelperPID(AliHelperPID* pid){ fHelperPID = pid; }
66 void SetDca(Double_t dcaxy,Double_t dcaz) { fDcaXy = dcaxy; fDcaZ = dcaz;}
68 void SetAnalysisCutObject(AliESDtrackCuts *const trackCuts) {
69 fESDtrackCuts = trackCuts;}
74 Int_t GetPDG(Int_t i) {
75 if (i == 0) return 0; else if (i == 1) return 211;
76 else if (i == 2) return 321; else if (i == 3) return 2212;
78 Double_t *CreateLogAxis(Int_t nbins, Double_t xmin, Double_t xmax);
80 /*---- Setup events ----*/
86 Int_t SetupEventCR(AliESDInputHandler *esdHandler, AliAODInputHandler *aodHandler, AliMCEvent *mcEvent);
87 void ResetCurrentEvent();
88 /* ---- Check Events/Track/AOD/ESD ---- */
90 Bool_t ChargedTrack(AliVTrack* track);
91 Bool_t TriggeredEvents();
92 Bool_t RejectedEvent();
93 Bool_t ParticleRapidity(AliVParticle *particle, Double_t &yP, Int_t gCurPid);
94 Bool_t TrackRapidity(AliVTrack *track, Double_t &yP, Int_t gCurPid);
95 Bool_t IsFindableInTPC(Int_t label);
96 Bool_t AcceptEvent(AliAODEvent *event, Int_t cent) const; //! accept eventc
97 Bool_t IsEventStats(Int_t *aEventCuts);
98 Bool_t AcceptTrack(AliVTrack *track) const;
99 Bool_t AcceptTrackMC(AliVParticle *particle, Int_t idxMC) const;
101 /* ------ Containers ------ */
105 void CreateBasicQA();
106 void CreateBasicHistos(const Char_t *title, Bool_t isMC, Bool_t isPer);
107 void CreateRatioHistos(const Char_t *title,Bool_t isMC, Bool_t isPer);
108 void CreateGroupHistos(const Char_t *name, const Char_t *title, Int_t nSample,Bool_t isPer);
109 void FillBasicHistos(Bool_t isMC, Bool_t isPer);
110 void FillRatioHistos(Bool_t isMC,Bool_t isPer);
111 void FillGroupHistos(const Char_t *name, Int_t iSub, Bool_t isMC,Bool_t isPer);
114 void FillCC(Int_t i);
115 void FillRCC(Int_t i);
116 void FillRecCE(Int_t i);
117 void FillRecDE(Int_t i);
118 void FillRecDED(Int_t i);
119 void FillGenCE(Int_t i);
120 void FillQAThnRec(AliVTrack *track, Int_t gPid, Double_t rap);
121 void FillQAThnMc(AliVParticle *particle, Int_t gPid, Double_t rap);
123 /* ------ Get-Calculate-Fill ------ */
133 void CalculateCE(Int_t gPid);
134 void CalculateDE(Int_t gPid);
135 void CalculateDED(Int_t gPid);
137 /* Global Members Private */
139 AliInputEventHandler *fInputEventHandler; // Input Handler
140 AliESDEvent *fESD; // Current ESD events
141 AliAODEvent *fAOD; // Current AOD events
142 AliMCEvent *fMCEvent; // Current MC Event
143 AliStack *fStack; // Stak tree
144 AliAODInputHandler *fAODHandler; // AOD handler
145 AliESDInputHandler *fESDHandler; // ESD handler
146 AliStack *fMCStack; // MC Stack
147 TClonesArray *fArrayMC; // AOD MC stack
148 AliESDtrackCuts *fESDtrackCuts; // ESD Track Cuts
150 TList *fQaList; // Tree of QA
151 TList *fPhyList; // For Analysis
152 TList *fDcaList; // dca for Both Data and MC
153 TList *fEffList; // Correction List
155 Int_t fSystemType; // Translated to Int_t 0:"pp", 1:"pA", 2:"AA"
156 TString fCentralityEstimator; // "V0M","TRK","TKL","ZDC","FMD"
158 Double_t fVxMax; // X vertex Range
159 Double_t fVyMax; // Y vertex Range
160 Double_t fVzMax; // Z vertex Range
161 Double_t fPhiMin; // Phi Minimum
162 Double_t fPhiMax; // Phi Maximum
163 Double_t fPtMin; // pT Minimum
164 Double_t fPtMax; // Pt Maximum
165 Double_t fEtaMin; // Eta Minimum
166 Double_t fEtaMax; // Eta Maximum
167 Double_t fRapMin; // Rapidity Minimum
168 Double_t fRapMax; // Rapidity Maximum
169 Double_t fDcaXy; // DCA Xy
170 Double_t fDcaZ; // DCA Z
171 Double_t fCentralityBin; // Centrality bin of current event within max centrality bin
172 Double_t fCentralityPercentile; // Centrality percentile of current event
173 Double_t fNp[4][2]; // Array of particle/anti-particle counts
174 Double_t fMCNp[4][2]; // Array of MC particle/anti-particle counts
175 Double_t fRedFactp[9][2]; // Array of particle/anti-particle reduced factorial
176 Double_t fCurGen[8]; // Current Gen Track
177 Double_t fCurGenD[8]; // Current info on DGen
178 Double_t fCurRecD[7]; // Current DRec
179 Double_t fCurRec[5]; // Current Rec info
180 Double_t fCurCont[6]; // Current Contamination
182 Float_t fMinTrackLengthMC; // Min track length for MC tracks
183 Int_t fAODtrackCutBit; // AOD BITs
184 Int_t fNSubSamples; // N subsamples
185 Int_t fSubSampleIdx; // Subsample idx for current event
186 Int_t fOrder; // Max order of higher order distributions
187 Int_t fNTriggers; // N triggers used
188 Int_t fHEventStatMax; // Max N cuts to be included in HEventSta
189 Int_t fNCentralityBins; // N centrality bins used
190 Int_t fCentralityBinMax; // Max Cent
191 Int_t fNTracks; // Number of Tracks of Current Events
193 Bool_t fIsMC; // Is MC event - Auto set by Add Task
194 Bool_t fIsRatio; // Is Ratio
195 Bool_t fIsAOD; // analysis mode: 0 = ESDs | 1 = AODs
196 Bool_t fIsSub; // analysis mode SS
197 Bool_t fIsBS; // analysis mode BS
198 Bool_t fIsPer; // analysis mode PER
199 Bool_t fIsEff; // analysis mode Eff
200 Bool_t fDebug; // Check for QA
201 Bool_t fIsQa; // Check for QA
202 Bool_t fIsPhy; // Check for QA
203 Bool_t fIsDca; // Check for QA
204 Bool_t fIsNu; // Check for QA
206 TRandom3 *fRan; // Radom Number BS
207 TRandom3 *fRanIdx; // Random Number SS
209 AliHelperPID *fHelperPID; // Customised HelperPID class
211 AliEbyENetChargeFluctuationTask(const AliEbyENetChargeFluctuationTask&);
212 AliEbyENetChargeFluctuationTask& operator = (const AliEbyENetChargeFluctuationTask&);
213 ClassDef(AliEbyENetChargeFluctuationTask, 1);