Project
Loading...
Searching...
No Matches
o2::emcal::ClusterFactory< InputType > Class Template Reference

EMCal clusters factory Ported from class AliEMCALcluster. More...

#include <ClusterFactory.h>

Classes

class  CellIndexRangeException
 
class  ClusterIterator
 
class  ClusterRangeException
 
class  GeometryNotSetException
 
class  UninitLookUpTableException
 Exception handling uninitialized look up table. More...
 

Public Member Functions

 ClusterFactory ()=default
 Dummy constructor.
 
 ClusterFactory (gsl::span< const o2::emcal::Cluster > clustersContainer, gsl::span< const InputType > inputsContainer, gsl::span< const int > cellsIndices)
 Constructor initializing the ClusterFactory.
 
 ClusterFactory (const ClusterFactory &rp)=default
 Copy constructor.
 
ClusterFactoryoperator= (const ClusterFactory &cf)=default
 Assignment operator.
 
 ~ClusterFactory ()=default
 Destructor.
 
ClusterIterator begin () const
 Get forward start iterator.
 
ClusterIterator end () const
 Get forward end iteration marker.
 
ClusterIterator rbegin () const
 Get backward start iterator.
 
ClusterIterator rend () const
 Get backward end iteration marker.
 
void reset ()
 Reset containers.
 
AnalysisCluster buildCluster (int index, o2::emcal::ClusterLabel *clusterLabel=nullptr) const
 evaluates cluster parameters: position, shower shape, primaries ...
 
void SetECALogWeight (Float_t w)
 
float GetECALogWeight () const
 
void doEvalLocal2tracking (bool justCluster)
 
void evalLocalPosition (gsl::span< const int > inputsIndices, AnalysisCluster &cluster) const
 Calculates the center of gravity in the local EMCAL-module coordinates.
 
void evalGlobalPosition (gsl::span< const int > inputsIndices, AnalysisCluster &cluster) const
 Calculates the center of gravity in the global ALICE coordinates.
 
void evalLocal2TrackingCSTransform () const
 
void evalLocalPositionFit (Double_t deff, Double_t w0, Double_t phiSlope, gsl::span< const int > inputsIndices, AnalysisCluster &cluster) const
 evaluates local position of clusters in SM
 
std::tuple< int, float, float, bool > getMaximalEnergyIndex (gsl::span< const int > inputsIndices) const
 Finds the maximum energy in the cluster and computes the Summed amplitude of digits/cells.
 
bool isExoticCell (short towerId, float ecell, float const exoticTime) const
 Look to cell neighbourhood and reject if it seems exotic.
 
float getECross (short absID, float energy, float const exoticTime) const
 Calculate the energy in the cross around the energy of a given cell.
 
float GetCellWeight (float eCell, float eCluster) const
 return weight of cell for shower shape calculation
 
int getMultiplicityAtLevel (float level, gsl::span< const int > inputsIndices, AnalysisCluster &clusterAnalysis) const
 Calculates the multiplicity of digits/cells with energy larger than level*energy.
 
int getSuperModuleNumber () const
 
bool sharedCluster () const
 
void setSharedCluster (bool s)
 
Double_t tMaxInCm (const Double_t e=0.0, const int key=0) const
 
bool getLookUpInit () const
 
bool getCoreRadius () const
 
void setCoreRadius (float radius)
 
float getExoticCellFraction () const
 
void setExoticCellFraction (float exoticCellFraction)
 
float getExoticCellDiffTime () const
 
void setExoticCellDiffTime (float exoticCellDiffTime)
 
float getExoticCellMinAmplitude () const
 
void setExoticCellMinAmplitude (float exoticCellMinAmplitude)
 
float getExoticCellInCrossMinAmplitude () const
 
void setExoticCellInCrossMinAmplitude (float exoticCellInCrossMinAmplitude)
 
bool getUseWeightExotic () const
 
