AliPhysics  master (3d17d9d)
AliMCSpectraWeights Class Reference

TODO. More...

#include "AliMCSpectraWeights.h"

Public Types

enum  ParticleType {
  kPion = 0, kProtons = 1, kKaon = 2, kSigmaMinus = 3,
  kSigmaPlus = 4, kRest = 5
}
 
enum  TaskState { kAllEmpty = 0, kMCSpectraObtained, kDataFractionLoaded, kMCWeightCalculated }
 
enum  SysFlag {
  kNominal = 0, kPionUp, kPionDown, kProtonUp,
  kProtonDown, kKaonUp, kKaonDown, kSigmaPlusUp,
  kSigmaPlusDown, kSigmaMinusUp, kSigmaMinusDown, kBylinkinUpper,
  kBylinkinLower, kHagedorn, kHagedornUpper, kHagedornLower,
  kExponential, kExponentialUpper, kExponentialLower, kBlastwave,
  kBlastwaveUpper, kBlastwaveLower
}
 

Public Member Functions

 AliMCSpectraWeights ()
 default constructor More...
 
 AliMCSpectraWeights (std::string collisionSystem, std::string stName, AliMCSpectraWeights::SysFlag flag)
 standard way for constuctor More...
 
 ~AliMCSpectraWeights ()
 
void Init ()
 Initialisation of object. More...
 
float GetMCSpectraWeight (TParticle *mcGenParticle, float eventMultiplicityOrCentrality)
 
float GetMCSpectraWeight (TParticle *mcGenParticle, AliMCEvent *mcEvent)
 
void FillMCSpectra (AliMCEvent *mcEvent)
 
void SetBinsPt (std::vector< double > bins)
 function to set pt binning of all internal histograms More...
 
void SetBinsMultCent (std::vector< double > bins)
 function to set multiplicity binning of all internal histograms More...
 
void SetMCSpectraFile (const char *file)
 
void SetDataFractionsFile (const char *file)
 
void SetCollisionSystem (const char *system)
 
void SetUseMultiplicity (bool bMult)
 
void SetSavedObjName (const char *name)
 
void SetSavedListName (const char *name)
 
void SetSysFlag (SysFlag flag)
 
const std::vector< float > & GetBinsPt () const
 
const std::vector< std::string > & GetParticleTypes () const
 
int GetNPartTypes () const
 
int GetTaskStatus () const
 
TH3FGetHistMCGenPrimTrackParticles () const
 
TH3FGetHistDataFraction () const
 
TH3FGetHistMCFraction () const
 
TH3FGetHistMCWeights () const
 
SysFlag GetSysFlag () const
 
float GetMultOrCent () const
 
int IdentifyMCParticle (TParticle *mcParticle)
 

Private Member Functions

std::string GetFunctionFromSysFlag (SysFlag flag)
 
std::string GetSysVarFromSysFlag (SysFlag flag)
 
double GetMultFromCent (int CentBin) const
 
std::vector< float > GetMultTupleFromCent (int CentBin) const
 
double GetMultFromCent (std::string cent)
 
double GetCentFromMult (double dMult)
 
void InitHistos ()
 Create all internal histograms. More...
 
void LoadMeasuredFractions ()
 Load measured fractions (expert input) from alien. More...
 
void CountEventMult ()
 count the number of charged particles in the current event More...
 
int GetPartTypeNumber (ParticleType type)
 
int GetPartTypeNumber (std::string Particle)
 
int GetCentFromString (std::string cent)
 
bool LoadFromAliMCSpectraWeight (AliMCSpectraWeights *obj)
 Load the information from a previous train output. More...
 
bool LoadFromTHnF (const char *histname)
 
bool CalculateMCWeights ()
 calculate weight factors using internal information More...
 
bool CalcMCFractions ()
 calculate the relative fractions of all particle species in MC More...
 
bool CorrectFractionsforRest ()
 correct the expert input for remaining particle species More...
 

Private Attributes

std::string fstCollisionSystem
 
std::string fstFileMCSpectra
 
std::string fstFilePublished
 
std::string fstSavedObjName
 
std::string fstSavedListName
 
std::vector< std::string > fstPartTypes
 
std::vector< std::string > fstCentralities
 
std::vector< float > fBinsMultCent
 
std::vector< float > fBinsPt
 
TH3FfHistMCGenPrimTrackParticle
 
TH3FfHistDataFractions
 
TH3FfHistMCFractions
 
TH3FfHistMCWeights
 
AliMCEvent * fMCEvent
 
float fMultOrCent
 
int fNPartTypes
 
int fNCentralities
 
TaskState fbTaskStatus
 
SysFlag fFlag
 
bool fUseMultiplicity
 

Detailed Description

TODO.

TODO write something up TODO write full explanation here

