AliPhysics  2b88e80 (2b88e80)
AliTrackletPtPidStrWeights Class Reference
Inheritance diagram for AliTrackletPtPidStrWeights:

Public Types

enum  EMode { kUp = (0x1) << 14, kDown = (0x2) << 14, kDisabled = (0x4) << 14 }
 
typedef std::map< short, TH1D * > PdgMap
 
- Public Types inherited from AliTrackletBaseWeights
enum  ECalc { kProduct, kSquare, kSum, kAverage }
 

Public Member Functions

 AliTrackletPtPidStrWeights ()
 
 AliTrackletPtPidStrWeights (const char *name, const char *title="Sim. tracklet weights")
 
 AliTrackletPtPidStrWeights (const AliTrackletPtPidStrWeights &o)
 
virtual ~AliTrackletPtPidStrWeights ()
 
AliTrackletPtPidStrWeightsoperator= (const AliTrackletPtPidStrWeights &o)
 
virtual Double_t CalcWeight (AliAODTracklet *tracklet, Double_t cent, Double_t ipz, TH2 *corr=0) const
 
virtual Double_t CalcWeight (TParticle *particle, Double_t cent, Double_t ipZ) const
 
Bool_t AddAbundanceWeight (Short_t pdg, const TH1D *h, UShort_t mode=0)
 
Bool_t AddStrangenessWeight (Short_t pdg, const TH1D *h, UShort_t mode=0)
 
Bool_t SetPtWeight (const TH2D *h, UShort_t mode=0)
 
void SetAbundanceMode (Short_t pdg, UShort_t mode)
 
void SetStrangenessMode (Short_t pdg, UShort_t mode)
 
void SetPtMode (UShort_t mode)
 
void Draw (Option_t *option="")
 
void Print (Option_t *option="") const
 
TCollectionStore (TCollection *out)
 
TCollectionRetrieve (TCollection *in)
 
Double_t GetAbundanceWeight (UShort_t apdg, Double_t cent) const
 
Double_t GetStrangenessWeight (UShort_t apdg, Double_t cent) const
 
- Public Member Functions inherited from AliTrackletBaseWeights
 AliTrackletBaseWeights ()
 
 AliTrackletBaseWeights (const char *name, const char *title="Sim. tracklet weights")
 
 AliTrackletBaseWeights (const AliTrackletBaseWeights &o)
 
virtual ~AliTrackletBaseWeights ()
 
AliTrackletBaseWeightsoperator= (const AliTrackletBaseWeights &o)
 
void SetCalc (UChar_t mode=kProduct)
 
void SetMask (UChar_t mask)
 
void SetVeto (UChar_t veto)
 
void SetInverse (Bool_t inv)
 
void SetDebug (Int_t lvl)
 
Bool_t CheckTracklet (const AliAODTracklet *tracklet) const
 
Double_t LookupWeight (AliAODTracklet *tracklet, Double_t cent, Double_t ipz, TH2 *corr=0) const
 
Double_t LookupWeight (TParticle *particle, Double_t cent, Double_t ipz) const
 
Bool_t IsFolder () const
 

Protected Member Functions

virtual Double_t CalcWeight (Double_t pT, Short_t pdg, Double_t cent) const
 
TH1DGetPdgHist (const PdgMap &m, Short_t pdg) const
 
virtual Double_t GetPdgWeight (const PdgMap &m, UShort_t apdg, Double_t cent) const
 
Bool_t AddPdgWeight (PdgMap &map, Short_t pdg, const TH1D *w, UShort_t mode=0)
 
void SetPdgMode (PdgMap &map, Short_t pdg, UShort_t mode)
 
void StoreMap (TCollection *parent, const char *name, PdgMap &m)
 
Bool_t RetrieveMap (TCollection *parent, const char *name, PdgMap &m)
 
void ModStack (THStack *stack)
 
void PrintMap (const PdgMap &m, const char *name, Option_t *options="") const
 
