Belle II Software development
PXDDeadPixelPar Class Reference

The payload telling which PXD pixel is dead (=Readout system does not receive signals) More...

#include <PXDDeadPixelPar.h>

Inheritance diagram for PXDDeadPixelPar:

Public Types

typedef std::unordered_set< unsigned int > DeadChannelSet
 Structure to hold set of dead channel indexed by their unique id (unsigned int), stored in hash table.
 

Public Member Functions

 PXDDeadPixelPar ()
 Default constructor.
 
void maskSensor (unsigned short sensorID)
 Mask sensor.
 
void maskDrain (unsigned short sensorID, unsigned int drainID)
 Mask single drain.
 
void maskRow (unsigned short sensorID, unsigned int vCellID)
 Mask single row.
 
void maskSinglePixel (unsigned short sensorID, unsigned int pixID)
 Mask single pixel.
 
bool isDeadSensor (unsigned short sensorID) const
 Check whether a sensor is dead.
 
bool isDeadRow (unsigned short sensorID, unsigned int vCellID) const
 Check whether a row is dead.
 
bool isDeadDrain (unsigned short sensorID, unsigned int drainID) const
 Check whether a drain is dead.
 
bool isDeadSinglePixel (unsigned short sensorID, unsigned int pixID) const
 Check whether a single pixel is dead.
 
const std::unordered_map< unsigned short, DeadChannelSet > & getDeadSinglePixelMap () const
 Return unordered_map with all dead single pixels in PXD.
 
const std::unordered_map< unsigned short, DeadChannelSet > & getDeadDrainMap () const
 Return unordered_map with all dead rows in PXD.
 
const std::unordered_map< unsigned short, DeadChannelSet > & getDeadRowMap () const
 Return unordered_map with all dead drains in PXD.
 
const std::unordered_set< unsigned int > & getDeadSensorMap () const
 Return unordered_set with all dead sensors in PXD.
 

Private Member Functions

 ClassDef (PXDDeadPixelPar, 2)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

std::unordered_map< unsigned short, DeadChannelSetm_MapSingles
 Structure holding sets of dead single pixels for all sensors by sensor id (unsigned short).
 
std::unordered_map< unsigned short, DeadChannelSetm_MapRows
 Structure holding sets of dead rows for all sensors by sensor id (unsigned short).
 
std::unordered_map< unsigned short, DeadChannelSetm_MapDrains
 Structure holding sets of dead drains for all sensors by sensor id (unsigned short).
 
std::unordered_set< unsigned int > m_MapSensors
 Structure holding dead sensors by sensor id.
 

Detailed Description

The payload telling which PXD pixel is dead (=Readout system does not receive signals)

There are multiple reasons for dead pixels: 1) Brocken (open) drain line (-> current cannot flow into DCD channel) 2) DEPFET current into DCD out of dynamic range 3) DHP subtracts too high pedestal correction 4) ...

Here, we cannot distinguish the true reason, but report that a pixel gets never hit during some IoV.

Definition at line 33 of file PXDDeadPixelPar.h.

Member Typedef Documentation

◆ DeadChannelSet

typedef std::unordered_set< unsigned int> DeadChannelSet

Structure to hold set of dead channel indexed by their unique id (unsigned int), stored in hash table.

Definition at line 36 of file PXDDeadPixelPar.h.

Constructor & Destructor Documentation

◆ PXDDeadPixelPar()

PXDDeadPixelPar ( )
inline

Default constructor.

Definition at line 39 of file PXDDeadPixelPar.h.

std::unordered_map< unsigned short, DeadChannelSet > m_MapRows
Structure holding sets of dead rows for all sensors by sensor id (unsigned short).
std::unordered_map< unsigned short, DeadChannelSet > m_MapDrains
Structure holding sets of dead drains for all sensors by sensor id (unsigned short).
std::unordered_set< unsigned int > m_MapSensors
Structure holding dead sensors by sensor id.
std::unordered_map< unsigned short, DeadChannelSet > m_MapSingles
Structure holding sets of dead single pixels for all sensors by sensor id (unsigned short).

