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