AliPhysics  vAN-20150924 (e816f45)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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 
29 #include <TObject.h>
30 
31 class AliAnaWeights : public TObject {
32 
33  public:
34 
35  AliAnaWeights();
36 
39 
40  //
41  // Centrality weights
42  //
43 
44  void InitCentralityWeightsHistogram(Int_t nbins = 100, Int_t minCen = 0, Int_t maxCen = 100) ;
45 
47 
49 
50  void SetCentrality(Float_t cen) { fCentrality = cen ; }
51 
52  Bool_t IsCentralityWeightOn() const { return fUseCentralityWeight ; }
53 
55 
57 
58  //
59  // MC weights
60  //
61 
62  TList * GetCreateOutputHistograms();
63 
64  virtual Double_t GetPythiaCrossSection() ;
65 
66  static Bool_t GetPythiaInfoFromFile(TString currFile, Float_t & xsec, Float_t & trials) ;
67 
68  virtual Double_t GetWeight() ;
69 
71 
73 
75 
76  //
77  // General
78  //
79 
80  Bool_t IsWeightSettingOn() const { return ( fUseCentralityWeight || fCheckMCCrossSection ) ; }
81 
82  Int_t GetDebug() const { return fDebug ; }
83 
84  void SetDebug(Int_t d) { fDebug = d ; }
85 
86 
87  private:
88 
89  //
90  // Centrality weights
91  //
92 
94 
95  Float_t fCentrality ;
96 
98 
99  //
100  // MC weights
101  //
102 
103  Double_t fMCWeight ;
104 
105  TString fCurrFileName ;
106 
108 
109  TH1F * fhXsec ;
110 
111  TH1F * fhTrials ;
112 
113 
114  Int_t fDebug ;
115 
117  AliAnaWeights( const AliAnaWeights&);
118 
121 
123  ClassDef(AliAnaWeights, 1) ;
125 
126 } ;
127 
128 #endif //ALIANAWEIGHTS_H
TList * GetCreateOutputHistograms()
void SetCentrality(Float_t cen)
Definition: AliAnaWeights.h:50
void SwitchOffCentralityWeight()
Definition: AliAnaWeights.h:56
Calculate the weight to the event to be applied when filling histograms.
Definition: AliAnaWeights.h:31
TH1F * fhCentralityWeight
Container of centrality weights.
Definition: AliAnaWeights.h:93
Int_t GetDebug() const
Definition: AliAnaWeights.h:82
Int_t fDebug
Debug level.
Bool_t IsCentralityWeightOn() const
Definition: AliAnaWeights.h:52
Float_t fCentrality
Container of centrality percentile.
Definition: AliAnaWeights.h:95
void SwitchOnCentralityWeight()
Definition: AliAnaWeights.h:54
void SwitchOnMCCrossSectionCalculation()
Definition: AliAnaWeights.h:72
void InitCentralityWeightsHistogram(Int_t nbins=100, Int_t minCen=0, Int_t maxCen=100)
void SwitchOffMCCrossSectionCalculation()
Definition: AliAnaWeights.h:74
TH1F * GetCentralityWeightsHistogram()
Bool_t IsMCCrossSectionCalculationOn() const
Definition: AliAnaWeights.h:70
AliAnaWeights()
Constructor.
Bool_t IsWeightSettingOn() const
Definition: AliAnaWeights.h:80
virtual ~AliAnaWeights()
Destructor.
Definition: AliAnaWeights.h:38
TH1F * fhXsec
! Cross section in PYTHIA.
AliAnaWeights & operator=(const AliAnaWeights &)
Assignment operator not implemented.
void SetCentralityWeightsHistogram(TH1F *h)
Definition: AliAnaWeights.h:48
Double_t fMCWeight
pT-hard bin MC weight. It is used only internally.
void SetDebug(Int_t d)
Definition: AliAnaWeights.h:84
TString fCurrFileName
Current file path name.
virtual Double_t GetWeight()
const Int_t nbins
Bool_t fUseCentralityWeight
Return the centratlity weight.
Definition: AliAnaWeights.h:97
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.