]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/totEt/AliAnalysisEt.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / totEt / AliAnalysisEt.h
CommitLineData
4d376d01 1#ifndef ALIANALYSISET_H
2#define ALIANALYSISET_H
a7ae9b24 3//_________________________________________________________________________
cf6522d1 4// Utility Class for transverse energy studies
5// Base class for ESD & MC analysis
6// - reconstruction and MonteCarlo output
7//
8//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
9//_________________________________________________________________________
2fbf38ac 10
7d2d1773 11#include "AliAnalysisEtCommon.h"
f9a4ed81 12#include "THnSparse.h"
ef647350 13#include "AliESDCaloCluster.h"
14#include "AliAnalysisEtCuts.h"
b2c10007 15#include "AliAnalysisEtTrackMatchCorrections.h"
ef647350 16#include <vector>
17#include "Rtypes.h"
2aab9269 18#include "AliAnalysisEtSelector.h"
19#include "AliAnalysisEtSelectorEmcal.h"
20#include "AliAnalysisEtSelectorPhos.h"
2fbf38ac 21
b2c10007 22class AliAnalysisEtRecEffCorrection;
23class AliAnalysisEtTrackMatchCorrections;
ef647350 24class AliAnalysisEtSelector;
25class AliCentrality;
0f97be4c 26class TString;
ce546038 27class TTree;
2fbf38ac 28class TH2F;
29class TH1F;
ef647350 30class TH1I;
2fbf38ac 31class AliVEvent;
32class TList;
0651f6b4 33class TString;
b5821c13 34class AliESDtrackCuts;
4998becf 35class AliAnalysisEtCuts;
f9a4ed81 36class AliESDCaloCluster;
37//class THnSparseD;
9a365626 38class AliPIDResponse;
2fbf38ac 39
7d2d1773 40class AliAnalysisEt : public AliAnalysisEtCommon
2fbf38ac 41{
42public:
ef647350 43
2fbf38ac 44 AliAnalysisEt();
45 virtual ~AliAnalysisEt();
ef647350 46
2fbf38ac 47public:
ef647350 48
2fbf38ac 49 /** Analyse the event! */
f9a4ed81 50
641e1e0c 51 virtual Int_t AnalyseEvent(AliVEvent *event);
2fbf38ac 52
53 /** Fill the objects you want to output, classes which add new histograms should overload this. */
54 virtual void FillOutputList(TList* list);
55
56 /** Initialise the analysis, must be overloaded. */
641e1e0c 57 virtual void Init();
2fbf38ac 58
ef647350 59 /**
60 * Creates the histograms, must be overloaded if you want to add your own.
2fbf38ac 61 * Uses the fHistogramNameSuffix to create proper histogram names
62 */
63 virtual void CreateHistograms();
8ea99ab0 64 virtual void CreateTrees();
f9a4ed81 65 TH2F* CreateEtaEHisto2D(TString name, TString title, TString ztitle);
ef647350 66 TH2F* CreateEtaPtHisto2D(TString name, TString title, TString ztitle);
67 TH2F* CreateEtaEtHisto2D(TString name, TString title, TString ztitle);
68 TH2F* CreateResEHisto2D(TString name, TString title, TString ztitle);
69 TH2F* CreateResPtHisto2D(TString name, TString title, TString ztitle);
01b73fb0 70 THnSparseF* CreateClusterHistoSparse(TString name, TString title);
71 THnSparseF* CreateNeutralPartHistoSparse(TString name, TString title);
72 THnSparseF* CreateChargedPartHistoSparse(TString name, TString title);
ef647350 73
2fbf38ac 74 /** Fills the histograms, must be overloaded if you want to add your own */
75 virtual void FillHistograms();
76
77 /** Reset event specific values (Et etc.) */
78 virtual void ResetEventValues();
99a6613d 79
2fbf38ac 80 /** Total Et in the event (without acceptance cuts) */
ef647350 81 Double_t GetTotEt() const {
82 return fTotEt;
83 }
2fbf38ac 84
ef647350 85 /** Total neutral Et in the event (without acceptance cuts) */
86 Double_t GetTotNeutralEt() const {
87 return fTotNeutralEt;
88 }
2fbf38ac 89
2fbf38ac 90 /** Total charged Et in the event (without acceptance cuts) */
ef647350 91 Double_t GetTotChargedEt() const {
92 return fTotChargedEt;
93 }
2fbf38ac 94
ef647350 95 void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts) {
96 fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;
97 }
2fbf38ac 98
5501aa9c 99 /** Set the centrality object */
ef647350 100 void SetCentralityObject(AliCentrality *cent) {
101 fCentrality = cent;
102 }
103
0ecaf497 104 /** Get min ET correction */
105 Double_t GetMinEtCorrection(Int_t clusterMultiplicity) {
106 return fTmCorrections->GetMinEtCorrection(clusterMultiplicity);
107 }
8529c4c1 108 /** Get contribution from non-removed neutrons */
109 Double_t GetNeutronContribution(Int_t clusterMultiplicity) {
110 return fTmCorrections->GetNeutronCorrection(clusterMultiplicity);
111 }
112 /** Get contribution from non-removed hadrons */
113 Double_t GetHadronContribution(Int_t clusterMultiplicity) {
114 return fTmCorrections->GetHadronCorrection(clusterMultiplicity);
115 }
116 /** Get contribution from non-removed kaons */
117 Double_t GetKaonContribution(Int_t clusterMultiplicity) {
118 return fTmCorrections->GetKaonCorrection(clusterMultiplicity);
119 }//hadron
120 /** Get contribution from non-removed secondarys */
121 Double_t GetSecondaryContribution(Int_t clusterMultiplicity) {
122 return fTmCorrections->GetSecondaryCorrection(clusterMultiplicity);
123 }//hadron
124
0ecaf497 125
f9a4ed81 126 /** Get contribution from non-removed charged particles */
b2c10007 127 Double_t GetChargedContribution(Int_t clusterMultiplicity) {
128 return fTmCorrections->ChargedContr(clusterMultiplicity);
ef647350 129 }
f9a4ed81 130
131 /** Get contribution from non-removed neutral particles */
b2c10007 132 Double_t GetNeutralContribution(Int_t clusterMultiplicity) {
133 return fTmCorrections->NeutralContr(clusterMultiplicity);
ef647350 134 }
135
f9a4ed81 136 /** Get contribution from removed gammas */
b2c10007 137 Double_t GetGammaContribution(Int_t clusterMultiplicity) {
138 return fTmCorrections->GammaContr(clusterMultiplicity);
ef647350 139 }
2fbf38ac 140
ef647350 141 void MakeSparseHistograms() {
142 fMakeSparse=kTRUE;
143 }
144
145 AliAnalysisEtCuts * GetCuts() const { return fCuts; }
177b9454 146 AliAnalysisEtSelector *GetSelector() const {return fSelector;}
b2c10007 147
148
149 // Read in corrections
150 Int_t ReadCorrections(TString filename); // Read in corrections
151
02d47689 152 void SetFsub(Float_t val){fsub=val;};//function for setting fsub for EMCal/PHOS hadronic corrections
6280e578 153 void SetFsubForMeanHadE(Float_t val){fsubmeanhade=val;};//function for setting fsub for EMCal/PHOS hadronic corrections
01b73fb0 154
2fbf38ac 155protected:
2fbf38ac 156
7d2d1773 157 //AliAnalysisEtCuts *fCuts; // keeper of basic cuts
b2c10007 158
159 // Return corrected cluster E_T
31c813d5 160 Double_t CorrectForReconstructionEfficiency(const AliESDCaloCluster &cluster,Int_t cent = 0);
02d47689 161 Double_t CorrectForReconstructionEfficiency(const AliESDCaloCluster &cluster, Float_t eReco,Int_t cent = 0);
b2c10007 162
163 // Track matching (hadrdonic contamination) corrections
164 AliAnalysisEtTrackMatchCorrections *fTmCorrections;
165
166 // Reconstruction efficiency corrections
167 AliAnalysisEtRecEffCorrection *fReCorrections;
f61cec2f 168
66d09764 169 TTree *fEventSummaryTree; //! Contains event level information
cf6522d1 170
66d09764 171 TTree *fAcceptedTree; //! Tree for information about accepted particles
2fbf38ac 172
66d09764 173 TTree *fDepositTree; //! optional TTree for energy deposit measurements
ef647350 174
175 Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
ef647350 176
d9f145e7 177 Double_t fTotEtAcc;/** Total Et in the event (without acceptance cuts) */
178
ef647350 179 Double_t fTotNeutralEt;/** Total neutral Et in the event */
f61cec2f 180
d9f145e7 181 Double_t fTotNeutralEtAcc;/** Total neutral Et in the event */
182
ef647350 183 Double_t fTotChargedEt;/** Total charged Et in the event */
cf6522d1 184
d9f145e7 185 Double_t fTotChargedEtAcc;/** Total charged Et in the event */
186
ef647350 187 Int_t fMultiplicity;/** Multiplicity of particles in the event */
188 Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
cf6522d1 189 Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
ef647350 190
ce546038 191 Double_t fProtonEt; /** Et of identified protons */
f61cec2f 192 Double_t fAntiProtonEt; /** Et of identified protons */
193
43056f1b 194 Double_t fNeutronEt; /** Et of neutrons (MC only for now) */
195 Double_t fAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
f61cec2f 196
197 Double_t fPi0Et; // Et of identified pi0
198 Double_t fPiPlusEt; // Et of identified pi+
199 Double_t fPiMinusEt; // Et of identified pi-
200
201 Double_t fKPlusEt; // Et of identified K+
202 Double_t fKMinusEt; // Et of identified K-
203 Double_t fK0sEt; // Et of identified K0 short
204 Double_t fK0lEt; // Et of identified K0 long
205
206 Double_t fMuMinusEt; // Et of identified mu-
207 Double_t fMuPlusEt; // Et of identified mu+
208
209 Double_t fEMinusEt; // Et of identified e-
210 Double_t fEPlusEt; // Et of identified e+
211
43056f1b 212 Double_t fGammaEt; /** Et of identified electrons (MC only for now) */
ef647350 213
f61cec2f 214 Double_t fProtonRemovedEt; /** Et of identified protons */
215 Double_t fAntiProtonRemovedEt; /** Et of identified protons */
216
217 Double_t fNeutronRemovedEt; /** Et of neutrons (MC only for now) */
218 Double_t fAntiNeutronRemovedEt; /** Et of anti-neutrons (MC only for now) */
219
220 Double_t fPi0RemovedEt; // Removed Et of identified pi0
221 Double_t fPiPlusRemovedEt; // Removed Et of identified pi+
222 Double_t fPiMinusRemovedEt; // Removed Et of identified pi-
223
224 Double_t fKPlusRemovedEt; // Removed Et of identified K+
225 Double_t fKMinusRemovedEt; // Removed Et of identified K-
226 Double_t fK0sRemovedEt; // Removed Et of identified K0 short
227 Double_t fK0lRemovedEt; // Removed Et of identified K0 long
228
229 Double_t fMuMinusRemovedEt; // Removed Et of identified mu-
230 Double_t fMuPlusRemovedEt; // Removed Et of identified mu+
231
232 Double_t fEMinusRemovedEt; // Removed Et of identified e-
233 Double_t fEPlusRemovedEt; // Removed Et of identified e+
234
235 Double_t fGammaRemovedEt; /** Removed Et of identified electrons (MC only for now) */
236
237 Double_t fProtonMult; /** Mult of identified protons */
238 Double_t fAntiProtonMult; /** Mult of identified protons */
239
240 Double_t fNeutronMult; /** Mult of neutrons (MC only for now) */
241 Double_t fAntiNeutronMult; /** Mult of anti-neutrons (MC only for now) */
242
243 Double_t fPi0Mult; // Mult of identified pi0
244 Double_t fPiPlusMult; // Mult of identified pi+
245 Double_t fPiMinusMult; // Mult of identified pi-
246
247 Double_t fKPlusMult; // Mult of identified K+
248 Double_t fKMinusMult; // Mult of identified K-
249 Double_t fK0sMult; // Mult of identified K0 short
250 Double_t fK0lMult; // Mult of identified K0 long
251
252 Double_t fMuMinusMult; // Mult of identified mu-
253 Double_t fMuPlusMult; // Mult of identified mu+
254
255 Double_t fEMinusMult; // Mult of identified e-
256 Double_t fEPlusMult; // Mult of identified e+
257
258 Double_t fGammaMult; /** Mult of identified electrons (MC only for now) */
259
260 Double_t fProtonRemovedMult; /** Mult of identified protons */
261 Double_t fAntiProtonRemovedMult; /** Mult of identified protons */
262
263 Double_t fNeutronRemovedMult; /** Mult of neutrons (MC only for now) */
264 Double_t fAntiNeutronRemovedMult; /** Mult of anti-neutrons (MC only for now) */
265
266 Double_t fPi0RemovedMult; // Removed Mult of identified pi0
267 Double_t fPiPlusRemovedMult; // Removed Mult of identified pi+
268 Double_t fPiMinusRemovedMult; // Removed Mult of identified pi-
269
270 Double_t fKPlusRemovedMult; // Removed Mult of identified K+
271 Double_t fKMinusRemovedMult; // Removed Mult of identified K-
272 Double_t fK0sRemovedMult; // Removed Mult of identified K0 short
273 Double_t fK0lRemovedMult; // Removed Mult of identified K0 long
274
275 Double_t fMuMinusRemovedMult; // Removed Mult of identified mu-
276 Double_t fMuPlusRemovedMult; // Removed Mult of identified mu+
277
278 Double_t fEMinusRemovedMult; // Removed Mult of identified e-
279 Double_t fEPlusRemovedMult; // Removed Mult of identified e+
280
281 Double_t fGammaRemovedMult; /** Removed Mult of identified electrons (MC only for now) */
ef647350 282
8ea99ab0 283 Float_t fEnergyDeposited; /** Energy deposited in calorimeter */
f61cec2f 284 Float_t fMomentumTPC; /** Momentum measured in TPC */
8ea99ab0 285 Short_t fCharge; /** Charge of the particle */
286 Short_t fParticlePid; /** Particle PID */
287 Float_t fPidProb; /** Probability of PID */
288 Bool_t fTrackPassedCut; /** The track is accepted by ESDTrackCuts */
f9a4ed81 289
3825c7d6 290 Int_t fCentClass; // centrality class
ef647350 291
43056f1b 292 /** Detector radius */
ef647350 293 Double_t fDetectorRadius; // Detector radius
294
43056f1b 295 /** Minimum energy to cut on single cell cluster */
296 Double_t fSingleCellEnergyCut; // Minimum energy to cut on single cell cluster
ef647350 297
4d376d01 298 Double_t fChargedEnergyRemoved; // Charged energy removed
299 Double_t fNeutralEnergyRemoved; // Neutral energy removed
300 Double_t fGammaEnergyAdded; // gamma energy added
4998becf 301
2fbf38ac 302 // Declare the histograms
303
f61cec2f 304 /** The EM Et spectrum measured */
66d09764 305 TH1F *fHistEt; //!Et spectrum
2fbf38ac 306
f61cec2f 307 /** Multiplicity of neutral particles in the events */
66d09764 308 TH1F *fHistNeutralMult; //!Multiplicity
2fbf38ac 309
f61cec2f 310 // Acceptance plots
66d09764 311 TH2F *fHistPhivsPtPos; //!phi vs pT plot for positive tracks
312 TH2F *fHistPhivsPtNeg; //!phi vs pT plot for negative tracks
2fbf38ac 313
f9a4ed81 314 /* Auxiliary Histogram variables */
315 static Float_t fgEtaAxis[17];//bins for eta axis of histograms
0651f6b4 316 static Int_t fgnumOfEtaBins;//number of eta bins
1423b942 317 static Float_t fgPtAxis[117];//bins for pt axis of histograms
318 static Int_t fgNumOfPtBins;//number of pt bins
0651f6b4 319 static Float_t fgEAxis[79];//bins for pt axis of histograms
320 static Int_t fgNumOfEBins;//number of pt bins
1423b942 321 static Float_t fgRAxis[48];//bins for R axis
322 static Int_t fgNumOfRBins;//number of R bins
ef647350 323
ef647350 324 /** Centrality object */
66d09764 325 AliCentrality *fCentrality; //!Centrality object
ef647350 326
01b73fb0 327 Bool_t fMakeSparse;//Boolean for whether or not to make sparse histograms
ef647350 328
66d09764 329 TH1I *fCutFlow; //! Cut flow
f9a4ed81 330
c07d3175 331 AliAnalysisEtSelector *fSelector; // Selector class
b5821c13 332
c07d3175 333 AliPIDResponse *fPIDResponse;//
9a365626 334
02d47689 335 Float_t fsub;
6280e578 336 Float_t fsubmeanhade;
02d47689 337
338
9a365626 339
4998becf 340private:
b2c10007 341
342
343
4998becf 344 //Declare private to avoid compilation warning
345 AliAnalysisEt & operator = (const AliAnalysisEt & g) ;//cpy assignment
346 AliAnalysisEt(const AliAnalysisEt & g) ; // cpy ctor
347
f61cec2f 348 ClassDef(AliAnalysisEt, 3);
2fbf38ac 349};
350
351#endif // ALIANALYSISET_H