Belle II Software  release-08-01-10
PXDOccupancyInfoPar Class Reference

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

#include <PXDOccupancyInfoPar.h>

Inheritance diagram for PXDOccupancyInfoPar:
Collaboration 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. More...
 
float getOccupancy (unsigned short sensorID) const
 Get occupancy. More...
 

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.

Member Function Documentation

◆ 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  }
std::unordered_map< unsigned short, float > m_MapOccupancy
Map containing mean occupancy per sensor.

◆ 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.


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