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< TileEMScalem_emScaleKey

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_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
TileEmscaleCalibOptions m_emOptions
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 388 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 , m_setOnceCounter(false)
24 , m_emOptions(0)
25{
26 declareInterface<TileExpertToolEmscale>(this);
27}
TileCondToolEmscale(const std::string &type, const std::string &name, const IInterface *parent)
TileEmscaleCalibOptions m_emOptions

◆ ~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 31 of file TileExpertToolEmscale.cxx.

32 {
33
34 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
35
36 //=== Undo online calibration, result is offline ADC counts
37 if (rawDataUnitIn >= TileRawChannelUnit::OnlineADCcounts) {
39 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib(onl)", rawDataUnitIn);
40 } else if (rawDataUnitIn > TileRawChannelUnit::OnlineADCcounts) {
41 amplitude = undoOnlCalib(drawerIdx, channel, adc, amplitude, rawDataUnitIn);
42 }
43 rawDataUnitIn = TileRawChannelUnit::ADCcounts;
44 }
45
46 //=== Allow only "forward" calibration from here on
47 if (rawDataUnitOut < rawDataUnitIn || rawDataUnitOut > TileRawChannelUnit::MegaElectronVolts) {
48 ATH_MSG_ERROR( "Invalid unit combination: "
49 << "in=" << rawDataUnitIn << " ,"
50 << "out="<< rawDataUnitOut );
51 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib(out)", rawDataUnitOut);
52 }
53
54 //=== Decide which calibrations to apply
55 switch (rawDataUnitIn) {
56
59 if (rawDataUnitOut > TileRawChannelUnit::ADCcounts) {
60 amplitude = doCalibCis(drawerIdx, channel, adc, amplitude);
61 if (rawDataUnitOut > TileRawChannelUnit::PicoCoulombs) {
62 amplitude = doCalibLas(drawerIdx, channel, amplitude);
63 amplitude = doCalibCes(drawerIdx, channel, amplitude);
64 if (rawDataUnitOut > TileRawChannelUnit::CesiumPicoCoulombs) {
65 amplitude = doCalibEms(drawerIdx, channel, amplitude);
66 }
67 }
68 }
69 break;
70
72 if (rawDataUnitOut > TileRawChannelUnit::PicoCoulombs) {
73 amplitude = doCalibLas(drawerIdx, channel, amplitude);
74 amplitude = doCalibCes(drawerIdx, channel, amplitude);
75 if (rawDataUnitOut > TileRawChannelUnit::CesiumPicoCoulombs) {
76 amplitude = doCalibEms(drawerIdx, channel, amplitude);
77 }
78 }
79 break;
80
82 if (rawDataUnitOut > TileRawChannelUnit::CesiumPicoCoulombs) {
83 amplitude = doCalibEms(drawerIdx, channel, amplitude);
84 }
85 break;
86
88 break;
89
90 default:
91 ATH_MSG_ERROR( "We should never come here: "
92 << "in=" << rawDataUnitIn << " ,"
93 << "out=" << rawDataUnitOut );
94
95 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib", rawDataUnitIn);
96
97 }
98
99 return amplitude;
100
101}
#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 166 of file TileExpertToolEmscale.cxx.

167 {
168
169 ATH_MSG_VERBOSE( "Recalculating total online constant for "
170 << drawerIdx << "/" << channel << "/" << adc << " , " << onlUnit );
171
172 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
173
174 //=== CIS calibration
176 amplitude = doCalibCisOnl(drawerIdx, channel, adc, amplitude);
177 ATH_MSG_VERBOSE( "---> amplitude after CIS: " << amplitude );
178
179 //=== LAS+CES calibration
181 amplitude = doCalibLasOnl(drawerIdx, channel, amplitude);
182 ATH_MSG_VERBOSE( "---> amplitude after LAS: " << amplitude );
183
184 amplitude = doCalibCesOnl(drawerIdx, channel, amplitude);
185 ATH_MSG_VERBOSE( "---> amplitude after CES: " << amplitude );
186
187 }
188 //=== EMSCALE calibration
190 amplitude = doCalibEmsOnl(drawerIdx, channel, amplitude);
191 ATH_MSG_VERBOSE( "---> amplitude after EMS: " << amplitude );
192 }
193 }
194
195 //=== convert float to 16 bit fixed point DSP precision
196 amplitude = TileCalibUtils::fixedPointPrecision(amplitude);
197 ATH_MSG_VERBOSE( "---> amplitude in fixed point precision: " << amplitude );
198
199 return amplitude;
200
201}
#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 116 of file TileExpertToolEmscale.cxx.

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

