![]() |
AliPhysics
v5-06-21-01 (1eac791)
|
Calculate the weight to the event to be applied when filling histograms. More...
#include <AliAnaWeights.h>
Public Member Functions | |
AliAnaWeights () | |
Constructor. More... | |
virtual | ~AliAnaWeights () |
Destructor. More... | |
void | InitCentralityWeightsHistogram (Int_t nbins=100, Int_t minCen=0, Int_t maxCen=100) |
TH1F * | GetCentralityWeightsHistogram () |
void | SetCentralityWeightsHistogram (TH1F *h) |
void | SetCentrality (Float_t cen) |
Bool_t | IsCentralityWeightOn () const |
void | SwitchOnCentralityWeight () |
void | SwitchOffCentralityWeight () |
TList * | GetCreateOutputHistograms () |
virtual Double_t | GetPythiaCrossSection () |
virtual Double_t | GetWeight () |
Bool_t | IsMCCrossSectionCalculationOn () const |
void | SwitchOnMCCrossSectionCalculation () |
void | SwitchOffMCCrossSectionCalculation () |
Bool_t | IsWeightSettingOn () const |
Int_t | GetDebug () const |
void | SetDebug (Int_t d) |
Static Public Member Functions | |
static Bool_t | GetPythiaInfoFromFile (TString currFile, Float_t &xsec, Float_t &trials) |
Private Member Functions | |
AliAnaWeights (const AliAnaWeights &) | |
Copy constructor not implemented. More... | |
AliAnaWeights & | operator= (const AliAnaWeights &) |
Assignment operator not implemented. More... | |
Private Attributes | |
TH1F * | fhCentralityWeight |
Container of centrality weights. More... | |
Float_t | fCentrality |
Container of centrality percentile. More... | |
Bool_t | fUseCentralityWeight |
Return the centratlity weight. More... | |
Double_t | fMCWeight |
pT-hard bin MC weight. It is used only internally. More... | |
TString | fCurrFileName |
Current file path name. More... | |
Bool_t | fCheckMCCrossSection |
Retrieve from the pyxsec.root file the cross section, only if requested. More... | |
TH1F * | fhXsec |
! Cross section in PYTHIA. More... | |
TH1F * | fhTrials |
! Number of event trials in PYTHIA. More... | |
Int_t | fDebug |
Debug level. More... | |
Calculate the weight to the event to be applied when filling histograms.
This class is intended to get/calculate the global event weight needed to fill histograms. Right now it only gets the weight corresponding to:
This task is called by the class AliCaloTrackReader in method AliCaloTrackReader::FillInputEvent(). Also, in case of MC pT-hard bins analysis, the cross section and trials used are stored in dedicated histograms via AliAnaCaloTrackCorrMaker, being initialized in AliAnaCaloTrackCorrMaker::GetOutputContainer()
The different analysis subtasks should recover the weight stored in the reader, and apply it when filling the histogram.
Definition at line 31 of file AliAnaWeights.h.
AliAnaWeights::AliAnaWeights | ( | ) |
Constructor.
Definition at line 38 of file AliAnaWeights.cxx.
|
inlinevirtual |
Destructor.
Definition at line 38 of file AliAnaWeights.h.
|
private |
Copy constructor not implemented.
TH1F * AliAnaWeights::GetCentralityWeightsHistogram | ( | ) |
Definition at line 283 of file AliAnaWeights.cxx.
TList * AliAnaWeights::GetCreateOutputHistograms | ( | ) |
Init histogram pointers.
Definition at line 55 of file AliAnaWeights.cxx.
Referenced by AliAnaCaloTrackCorrMaker::GetOutputContainer().
|
inline |
Definition at line 82 of file AliAnaWeights.h.
Referenced by AliCaloTrackReader::Init().
|
virtual |
Implemented Notify() to read the cross sections and number of trials from pyxsec.root, values stored in specific histograms.
Definition at line 114 of file AliAnaWeights.cxx.
Referenced by GetWeight().
|
static |
This method gets and returns the
file | : either pyxsec.root (ESDs) or pysec_hists.root (AODs) files |
xsec | : cross section |
trials | : number of event trials that should be located where the main data file is. This is called in Notify and should provide the path to the AOD/ESD file |
Definition at line 189 of file AliAnaWeights.cxx.
Referenced by GetPythiaCrossSection().
|
virtual |
Definition at line 81 of file AliAnaWeights.cxx.
Referenced by AliCaloTrackReader::FillInputEvent().
void AliAnaWeights::InitCentralityWeightsHistogram | ( | Int_t | nbins = 100 , |
Int_t | minCen = 0 , |
||
Int_t | maxCen = 100 |
||
) |
This method intializes the histogram containing the centrality weights. Use in case of different binning than default.
nbins | : number of bins in histogram, default 100 |
minCen | : minimum value of centrality, default 0 |
maxCen | : maximum value of centrality, default 100 |
Definition at line 270 of file AliAnaWeights.cxx.
Referenced by GetCentralityWeightsHistogram(), and SwitchOnCentralityWeight().
|
inline |
Definition at line 52 of file AliAnaWeights.h.
Referenced by AliAnaCaloTrackCorrMaker::FillControlHistograms().
|
inline |
Definition at line 70 of file AliAnaWeights.h.
|
inline |
Definition at line 80 of file AliAnaWeights.h.
Referenced by AliCaloTrackReader::FillInputEvent().
|
private |
Assignment operator not implemented.
|
inline |
Definition at line 50 of file AliAnaWeights.h.
Referenced by AliCaloTrackReader::FillInputEvent().
|
inline |
Definition at line 48 of file AliAnaWeights.h.
|
inline |
Definition at line 84 of file AliAnaWeights.h.
|
inline |
Definition at line 56 of file AliAnaWeights.h.
|
inline |
Definition at line 74 of file AliAnaWeights.h.
|
inline |
Definition at line 54 of file AliAnaWeights.h.
|
inline |
Definition at line 72 of file AliAnaWeights.h.
|
private |
Container of centrality percentile.
Definition at line 95 of file AliAnaWeights.h.
Referenced by GetWeight(), and SetCentrality().
|
private |
Retrieve from the pyxsec.root file the cross section, only if requested.
Definition at line 107 of file AliAnaWeights.h.
Referenced by GetCreateOutputHistograms(), GetWeight(), IsMCCrossSectionCalculationOn(), IsWeightSettingOn(), SwitchOffMCCrossSectionCalculation(), and SwitchOnMCCrossSectionCalculation().
|
private |
Current file path name.
Definition at line 105 of file AliAnaWeights.h.
Referenced by GetPythiaCrossSection().
|
private |
Debug level.
Definition at line 114 of file AliAnaWeights.h.
Referenced by GetDebug(), and SetDebug().
|
private |
Container of centrality weights.
Definition at line 93 of file AliAnaWeights.h.
Referenced by GetCentralityWeightsHistogram(), GetWeight(), InitCentralityWeightsHistogram(), SetCentralityWeightsHistogram(), and ~AliAnaWeights().
|
private |
! Number of event trials in PYTHIA.
Definition at line 111 of file AliAnaWeights.h.
Referenced by GetCreateOutputHistograms(), and GetPythiaCrossSection().
|
private |
! Cross section in PYTHIA.
Definition at line 109 of file AliAnaWeights.h.
Referenced by GetCreateOutputHistograms(), and GetPythiaCrossSection().
|
private |
pT-hard bin MC weight. It is used only internally.
Definition at line 103 of file AliAnaWeights.h.
Referenced by GetPythiaCrossSection().
|
private |
Return the centratlity weight.
Definition at line 97 of file AliAnaWeights.h.
Referenced by GetWeight(), IsCentralityWeightOn(), IsWeightSettingOn(), SwitchOffCentralityWeight(), and SwitchOnCentralityWeight().