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 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
121 Int_t fGammaCode;//pdg gamma code
122 Int_t fPi0Code;//pdg neutral pion code
123 Int_t fEtaCode;//pdg eta code
124 Int_t fOmega0Code;//pdg eta code
125 Float_t fPionMass;//pdg pion mass
126 Float_t fKaonMass;//pdg kaon mass
127 Float_t fProtonMass;//pdg proton mass
128 Float_t fElectronMass;//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);
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 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
169 //Declare it private to avoid compilation warning
170 AliAnalysisHadEt & operator = (const AliAnalysisHadEt & g) ;//cpy assignment
171 AliAnalysisHadEt(const AliAnalysisHadEt & g) ; // cpy ctor
173 ClassDef(AliAnalysisHadEt, 1);
176 #endif // ALIANALYSISHADET_H