◆ doCalibCesOnl()

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

Definition at line 217 of file TileExpertToolEmscale.cxx.

217 {
218
219 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlCes)) {
220 return TileCondToolEmscale::doCalibCesOnl(drawerIdx, channel, amplitude, applyLasCorr);
221 } else {
222 return amplitude;
223 }
224
225}
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 147 of file TileExpertToolEmscale.cxx.

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

◆ doCalibCisOnl()

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

Definition at line 241 of file TileExpertToolEmscale.cxx.

241 {
242
243 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlCisLin)) {
244 return TileCondToolEmscale::doCalibCisOnl(drawerIdx, channel, adc, amplitude);
245 } else {
246 return amplitude;
247 }
248
249}
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 105 of file TileExpertToolEmscale.cxx.

105 {
106
107 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflEms)) {
108 return TileCondToolEmscale::doCalibEms(drawerIdx, channel, amplitude);
109 } else {
110 return amplitude;
111 }
112}
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 205 of file TileExpertToolEmscale.cxx.

205 {
206
207 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlEms)) {
208 return TileCondToolEmscale::doCalibEmsOnl(drawerIdx, channel, amplitude);
209 } else {
210 return amplitude;
211 }
212
213}
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 128 of file TileExpertToolEmscale.cxx.

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

◆ doCalibLasOnl()

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

Definition at line 229 of file TileExpertToolEmscale.cxx.

229 {
230
231 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OnlLasLin)) {
232 return TileCondToolEmscale::doCalibLasOnl(drawerIdx, channel, amplitude);
233 } else {
234 return amplitude;
235 }
236
237}
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 284 of file TileExpertToolEmscale.cxx.

284 {
285
286 if (m_emOptions.getEmscaleCalibBit(TileEmscaleCalibOptions::OflLasPart)) {
287 return TileCondToolEmscale::getLasPartition(drawerIdx);
288 } else {
289 return 1.0;
290 }
291
292}
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 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setEmOptions()

void TileExpertToolEmscale::setEmOptions ( const TileEmscaleCalibOptions & emOptions)

Definition at line 296 of file TileExpertToolEmscale.cxx.

296 {
297 //=== check whether the m_emOptions were not already set (except for the constructor)
298 if (!m_setOnceCounter) {
299 m_emOptions = emOptions;
300 m_setOnceCounter = true;
301 ATH_MSG_INFO( "m_emOptions set to = " << m_emOptions.getEmscaleCalibOptions() );
302 } else {
303 ATH_MSG_WARNING( "m_emOptions already set, original value is kept = "
304 << m_emOptions.getEmscaleCalibOptions() );
305 }
306}
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(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 >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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 253 of file TileExpertToolEmscale.cxx.

254 {
255
256 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey);
257
258 //=== Check if online folders are available
259 if (emScale->getOnlineCacheUnit() == TileRawChannelUnit::Invalid) {
260 ATH_MSG_FATAL( "Trying to undo online calibration, but COOL folders were not loaded" );
261 std::abort();
262 }
263
264 //=== Check for valid unit request
267 throw TileCalib::InvalidRawChanUnit("TileExpertToolEmscale::channelCalib(onl)", onlUnit);
268 }
269
270 float val(1.);
271 //=== Compute total calib constant on the fly
272 val = channelCalibOnl(drawerIdx, channel, adc, val, onlUnit);
273
274 //=== Sanity check
275 if (val == 0.) {
276 throw TileCalib::InvalidValue("TileExpertToolEmscale::undoOnlCalib", val);
277 }
278
279 return amplitude / val;
280}
#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 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
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 393 of file AthCommonDataStore.h.

◆ m_emOptions

TileEmscaleCalibOptions TileExpertToolEmscale::m_emOptions
private

Definition at line 58 of file TileExpertToolEmscale.h.

◆ 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 390 of file AthCommonDataStore.h.

◆ m_setOnceCounter

bool TileExpertToolEmscale::m_setOnceCounter
private

Definition at line 57 of file TileExpertToolEmscale.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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