void setUseWeightExotic (float useWeightExotic)
 
void setContainer (gsl::span< const o2::emcal::Cluster > clusterContainer, gsl::span< const InputType > cellContainer, gsl::span< const int > indicesContainer, std::optional< gsl::span< const o2::emcal::CellLabel > > cellLabelContainer=std::nullopt)
 
void setLookUpTable (void)
 
int getNumberOfClusters () const
 
void setGeometry (o2::emcal::Geometry *geometry)
 Initialize Cluster Factory with geometry.
 

Static Public Member Functions

static void getDeffW0 (const Double_t esum, Double_t &deff, Double_t &w0)
 

Protected Member Functions

void evalCoreEnergy (gsl::span< const int > inputsIndices, AnalysisCluster &clusterAnalysis) const
 
void evalDispersion (gsl::span< const int > inputsIndices, AnalysisCluster &clusterAnalysis) const
 
void evalElipsAxis (gsl::span< const int > inputsIndices, AnalysisCluster &clusterAnalysis) const
 
void evalTime (gsl::span< const int > inputsIndices, AnalysisCluster &clusterAnalysis) const
 Time is set to the time of the digit with the maximum energy.
 
float thetaToEta (float arg) const
 Converts Theta (Radians) to Eta (Radians)
 
float etaToTheta (float arg) const
 Converts Eta (Radians) to Theta (Radians)
 

Detailed Description

template<class InputType>
class o2::emcal::ClusterFactory< InputType >

EMCal clusters factory Ported from class AliEMCALcluster.

Author
Hadi Hassan hadi..nosp@m.hass.nosp@m.an@ce.nosp@m.rn.c.nosp@m.h, Oak Ridge National Laboratory
Since
March 05, 2020

Definition at line 43 of file ClusterFactory.h.

Constructor & Destructor Documentation

◆ ClusterFactory() [1/3]

template<class InputType >
o2::emcal::ClusterFactory< InputType >::ClusterFactory ( )
default

Dummy constructor.

◆ ClusterFactory() [2/3]

template<class InputType >
ClusterFactory::ClusterFactory ( gsl::span< const o2::emcal::Cluster clustersContainer,
gsl::span< const InputType inputsContainer,
gsl::span< const int cellsIndices 
)

Constructor initializing the ClusterFactory.

Parameters
clustersContainercluster container
inputsContainercells/digits container
cellsIndicesfor cells/digits indices

Definition at line 31 of file ClusterFactory.cxx.

◆ ClusterFactory() [3/3]

template<class InputType >
o2::emcal::ClusterFactory< InputType >::ClusterFactory ( const ClusterFactory< InputType > &  rp)
default

Copy constructor.

◆ ~ClusterFactory()

template<class InputType >
o2::emcal::ClusterFactory< InputType >::~ClusterFactory ( )
default

Destructor.

Member Function Documentation

◆ begin()

template<class InputType >
ClusterIterator o2::emcal::ClusterFactory< InputType >::begin ( ) const
inline

Get forward start iterator.

Returns
Start iterator

Definition at line 218 of file ClusterFactory.h.

◆ buildCluster()

template<class InputType >
o2::emcal::AnalysisCluster ClusterFactory::buildCluster ( int  index,
o2::emcal::ClusterLabel clusterLabel = nullptr 
) const

evaluates cluster parameters: position, shower shape, primaries ...

Definition at line 50 of file ClusterFactory.cxx.

◆ doEvalLocal2tracking()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::doEvalLocal2tracking ( bool  justCluster)
inline

Definition at line 242 of file ClusterFactory.h.

◆ end()

template<class InputType >
ClusterIterator o2::emcal::ClusterFactory< InputType >::end ( ) const
inline

Get forward end iteration marker.

Returns
Iteration end marker

Definition at line 222 of file ClusterFactory.h.

◆ etaToTheta()

template<class InputType >
float ClusterFactory::etaToTheta ( float  arg) const
protected