Definition at line 26 of file AliMCSpectraWeights.h.

Member Enumeration Documentation

Enumerator
kPion 
kProtons 
kKaon 
kSigmaMinus 
kSigmaPlus 
kRest 

Definition at line 28 of file AliMCSpectraWeights.h.

Enumerator
kNominal 
kPionUp 
kPionDown 
kProtonUp 
kProtonDown 
kKaonUp 
kKaonDown 
kSigmaPlusUp 
kSigmaPlusDown 
kSigmaMinusUp 
kSigmaMinusDown 
kBylinkinUpper 
kBylinkinLower 
kHagedorn 
kHagedornUpper 
kHagedornLower 
kExponential 
kExponentialUpper 
kExponentialLower 
kBlastwave 
kBlastwaveUpper 
kBlastwaveLower 

Definition at line 42 of file AliMCSpectraWeights.h.

Enumerator
kAllEmpty 
kMCSpectraObtained 
kDataFractionLoaded 
kMCWeightCalculated 

Definition at line 36 of file AliMCSpectraWeights.h.

Constructor & Destructor Documentation

AliMCSpectraWeights::AliMCSpectraWeights ( )

default constructor

default root constructor

Definition at line 38 of file AliMCSpectraWeights.cxx.

AliMCSpectraWeights::AliMCSpectraWeights ( std::string  collisionSystem,
std::string  stName,
AliMCSpectraWeights::SysFlag  flag 
)

standard way for constuctor

constructor to be used.

Parameters
[in]collisionSystemstring for selecting the used collision system. Supported systems are: pp, pPb, PbPb and XeXe
[in]stNamestring for naming the object. Not used anymore. Included only for backward compability.
[in]flagused for systematic variations.

Definition at line 56 of file AliMCSpectraWeights.cxx.

AliMCSpectraWeights::~AliMCSpectraWeights ( )

Definition at line 139 of file AliMCSpectraWeights.cxx.

Member Function Documentation

bool AliMCSpectraWeights::CalcMCFractions ( )
private

calculate the relative fractions of all particle species in MC

This require the input from a previous train output and is only calculated if the internal histogram of MC information is filled.

Definition at line 400 of file AliMCSpectraWeights.cxx.

Referenced by CalculateMCWeights().

bool AliMCSpectraWeights::CalculateMCWeights ( )
private

calculate weight factors using internal information

Input from a previous train output is needed. Calculate for each particle species and multiplicity interval the ratio of fractionDATA to fractionMC. This is then used as weight factor later on.

Definition at line 564 of file AliMCSpectraWeights.cxx.

Referenced by Init().

bool AliMCSpectraWeights::CorrectFractionsforRest ( )
private

correct the expert input for remaining particle species

The expert input only included pions, kaons, protons, sigma+ and sigma- (constructed using lambda measurements). All other charged particles which are included in the MC information are not measured, yet (xi, electron, muon, omega-, ...). Therefore the fractions from measurement need to be corrected for not having those particles included. (see analysis note)

Definition at line 496 of file AliMCSpectraWeights.cxx.

Referenced by CalculateMCWeights().

void AliMCSpectraWeights::CountEventMult ( )
private

count the number of charged particles in the current event

Parse through the internal set AliMCEvent and count the number of particles according to the cuts and requirements of the analysis of the published spectra of identified charged particles used in the expert input.

Definition at line 623 of file AliMCSpectraWeights.cxx.

Referenced by FillMCSpectra(), and GetMCSpectraWeight().

void AliMCSpectraWeights::FillMCSpectra ( AliMCEvent *  mcEvent)

function to fill internal mc spectra for calculation of weight factors

Parameters
[in]mcEvent

Definition at line 707 of file AliMCSpectraWeights.cxx.

const std::vector<float>& AliMCSpectraWeights::GetBinsPt ( ) const
inline

Definition at line 160 of file AliMCSpectraWeights.h.

double AliMCSpectraWeights::GetCentFromMult ( double  dMult)
private
Parameters
[in]dMult
Returns

Definition at line 956 of file AliMCSpectraWeights.cxx.

Referenced by GetMCSpectraWeight().

int AliMCSpectraWeights::GetCentFromString ( std::string  cent)
private
Parameters
[in]cent
Returns

Definition at line 942 of file AliMCSpectraWeights.cxx.

Referenced by GetMultFromCent(), and LoadMeasuredFractions().

std::string AliMCSpectraWeights::GetFunctionFromSysFlag ( SysFlag  flag)
private
Parameters
[in]flag
Returns

Definition at line 1068 of file AliMCSpectraWeights.cxx.

Referenced by LoadMeasuredFractions().

TH3F* AliMCSpectraWeights::GetHistDataFraction ( ) const
inline

