]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/totEt/AliAnalysisEt.h
Adding common base class for AliAnalysisEt and AliAnalysisHadEt so we are not repeati...
[u/mrichter/AliRoot.git] / PWG4 / totEt / AliAnalysisEt.h
1 #ifndef ALIANALYSISET_H
2 #define ALIANALYSISET_H
3 //_________________________________________________________________________
4 //  Utility Class for transverse energy studies
5 //  Base class for ESD & MC analysis
6 //  - reconstruction and MonteCarlo output
7 //
8 //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
9 //_________________________________________________________________________
10
11 #include "TString.h"
12 #include "AliAnalysisEtCommon.h"
13
14 class TTree;
15 class TH2F;
16 class TH1F;
17 class AliVEvent;
18 class TList;
19 class AliESDtrackCuts;
20 class Rtypes;
21 class AliAnalysisEtCuts;
22
23 class AliAnalysisEt : public AliAnalysisEtCommon
24 {
25 public:
26    
27     AliAnalysisEt();
28     virtual ~AliAnalysisEt();
29   
30 public:
31   
32     /** Analyse the event! */
33     virtual Int_t AnalyseEvent(AliVEvent *event);
34
35     /** Fill the objects you want to output, classes which add new histograms should overload this. */
36     virtual void FillOutputList(TList* list);
37
38     /** Initialise the analysis, must be overloaded. */
39     virtual void Init();
40
41     /** 
42     * Creates the histograms, must be overloaded if you want to add your own. 
43     * Uses the fHistogramNameSuffix to create proper histogram names
44     */
45     virtual void CreateHistograms();
46     virtual void CreateTrees();
47     
48     /** Fills the histograms, must be overloaded if you want to add your own */
49     virtual void FillHistograms();
50
51     /** Reset event specific values (Et etc.) */
52     virtual void ResetEventValues();
53
54     
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     void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;}
75
76 protected:
77        
78     TString fHistogramNameSuffix; /** The suffix for the histogram names */
79
80     //AliAnalysisEtCuts *fCuts; // keeper of basic cuts
81
82
83     Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */    
84     Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
85     
86     Double_t fTotNeutralEt;/** Total neutral Et in the event */    
87     Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */    
88     Double_t fTotChargedEt;/** Total charged Et in the event */    
89     Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
90
91     Int_t fMultiplicity;/** Multiplicity of particles in the event */    
92     Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */    
93     Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
94     
95     Double_t fBaryonEt;     /** Et of identified baryons; calo based (Rec only for now) */    
96     Double_t fAntiBaryonEt; /** Et of identified anti-baryons; calo based (Rec only for now) */
97     Double_t fMesonEt;     /** Et of identified mesons; calo based (Rec only for now) */
98
99     Double_t fProtonEt; /** Et of identified protons */
100     Double_t fPionEt; /** Et of identified pions */
101     Double_t fChargedKaonEt; /** Et of identified charged kaons */
102     Double_t fMuonEt; /** Et of identified muons */
103     Double_t fElectronEt; /** Et of identified electrons */
104     Double_t fNeutronEt; /** Et of neutrons (MC only for now) */
105     Double_t fAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
106     Double_t fGammaEt; /** Et of identified electrons (MC only for now) */
107    
108     Double_t fProtonEtAcc; /** Et of identified protons in calorimeter acceptance */    
109     Double_t fPionEtAcc; /** Et of identified pions in calorimeter acceptance */    
110     Double_t fChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */    
111     Double_t fMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
112     Double_t fElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
113     
114     Float_t fEnergyDeposited; /** Energy deposited in calorimeter */
115     Float_t fEnergyTPC; /** Energy measured in TPC */
116     Short_t fCharge; /** Charge of the particle */
117     Short_t fParticlePid; /** Particle PID */
118     Float_t fPidProb; /** Probability of PID */
119     Bool_t fTrackPassedCut; /** The track is accepted by ESDTrackCuts */
120    
121         
122     Double_t fEtaCut;/** Cut in eta (standard |eta| < 0.5 )*/
123
124     /** Eta cut for our acceptance */
125     Double_t fEtaCutAcc; // Eta cut for our acceptance
126     
127     /** Min phi cut for our acceptance in radians */    
128     Double_t fPhiCutAccMin; // Min phi cut for our acceptance in radians     
129     
130     /** Max phi cut for our acceptance in radians */
131     Double_t fPhiCutAccMax; // Max phi cut for our acceptance in radians 
132     
133     /** Detector radius */
134     Double_t fDetectorRadius; // Detector radius 
135     
136     /** Cut on the cluster energy */    
137     Double_t fClusterEnergyCut; // Cut on the cluster energy 
138     
139     /** Minimum energy to cut on single cell cluster */
140     Double_t fSingleCellEnergyCut;  // Minimum energy to cut on single cell cluster
141
142     // Declare the histograms
143
144     /** The full Et spectrum measured */
145     TH1F *fHistEt; //Et spectrum
146
147     /** The full charged Et spectrum measured */
148     TH1F *fHistChargedEt; //Charged Et spectrum 
149
150     /** The full neutral Et spectrum measured */
151     TH1F *fHistNeutralEt; //Neutral Et spectrum
152
153     /** The Et spectrum within the calorimeter acceptance */
154     TH1F *fHistEtAcc; //Et in acceptance
155
156     /** The charged Et spectrum within the calorimeter acceptance */
157     TH1F *fHistChargedEtAcc; //Charged Et in acceptance
158
159     /** The neutral Et spectrum within the calorimeter acceptance */
160     TH1F *fHistNeutralEtAcc; //Et in acceptance
161
162     /** Multiplicity of particles in the events */
163     TH1F *fHistMult; //Multiplicity
164
165     /** Charged multiplicity of particles in the events */
166     TH1F *fHistChargedMult; //Charged multiplicity
167
168     /** Neutral multiplicity of particles in the events */
169     TH1F *fHistNeutralMult; //Neutral multiplicity
170
171     /* Acceptance plots */
172     TH2F *fHistPhivsPtPos; //phi vs pT plot for positive tracks
173     TH2F *fHistPhivsPtNeg; //phi vs pT plot for negative tracks
174
175     /* PID plots */
176     TH1F *fHistBaryonEt; /** Et of identified baryons */    
177     TH1F *fHistAntiBaryonEt; /** Et of identified anti-baryons */
178     TH1F *fHistMesonEt; /** Et of identified mesons */
179
180     TH1F *fHistProtonEt; /** Et of identified protons */
181     TH1F *fHistPionEt; /** Et of identified protons */
182     TH1F *fHistChargedKaonEt; /** Et of identified charged kaons */
183     TH1F *fHistMuonEt; /** Et of identified muons */
184     TH1F *fHistElectronEt; /** Et of identified electrons */
185     TH1F *fHistNeutronEt; /** Et of neutrons (MC only for now) */
186     TH1F *fHistAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
187     TH1F *fHistGammaEt; /** Et of gammas (MC only for now) */
188     
189     TH1F *fHistProtonEtAcc; /** Et of identified protons in calorimeter acceptance */    
190     TH1F *fHistPionEtAcc; /** Et of identified protons in calorimeter acceptance */    
191     TH1F *fHistChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */    
192     TH1F *fHistMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
193     TH1F *fHistElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
194     
195     /* Correction plots */
196     TH1F *fHistTMDeltaR; /* Track matching plots; Rec only for now */
197
198     TTree *fTree; // optional TTree
199     TTree *fTreeDeposit; // optional TTree for energy deposit measurements
200
201
202 private:
203     //Declare private to avoid compilation warning
204     AliAnalysisEt & operator = (const AliAnalysisEt & g) ;//cpy assignment
205     AliAnalysisEt(const AliAnalysisEt & g) ; // cpy ctor
206
207     ClassDef(AliAnalysisEt, 1);
208 };
209
210 #endif // ALIANALYSISET_H