ATLAS Offline Software
Loading...
Searching...
No Matches
TileExpertToolEmscale Class Reference

(For experts only) Calibration of TileCal channels and access to calibration factors. More...

#include <TileExpertToolEmscale.h>

Inheritance diagram for TileExpertToolEmscale:
Collaboration diagram for TileExpertToolEmscale:

Public Member Functions

 TileExpertToolEmscale (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~TileExpertToolEmscale ()
float channelCalib (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn, TileRawChannelUnit::UNIT rawDataUnitOut) const
float doCalibEms (unsigned int drawerIdx, unsigned int channel, float amplitude) const
float doCalibCes (unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
float doCalibLas (unsigned int drawerIdx, unsigned int channel, float amplitude) const
float doCalibCis (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
float channelCalibOnl (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const
float doCalibEmsOnl (unsigned int drawerIdx, unsigned int channel, float amplitude) const
float doCalibCesOnl (unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
float doCalibLasOnl (unsigned int drawerIdx, unsigned int channel, float amplitude) const
float doCalibCisOnl (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
float undoOnlCalib (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const
float getLasPartition (unsigned int drawerIdx) const
void setEmOptions (const TileEmscaleCalibOptions &emOptions)
virtual StatusCode initialize () override
virtual StatusCode finalize () override
float getCesRefLas (unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
 Returns the PMT gain reference as measured by the laser system.
float getCesRefHv (unsigned int drawerIdx, unsigned int channel) const
 Returns the reference PMT HV set in last cesium calibration.
float getCesRefTemp (unsigned int drawerIdx, unsigned int channel) const
 Returns the drawer temperature as measured during last cesium equalization.
float getLasFiber (unsigned int drawerIdx, unsigned int channel) const
 Returns laser fiber relative variation.
float getLasRefHv (unsigned int drawerIdx, unsigned int channel) const
 Returns the reference PMT HV from appropriate laser calibration.
TileRawChannelUnit::UNIT getOnlCacheUnit () const
 Returns the unit of cached online calibration constants.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

SG::ReadCondHandleKey< TileEMScale > m_emScaleKey

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_setOnceCounter {false}
TileEmscaleCalibOptions m_emOptions {0}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

(For experts only) Calibration of TileCal channels and access to calibration factors.

Author
Lukas Pribyl lukas.nosp@m..pri.nosp@m.byl@c.nosp@m.ern..nosp@m.ch

This tool has the same functionality as the standard production TileCondToolEmscale tool. For the description of TileExpertToolEmscale methods please consult the file TileCondToolEmscale. The TileExpertToolEmscale tool is in addition able to switch on/off individual calibration corrections. This is set via TileIdentifier/TileEmscaleCalibOptions bitmap. If the calibration correction is switched on, the tool behaves exactly as TileCondToolEmscale, from which it inherits most of the methods. If the calibration correction is switched of (the relevant bit in m_emOptions bitmap is false), the relevant calibration method returns the input amplitude without any change. The value of the bitmap m_emOptions is set only once at the constructor.

Definition at line 26 of file TileExpertToolEmscale.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TileExpertToolEmscale()

TileExpertToolEmscale::TileExpertToolEmscale ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 20 of file TileExpertToolEmscale.cxx.

22 : TileCondToolEmscale(type, name, parent)
23{
24 declareInterface<TileExpertToolEmscale>(this);
25}
TileCondToolEmscale(const std::string &type, const std::string &name, const IInterface *parent)

◆ ~TileExpertToolEmscale()

virtual TileExpertToolEmscale::~TileExpertToolEmscale ( )
inlinevirtual

Definition at line 31 of file TileExpertToolEmscale.h.

31{};

Member Function Documentation

◆ channelCalib()

float TileExpertToolEmscale::channelCalib ( unsigned int drawerIdx,
unsigned int channel,
unsigned int adc,
float amplitude,
TileRawChannelUnit::UNIT rawDataUnitIn,
TileRawChannelUnit::UNIT rawDataUnitOut ) const

Definition at line 29 of file TileExpertToolEmscale.cxx.

30 {
31
32 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
33
34 //=== Undo online calibration, result is offline ADC counts
35 if (rawDataUnitIn >= TileRawChannelUnit::OnlineADCcounts) {
37 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib(onl)", rawDataUnitIn);
38 } else if (rawDataUnitIn > TileRawChannelUnit::OnlineADCcounts) {
39 amplitude = undoOnlCalib(drawerIdx, channel, adc, amplitude, rawDataUnitIn);
40 }
41 rawDataUnitIn = TileRawChannelUnit::ADCcounts;
42 }
43
44 //=== Allow only "forward" calibration from here on
45 if (rawDataUnitOut < rawDataUnitIn || rawDataUnitOut > TileRawChannelUnit::MegaElectronVolts) {
46 ATH_MSG_ERROR( "Invalid unit combination: "
47 << "in=" << rawDataUnitIn << " ,"
48 << "out="<< rawDataUnitOut );
49 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib(out)", rawDataUnitOut);
50 }
51
52 //=== Decide which calibrations to apply
53 switch (rawDataUnitIn) {
54
57 if (rawDataUnitOut > TileRawChannelUnit::ADCcounts) {
58 amplitude = doCalibCis(drawerIdx, channel, adc, amplitude);
59 if (rawDataUnitOut > TileRawChannelUnit::PicoCoulombs) {
60 amplitude = doCalibLas(drawerIdx, channel, amplitude);
61 amplitude = doCalibCes(drawerIdx, channel, amplitude);
62 if (rawDataUnitOut > TileRawChannelUnit::CesiumPicoCoulombs) {
63 amplitude = doCalibEms(drawerIdx, channel, amplitude);
64 }
65 }
66 }
67 break;
68
70 if (rawDataUnitOut > TileRawChannelUnit::PicoCoulombs) {
71 amplitude = doCalibLas(drawerIdx, channel, amplitude);
72 amplitude = doCalibCes(drawerIdx, channel, amplitude);
73 if (rawDataUnitOut > TileRawChannelUnit::CesiumPicoCoulombs) {
74 amplitude = doCalibEms(drawerIdx, channel, amplitude);
75 }
76 }
77 break;
78
80 if (rawDataUnitOut > TileRawChannelUnit::CesiumPicoCoulombs) {
81 amplitude = doCalibEms(drawerIdx, channel, amplitude);
82 }
83 break;
84
86 break;
87
88 default:
89 ATH_MSG_ERROR( "We should never come here: "
90 << "in=" << rawDataUnitIn << " ,"
91 << "out=" << rawDataUnitOut );
92
93 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib", rawDataUnitIn);
94
95 }
96
97 return amplitude;
98
99}
#define ATH_MSG_ERROR(x,...)
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
float doCalibCis(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
float doCalibCes(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
float doCalibEms(unsigned int drawerIdx, unsigned int channel, float amplitude) const
float doCalibLas(unsigned int drawerIdx, unsigned int channel, float amplitude) const
float undoOnlCalib(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const

◆ channelCalibOnl()

float TileExpertToolEmscale::channelCalibOnl ( unsigned int drawerIdx,
unsigned int channel,
unsigned int adc,
float amplitude,
TileRawChannelUnit::UNIT onlUnit ) const

Definition at line 164 of file TileExpertToolEmscale.cxx.

165 {
166
167 ATH_MSG_VERBOSE( "Recalculating total online constant for "
168 << drawerIdx << "/" << channel << "/" << adc << " , " << onlUnit );
169
170 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
171
172 //=== CIS calibration
174 amplitude = doCalibCisOnl(drawerIdx, channel, adc, amplitude);
175 ATH_MSG_VERBOSE( "---> amplitude after CIS: " << amplitude );
176
177 //=== LAS+CES calibration
179 amplitude = doCalibLasOnl(drawerIdx, channel, amplitude);
180 ATH_MSG_VERBOSE( "---> amplitude after LAS: " << amplitude );
181
182 amplitude = doCalibCesOnl(drawerIdx, channel, amplitude);
183 ATH_MSG_VERBOSE( "---> amplitude after CES: " << amplitude );
184
185 }
186 //=== EMSCALE calibration
188 amplitude = doCalibEmsOnl(drawerIdx, channel, amplitude);
189 ATH_MSG_VERBOSE( "---> amplitude after EMS: " << amplitude );
190 }
191 }
192
193 //=== convert float to 16 bit fixed point DSP precision
194 amplitude = TileCalibUtils::fixedPointPrecision(amplitude);
195 ATH_MSG_VERBOSE( "---> amplitude in fixed point precision: " << amplitude );
196
197 return amplitude;
198
199}
#define ATH_MSG_VERBOSE(x,...)
static float fixedPointPrecision(float val, unsigned int nBits=16)
Returns the input in fixed point precision.
float doCalibLasOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
float doCalibCesOnl(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
float doCalibEmsOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
float doCalibCisOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ doCalibCes()

float TileExpertToolEmscale::doCalibCes ( unsigned int drawerIdx,
unsigned int channel,
float amplitude,
bool applyLasCorr = true ) const

Definition at line 114 of file TileExpertToolEmscale.cxx.

114 {
115
116 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflCes)) {
117 return TileCondToolEmscale::doCalibCes(drawerIdx, channel, amplitude, applyLasCorr);
118 } else {
119 return amplitude;
120 }
121
122}
float doCalibCes(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Application of cesium calibration constant.
TileEmscaleCalibOptions m_emOptions

◆ doCalibCesOnl()

float TileExpertToolEmscale::doCalibCesOnl ( unsigned int drawerIdx,
unsigned int channel,
float amplitude,
bool applyLasCorr = true ) const

Definition at line 215 of file TileExpertToolEmscale.cxx.

215 {
216
217 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlCes)) {
218 return TileCondToolEmscale::doCalibCesOnl(drawerIdx, channel, amplitude, applyLasCorr);
219 } else {
220 return amplitude;
221 }
222
223}
float doCalibCesOnl(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Online application of cesium calibration constant.

◆ doCalibCis()

float TileExpertToolEmscale::doCalibCis ( unsigned int drawerIdx,
unsigned int channel,
unsigned int adc,
float amplitude ) const

Definition at line 145 of file TileExpertToolEmscale.cxx.

145 {
146
147 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
148
149 //=== Linear correction
150 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflCisFitLin)) {
151 amplitude = emScale->applyChargLinearCalibration(drawerIdx, channel, adc, amplitude);
152 } // OflCisFitLin
153
154 //=== non-linear correction
155 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflCisFitNln)) {
156 amplitude = emScale->applyChargeNonLinearCalibration(drawerIdx, channel, adc, amplitude);
157 } // OflCisFitNln
158
159 return amplitude;
160}

◆ doCalibCisOnl()

float TileExpertToolEmscale::doCalibCisOnl ( unsigned int drawerIdx,
unsigned int channel,
unsigned int adc,
float amplitude ) const

Definition at line 239 of file TileExpertToolEmscale.cxx.

239 {
240
241 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlCisLin)) {
242 return TileCondToolEmscale::doCalibCisOnl(drawerIdx, channel, adc, amplitude);
243 } else {
244 return amplitude;
245 }
246
247}
float doCalibCisOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
Online Application of CIS calibration: ADC counts -> pC.

