]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/totEt/AliAnalysisEt.h
totEt cuts into their own proper class
[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
13 class TH2F;
14 class TH1F;
15 class AliVEvent;
16 class TList;
17 class Rtypes;
18 class TDatabasePDG;
19 class AliAnalysisEtCuts;
20
21 class AliAnalysisEt
22 {
23 public:
24    
25     AliAnalysisEt();
26     virtual ~AliAnalysisEt();
27   
28 public:
29   
30     /** Analyse the event! */
31     virtual Int_t AnalyseEvent(AliVEvent *event);
32
33     /** Fill the objects you want to output, classes which add new histograms should overload this. */
34     virtual void FillOutputList(TList* list);
35
36     /** Initialise the analysis, must be overloaded. */
37     virtual void Init();
38
39     /** 
40     * Creates the histograms, must be overloaded if you want to add your own. 
41     * Uses the fHistogramNameSuffix to create proper histogram names
42     */
43     virtual void CreateHistograms();
44     
45     /** Fills the histograms, must be overloaded if you want to add your own */
46     virtual void FillHistograms();
47
48     /** Reset event specific values (Et etc.) */
49     virtual void ResetEventValues();
50
51     /** Set Particle codes/mass */
52     virtual void SetParticleCodes();
53     
54     /** Cuts info */
55     AliAnalysisEtCuts * GetCuts() const { return fCuts; } 
56     virtual void SetCuts(const AliAnalysisEtCuts *cuts) 
57     { fCuts = (AliAnalysisEtCuts *) cuts; } 
58
59     /** Sum of the total Et for all events */
60     Double_t GetSumEt() const { return fSumEt; }
61
62     /** Sum of the total Et within our acceptance for all events */
63     Double_t GetSumEtAcc() const { return fSumEtAcc; }
64
65     /** Total Et in the event (without acceptance cuts) */
66     Double_t GetTotEt() const { return fTotEt; }
67
68     /** Total Et in the event within the acceptance cuts */
69     Double_t GetTotEtAcc() const { return fTotEtAcc; }
70
71    /** Total neutral Et in the event (without acceptance cuts) */
72     Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
73
74     /** Total neutral Et in the event within the acceptance cuts */
75     Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
76     
77     /** Total charged Et in the event (without acceptance cuts) */
78     Double_t GetTotChargedEt() const { return fTotChargedEt; }
79
80     /** Total charged Et in the event within the acceptance cuts */
81     Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
82
83
84 protected:
85        
86     TString fHistogramNameSuffix; /** The suffix for the histogram names */
87
88     AliAnalysisEtCuts *fCuts; // keeper of basic cuts
89
90     /** PDG Database */
91     TDatabasePDG *fPdgDB;//data base used for looking up pdg codes
92     //these codes are stored as variables because otherwise there were issues using this with the plugin
93     Int_t fPiPlusCode;//pdg pi plus code
94     Int_t fPiMinusCode;//pdg pi minus code
95     Int_t fKPlusCode;// pdg k plus code
96     Int_t fKMinusCode;//pdg k minus code
97     Int_t fProtonCode;//pdg proton code
98     Int_t fAntiProtonCode;//pdg antiproton code
99     Int_t fLambdaCode;// pdg lambda code
100     Int_t fAntiLambdaCode;//pdg antilambda code
101     Int_t fK0SCode;//pdg k0 short code
102     Int_t fOmegaCode;//pdg omega code
103     Int_t fAntiOmegaCode;//pdg anti-omega code
104     Int_t fXi0Code;//pdg xi-0 code
105     Int_t fAntiXi0Code;//pdg anti-xi0 code
106     Int_t fXiCode;//pdg xi code
107     Int_t fAntiXiCode;//pdg anti-xi code
108     Int_t fSigmaCode;//pdg sigma code
109     Int_t fAntiSigmaCode;//pdg anti-sigma code
110     Int_t fK0LCode;//pdg k0 long code
111     Int_t fNeutronCode;//pdg neutron code
112     Int_t fAntiNeutronCode;//pdg anti-neutron code
113     Int_t fEPlusCode;//pdg positron code
114     Int_t fEMinusCode;//pdg electron code
115     Float_t fPionMass;//pdg pion mass
116
117     Double_t fSumEt;/** Sum of the total Et for all events */
118     Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */    
119     Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */    
120     Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
121     
122     Double_t fTotNeutralEt;/** Total neutral Et in the event */    
123     Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */    
124     Double_t fTotChargedEt;/** Total charged Et in the event */    
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     Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */    
129     Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
130
131     Double_t fEtaCutAcc;/** Eta cut for our acceptance */
132     Double_t fPhiCutAccMin; /** Min phi cut for our acceptance in radians */    
133     Double_t fPhiCutAccMax; /** Max phi cut for our acceptance in radians */
134     Double_t fDetectorRadius; /** Detector radius */
135     
136     Double_t fClusterEnergyCut; /** Cut on the cluster energy */    
137     Double_t fSingleCellEnergyCut;  /** Minimum energy to cut on single cell cluster */
138
139     // Declare the histograms
140
141     /** The full Et spectrum measured */
142     TH1F *fHistEt; //Et spectrum
143
144     /** The full charged Et spectrum measured */
145     TH1F *fHistChargedEt; //Charged Et spectrum
146
147     /** The full neutral Et spectrum measured */
148     TH1F *fHistNeutralEt; //Neutral Et spectrum
149
150     /** The Et spectrum within the calorimeter acceptance */
151     TH1F *fHistEtAcc; //Et in acceptance
152
153     /** The charged Et spectrum within the calorimeter acceptance */
154     TH1F *fHistChargedEtAcc; //Charged Et in acceptance
155
156     /** The neutral Et spectrum within the calorimeter acceptance */
157     TH1F *fHistNeutralEtAcc; //Et in acceptance
158
159     /** Multiplicity of particles in the events */
160     TH1F *fHistMult; //Multiplicity
161
162     /** Charged multiplicity of particles in the events */
163     TH1F *fHistChargedMult; //Charged multiplicity
164
165     /** Neutral multiplicity of particles in the events */
166     TH1F *fHistNeutralMult; //Neutral multiplicity
167
168     /* Acceptance plots */
169     TH2F *fHistPhivsPtPos; //phi vs pT plot for positive tracks
170     TH2F *fHistPhivsPtNeg; //phi vs pT plot for negative tracks
171
172     /* PID plots, Et */
173     TH1F *fHistBaryonEt; // baryon
174     TH1F *fHistAntiBaryonEt; // anti-baryon
175     TH1F *fHistMesonEt; // meson
176
177     TH1F *fHistBaryonEtAcc; // baryon, acc
178     TH1F *fHistAntiBaryonEtAcc; // anti-baryon, acc
179     TH1F *fHistMesonEtAcc; // meson, acc
180
181     TH1F *fHistTMDeltaR;  /* Track matching plots */
182
183 private:
184     //Declare private to avoid compilation warning
185     AliAnalysisEt & operator = (const AliAnalysisEt & g) ;//cpy assignment
186     AliAnalysisEt(const AliAnalysisEt & g) ; // cpy ctor
187
188     ClassDef(AliAnalysisEt, 0);
189 };
190
191 #endif // ALIANALYSISET_H