Member Function Documentation

◆ getDeadDrainMap()

const std::unordered_map< unsigned short, DeadChannelSet > & getDeadDrainMap ( ) const
inline

Return unordered_map with all dead rows in PXD.

Definition at line 193 of file PXDDeadPixelPar.h.

193{return m_MapDrains;}

◆ getDeadRowMap()

const std::unordered_map< unsigned short, DeadChannelSet > & getDeadRowMap ( ) const
inline

Return unordered_map with all dead drains in PXD.

Definition at line 196 of file PXDDeadPixelPar.h.

196{return m_MapRows;}

◆ getDeadSensorMap()

const std::unordered_set< unsigned int > & getDeadSensorMap ( ) const
inline

Return unordered_set with all dead sensors in PXD.

Definition at line 199 of file PXDDeadPixelPar.h.

199{return m_MapSensors;}

◆ getDeadSinglePixelMap()

const std::unordered_map< unsigned short, DeadChannelSet > & getDeadSinglePixelMap ( ) const
inline

Return unordered_map with all dead single pixels in PXD.

Definition at line 190 of file PXDDeadPixelPar.h.

190{return m_MapSingles;}

◆ isDeadDrain()

bool isDeadDrain ( unsigned short  sensorID,
unsigned int  drainID 
) const
inline

Check whether a drain is dead.

Parameters
sensorIDunique ID of the sensor
drainIDunique ID of drain
Returns
true if drain is dead

Definition at line 158 of file PXDDeadPixelPar.h.

159 {
160 auto mapIter = m_MapDrains.find(sensorID);
161 if (mapIter != m_MapDrains.end()) {
162 // Found some dead drains
163 auto& deadDrains = mapIter->second;
164 // Look if this drain is dead
165 if (deadDrains.find(drainID) != deadDrains.end())
166 return true;
167 }
168 return false;
169 }

◆ isDeadRow()

bool isDeadRow ( unsigned short  sensorID,
unsigned int  vCellID 
) const
inline

Check whether a row is dead.

Parameters
sensorIDunique ID of the sensor
vCellIDunique ID of row
Returns
true if row is dead

Definition at line 140 of file PXDDeadPixelPar.h.

141 {
142 auto mapIter = m_MapRows.find(sensorID);
143 if (mapIter != m_MapRows.end()) {
144 // Found some dead rows
145 auto& deadRows = mapIter->second;
146 // Look if this row is dead
147 if (deadRows.find(vCellID) != deadRows.end())
148 return true;
149 }
150 return false;
151 }

◆ isDeadSensor()

bool isDeadSensor ( unsigned short  sensorID) const
inline

Check whether a sensor is dead.

Parameters
sensorIDunique ID of the sensor
Returns
true if sensor is dead

Definition at line 127 of file PXDDeadPixelPar.h.

128 {
129 if (m_MapSensors.find(sensorID) == m_MapSensors.end()) {
130 return false;
131 }
132 return true;
133 }

◆ isDeadSinglePixel()

bool isDeadSinglePixel ( unsigned short  sensorID,
unsigned int  pixID 
) const
inline

Check whether a single pixel is dead.

Parameters
sensorIDunique ID of the sensor
pixIDunique ID of pixel
Returns
true if pixel is dead

Definition at line 176 of file PXDDeadPixelPar.h.

177 {
178 auto mapIter = m_MapSingles.find(sensorID);
179 if (mapIter != m_MapSingles.end()) {
180 // Found some dead singles
181 auto& deadSingles = mapIter->second;
182 // Look if this single is dead
183 if (deadSingles.find(pixID) != deadSingles.end())
184 return true;
185 }
186 return false;
187 }

◆ maskDrain()

void maskDrain ( unsigned short  sensorID,
unsigned int  drainID 
)
inline

Mask single drain.

