![]() |
AliPhysics
764b6ea (764b6ea)
|
Calculate the weight to the event to be applied when filling histograms. More...
#include <AliAnaWeights.h>
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 | |
Int_t | fDebug |
Debug level. More... | |
TH1F * | fhCentralityWeight |
Container of centrality weights. More... | |
Float_t | fCentrality |
Container of centrality percentile. More... | |
Bool_t | fUseCentralityWeight |
Return the centratlity weight. More... | |
Bool_t | fDoMCParticlePtWeights |
activate the generation of a pT weight depending on MC particle pdg and generator More... | |
TF1 * | fEtaFunction |
! eta spectrum parametrization More... | |
TF1 * | fPi0Function |
! pi0 spectrum parametrization 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... | |
Bool_t | fJustFillCrossSecHist |
Do not provide a weight, just fill cross section histograms. More... | |
TH1F * | fhXsec |
! Cross section in PYTHIA. More... | |
TH1F * | fhTrials |
! Number of event trials in PYTHIA. More... | |
AliGenPythiaEventHeader * | fPyEventHeader |
! Pythia event header, needed to retrieve cross section, only in recent MC More... | |
Bool_t | fCheckPythiaEventHeader |
Get cross section from pythia event header. 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 34 of file AliAnaWeights.h.
AliAnaWeights::AliAnaWeights | ( | ) |
Constructor.
Definition at line 39 of file AliAnaWeights.cxx.
|
virtual |
Destructor.
Definition at line 60 of file AliAnaWeights.cxx.
|
private |
Copy constructor not implemented.
TH1F * AliAnaWeights::GetCentralityWeightsHistogram | ( | ) |
Definition at line 355 of file AliAnaWeights.cxx.
Referenced by SetDebug().
TList * AliAnaWeights::GetCreateOutputHistograms | ( | ) |
Init histogram pointers.
Definition at line 73 of file AliAnaWeights.cxx.
Referenced by AliAnaCaloTrackCorrMaker::GetOutputContainer().
|
inline |
Definition at line 48 of file AliAnaWeights.h.
Referenced by AliCaloTrackReader::Init().
Double_t AliAnaWeights::GetParticlePtWeight | ( | Float_t | pt, |
Int_t | pdg, | ||
TString | genName, | ||
Int_t | igen | ||
) | const |
pt | input particle transverse momentum |
pdg | input particle type pdg code |
genName | TString with generator name |
igen | index of generator (not used yet). |
currently, only pi0 and eta cases are considered. The parametrizations are passed via SetEtaFunction(TF1* fun) and SetPi0Function(TF1* fun) ex param: TF1* PowerEta0 = new TF1("PowerEta0","[0]*pow([1]/(([1]*exp(-[3]*x)+x)),[2])",4,25); Only active when SwitchOnMCParticlePtWeights()
Definition at line 140 of file AliAnaWeights.cxx.
Referenced by SwitchOffMCCrossSectionFromEventHeader().
|
virtual |
Read the cross sections and number of trials from pyxsec.root (ESD) or pysec_hists.root (AODs), values stored in specific histograms-trees. If no file available, get information from Pythia event header
Fill the control histograms on number of trials and xsection optionally, with fJustFillCrossSecHist, just do that and do not return a weight. For cross section obtained from pythia event header, this is already the case.
Definition at line 169 of file AliAnaWeights.cxx.
Referenced by GetWeight(), and SwitchOffCentralityWeight().
|
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 261 of file AliAnaWeights.cxx.
Referenced by GetPythiaCrossSection(), and SwitchOffCentralityWeight().
|
virtual |
Definition at line 99 of file AliAnaWeights.cxx.
Referenced by AliCaloTrackReader::FillInputEvent(), and SwitchOffCentralityWeight().
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 342 of file AliAnaWeights.cxx.
Referenced by GetCentralityWeightsHistogram(), SetDebug(), and SwitchOnCentralityWeight().
|
inline |
Definition at line 63 of file AliAnaWeights.h.
Referenced by AliAnaCaloTrackCorrMaker::FillControlHistograms().
|
inline |
Definition at line 80 of file AliAnaWeights.h.
Referenced by AliAnaCaloTrackCorrMaker::FillControlHistograms(), and AliAnaCaloTrackCorrMaker::GetOutputContainer().
|
inline |
Definition at line 81 of file AliAnaWeights.h.
Referenced by AliAnaCaloTrackCorrMaker::FillControlHistograms(), and AliAnaCaloTrackCorrMaker::GetOutputContainer().
|
inline |
Definition at line 78 of file AliAnaWeights.h.
Referenced by AliCaloTrackReader::FillInputEvent().
|
private |
Assignment operator not implemented.
|
inline |
Definition at line 61 of file AliAnaWeights.h.
Referenced by AliCaloTrackReader::FillInputEvent().
|
inline |
Definition at line 59 of file AliAnaWeights.h.
|
inline |
Definition at line 50 of file AliAnaWeights.h.
|
inline |
Definition at line 98 of file AliAnaWeights.h.
|
inline |
Definition at line 99 of file AliAnaWeights.h.
|
inline |
Definition at line 83 of file AliAnaWeights.h.
Referenced by AliCaloTrackReader::FillInputEvent().
|
inline |
Definition at line 67 of file AliAnaWeights.h.
|
inline |
Definition at line 86 of file AliAnaWeights.h.
|
inline |
Definition at line 91 of file AliAnaWeights.h.
|
inline |
Definition at line 102 of file AliAnaWeights.h.
|
inline |
Definition at line 65 of file AliAnaWeights.h.
|
inline |
Definition at line 85 of file AliAnaWeights.h.
|
inline |
Definition at line 90 of file AliAnaWeights.h.
Referenced by AddTaskClusterShape().
|
inline |
Definition at line 88 of file AliAnaWeights.h.
Referenced by AddTaskCalorimeterQA(), AddTaskClusterShape(), AddTaskGenKine(), and AddTaskPi0IMGammaCorrQA().
|
inline |
Definition at line 101 of file AliAnaWeights.h.
|
private |
Container of centrality percentile.
Definition at line 114 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 136 of file AliAnaWeights.h.
Referenced by GetCreateOutputHistograms(), GetWeight(), IsMCCrossSectionCalculationOn(), IsWeightSettingOn(), SwitchOffMCCrossSectionCalculation(), SwitchOnMCCrossSectionCalculation(), and SwitchOnMCCrossSectionHistoFill().
|
private |
Get cross section from pythia event header.
Definition at line 146 of file AliAnaWeights.h.
Referenced by GetPythiaCrossSection(), SwitchOffMCCrossSectionFromEventHeader(), and SwitchOnMCCrossSectionFromEventHeader().
|
private |
Current file path name.
Definition at line 134 of file AliAnaWeights.h.
Referenced by GetPythiaCrossSection().
|
private |
Debug level.
Definition at line 106 of file AliAnaWeights.h.
Referenced by GetDebug(), GetPythiaCrossSection(), and SetDebug().
|
private |
activate the generation of a pT weight depending on MC particle pdg and generator
Definition at line 122 of file AliAnaWeights.h.
Referenced by GetParticlePtWeight(), SwitchOffMCParticlePtWeights(), and SwitchOnMCParticlePtWeights().
|
private |
! eta spectrum parametrization
Definition at line 124 of file AliAnaWeights.h.
Referenced by GetParticlePtWeight(), SetEtaFunction(), and ~AliAnaWeights().
|
private |
Container of centrality weights.
Definition at line 112 of file AliAnaWeights.h.
Referenced by GetCentralityWeightsHistogram(), GetWeight(), InitCentralityWeightsHistogram(), SetCentralityWeightsHistogram(), and ~AliAnaWeights().
|
private |
! Number of event trials in PYTHIA.
Definition at line 142 of file AliAnaWeights.h.
Referenced by GetCreateOutputHistograms(), and GetPythiaCrossSection().
|
private |
! Cross section in PYTHIA.
Definition at line 140 of file AliAnaWeights.h.
Referenced by GetCreateOutputHistograms(), and GetPythiaCrossSection().
|
private |
Do not provide a weight, just fill cross section histograms.
Definition at line 138 of file AliAnaWeights.h.
Referenced by GetPythiaCrossSection(), IsMCCrossSectionJustHistoFillOn(), and SwitchOnMCCrossSectionHistoFill().
|
private |
pT-hard bin MC weight. It is used only internally.
Definition at line 132 of file AliAnaWeights.h.
Referenced by GetPythiaCrossSection().
|
private |
! pi0 spectrum parametrization
Definition at line 126 of file AliAnaWeights.h.
Referenced by GetParticlePtWeight(), SetPi0Function(), and ~AliAnaWeights().
|
private |
! Pythia event header, needed to retrieve cross section, only in recent MC
Definition at line 144 of file AliAnaWeights.h.
Referenced by GetPythiaCrossSection(), and SetPythiaEventHeader().
|
private |
Return the centratlity weight.
Definition at line 116 of file AliAnaWeights.h.
Referenced by GetWeight(), IsCentralityWeightOn(), IsWeightSettingOn(), SwitchOffCentralityWeight(), and SwitchOnCentralityWeight().