Belle II Software development
PXDOccupancyInfoPar Class Reference

The payload collecting some meta information from running the masking algorithm. More...

#include <PXDOccupancyInfoPar.h>

Inheritance diagram for PXDOccupancyInfoPar:

Public Member Functions

 PXDOccupancyInfoPar ()
 Default constructor.
 
void setNumberOfEvents (int nEvents)
 Set number of events used for occupancy estimation.
 
int getNumberOfEvents () const
 Get number of events used for occupancy estimation.
 
void setOccupancy (unsigned short sensorID, float occupancy)
 Set occupancy.
 
float getOccupancy (unsigned short sensorID) const
 Get occupancy.
 

Private Member Functions

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

Private Attributes

int m_nEvents
 Number of collected events used for occupancy computation, may decide to not trust calibrations with too few events.
 
std::unordered_map< unsigned short, float > m_MapOccupancy
 Map containing mean occupancy per sensor.
 

Detailed Description

The payload collecting some meta information from running the masking algorithm.

This includes the following attributes: 1) Number of events for computation 2) Mean occupancy per sensor

Definition at line 28 of file PXDOccupancyInfoPar.h.

Constructor & Destructor Documentation

◆ PXDOccupancyInfoPar()

PXDOccupancyInfoPar ( )
inline

Default constructor.

Definition at line 32 of file PXDOccupancyInfoPar.h.

std::unordered_map< unsigned short, float > m_MapOccupancy
Map containing mean occupancy per sensor.
int m_nEvents
Number of collected events used for occupancy computation, may decide to not trust calibrations with ...

Member Function Documentation

◆ getNumberOfEvents()

int getNumberOfEvents ( ) const
inline

Get number of events used for occupancy estimation.

Definition at line 40 of file PXDOccupancyInfoPar.h.

40{ return m_nEvents; }

◆ getOccupancy()

float getOccupancy ( unsigned short  sensorID) const
inline

Get occupancy.

Parameters
sensorIDunique ID of the sensor
Returns
calibrated occupancy, or -1 if sensor is not found

Definition at line 57 of file PXDOccupancyInfoPar.h.

58 {
59 auto mapIter = m_MapOccupancy.find(sensorID);
60 if (mapIter != m_MapOccupancy.end()) {
61 return mapIter->second;
62 }
63 // Fallback when user asks for sensor that was not calibrated
64 return -1;
65 }

◆ setNumberOfEvents()

void setNumberOfEvents ( int  nEvents)
inline

Set number of events used for occupancy estimation.

Definition at line 36 of file PXDOccupancyInfoPar.h.

36{ m_nEvents = nEvents; }

◆ setOccupancy()

void setOccupancy ( unsigned short  sensorID,
float  occupancy 
)
inline

Set occupancy.

Parameters
sensorIDunique ID of the sensor
occupancycalibrated hit occupancy

Definition at line 47 of file PXDOccupancyInfoPar.h.

48 {
49 m_MapOccupancy[sensorID] = occupancy;
50 }

Member Data Documentation

◆ m_MapOccupancy

std::unordered_map<unsigned short, float> m_MapOccupancy
private

Map containing mean occupancy per sensor.

Definition at line 73 of file PXDOccupancyInfoPar.h.

◆ m_nEvents

int m_nEvents
private

Number of collected events used for occupancy computation, may decide to not trust calibrations with too few events.

Definition at line 70 of file PXDOccupancyInfoPar.h.


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