AliPhysics  cdeda5a (cdeda5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnaWeights.h
Go to the documentation of this file.
1 #ifndef ALIANAWEIGHTS_H
2 #define ALIANAWEIGHTS_H
3 
4 //_________________________________________________________________________
24 //_________________________________________________________________________
25 
26 class TH1F;
27 class TList;
28 class AliGenPythiaEventHeader;
29 
30 #include <TObject.h>
31 
32 class AliAnaWeights : public TObject {
33 
34  public:
35 
36  AliAnaWeights();
37 
40 
41  //
42  // Centrality weights
43  //
44 
45  void InitCentralityWeightsHistogram(Int_t nbins = 100, Int_t minCen = 0, Int_t maxCen = 100) ;
46 
48 
50 
51  void SetCentrality(Float_t cen) { fCentrality = cen ; }
52 
54 
56 
58 
59  //
60  // MC weights
61  //
62 
64 
66 
67  static Bool_t GetPythiaInfoFromFile(TString currFile, Float_t & xsec, Float_t & trials) ;
68 
69  virtual Double_t GetWeight() ;
70 
73 
76 
78 
79  void SetPythiaEventHeader(AliGenPythiaEventHeader* py) { fPyEventHeader = py ; }
80 
83 
84 
85  //
86  // General
87  //
88 
90 
91  Int_t GetDebug() const { return fDebug ; }
92 
93  void SetDebug(Int_t d) { fDebug = d ; }
94 
95 
96  private:
97 
99 
100  //
101  // Centrality weights
102  //
103 
105 
107 
109 
110  //
111  // MC weights
112  //
113 
115 
117 
119 
121 
122  TH1F * fhXsec ;
123 
124  TH1F * fhTrials ;
125 
126  AliGenPythiaEventHeader * fPyEventHeader ;
127 
129 
131  AliAnaWeights( const AliAnaWeights&);
132 
135 
137  ClassDef(AliAnaWeights, 2) ;
139 
140 } ;
141 
142 #endif //ALIANAWEIGHTS_H
TList * GetCreateOutputHistograms()
double Double_t
Definition: External.C:58
void SetCentrality(Float_t cen)
Definition: AliAnaWeights.h:51
void SwitchOffMCCrossSectionFromEventHeader()
Definition: AliAnaWeights.h:82
void SwitchOffCentralityWeight()
Definition: AliAnaWeights.h:57
Calculate the weight to the event to be applied when filling histograms.
Definition: AliAnaWeights.h:32
TH1F * fhCentralityWeight
Container of centrality weights.
void SwitchOnMCCrossSectionHistoFill()
Definition: AliAnaWeights.h:77
Int_t GetDebug() const
Definition: AliAnaWeights.h:91
Int_t fDebug
Debug level.
Definition: AliAnaWeights.h:98
Bool_t IsCentralityWeightOn() const
Definition: AliAnaWeights.h:53
Float_t fCentrality
Container of centrality percentile.
Bool_t fJustFillCrossSecHist
Do not provide a weight, just fill cross section histograms.
void SwitchOnCentralityWeight()
Definition: AliAnaWeights.h:55
void SwitchOnMCCrossSectionFromEventHeader()
Definition: AliAnaWeights.h:81
int Int_t
Definition: External.C:63
void SwitchOnMCCrossSectionCalculation()
Definition: AliAnaWeights.h:74
float Float_t
Definition: External.C:68
Bool_t IsMCCrossSectionJustHistoFillOn() const
Definition: AliAnaWeights.h:72
void InitCentralityWeightsHistogram(Int_t nbins=100, Int_t minCen=0, Int_t maxCen=100)
void SwitchOffMCCrossSectionCalculation()
Definition: AliAnaWeights.h:75
TH1F * GetCentralityWeightsHistogram()
Bool_t IsMCCrossSectionCalculationOn() const
Definition: AliAnaWeights.h:71
AliAnaWeights()
Constructor.
Bool_t IsWeightSettingOn() const
Definition: AliAnaWeights.h:89
virtual ~AliAnaWeights()
Destructor.
Definition: AliAnaWeights.h:39
TH1F * fhXsec
! Cross section in PYTHIA.
AliAnaWeights & operator=(const AliAnaWeights &)
Assignment operator not implemented.
void SetCentralityWeightsHistogram(TH1F *h)
Definition: AliAnaWeights.h:49
Double_t fMCWeight
pT-hard bin MC weight. It is used only internally.
void SetDebug(Int_t d)
Definition: AliAnaWeights.h:93
void SetPythiaEventHeader(AliGenPythiaEventHeader *py)
Definition: AliAnaWeights.h:79
AliGenPythiaEventHeader * fPyEventHeader
! Pythia event header, needed to retrieve cross section, only in recent MC
TString fCurrFileName
Current file path name.
virtual Double_t GetWeight()
const Int_t nbins
bool Bool_t
Definition: External.C:53
Bool_t fUseCentralityWeight
Return the centratlity weight.
Bool_t fCheckPythiaEventHeader
Get cross section from pythia event header.
Bool_t fCheckMCCrossSection
Retrieve from the pyxsec.root file the cross section, only if requested.
virtual Double_t GetPythiaCrossSection()
static Bool_t GetPythiaInfoFromFile(TString currFile, Float_t &xsec, Float_t &trials)
TH1F * fhTrials
! Number of event trials in PYTHIA.