]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/totEt/AliAnalysisEt.h
- Adding centrality class variable to AliAnalysisEt such that
[u/mrichter/AliRoot.git] / PWG4 / totEt / AliAnalysisEt.h
CommitLineData
a7ae9b24 1//_________________________________________________________________________
cf6522d1 2// Utility Class for transverse energy studies
3// Base class for ESD & MC analysis
4// - reconstruction and MonteCarlo output
5//
6//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
7//_________________________________________________________________________
2fbf38ac 8
a7ae9b24 9#ifndef ALIANALYSISET_H
10#define ALIANALYSISET_H
11
b6dd6ad2 12class AliCentrality;
7d2d1773 13#include "AliAnalysisEtCommon.h"
f9a4ed81 14#include "THnSparse.h"
2fbf38ac 15
0f97be4c 16class TString;
ce546038 17class TTree;
2fbf38ac 18class TH2F;
19class TH1F;
20class AliVEvent;
21class TList;
0651f6b4 22class TString;
b5821c13 23class AliESDtrackCuts;
4998becf 24class AliAnalysisEtCuts;
f9a4ed81 25class AliESDCaloCluster;
26//class THnSparseD;
2fbf38ac 27
7d2d1773 28class AliAnalysisEt : public AliAnalysisEtCommon
2fbf38ac 29{
30public:
31
32 AliAnalysisEt();
33 virtual ~AliAnalysisEt();
2fbf38ac 34
35public:
36
37 /** Analyse the event! */
f9a4ed81 38
641e1e0c 39 virtual Int_t AnalyseEvent(AliVEvent *event);
2fbf38ac 40
41 /** Fill the objects you want to output, classes which add new histograms should overload this. */
42 virtual void FillOutputList(TList* list);
43
44 /** Initialise the analysis, must be overloaded. */
641e1e0c 45 virtual void Init();
2fbf38ac 46
47 /**
48 * Creates the histograms, must be overloaded if you want to add your own.
49 * Uses the fHistogramNameSuffix to create proper histogram names
50 */
51 virtual void CreateHistograms();
8ea99ab0 52 virtual void CreateTrees();
f9a4ed81 53 TH2F* CreateEtaEHisto2D(TString name, TString title, TString ztitle);
2fbf38ac 54
55 /** Fills the histograms, must be overloaded if you want to add your own */
56 virtual void FillHistograms();
57
58 /** Reset event specific values (Et etc.) */
59 virtual void ResetEventValues();
99a6613d 60
2fbf38ac 61 /** Total Et in the event (without acceptance cuts) */
cf6522d1 62 Double_t GetTotEt() const { return fTotEt; }
2fbf38ac 63
64 /** Total Et in the event within the acceptance cuts */
cf6522d1 65 Double_t GetTotEtAcc() const { return fTotEtAcc; }
2fbf38ac 66
67 /** Total neutral Et in the event (without acceptance cuts) */
cf6522d1 68 Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
2fbf38ac 69
70 /** Total neutral Et in the event within the acceptance cuts */
cf6522d1 71 Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
2fbf38ac 72
73 /** Total charged Et in the event (without acceptance cuts) */
cf6522d1 74 Double_t GetTotChargedEt() const { return fTotChargedEt; }
2fbf38ac 75
76 /** Total charged Et in the event within the acceptance cuts */
cf6522d1 77 Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
2fbf38ac 78
b5821c13 79 void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;}
5501aa9c 80
81 /** Set the centrality object */
b6dd6ad2 82 void SetCentralityObject(AliCentrality *cent) { fCentrality = cent; }
f9a4ed81 83
84 /** Get contribution from non-removed charged particles */
85 virtual Double_t GetChargedContribution(Int_t /*clusterMultiplicity*/) {return 0;}
86
87 /** Get contribution from non-removed neutral particles */
88 virtual Double_t GetNeutralContribution(Int_t /*clusterMultiplicity*/) {return 0;}
89
90 /** Get contribution from removed gammas */
91 virtual Double_t GetGammaContribution(Int_t /*clusterMultiplicity*/) {return 0;}
2fbf38ac 92
93protected:
2fbf38ac 94
7d2d1773 95 //AliAnalysisEtCuts *fCuts; // keeper of basic cuts
f9a4ed81 96 Double_t CalculateTransverseEnergy(AliESDCaloCluster *cluster);
cf6522d1 97
cf6522d1 98 Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
99 Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
2fbf38ac 100
cf6522d1 101 Double_t fTotNeutralEt;/** Total neutral Et in the event */
102 Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */
103 Double_t fTotChargedEt;/** Total charged Et in the event */
104 Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
105
106 Int_t fMultiplicity;/** Multiplicity of particles in the event */
107 Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
108 Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
87efb15c 109
7b873813 110 Double_t fBaryonEt; /** Et of identified baryons; calo based (Rec only for now) */
111 Double_t fAntiBaryonEt; /** Et of identified anti-baryons; calo based (Rec only for now) */
112 Double_t fMesonEt; /** Et of identified mesons; calo based (Rec only for now) */
87efb15c 113
ce546038 114 Double_t fProtonEt; /** Et of identified protons */
43056f1b 115 Double_t fPionEt; /** Et of identified pions */
ce546038 116 Double_t fChargedKaonEt; /** Et of identified charged kaons */
117 Double_t fMuonEt; /** Et of identified muons */
118 Double_t fElectronEt; /** Et of identified electrons */
43056f1b 119 Double_t fNeutronEt; /** Et of neutrons (MC only for now) */
120 Double_t fAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
121 Double_t fGammaEt; /** Et of identified electrons (MC only for now) */
122
ce546038 123 Double_t fProtonEtAcc; /** Et of identified protons in calorimeter acceptance */
43056f1b 124 Double_t fPionEtAcc; /** Et of identified pions in calorimeter acceptance */
ce546038 125 Double_t fChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */
126 Double_t fMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
127 Double_t fElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
8ea99ab0 128
129 Float_t fEnergyDeposited; /** Energy deposited in calorimeter */
130 Float_t fEnergyTPC; /** Energy measured in TPC */
131 Short_t fCharge; /** Charge of the particle */
132 Short_t fParticlePid; /** Particle PID */
133 Float_t fPidProb; /** Probability of PID */
134 Bool_t fTrackPassedCut; /** The track is accepted by ESDTrackCuts */
f9a4ed81 135
136 Int_t fCentClass;
ce546038 137
138 Double_t fEtaCut;/** Cut in eta (standard |eta| < 0.5 )*/
4998becf 139
43056f1b 140 /** Eta cut for our acceptance */
141 Double_t fEtaCutAcc; // Eta cut for our acceptance
142
143 /** Min phi cut for our acceptance in radians */
144 Double_t fPhiCutAccMin; // Min phi cut for our acceptance in radians
145
146 /** Max phi cut for our acceptance in radians */
147 Double_t fPhiCutAccMax; // Max phi cut for our acceptance in radians
cf6522d1 148
43056f1b 149 /** Detector radius */
150 Double_t fDetectorRadius; // Detector radius
151
152 /** Cut on the cluster energy */
153 Double_t fClusterEnergyCut; // Cut on the cluster energy
154
155 /** Minimum energy to cut on single cell cluster */
156 Double_t fSingleCellEnergyCut; // Minimum energy to cut on single cell cluster
f9a4ed81 157
158 Double_t fTrackDistanceCut; // cut on track distance
159
160 Double_t fTrackDxCut; // cut on track distance in x
161
162 Double_t fTrackDzCut; // cut on track distance in z
163
4998becf 164
2fbf38ac 165 // Declare the histograms
166
167 /** The full Et spectrum measured */
168 TH1F *fHistEt; //Et spectrum
169
170 /** The full charged Et spectrum measured */
8ea99ab0 171 TH1F *fHistChargedEt; //Charged Et spectrum
2fbf38ac 172
173 /** The full neutral Et spectrum measured */
174 TH1F *fHistNeutralEt; //Neutral Et spectrum
175
176 /** The Et spectrum within the calorimeter acceptance */
177 TH1F *fHistEtAcc; //Et in acceptance
178
179 /** The charged Et spectrum within the calorimeter acceptance */
180 TH1F *fHistChargedEtAcc; //Charged Et in acceptance
181
182 /** The neutral Et spectrum within the calorimeter acceptance */
183 TH1F *fHistNeutralEtAcc; //Et in acceptance
184
185 /** Multiplicity of particles in the events */
186 TH1F *fHistMult; //Multiplicity
187
188 /** Charged multiplicity of particles in the events */
189 TH1F *fHistChargedMult; //Charged multiplicity
190
191 /** Neutral multiplicity of particles in the events */
192 TH1F *fHistNeutralMult; //Neutral multiplicity
193
194 /* Acceptance plots */
195 TH2F *fHistPhivsPtPos; //phi vs pT plot for positive tracks
196 TH2F *fHistPhivsPtNeg; //phi vs pT plot for negative tracks
197
87efb15c 198 /* PID plots */
ce546038 199 TH1F *fHistBaryonEt; /** Et of identified baryons */
200 TH1F *fHistAntiBaryonEt; /** Et of identified anti-baryons */
201 TH1F *fHistMesonEt; /** Et of identified mesons */
202
ce546038 203 TH1F *fHistProtonEt; /** Et of identified protons */
43056f1b 204 TH1F *fHistPionEt; /** Et of identified protons */
ce546038 205 TH1F *fHistChargedKaonEt; /** Et of identified charged kaons */
206 TH1F *fHistMuonEt; /** Et of identified muons */
207 TH1F *fHistElectronEt; /** Et of identified electrons */
43056f1b 208 TH1F *fHistNeutronEt; /** Et of neutrons (MC only for now) */
209 TH1F *fHistAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
210 TH1F *fHistGammaEt; /** Et of gammas (MC only for now) */
87efb15c 211
ce546038 212 TH1F *fHistProtonEtAcc; /** Et of identified protons in calorimeter acceptance */
43056f1b 213 TH1F *fHistPionEtAcc; /** Et of identified protons in calorimeter acceptance */
ce546038 214 TH1F *fHistChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */
215 TH1F *fHistMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
216 TH1F *fHistElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
87efb15c 217
218 /* Correction plots */
7b873813 219 TH1F *fHistTMDeltaR; /* Track matching plots; Rec only for now */
f9a4ed81 220 TH2F *fHistTMDxDz; /* Track matching plots; Rec only for now */
221
222 /* Auxiliary Histogram variables */
223 static Float_t fgEtaAxis[17];//bins for eta axis of histograms
0651f6b4 224 static Int_t fgnumOfEtaBins;//number of eta bins
225 static Float_t fgEAxis[79];//bins for pt axis of histograms
226 static Int_t fgNumOfEBins;//number of pt bins
227
228
ce546038 229 TTree *fTree; // optional TTree
8ea99ab0 230 TTree *fTreeDeposit; // optional TTree for energy deposit measurements
b5821c13 231
0651f6b4 232 /** Centrality object */
b6dd6ad2 233 AliCentrality *fCentrality; //Centrality object
f9a4ed81 234
235 /** Which detector? (-1 -> PHOS, 1 -> EMCAL)*/
236 Short_t fDetector;
237
238 /** THnSparse histograms */
239 THnSparseD *fSparseHistTracks;
240
241 /** THnSparse histograms */
242 THnSparseD *fSparseHistClusters;
243
244 /** ET sparse valuses */
245 THnSparseD *fSparseHistEt; //!
246
247 /** Values for sparse hists */
248 Double_t *fSparseTracks; //!
249
250 /** Values for sparse hists */
251 Double_t *fSparseClusters; //!
252
253 /** ET sparse valuses */
254 Double_t *fSparseEt; //!
255
256
257
b5821c13 258
4998becf 259private:
260 //Declare private to avoid compilation warning
261 AliAnalysisEt & operator = (const AliAnalysisEt & g) ;//cpy assignment
262 AliAnalysisEt(const AliAnalysisEt & g) ; // cpy ctor
263
e573e46d 264 ClassDef(AliAnalysisEt, 1);
2fbf38ac 265};
266
267#endif // ALIANALYSISET_H