void PrintHist (const char *tag, TH1 *h) const
 

Protected Attributes

TH2DfPt
 
PdgMap fAbundance
 
PdgMap fStrangeness
 

Additional Inherited Members

- Public Attributes inherited from AliTrackletBaseWeights
UChar_t fCalc
 
UChar_t fMask
 
UChar_t fVeto
 
Bool_t fInverse
 
Int_t fDebug
 

Detailed Description

Simulation weights

Definition at line 420 of file AliTrackletWeights.C.

Member Typedef Documentation

typedef std::map<short,TH1D*> AliTrackletPtPidStrWeights::PdgMap

Map a particle species to a weight

Definition at line 436 of file AliTrackletWeights.C.

Member Enumeration Documentation

Mode of weights

Enumerator
kUp 

If this bit is set, adjust weight up by error

kDown 

If this bit is set, adjust weight down by error

kDisabled 

If this bit is set, the weight is disabled

Definition at line 426 of file AliTrackletWeights.C.

Constructor & Destructor Documentation

AliTrackletPtPidStrWeights::AliTrackletPtPidStrWeights ( )
inline

Default constructor - ROOT I/O only

Definition at line 441 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights().

AliTrackletPtPidStrWeights::AliTrackletPtPidStrWeights ( const char *  name,
const char *  title = "Sim. tracklet weights" 
)

Named constructor

Parameters
nameName of object
title(optional) free-form title

Definition at line 727 of file AliTrackletWeights.C.

AliTrackletPtPidStrWeights::AliTrackletPtPidStrWeights ( const AliTrackletPtPidStrWeights o)

Copy constructor

Parameters
oObject to copy from

Definition at line 737 of file AliTrackletWeights.C.

virtual AliTrackletPtPidStrWeights::~AliTrackletPtPidStrWeights ( )
inlinevirtual

Destructor

Definition at line 464 of file AliTrackletWeights.C.

Member Function Documentation

Bool_t AliTrackletPtPidStrWeights::AddAbundanceWeight ( Short_t  pdg,
const TH1D h,
UShort_t  mode = 0 
)
inline

Add a histogram to weight particle abundances

Parameters
pdgParticle species
hWeight of particle specie as a function of centrality.
modeMode of this weight (+1: up, 0: normal, -1: down)
Returns
true on success.

Definition at line 500 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights(), AliTrackletBaseWeights::MakeStrange(), AliTrackletBaseWeights::MakeWeight(), operator=(), and PureMCWeights::Run().

Bool_t AliTrackletPtPidStrWeights::AddPdgWeight ( PdgMap map,
Short_t  pdg,
const TH1D w,
UShort_t  mode = 0 
)
protected

Add a weight histogram

Parameters
mapMap of weights
pdgParticle species
wWeight histogram
modeMode of this weight (+1: up, 0: normal, -1: down)
Returns
true on success

Definition at line 771 of file AliTrackletWeights.C.

Referenced by RetrieveMap().

Bool_t AliTrackletPtPidStrWeights::AddStrangenessWeight ( Short_t  pdg,
const TH1D h,
UShort_t  mode = 0 
)
inline

Add a histogram to weight strange particle abundances

Parameters
pdgParticle species
hWeight of particle specie as a function of centrality.
modeMode of this weight (+1: up, 0: normal, -1: down)
Returns
true on success.

Definition at line 513 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights(), AliTrackletBaseWeights::MakeK0S(), AliTrackletBaseWeights::MakeRealistic(), AliTrackletBaseWeights::MakeRuben(), AliTrackletBaseWeights::MakeStrange(), AliTrackletBaseWeights::MakeWeight(), and operator=().

Double_t AliTrackletPtPidStrWeights::CalcWeight ( AliAODTracklet tracklet,
Double_t  cent,
Double_t  ipz,
TH2 corr = 0 
) const
virtual

Find the tracklet weight

Parameters
trackletTracklet
centCentrality
ipzInteraction point Z coordinate
corrOptional histogram to fill with correlation of weights
Returns
The weight

