Corrections implemented into AliAnalysisHadEtReconstructed, simulated hadronic and...
[u/mrichter/AliRoot.git] / PWG4 / totEt / AliAnalysisHadEt.h
CommitLineData
cf6522d1 1//_________________________________________________________________________
2//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
641e1e0c 3//University of Tennessee at Knoxville
cf6522d1 4//
5// This class is designed for the analysis of the hadronic component of
6// transverse energy. It is used by AliAnalysisTaskHadEt.
7//_________________________________________________________________________
641e1e0c 8#ifndef ALIANALYSISHADET_H
9#define ALIANALYSISHADET_H
10
11#include "TString.h"
641e1e0c 12
13class TH2F;
14class TH1F;
15class AliVEvent;
16class TList;
020abff0 17class AliESDtrackCuts;
18class Rtypes;
19class TParticle;
20class TDatabasePDG;
4998becf 21class AliAnalysisEtCuts;
641e1e0c 22
23class AliAnalysisHadEt
24{
25public:
26
27 AliAnalysisHadEt();
28 virtual ~AliAnalysisHadEt();
29
30 /** Analyse the event! */
31 virtual Int_t AnalyseEvent(AliVEvent *event);
32
33 /** Fill the objects you want to output, classes which add new histograms should overload this. */
34 virtual void FillOutputList();
35
36 /** Initialise the analysis, must be overloaded. */
37 virtual void Init();
38
39 /**
40 * Creates the histograms, must be overloaded if you want to add your own.
41 * Uses the fHistogramNameSuffix to create proper histogram names
42 */
43 virtual void CreateHistograms();
44
45 /** Fills the histograms, must be overloaded if you want to add your own */
46 virtual void FillHistograms();
47
48 /** Reset event specific values (Et etc.) */
49 virtual void ResetEventValues();
4998becf 50
51 /** Set Particle codes/mass */
52 virtual void SetParticleCodes();
53
54 /** Cuts info */
55 AliAnalysisEtCuts * GetCuts() const { return fCuts; }
56 virtual void SetCuts(const AliAnalysisEtCuts *cuts)
57 { fCuts = (AliAnalysisEtCuts *) cuts; }
641e1e0c 58
59 /** Sum of the total Et for all events */
020abff0 60 Double_t GetSumEt() const { return fSumEt; }
641e1e0c 61
62 /** Sum of the total Et within our acceptance for all events */
020abff0 63 Double_t GetSumEtAcc() const { return fSumEtAcc; }
641e1e0c 64
65 /** Total Et in the event (without acceptance cuts) */
020abff0 66 Double_t GetTotEt() const { return fTotEt; }
641e1e0c 67
68 /** Total Et in the event within the acceptance cuts */
020abff0 69 Double_t GetTotEtAcc() const { return fTotEtAcc; }
641e1e0c 70
71 /** Total neutral Et in the event (without acceptance cuts) */
020abff0 72 Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
641e1e0c 73
74 /** Total neutral Et in the event within the acceptance cuts */
020abff0 75 Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
641e1e0c 76
77 /** Total charged Et in the event (without acceptance cuts) */
020abff0 78 Double_t GetTotChargedEt() const { return fTotChargedEt; }
641e1e0c 79
80 /** Total charged Et in the event within the acceptance cuts */
020abff0 81 Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
641e1e0c 82
83
cf6522d1 84 void SetHistoList(const TList *mylist){fhistoList = (TList *) mylist;}
641e1e0c 85
cf6522d1 86 void SetTPCITSTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsITSTPC = (AliESDtrackCuts *) cuts;}
87 void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;}
88 void SetITSTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsITS = (AliESDtrackCuts *) cuts;}
641e1e0c 89
cf6522d1 90protected:
020abff0 91
92 TString fHistogramNameSuffix; /** The suffix for the histogram names */
641e1e0c 93
4998becf 94 AliAnalysisEtCuts *fCuts; // keeper of basic cuts
95
641e1e0c 96 /** PDG Database */
020abff0 97 TDatabasePDG *fPdgDB;//data base used for looking up pdg codes
98 //these codes are stored as variables because otherwise there were issues using this with the plugin
99 Int_t fPiPlusCode;//pdg pi plus code
100 Int_t fPiMinusCode;//pdg pi minus code
101 Int_t fKPlusCode;// pdg k plus code
102 Int_t fKMinusCode;//pdg k minus code
103 Int_t fProtonCode;//pdg proton code
104 Int_t fAntiProtonCode;//pdg antiproton code
105 Int_t fLambdaCode;// pdg lambda code
106 Int_t fAntiLambdaCode;//pdg antilambda code
107 Int_t fK0SCode;//pdg k0 short code
108 Int_t fOmegaCode;//pdg omega code
109 Int_t fAntiOmegaCode;//pdg anti-omega code
110 Int_t fXi0Code;//pdg xi-0 code
111 Int_t fAntiXi0Code;//pdg anti-xi0 code
112 Int_t fXiCode;//pdg xi code
113 Int_t fAntiXiCode;//pdg anti-xi code
114 Int_t fSigmaCode;//pdg sigma code
115 Int_t fAntiSigmaCode;//pdg anti-sigma code
116 Int_t fK0LCode;//pdg k0 long code
117 Int_t fNeutronCode;//pdg neutron code
118 Int_t fAntiNeutronCode;//pdg anti-neutron code
119 Int_t fEPlusCode;//pdg positron code
120 Int_t fEMinusCode;//pdg electron code
f427cbed 121 Int_t fGammaCode;//pdg gamma code
122 Int_t fPi0Code;//pdg neutral pion code
123 Int_t fEtaCode;//pdg eta code
b64de20c 124 Int_t fOmega0Code;//pdg eta code
020abff0 125 Float_t fPionMass;//pdg pion mass
3ce6b879 126 Float_t fKaonMass;//pdg kaon mass
127 Float_t fProtonMass;//pdg proton mass
128 Float_t fElectronMass;//pdg electron mass
641e1e0c 129
020abff0 130
131 Double_t fSumEt;/** Sum of the total Et for all events */
020abff0 132 Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */
020abff0 133 Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
020abff0 134 Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
135
136 Double_t fTotNeutralEt;/** Total neutral Et in the event */
020abff0 137 Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */
020abff0 138 Double_t fTotChargedEt;/** Total charged Et in the event */
020abff0 139 Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
140
141 Int_t fMultiplicity;/** Multiplicity of particles in the event */
020abff0 142 Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
020abff0 143 Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
144
641e1e0c 145 void CreateEtaPtHisto2D(TString name, TString title);
146 void CreateEtaHisto1D(TString name, TString title);
147 void CreateHisto2D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Float_t xlow,Float_t xhigh,Int_t ybins,Float_t ylow,Float_t yhigh);
148 void CreateHisto1D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Float_t xlow,Float_t xhigh);
149 void CreateIntHisto1D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Int_t xlow,Int_t xhigh);
150 void CreateIntHisto2D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Int_t xlow,Int_t xhigh,Int_t ybins,Int_t ylow,Int_t yhigh);
151 void FillHisto1D(TString histname, Float_t x, Float_t weight);
152 void FillHisto2D(TString histname, Float_t x, Float_t y, Float_t weight);
153
154 Float_t Et(TParticle *part, float mass = -1000);
3ce6b879 155 Float_t Et(Float_t p, Float_t theta, Int_t pid, Short_t charge);
cf6522d1 156 AliESDtrackCuts* fEsdtrackCutsITSTPC;//esd track cuts for ITS+TPC tracks
157 AliESDtrackCuts* fEsdtrackCutsTPC;//esd track cuts for TPC tracks (which may also contain ITS hits)
158 AliESDtrackCuts* fEsdtrackCutsITS;//esd track cuts for ITS stand alone tracks
020abff0 159
160 TList *fhistoList;//list of histograms saved out to file
161 static Float_t fgEtaAxis[47];//bins for eta axis of histograms
162 static Int_t fgnumOfEtaBins;//number of eta bins
163 static Float_t fgPtAxis[117];//bins for pt axis of histograms
164 static Int_t fgNumOfPtBins;//number of pt bins
d6214a64 165 static Float_t fgPtTPCCutOff;//cut off for tracks in TPC
166 static Float_t fgPtITSCutOff;//cut off for tracks in ITS
641e1e0c 167
3ce6b879 168
169
641e1e0c 170 private:
4998becf 171 //Declare it private to avoid compilation warning
172 AliAnalysisHadEt & operator = (const AliAnalysisHadEt & g) ;//cpy assignment
173 AliAnalysisHadEt(const AliAnalysisHadEt & g) ; // cpy ctor
641e1e0c 174
e573e46d 175 ClassDef(AliAnalysisHadEt, 1);
641e1e0c 176};
177
178#endif // ALIANALYSISHADET_H