◆ doCalibEms()

float TileExpertToolEmscale::doCalibEms ( unsigned int drawerIdx,
unsigned int channel,
float amplitude ) const

Definition at line 103 of file TileExpertToolEmscale.cxx.

103 {
104
105 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflEms)) {
106 return TileCondToolEmscale::doCalibEms(drawerIdx, channel, amplitude);
107 } else {
108 return amplitude;
109 }
110}
float doCalibEms(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Calibration to EM scale: Equalized pC -> MeV.

◆ doCalibEmsOnl()

float TileExpertToolEmscale::doCalibEmsOnl ( unsigned int drawerIdx,
unsigned int channel,
float amplitude ) const

Definition at line 203 of file TileExpertToolEmscale.cxx.

203 {
204
205 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlEms)) {
206 return TileCondToolEmscale::doCalibEmsOnl(drawerIdx, channel, amplitude);
207 } else {
208 return amplitude;
209 }
210
211}
float doCalibEmsOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Online calibration to EM scale: Equalized pC -> MeV.

◆ doCalibLas()

float TileExpertToolEmscale::doCalibLas ( unsigned int drawerIdx,
unsigned int channel,
float amplitude ) const

Definition at line 126 of file TileExpertToolEmscale.cxx.

126 {
127
128 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
129
130 //=== Linear correction
131 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflLasLin)) {
132 amplitude = emScale->applyLaserLinearCalibration(drawerIdx, channel, amplitude);
133 } // OflLasLin
134
135 //=== Non-linear correction
136 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflLasNln)) {
137 amplitude = emScale->applyLaserNonLinearCalibration(drawerIdx, channel, amplitude);
138 } // OflLasNln
139
140 return amplitude;
141}

◆ doCalibLasOnl()

float TileExpertToolEmscale::doCalibLasOnl ( unsigned int drawerIdx,
unsigned int channel,
float amplitude ) const

Definition at line 227 of file TileExpertToolEmscale.cxx.

227 {
228
229 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlLasLin)) {
230 return TileCondToolEmscale::doCalibLasOnl(drawerIdx, channel, amplitude);
231 } else {
232 return amplitude;
233 }
234
235}
float doCalibLasOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Online application of laser (PMT linearity) correction.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode TileCondToolEmscale::finalize ( )
overridevirtualinherited

Definition at line 48 of file TileCondToolEmscale.cxx.

48 {
49
50 ATH_MSG_DEBUG( "finalize called" );
51 return StatusCode::SUCCESS;
52
53}
#define ATH_MSG_DEBUG(x,...)

◆ getCesRefHv()

float TileCondToolEmscale::getCesRefHv ( unsigned int drawerIdx,
unsigned int channel ) const
inherited

Returns the reference PMT HV set in last cesium calibration.

Returns
The PMT HV applied as result of last cesium calibration
Parameters
drawerIdxDrawer index
channelTile channel

Definition at line 170 of file TileCondToolEmscale.cxx.

170 {
171
172 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
173 return emScale->getCesiumReferenceHV(drawerIdx, channel);
174
175}

◆ getCesRefLas()

float TileCondToolEmscale::getCesRefLas ( unsigned int drawerIdx,
unsigned int channel,
unsigned int adc ) const
inherited

Returns 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.

Returns
The PMT gain reference at the last cesium scan.
Parameters
drawerIdxDrawer index
channelTile channel
adcGain

Definition at line 161 of file TileCondToolEmscale.cxx.

161 {
162
163 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
164 return emScale->getCesiumReferenceLaserGain(drawerIdx, channel, adc);
165
166}

◆ getCesRefTemp()

float TileCondToolEmscale::getCesRefTemp ( unsigned int drawerIdx,
unsigned int channel ) const
inherited

Returns the drawer temperature as measured during last cesium equalization.

Returns
The drawer temperature during last cesium equalization
Parameters
drawerIdxDrawer index
channelTile channel

Definition at line 179 of file TileCondToolEmscale.cxx.

179 {
180
181 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
182 return emScale->getCesiumReferenceTemperature(drawerIdx, channel);
183
184}

◆ getLasFiber()

float TileCondToolEmscale::getLasFiber ( unsigned int drawerIdx,
unsigned int channel ) const
inherited

Returns laser fiber relative variation.

Parameters
drawerIdxDrawer index
channelTile channel

Definition at line 188 of file TileCondToolEmscale.cxx.

188 {
189
190 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
191 return emScale->getLaserFiberVariation(drawerIdx, channel);
192
193}

◆ getLasPartition()

float TileExpertToolEmscale::getLasPartition ( unsigned int drawerIdx) const

Definition at line 282 of file TileExpertToolEmscale.cxx.

282 {
283
284 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflLasPart)) {
285 return TileCondToolEmscale::getLasPartition(drawerIdx);
286 } else {
287 return 1.0;
288 }
289
290}
float getLasPartition(unsigned int drawerIdx) const
Returns laser partition relative variation.

◆ getLasRefHv()

float TileCondToolEmscale::getLasRefHv ( unsigned int drawerIdx,
unsigned int channel ) const
inherited

Returns the reference PMT HV from appropriate laser calibration.

Returns
The PMT HV applied as result of laser calibration
Parameters
drawerIdxDrawer index
channelTile channel

Definition at line 206 of file TileCondToolEmscale.cxx.

206 {
207
208 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
209 return emScale->getLaserReferenceHV(drawerIdx, channel);
210
211}

◆ getOnlCacheUnit()

TileRawChannelUnit::UNIT TileCondToolEmscale::getOnlCacheUnit ( ) const
inherited

Returns the unit of cached online calibration constants.

Definition at line 216 of file TileCondToolEmscale.cxx.

216 {
217
218 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
219 return emScale->getOnlineCacheUnit();
220
221}

◆ initialize()

StatusCode TileCondToolEmscale::initialize ( )
overridevirtualinherited

Definition at line 39 of file TileCondToolEmscale.cxx.

39 {
40
41 ATH_MSG_DEBUG( "In initialize()" );
42 ATH_CHECK( m_emScaleKey.initialize() );
43 return StatusCode::SUCCESS;
44}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & TileExpertToolEmscale::interfaceID ( )
static

Definition at line 14 of file TileExpertToolEmscale.cxx.

14 {
16}
static const InterfaceID IID_TileExpertToolEmscale("TileExpertToolEmscale", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setEmOptions()

void TileExpertToolEmscale::setEmOptions ( const TileEmscaleCalibOptions & emOptions)

Definition at line 294 of file TileExpertToolEmscale.cxx.

294 {
295 //=== check whether the m_emOptions were not already set (except for the constructor)
296 if (!m_setOnceCounter) {
297 m_emOptions = emOptions;
298 m_setOnceCounter = true;
299 ATH_MSG_INFO( "m_emOptions set to = " << m_emOptions.getEmscaleCalibOptions() );
300 } else {
301 ATH_MSG_WARNING( "m_emOptions already set, original value is kept = "
302 << m_emOptions.getEmscaleCalibOptions() );
303 }
304}
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ undoOnlCalib()

float TileExpertToolEmscale::undoOnlCalib ( unsigned int drawerIdx,
unsigned int channel,
unsigned int adc,
float amplitude,
TileRawChannelUnit::UNIT onlUnit ) const

Definition at line 251 of file TileExpertToolEmscale.cxx.

252 {
253
254 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
255
256 //=== Check if online folders are available
257 if (emScale->getOnlineCacheUnit() == TileRawChannelUnit::Invalid) {
258 ATH_MSG_FATAL( "Trying to undo online calibration, but COOL folders were not loaded" );
259 std::abort();
260 }
261
262 //=== Check for valid unit request
265 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib(onl)", onlUnit);
266 }
267
268 float val(1.);
269 //=== Compute total calib constant on the fly
270 val = channelCalibOnl(drawerIdx, channel, adc, val, onlUnit);
271
272 //=== Sanity check
273 if (val == 0.) {
274 throw TileCalib::InvalidValue("TileExpertToolEmscale::undoOnlCalib", val);
275 }
276
277 return amplitude / val;
278}
#define ATH_MSG_FATAL(x,...)
float channelCalibOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_emOptions

TileEmscaleCalibOptions TileExpertToolEmscale::m_emOptions {0}
private

Definition at line 58 of file TileExpertToolEmscale.h.

58{0};

◆ m_emScaleKey

SG::ReadCondHandleKey<TileEMScale> TileCondToolEmscale::m_emScaleKey
protectedinherited
Initial value:
{this,
"TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"}

Definition at line 259 of file TileCondToolEmscale.h.

259 {this,
260 "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_setOnceCounter

bool TileExpertToolEmscale::m_setOnceCounter {false}
private

Definition at line 57 of file TileExpertToolEmscale.h.

57{false};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.


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