]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/totEt/AliAnalysisHadEt.h
Correcting coding violations in HadEt classes, adding container class for hadronic...
[u/mrichter/AliRoot.git] / PWG4 / totEt / AliAnalysisHadEt.h
1 //Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
2 //University of Tennessee at Knoxville
3 //This class is designed for the analysis of the hadronic component of transverse energy.  It is used by AliAnalysisTaskHadEt.
4 #ifndef ALIANALYSISHADET_H
5 #define ALIANALYSISHADET_H
6
7 #include "TString.h"
8
9 class TH2F;
10 class TH1F;
11 class AliVEvent;
12 class TList;
13 class AliESDtrackCuts;
14 class Rtypes;
15 class TParticle;
16 class TDatabasePDG;
17
18 class AliAnalysisHadEt
19 {
20 public:
21    
22   AliAnalysisHadEt();
23     virtual ~AliAnalysisHadEt();
24
25     /** Analyse the event! */
26     virtual Int_t AnalyseEvent(AliVEvent *event);
27
28     /** Fill the objects you want to output, classes which add new histograms should overload this. */
29     virtual void FillOutputList();
30
31     /** Initialise the analysis, must be overloaded. */
32     virtual void Init();
33
34     /** 
35     * Creates the histograms, must be overloaded if you want to add your own. 
36     * Uses the fHistogramNameSuffix to create proper histogram names
37     */
38     virtual void CreateHistograms();
39     
40     /** Fills the histograms, must be overloaded if you want to add your own */
41     virtual void FillHistograms();
42
43     /** Reset event specific values (Et etc.) */
44     virtual void ResetEventValues();
45     
46     /** Sum of the total Et for all events */
47     Double_t GetSumEt() const { return fSumEt; }
48
49     /** Sum of the total Et within our acceptance for all events */
50     Double_t GetSumEtAcc() const { return fSumEtAcc; }
51
52     /** Total Et in the event (without acceptance cuts) */
53     Double_t GetTotEt() const { return fTotEt; }
54
55     /** Total Et in the event within the acceptance cuts */
56     Double_t GetTotEtAcc() const { return fTotEtAcc; }
57
58    /** Total neutral Et in the event (without acceptance cuts) */
59     Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
60
61     /** Total neutral Et in the event within the acceptance cuts */
62     Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
63     
64     /** Total charged Et in the event (without acceptance cuts) */
65     Double_t GetTotChargedEt() const { return fTotChargedEt; }
66
67     /** Total charged Et in the event within the acceptance cuts */
68     Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
69
70
71     void SetHistoList(TList *mylist){fhistoList = mylist;}
72
73     void SetTPCITSTrackCuts(AliESDtrackCuts *cuts){ ffesdtrackCutsITSTPC = cuts;}
74     void SetTPCOnlyTrackCuts(AliESDtrackCuts *cuts){ fesdtrackCutsTPC = cuts;}
75     void SetITSTrackCuts(AliESDtrackCuts *cuts){ fesdtrackCutsITS = cuts;}
76
77 protected:
78    
79     
80     TString fHistogramNameSuffix; /** The suffix for the histogram names */
81
82     /** PDG Database */
83     TDatabasePDG *fPdgDB;//data base used for looking up pdg codes
84     //these codes are stored as variables because otherwise there were issues using this with the plugin
85     Int_t fPiPlusCode;//pdg pi plus code
86     Int_t fPiMinusCode;//pdg pi minus code
87     Int_t fKPlusCode;// pdg k plus code
88     Int_t fKMinusCode;//pdg k minus code
89     Int_t fProtonCode;//pdg proton code
90     Int_t fAntiProtonCode;//pdg antiproton code
91     Int_t fLambdaCode;// pdg lambda code
92     Int_t fAntiLambdaCode;//pdg antilambda code
93     Int_t fK0SCode;//pdg k0 short code
94     Int_t fOmegaCode;//pdg omega code
95     Int_t fAntiOmegaCode;//pdg anti-omega code
96     Int_t fXi0Code;//pdg xi-0 code
97     Int_t fAntiXi0Code;//pdg anti-xi0 code
98     Int_t fXiCode;//pdg xi code
99     Int_t fAntiXiCode;//pdg anti-xi code
100     Int_t fSigmaCode;//pdg sigma code
101     Int_t fAntiSigmaCode;//pdg anti-sigma code
102     Int_t fK0LCode;//pdg k0 long code
103     Int_t fNeutronCode;//pdg neutron code
104     Int_t fAntiNeutronCode;//pdg anti-neutron code
105     Int_t fEPlusCode;//pdg positron code
106     Int_t fEMinusCode;//pdg electron code
107     Float_t fPionMass;//pdg pion mass
108
109     
110     Double_t fSumEt;/** Sum of the total Et for all events */
111
112     Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */
113
114     
115     Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
116     
117     Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
118     
119     Double_t fTotNeutralEt;/** Total neutral Et in the event */
120     
121     Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */
122     
123     Double_t fTotChargedEt;/** Total charged Et in the event */
124     
125     Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
126
127     Int_t fMultiplicity;/** Multiplicity of particles in the event */
128     
129     Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
130     
131     Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
132         
133     Double_t fEtaCut;/** Cut in eta ( normally |eta| < 0.5 */
134
135     Double_t fEtaCutAcc;/** Eta cut for our acceptance */
136
137     Double_t fVertexXCut;/** Vertex cuts x direction */
138     Double_t fVertexYCut;/** Vertex cuts y direction*/
139     Double_t fVertexZCut;/** Vertex cuts z direction*/
140
141     Double_t fIPxyCut;    /** Impact parameter cuts x-y plane*/
142     Double_t fIPzCut;    /** Impact parameter cuts z*/
143
144
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);
155     AliESDtrackCuts* ffesdtrackCutsITSTPC;//esd track cuts for ITS+TPC tracks
156     AliESDtrackCuts* fesdtrackCutsTPC;//esd track cuts for TPC tracks (which may also contain ITS hits)
157     AliESDtrackCuts* fesdtrackCutsITS;//esd track cuts for ITS stand alone tracks
158
159     TList *fhistoList;//list of histograms saved out to file
160     static Float_t fgEtaAxis[47];//bins for eta axis of histograms
161     static Int_t fgnumOfEtaBins;//number of eta bins
162     static Float_t fgPtAxis[117];//bins for pt axis of histograms
163     static Int_t fgNumOfPtBins;//number of pt bins
164     
165
166  private:
167
168 private:
169   //Declare it private to avoid compilation warning
170   AliAnalysisHadEt & operator = (const AliAnalysisHadEt & g) ;//cpy assignment
171   AliAnalysisHadEt(const AliAnalysisHadEt & g) ; // cpy ctor
172
173     ClassDef(AliAnalysisHadEt, 0);
174 };
175
176 #endif // ALIANALYSISHADET_H