Implements AliTrackletBaseWeights.

Definition at line 894 of file AliTrackletWeights.C.

Referenced by CalcWeight(), and AliTrackletDeltaWeights::~AliTrackletDeltaWeights().

Double_t AliTrackletPtPidStrWeights::CalcWeight ( TParticle *  particle,
Double_t  cent,
Double_t  ipZ 
) const
virtual

Calculate weight of a particle

Parameters
particleParticle
centCentrality
ipZInteraction point
Returns
The weight

Implements AliTrackletBaseWeights.

Definition at line 883 of file AliTrackletWeights.C.

Double_t AliTrackletPtPidStrWeights::CalcWeight ( Double_t  pT,
Short_t  pdg,
Double_t  cent 
) const
protectedvirtual

Look-up weight based on transverse momentum pT, particle species pdf and event centrality cent. This is used to calculate the weight of a cluster.

Parameters
pT(mother) particle transverse momentum
pdg(mother) particle specie number
centEvent centrality
Returns
The accumulated weight

Definition at line 850 of file AliTrackletWeights.C.

Double_t AliTrackletPtPidStrWeights::GetAbundanceWeight ( UShort_t  apdg,
Double_t  cent 
) const
inline

Get the abundance weight of a given particle type for a given centrality

Parameters
apdgAbsolute value of the particle PDG identifier
centCentrality
Returns
The associated weight

Definition at line 605 of file AliTrackletWeights.C.

TH1D * AliTrackletPtPidStrWeights::GetPdgHist ( const PdgMap m,
Short_t  pdg 
) const
protected

Get the histogram associated with a particle species in a given map.

Parameters
pdgParticle species
mMap
Returns
Pointer to histogram or null

Definition at line 821 of file AliTrackletWeights.C.

Referenced by GetPdgWeight(), and SetPdgMode().

Double_t AliTrackletPtPidStrWeights::GetPdgWeight ( const PdgMap m,
UShort_t  apdg,
Double_t  cent 
) const
protectedvirtual

Get a PDG depedent weight.

Parameters
mMap to look up in
apdgThe absolute value of the PDG code
centThe event centrality
Returns
the weight associated with the particle

Definition at line 830 of file AliTrackletWeights.C.

Referenced by CalcWeight().

Double_t AliTrackletPtPidStrWeights::GetStrangenessWeight ( UShort_t  apdg,
Double_t  cent 
) const
inline

Get the strangeness weight of a given particle type for a given centrality

Parameters
apdgAbsolute value of the particle PDG identifier
centCentrality
Returns
The associated weight

Definition at line 618 of file AliTrackletWeights.C.

void AliTrackletPtPidStrWeights::ModStack ( THStack *  stack)
protected

Modify a drawn stack

Parameters
stackStack to modify

Definition at line 933 of file AliTrackletWeights.C.

Referenced by Draw().

AliTrackletPtPidStrWeights & AliTrackletPtPidStrWeights::operator= ( const AliTrackletPtPidStrWeights o)

Assignment operator

Parameters
oObject to assign from
Returns
Reference to this object

Definition at line 754 of file AliTrackletWeights.C.

Referenced by AliTrackletDeltaWeights::~AliTrackletDeltaWeights().

void AliTrackletPtPidStrWeights::PrintHist ( const char *  tag,
TH1 h 
) const
protected

Print info on a histogram

Parameters
tagTag line
hhistogramT

Definition at line 1110 of file AliTrackletWeights.C.

Referenced by Print(), and PrintMap().

void AliTrackletPtPidStrWeights::PrintMap ( const PdgMap m,
const char *  name,
Option_t options = "" 
) const
protected

Print a map

Parameters
mThe map
nameName of map
optionsOptions

Definition at line 1123 of file AliTrackletWeights.C.

Referenced by Print().

TCollection * AliTrackletPtPidStrWeights::Retrieve ( TCollection in)
virtual

