10#include <pxd/reconstruction/PXDPixelMasker.h>
11#include <vxd/geometry/GeoCache.h>
48 unsigned short pixThr)
69 return (
m_pixelThresholds.getPixelThreshold(
id.getID(), uid * vCells + vid) < 255);
74 auto sensorID =
id.getID();
81 if (
m_deadPixels.isDeadDrain(sensorID, uid * 4 + vid % 4))
85 if (
m_deadPixels.isDeadSinglePixel(sensorID, uid * vCells + vid))
94 for (
auto maskedSingles = maskedPixelMap.begin(); maskedSingles != maskedPixelMap.end(); maskedSingles++) {
95 const auto& sensorID = maskedSingles->first;
96 const auto& singles = maskedSingles->second;
97 for (
const auto& single : singles) {
The payload telling which PXD pixel to mask (ignore)
const std::unordered_map< unsigned short, MaskedSinglePixelsSet > & getMaskedPixelMap() const
Return unordered_map with all masked single pixels in PXD.
Singleton class for managing pixel masking for the PXD.
PXDMaskedPixelPar m_maskedPixels
List of masked pixels.
bool pixelDead(VxdID id, unsigned int uid, unsigned int vid) const
Check whether a pixel on a given sensor is dead or not.
void initialize()
Initialize the PXDPixelMasker.
bool pixelOK(VxdID id, unsigned int uid, unsigned int vid) const
Check whether a pixel on a given sensor is OK or not.
unsigned short getPixelThreshold(VxdID id, unsigned int uid, unsigned int vid) const
Check whether a pixel on a given sensor is OK or not and get threshold.
void maskSinglePixel(VxdID id, unsigned int uid, unsigned int vid)
Mask single pixel.
void setMaskedPixels()
Set masked pixels from DB.
DBObjPtr< PXDMaskedPixelPar > m_maskedPixelsFromDB
Masked pixels retrieved from DB.
void setDeadPixels()
Set dead pixels from DB.
DBObjPtr< PXDPixelThresholdPar > m_pixelThresholdsFromDB
Pixel thresholds from DB.
void setSinglePixelThreshold(VxdID id, unsigned int uid, unsigned int vid, unsigned short pixThr)
Set threshold for single pixel.
static PXDPixelMasker & getInstance()
Main (and only) way to access the PXDPixelMasker.
DBObjPtr< PXDDeadPixelPar > m_deadPixelsFromDB
Dead pixels retrieved from DB.
PXDDeadPixelPar m_deadPixels
List of masked pixels.
void setPixelThresholds()
Set pixel threshold from DB.
PXDPixelThresholdPar m_pixelThresholds
List of pixel threshold.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a reference to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
int getVCells() const
Return number of pixel/strips in v direction.
Class to uniquely identify a any structure of the PXD and SVD.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t