Converts Eta (Radians) to Theta (Radians)

Converts Theta (Radians) to Eta (Radians)

Definition at line 820 of file ClusterFactory.cxx.

◆ evalCoreEnergy()

template<class InputType >
void ClusterFactory::evalCoreEnergy ( gsl::span< const int inputsIndices,
AnalysisCluster clusterAnalysis 
) const
protected

This function calculates energy in the core, i.e. within a radius rad = mCoreRadius around the center. Beyond this radius in accordance with shower profile the energy deposition should be less than 2% Unfinished - Nov 15,2006 Distance is calculate in (phi,eta) units

Definition at line 464 of file ClusterFactory.cxx.

◆ evalDispersion()

template<class InputType >
void ClusterFactory::evalDispersion ( gsl::span< const int inputsIndices,
AnalysisCluster clusterAnalysis 
) const
protected

Calculates the dispersion of the shower at the origin of the cluster in cell units

Definition at line 141 of file ClusterFactory.cxx.

◆ evalElipsAxis()

template<class InputType >
void ClusterFactory::evalElipsAxis ( gsl::span< const int inputsIndices,
AnalysisCluster clusterAnalysis 
) const
protected

Calculates the axis of the shower ellipsoid in eta and phi in cell units

Definition at line 494 of file ClusterFactory.cxx.

◆ evalGlobalPosition()

template<class InputType >
void ClusterFactory::evalGlobalPosition ( gsl::span< const int inputsIndices,
AnalysisCluster cluster 
) const

Calculates the center of gravity in the global ALICE coordinates.

Definition at line 291 of file ClusterFactory.cxx.

◆ evalLocal2TrackingCSTransform()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::evalLocal2TrackingCSTransform ( ) const

◆ evalLocalPosition()

template<class InputType >
void ClusterFactory::evalLocalPosition ( gsl::span< const int inputsIndices,
AnalysisCluster cluster 
) const

Calculates the center of gravity in the local EMCAL-module coordinates.

Definition at line 218 of file ClusterFactory.cxx.

◆ evalLocalPositionFit()

template<class InputType >
void ClusterFactory::evalLocalPositionFit ( Double_t  deff,
Double_t  w0,
Double_t  phiSlope,
gsl::span< const int inputsIndices,
AnalysisCluster cluster 
) const

evaluates local position of clusters in SM

Definition at line 363 of file ClusterFactory.cxx.

◆ evalTime()

template<class InputType >
void ClusterFactory::evalTime ( gsl::span< const int inputsIndices,
AnalysisCluster clusterAnalysis 
) const
protected

Time is set to the time of the digit with the maximum energy.

Time is set to the time of the input with the maximum energy.

Definition at line 777 of file ClusterFactory.cxx.

◆ GetCellWeight()

template<class InputType >
float ClusterFactory::GetCellWeight ( float  eCell,
float  eCluster 
) const

return weight of cell for shower shape calculation

Parameters
eCellcluster cell energy
eClustercluster or cell max energy
Returns
weight of cell for shower shape calculation

Definition at line 744 of file ClusterFactory.cxx.

◆ getCoreRadius()

template<class InputType >
bool o2::emcal::ClusterFactory< InputType >::getCoreRadius ( ) const
inline

Definition at line 320 of file ClusterFactory.h.

◆ getDeffW0()

template<class InputType >
void ClusterFactory::getDeffW0 ( const Double_t  esum,
Double_t &  deff,
Double_t &  w0 
)
static

Applied for simulation data with threshold 3 adc Calculate efective distance (deff) and weigh parameter (w0) for coordinate calculation; 0.5 GeV < esum <100 GeV. Look to: http://rhic.physics.wayne.edu/~pavlinov/ALICE/SHISHKEBAB/RES/CALIB/GEOMCORR/deffandW0VaEgamma_2.gif