Parameters
sensorIDunique ID of the sensor
drainIDunique ID of single pixel to mask

Definition at line 59 of file PXDDeadPixelPar.h.

60 {
61 auto mapIter = m_MapDrains.find(sensorID);
62 if (mapIter != m_MapDrains.end()) {
63 // Already some masked drain on sensor
64 auto& drains = mapIter->second;
65 // Only add drain, if it is not already in
66 if (drains.find(drainID) == drains.end())
67 drains.insert(drainID);
68 } else {
69 // Create an empty set of masked drains
71 // drainID will be used to generate hash in unordered_set for quick access
72 drains.insert(drainID);
73 m_MapDrains[sensorID] = drains;
74 }
75 }
std::unordered_set< unsigned int > DeadChannelSet
Structure to hold set of dead channel indexed by their unique id (unsigned int), stored in hash table...

◆ maskRow()

void maskRow ( unsigned short  sensorID,
unsigned int  vCellID 
)
inline

Mask single row.

Parameters
sensorIDunique ID of the sensor
vCellIDunique ID of row to mask

Definition at line 82 of file PXDDeadPixelPar.h.

83 {
84 auto mapIter = m_MapRows.find(sensorID);
85 if (mapIter != m_MapRows.end()) {
86 // Already some masked rows on sensor
87 auto& rows = mapIter->second;
88 // Only add row, if it is not already in
89 if (rows.find(vCellID) == rows.end())
90 rows.insert(vCellID);
91 } else {
92 // Create an empty set of masked rows
94 // vCellID will be used to generate hash in unordered_set for quick access
95 rows.insert(vCellID);
96 m_MapRows[sensorID] = rows;
97 }
98 }

◆ maskSensor()

void maskSensor ( unsigned short  sensorID)
inline

Mask sensor.

Parameters
sensorIDunique ID of the sensor

Definition at line 45 of file PXDDeadPixelPar.h.

46 {
47 auto mapIter = m_MapSensors.find(sensorID);
48 if (mapIter == m_MapSensors.end()) {
49 // Sensor not already masked as dead. Mask it.
50 m_MapSensors.insert(sensorID);
51 }
52 }

◆ maskSinglePixel()

void maskSinglePixel ( unsigned short  sensorID,
unsigned int  pixID 
)
inline

Mask single pixel.

Parameters
sensorIDunique ID of the sensor
pixIDunique ID of single pixel to mask

Definition at line 105 of file PXDDeadPixelPar.h.

106 {
107 auto mapIter = m_MapSingles.find(sensorID);
108 if (mapIter != m_MapSingles.end()) {
109 // Already some masked single pixels on sensor
110 auto& singles = mapIter->second;
111 // Only add pixel, if it is not already in
112 if (singles.find(pixID) == singles.end())
113 singles.insert(pixID);
114 } else {
115 // Create an empty set of masked single pixels
117 // pixID will be used to generate hash in unordered_set for quick access
118 singles.insert(pixID);
119 m_MapSingles[sensorID] = singles;
120 }
121 }

Member Data Documentation

◆ m_MapDrains

std::unordered_map<unsigned short, DeadChannelSet> m_MapDrains
private

Structure holding sets of dead drains for all sensors by sensor id (unsigned short).

Definition at line 210 of file PXDDeadPixelPar.h.

◆ m_MapRows

std::unordered_map<unsigned short, DeadChannelSet> m_MapRows
private

Structure holding sets of dead rows for all sensors by sensor id (unsigned short).

Definition at line 207 of file PXDDeadPixelPar.h.

◆ m_MapSensors

std::unordered_set< unsigned int> m_MapSensors
private

Structure holding dead sensors by sensor id.

Definition at line 213 of file PXDDeadPixelPar.h.

◆ m_MapSingles

std::unordered_map<unsigned short, DeadChannelSet> m_MapSingles
private

Structure holding sets of dead single pixels for all sensors by sensor id (unsigned short).

Definition at line 204 of file PXDDeadPixelPar.h.


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