AliPhysics  cdeda5a (cdeda5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
 
Bool_t CheckTracklet (const AliAODTracklet *tracklet) const
 
Double_t LookupWeight (AliAODTracklet *tracklet, Double_t cent, Double_t ipz, TH2 *corr=0) const
 
virtual Double_t CalcWeight (AliAODTracklet *tracklet, Double_t cent, Double_t ipz, TH2 *corr) const =0
 
virtual TCollectionStore (TCollection *parent)
 
virtual TCollectionRetrieve (TCollection *in)
 
Bool_t IsFolder () const
 
virtual void Print (Option_t *option="") const
 
 ClassDef (AliTrackletBaseWeights, 1)
 

Public Attributes

UChar_t fCalc
 
UChar_t fMask
 
UChar_t fVeto
 
Bool_t fInverse
 

Detailed Description

Base class for tracklets weights

Definition at line 71 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 77 of file AliTrackletWeights.C.

Constructor & Destructor Documentation

AliTrackletBaseWeights::AliTrackletBaseWeights ( )
inline

Default constructor - ROOT I/O only

Definition at line 125 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 137 of file AliTrackletWeights.C.

AliTrackletBaseWeights::AliTrackletBaseWeights ( const AliTrackletBaseWeights o)
inline

Copy constructor

Parameters
oObject to copy from

Definition at line 150 of file AliTrackletWeights.C.

virtual AliTrackletBaseWeights::~AliTrackletBaseWeights ( )
inlinevirtual

Destructor

Definition at line 160 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.

Referenced by LookupWeight().

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 254 of file AliTrackletWeights.C.

Referenced by LookupWeight().

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

Definition at line 343 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 278 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 169 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 349 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::Print(), AliTrackletDeltaWeights::Print(), and AliTrackletAODWeightedMCdNdeta::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 326 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 226 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 246 of file AliTrackletWeights.C.

void AliTrackletBaseWeights::SetMask ( UChar_t  mask)
inline

Set the tracklet mask

Parameters
maskMask to use

Definition at line 232 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 238 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 308 of file AliTrackletWeights.C.

Referenced by AliTrackletPtPidStrWeights::Store().

Member Data Documentation

UChar_t AliTrackletBaseWeights::fCalc
Bool_t AliTrackletBaseWeights::fInverse

Definition at line 363 of file AliTrackletWeights.C.

Referenced by LookupWeight(), operator=(), and SetInverse().

UChar_t AliTrackletBaseWeights::fMask

Definition at line 361 of file AliTrackletWeights.C.

Referenced by CheckTracklet(), operator=(), Print(), Retrieve(), SetMask(), and Store().

UChar_t AliTrackletBaseWeights::fVeto

Definition at line 362 of file AliTrackletWeights.C.

Referenced by CheckTracklet(), operator=(), Print(), Retrieve(), SetVeto(), and Store().


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