Definition at line 167 of file AliMCSpectraWeights.h.

TH3F* AliMCSpectraWeights::GetHistMCFraction ( ) const
inline

Definition at line 168 of file AliMCSpectraWeights.h.

TH3F* AliMCSpectraWeights::GetHistMCGenPrimTrackParticles ( ) const
inline

Definition at line 164 of file AliMCSpectraWeights.h.

Referenced by LoadFromAliMCSpectraWeight().

TH3F* AliMCSpectraWeights::GetHistMCWeights ( ) const
inline

Definition at line 169 of file AliMCSpectraWeights.h.

float AliMCSpectraWeights::GetMCSpectraWeight ( TParticle *  mcGenParticle,
float  eventMultiplicityOrCentrality 
)

main function to use. Will deliver correct weights to re-weight the abundances of different particle species

Parameters
[in]mcGenParticle
[in]eventMultiplicityOrCentrality
Returns

Definition at line 651 of file AliMCSpectraWeights.cxx.

Referenced by GetMCSpectraWeight().

float AliMCSpectraWeights::GetMCSpectraWeight ( TParticle *  mcGenParticle,
AliMCEvent *  mcEvent 
)

preferable to use this

Parameters
[in]mcGenParticle
[in]mcEvent
Returns

Definition at line 693 of file AliMCSpectraWeights.cxx.

double AliMCSpectraWeights::GetMultFromCent ( int  CentBin) const
private
double AliMCSpectraWeights::GetMultFromCent ( std::string  cent)
private
Parameters
[in]cent
Returns

Definition at line 898 of file AliMCSpectraWeights.cxx.

float AliMCSpectraWeights::GetMultOrCent ( ) const
inline

Definition at line 171 of file AliMCSpectraWeights.h.

std::vector< float > AliMCSpectraWeights::GetMultTupleFromCent ( int  CentBin) const
private
Parameters
[in]CentBin
Returns

Definition at line 908 of file AliMCSpectraWeights.cxx.

Referenced by CalcMCFractions(), and CorrectFractionsforRest().

int AliMCSpectraWeights::GetNPartTypes ( ) const
inline

Definition at line 162 of file AliMCSpectraWeights.h.

const std::vector<std::string>& AliMCSpectraWeights::GetParticleTypes ( ) const
inline

Definition at line 161 of file AliMCSpectraWeights.h.

int AliMCSpectraWeights::GetPartTypeNumber ( AliMCSpectraWeights::ParticleType  type)
private
int AliMCSpectraWeights::GetPartTypeNumber ( std::string  Particle)
private
Parameters
[in]Particle
Returns

Definition at line 1039 of file AliMCSpectraWeights.cxx.

SysFlag AliMCSpectraWeights::GetSysFlag ( ) const
inline

Definition at line 170 of file AliMCSpectraWeights.h.

std::string AliMCSpectraWeights::GetSysVarFromSysFlag ( SysFlag  flag)
private

Definition at line 1121 of file AliMCSpectraWeights.cxx.

Referenced by LoadMeasuredFractions().

int AliMCSpectraWeights::GetTaskStatus ( ) const
inline

Definition at line 163 of file AliMCSpectraWeights.h.

int AliMCSpectraWeights::IdentifyMCParticle ( TParticle *  mcParticle)
Parameters
[in]mcParticle
Returns

Definition at line 759 of file AliMCSpectraWeights.cxx.

Referenced by FillMCSpectra(), GetMCSpectraWeight(), and GetMultOrCent().

void AliMCSpectraWeights::Init ( )

Initialisation of object.

Function to start initalizing after all setters are made.

To be called after all settings were made. Will create all internal histograms, load the input from previous train outputs if available, load the expert input from alien, calculate weight factors. Set proper internal status depending on what is avaiable

Definition at line 172 of file AliMCSpectraWeights.cxx.

void AliMCSpectraWeights::InitHistos ( )
private

Create all internal histograms.

Definition at line 258 of file AliMCSpectraWeights.cxx.

Referenced by Init().

bool AliMCSpectraWeights::LoadFromAliMCSpectraWeight ( AliMCSpectraWeights obj)
private

Load the information from a previous train output.

Parameters
[in]objpointer to object from previous train output

Definition at line 379 of file AliMCSpectraWeights.cxx.

bool AliMCSpectraWeights::LoadFromTHnF ( const char *  histname)
private
void AliMCSpectraWeights::LoadMeasuredFractions ( )
private

Load measured fractions (expert input) from alien.

Definition at line 322 of file AliMCSpectraWeights.cxx.

Referenced by Init().

void AliMCSpectraWeights::SetBinsMultCent ( std::vector< double >  bins)

function to set multiplicity binning of all internal histograms

Parameters
binsa std::vector of doubles containing the binning

