AliPhysics  a6017e1 (a6017e1)
AliTrackletBaseWeights Class Referenceabstract
Inheritance diagram for AliTrackletBaseWeights:

Public Types

enum  ECalc { kProduct, kSquare, kSum, kAverage }
 

Public Member Functions

 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
 
virtual Double_t CalcWeight (AliAODTracklet *tracklet, Double_t cent, Double_t ipz, TH2 *corr) const =0
 
virtual Double_t CalcWeight (TParticle *particle, Double_t cent, Double_t ipZ) const =0
 
virtual TCollectionStore (TCollection *parent)
 
virtual TCollectionRetrieve (TCollection *in)
 
Bool_t IsFolder () const
 
virtual void Print (Option_t *option="") const
 

Public Attributes

UChar_t fCalc
 
UChar_t fMask
 
UChar_t fVeto
 
Bool_t fInverse
 
Int_t fDebug
 

Related Functions

(Note that these are not member functions.)

Calculate epos-lhc weights
void MakeEposWeight (const char *file1, const char *file2)
 
Name @f$ K_S^0@f$ weights
void MakeK0S ()
 
Make realistic weights
void MakeRealistic ()
 
Make Ruben's weights
void MakeRuben ()
 
Make strangeness weights
void MakeStrange ()
 
Make Roberto's weights
void MakeWeight ()
 
Read in weights
void ReadWeights (const char *filename="weights.root")
 

Detailed Description

Base class for tracklets weights

Definition at line 73 of file AliTrackletWeights.C.

Member Enumeration Documentation

Mode calculation

Enumerator
kProduct 

Tracklet weights calculated as

