Project
Loading...
Searching...
No Matches
o2::itsmft::ClustersPerLayer< T > Class Template Reference

#include <ClustersPerLayer.h>

Public Member Functions

void init (int nLr)
 < prepare for filling nLr layer slots, discarding the previous content
 
void beginLayer (int lr)
 to be called once all the layers were filled
 
void finalize ()
 
void clear ()
 the clusters of all layers, to be appended to by the caller between beginLayer and finalize
 
auto & getClusters ()
 
const auto & getClusters () const
 
auto getNLayers () const
 
auto getFirstIndex (int lr) const
 
auto getNClusters (int lr) const
 
auto size () const
 
bool empty () const
 flat index of the cluster referred to by its composed ID
 
int flatIndex (int composedID) const
 
const T & operator[] (int composedID) const
 

Detailed Description

template<typename T>
class o2::itsmft::ClustersPerLayer< T >

< Container of the ITS/MFT clusters supplied either as a single (monolithic) array or per layer (staggered readout). The clusters of all layers are kept in a single vector, layer by layer, with the per-layer starting offsets recorded, so that a cluster referred to by the composed ID (layer << ClusLayerShift) + index_in_layer can be looked up directly. With the monolithic input only the layer slot 0 is filled and the composed ID coincides with the flat cluster index, hence the same lookup works for both cases.

The conversion of the compact clusters to the stored objects is detector specific (and needs the geometry), so it is left to the caller: the container only records where each layer starts. Expected usage (nLr == 1 for the monolithic input): cont.init(nLr); for (int lr = 0; lr < nLr; lr++) { cont.beginLayer(lr); auto pattIt = recoData.getITSClustersPatterns(lr).begin(); o2::its::ioutils::convertCompactClusters(recoData.getITSClusters(lr), pattIt, cont.getClusters(), dict); } cont.finalize(); after which cont[composedID] gives the cluster referred to by a track cluster reference.

Definition at line 46 of file ClustersPerLayer.h.

Member Function Documentation

◆ beginLayer()

template<typename T >
void o2::itsmft::ClustersPerLayer< T >::beginLayer ( int  lr)
inline

to be called once all the layers were filled

Definition at line 61 of file ClustersPerLayer.h.

◆ clear()

template<typename T >
void o2::itsmft::ClustersPerLayer< T >::clear ( )
inline

the clusters of all layers, to be appended to by the caller between beginLayer and finalize

Definition at line 77 of file ClustersPerLayer.h.

◆ empty()

template<typename T >
bool o2::itsmft::ClustersPerLayer< T >::empty ( ) const
inline

flat index of the cluster referred to by its composed ID

Definition at line 92 of file ClustersPerLayer.h.

◆ finalize()

template<typename T >
void o2::itsmft::ClustersPerLayer< T >::finalize ( )
inline

Definition at line 70 of file ClustersPerLayer.h.

◆ flatIndex()

template<typename T >
int o2::itsmft::ClustersPerLayer< T >::flatIndex ( int  composedID) const
inline

Definition at line 95 of file ClustersPerLayer.h.

◆ getClusters() [1/2]

template<typename T >
auto & o2::itsmft::ClustersPerLayer< T >::getClusters ( )
inline

Definition at line 85 of file ClustersPerLayer.h.

◆ getClusters() [2/2]

template<typename T >
const auto & o2::itsmft::ClustersPerLayer< T >::getClusters ( ) const
inline

Definition at line 86 of file ClustersPerLayer.h.

◆ getFirstIndex()

template<typename T >
auto o2::itsmft::ClustersPerLayer< T >::getFirstIndex ( int  lr) const
inline

Definition at line 89 of file ClustersPerLayer.h.

◆ getNClusters()

template<typename T >
auto o2::itsmft::ClustersPerLayer< T >::getNClusters ( int  lr) const
inline

Definition at line 90 of file ClustersPerLayer.h.

◆ getNLayers()

template<typename T >
auto o2::itsmft::ClustersPerLayer< T >::getNLayers ( ) const
inline

Definition at line 88 of file ClustersPerLayer.h.

◆ init()

template<typename T >
void o2::itsmft::ClustersPerLayer< T >::init ( int  nLr)
inline

< prepare for filling nLr layer slots, discarding the previous content

record the start of the layer lr data, the layers must be filled in the increasing order

Definition at line 50 of file ClustersPerLayer.h.

◆ operator[]()

template<typename T >
const T & o2::itsmft::ClustersPerLayer< T >::operator[] ( int  composedID) const
inline

Definition at line 99 of file ClustersPerLayer.h.

◆ size()

template<typename T >
auto o2::itsmft::ClustersPerLayer< T >::size ( ) const
inline

Definition at line 91 of file ClustersPerLayer.h.


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