Singleton class for managing pixel masking for the PXD.
More...
#include <PXDPixelMasker.h>
Singleton class for managing pixel masking for the PXD.
Definition at line 27 of file PXDPixelMasker.h.
◆ PXDPixelMasker()
◆ getDeadPixelParameters()
◆ getInstance()
Main (and only) way to access the PXDPixelMasker.
Definition at line 35 of file PXDPixelMasker.cc.
36{
37 static std::unique_ptr<Belle2::PXD::PXDPixelMasker> instance(new Belle2::PXD::PXDPixelMasker());
38 return *instance;
39}
◆ getMaskedPixelParameters()
Return masked pixel payload.
Definition at line 69 of file PXDPixelMasker.h.
69{return m_maskedPixels;}
◆ initialize()
Initialize the PXDPixelMasker.
Definition at line 17 of file PXDPixelMasker.cc.
18{
19 m_maskedPixelsFromDB = unique_ptr<Belle2::DBObjPtr<Belle2::PXDMaskedPixelPar>>(new Belle2::DBObjPtr<Belle2::PXDMaskedPixelPar>());
20
21 if ((*m_maskedPixelsFromDB).isValid()) {
22 setMaskedPixels();
24 }
25
26 m_deadPixelsFromDB = unique_ptr<Belle2::DBObjPtr<Belle2::PXDDeadPixelPar>>(new Belle2::DBObjPtr<Belle2::PXDDeadPixelPar>());
27
28 if ((*m_deadPixelsFromDB).isValid()) {
29 setDeadPixels();
31 }
32}
void setMaskedPixels()
Set masked pixels from DB.
void setDeadPixels()
Set dead pixels from DB.
◆ maskSinglePixel()
void maskSinglePixel |
( |
Belle2::VxdID | id, |
|
|
unsigned int | uid, |
|
|
unsigned int | vid ) |
Mask single pixel.
- Parameters
-
id | VxdID of the required sensor |
uid | uCell of single pixel to mask |
vid | vCell of single pixel to mask |
Definition at line 42 of file PXDPixelMasker.cc.
43{
45 m_maskedPixels.maskSinglePixel(
id.
getID(), uid * vCells + vid);
46}
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.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
◆ pixelDead()
bool pixelDead |
( |
Belle2::VxdID | id, |
|
|
unsigned int | uid, |
|
|
unsigned int | vid ) const |
Check whether a pixel on a given sensor is dead or not.
- Parameters
-
id | VxdID of the sensor |
uid | uCell of single pixel |
vid | vCell of single pixel |
- Returns
- true if pixel DEAD, otherwise false.
Definition at line 56 of file PXDPixelMasker.cc.
57{
58 auto sensorID = id.getID();
59 if (m_deadPixels.isDeadSensor(sensorID))
60 return true;
61
62 if (m_deadPixels.isDeadRow(sensorID, vid))
63 return true;
64
65 if (m_deadPixels.isDeadDrain(sensorID, uid * 4 + vid % 4))
66 return true;
67
69 if (m_deadPixels.isDeadSinglePixel(sensorID, uid * vCells + vid))
70 return true;
71
72 return false;
73}
◆ pixelOK()
bool pixelOK |
( |
Belle2::VxdID | id, |
|
|
unsigned int | uid, |
|
|
unsigned int | vid ) const |
Check whether a pixel on a given sensor is OK or not.
- Parameters
-
id | VxdID of the sensor |
uid | uCell of single pixel |
vid | vCell of single pixel |
- Returns
- true if pixel is OK, otherwise false.
Definition at line 50 of file PXDPixelMasker.cc.
51{
53 return m_maskedPixels.pixelOK(
id.
getID(), uid * vCells + vid);
54}
◆ setDeadPixels()
Set dead pixels from DB.
Definition at line 81 of file PXDPixelMasker.cc.
82{
83 m_deadPixels = **m_deadPixelsFromDB;
84}
◆ setMaskedPixels()
Set masked pixels from DB.
Definition at line 76 of file PXDPixelMasker.cc.
77{
78 m_maskedPixels = **m_maskedPixelsFromDB;
79}
◆ m_deadPixels
◆ m_deadPixelsFromDB
◆ m_maskedPixels
◆ m_maskedPixelsFromDB
The documentation for this class was generated from the following files: