Belle II Software development
PXDClusterShapeClassifierPar Class Reference

The class for PXD cluster shape classifier payload. More...

#include <PXDClusterShapeClassifierPar.h>

Inheritance diagram for PXDClusterShapeClassifierPar:

Public Member Functions

 PXDClusterShapeClassifierPar ()
 Default constructor.
 
void addShapeLikelyhood (int shape_index, float likelyhood)
 Add shape likelyhood.
 
const std::map< int, float > & getShapeLikelyhoodMap () const
 Return shape likelyhood map

 
const PXDClusterOffsetPargetOffset (int shape_index, float eta) const
 Returns position offset if available, otherwise returns nullptr.
 
void addShape (int shape_index)
 Add shape for position correction.
 
void addEtaPercentile (int shape_index, float percentile)
 Add eta percentile to shape for position correction.
 
void addEtaLikelyhood (int shape_index, float likelyhood)
 Add eta likelyhood to shape for position correction.
 
void addEtaOffset (int shape_index, PXDClusterOffsetPar &offset)
 Add offset to shape for position correction.
 
unsigned int getEtaIndex (int shape_index, float eta) const
 Get eta index for position correction.
 
const std::map< int, std::vector< float > > & getPercentilesMap () const
 Return percentiles map for position correction.
 
const std::map< int, std::vector< float > > & getLikelyhoodMap () const
 Return likelyhood map for position correction.
 
const std::map< int, std::vector< PXDClusterOffsetPar > > & getOffsetMap () const
 Return offset map for position correction.
 

Private Member Functions

 ClassDef (PXDClusterShapeClassifierPar, 2)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

std::map< int, std::vector< PXDClusterOffsetPar > > m_offsets
 Map of position offsets (corrections)

 
std::map< int, std::vector< float > > m_percentiles
 Map of percentiles

 
std::map< int, std::vector< float > > m_likelyhoods
 Map of likelyhoods

 
std::map< int, float > m_shape_likelyhoods
 Map of shape likelyhoods.
 

Detailed Description

The class for PXD cluster shape classifier payload.

Definition at line 26 of file PXDClusterShapeClassifierPar.h.

Constructor & Destructor Documentation

◆ PXDClusterShapeClassifierPar()

Default constructor.

Definition at line 29 of file PXDClusterShapeClassifierPar.h.

29{}

Member Function Documentation

◆ addEtaLikelyhood()

void addEtaLikelyhood ( int  shape_index,
float  likelyhood 
)
inline

Add eta likelyhood to shape for position correction.

Definition at line 59 of file PXDClusterShapeClassifierPar.h.

59{m_likelyhoods[shape_index].push_back(likelyhood);}
std::map< int, std::vector< float > > m_likelyhoods
Map of likelyhoods

◆ addEtaOffset()

void addEtaOffset ( int  shape_index,
PXDClusterOffsetPar offset 
)
inline

Add offset to shape for position correction.

Definition at line 62 of file PXDClusterShapeClassifierPar.h.

62{ m_offsets[shape_index].push_back(offset);}
std::map< int, std::vector< PXDClusterOffsetPar > > m_offsets
Map of position offsets (corrections)

◆ addEtaPercentile()

void addEtaPercentile ( int  shape_index,
float  percentile 
)
inline

Add eta percentile to shape for position correction.

Definition at line 56 of file PXDClusterShapeClassifierPar.h.

56{m_percentiles[shape_index].push_back(percentile);}
std::map< int, std::vector< float > > m_percentiles
Map of percentiles

◆ addShape()

void addShape ( int  shape_index)
inline

Add shape for position correction.

Definition at line 48 of file PXDClusterShapeClassifierPar.h.

49 {
50 m_percentiles[shape_index] = std::vector<float>();
51 m_likelyhoods[shape_index] = std::vector<float>();
52 m_offsets[shape_index] = std::vector<PXDClusterOffsetPar>();
53 }

◆ addShapeLikelyhood()

void addShapeLikelyhood ( int  shape_index,
float  likelyhood 
)
inline

Add shape likelyhood.

Definition at line 32 of file PXDClusterShapeClassifierPar.h.

32{m_shape_likelyhoods[shape_index] = likelyhood;}
std::map< int, float > m_shape_likelyhoods
Map of shape likelyhoods.

◆ getEtaIndex()

unsigned int getEtaIndex ( int  shape_index,
float  eta 
) const
inline

Get eta index for position correction.

Definition at line 65 of file PXDClusterShapeClassifierPar.h.

66 {
67 auto etaPercentiles = m_percentiles.at(shape_index);
68 for (int i = etaPercentiles.size() - 1; i >= 0; --i) {
69 if (eta >= etaPercentiles[i])
70 return i;
71 }
72 return 0;
73 }

◆ getLikelyhoodMap()

const std::map< int, std::vector< float > > & getLikelyhoodMap ( ) const
inline

Return likelyhood map for position correction.

Definition at line 79 of file PXDClusterShapeClassifierPar.h.

79{ return m_likelyhoods; }

◆ getOffset()

const PXDClusterOffsetPar * getOffset ( int  shape_index,
float  eta 
) const
inline

Returns position offset if available, otherwise returns nullptr.

Definition at line 38 of file PXDClusterShapeClassifierPar.h.

39 {
40 if (m_offsets.find(shape_index) == m_offsets.end()) {
41 return nullptr;
42 }
43 auto eta_index = getEtaIndex(shape_index, eta);
44 return &m_offsets.at(shape_index)[eta_index];
45 }
unsigned int getEtaIndex(int shape_index, float eta) const
Get eta index for position correction.

◆ getOffsetMap()

const std::map< int, std::vector< PXDClusterOffsetPar > > & getOffsetMap ( ) const
inline

Return offset map for position correction.

Definition at line 82 of file PXDClusterShapeClassifierPar.h.

82{ return m_offsets; }

◆ getPercentilesMap()

const std::map< int, std::vector< float > > & getPercentilesMap ( ) const
inline

Return percentiles map for position correction.

Definition at line 76 of file PXDClusterShapeClassifierPar.h.

76{ return m_percentiles; }

◆ getShapeLikelyhoodMap()

const std::map< int, float > & getShapeLikelyhoodMap ( ) const
inline

Return shape likelyhood map

Definition at line 35 of file PXDClusterShapeClassifierPar.h.

35{ return m_shape_likelyhoods; }

Member Data Documentation

◆ m_likelyhoods

std::map<int, std::vector<float> > m_likelyhoods
private

Map of likelyhoods

Definition at line 90 of file PXDClusterShapeClassifierPar.h.

◆ m_offsets

std::map<int, std::vector<PXDClusterOffsetPar> > m_offsets
private

Map of position offsets (corrections)

Definition at line 86 of file PXDClusterShapeClassifierPar.h.

◆ m_percentiles

std::map<int, std::vector<float> > m_percentiles
private

Map of percentiles

Definition at line 88 of file PXDClusterShapeClassifierPar.h.

◆ m_shape_likelyhoods

std::map<int, float> m_shape_likelyhoods
private

Map of shape likelyhoods.

Definition at line 92 of file PXDClusterShapeClassifierPar.h.


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