11#include <unordered_map>
39 float defaultValue = 0.0,
float defaultFactor = 1.0):
59 unsigned short getGlobalID(
unsigned short uBin,
unsigned short vBin,
unsigned short size)
const
70 void setContent(
unsigned short sensorID,
unsigned short globalID,
float value)
75 auto& errVec = mapIter->second;
77 errVec[globalID] = value;
82 errVec[globalID] = value;
95 void setContent(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size,
float value)
105 float getContent(
unsigned short sensorID,
unsigned short globalID)
const
110 auto& errVec = mapIter->second;
111 return errVec[globalID];
124 float getContent(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size)
const
139 auto& facVec = mapIter->second;
141 facVec[globalID] = factor;
146 facVec[globalID] = factor;
158 void setSensorUEdgeFactor(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size,
float factor)
173 auto& facVec = mapIter->second;
175 facVec[globalID] = factor;
180 facVec[globalID] = factor;
192 void setSensorVEdgeFactor(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size,
float factor)
207 auto& facVec = mapIter->second;
209 facVec[globalID] = factor;
214 facVec[globalID] = factor;
226 void setDeadNeighbourFactor(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size,
float factor)
241 auto& facVec = mapIter->second;
242 return facVec[globalID];
254 float getSensorUEdgeFactor(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size)
const
269 auto& facVec = mapIter->second;
270 return facVec[globalID];
282 float getSensorVEdgeFactor(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size)
const
297 auto& facVec = mapIter->second;
298 return facVec[globalID];
310 float getDeadNeighbourFactor(
unsigned short sensorID,
unsigned short uBin,
unsigned short vBin,
unsigned short size)
const
The payload class for PXD cluster position error.
std::unordered_map< unsigned short, std::vector< float > > m_clusterPositionErrorMap
Map for holding the cluster position errors for all PXD sensors by sensor id (unsigned short).
float getContent(unsigned short sensorID, unsigned short globalID) const
Get content.
unsigned short m_maxSize
Maximum cluster size.
float getDeadNeighbourFactor(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size) const
Get scaling factor when neighbouring dead rows/column.
void setContent(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size, float value)
Set map content.
void setDeadNeighbourFactor(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size, float factor)
Set scaling factor when neighbouring dead rows/columns.
float m_defaultFactor
Default value for scale factor map.
std::unordered_map< unsigned short, std::vector< float > > m_factorSensorUEdgeMap
Scaling factor at sensor U edge for layers 1 or 2 and FWD/BWD sensors with sensor number 1 or 2.
std::unordered_map< unsigned short, std::vector< float > > m_factorSensorVEdgeMap
Scaling factor at sensor V edge for layers 1 or 2 and FWD/BWD sensors with sensor number 1 or 2.
float getSensorVEdgeFactor(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size) const
Get scaling factor at sensor edge in V.
unsigned short getBinsV() const
Get number of bins along sensor v side.
float getSensorUEdgeFactor(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size) const
Get scaling factor at sensor edge in U.
void setSensorUEdgeFactor(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size, float factor)
Set scaling factor at sensor U edge.
const std::unordered_map< unsigned short, std::vector< float > > & getClusterPositionErrorMap() const
Return unordered_map with all PXD cluster position errors.
float getDeadNeighbourFactor(unsigned short sensorID, unsigned short globalID) const
Get scaling factor when neighbouring dead rows/column.
float getContent(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size) const
Get content.
unsigned short getBinsU() const
Get number of bins along sensor u side.
unsigned short m_nBinsU
Number of bins per sensor along u side.
void setDeadNeighbourFactor(unsigned short sensorID, unsigned short globalID, float factor)
Set scaling factor when neighbouring dead rows/columns.
void setSensorUEdgeFactor(unsigned short sensorID, unsigned short globalID, float factor)
Set scaling factor at sensor U edge.
unsigned short getGlobalID(unsigned short uBin, unsigned short vBin, unsigned short size) const
Get global id from uBin and vBin and cluster size.
void setSensorVEdgeFactor(unsigned short sensorID, unsigned short globalID, float factor)
Set scaling factor at sensor V edge.
PXDClusterPositionErrorPar(unsigned short nBinsU=1, unsigned short nBinsV=3, unsigned short maxSize=8, float defaultValue=0.0, float defaultFactor=1.0)
Default constructor.
float m_defaultValue
Default value for map.
void setSensorVEdgeFactor(unsigned short sensorID, unsigned short uBin, unsigned short vBin, unsigned short size, float factor)
Set scaling factor at sensor V edge.
ClassDef(PXDClusterPositionErrorPar, 8)
ClassDef, must be the last term before the closing {}.
unsigned short getMaxClusterSize() const
Get maximum cluster size that the error is defined.
std::unordered_map< unsigned short, std::vector< float > > m_factorDeadNeighbourMap
Scaling factor when neighbouring dead rows/colums for FWD/BWD sensors by sensor number 1 or 2.
void setContent(unsigned short sensorID, unsigned short globalID, float value)
Set map content.
float getSensorVEdgeFactor(unsigned short sensorID, unsigned short globalID) const
Get scaling factor at sensor edge in V.
float getSensorUEdgeFactor(unsigned short sensorID, unsigned short globalID) const
Get scaling factor at sensor edge in U.
unsigned short m_nBinsV
Number of bins per sensor along v side.
Abstract base class for different kinds of events.