ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
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. More...
 
float getCesRefHv (unsigned int drawerIdx, unsigned int channel) const
 Returns the reference PMT HV set in last cesium calibration. More...
 
float getCesRefTemp (unsigned int drawerIdx, unsigned int channel) const
 Returns the drawer temperature as measured during last cesium equalization. More...
 
float getLasFiber (unsigned int drawerIdx, unsigned int channel) const
 Returns laser fiber relative variation. More...
 
float getLasRefHv (unsigned int drawerIdx, unsigned int channel) const
 Returns the reference PMT HV from appropriate laser calibration. More...
 
TileRawChannelUnit::UNIT getOnlCacheUnit () const
 Returns the unit of cached online calibration constants. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) 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 More...
 
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. More...
 

Protected Attributes

SG::ReadCondHandleKey< TileEMScalem_emScaleKey
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

bool m_setOnceCounter
 
TileEmscaleCalibOptions m_emOptions
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
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.

23  , m_setOnceCounter(false)
24  , m_emOptions(0)
25 {
26  declareInterface<TileExpertToolEmscale>(this);
27 }

◆ ~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 
35 
36  //=== Undo online calibration, result is offline ADC counts
37  if (rawDataUnitIn >= TileRawChannelUnit::OnlineADCcounts) {
38  if (rawDataUnitIn > TileRawChannelUnit::OnlineMegaElectronVolts) {
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 }

◆ 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 
173 
174  //=== CIS calibration
175  if (onlUnit > TileRawChannelUnit::OnlineADCcounts) {
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 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

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

95 { return m_detStore; }

◆ 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 
119  return TileCondToolEmscale::doCalibCes(drawerIdx, channel, amplitude, applyLasCorr);
120  } else {
121  return amplitude;
122  }
123 
124 }

◆ 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 
220  return TileCondToolEmscale::doCalibCesOnl(drawerIdx, channel, amplitude, applyLasCorr);
221  } else {
222  return amplitude;
223  }
224 
225 }

◆ 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 
150 
151  //=== Linear correction
153  amplitude = emScale->applyChargLinearCalibration(drawerIdx, channel, adc, amplitude);
154  } // OflCisFitLin
155 
156  //=== non-linear correction
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 
244  return TileCondToolEmscale::doCalibCisOnl(drawerIdx, channel, adc, amplitude);
245  } else {
246  return amplitude;
247  }
248 
249 }

◆ doCalibEms()

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

Definition at line 105 of file TileExpertToolEmscale.cxx.

105  {
106 
108  return TileCondToolEmscale::doCalibEms(drawerIdx, channel, amplitude);
109  } else {
110  return amplitude;
111  }
112 }

◆ doCalibEmsOnl()

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

Definition at line 205 of file TileExpertToolEmscale.cxx.

205  {
206 
208  return TileCondToolEmscale::doCalibEmsOnl(drawerIdx, channel, amplitude);
209  } else {
210  return amplitude;
211  }
212 
213 }

◆ doCalibLas()

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

Definition at line 128 of file TileExpertToolEmscale.cxx.

128  {
129 
131 
132  //=== Linear correction
134  amplitude = emScale->applyLaserLinearCalibration(drawerIdx, channel, amplitude);
135  } // OflLasLin
136 
137  //=== Non-linear correction
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 
232  return TileCondToolEmscale::doCalibLasOnl(drawerIdx, channel, amplitude);
233  } else {
234  return amplitude;
235  }
236 
237 }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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 }

◆ 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 
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 
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 
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 
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 
287  return TileCondToolEmscale::getLasPartition(drawerIdx);
288  } else {
289  return 1.0;
290  }
291 
292 }

◆ 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 
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 
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()" );
43  return StatusCode::SUCCESS;
44 }

◆ 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  {
15  return IID_TileExpertToolEmscale;
16 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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 = "
305  }
306 }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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 
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 }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

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.