Retrieve weights from a collection

Parameters
inInput collection
Returns
Container read from or null

Reimplemented from AliTrackletBaseWeights.

Definition at line 990 of file AliTrackletWeights.C.

Bool_t AliTrackletPtPidStrWeights::RetrieveMap ( TCollection parent,
const char *  name,
PdgMap m 
)
protected

Retrieve map contents from an input collection

Parameters
parentInput collection
nameName of collection
mMap to add to
Returns
true on success

Definition at line 1011 of file AliTrackletWeights.C.

Referenced by Retrieve().

void AliTrackletPtPidStrWeights::SetAbundanceMode ( Short_t  pdg,
UShort_t  mode 
)
inline

Set the mode of a single particle abundance weight. Mode is a bit mask of

  • kDisabled: The weight is disabled - i.e., will be 1
  • kUp: The weight is adjusted up by the error of the weight
  • kDown: The weight is adjusted down by the error of the weight
Parameters
pdgParticle specie
modeMode of this weight (+1: up, 0: normal, -1: down)

Definition at line 538 of file AliTrackletWeights.C.

void AliTrackletPtPidStrWeights::SetPdgMode ( PdgMap map,
Short_t  pdg,
UShort_t  mode 
)
protected

Set the mode of a single particle weight. Mode is a bit mask of

  • kDisabled: The weight is disabled - i.e., will be 1
  • kUp: The weight is adjusted up by the error of the weight
  • kDown: The weight is adjusted down by the error of the weight
Parameters
mapMap
pdgParticle specie
modeMode

Definition at line 813 of file AliTrackletWeights.C.

void AliTrackletPtPidStrWeights::SetPtMode ( UShort_t  mode)

Set the mode of a transverse momentum weight. Mode is a bit mask of

  • kDisabled: The weight is disabled - i.e., will be 1
  • kUp: The weight for \( p_T<0.05\) is adjusted by +30%
  • kDown: The weight for \( p_T<0.05\) is adjusted by -30%
Parameters
modeMode

Definition at line 808 of file AliTrackletWeights.C.

Bool_t AliTrackletPtPidStrWeights::SetPtWeight ( const TH2D h,
UShort_t  mode = 0 
)

Set the weight histogram per transverse momentum and centrality

Parameters
hhistogram of (centrality vs pT) weights
modeMode of this weight (+1: up, 0: normal, -1: down)
Returns
true on success

Definition at line 793 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights(), AliTrackletBaseWeights::MakeEposWeight(), AliTrackletBaseWeights::MakeWeight(), operator=(), and PureMCWeights::Run().

void AliTrackletPtPidStrWeights::SetStrangenessMode ( Short_t  pdg,
UShort_t  mode 
)
inline

Set the mode of a single particle strangeness weight. Mode is a bit mask of

  • kDisabled: The weight is disabled - i.e., will be 1
  • kUp: The weight is adjusted up by the error of the weight
  • kDown: The weight is adjusted down by the error of the weight
Parameters
pdgParticle specie
modeMode

Definition at line 553 of file AliTrackletWeights.C.

TCollection * AliTrackletPtPidStrWeights::Store ( TCollection out)
virtual

Store weights histograms in output of analysis

Parameters
outCollection to add histograms to
Returns
Output container

Reimplemented from AliTrackletBaseWeights.

Definition at line 953 of file AliTrackletWeights.C.

void AliTrackletPtPidStrWeights::StoreMap ( TCollection parent,
const char *  name,
PdgMap m 
)
protected

Write a maps histograms to an output container

Parameters
parentOutput container
nameName of output sub-container
mMap of weights

Definition at line 971 of file AliTrackletWeights.C.

Referenced by Store().

Member Data Documentation

PdgMap AliTrackletPtPidStrWeights::fAbundance
protected
TH2D* AliTrackletPtPidStrWeights::fPt
protected
PdgMap AliTrackletPtPidStrWeights::fStrangeness
protected

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