Applied for simulation data with threshold 3 adc Calculate efective distance (deff) and weigh parameter (w0) for coordinate calculation; 0.5 GeV < esum <100 GeV.

Definition at line 441 of file ClusterFactory.cxx.

◆ GetECALogWeight()

template<class InputType >
float o2::emcal::ClusterFactory< InputType >::GetECALogWeight ( ) const
inline

Definition at line 240 of file ClusterFactory.h.

◆ getECross()

template<class InputType >
float ClusterFactory::getECross ( short  absID,
float  energy,
float const  exoticTime 
) const

Calculate the energy in the cross around the energy of a given cell.

Parameters
absIDcontrolled cell absolute ID number
energycluster or cell max energy, used for weight calculation
exoticTimetime of the cell with largest energy fraction in cluster
Returns
the energy in the cross around the energy of a given cell

Definition at line 628 of file ClusterFactory.cxx.

◆ getExoticCellDiffTime()

template<class InputType >
float o2::emcal::ClusterFactory< InputType >::getExoticCellDiffTime ( ) const
inline

Definition at line 326 of file ClusterFactory.h.

◆ getExoticCellFraction()

template<class InputType >
float o2::emcal::ClusterFactory< InputType >::getExoticCellFraction ( ) const
inline

Definition at line 323 of file ClusterFactory.h.

◆ getExoticCellInCrossMinAmplitude()

template<class InputType >
float o2::emcal::ClusterFactory< InputType >::getExoticCellInCrossMinAmplitude ( ) const
inline

Definition at line 332 of file ClusterFactory.h.

◆ getExoticCellMinAmplitude()

template<class InputType >
float o2::emcal::ClusterFactory< InputType >::getExoticCellMinAmplitude ( ) const
inline

Definition at line 329 of file ClusterFactory.h.

◆ getLookUpInit()

template<class InputType >
bool o2::emcal::ClusterFactory< InputType >::getLookUpInit ( ) const
inline

Definition at line 318 of file ClusterFactory.h.

◆ getMaximalEnergyIndex()

template<class InputType >
std::tuple< int, float, float, bool > ClusterFactory::getMaximalEnergyIndex ( gsl::span< const int inputsIndices) const

Finds the maximum energy in the cluster and computes the Summed amplitude of digits/cells.

Finds the maximum energy in the cluster

Parameters
inputsIndicesarray for the clusters indices contributing to cluster
Returns
the index of the cells with max enegry
the maximum energy
the total energy of the cluster
if cluster is shared between super models

Definition at line 572 of file ClusterFactory.cxx.

◆ getMultiplicityAtLevel()

template<class InputType >
int ClusterFactory::getMultiplicityAtLevel ( float  level,
gsl::span< const int inputsIndices,
AnalysisCluster clusterAnalysis 
) const

Calculates the multiplicity of digits/cells with energy larger than level*energy.

Calculates the multiplicity of inputs with energy larger than H*energy.

Definition at line 761 of file ClusterFactory.cxx.

◆ getNumberOfClusters()

template<class InputType >
int o2::emcal::ClusterFactory< InputType >::getNumberOfClusters ( ) const
inline

Definition at line 360 of file ClusterFactory.h.

◆ getSuperModuleNumber()

template<class InputType >
int o2::emcal::ClusterFactory< InputType >::getSuperModuleNumber ( ) const
inline

Definition at line 300 of file ClusterFactory.h.

◆ getUseWeightExotic()

template<class InputType >
bool o2::emcal::ClusterFactory< InputType >::getUseWeightExotic ( ) const
inline

Definition at line 335 of file ClusterFactory.h.

◆ isExoticCell()

template<class InputType >
bool ClusterFactory::isExoticCell ( short  towerId,
float  ecell,
float const  exoticTime 
) const

Look to cell neighbourhood and reject if it seems exotic.

