Project
Loading...
Searching...
No Matches
o2::cpv::BadChannelMap Class Reference

CCDB container for bad (masked) channels in CPV. More...

#include <BadChannelMap.h>

Public Member Functions

 BadChannelMap ()=default
 Constructor.
 
 BadChannelMap (short test)
 Constructur used to build test bad map.
 
 ~BadChannelMap ()=default
 Destructor.
 
BadChannelMapoperator+= (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)
 Add bad cell to the container.
 
void setChannelGood (unsigned short channelID)
 Mark channel as good.
 
bool isChannelGood (unsigned short channelID) const
 Get the status of a certain cell.
 
void getHistogramRepresentation (short mod, TH2 *h) const
 Convert map into 2D histogram representation.
 
void PrintStream (std::ostream &stream) const
 Print bad channels on a given stream.
 

Detailed Description

CCDB container for bad (masked) channels in CPV.

Author
Dmitri Peresunko, adopted from EMCAL (Markus Fasel)
Since
Aug. 1, 2019

The CPV Bad Channel Map

The bad channel map contains channels which are marked to be bad and excluded from reonstruction: clusterization or other analysis processes.

Bad channels can be added via bcm.addBadChannel(1234); goodness of channel can be restored with bcm.setChannelGood(1234) ;

Reading the channel status is done via bool status = bcm.isChannelGood(1234); Calling isChannelGood for cells beyond CPV will return the status bad.

For visualization a 2D histogram with the cell status as function of x(phi) vs z for each module can be created on the fly from the bad channel map. As the histogram is created dynamically from the absolute cell ID an instance of the CPV 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.

Definition at line 56 of file BadChannelMap.h.

Constructor & Destructor Documentation

◆ BadChannelMap() [1/2]

o2::cpv::BadChannelMap::BadChannelMap ( )
default

Constructor.

◆ BadChannelMap() [2/2]

BadChannelMap::BadChannelMap ( short  test)

Constructur used to build test bad map.

Definition at line 23 of file BadChannelMap.cxx.

◆ ~BadChannelMap()

o2::cpv::BadChannelMap::~BadChannelMap ( )
default

Destructor.

Member Function Documentation

◆ addBadChannel()

void o2::cpv::BadChannelMap::addBadChannel ( unsigned short  channelID)
inline

Add bad cell to the container.

Parameters
channelIDAbsolute ID of the bad channel
masktype of the bad channel

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 97 of file BadChannelMap.h.

◆ getHistogramRepresentation()

void BadChannelMap::getHistogramRepresentation ( short  mod,
TH2 *  h 
) const

Convert map into 2D histogram representation.

Parameters
modModule number
hHistogram of size 64*56 to be filled with the bad channel map.

Convert bad channel map into a 2D map with phi(64) vs z(56) dimensions. Entries in the histogram are:

  • 0: GOOD_CELL
  • 1: BAD_CELL Attention: It is responsibility of user to create/delete histogram

Definition at line 52 of file BadChannelMap.cxx.

◆ isChannelGood()

bool o2::cpv::BadChannelMap::isChannelGood ( unsigned short  channelID) const
inline

Get the status of a certain cell.

Parameters
channelIDchannel for which to obtain the channel status
Returns
true if good channel

Provide the mask status of a cell.

Definition at line 120 of file BadChannelMap.h.

◆ operator+=()

BadChannelMap & o2::cpv::BadChannelMap::operator+= ( const BadChannelMap rhs)
inline

Add bad channel map to this bad channel map.

Parameters
rhsBad channel map to be added to this bad channel map
Returns
Reference to the combined bad channel map

Adding bad channels of another bad channel map to this bad channel map.

Definition at line 74 of file BadChannelMap.h.

◆ operator==()

bool o2::cpv::BadChannelMap::operator== ( const BadChannelMap other) const
inline

Comparison of two bad channel maps.

Returns
true if the bad channel maps are identical, false otherwise

Testing two bad channel maps for equalness.

Definition at line 84 of file BadChannelMap.h.

◆ PrintStream()

void BadChannelMap::PrintStream ( std::ostream &  stream) const

Print bad channels on a given stream.

Parameters
streamStream on which the bad channel map is printed on

Printing all bad channels store in the bad channel map on the stream.

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 82 of file BadChannelMap.cxx.

◆ setChannelGood()

void o2::cpv::BadChannelMap::setChannelGood ( unsigned short  channelID)
inline

Mark channel as good.

Parameters
channelIDAbsolute ID of the channel

Setting channel as good.

Definition at line 108 of file BadChannelMap.h.


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