]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/totEt/AliAnalysisHadEt.h
Adding functions to facilitate cross checks with Monte Carlo
[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 #include "AliAnalysisEtCommon.h"
13
14 class TH2F;
15 class TH1F;
16 class AliVEvent;
17 class TList;
18 class AliESDtrackCuts;
19 class Rtypes;
20 class TParticle;
21 class TDatabasePDG;
22 class AliAnalysisEtCuts;
23
24 class AliAnalysisHadEt : public AliAnalysisEtCommon
25 {
26 public:
27    
28   AliAnalysisHadEt();
29     virtual ~AliAnalysisHadEt();
30
31     /** Analyse the event! */
32     virtual Int_t AnalyseEvent(AliVEvent *event);
33
34
35     /** Initialise the analysis, must be overloaded. */
36     virtual void Init();
37
38     /** Reset event specific values (Et etc.) */
39     virtual void ResetEventValues();
40
41
42     /** Cuts info */
43     AliAnalysisEtCuts * GetCuts() const { return fCuts; } 
44     virtual void SetCuts(const AliAnalysisEtCuts *cuts) 
45     { fCuts = (AliAnalysisEtCuts *) cuts; } 
46     
47     /** Sum of the total Et for all events */
48     Double_t GetSumEt() const { return fSumEt; }
49
50     /** Sum of the total Et within our acceptance for all events */
51     Double_t GetSumEtAcc() const { return fSumEtAcc; }
52
53     /** Total Et in the event (without acceptance cuts) */
54     Double_t GetTotEt() const { return fTotEt; }
55
56     /** Total Et in the event within the acceptance cuts */
57     Double_t GetTotEtAcc() const { return fTotEtAcc; }
58
59    /** Total neutral Et in the event (without acceptance cuts) */
60     Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
61
62     /** Total neutral Et in the event within the acceptance cuts */
63     Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
64     
65     /** Total charged Et in the event (without acceptance cuts) */
66     Double_t GetTotChargedEt() const { return fTotChargedEt; }
67
68     /** Total charged Et in the event within the acceptance cuts */
69     Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
70
71
72     void SetHistoList(const TList *mylist){fhistoList = (TList *) mylist;}
73
74
75 protected:   
76     
77     Double_t fSumEt;/** Sum of the total Et for all events */
78     Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */
79     Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
80     Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
81     
82     Double_t fTotNeutralEt;/** Total neutral Et in the event */
83     Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */
84     Double_t fTotChargedEt;/** Total charged Et in the event */
85     Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
86
87     Int_t fMultiplicity;/** Multiplicity of particles in the event */
88     Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
89     Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
90         
91     void CreateEtaPtHisto2D(TString name, TString title);
92     void CreateResolutionPtHisto2D(TString name, TString title, TString xtitle, TString ytitle);
93     void CreatePtHisto1D(TString name, TString title, TString xtitle, TString ytitle);
94     void CreateEtaHisto1D(TString name, TString title);
95     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);
96     void CreateHisto1D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Float_t xlow,Float_t xhigh);
97     void CreateIntHisto1D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Int_t xlow,Int_t xhigh);
98     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);
99     void FillHisto1D(TString histname, Float_t x, Float_t weight);
100     void FillHisto2D(TString histname, Float_t x, Float_t y, Float_t weight);
101     Bool_t GoodEvent() const {return fGoodEvent;}
102     Float_t TrueP(float pTrec);
103
104     Float_t Et(TParticle *part, float mass = -1000);
105     Float_t Et(Float_t p, Float_t theta, Int_t pid, Short_t charge) const;
106
107     TList *fhistoList;//list of histograms saved out to file
108     //static Float_t fgEtaAxis[47];//bins for eta axis of histograms
109     static Float_t fgEtaAxis[17];//bins for eta axis of histograms
110     static Int_t fgnumOfEtaBins;//number of eta bins
111     static Float_t fgPtAxis[117];//bins for pt axis of histograms
112     static Int_t fgNumOfPtBins;//number of pt bins
113     static Float_t fgResAxis[81];//axis for resolution histograms
114     static Int_t fgNumOfResBins;//number of bins for resolution axis
115     
116
117     Bool_t fGoodEvent;//boolean to keep track of whether or not this is a good event.
118
119  private:
120     //Declare it private to avoid compilation warning
121     AliAnalysisHadEt & operator = (const AliAnalysisHadEt & g) ;//cpy assignment
122     AliAnalysisHadEt(const AliAnalysisHadEt & g) ; // cpy ctor
123
124     ClassDef(AliAnalysisHadEt, 1);
125 };
126
127 #endif // ALIANALYSISHADET_H