Pixel masks of a single module.
More...
#include <PixelMasks.h>
|
| PixelMasks (int moduleID) |
| Constructor: all pixels are turned on (active)
|
|
void | set (int pixelID, bool value) |
| Sets mask value for a given pixel.
|
|
void | setPixelOff (int pixelID) |
| Turns given pixel off.
|
|
int | getModuleID () const |
| Returns slot ID.
|
|
unsigned | getNumPixels () const |
| Returns number of pixels.
|
|
bool | isActive (int pixelID) const |
| Checks if pixel is active.
|
|
const std::vector< bool > & | getMasks () const |
| Returns pixel masks of entire module.
|
|
|
int | m_moduleID = 0 |
| slot ID
|
|
std::vector< bool > | m_masks |
| pixel masks (true for active), index = pixelID -1
|
|
Pixel masks of a single module.
Definition at line 22 of file PixelMasks.h.
◆ PixelMasks()
Constructor: all pixels are turned on (active)
- Parameters
-
Definition at line 20 of file PixelMasks.cc.
21 {
23 if (not geo->isModuleIDValid(moduleID)) {
24 B2FATAL("TOP::PixelMasks: invalid slot number, moduleID = " << moduleID);
25 return;
26 }
27 int numPixels = geo->getModule(
m_moduleID).getPMTArray().getNumPixels();
28 m_masks.resize(numPixels,
true);
29 }
std::vector< bool > m_masks
pixel masks (true for active), index = pixelID -1
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
◆ getMasks()
const std::vector< bool > & getMasks |
( |
| ) |
const |
|
inline |
Returns pixel masks of entire module.
- Returns
- vector of pixel masks
Definition at line 68 of file PixelMasks.h.
◆ getModuleID()
int getModuleID |
( |
| ) |
const |
|
inline |
Returns slot ID.
- Returns
- slot ID
Definition at line 49 of file PixelMasks.h.
◆ getNumPixels()
unsigned getNumPixels |
( |
| ) |
const |
|
inline |
Returns number of pixels.
- Returns
- number of pixels
Definition at line 55 of file PixelMasks.h.
◆ isActive()
bool isActive |
( |
int |
pixelID | ) |
const |
|
inline |
Checks if pixel is active.
- Parameters
-
pixelID | pixel ID (1-based) |
- Returns
- true if active
Definition at line 85 of file PixelMasks.h.
86 {
87 unsigned k = pixelID - 1;
89 return false;
90 }
◆ set()
void set |
( |
int |
pixelID, |
|
|
bool |
value |
|
) |
| |
|
inline |
Sets mask value for a given pixel.
- Parameters
-
pixelID | pixel ID (1-based) |
value | true to set it active, false to turn it off |
Definition at line 79 of file PixelMasks.h.
80 {
81 unsigned k = pixelID - 1;
83 }
◆ setPixelOff()
void setPixelOff |
( |
int |
pixelID | ) |
|
|
inline |
Turns given pixel off.
- Parameters
-
pixelID | pixel ID (1-based) |
Definition at line 43 of file PixelMasks.h.
void set(int pixelID, bool value)
Sets mask value for a given pixel.
◆ m_masks
std::vector<bool> m_masks |
|
private |
pixel masks (true for active), index = pixelID -1
Definition at line 73 of file PixelMasks.h.
◆ m_moduleID
The documentation for this class was generated from the following files: