ATLAS Offline Software
|
Condition object to keep calibration factors of TileCal channels. More...
#include <TileEMScale.h>
Public Member Functions | |
TileEMScale () | |
virtual | ~TileEMScale () |
bool | initialize () |
float | calibrateChannel (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn, TileRawChannelUnit::UNIT rawDataUnitOut) const |
Calibrate a Tile channel. More... | |
float | applyEMScaleCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude) const |
Calibrate a Tile channel to EM scale: Equalized pC -> MeV. More... | |
float | applyCesiumCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const |
Apply cesium calibration constant. More... | |
float | applyLaserCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude) const |
Apply laser correction. More... | |
float | applyLaserLinearCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude) const |
Apply laser (PMT linearity) correction. More... | |
float | applyLaserNonLinearCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude) const |
Apply laser (PMT nonlinearity) correction. More... | |
float | applyChargeCalibration (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const |
Apply CIS calibration: ADC counts -> pC. More... | |
float | applyChargLinearCalibration (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const |
Apply CIS linear calibration: ADC counts -> pC. More... | |
float | applyChargeNonLinearCalibration (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const |
Apply CIS non-linear calibration: ADC counts -> pC. More... | |
float | calibrateOnlineChannel (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const |
Calibrate an online Tile channel from OnlineADCcounts to an arbitrary Online unit, no non-linear corrections are applied. More... | |
float | applyOnlineEMScaleCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude) const |
Calibrate online chnnel to EM scale: Equalized pC -> MeV. More... | |
float | applyOnlineCesiumCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const |
Apply online cesium calibration constant. More... | |
float | applyOnlineLaserCalibration (unsigned int drawerIdx, unsigned int channel, float amplitude) const |
Apply online laser (PMT linearity) correction. More... | |
float | applyOnlineChargeCalibration (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const |
Apply online CIS calibration: ADC counts -> pC. More... | |
float | undoOnlineChannelCalibration (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const |
Undo the calibration applied in ROD signal reconstruction. More... | |
float | getCesiumReferenceLaserGain (unsigned int drawerIdx, unsigned int channel, unsigned int adc) const |
Return the PMT gain reference as measured by the laser system. More... | |
float | getCesiumReferenceHV (unsigned int drawerIdx, unsigned int channel) const |
Return the reference PMT HV set in last cesium calibration. More... | |
float | getCesiumReferenceTemperature (unsigned int drawerIdx, unsigned int channel) const |
Return the drawer temperature as measured during last cesium equalization. More... | |
float | getLaserFiberVariation (unsigned int drawerIdx, unsigned int channel) const |
Return laser fiber relative variation. More... | |
float | getLaserPartitionVariation (unsigned int drawerIdx) const |
Return laser partition relative variation. More... | |
float | getLaserReferenceHV (unsigned int drawerIdx, unsigned int channel) const |
Returns the reference PMT HV from appropriate laser calibration. More... | |
TileRawChannelUnit::UNIT | getOnlineCacheUnit () const |
Return the unit of cached online calibration constants. More... | |
void | setOnlineCacheUnit (TileRawChannelUnit::UNIT onlCacheUnit) |
Set online cache unit. More... | |
void | setCalibOflCisLin (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOflCisNln (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOflLasLin (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOflLasNln (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOflLasFib (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOflCes (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOflEms (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOnlCis (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOnlLas (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOnlCes (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setCalibOnlEms (std::unique_ptr< TileCalibDataFlt > calibData) |
void | setMaxChannels (unsigned int maxChannels) |
void | setMaxGains (unsigned int maxGains) |
Protected Member Functions | |
void | resetOnlineCache () |
Recache the total online calibration constant applied in ROD. More... | |
float | getOnlineCalibration (unsigned int drawerIdx, unsigned int channel, unsigned int adc, TileRawChannelUnit::UNIT onlUnit) const |
Return the calibration constant applied in the DSP. More... | |
bool | checkIfOflLaserLinearCalibrationUsed () const |
Check if offline linear laser calibration will be used. More... | |
bool | checkIfOflLaserNonLinearCalibrationUsed () const |
Check if offline nonlinear laser calibration will be used. More... | |
unsigned int | getCacheIndex (unsigned int drawerIdx, unsigned int channel, unsigned int adc) const |
Return cache index used for online calibration constants. More... | |
Protected Attributes | |
TileRawChannelUnit::UNIT | m_onlCacheUnit |
std::vector< float > | m_onlCache |
bool | m_isOflLasLinUsed |
bool | m_isOflLasNlnUsed |
std::unique_ptr< TileCalibDataFlt > | m_calibOflCisLin |
std::unique_ptr< TileCalibDataFlt > | m_calibOflCisNln |
std::unique_ptr< TileCalibDataFlt > | m_calibOflLasLin |
std::unique_ptr< TileCalibDataFlt > | m_calibOflLasNln |
std::unique_ptr< TileCalibDataFlt > | m_calibOflLasFib |
std::unique_ptr< TileCalibDataFlt > | m_calibOflCes |
std::unique_ptr< TileCalibDataFlt > | m_calibOflEms |
std::unique_ptr< TileCalibDataFlt > | m_calibOnlCis |
std::unique_ptr< TileCalibDataFlt > | m_calibOnlLas |
std::unique_ptr< TileCalibDataFlt > | m_calibOnlCes |
std::unique_ptr< TileCalibDataFlt > | m_calibOnlEms |
bool | m_useOflLasFib |
unsigned int | m_maxChannels |
unsigned int | m_maxGains |
unsigned int | m_drawerCacheSize |
const float | m_epsilon = 1.e-5 |
Condition object to keep calibration factors of TileCal channels.
In order to calibrate signals from TileCal to the electromagnetic (EM) scale, a set of calibration constants need to be applied. They are obtained by the independent CIS, Laser and Cesium calibration system. The final calibration constant from pC to the EM scale is determinded in dedicated electron and muon testbeam analyses. This AlgTool provides access to the calibration constants stored in the COOL database and functions to perform the actual calibrations.
The central function of this AlgTool is calibrateChannel(), which enables the user to calibrate any TileCal channel from a given input unit (usually ADC counts or the online unit stored in the bytestream) to the desired output unit (usually MeV). In addition, functions performing the individual calibration steps are provided. They also give access to the calibration constants stored in the COOL DB by using unit amplitude as input.
A first "online" calibration is already applied during the signal reconstruction in the ROD. The used calibration constants are preserved in special database folders that do not allow to modify calibration constants for runs already taken. This ensures that the calibrations applied online in a given run can always be undone later in order to apply updated calibration constants in a reprocessing step. In addition, CIS and Laser calibrations might contain non-linear parts which are only applied during the offline calibration using this AlgTool.
Configuration
TileCalibEms needs the following TileCalibData input data set up via corresponding methods
The calibration constants applied in the ROD reconstruction have to be supplied through the "online" TileCalibData:
Since the calibration factor applied in the ROD is the product of up to four numbers, associated to the four calibration steps listed above, the total ROD calibration factor is cached. The unit of the cache is set up by setOnlCacheUnit() method and should be set to the ROD output unit present in the bytestream (otherwise the total factor will be recomputed event by event). The following online cache units can be used here:
If the ROD calibration should not be undone (or is not available as for simulated data), online cache unit should be set to "Invalid" (which is the default).
Definition at line 87 of file TileEMScale.h.
TileEMScale::TileEMScale | ( | ) |
Definition at line 15 of file TileEMScale.cxx.
|
virtual |
Definition at line 30 of file TileEMScale.cxx.
float TileEMScale::applyCesiumCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude, | ||
bool | applyLasCorr = true |
||
) | const |
Apply cesium calibration constant.
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
applyLasCorr | Apply the (not yet implemented) relative laser correction |
Definition at line 208 of file TileEMScale.cxx.
float TileEMScale::applyChargeCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc, | ||
float | amplitude | ||
) | const |
Apply CIS calibration: ADC counts -> pC.
Apply both the linear and non-linear part of the CIS calibration
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
amplitude | Input ampitude in units of ADC counts |
Definition at line 264 of file TileEMScale.cxx.
float TileEMScale::applyChargeNonLinearCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc, | ||
float | amplitude | ||
) | const |
Apply CIS non-linear calibration: ADC counts -> pC.
Apply only the non-linear part of the CIS calibration
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
amplitude | Input ampitude in units of ADC counts |
Definition at line 284 of file TileEMScale.cxx.
float TileEMScale::applyChargLinearCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc, | ||
float | amplitude | ||
) | const |
Apply CIS linear calibration: ADC counts -> pC.
Apply only the linear part of the CIS calibration
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
amplitude | Input ampitude in units of ADC counts |
Definition at line 275 of file TileEMScale.cxx.
float TileEMScale::applyEMScaleCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude | ||
) | const |
Calibrate a Tile channel to EM scale: Equalized pC -> MeV.
Apply the pC to MeV calibration constant
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
Definition at line 201 of file TileEMScale.cxx.
float TileEMScale::applyLaserCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude | ||
) | const |
Apply laser correction.
Apply both the linear and non-linear part of the laser calibration
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
Definition at line 222 of file TileEMScale.cxx.
float TileEMScale::applyLaserLinearCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude | ||
) | const |
Apply laser (PMT linearity) correction.
Apply only the linear part of the laser calibration
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
Definition at line 239 of file TileEMScale.cxx.
float TileEMScale::applyLaserNonLinearCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude | ||
) | const |
Apply laser (PMT nonlinearity) correction.
Apply only the non-linear part of the laser calibration
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
Definition at line 251 of file TileEMScale.cxx.
float TileEMScale::applyOnlineCesiumCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude, | ||
bool | applyLasCorr = true |
||
) | const |
Apply online cesium calibration constant.
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
applyLasCorr | Apply the (not yet implemented) relative laser correction |
Definition at line 327 of file TileEMScale.cxx.
float TileEMScale::applyOnlineChargeCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc, | ||
float | amplitude | ||
) | const |
Apply online CIS calibration: ADC counts -> pC.
Apply only the linear part of the CIS calibration
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
amplitude | Input ampitude in units of ADC counts |
Definition at line 349 of file TileEMScale.cxx.
float TileEMScale::applyOnlineEMScaleCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude | ||
) | const |
Calibrate online chnnel to EM scale: Equalized pC -> MeV.
Apply the pC to MeV calibration constant
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
Definition at line 320 of file TileEMScale.cxx.
float TileEMScale::applyOnlineLaserCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
float | amplitude | ||
) | const |
Apply online laser (PMT linearity) correction.
Apply only the linear part of the laser calibration
drawerIdx | Drawer index |
channel | Tile channel |
amplitude | Input ampitude in pC |
Definition at line 341 of file TileEMScale.cxx.
float TileEMScale::calibrateChannel | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc, | ||
float | amplitude, | ||
TileRawChannelUnit::UNIT | rawDataUnitIn, | ||
TileRawChannelUnit::UNIT | rawDataUnitOut | ||
) | const |
Calibrate a Tile channel.
Transforms the input amplitude with unit rawDataUnitIn to output amplitude with unit rawDataUnitOut. Note that "upstream" calibrations are not supported, i.e. calibration requests from eg. MeV to ADC counts will result in an exception being thrown.
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
amplitude | Input ampitude in units of rawDataUnitIn |
rawDataUnitIn | Input unit, see TileIdentifier/TileRawChannelUnit.h |
rawDataUnitOut | Output unit, see TileIdentifier/TileRawChannelUnit.h |
Definition at line 136 of file TileEMScale.cxx.
float TileEMScale::calibrateOnlineChannel | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc, | ||
float | amplitude, | ||
TileRawChannelUnit::UNIT | onlUnit | ||
) | const |
Calibrate an online Tile channel from OnlineADCcounts to an arbitrary Online unit, no non-linear corrections are applied.
Transforms the input amplitude with unit rawDataUnitIn to output amplitude with unit rawDataUnitOut. Note that "upstream" calibrations are not supported, i.e. calibration requests from eg. MeV to ADC counts will result in an exception being thrown.
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
amplitude | Input amplitude in OnlineADCcounts unit |
onlUnit | Output online unit, see TileIdentifier/TileRawChannelUnit.h |
Definition at line 292 of file TileEMScale.cxx.
|
protected |
Check if offline linear laser calibration will be used.
This callback is called if offline linear laser of the proxies callback function has been called due to an updated COOL DB IOV. TileEMScale::m_isOflLasLinUsed property.
Definition at line 454 of file TileEMScale.cxx.
|
protected |
Check if offline nonlinear laser calibration will be used.
This callback is called if offline nonlinear laser of the proxies callback function has been called due to an updated COOL DB IOV.TileEMScale::m_isOflLasNlnUsed property.
Definition at line 471 of file TileEMScale.cxx.
|
inlineprotected |
Return cache index used for online calibration constants.
Return cache index used for the calibration constant applied in the DSP
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
Definition at line 460 of file TileEMScale.h.
float TileEMScale::getCesiumReferenceHV | ( | unsigned int | drawerIdx, |
unsigned int | channel | ||
) | const |
Return the reference PMT HV set in last cesium calibration.
drawerIdx | Drawer index |
channel | Tile channel |
Definition at line 365 of file TileEMScale.cxx.
float TileEMScale::getCesiumReferenceLaserGain | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc | ||
) | const |
Return the PMT gain reference as measured by the laser system.
Continous PMT gain measurements with the laser system enable to correct for PMT gain drifts between cesium calibration runs. Corrections are applied relative to the PMT gain measured by the laser system directly after the last cesium equalization.
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
Definition at line 358 of file TileEMScale.cxx.
float TileEMScale::getCesiumReferenceTemperature | ( | unsigned int | drawerIdx, |
unsigned int | channel | ||
) | const |
Return the drawer temperature as measured during last cesium equalization.
drawerIdx | Drawer index |
channel | Tile channel |
Definition at line 372 of file TileEMScale.cxx.
float TileEMScale::getLaserFiberVariation | ( | unsigned int | drawerIdx, |
unsigned int | channel | ||
) | const |
Return laser fiber relative variation.
drawerIdx | Drawer index |
channel | Tile channel |
Definition at line 379 of file TileEMScale.cxx.
float TileEMScale::getLaserPartitionVariation | ( | unsigned int | drawerIdx | ) | const |
Return laser partition relative variation.
The partition is defined by the drawerIdx which belongs to this partition. The relative partition variation values are stored in the first drawer of each partition at tile channel LAS_PART_CHAN (it is 43), which is empty both in barrel and in extended barrel tile modules. Hence its value is not useful for getLasFiber, which reads from the same source.
drawerIdx | Drawer index |
Definition at line 386 of file TileEMScale.cxx.
float TileEMScale::getLaserReferenceHV | ( | unsigned int | drawerIdx, |
unsigned int | channel | ||
) | const |
Returns the reference PMT HV from appropriate laser calibration.
drawerIdx | Drawer index |
channel | Tile channel |
Definition at line 394 of file TileEMScale.cxx.
|
inline |
Return the unit of cached online calibration constants.
Definition at line 440 of file TileEMScale.h.
|
protected |
Return the calibration constant applied in the DSP.
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
onlUnit | The output unit of the DSP |
Definition at line 71 of file TileEMScale.cxx.
bool TileEMScale::initialize | ( | ) |
Definition at line 35 of file TileEMScale.cxx.
|
protected |
Recache the total online calibration constant applied in ROD.
This callback is called if any of the "online" proxies callback function has been called due to an updated COOL DB IOV. The cache is cleared and refilled with the current valid values of the unit specified in the OnlCacheUnit property.
Definition at line 56 of file TileEMScale.cxx.
void TileEMScale::setCalibOflCes | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 428 of file TileEMScale.cxx.
void TileEMScale::setCalibOflCisLin | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 408 of file TileEMScale.cxx.
void TileEMScale::setCalibOflCisNln | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 412 of file TileEMScale.cxx.
void TileEMScale::setCalibOflEms | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 432 of file TileEMScale.cxx.
void TileEMScale::setCalibOflLasFib | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 424 of file TileEMScale.cxx.
void TileEMScale::setCalibOflLasLin | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 416 of file TileEMScale.cxx.
void TileEMScale::setCalibOflLasNln | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 420 of file TileEMScale.cxx.
void TileEMScale::setCalibOnlCes | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 445 of file TileEMScale.cxx.
void TileEMScale::setCalibOnlCis | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 437 of file TileEMScale.cxx.
void TileEMScale::setCalibOnlEms | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 449 of file TileEMScale.cxx.
void TileEMScale::setCalibOnlLas | ( | std::unique_ptr< TileCalibDataFlt > | calibData | ) |
Definition at line 441 of file TileEMScale.cxx.
|
inline |
Definition at line 450 of file TileEMScale.h.
|
inline |
Definition at line 455 of file TileEMScale.h.
|
inline |
Set online cache unit.
onlCacheUnit | online cache unit |
Definition at line 445 of file TileEMScale.h.
float TileEMScale::undoOnlineChannelCalibration | ( | unsigned int | drawerIdx, |
unsigned int | channel, | ||
unsigned int | adc, | ||
float | amplitude, | ||
TileRawChannelUnit::UNIT | onlUnit | ||
) | const |
Undo the calibration applied in ROD signal reconstruction.
At the run configuration stage, calibration constants are loaded into TileCal RODs, enabling the output of the signal reconstruction run online in DSPs to be sent in units of MeV. However, in this first raw calibration only the linear part of corrections are applied. In order to apply the full (and maybe in the meantime updated) calibration including all non-linear corrections, the calibrations applied in the ROD need to be undone first.
drawerIdx | Drawer index |
channel | Tile channel |
adc | Gain |
amplitude | Input ampitude in online units onlUnit |
onlUnit | The output unit of the DSP, preserved in the bytestream |
Definition at line 97 of file TileEMScale.cxx.
|
protected |
Definition at line 413 of file TileEMScale.h.
|
protected |
Definition at line 408 of file TileEMScale.h.
|
protected |
Definition at line 409 of file TileEMScale.h.
|
protected |
Definition at line 414 of file TileEMScale.h.
|
protected |
Definition at line 412 of file TileEMScale.h.
|
protected |
Definition at line 410 of file TileEMScale.h.
|
protected |
Definition at line 411 of file TileEMScale.h.
|
protected |
Definition at line 419 of file TileEMScale.h.
|
protected |
Definition at line 417 of file TileEMScale.h.
|
protected |
Definition at line 420 of file TileEMScale.h.
|
protected |
Definition at line 418 of file TileEMScale.h.
|
protected |
Definition at line 426 of file TileEMScale.h.
|
protected |
Definition at line 428 of file TileEMScale.h.
|
protected |
Definition at line 403 of file TileEMScale.h.
|
protected |
Definition at line 404 of file TileEMScale.h.
|
protected |
Definition at line 424 of file TileEMScale.h.
|
protected |
Definition at line 425 of file TileEMScale.h.
|
protected |
Definition at line 401 of file TileEMScale.h.
|
protected |
Definition at line 400 of file TileEMScale.h.
|
protected |
Definition at line 422 of file TileEMScale.h.