\[ w_{ij} = \left\{\begin{array}{cl} w_i & i=j \mbox{ good tracklets}\\ w_i w_j & i\neq j \mbox{ fake tracklets} \end{array}\right. \]

kSquare 

Tracklet weights calculated as

\[ w_{ij} = \sqrt{w_i w_j} = \left\{\begin{array}{cl} w_i & i=j \mbox{ good tracklets}\\ \sqrt{w_i w_j} & i\neq j \mbox{ fake tracklets} \end{array}\right. \]

kSum 

Tracklet weights calculated as

\[ w_{ij} = 1+(w_i-1)+(w_j-1) \]

kAverage 

Tracklet weights calculated as

\[ w_{ij} = 1+\frac{(w_i-1)+(w_j-1)}{2} = \frac{w_i + w_j}{2} = \left\{\begin{array}{cl} w_i & i=j \mbox{ good tracklets}\\ (w_i + w_j)/2 & i\neq j \mbox{ fake tracklets} \end{array}\right. \]

Definition at line 79 of file AliTrackletWeights.C.

Constructor & Destructor Documentation

AliTrackletBaseWeights::AliTrackletBaseWeights ( )
inline

Default constructor - ROOT I/O only

Definition at line 127 of file AliTrackletWeights.C.

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

Named constructor

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

Definition at line 141 of file AliTrackletWeights.C.

AliTrackletBaseWeights::AliTrackletBaseWeights ( const AliTrackletBaseWeights o)
inline

Copy constructor

Parameters
oObject to copy from

Definition at line 155 of file AliTrackletWeights.C.

virtual AliTrackletBaseWeights::~AliTrackletBaseWeights ( )
inlinevirtual

Destructor

Definition at line 166 of file AliTrackletWeights.C.

Member Function Documentation

virtual Double_t AliTrackletBaseWeights::CalcWeight ( AliAODTracklet tracklet,
Double_t  cent,
Double_t  ipz,
TH2 corr 
) const
pure virtual

Calculate the weight of a tracklet. This member function must be overloaded.

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

Implemented in AliTrackletDeltaWeights, and AliTrackletPtPidStrWeights.

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

Calculate weight of a particle

Parameters
particleParticle
centCentrality
ipZInteraction point
Returns
The weight

Implemented in AliTrackletDeltaWeights, and AliTrackletPtPidStrWeights.

Bool_t AliTrackletBaseWeights::CheckTracklet ( const AliAODTracklet tracklet) const
inline

Check if tracklet is to be reweighed according to mask and veto

Parameters
trackletTracklet
Returns
true if to be weighed, false otherwise

Definition at line 267 of file AliTrackletWeights.C.

Bool_t AliTrackletBaseWeights::IsFolder ( ) const
inline
Returns
always true

Definition at line 388 of file AliTrackletWeights.C.

Double_t AliTrackletBaseWeights::LookupWeight ( AliAODTracklet tracklet,
Double_t  cent,
Double_t  ipz,
TH2 corr = 0 
) const
inline

Find the tracklet weight

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

Definition at line 293 of file AliTrackletWeights.C.

Double_t AliTrackletBaseWeights::LookupWeight ( TParticle *  particle,
Double_t  cent,
Double_t  ipz 
) const
inline

Look-up weight of a particle

Parameters
particleParticle
centCentrality
ipzInteraction point z-coordinate
Returns
The weight

Definition at line 312 of file AliTrackletWeights.C.

AliTrackletBaseWeights& AliTrackletBaseWeights::operator= ( const AliTrackletBaseWeights o)
inline

Assignment operator

Parameters
oObject to assign from
Returns
Reference to this object

Definition at line 175 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::operator=(), and AliTrackletDeltaWeights::operator=().

virtual void AliTrackletBaseWeights::Print ( Option_t option = "") const
inlinevirtual

Print information on reweights

Parameters
optionNot used

Reimplemented in AliTrackletDeltaWeights, and AliTrackletPtPidStrWeights.

Definition at line 394 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::Print(), and AliTrackletDeltaWeights::Print().

virtual TCollection* AliTrackletBaseWeights::Retrieve ( TCollection in)
inlinevirtual

Retrieve weights from a collection

Parameters
inInput collection
Returns
Container read from or null

Reimplemented in AliTrackletPtPidStrWeights.

Definition at line 371 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::Retrieve().

void AliTrackletBaseWeights::SetCalc ( UChar_t  mode = kProduct)
inline

Set the mode for calculating the weight of a tracklet. A tracklet consist of two clusters with labels \( i\) and \( j\). A weight ( \( w_i\) and \( w_j\)) is assigned to each of the particles corresponding to the tracks with these labels. The weight is calculated from the particle species and transverse momentum of the primary mother particle of the tracks \( i\) and \( j\). The weight of a tracklet can then be calculated in four different ways

Product

\[ w = \left\{\begin{array}{cl} w_i & \mbox{for} i=j\\ w_i w_j & \mbox{for} i\neq j\\ \end{array}\right.\quad, \]

Square root of product of weights

\[ w = \left\{\begin{array}{cl} w_i & \mbox{for} i=j\\ \sqrt(w_i w_j) & \mbox{for} i\neq j\\ \end{array}\right.\quad, \]

Sum of weights

\[ w = 1 + \left\{\begin{array}{cl} 2(w_i-1) & \mbox{for} i=j\\ (w_i-1) + (w_j-1) & \mbox{for} i\neq j\\ \end{array}\right.\quad, \]

Average of weights

\[ w = 1 + \left\{\begin{array}{cl} (w_i-1) & \mbox{for} i=j\\ ((w_i-1) + (w_j-1))/2 & \mbox{for} i\neq j\\ \end{array}\right.\quad. \]

Parameters
modeWhether to take square root or not

Definition at line 233 of file AliTrackletWeights.C.

void AliTrackletBaseWeights::SetDebug ( Int_t  lvl)
inline

Set the debug level

Parameters
lvlDebug level

Definition at line 259 of file AliTrackletWeights.C.

void AliTrackletBaseWeights::SetInverse ( Bool_t  inv)
inline

Inverse the weights calculated. That is, if this option is enabled, then the weight used is \(1/w\) where \(w\) is the normal weight.

Parameters
invIf true, inverse weights

Definition at line 253 of file AliTrackletWeights.C.

void AliTrackletBaseWeights::SetMask ( UChar_t  mask)
inline

Set the tracklet mask

Parameters
maskMask to use

Definition at line 239 of file AliTrackletWeights.C.

Referenced by MakeRuben().

void AliTrackletBaseWeights::SetVeto ( UChar_t  veto)
inline

Set the tracklet veto

Parameters
vetoVeto to use

Definition at line 245 of file AliTrackletWeights.C.

Referenced by MakeRuben().

virtual TCollection* AliTrackletBaseWeights::Store ( TCollection parent)
inlinevirtual

Store values

Parameters
parentParent container

Reimplemented in AliTrackletPtPidStrWeights.

Definition at line 352 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::Store().

Friends And Related Function Documentation

void MakeEposWeight ( const char *  file1,
const char *  file2 
)
related

Make EPOS weights

Parameters
file1
file2

Definition at line 54 of file MakeEposWeight.C.

void MakeK0S ( )
related

Make \( K^0_S\) weights

Definition at line 24 of file MakeK0S.C.

void MakeRealistic ( )
related

Make realistic weights

Definition at line 23 of file MakeRealistic.C.

void MakeRuben ( )
related

Make Ruben's weights

Definition at line 23 of file MakeRuben.C.

void MakeStrange ( )
related

Make strangeness weights

Definition at line 23 of file MakeStrange.C.

void MakeWeight ( )
related

Extract weights from Roberto's files

Definition at line 23 of file MakeWeight.C.

void ReadWeights ( const char *  filename = "weights.root")
related

Read in weights and plot

Parameters
filename

Definition at line 23 of file ReadWeights.C.

Member Data Documentation

UChar_t AliTrackletBaseWeights::fCalc

Definition at line 406 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::CalcWeight(), and operator=().

Int_t AliTrackletBaseWeights::fDebug

Definition at line 410 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::CalcWeight(), and operator=().

Bool_t AliTrackletBaseWeights::fInverse

Definition at line 409 of file AliTrackletWeights.C.

Referenced by operator=().

UChar_t AliTrackletBaseWeights::fMask

Definition at line 407 of file AliTrackletWeights.C.

Referenced by operator=().

UChar_t AliTrackletBaseWeights::fVeto

Definition at line 408 of file AliTrackletWeights.C.

Referenced by operator=().


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