11#include <unordered_map>
47 unsigned short getGlobalID(
unsigned short uBin,
unsigned short vBin)
const {
return uBin *
m_nBinsV + vBin; }
55 void setContent(
unsigned short sensorID,
unsigned short globalID,
float value)
60 auto& calVec = mapIter->second;
62 calVec[globalID] = value;
67 calVec[globalID] = value;
80 void setContent(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
float value)
90 float getContent(
unsigned short sensorID,
unsigned short globalID)
const
95 auto& calVec = mapIter->second;
96 return calVec[globalID];
108 float getContent(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin)
const
The payload class for PXD cluster charge calibrations.
float getContent(unsigned short sensorID, unsigned short globalID) const
Get content.
std::unordered_map< unsigned short, std::vector< float > > m_sensorCalibrationMap
Map for holding the calibrations for all PXD sensors by sensor id (unsigned short).
void setContent(unsigned short sensorID, unsigned short uBin, unsigned short vBin, float value)
Set map content.
const std::unordered_map< unsigned short, std::vector< float > > & getCalibrationMap() const
Return unordered_map with all PXD calibrations.
int m_nBinsV
Number of bins per sensor along v side.
unsigned short getBinsV() const
Get number of bins along sensor v side.
unsigned short getBinsU() const
Get number of bins along sensor u side.
int m_nBinsU
Number of bins per sensor along u side.
PXDClusterChargeMapPar(int nBinsU=4, int nBinsV=6, float defaultValue=-1.0)
Default constructor.
unsigned short getGlobalID(unsigned short uBin, unsigned short vBin) const
Get global id from uBin and vBin.
ClassDef(PXDClusterChargeMapPar, 1)
ClassDef, must be the last term before the closing {}.
float m_defaultValue
Default value for map.
float getContent(unsigned short sensorID, unsigned short uBin, unsigned short vBin) const
Get content.
void setContent(unsigned short sensorID, unsigned short globalID, float value)
Set map content.
Abstract base class for different kinds of events.