![]() |
Project
|
Tool for recalibration at cell level. More...
#include <CellRecalibrator.h>
Classes | |
class | CellTypeException |
Handling of invalid cell types in calibration. More... | |
Public Member Functions | |
CellRecalibrator ()=default | |
Constructor. | |
~CellRecalibrator ()=default | |
Destructor. | |
void | setBadChannelMap (const BadChannelMap *bcm) |
Set the bad channel map. | |
void | setTimeCalibration (const TimeCalibrationParams *tcp) |
Set the time calibration params. | |
void | setGainCalibration (const GainCalibrationFactors *gcf) |
Set the gain calibration params. | |
bool | hasBadChannelMap () const |
Check if the bad channel calibration is enabled. | |
bool | hasTimeCalibration () const |
Check if the time calibration is enabled. | |
bool | hasGainCalibration () const |
Check if the energy calibration is enabled. | |
const BadChannelMap * | getBadChannelMap () const |
Get bad channel map currently used in the calibrator. | |
const TimeCalibrationParams * | getTimeCalibration () const |
Get time calibration parameters currently used in the calibrator. | |
const GainCalibrationFactors * | getGainCalibration () const |
Get gain calibration factors currently used in the calibrator. | |
template<typename T > | |
std::optional< T > | getCalibratedCell (const T &inputcell) const |
Calibrate single cell. | |
template<typename T > | |
std::tuple< std::vector< T >, std::vector< int > > | getCalibratedCells (const gsl::span< const T > inputcells) |
Get list of calibrated cells based on a cell input collection. | |
void | printStream (std::ostream &stream) const |
Print settings to the stream. | |
Tool for recalibration at cell level.
Applying cell-level calibrations
Attention: All calibrations for which calibration objects are provided are applied. Check for active calibration is therefore related to the presence of the corresponding calibration object.
Input can be a single cell (getCalibratedCell) or a collection of cells (getCalibratedCells). In case of single cell the result is optional since the cell can be rejected by the bad channel mask. Only cells of type high gain or low gain can be calibrated, in case cells of other types (LEDMON/TRU) are passed to getCalibratedCell an exception will be thrown.
The calibrator supports all cells of the CellInterface concept.
Definition at line 60 of file CellRecalibrator.h.
|
default |
Constructor.
|
default |
Destructor.
|
inline |
Get bad channel map currently used in the calibrator.
Definition at line 114 of file CellRecalibrator.h.
|
inline |
Calibrate single cell.
Applying all calibrations provided based on presence of calibration objects. Only cells of type high-gain or low-gain can be calibrated. Since the cell can be rejected by the bad channel calibration the return type is std::optional, where an empty optional reflects rejected cells.
inputcell | Cell to calibrate |
CellTypeException | in case the inputcell is neither of type high gain nor low gain |
Definition at line 135 of file CellRecalibrator.h.
|
inline |
Get list of calibrated cells based on a cell input collection.
Applying calibrations to all cells in the input collections and return a vector of accepted and calibrated cells. Cells not of type high gain or low gain are discarded. All calibrations for which calibration objects are available are applied.
inputcells | Collection of input cells |
Definition at line 169 of file CellRecalibrator.h.
|
inline |
Get gain calibration factors currently used in the calibrator.
Definition at line 122 of file CellRecalibrator.h.
|
inline |
Get time calibration parameters currently used in the calibrator.
Definition at line 118 of file CellRecalibrator.h.
|
inline |
Check if the bad channel calibration is enabled.
Definition at line 102 of file CellRecalibrator.h.
|
inline |
Check if the energy calibration is enabled.
Definition at line 110 of file CellRecalibrator.h.
|
inline |
Check if the time calibration is enabled.
Definition at line 106 of file CellRecalibrator.h.
void CellRecalibrator::printStream | ( | std::ostream & | stream | ) | const |
Print settings to the stream.
stream | Stream to print on |
Definition at line 17 of file CellRecalibrator.cxx.
|
inline |
Set the bad channel map.
bcm | Bad channel map to be applied |
Definition at line 90 of file CellRecalibrator.h.
|
inline |
Set the gain calibration params.
gcf | Gain calibration factors to be applied |
Definition at line 98 of file CellRecalibrator.h.
|
inline |
Set the time calibration params.
tcp | Time calibration params to be applied |
Definition at line 94 of file CellRecalibrator.h.