Definition at line 156 of file AliMCSpectraWeights.cxx.

void AliMCSpectraWeights::SetBinsPt ( std::vector< double >  bins)

function to set pt binning of all internal histograms

Parameters
binsa std::vector of doubles containing the binning

Definition at line 148 of file AliMCSpectraWeights.cxx.

void AliMCSpectraWeights::SetCollisionSystem ( const char *  system)
inline

Definition at line 153 of file AliMCSpectraWeights.h.

void AliMCSpectraWeights::SetDataFractionsFile ( const char *  file)
inline

Definition at line 152 of file AliMCSpectraWeights.h.

void AliMCSpectraWeights::SetMCSpectraFile ( const char *  file)
inline

Definition at line 151 of file AliMCSpectraWeights.h.

void AliMCSpectraWeights::SetSavedListName ( const char *  name)
inline

Definition at line 156 of file AliMCSpectraWeights.h.

void AliMCSpectraWeights::SetSavedObjName ( const char *  name)
inline

Definition at line 155 of file AliMCSpectraWeights.h.

void AliMCSpectraWeights::SetSysFlag ( SysFlag  flag)
inline

Definition at line 157 of file AliMCSpectraWeights.h.

void AliMCSpectraWeights::SetUseMultiplicity ( bool  bMult)
inline

Definition at line 154 of file AliMCSpectraWeights.h.

Member Data Documentation

std::vector<float> AliMCSpectraWeights::fBinsMultCent
private

centrality or multiplicity binning

Definition at line 75 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), InitHistos(), and SetBinsMultCent().

std::vector<float> AliMCSpectraWeights::fBinsPt
private

pT binning

Definition at line 76 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), CalculateMCWeights(), GetBinsPt(), InitHistos(), and SetBinsPt().

TaskState AliMCSpectraWeights::fbTaskStatus
private
SysFlag AliMCSpectraWeights::fFlag
private

enum flag for systematic variation

Definition at line 87 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), GetSysFlag(), and LoadMeasuredFractions().

TH3F* AliMCSpectraWeights::fHistDataFractions
private

Histogram for particle abundances from published data

Definition at line 78 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), CalculateMCWeights(), CorrectFractionsforRest(), GetHistDataFraction(), InitHistos(), and LoadMeasuredFractions().

TH3F* AliMCSpectraWeights::fHistMCFractions
private

Histogram for particle abundances from MC

Definition at line 80 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), CalcMCFractions(), CalculateMCWeights(), GetHistMCFraction(), and InitHistos().

TH3F* AliMCSpectraWeights::fHistMCGenPrimTrackParticle
private
TH3F* AliMCSpectraWeights::fHistMCWeights
private

Histogram for weight factors to re-weight MCabundances to data ones.

Definition at line 81 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), CalculateMCWeights(), GetHistMCWeights(), GetMCSpectraWeight(), and InitHistos().

AliMCEvent* AliMCSpectraWeights::fMCEvent
private
float AliMCSpectraWeights::fMultOrCent
private

counted multiplicity or centrality class

Definition at line 83 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), CountEventMult(), FillMCSpectra(), GetMCSpectraWeight(), and GetMultOrCent().

int AliMCSpectraWeights::fNCentralities
private

number of selected centrality classes

Definition at line 85 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), CalcMCFractions(), CalculateMCWeights(), CorrectFractionsforRest(), and GetMultTupleFromCent().

int AliMCSpectraWeights::fNPartTypes
private

number of particle species

Definition at line 84 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), CalcMCFractions(), CalculateMCWeights(), CorrectFractionsforRest(), and GetNPartTypes().

std::vector<std::string> AliMCSpectraWeights::fstCentralities
private
std::string AliMCSpectraWeights::fstCollisionSystem
private
std::string AliMCSpectraWeights::fstFileMCSpectra
private

path to previous train output of MC fractions

Definition at line 69 of file AliMCSpectraWeights.h.

Referenced by Init().

std::string AliMCSpectraWeights::fstFilePublished
private

path to calculated fractions from published spectra

Definition at line 70 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), and LoadMeasuredFractions().

std::vector<std::string> AliMCSpectraWeights::fstPartTypes
private
std::string AliMCSpectraWeights::fstSavedListName
private

Definition at line 72 of file AliMCSpectraWeights.h.

Referenced by Init().

std::string AliMCSpectraWeights::fstSavedObjName
private

Definition at line 71 of file AliMCSpectraWeights.h.

bool AliMCSpectraWeights::fUseMultiplicity
private

switch to use multiplicity instead of centrality

Definition at line 88 of file AliMCSpectraWeights.h.

Referenced by AliMCSpectraWeights(), and LoadMeasuredFractions().


The documentation for this class was generated from the following files: