]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/totEt/AliAnalysisEtCommon.h
implementing realistic reweighting of V0s, fixing some minor coding violations, addin...
[u/mrichter/AliRoot.git] / PWG4 / totEt / AliAnalysisEtCommon.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 ALIANALYSISETCOMMON_H
9 #define ALIANALYSISETCOMMON_H
10
11 #include "TString.h"
12 #include "TMath.h"
13
14 class TH2F;
15 class TH1F;
16 class TF1;
17 class AliVEvent;
18 class TList;
19 class AliESDtrackCuts;
20 class Rtypes;
21 class TParticle;
22 class TDatabasePDG;
23 class AliAnalysisEtCuts;
24
25 #ifndef ALIANALYSISLEVYPT_H
26 #define ALIANALYSISLEVYPT_H
27 class AliAnalysisLevyPt{
28  public:
29   virtual ~AliAnalysisLevyPt(){};
30   Double_t Evaluate(const Double_t *pt, const Double_t *par) const
31   {
32     Double_t lMass  = 0.497;
33     Double_t ldNdy  = par[0];
34     Double_t l2pi   = 2*TMath::Pi();
35     Double_t lTemp = par[1];
36     Double_t lPower = par[2];
37
38     Double_t lBigCoef = ((lPower-1)*(lPower-2)) / (l2pi*lPower*lTemp*(lPower*lTemp+lMass*(lPower-2)));
39     Double_t lInPower = 1 + (TMath::Sqrt(pt[0]*pt[0]+lMass*lMass)-lMass) / (lPower*lTemp);
40
41     return ldNdy * pt[0] * lBigCoef * TMath::Power(lInPower,(-1)*lPower);
42   };
43   ClassDef(AliAnalysisLevyPt, 1);
44 };
45
46 #endif // ALIANALYSISLEVYPT_H
47
48 class AliAnalysisEtCommon
49 {
50 public:
51    
52   AliAnalysisEtCommon();
53     virtual ~AliAnalysisEtCommon();
54
55     /** Analyse the event! */
56     virtual Int_t AnalyseEvent(AliVEvent *event);
57
58
59     /** Initialise the analysis, must be overloaded. */
60     virtual void Init();
61
62
63     /** Reset event specific values (Et etc.) */
64     virtual void ResetEventValues();
65
66     /** Cuts info */
67     AliAnalysisEtCuts * GetCuts() const { return fCuts; } 
68     virtual void SetCuts(const AliAnalysisEtCuts *cuts) 
69     { fCuts = (AliAnalysisEtCuts *) cuts; } 
70
71
72     void SetTPCITSTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsITSTPC = (AliESDtrackCuts *) cuts;}
73     void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;}
74     void SetITSTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsITS = (AliESDtrackCuts *) cuts;}
75     void SetDataSet(Int_t val){fDataSet = val;}
76     Int_t DataSet()const {return fDataSet;}
77
78 protected:   
79     
80     TString fHistogramNameSuffix; /** The suffix for the histogram names */
81
82     AliAnalysisEtCuts *fCuts; // keeper of basic cuts
83
84     Int_t fDataSet;//Integer corresponding to data set.  Used as a switch to set appropriate track cuts.  By default set to 2010 p+p
85     //2009 = 900 GeV p+p data from 2009
86     //2010 = 7 TeV p+p data from 2010
87
88     /** PDG Database */
89     //TDatabasePDG *fPdgDB;//data base used for looking up pdg codes
90     //these codes are stored as variables because otherwise there were issues using this with the plugin
91
92     static Int_t fgPiPlusCode;//pdg pi plus code
93     static Int_t fgPiMinusCode;//pdg pi minus code
94     static Int_t fgKPlusCode;// pdg k plus code
95     static Int_t fgKMinusCode;//pdg k minus code
96     static Int_t fgProtonCode;//pdg proton code
97     static Int_t fgAntiProtonCode;//pdg antiproton code
98     static Int_t fgLambdaCode;// pdg lambda code
99     static Int_t fgAntiLambdaCode;//pdg antilambda code
100     static Int_t fgK0SCode;//pdg k0 short code
101     static Int_t fgOmegaCode;//pdg omega code
102     static Int_t fgAntiOmegaCode;//pdg anti-omega code
103     static Int_t fgXi0Code;//pdg xi-0 code
104     static Int_t fgAntiXi0Code;//pdg anti-xi0 code
105     static Int_t fgXiCode;//pdg xi code
106     static Int_t fgAntiXiCode;//pdg anti-xi code
107     static Int_t fgSigmaCode;//pdg sigma code
108     static Int_t fgAntiSigmaCode;//pdg anti-sigma code
109     static Int_t fgK0LCode;//pdg k0 long code
110     static Int_t fgNeutronCode;//pdg neutron code
111     static Int_t fgAntiNeutronCode;//pdg anti-neutron code
112     static Int_t fgEPlusCode;//pdg positron code
113     static Int_t fgEMinusCode;//pdg electron code
114     static Int_t fgMuPlusCode;//pdg positron code
115     static Int_t fgMuMinusCode;//pdg electron code
116     static Int_t fgGammaCode;//pdg gamma code
117     static Int_t fgPi0Code;//pdg neutral pion code
118     static Int_t fgEtaCode;//pdg eta code
119     static Int_t fgOmega0Code;//pdg eta code
120     static Float_t fgPionMass;//pdg pion mass
121     static Float_t fgKaonMass;//pdg kaon mass
122     static Float_t fgProtonMass;//pdg proton mass
123     static Float_t fgElectronMass;//pdg electron mass
124
125
126     Float_t Et(TParticle *part, float mass = -1000);
127     Float_t Et(Float_t p, Float_t theta, Int_t pid, Short_t charge) const;
128     AliESDtrackCuts* fEsdtrackCutsITSTPC;//esd track cuts for ITS+TPC tracks
129     AliESDtrackCuts* fEsdtrackCutsTPC;//esd track cuts for TPC tracks (which may also contain ITS hits)
130     AliESDtrackCuts* fEsdtrackCutsITS;//esd track cuts for ITS stand alone tracks
131
132     static Float_t fgPtTPCCutOff;//cut off for tracks in TPC
133     static Float_t fgPtITSCutOff;//cut off for tracks in ITS
134     
135     //Set by default to the D6T scales
136     Float_t K0Weight(Float_t pt);//Function which gives the factor to reweigh a K0 so it roughly matches the data
137     Float_t LambdaWeight(Float_t pt);//Function which gives the factor to reweigh a Lambda so it roughly matches the data
138     Float_t AntiLambdaWeight(Float_t pt);//Function which gives the factor to reweigh a Lambda so it roughly matches the data
139     TF1 *fK0PythiaD6T;//function with Levy fit parameters for K0S in PYTHIA D6T
140     TF1 *fLambdaPythiaD6T;//function with Levy fit parameters for Lambda in PYTHIA D6T
141     TF1 *fAntiLambdaPythiaD6T;//function with Levy fit parameters for AntiLambda in PYTHIA D6T
142     TF1 *fK0Data;//function with Levy fit parameters for K0S in data
143     TF1 *fLambdaData;//function with Levy fit parameters for Lambda in data
144     TF1 *fAntiLambdaData;//function with Levy fit parameters for AntiLambda in data
145
146  private:
147     //Declare it private to avoid compilation warning
148     AliAnalysisEtCommon & operator = (const AliAnalysisEtCommon & g) ;//cpy assignment
149     AliAnalysisEtCommon(const AliAnalysisEtCommon & g) ; // cpy ctor
150
151     ClassDef(AliAnalysisEtCommon, 1);
152 };
153
154 #endif // ALIANALYSISETCOMMON_H