Parameters
towerIdtower ID of cell with largest energy fraction in cluster
ecellenergy of the cell with largest energy fraction in cluster
exoticTimetime of the cell with largest energy fraction in cluster
Returns
bool true if cell is found exotic

Definition at line 603 of file ClusterFactory.cxx.

◆ operator=()

template<class InputType >
ClusterFactory & o2::emcal::ClusterFactory< InputType >::operator= ( const ClusterFactory< InputType > &  cf)
default

Assignment operator.

◆ rbegin()

template<class InputType >
ClusterIterator o2::emcal::ClusterFactory< InputType >::rbegin ( ) const
inline

Get backward start iterator.

Returns
Start iterator

Definition at line 226 of file ClusterFactory.h.

◆ rend()

template<class InputType >
ClusterIterator o2::emcal::ClusterFactory< InputType >::rend ( ) const
inline

Get backward end iteration marker.

Returns
Iteration end marker

Definition at line 230 of file ClusterFactory.h.

◆ reset()

template<class InputType >
void ClusterFactory::reset ( )

Reset containers.

Definition at line 37 of file ClusterFactory.cxx.

◆ setContainer()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setContainer ( gsl::span< const o2::emcal::Cluster clusterContainer,
gsl::span< const InputType cellContainer,
gsl::span< const int indicesContainer,
std::optional< gsl::span< const o2::emcal::CellLabel > >  cellLabelContainer = std::nullopt 
)
inline

Definition at line 338 of file ClusterFactory.h.

◆ setCoreRadius()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setCoreRadius ( float  radius)
inline

Definition at line 321 of file ClusterFactory.h.

◆ SetECALogWeight()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::SetECALogWeight ( Float_t  w)
inline

Definition at line 239 of file ClusterFactory.h.

◆ setExoticCellDiffTime()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setExoticCellDiffTime ( float  exoticCellDiffTime)
inline

Definition at line 327 of file ClusterFactory.h.

◆ setExoticCellFraction()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setExoticCellFraction ( float  exoticCellFraction)
inline

Definition at line 324 of file ClusterFactory.h.

◆ setExoticCellInCrossMinAmplitude()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setExoticCellInCrossMinAmplitude ( float  exoticCellInCrossMinAmplitude)
inline

Definition at line 333 of file ClusterFactory.h.

◆ setExoticCellMinAmplitude()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setExoticCellMinAmplitude ( float  exoticCellMinAmplitude)
inline

Definition at line 330 of file ClusterFactory.h.

◆ setGeometry()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setGeometry ( o2::emcal::Geometry geometry)
inline

Initialize Cluster Factory with geometry.

Parameters
geometryEMCAL geometry

Definition at line 367 of file ClusterFactory.h.

◆ setLookUpTable()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setLookUpTable ( void  )
inline

Definition at line 351 of file ClusterFactory.h.

◆ setSharedCluster()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setSharedCluster ( bool  s)
inline

Definition at line 311 of file ClusterFactory.h.

◆ setUseWeightExotic()

template<class InputType >
void o2::emcal::ClusterFactory< InputType >::setUseWeightExotic ( float  useWeightExotic)
inline

Definition at line 336 of file ClusterFactory.h.

◆ sharedCluster()

template<class InputType >
bool o2::emcal::ClusterFactory< InputType >::sharedCluster ( ) const
inline

Definition at line 310 of file ClusterFactory.h.

◆ thetaToEta()

template<class InputType >
float ClusterFactory::thetaToEta ( float  arg) const
protected

Converts Theta (Radians) to Eta (Radians)

Converts Eta (Radians) to Theta (Radians)

Definition at line 829 of file ClusterFactory.cxx.

◆ tMaxInCm()

template<class InputType >
double ClusterFactory::tMaxInCm ( const Double_t  e = 0.0,
const int  key = 0 
) const
Parameters
eenergy in GeV)
key= 0(gamma, default); != 0(electron)

Definition at line 796 of file ClusterFactory.cxx.


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