Belle II Software development
|
This class provides a check for ignored (=cold, hot or otherwise deffective) pixels for the use in PXD data reconstruction. More...
#include <PXDIgnoredPixelsMap.h>
Public Types | |
typedef std::pair< unsigned short, unsigned short > | map_pixel |
Simple structure for a pixel, u = map_pixel.first, v = map_pixel.second. | |
typedef std::function< bool(unsigned short, unsigned short) > | pixel_range_test_prototype |
Prototype for lambda function used to check if a pixel is in masked range. | |
typedef std::multimap< unsigned int, pixel_range_test_prototype, std::greater< unsigned int > > | IgnoredPixelsRangeSet |
Structure to hold set of masked pixel ranges ordered from largest to smallest by their area (unsigned int) | |
typedef std::unordered_set< unsigned int > | IgnoredSinglePixelsSet |
Structure to hold set of masked single pixels indexed by their unique id (unsigned int), stored in hash table. | |
Public Member Functions | |
PXDIgnoredPixelsMap (const std::string &xml_filename) | |
Constructor. | |
PXDIgnoredPixelsMap ()=delete | |
No default constructor. | |
const std::set< map_pixel > | getIgnoredPixels (VxdID id) |
Get the set of ignored pixels for a sensor. | |
bool | pixelOK (VxdID id, map_pixel pixel) |
Check whether a pixel on a given sensor is OK or not. | |
Private Attributes | |
std::unordered_map< unsigned short, IgnoredPixelsRangeSet > | m_Map |
Structure holding sets of ignored pixel ranges for all sensors by sensor id (unsigned short). | |
std::unordered_map< unsigned short, IgnoredSinglePixelsSet > | m_MapSingles |
Structure holding sets of ingored single pixels for all sensors by sensor id (unsigned short). | |
IgnoredPixelsRangeSet | m_lastIgnored |
Set of ignored pixel ranges for the most currently queried sensor. | |
IgnoredSinglePixelsSet | m_lastIgnoredSingles |
Set of ignored single pixels for the most currently queried sensor. | |
VxdID | m_lastSensorID |
The most currently queried sensor number. | |
unsigned short | m_lastSensorVCells |
The most currently queried sensor number of V pixels (for quick pixel uid evaluation) | |
This class provides a check for ignored (=cold, hot or otherwise deffective) pixels for the use in PXD data reconstruction.
The class has non-intrusive behavior, that is, it will not interfere when queries on non-existent sensors are asked. Treatment of single masked pixels and masked ranges (rows, cols, ...) is different for performance reasons.
NOTE: More optimization is possible:
Definition at line 39 of file PXDIgnoredPixelsMap.h.
typedef std::multimap< unsigned int, pixel_range_test_prototype, std::greater<unsigned int> > IgnoredPixelsRangeSet |
Structure to hold set of masked pixel ranges ordered from largest to smallest by their area (unsigned int)
Definition at line 46 of file PXDIgnoredPixelsMap.h.
typedef std::unordered_set< unsigned int> IgnoredSinglePixelsSet |
Structure to hold set of masked single pixels indexed by their unique id (unsigned int), stored in hash table.
Definition at line 48 of file PXDIgnoredPixelsMap.h.
typedef std::pair<unsigned short, unsigned short> map_pixel |
Simple structure for a pixel, u = map_pixel.first, v = map_pixel.second.
Definition at line 42 of file PXDIgnoredPixelsMap.h.
typedef std::function< bool(unsigned short, unsigned short) > pixel_range_test_prototype |
Prototype for lambda function used to check if a pixel is in masked range.
Definition at line 44 of file PXDIgnoredPixelsMap.h.
|
explicit |
Constructor.
xml_filename | is the name of the xml file containing the map. |
Definition at line 20 of file PXDIgnoredPixelsMap.cc.
const std::set< PXDIgnoredPixelsMap::map_pixel > getIgnoredPixels | ( | VxdID | id | ) |
Get the set of ignored pixels for a sensor.
id | VxdID of the required sensor |
Definition at line 150 of file PXDIgnoredPixelsMap.cc.
bool pixelOK | ( | VxdID | id, |
PXDIgnoredPixelsMap::map_pixel | pixel | ||
) |
Check whether a pixel on a given sensor is OK or not.
id | VxdID of the sensor |
pixel | Pixel constructed e.g. as map_pixel(u, v) |
Definition at line 169 of file PXDIgnoredPixelsMap.cc.
|
private |
Set of ignored pixel ranges for the most currently queried sensor.
Definition at line 80 of file PXDIgnoredPixelsMap.h.
|
private |
Set of ignored single pixels for the most currently queried sensor.
Definition at line 82 of file PXDIgnoredPixelsMap.h.
|
private |
The most currently queried sensor number.
Definition at line 85 of file PXDIgnoredPixelsMap.h.
|
private |
The most currently queried sensor number of V pixels (for quick pixel uid evaluation)
Definition at line 87 of file PXDIgnoredPixelsMap.h.
|
private |
Structure holding sets of ignored pixel ranges for all sensors by sensor id (unsigned short).
Definition at line 75 of file PXDIgnoredPixelsMap.h.
|
private |
Structure holding sets of ingored single pixels for all sensors by sensor id (unsigned short).
Definition at line 77 of file PXDIgnoredPixelsMap.h.