![]() |
Project
|
CCDB container for masked cells in EMCAL. More...
#include <BadChannelMap.h>
Public Types | |
enum class | MaskType_t : char { GOOD_CELL , BAD_CELL , WARM_CELL , DEAD_CELL } |
Definition of mask types in the bad channel map. More... | |
Public Member Functions | |
BadChannelMap ()=default | |
Constructor. | |
~BadChannelMap ()=default | |
Destructor. | |
BadChannelMap & | operator+= (const BadChannelMap &rhs) |
Add bad channel map to this bad channel map. | |
bool | operator== (const BadChannelMap &other) const |
Comparison of two bad channel maps. | |
void | addBadChannel (unsigned short channelID, MaskType_t mask) |
Add bad cell to the container. | |
MaskType_t | getChannelStatus (unsigned short channelID) const |
Get the status of a certain cell. | |
TH2 * | getHistogramRepresentation () const |
Convert map into 2D histogram representation. | |
void | PrintStream (std::ostream &stream) const |
Print bad channels on a given stream. | |
CCDB container for masked cells in EMCAL.
The bad channel map contains channels which are found to be bad, dead or problematic during the calibration process and need to be masked so they are not considered in the clusterization or other analysis processes. Cells can be either bad, meaning that the spectra shape is so much distorted that recovery is not possible, dead, meaning that no signal is seen over a large datasample, or warm, indicating that the cell might be recovered by recalibration of the energy.
Bad channels can be added via
The cell container stores only bad or warm cells, good cells are ignored. However the function addBadChannel also updates the container with a new channel status - calling addBadChannel with the status GOOD_CELL for a cell which is stored in the container the cell is removed.
Reading the channel status is done via
Calling getChannelStatus for cells not registered in the container will return the status GOOD_CELL.
For visualization a histogram with the cell status as function of column and row can be created on the fly from the bad channel map. As the histogram is reated dynamically from the absolute cell ID an instance of the EMCAL Geometry is required - otherwise an empty histogram is created.
The bad channel map can be created from multiple bad channel maps using the operator +=. This allows for the combination of the bad channel map from multiple time slices. For cells present in both bad channel maps always the worst case condition (BAD_CELL) is assumed.
Definition at line 71 of file BadChannelMap.h.
|
strong |
Definition of mask types in the bad channel map.
Enumerator | |
---|---|
GOOD_CELL | GOOD cell, can be used without problems. |
BAD_CELL | Bad cell, must be excluded. |
WARM_CELL | Warm cell, to be used with care. |
DEAD_CELL | Dead cell, no data obtained. |
Definition at line 76 of file BadChannelMap.h.
|
default |
Constructor.
|
default |
Destructor.
void BadChannelMap::addBadChannel | ( | unsigned short | channelID, |
MaskType_t | mask | ||
) |
Add bad cell to the container.
channelID | Absolute ID of the bad channel |
mask | type of the bad channel |
CalibContainerIndexException | in case the cell ID exceeds the range of cells in EMCAL |
Adding new bad channel to the container. In case a cell with the same ID is already present in the container, the mask status is updated. Otherwise it is added.
Only bad or warm cells are added to the container. In case the mask type is GOOD_CELL, the entry is removed from the container if present before, otherwise the cell is ignored.
Definition at line 24 of file BadChannelMap.cxx.
BadChannelMap::MaskType_t BadChannelMap::getChannelStatus | ( | unsigned short | channelID | ) | const |
Get the status of a certain cell.
channelID | channel for which to obtain the channel status |
CalibContainerIndexException | in case the cell ID exceeds the range of cells in EMCAL |
Provide the mask status of a cell. In case the cell is registered in the container the mask status registered is returned, otherwise the cell is handled as GOOD_CELL
Definition at line 53 of file BadChannelMap.cxx.
TH2 * BadChannelMap::getHistogramRepresentation | ( | ) | const |
Convert map into 2D histogram representation.
Convert bad channel map into a 2D map with col-row dimensions. Entries in the histogram are:
Attention: The histogram is created on the fly using the mapping in o2::emcal::Geometry. In order to get the representation, a geometry instance must be available.
Definition at line 69 of file BadChannelMap.cxx.
BadChannelMap & BadChannelMap::operator+= | ( | const BadChannelMap & | rhs | ) |
Add bad channel map to this bad channel map.
rhs | Bad channel map to be added to this bad channel map |
Adding bad channels of another bad channel map to this bad channel map. In case the cell is present in both maps, the most severe condition is assumed.
Definition at line 97 of file BadChannelMap.cxx.
bool BadChannelMap::operator== | ( | const BadChannelMap & | other | ) | const |
Comparison of two bad channel maps.
Testing two bad channel maps for equalness. Bad channel maps are considered identical if the content is identical (same channels and same channel status for all cells).
Definition at line 122 of file BadChannelMap.cxx.
void BadChannelMap::PrintStream | ( | std::ostream & | stream | ) | const |
Print bad channels on a given stream.
stream | Stream on which the bad channel map is printed on |
Printing all bad channels store in the bad channel map on the stream. Printing also the channel status (BAD_CELL/WARM_CELL).
The function is called in the operator<< providing direct access to protected members. Explicit calls by the users is normally not necessary.
Definition at line 127 of file BadChannelMap.cxx.