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