1 //_________________________________________________________________________
2 //Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
3 //University of Tennessee at Knoxville
5 // This class is designed for the analysis of the hadronic component of
6 // transverse energy. It is used by AliAnalysisTaskHadEt.
7 //_________________________________________________________________________
8 #ifndef ALIANALYSISHADET_H
9 #define ALIANALYSISHADET_H
17 class AliESDtrackCuts;
21 class AliAnalysisEtCuts;
23 class AliAnalysisHadEt
28 virtual ~AliAnalysisHadEt();
30 /** Analyse the event! */
31 virtual Int_t AnalyseEvent(AliVEvent *event);
33 /** Fill the objects you want to output, classes which add new histograms should overload this. */
34 virtual void FillOutputList();
36 /** Initialise the analysis, must be overloaded. */
40 * Creates the histograms, must be overloaded if you want to add your own.
41 * Uses the fHistogramNameSuffix to create proper histogram names
43 virtual void CreateHistograms();
45 /** Fills the histograms, must be overloaded if you want to add your own */
46 virtual void FillHistograms();
48 /** Reset event specific values (Et etc.) */
49 virtual void ResetEventValues();
51 /** Set Particle codes/mass */
52 virtual void SetParticleCodes();
55 AliAnalysisEtCuts * GetCuts() const { return fCuts; }
56 virtual void SetCuts(const AliAnalysisEtCuts *cuts)
57 { fCuts = (AliAnalysisEtCuts *) cuts; }
59 /** Sum of the total Et for all events */
60 Double_t GetSumEt() const { return fSumEt; }
62 /** Sum of the total Et within our acceptance for all events */
63 Double_t GetSumEtAcc() const { return fSumEtAcc; }
65 /** Total Et in the event (without acceptance cuts) */
66 Double_t GetTotEt() const { return fTotEt; }
68 /** Total Et in the event within the acceptance cuts */
69 Double_t GetTotEtAcc() const { return fTotEtAcc; }
71 /** Total neutral Et in the event (without acceptance cuts) */
72 Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
74 /** Total neutral Et in the event within the acceptance cuts */
75 Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
77 /** Total charged Et in the event (without acceptance cuts) */
78 Double_t GetTotChargedEt() const { return fTotChargedEt; }
80 /** Total charged Et in the event within the acceptance cuts */
81 Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
84 void SetHistoList(const TList *mylist){fhistoList = (TList *) mylist;}
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;}
92 TString fHistogramNameSuffix; /** The suffix for the histogram names */
94 AliAnalysisEtCuts *fCuts; // keeper of basic cuts
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 static Int_t fgPiPlusCode;//pdg pi plus code
100 static Int_t fgPiMinusCode;//pdg pi minus code
101 static Int_t fgKPlusCode;// pdg k plus code
102 static Int_t fgKMinusCode;//pdg k minus code
103 static Int_t fgProtonCode;//pdg proton code
104 static Int_t fgAntiProtonCode;//pdg antiproton code
105 static Int_t fgLambdaCode;// pdg lambda code
106 static Int_t fgAntiLambdaCode;//pdg antilambda code
107 static Int_t fgK0SCode;//pdg k0 short code
108 static Int_t fgOmegaCode;//pdg omega code
109 static Int_t fgAntiOmegaCode;//pdg anti-omega code
110 static Int_t fgXi0Code;//pdg xi-0 code
111 static Int_t fgAntiXi0Code;//pdg anti-xi0 code
112 static Int_t fgXiCode;//pdg xi code
113 static Int_t fgAntiXiCode;//pdg anti-xi code
114 static Int_t fgSigmaCode;//pdg sigma code
115 static Int_t fgAntiSigmaCode;//pdg anti-sigma code
116 static Int_t fgK0LCode;//pdg k0 long code
117 static Int_t fgNeutronCode;//pdg neutron code
118 static Int_t fgAntiNeutronCode;//pdg anti-neutron code
119 static Int_t fgEPlusCode;//pdg positron code
120 static Int_t fgEMinusCode;//pdg electron code
121 static Int_t fgGammaCode;//pdg gamma code
122 static Int_t fgPi0Code;//pdg neutral pion code
123 static Int_t fgEtaCode;//pdg eta code
124 static Int_t fgOmega0Code;//pdg eta code
125 static Float_t fgPionMass;//pdg pion mass
126 static Float_t fgKaonMass;//pdg kaon mass
127 static Float_t fgProtonMass;//pdg proton mass
128 static Float_t fgElectronMass;//pdg electron mass
131 Double_t fSumEt;/** Sum of the total Et for all events */
132 Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */
133 Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
134 Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
136 Double_t fTotNeutralEt;/** Total neutral Et in the event */
137 Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */
138 Double_t fTotChargedEt;/** Total charged Et in the event */
139 Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
141 Int_t fMultiplicity;/** Multiplicity of particles in the event */
142 Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
143 Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
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);
154 Float_t Et(TParticle *part, float mass = -1000);
155 Float_t Et(Float_t p, Float_t theta, Int_t pid, Short_t charge) const;
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
160 TList *fhistoList;//list of histograms saved out to file
161 //static Float_t fgEtaAxis[47];//bins for eta axis of histograms
162 static Float_t fgEtaAxis[17];//bins for eta axis of histograms
163 static Int_t fgnumOfEtaBins;//number of eta bins
164 static Float_t fgPtAxis[117];//bins for pt axis of histograms
165 static Int_t fgNumOfPtBins;//number of pt bins
166 static Float_t fgPtTPCCutOff;//cut off for tracks in TPC
167 static Float_t fgPtITSCutOff;//cut off for tracks in ITS
172 //Declare it private to avoid compilation warning
173 AliAnalysisHadEt & operator = (const AliAnalysisHadEt & g) ;//cpy assignment
174 AliAnalysisHadEt(const AliAnalysisHadEt & g) ; // cpy ctor
176 ClassDef(AliAnalysisHadEt, 1);
179 #endif // ALIANALYSISHADET_H