◆ 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:
TileCondToolEmscale::doCalibEms
float doCalibEms(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Calibration to EM scale: Equalized pC -> MeV.
Definition: TileCondToolEmscale.cxx:79
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TileCondToolEmscale::m_emScaleKey
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Definition: TileCondToolEmscale.h:259
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TileCondToolEmscale::doCalibLasOnl
float doCalibLasOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Online application of laser (PMT linearity) correction.
Definition: TileCondToolEmscale.cxx:143
TileExpertToolEmscale::m_emOptions
TileEmscaleCalibOptions m_emOptions
Definition: TileExpertToolEmscale.h:58
TileCondToolEmscale::TileCondToolEmscale
TileCondToolEmscale(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TileCondToolEmscale.cxx:24
TileCalib::InvalidRawChanUnit
Signals invalid use of TileRawChannelUnit.
Definition: TileCalorimeter/TileConditions/TileConditions/Exception.h:20
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TileEmscaleCalibOptions::OnlCes
@ OnlCes
Definition: TileEmscaleCalibOptions.h:40
TileRawChannelUnit::CesiumPicoCoulombs
@ CesiumPicoCoulombs
Definition: TileRawChannelUnit.h:19
TileEmscaleCalibOptions::OnlCisLin
@ OnlCisLin
Definition: TileEmscaleCalibOptions.h:38
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TileRawChannelUnit::OnlineADCcounts
@ OnlineADCcounts
Definition: TileRawChannelUnit.h:21
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TileEmscaleCalibOptions::OflCes
@ OflCes
Definition: TileEmscaleCalibOptions.h:33
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TileRawChannelUnit::PicoCoulombs
@ PicoCoulombs
Definition: TileRawChannelUnit.h:18
TileEmscaleCalibOptions::getEmscaleCalibBit
bool getEmscaleCalibBit(CalBitPos idx) const
Returns a bit for a given calibration option.
Definition: TileEmscaleCalibOptions.h:88
TileEmscaleCalibOptions::OflEms
@ OflEms
Definition: TileEmscaleCalibOptions.h:34
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TileCondToolEmscale::doCalibCisOnl
float doCalibCisOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
Online Application of CIS calibration: ADC counts -> pC.
Definition: TileCondToolEmscale.cxx:152
TileExpertToolEmscale::doCalibCisOnl
float doCalibCisOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
Definition: TileExpertToolEmscale.cxx:241
TileEmscaleCalibOptions::OflLasLin
@ OflLasLin
Definition: TileEmscaleCalibOptions.h:30
TileRawChannelUnit::OnlinePicoCoulombs
@ OnlinePicoCoulombs
Definition: TileRawChannelUnit.h:22
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TileExpertToolEmscale::doCalibEmsOnl
float doCalibEmsOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Definition: TileExpertToolEmscale.cxx:205
TileRawChannelUnit::OnlineCesiumPicoCoulombs
@ OnlineCesiumPicoCoulombs
Definition: TileRawChannelUnit.h:23
TileEmscaleCalibOptions::OflCisFitNln
@ OflCisFitNln
Definition: TileEmscaleCalibOptions.h:29
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TileRawChannelUnit::Invalid
@ Invalid
Definition: TileRawChannelUnit.h:26
TileExpertToolEmscale::m_setOnceCounter
bool m_setOnceCounter
Definition: TileExpertToolEmscale.h:57
TileRawChannelUnit::MegaElectronVolts
@ MegaElectronVolts
Definition: TileRawChannelUnit.h:20
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TileEmscaleCalibOptions::OnlLasLin
@ OnlLasLin
Definition: TileEmscaleCalibOptions.h:39
TileExpertToolEmscale::doCalibLasOnl
float doCalibLasOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Definition: TileExpertToolEmscale.cxx:229
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
TileEmscaleCalibOptions::OnlEms
@ OnlEms
Definition: TileEmscaleCalibOptions.h:41
TileEmscaleCalibOptions::OflCisFitLin
@ OflCisFitLin
Definition: TileEmscaleCalibOptions.h:28
TileCondToolEmscale::doCalibEmsOnl
float doCalibEmsOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Online calibration to EM scale: Equalized pC -> MeV.
Definition: TileCondToolEmscale.cxx:125
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TileExpertToolEmscale::doCalibCes
float doCalibCes(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Definition: TileExpertToolEmscale.cxx:116
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TileExpertToolEmscale::undoOnlCalib
float undoOnlCalib(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const
Definition: TileExpertToolEmscale.cxx:253
TileExpertToolEmscale::doCalibLas
float doCalibLas(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Definition: TileExpertToolEmscale.cxx:128
TileEmscaleCalibOptions::OflLasNln
@ OflLasNln
Definition: TileEmscaleCalibOptions.h:31
TileExpertToolEmscale::channelCalibOnl
float channelCalibOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const
Definition: TileExpertToolEmscale.cxx:166
TileExpertToolEmscale::doCalibCis
float doCalibCis(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
Definition: TileExpertToolEmscale.cxx:147
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TileExpertToolEmscale::doCalibEms
float doCalibEms(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Definition: TileExpertToolEmscale.cxx:105
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
TileCondToolEmscale::doCalibCes
float doCalibCes(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Application of cesium calibration constant.
Definition: TileCondToolEmscale.cxx:88
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
TileEmscaleCalibOptions::getEmscaleCalibOptions
uint32_t getEmscaleCalibOptions() const
Returns the complete bitmap with all EM scale calibration options.
Definition: TileEmscaleCalibOptions.h:80
TileCondToolEmscale::getLasPartition
float getLasPartition(unsigned int drawerIdx) const
Returns laser partition relative variation.
Definition: TileCondToolEmscale.cxx:197
TileCalibUtils::fixedPointPrecision
static float fixedPointPrecision(float val, unsigned int nBits=16)
Returns the input in fixed point precision.
Definition: TileCalibUtils.cxx:268
TileCondToolEmscale::doCalibCesOnl
float doCalibCesOnl(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Online application of cesium calibration constant.
Definition: TileCondToolEmscale.cxx:134
TileExpertToolEmscale::doCalibCesOnl
float doCalibCesOnl(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Definition: TileExpertToolEmscale.cxx:217
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TileRawChannelUnit::ADCcounts
@ ADCcounts
Definition: TileRawChannelUnit.h:17
TileCalib::InvalidValue
Thrown to prevent invalid results, eg.
Definition: TileCalorimeter/TileCalib/TileCalibBlobObjs/TileCalibBlobObjs/Exception.h:224
fitman.k
k
Definition: fitman.py:528
TileRawChannelUnit::OnlineMegaElectronVolts
@ OnlineMegaElectronVolts
Definition: TileRawChannelUnit.h:24
TileEmscaleCalibOptions::OflLasPart
@ OflLasPart
Definition: TileEmscaleCalibOptions.h:32