1 //_________________________________________________________________________
2 // Utility Class for transverse energy studies
3 // Base class for ESD & MC analysis
4 // - reconstruction and MonteCarlo output
6 //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
7 //_________________________________________________________________________
9 #ifndef ALIANALYSISET_H
10 #define ALIANALYSISET_H
13 #include "AliAnalysisEtCommon.h"
14 #include "THnSparse.h"
23 class AliESDtrackCuts;
24 class AliAnalysisEtCuts;
25 class AliESDCaloCluster;
28 class AliAnalysisEt : public AliAnalysisEtCommon
33 virtual ~AliAnalysisEt();
37 /** Analyse the event! */
39 virtual Int_t AnalyseEvent(AliVEvent *event);
41 /** Fill the objects you want to output, classes which add new histograms should overload this. */
42 virtual void FillOutputList(TList* list);
44 /** Initialise the analysis, must be overloaded. */
48 * Creates the histograms, must be overloaded if you want to add your own.
49 * Uses the fHistogramNameSuffix to create proper histogram names
51 virtual void CreateHistograms();
52 virtual void CreateTrees();
53 TH2F* CreateEtaEHisto2D(TString name, TString title, TString ztitle);
54 TH2F* CreateEtaPtHisto2D(TString name, TString title, TString ztitle);
55 TH2F* CreateEtaEtHisto2D(TString name, TString title, TString ztitle);
56 TH2F* CreateResEHisto2D(TString name, TString title, TString ztitle);
57 TH2F* CreateResPtHisto2D(TString name, TString title, TString ztitle);
58 THnSparseF* CreateClusterHistoSparse(TString name, TString title);
59 THnSparseF* CreateNeutralPartHistoSparse(TString name, TString title);
60 THnSparseF* CreateChargedPartHistoSparse(TString name, TString title);
62 /** Fills the histograms, must be overloaded if you want to add your own */
63 virtual void FillHistograms();
65 /** Reset event specific values (Et etc.) */
66 virtual void ResetEventValues();
68 /** Total Et in the event (without acceptance cuts) */
69 Double_t GetTotEt() const { return fTotEt; }
71 /** Total Et in the event within the acceptance cuts */
72 Double_t GetTotEtAcc() const { return fTotEtAcc; }
74 /** Total neutral Et in the event (without acceptance cuts) */
75 Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
77 /** Total neutral Et in the event within the acceptance cuts */
78 Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
80 /** Total charged Et in the event (without acceptance cuts) */
81 Double_t GetTotChargedEt() const { return fTotChargedEt; }
83 /** Total charged Et in the event within the acceptance cuts */
84 Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
86 void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;}
88 /** Set the centrality object */
89 void SetCentralityObject(AliCentrality *cent) { fCentrality = cent; }
91 /** Get contribution from non-removed charged particles */
92 virtual Double_t GetChargedContribution(Int_t /*clusterMultiplicity*/) {return 0;}
94 /** Get contribution from non-removed neutral particles */
95 virtual Double_t GetNeutralContribution(Int_t /*clusterMultiplicity*/) {return 0;}
97 /** Get contribution from removed gammas */
98 virtual Double_t GetGammaContribution(Int_t /*clusterMultiplicity*/) {return 0;}
100 void MakeSparseHistograms(){fMakeSparse=kTRUE;}
104 //AliAnalysisEtCuts *fCuts; // keeper of basic cuts
105 Double_t CalculateTransverseEnergy(AliESDCaloCluster *cluster);
107 Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
108 Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
110 Double_t fTotNeutralEt;/** Total neutral Et in the event */
111 Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */
112 Double_t fTotChargedEt;/** Total charged Et in the event */
113 Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
115 Int_t fMultiplicity;/** Multiplicity of particles in the event */
116 Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
117 Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
119 Double_t fBaryonEt; /** Et of identified baryons; calo based (Rec only for now) */
120 Double_t fAntiBaryonEt; /** Et of identified anti-baryons; calo based (Rec only for now) */
121 Double_t fMesonEt; /** Et of identified mesons; calo based (Rec only for now) */
123 Double_t fProtonEt; /** Et of identified protons */
124 Double_t fPionEt; /** Et of identified pions */
125 Double_t fChargedKaonEt; /** Et of identified charged kaons */
126 Double_t fMuonEt; /** Et of identified muons */
127 Double_t fElectronEt; /** Et of identified electrons */
128 Double_t fNeutronEt; /** Et of neutrons (MC only for now) */
129 Double_t fAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
130 Double_t fGammaEt; /** Et of identified electrons (MC only for now) */
132 Double_t fProtonEtAcc; /** Et of identified protons in calorimeter acceptance */
133 Double_t fPionEtAcc; /** Et of identified pions in calorimeter acceptance */
134 Double_t fChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */
135 Double_t fMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
136 Double_t fElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
138 Float_t fEnergyDeposited; /** Energy deposited in calorimeter */
139 Float_t fEnergyTPC; /** Energy measured in TPC */
140 Short_t fCharge; /** Charge of the particle */
141 Short_t fParticlePid; /** Particle PID */
142 Float_t fPidProb; /** Probability of PID */
143 Bool_t fTrackPassedCut; /** The track is accepted by ESDTrackCuts */
145 Int_t fCentClass; // centrality class
147 Double_t fEtaCut;/** Cut in eta (standard |eta| < 0.5 )*/
149 /** Eta cut for our acceptance */
150 Double_t fEtaCutAcc; // Eta cut for our acceptance
152 /** Min phi cut for our acceptance in radians */
153 Double_t fPhiCutAccMin; // Min phi cut for our acceptance in radians
155 /** Max phi cut for our acceptance in radians */
156 Double_t fPhiCutAccMax; // Max phi cut for our acceptance in radians
158 /** Detector radius */
159 Double_t fDetectorRadius; // Detector radius
161 /** Cut on the cluster energy */
162 Double_t fClusterEnergyCut; // Cut on the cluster energy
164 /** Minimum energy to cut on single cell cluster */
165 Double_t fSingleCellEnergyCut; // Minimum energy to cut on single cell cluster
167 Double_t fTrackDistanceCut; // cut on track distance
169 Double_t fTrackDxCut; // cut on track distance in x
171 Double_t fTrackDzCut; // cut on track distance in z
174 // Declare the histograms
176 /** The full Et spectrum measured */
177 TH1F *fHistEt; //Et spectrum
179 /** The full charged Et spectrum measured */
180 TH1F *fHistChargedEt; //Charged Et spectrum
182 /** The full neutral Et spectrum measured */
183 TH1F *fHistNeutralEt; //Neutral Et spectrum
185 /** The Et spectrum within the calorimeter acceptance */
186 TH1F *fHistEtAcc; //Et in acceptance
188 /** The charged Et spectrum within the calorimeter acceptance */
189 TH1F *fHistChargedEtAcc; //Charged Et in acceptance
191 /** The neutral Et spectrum within the calorimeter acceptance */
192 TH1F *fHistNeutralEtAcc; //Et in acceptance
194 /** Multiplicity of particles in the events */
195 TH1F *fHistMult; //Multiplicity
197 /** Charged multiplicity of particles in the events */
198 TH1F *fHistChargedMult; //Charged multiplicity
200 /** Neutral multiplicity of particles in the events */
201 TH1F *fHistNeutralMult; //Neutral multiplicity
203 /* Acceptance plots */
204 TH2F *fHistPhivsPtPos; //phi vs pT plot for positive tracks
205 TH2F *fHistPhivsPtNeg; //phi vs pT plot for negative tracks
208 TH1F *fHistBaryonEt; /** Et of identified baryons */
209 TH1F *fHistAntiBaryonEt; /** Et of identified anti-baryons */
210 TH1F *fHistMesonEt; /** Et of identified mesons */
212 TH1F *fHistProtonEt; /** Et of identified protons */
213 TH1F *fHistPionEt; /** Et of identified protons */
214 TH1F *fHistChargedKaonEt; /** Et of identified charged kaons */
215 TH1F *fHistMuonEt; /** Et of identified muons */
216 TH1F *fHistElectronEt; /** Et of identified electrons */
217 TH1F *fHistNeutronEt; /** Et of neutrons (MC only for now) */
218 TH1F *fHistAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
219 TH1F *fHistGammaEt; /** Et of gammas (MC only for now) */
221 TH1F *fHistProtonEtAcc; /** Et of identified protons in calorimeter acceptance */
222 TH1F *fHistPionEtAcc; /** Et of identified protons in calorimeter acceptance */
223 TH1F *fHistChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */
224 TH1F *fHistMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
225 TH1F *fHistElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
227 /* Correction plots */
228 TH1F *fHistTMDeltaR; /* Track matching plots; Rec only for now */
229 TH2F *fHistTMDxDz; /* Track matching plots; Rec only for now */
231 /* Auxiliary Histogram variables */
232 static Float_t fgEtaAxis[17];//bins for eta axis of histograms
233 static Int_t fgnumOfEtaBins;//number of eta bins
234 static Float_t fgPtAxis[117];//bins for pt axis of histograms
235 static Int_t fgNumOfPtBins;//number of pt bins
236 static Float_t fgEAxis[79];//bins for pt axis of histograms
237 static Int_t fgNumOfEBins;//number of pt bins
238 static Float_t fgRAxis[48];//bins for R axis
239 static Int_t fgNumOfRBins;//number of R bins
242 TTree *fTree; // optional TTree
243 TTree *fTreeDeposit; // optional TTree for energy deposit measurements
245 /** Centrality object */
246 AliCentrality *fCentrality; //Centrality object
248 Short_t fDetector; /** Which detector? (-1 -> PHOS, 1 -> EMCAL)*/
250 Bool_t fMakeSparse;//Boolean for whether or not to make sparse histograms
252 THnSparseF *fSparseHistTracks; /** THnSparse histograms */
254 THnSparseF *fSparseHistClusters; /** THnSparse histograms */
256 /** ET sparse valuses */
257 THnSparseF *fSparseHistEt; //!
259 /** Values for sparse hists */
260 Double_t *fSparseTracks; //!
262 /** Values for sparse hists */
263 Double_t *fSparseClusters; //!
265 /** ET sparse valuses */
266 Double_t *fSparseEt; //!
272 //Declare private to avoid compilation warning
273 AliAnalysisEt & operator = (const AliAnalysisEt & g) ;//cpy assignment
274 AliAnalysisEt(const AliAnalysisEt & g) ; // cpy ctor
276 ClassDef(AliAnalysisEt, 1);
279 #endif // ALIANALYSISET_H