ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MdtCalibDbAlg Class Reference

MdtCalibDbAlg reads raw condition data and writes derived condition data to the condition store. More...

#include <MdtCalibDbAlg.h>

Inheritance diagram for MdtCalibDbAlg:
Collaboration diagram for MdtCalibDbAlg:

Public Member Functions

 MdtCalibDbAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~MdtCalibDbAlg ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual bool isReEntrant () const override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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
 

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

Private Types

using RtRelationPtr = MuonCalib::MdtFullCalibData::RtRelationPtr
 
using LoadedRtMap = std::map< Identifier, RtRelationPtr >
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode declareDependency (const EventContext &ctx, SG::WriteCondHandle< MuonCalib::MdtCalibDataContainer > &writeHandle) const
 
StatusCode loadRt (const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
 
StatusCode loadTube (const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
 
StatusCode defaultT0s (MuonCalib::MdtCalibDataContainer &writeCdoTube) const
 
StatusCode defaultRt (MuonCalib::MdtCalibDataContainer &writeCdoRt, LoadedRtMap &loadedRts) const
 
std::optional< double > getInnerTubeRadius (const Identifier &id) const
 
StatusCode legacyRtPayloadToJSON (const coral::AttributeList &attr, nlohmann::json &json) const
 Parses the legacy payload for the RT functions to a json format. More...
 
StatusCode legacyTubePayloadToJSON (const coral::AttributeList &attr, nlohmann::json &json) const
 
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...
 

Static Private Member Functions

static std::unique_ptr< MuonCalib::RtResolutionLookUpgetRtResolutionInterpolation (const std::vector< MuonCalib::SamplePoint > &sample_points)
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< MuonCalib::IIdToFixedIdToolm_idToFixedIdTool {this, "IdToFixedIdTool", "MuonCalib::IdToFixedIdTool"}
 
const MuonGM::MuonDetectorManagerm_detMgr {nullptr}
 
const MuonGMR4::MuonDetectorManagerm_r4detMgr {nullptr}
 
Gaudi::Property< bool > m_useNewGeo
 
Gaudi::Property< bool > m_checkTubes {this, "checkTubes", true,"If true the number of tubes must agree between the conditions DB & geometry"}
 only needed to retrieve information on number of tubes etc. (no alignment needed) More...
 
Gaudi::Property< bool > m_newFormat2020 {this, "NewFormat2020", false, "Use the new calibration data format "}
 
Gaudi::Property< bool > m_create_b_field_function
 
Gaudi::Property< bool > m_createSlewingFunction
 
Gaudi::Property< bool > m_TimeSlewingCorrection {this, "TimeSlewingCorrection", false}
 
Gaudi::Property< bool > m_UseMLRt {this, "UseMLRt", false, "Enable use of ML-RTs from COOL"}
 
Gaudi::Property< std::vector< float > > m_MeanCorrectionVsR {this, "MeanCorrectionVsR", {}}
 
Gaudi::Property< double > m_TsCorrectionT0 {this, "TimeSlewCorrectionT0", 0.}
 
Gaudi::Property< double > m_defaultT0 {this, "defaultT0", 40., "default T0 value to be used in absence of DB information"}
 
Gaudi::Property< double > m_t0Shift {this, "T0Shift", 0., "for simulation: common shift of all T0s, in ns"}
 
Gaudi::Property< double > m_t0Spread {this, "T0Spread", 0., "for simulation: sigma for random smeraing of T0s, in ns"}
 
Gaudi::Property< double > m_rtShift {this, "RTShift", 0., "for simulations: maximum RT distortion, in mm"}
 
Gaudi::Property< double > m_rtScale {this, "RTScale", 1., "for simulations: a muliplicitive scale to the drift r"}
 
Gaudi::Property< double > m_prop_beta {this, "PropagationSpeedBeta", 1., "Speed of the signal propagation"}
 
ServiceHandle< IAthRNGSvcm_AthRNGSvc {this, "AthRNGSvc", "AthRNGSvc"}
 
StringProperty m_randomStream {this, "RandomStream", "MDTCALIBDBALG"}
 
ATHRNG::RNGWrapperm_RNGWrapper {nullptr}
 
StringProperty m_RTfileName
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKeyRt {this, "ReadKeyRt", "/MDT/RTBLOB", "DB folder containing the RT calibrations"}
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKeyTube {this, "ReadKeyTube", "/MDT/T0BLOB", "DB folder containing the tube constants"}
 
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainerm_writeKey
 
SG::ReadCondHandleKey< MdtCondDbDatam_readKeyDCS {this, "ReadKeyDCS", "MdtCondDbData", "Key of the input DCS data"}
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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

MdtCalibDbAlg reads raw condition data and writes derived condition data to the condition store.

Definition at line 33 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.

Member Typedef Documentation

◆ LoadedRtMap

◆ RtRelationPtr

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MdtCalibDbAlg()

MdtCalibDbAlg::MdtCalibDbAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 49 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

49  :
50  AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~MdtCalibDbAlg()

virtual MdtCalibDbAlg::~MdtCalibDbAlg ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareDependency()

StatusCode MdtCalibDbAlg::declareDependency ( const EventContext &  ctx,
SG::WriteCondHandle< MuonCalib::MdtCalibDataContainer > &  writeHandle 
) const
private

Definition at line 96 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

97  {
98 
99  writeHandle.addDependency(EventIDRange(IOVInfiniteRange::infiniteTime()));
101  if (key.empty()) continue;
103  if (!readHandle.isValid()) {
104  ATH_MSG_FATAL("Failed to retrieve conditions object "<<readHandle.fullKey());
105  return StatusCode::FAILURE;
106  }
107  writeHandle.addDependency(readHandle);
108  ATH_MSG_INFO("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdoRt->size()= " << readHandle->size());
109  ATH_MSG_INFO("Range of input is " << readHandle.getRange());
110  }
111  if (m_readKeyDCS.empty()) return StatusCode::SUCCESS;
113  if (!readHandle.isValid()) {
114  ATH_MSG_FATAL("Failed to retrieve conditions object "<<m_readKeyDCS.fullKey());
115  return StatusCode::FAILURE;
116  }
117  writeHandle.addDependency(readHandle);
118  return StatusCode::SUCCESS;
119 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ defaultRt()

StatusCode MdtCalibDbAlg::defaultRt ( MuonCalib::MdtCalibDataContainer writeCdoRt,
LoadedRtMap loadedRts 
) const
private

load the calibration constants of the second multilayer from the first one

Definition at line 147 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

147  {
148  ATH_MSG_DEBUG("defaultRt " << name());
150  std::ifstream inputFile(fileName);
151  if (!inputFile) {
152  ATH_MSG_ERROR("Unable to open RT Ascii file: " << fileName);
153  return StatusCode::FAILURE;
154  }
155  ATH_MSG_DEBUG("Opened RT Ascii file: " << fileName);
156 
157 
158  // Read the RTs from the text file
160  rts.read(inputFile);
161  ATH_MSG_VERBOSE("File contains " << rts.nRts() << " RT relations ");
162 
163  // Loop over all RTs in the file (but the default file only has 1 RT)
164  // Use the first valid RT found in the file as the default for all chambers.
165  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
166  for (unsigned int n = 0; n < rts.nRts(); ++n) {
167  std::unique_ptr<MuonCalib::RtDataFromFile::RtRelation> rt(rts.getRt(n));
168 
170  const MuonCalib::RtDataFromFile::RtRelation::DataVec &radii = rt->radii();
171  const MuonCalib::RtDataFromFile::RtRelation::DataVec &reso = rt->resolution();
172 
173  // check if rt contains data, at least two points on the rt are required
174  if (times.size() < 2) {
175  ATH_MSG_ERROR(" defaultRt rt table has too few entries");
176  return StatusCode::FAILURE;
177  }
178  // check if all tables have same size
179  if (times.size() != radii.size() || times.size() != reso.size()) {
180  ATH_MSG_ERROR("defaultRt rt table size mismatch ");
181  return StatusCode::FAILURE;
182  }
183  // check for negative time bins, i.e. decreasing time value with radius
184  double t_min = times[0];
185  double bin_size = times[1] - t_min;
186  if (bin_size <= 0) {
187  ATH_MSG_ERROR("defaultRt rt table negative binsize ");
188  return StatusCode::FAILURE;
189  }
190 
191  // create a vector to hold the r values,
192  // we need two extra fields to store t_min and bin_size
194  rtPars.push_back(t_min);
195  rtPars.push_back(bin_size);
196 
197  // copy r values into vector
198  rtPars.insert(rtPars.end(), radii.begin(), radii.end());
199 
200  ATH_MSG_DEBUG("defaultRt new MuonCalib::IRtRelation");
201 
202  MuonCalib::CalibFunc::ParVec resoPars{t_min, bin_size};
203  // copy r values into vector
204  resoPars.insert(resoPars.end(), reso.begin(), reso.end());
205 
206  ATH_MSG_DEBUG("defaultRt new MuonCalib::IRtResolution");
207 
208  // create RT and resolution "I" objects
209  std::shared_ptr<MuonCalib::IRtRelation> rtRel{std::make_unique<RtRelationLookUp>(rtPars)};
210  std::shared_ptr<MuonCalib::IRtResolution> resoRel{std::make_unique<RtResolutionLookUp>(resoPars)};
211 
212 
213  // Since the same RT is loaded for all chambers you might be tempted to create it once
214  // and simply store the same pointer in writeCdoRt for all regions.
215  // However it seems that when StoreGate clears writeCdoRt (which will happen in LoadRt
216  // by detStore()->removeDataAndProxy) it will crash unless there are unique pointers/objects
217  // for rtRel, resoRel, and MdtRtRelation
218 
219  // Loop over RT regions and store the default RT in each
220  RtRelationPtr MdtRt = std::make_unique<MuonCalib::MdtRtRelation>(rtRel, resoRel, 0.);
221 
222  for(auto itr = idHelper.detectorElement_begin();
223  itr!= idHelper.detectorElement_end();++itr){
224  const Identifier detElId{*itr};
225  if (writeCdo.hasDataForChannel(detElId, msgStream())) {
226  const MdtFullCalibData* dataObj = writeCdo.getCalibData(detElId, msgStream());
227  if (dataObj->rtRelation) {
228  ATH_MSG_DEBUG("Rt relation constants for "<<m_idHelperSvc->toString(detElId)<<" already exists");
229  continue;
230  }
231  }
233  RtRelationPtr storeMe = MdtRt;
234  if (idHelper.multilayer(detElId) == 2) {
235  if (writeCdo.granularity() != RegionGranularity::OnePerMultiLayer) continue;
236  const Identifier firstML = idHelper.multilayerID(detElId, 1);
237  if (writeCdo.hasDataForChannel(firstML, msgStream())) {
238  const MdtFullCalibData* dataObj = writeCdo.getCalibData(firstML, msgStream());
239  if (dataObj->rtRelation) {
240  ATH_MSG_DEBUG("Copy Rt constanst from the first multi layer for "<<m_idHelperSvc->toString(detElId));
241  storeMe = dataObj->rtRelation;
242  }
243  }
244  }
245  ATH_MSG_DEBUG("Add default rt constants for "<<m_idHelperSvc->toString(detElId));
246  if (!writeCdo.storeData(detElId, storeMe, msgStream())) {
247  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Failed to save default rts for "<<m_idHelperSvc->toString(detElId));
248  return StatusCode::FAILURE;
249  }
250 
252  loadedRts[detElId] = MdtRt;
253 
254  }
255 
256  // if VERBOSE enabled print out RT function
257  if (msgLvl(MSG::VERBOSE)) {
258  int npoints = rtRel->nPar() - 2;
259  ATH_MSG_VERBOSE("defaultRt npoints from rtRel=" << npoints);
260  for (int ipt = 0; ipt < npoints; ++ipt) {
261  double t = t_min + ipt * bin_size;
262  ATH_MSG_VERBOSE(" " << ipt << " " << t << " " << rtRel->radius(t) << " " << resoRel->resolution(t));
263  }
264  }
265  break; // only need the first good RT from the text file
266 
267  } // end loop over RTs in file
268 
269  return StatusCode::SUCCESS;
270 }

◆ defaultT0s()

StatusCode MdtCalibDbAlg::defaultT0s ( MuonCalib::MdtCalibDataContainer writeCdoTube) const
private

Definition at line 597 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

597  {
598  const MdtIdHelper& id_helper{m_idHelperSvc->mdtIdHelper()};
599 
600  // Inverse of wire propagation speed
601  const float inversePropSpeed = 1. / (Gaudi::Units::c_light * m_prop_beta);
602 
603  // loop over modules (MDT chambers) and create an MdtTubeContainer for each
604  MdtIdHelper::const_id_iterator it = id_helper.module_begin();
605  MdtIdHelper::const_id_iterator it_end = id_helper.module_end();
606  for (; it != it_end; ++it) {
607 
608  if (writeCdo.hasDataForChannel(*it, msgStream())) {
609  const MdtFullCalibData* dataObj = writeCdo.getCalibData(*it, msgStream());
610  if (dataObj->tubeCalib) {
611  ATH_MSG_DEBUG("Rt relation constants for "<<m_idHelperSvc->toString(*it)<<" already exists");
612  continue;
613  }
614  }
615  // create an MdtTubeContainer
616  TubeContainerPtr tubes = std::make_unique<MuonCalib::MdtTubeCalibContainer>(m_idHelperSvc.get(), *it);
617  if (!writeCdo.storeData(*it, tubes, msgStream())) return StatusCode::FAILURE;
618 
619  // is tubes ever 0? how could that happen?
620  double t0 = m_defaultT0;
621 
622  unsigned int nml = tubes->numMultilayers();
623  unsigned int nlayers = tubes->numLayers();
624  unsigned int ntubes = tubes->numTubes();
625  int size = nml * nlayers * ntubes;
626 
627  ATH_MSG_VERBOSE("Adding chamber " << m_idHelperSvc->toString(*it)
628  <<" size " << size << " ml " << nml << " l " << nlayers << " t " << ntubes);
629  for (unsigned int ml = 1; ml <= nml; ++ml) {
630  for (unsigned int l = 1; l <= nlayers; ++l) {
631  for (unsigned int t = 1; t <= ntubes; ++t) {
633  const Identifier tubeId = id_helper.channelID(*it, ml, l, t);
634  data.t0 = t0;
635  data.adcCal = 1.;
636  data.inversePropSpeed = inversePropSpeed;
637  tubes->setCalib(std::move(data), tubeId, msgStream());
638  }
639  }
640  }
641  }
642  return StatusCode::SUCCESS;
643 }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode MdtCalibDbAlg::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 120 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

120  {
121  ATH_MSG_DEBUG("execute " << name());
123  if (writeHandle.isValid()) {
124  ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
125  << ". In theory this should not be called, but may happen"
126  << " if multiple concurrent events are being processed out of order.");
127  return StatusCode::SUCCESS;
128  }
129  ATH_CHECK(declareDependency(ctx, writeHandle));
130 
131  RegionGranularity gran{RegionGranularity::OnePerChamber};
132  if (m_readKeyRt.key() == "/MDT/RTUNIQUE") {
133  ATH_MSG_DEBUG("Save one set of Rt constants per chamber");
134  gran = RegionGranularity::OneRt;
135  } else if (m_UseMLRt) {
136  ATH_MSG_DEBUG("Save one set of calibration constants per multi layer");
137  gran = RegionGranularity::OnePerMultiLayer;
138  } else ATH_MSG_DEBUG("Save one set of calibration constants per chamber");
139  std::unique_ptr<MuonCalib::MdtCalibDataContainer> writeCdo = std::make_unique<MuonCalib::MdtCalibDataContainer>(m_idHelperSvc.get(), gran);
140 
141  ATH_CHECK(loadRt(ctx, *writeCdo));
142  ATH_CHECK(loadTube(ctx, *writeCdo));
143  ATH_CHECK(writeHandle.record(std::move(writeCdo)));
144  return StatusCode::SUCCESS;
145 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ getInnerTubeRadius()

std::optional< double > MdtCalibDbAlg::getInnerTubeRadius ( const Identifier id) const
private

Definition at line 271 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

271  {
272  static std::atomic<bool> rtWarningPrinted = false;
273 
274  if (m_detMgr) {
276  if (detEl) { return std::make_optional<double>(detEl->innerTubeRadius()); }
277 
278  } else if (m_r4detMgr) {
279  const MuonGMR4::MdtReadoutElement* detEl = m_r4detMgr->getMdtReadoutElement(id);
280  if (detEl) { return std::make_optional<double>(detEl->innerTubeRadius()); }
281  }
282  if (!rtWarningPrinted) {
283  ATH_MSG_WARNING("getInnerTubeRadius() - no Muon station known under the name "
284  << m_idHelperSvc->toString(id));
285  rtWarningPrinted = true;
286  }
287  return std::nullopt;
288 }

◆ getRtResolutionInterpolation()

std::unique_ptr< MuonCalib::RtResolutionLookUp > MdtCalibDbAlg::getRtResolutionInterpolation ( const std::vector< MuonCalib::SamplePoint > &  sample_points)
staticprivate

Definition at line 876 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

876  {
878  // VARIABLES //
880  std::vector<Double_t> x(sample_points.size(),0);
881  std::vector<Double_t> y(sample_points.size(),0);
882 
883  for (unsigned int i = 0; i < sample_points.size(); i++) {
884  x[i] = sample_points[i].x1();
885  y[i] = sample_points[i].x2();
886  }
887  TSpline3 sp("Rt Res Tmp", x.data(), y.data(), sample_points.size());
889  // CREATE AN RtRelationLookUp OBJECT WITH THE CORRECT PARAMETERS //
891  unsigned int nb_points(100);
892  std::vector<double> res_param(nb_points + 2); // r-t parameters
893  Double_t bin_width = (x[sample_points.size() - 1] - x[0]) / static_cast<Double_t>(nb_points);
894 
895  res_param[0] = x[0];
896  res_param[1] = bin_width;
897  for (unsigned int k = 0; k < nb_points; k++) {
898  Double_t xx = x[0] + k * bin_width;
899  res_param[k + 2] = sp.Eval(xx);
900  if (std::isnan(res_param[k + 2])) {
901  TFile outf("kacke.root", "RECREATE");
902  sp.Write("kacke");
903  THROW_EXCEPTION("MdtCalibDbAlg::getRtResolutionInterpolation "
904  "encountered nan element");
905  }
906  }
907  return std::make_unique<MuonCalib::RtResolutionLookUp>(std::move(res_param));
908 }

◆ initialize()

StatusCode MdtCalibDbAlg::initialize ( )
overridevirtual

Definition at line 52 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

52  {
53  ATH_MSG_DEBUG("initialize " << name());
54 
55  // if timeslew correction vector m_MeanCorrectionVsR has non-zero size then set
56  // m_TsCorrectionT0=m_MeanCorrectionVsR[0] and subtract this each value in the vector.
57  if (m_MeanCorrectionVsR.size()) {
59  for (float & it : m_MeanCorrectionVsR) {
61  }
62  }
63 
64  ATH_CHECK(m_idHelperSvc.retrieve());
65  ATH_CHECK(m_idToFixedIdTool.retrieve());
66  // initiallize random number generator if doing t0 smearing (for robustness studies)
67  if (m_t0Spread != 0.) {
68  ATH_CHECK(m_AthRNGSvc.retrieve());
69  ATH_MSG_DEBUG(" initialize Random Number Service: running with t0 shift "
70  << m_t0Shift << " spread " << m_t0Spread << " rt shift " << m_rtShift);
71  // getting our random numbers stream
72  m_RNGWrapper = m_AthRNGSvc->getEngine(this, m_randomStream);
73  if (!m_RNGWrapper) {
74  ATH_MSG_ERROR("Could not get random number engine from AthRNGSvc. Abort.");
75  return StatusCode::FAILURE;
76  }
77  }
78 
79  if (m_rtShift != 0. || m_rtScale != 1. || m_t0Shift != 0. || m_t0Spread != 0.) {
80  ATH_MSG_INFO("************************************" << std::endl
81  << " Running with Calibration Deformations! " << std::endl
82  << " For performance studies only!" << std::endl
83  << " **************************************");
84  ATH_MSG_DEBUG(" rt scale " << m_rtScale << " t0 shift " << m_t0Shift << " spread " << m_t0Spread << " rt shift " << m_rtShift);
85  }
86 
91 
94  return StatusCode::SUCCESS;
95 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ isReEntrant()

virtual bool MdtCalibDbAlg::isReEntrant ( ) const
inlineoverridevirtual

Definition at line 39 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.

39 { return false; }

◆ legacyRtPayloadToJSON()

StatusCode MdtCalibDbAlg::legacyRtPayloadToJSON ( const coral::AttributeList &  attr,
nlohmann::json json 
) const
private

Parses the legacy payload for the RT functions to a json format.

Extract first the number of points and the Calib identifier

Next convert the rt relations to

Another code beauty here. The legacy payload was structured such that a triplet of three numbers in the vector represents a single data point, the first one is the radius, the second one the time and the last one is the resolution

Check that we picked up the right amount of points

Definition at line 290 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

290  {
291  std::string data{}, delim{};
292  if (attr["data"].specification().type() == typeid(coral::Blob)) {
293  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
294  if (!CoralUtilities::readBlobAsString(attr["data"].data<coral::Blob>(), data)) {
295  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
296  return StatusCode::FAILURE;
297  }
298  delim = "\n";
299  } else {
300  data = *(static_cast<const std::string *>((attr["data"]).addressOfData()));
301  delim = " ";
302  }
303  const std::vector<std::string> tokens = tokenize(data, delim);
304  if (tokens.size() < 2) {
305  ATH_MSG_FATAL("The line "<<data<<" cannot be resolved into header & payload");
306  return StatusCode::FAILURE;
307  }
308  const std::string& header = tokens[0];
309  const std::string& payload = tokens[1];
310  ATH_MSG_DEBUG("Header: '"<<header<<"' payload: '"<<payload<<"'");
312  unsigned int numPoints{0};
314  const bool rt_ts_applied = (attr["tech"].data<int>() & MuonCalib::TIME_SLEWING_CORRECTION_APPLIED);
315  channel["appliedRT"] = rt_ts_applied;
316  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
317  {
318 
319  std::vector<int> tokensHeader = tokenizeInt(header, ",");
320  if(tokensHeader.size()< 2){
321  ATH_MSG_FATAL("Failed to deduce extract number of points & calib Identifier from "<<header);
322  return StatusCode::FAILURE;
323  }
324  unsigned int calibId = tokensHeader[0];
325  numPoints = tokensHeader[1];
326  MuonCalib::MuonFixedId id(calibId);
327  if (!id.is_mdt()) {
328  ATH_MSG_FATAL("Found non-MDT MuonFixedId, continuing...");
329  return StatusCode::FAILURE;
330  }
331  const Identifier athenaId = m_idToFixedIdTool->fixedIdToId(id);
332  if (!m_idHelperSvc->isMuon(athenaId)) {
333  ATH_MSG_WARNING("The translation from the calibration ID with station: "
334  <<id.stationNameString()<<"("<<id.stationName()<<") "
335  <<" eta:"<<id.eta()<<" phi: "<<id.phi());
336  }
337  channel["station"] = m_idHelperSvc->stationNameString(athenaId);
338  channel["eta"] = m_idHelperSvc->stationEta(athenaId);
339  channel["phi"] = m_idHelperSvc->stationPhi(athenaId);
340  channel["ml"] = idHelper.multilayer(athenaId);
341  channel["layer"] = idHelper.tubeLayer(athenaId);
342  channel["tube"] = idHelper.tube(athenaId);
343  }
345  const std::vector<double> dataPoints = tokenizeDouble(payload, ",");
346  std::vector<double> radii{}, times{}, resos{};
347  radii.reserve(numPoints);
348  times.reserve(numPoints);
349  resos.reserve(numPoints);
353  for (unsigned int k = 0 ; k < dataPoints.size(); ++k) {
354  const double value = dataPoints[k];
355  switch (k%3) {
356  case 0:
357  radii.push_back(value);
358  break;
359  case 1:
360  times.push_back(value);
361  break;
362  case 2:
363  resos.push_back(value);
364  break;
365  default:
366  break;
367  }
368  }
370  if (radii.size() != numPoints ||
371  times.size() != numPoints ||
372  resos.size() != numPoints) {
373  ATH_MSG_FATAL("Payload "<<payload<<" does not lead to the expected number of points "<<numPoints<<" vs. "<<dataPoints.size());
374  return StatusCode::FAILURE;
375  }
376  channel["radii"] = std::move(radii);
377  channel["times"] = std::move(times);
378  channel["resolutions"] = std::move(resos);
379  json.push_back(channel);
380  return StatusCode::SUCCESS;
381 }

◆ legacyTubePayloadToJSON()

StatusCode MdtCalibDbAlg::legacyTubePayloadToJSON ( const coral::AttributeList &  attr,
nlohmann::json json 
) const
private

A typical header looks like: T0BIL_1_-6,v0.0,1,288 BIL is the station name, the numbers next do the underscores represent the station phi and the station eta. That's followed by a mysterious version number which was never incremented throughout time – soo sad. The last two fields are the region number and the total number of tubes in the chamber.

The payload comes along in triplets. The first element of the triplet represents the T0 shift of the single tube, the second one the status and the last one the mean Adc value

pack everything into a json array

Definition at line 646 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

646  {
647  std::string data{};
648  if (attr["data"].specification().type() == typeid(coral::Blob)) {
649  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
650  if (!CoralUtilities::readBlobAsString(attr["data"].data<coral::Blob>(), data)) {
651  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
652  return StatusCode::FAILURE;
653  }
654 
655  } else {
656  data = *(static_cast<const std::string *>((attr["data"]).addressOfData()));
657  }
658  std::vector<std::string> tokens = tokenize(data, "\n");
659  if (tokens.size() < 2) {
660  ATH_MSG_FATAL("The line "<<data<<" cannot be resolved into header & payload");
661  return StatusCode::FAILURE;
662  }
663  std::string& header = tokens[0];
664  const std::string& payload = tokens[1];
665 
670  const std::string stName = header.substr(2,3);
671  int eta{0}, phi{0}, nTubes{0};
672  {
673  std::replace(header.begin(), header.end(),'_', ',');
674  const std::vector<std::string> headerTokens = tokenize(header, ",");
675  phi = atoi(headerTokens[1]);
676  eta = atoi(headerTokens[2]);
677  nTubes = atoi(headerTokens[5]);
678  }
679  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
680  bool isValid{false};
681  const Identifier chamID = idHelper.elementID(stName, eta, phi, isValid);
682  if (!isValid) {
683  static std::atomic<bool> idWarningPrinted = false;
684  if (!idWarningPrinted) {
685  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Identifier: "<<stName<<","<<eta<<","<<phi
686  <<" is invalid. Skipping");
687  idWarningPrinted.store(true, std::memory_order_relaxed);
688  }
689  return StatusCode::SUCCESS;
690  }
692  const bool t0_ts_applied = (attr["tech"].data<int>() & MuonCalib::TIME_SLEWING_CORRECTION_APPLIED);
693  channel["appliedT0"] = t0_ts_applied;
694  channel["station"] = stName;
695  channel["eta"] = eta;
696  channel["phi"] = phi;
697 
698  const std::vector<double> payLoadData = tokenizeDouble(payload, ",");
699  std::vector<double> tzeros{}, meanAdcs{};
700  std::vector<int> statusCodes{};
703  for (unsigned int k = 0; k < payLoadData.size(); ++k){
704  const double value = payLoadData[k];
705  switch (k%3) {
706  case 0:
707  tzeros.push_back(value);
708  break;
709  case 1:
710  statusCodes.push_back(value);
711  break;
712  case 2:
713  meanAdcs.push_back(value);
714  break;
715  default:
716  break;
717  }
718  }
719  if (statusCodes.size() != tzeros.size() ||
720  statusCodes.size() != meanAdcs.size() ||
721  statusCodes.empty()) {
722  ATH_MSG_FATAL("Failed to properly readt t0 calibrations for chamber "<<m_idHelperSvc->toStringChamber(chamID));
723  return StatusCode::FAILURE;
724  }
726  int ml{1}, layer{1}, tube{1};
727 
728  const int numMl = idHelper.numberOfMultilayers(chamID);
729  const Identifier secondMlID = idHelper.multilayerID(chamID, numMl);
730  const int tubesPerLay = std::max(idHelper.tubeMax(chamID), idHelper.tubeMax(secondMlID));
731  const int numLayers = std::max(idHelper.tubeLayerMax(chamID), idHelper.tubeLayerMax(secondMlID));
732  if (m_checkTubes && (numMl * numLayers * tubesPerLay) != nTubes) {
733  ATH_MSG_FATAL("Calibration database differs in terms of number of tubes for chamber "
734  <<m_idHelperSvc->toStringChamber(chamID)<<". Expected "<<(numMl * numLayers * tubesPerLay)
735  <<" vs. observed "<<nTubes);
736  return StatusCode::FAILURE;
737  }
739  for (unsigned int k = 0; k < tzeros.size(); ++k) {
740  nlohmann::json channelData{};
741  channelData["ml"] = ml;
742  channelData["layer"] =layer;
743  channelData["tube"] = tube;
744  channelData["t0"] = tzeros[k];
745  channelData["meanAdc"] = meanAdcs[k];
746  channelData["status"] = statusCodes[k];
747  ++tube;
748  if (tube > tubesPerLay){
749  tube = 1;
750  ++layer;
751  }
752  if (layer > numLayers){
753  layer = 1;
754  ++ml;
755  }
756  calibData.push_back(std::move(channelData));
757  }
758  channel["calibConstants"] = std::move(calibData);
759  json.push_back(std::move(channel));
760  return StatusCode::SUCCESS;
761 }

◆ loadRt()

StatusCode MdtCalibDbAlg::loadRt ( const EventContext &  ctx,
MuonCalib::MdtCalibDataContainer writeCdo 
) const
private

List of loaded Rt relations to attach the proper corrections later

Athena Identifier

all the points in time,radius [RT] and time,sigma [resolution func]

Must have at least 3 points to have a valid RT

The Mdt conditions data is only of value if it's also DCS constants

SKip everything that's switched off

Definition at line 383 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

383  {
384  ATH_MSG_DEBUG("loadRt " << name());
385 
386  // Read Cond Handle
388  if (!readHandleRt.isValid()) {
389  ATH_MSG_ERROR("readCdoRt==nullptr");
390  return StatusCode::FAILURE;
391  }
392  // read new-style format 2020
393 
394  nlohmann::json rtCalibJson = nlohmann::json::array();
395  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
396  if (m_newFormat2020) {
397  for (CondAttrListCollection::const_iterator itr = readHandleRt->begin();
398  itr != readHandleRt->end(); ++itr) {
399  const coral::AttributeList &atr = itr->second;
400  std::string data{};
401  if (atr["data"].specification().type() == typeid(coral::Blob)) {
402  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
403  if (!CoralUtilities::readBlobAsString(atr["data"].data<coral::Blob>(), data)) {
404  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
405  return StatusCode::FAILURE;
406  }
407  } else {
408  ATH_MSG_VERBOSE("Loading data as a STRING");
409  data = *(static_cast<const std::string *>((atr["data"]).addressOfData()));
410  }
411  // unwrap the json and build the data vector
413  for (auto &it : yy.items()) {
414  nlohmann::json yx = it.value();
415  rtCalibJson.push_back(yx);
416  }
417  }
418  }
419  // read old-style format
420  else {
421  for (CondAttrListCollection::const_iterator itr = readHandleRt->begin();
422  itr != readHandleRt->end(); ++itr) {
423  ATH_CHECK(legacyRtPayloadToJSON(itr->second, rtCalibJson));
424  }
425  }
427  LoadedRtMap loadedRtRel{};
428  // unpack the strings in the collection and update the writeCdoRt
429  for (const auto& payload : rtCalibJson) {
430  const bool rt_ts_applied = payload["appliedRT"];
432  const std::string stName = payload["station"];
433  const Identifier athenaId = idHelper.channelID(stName, payload["eta"], payload["phi"],
434  payload["ml"], payload["layer"], payload["tube"]);
435 
436  std::optional<double> innerTubeRadius = getInnerTubeRadius(idHelper.multilayerID(athenaId, 1));
437  if (!innerTubeRadius) continue;
438 
439 
440  const std::vector<double> radii = payload["radii"];
441  const std::vector<double> times = payload["times"];
442  const std::vector<double> resolutions = payload["resolutions"];
443 
444  if (writeCdo.hasDataForChannel(athenaId, msgStream())) {
445  const MdtFullCalibData* dataObj = writeCdo.getCalibData(athenaId, msgStream());
446  if (dataObj->rtRelation) {
447  ATH_MSG_DEBUG("Rt relation constants for "<<m_idHelperSvc->toString(athenaId)<<" already exists");
448  continue;
449  }
450  }
451 
452  MuonCalib::CalibFunc::ParVec rtPars{}, resoPars{};
453 
454  MuonCalib::SamplePoint tr_point, ts_point; // pairs of numbers; tr = (time,radius); ts = (time,sigma) [sigma=resolution]
455  std::vector<MuonCalib::SamplePoint> tr_points{}, ts_points{};
457  float multilayer_tmax_diff{-std::numeric_limits<float>::max()};
458 
459  // loop over RT function payload (triplets of radius,time,sigma(=resolution) )
460  for (unsigned int k = 0; k < radii.size(); ++k) {
461  float radius = radii[k];
462  if (m_rtShift != 0.) {
463  float oldradius = radius;
464  // TODO: What is this magic number
465  float rshift = m_rtShift * 1.87652e-2 * radius * (radius - *innerTubeRadius);
466  radius = oldradius + rshift;
467  ATH_MSG_DEBUG("DEFORM RT: old radius " << oldradius << " new radius " << radius << " shift " << rshift
468  << " max shift " << m_rtShift);
469  }
470 
471  if (m_rtScale != 1.) {
472  float oldradius = radius;
473  radius = radius * m_rtScale;
474  ATH_MSG_DEBUG("DEFORM RT: old radius " << oldradius << " new radius " << radius << " scale factor " << m_rtScale);
475  }
476  tr_point.set_x2(radius);
477 
478  float time = times[k];
479  tr_point.set_x1(time);
480  ts_point.set_x1(time);
481 
482  float sigma = resolutions[k];
483  ts_point.set_x2(sigma);
484  ts_point.set_error(1.0);
485  tr_point.set_error(1.0);
486  if (tr_point.x2() < -99) { // if radius is < -99 then treat time as ML Tmax difference
487  multilayer_tmax_diff = tr_point.x1();
488  } else if (k == 0 || (tr_points[k - 1].x1() < tr_point.x1() && tr_points[k - 1].x2() < tr_point.x2())) {
489  tr_points.push_back(tr_point);
490  ts_points.push_back(ts_point);
491  }
492  } // end loop over RT function payload (triplets of radius,time,resolution)
493 
495  if (ts_points.size() < 3) {
496  ATH_MSG_FATAL("Rt relation broken!");
497  return StatusCode::FAILURE;
498  }
499 
500  if (rt_ts_applied != m_TimeSlewingCorrection) {
501  float sign(rt_ts_applied ? -1.0 : 1.0);
502  float slice_width = (*innerTubeRadius) / static_cast<float>(m_MeanCorrectionVsR.size());
503  for (auto & tr_point : tr_points) {
504  int slice_number = static_cast<int>(std::floor(tr_point.x2() / slice_width));
505  if (slice_number < 0) slice_number = 0;
506  if (slice_number >= static_cast<int>(m_MeanCorrectionVsR.size()))
507  slice_number = static_cast<int>(m_MeanCorrectionVsR.size()) - 1;
508  tr_point.set_x1(tr_point.x1() + sign * m_MeanCorrectionVsR[slice_number]);
509  }
510  }
511 
512  // Create resolution function from ts_points
513  std::unique_ptr<MuonCalib::IRtResolution> reso = getRtResolutionInterpolation(ts_points);
514  if (msgLvl(MSG::VERBOSE)) {
515  ATH_MSG_VERBOSE("Resolution points :");
516  for (const MuonCalib::SamplePoint& point : tr_points) {
517  ATH_MSG_VERBOSE(point.x1() << "|" << point.x2() << "|" << point.error());
518  }
519  ATH_MSG_DEBUG("Resolution parameters :");
520  for (unsigned int i = 0; i < reso->nPar(); i++) { ATH_MSG_VERBOSE(i << " " << reso->par(i)); }
521  }
522 
523  // Create RT function from tr_points and load RT and resolution functions
524  std::unique_ptr<MuonCalib::IRtRelation> rt = std::make_unique<MuonCalib::RtRelationLookUp>(MuonCalib::RtFromPoints::getRtRelationLookUp(tr_points));
525  if (!reso || !rt) { continue; }
526 
527  if (rt->par(1) == 0.) {
528  ATH_MSG_FATAL("Bin size is 0");
529  for (const MuonCalib::SamplePoint& it: tr_points)
530  ATH_MSG_WARNING(it.x1() << " " << it.x2() << " " << it.error());
531  return StatusCode::FAILURE;
532  }
533  // Save ML difference if it is available
534  if (multilayer_tmax_diff > -8e8) { rt->SetTmaxDiff(multilayer_tmax_diff); }
535  // Store RT and resolution functions for this region
536  RtRelationPtr rt_rel = std::make_unique<MuonCalib::MdtRtRelation>(std::move(rt), std::move(reso), 0.);
537 
538  if (!writeCdo.storeData(athenaId ,rt_rel, msgStream())) return StatusCode::FAILURE;
540  loadedRtRel[athenaId] = rt_rel;
541 
542  } // end loop over itr (strings read from COOL)
543  ATH_CHECK(defaultRt(writeCdo, loadedRtRel));
544 
545  if (loadedRtRel.empty()) {
546  return StatusCode::SUCCESS;
547  }
548 
549  ATH_MSG_DEBUG("Initializing " << loadedRtRel.size()<< " b-field functions");
550  const MdtCondDbData* condDbData{nullptr};
551  if (!m_readKeyDCS.empty()) {
552  SG::ReadCondHandle<MdtCondDbData> readCondHandleDb{m_readKeyDCS, ctx};
554  if (readCondHandleDb->hasDCS()) {
555  condDbData = readCondHandleDb.cptr();
556  } else {
557  ATH_MSG_INFO("Do not retrieve the HV from DCS. Fall back to 2730 & 3080");
558  }
559  }
560 
561 
562  for (const auto& [athenaId, rtRelation] : loadedRtRel) {
563  CorrectionPtr corrFuncSet = std::make_unique<MuonCalib::MdtCorFuncSet>();
564 
566  std::vector<double> corr_params(2);
567  bool loadDefault{false};
568  if (condDbData){
569  const MuonCond::DcsConstants& dcs{condDbData->getHvState(athenaId)};
570  corr_params[0] = dcs.readyVolt;
572  if (corr_params[0] < std::numeric_limits<float>::epsilon()) {
573  ATH_MSG_DEBUG("Chamber "<<m_idHelperSvc->toString(athenaId)<<" is switched off "<<dcs);
574  loadDefault = true;
575  }
576  } else loadDefault = true;
577  if (loadDefault) {
578  if (m_idHelperSvc->issMdt(athenaId)) {
579  corr_params[0] = 2730.0;
580  } else {
581  corr_params[0] = 3080.0;
582  }
583  }
584  corr_params[1] = 0.11; // epsilon parameter
585  corrFuncSet->setBField(std::make_unique<MuonCalib::BFieldCorFunc>("medium", corr_params, rtRelation->rt()));
586  }
588  corrFuncSet->setSlewing(std::make_unique<MuonCalib::MdtSlewCorFuncHardcoded>(MuonCalib::CalibFunc::ParVec()));
589  }
590  if (!writeCdo.storeData(athenaId, corrFuncSet, msgStream())) return StatusCode::FAILURE;
591  }
592 
593  return StatusCode::SUCCESS;
594 }

◆ loadTube()

StatusCode MdtCalibDbAlg::loadTube ( const EventContext &  ctx,
MuonCalib::MdtCalibDataContainer writeCdo 
) const
private

Definition at line 762 of file MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx.

762  {
763  ATH_MSG_DEBUG("loadTube " << name());
764  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
765 
766  // Read Cond Handle
768  // read new-style format 2020
769  nlohmann::json t0CalibJson = nlohmann::json::array();
770  if (m_newFormat2020) {
771  for (CondAttrListCollection::const_iterator itr = readHandleTube->begin();
772  itr != readHandleTube->end(); ++itr) {
773  const coral::AttributeList &atr = itr->second;
774  std::string data{};
775  if (atr["data"].specification().type() == typeid(coral::Blob)) {
776  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
777  if (!CoralUtilities::readBlobAsString(atr["data"].data<coral::Blob>(), data)) {
778  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
779  return StatusCode::FAILURE;
780  }
781  } else {
782  ATH_MSG_VERBOSE("Loading data as a STRING");
783  data = *(static_cast<const std::string *>((atr["data"]).addressOfData()));
784  }
785  // unwrap the json and build the data vector
787  for (auto &it : yy.items()) {
788  nlohmann::json yx = it.value();
789  t0CalibJson.push_back(yx);
790  }
791  }
792  }
793  // read old-style format
794  else {
795  for (CondAttrListCollection::const_iterator itr = readHandleTube->begin();
796  itr != readHandleTube->end(); ++itr) {
797  ATH_CHECK(legacyTubePayloadToJSON(itr->second, t0CalibJson));
798  }
799  }
800 
801  // Inverse of wire propagation speed
802  const float inversePropSpeed = 1. / (Gaudi::Units::c_light * m_prop_beta);
803 
804  // unpack the strings in the collection and update the
805  // MdtTubeCalibContainers in TDS
806  for (const auto& chambChannel : t0CalibJson) {
807  const std::string stName = chambChannel["station"];
808  const int ieta = chambChannel["eta"];
809  const int iphi = chambChannel["phi"];
810  const bool t0_ts_applied = chambChannel["appliedT0"];
811  // need to check validity of Identifier since database contains all Run 2 MDT chambers, e.g. also EI chambers which are
812  // potentially replaced by NSW
813  bool isValid{false}; // the elementID takes a bool pointer to check the validity of the Identifier
814  const Identifier chId = idHelper.elementID(stName, ieta, iphi, isValid);
815  if (!isValid) {
816  static std::atomic<bool> idWarningPrinted = false;
817  if (!idWarningPrinted) {
818  ATH_MSG_WARNING("Element Identifier " << chId.get_compact() << " retrieved for station name " << stName
819  << " is not valid, skipping");
820  idWarningPrinted.store(true, std::memory_order_relaxed);
821  }
822  continue;
823  }
824 
825  if (writeCdo.hasDataForChannel(chId, msgStream())) {
826  const MdtFullCalibData* dataObj = writeCdo.getCalibData(chId, msgStream());
827  if (dataObj->tubeCalib) {
828  ATH_MSG_DEBUG("Rt relation constants for "<<m_idHelperSvc->toString(chId)<<" already exists");
829  continue;
830  }
831  }
832 
833  TubeContainerPtr tubes = std::make_unique<MdtTubeCalibContainer>(m_idHelperSvc.get(), chId);
834  if (!writeCdo.storeData(chId, tubes, msgStream())) {
835  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Failed to add chamber "<<m_idHelperSvc->toString(chId)
836  <<" ID fields: "<<stName<<","<<ieta<<","<<iphi);
837  return StatusCode::FAILURE;
838  }
839  //const ref. No copy
840  const nlohmann::json& tubeConstants = chambChannel["calibConstants"];
841  for (const auto& tubeChannel : tubeConstants) {
842  const int ml = tubeChannel["ml"];
843  const int l = tubeChannel["layer"];
844  const int t = tubeChannel["tube"];
845  double tzero = tubeChannel["t0"];
846  if (m_t0Shift != 0.) {
847  tzero += m_t0Shift;
848  ATH_MSG_VERBOSE("T0 shift " << m_t0Shift << " t0 " << tzero << " id " << ml << " " << l << " " << t);
849  }
850  if (m_t0Spread != 0.) {
851  CLHEP::HepRandomEngine *engine = m_RNGWrapper->getEngine(ctx);
852  double sh = CLHEP::RandGaussZiggurat::shoot(engine, 0., m_t0Spread);
853  tzero += sh;
854  ATH_MSG_VERBOSE("T0 spread " << sh << " t0 " << tzero << " id " << ml << " " << l << " " << t);
855  }
856  if (!t0_ts_applied && m_TimeSlewingCorrection) { tzero += m_TsCorrectionT0; }
857  if (t0_ts_applied && !m_TimeSlewingCorrection) { tzero -= m_TsCorrectionT0; }
858 
859  const int statusCode = tubeChannel["status"];
860  const double meanAdc = tubeChannel["meanAdc"];
862  datatube.statusCode = statusCode;
863  datatube.inversePropSpeed = inversePropSpeed;
864  datatube.t0 = tzero;
865  datatube.adcCal = meanAdc;
866  const Identifier tubeId = idHelper.channelID(chId, ml, l, t);
867  tubes->setCalib(std::move(datatube), tubeId, msgStream());
868  }
869  } // end loop over readCdoTube
870 
871  ATH_CHECK(defaultT0s(writeCdo));
872  // finally record writeCdo
873  return StatusCode::SUCCESS;
874 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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_AthRNGSvc

ServiceHandle<IAthRNGSvc> MdtCalibDbAlg::m_AthRNGSvc {this, "AthRNGSvc", "AthRNGSvc"}
private

◆ m_checkTubes

Gaudi::Property<bool> MdtCalibDbAlg::m_checkTubes {this, "checkTubes", true,"If true the number of tubes must agree between the conditions DB & geometry"}
private

only needed to retrieve information on number of tubes etc. (no alignment needed)

Definition at line 74 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.

◆ m_create_b_field_function

Gaudi::Property<bool> MdtCalibDbAlg::m_create_b_field_function
private
Initial value:
{this, "CreateBFieldFunctions", false,
"If set to true, the B-field correction functions are initialized for each rt-relation that is loaded."}

Definition at line 80 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.

◆ m_createSlewingFunction

Gaudi::Property<bool> MdtCalibDbAlg::m_createSlewingFunction
private
Initial value:
{this, "CreateSlewingFunctions", false,
"If set to true, the slewing correction functions are initialized for each rt-relation that is loaded."}

Definition at line 83 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.

◆ m_defaultT0

Gaudi::Property<double> MdtCalibDbAlg::m_defaultT0 {this, "defaultT0", 40., "default T0 value to be used in absence of DB information"}
private

◆ m_detMgr

const MuonGM::MuonDetectorManager* MdtCalibDbAlg::m_detMgr {nullptr}
private

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MdtCalibDbAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

◆ m_idToFixedIdTool

ToolHandle<MuonCalib::IIdToFixedIdTool> MdtCalibDbAlg::m_idToFixedIdTool {this, "IdToFixedIdTool", "MuonCalib::IdToFixedIdTool"}
private

◆ m_MeanCorrectionVsR

Gaudi::Property<std::vector<float> > MdtCalibDbAlg::m_MeanCorrectionVsR {this, "MeanCorrectionVsR", {}}
private

◆ m_newFormat2020

Gaudi::Property<bool> MdtCalibDbAlg::m_newFormat2020 {this, "NewFormat2020", false, "Use the new calibration data format "}
private

◆ m_prop_beta

Gaudi::Property<double> MdtCalibDbAlg::m_prop_beta {this, "PropagationSpeedBeta", 1., "Speed of the signal propagation"}
private

◆ m_r4detMgr

const MuonGMR4::MuonDetectorManager* MdtCalibDbAlg::m_r4detMgr {nullptr}
private

◆ m_randomStream

StringProperty MdtCalibDbAlg::m_randomStream {this, "RandomStream", "MDTCALIBDBALG"}
private

◆ m_readKeyDCS

SG::ReadCondHandleKey<MdtCondDbData> MdtCalibDbAlg::m_readKeyDCS {this, "ReadKeyDCS", "MdtCondDbData", "Key of the input DCS data"}
private

◆ m_readKeyRt

SG::ReadCondHandleKey<CondAttrListCollection> MdtCalibDbAlg::m_readKeyRt {this, "ReadKeyRt", "/MDT/RTBLOB", "DB folder containing the RT calibrations"}
private

◆ m_readKeyTube

SG::ReadCondHandleKey<CondAttrListCollection> MdtCalibDbAlg::m_readKeyTube {this, "ReadKeyTube", "/MDT/T0BLOB", "DB folder containing the tube constants"}
private

◆ m_RNGWrapper

ATHRNG::RNGWrapper* MdtCalibDbAlg::m_RNGWrapper {nullptr}
private

◆ m_RTfileName

StringProperty MdtCalibDbAlg::m_RTfileName
private
Initial value:
{this, "RT_InputFile", "MuonCondAlg/Muon_RT_default.data",
"single input ascii file for default RT to be applied in absence of DB information"}

Definition at line 114 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.

◆ m_rtScale

Gaudi::Property<double> MdtCalibDbAlg::m_rtScale {this, "RTScale", 1., "for simulations: a muliplicitive scale to the drift r"}
private

◆ m_rtShift

Gaudi::Property<double> MdtCalibDbAlg::m_rtShift {this, "RTShift", 0., "for simulations: maximum RT distortion, in mm"}
private

◆ m_t0Shift

Gaudi::Property<double> MdtCalibDbAlg::m_t0Shift {this, "T0Shift", 0., "for simulation: common shift of all T0s, in ns"}
private

◆ m_t0Spread

Gaudi::Property<double> MdtCalibDbAlg::m_t0Spread {this, "T0Spread", 0., "for simulation: sigma for random smeraing of T0s, in ns"}
private

◆ m_TimeSlewingCorrection

Gaudi::Property<bool> MdtCalibDbAlg::m_TimeSlewingCorrection {this, "TimeSlewingCorrection", false}
private

◆ m_TsCorrectionT0

Gaudi::Property<double> MdtCalibDbAlg::m_TsCorrectionT0 {this, "TimeSlewCorrectionT0", 0.}
private

◆ m_UseMLRt

Gaudi::Property<bool> MdtCalibDbAlg::m_UseMLRt {this, "UseMLRt", false, "Enable use of ML-RTs from COOL"}
private

◆ m_useNewGeo

Gaudi::Property<bool> MdtCalibDbAlg::m_useNewGeo
private
Initial value:
{this, "UseR4DetMgr", false,
"Switch between the legacy and the new geometry"}

Definition at line 69 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

SG::WriteCondHandleKey<MuonCalib::MdtCalibDataContainer> MdtCalibDbAlg::m_writeKey
private
Initial value:
{this, "WriteKey", "MdtCalibConstants",
"Conditions object containing the calibrations"}

Definition at line 121 of file MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h.


The documentation for this class was generated from the following files:
MdtCalibDbAlg::m_create_b_field_function
Gaudi::Property< bool > m_create_b_field_function
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:80
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::t0
float t0
< relative t0 in chamber (ns)
Definition: MdtTubeCalibContainer.h:20
PathResolver::find_calib_file
static std::string find_calib_file(const std::string &logical_file_name)
Definition: PathResolver.cxx:384
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
GeoModel::TransientConstSharedPtr< MdtTubeCalibContainer >
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CxxUtils::tokenizeDouble
std::vector< double > tokenizeDouble(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:34
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
MdtCalibDbAlg::RtRelationPtr
MuonCalib::MdtFullCalibData::RtRelationPtr RtRelationPtr
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:49
header
Definition: hcg.cxx:526
max
#define max(a, b)
Definition: cfImp.cxx:41
MdtCalibDbAlg::m_rtScale
Gaudi::Property< double > m_rtScale
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:107
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
MdtCalibDbAlg::m_useNewGeo
Gaudi::Property< bool > m_useNewGeo
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:69
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PlotCalibFromCool.yy
yy
Definition: PlotCalibFromCool.py:714
MdtCalibDbAlg::m_rtShift
Gaudi::Property< double > m_rtShift
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:106
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
json
nlohmann::json json
Definition: HistogramDef.cxx:9
MuonCalib::MdtCalibDataContainer::RegionGranularity
RegionGranularity
Definition: MdtCalibDataContainer.h:26
MuonCalib::MdtCorFuncSet::setBField
void setBField(std::unique_ptr< IMdtBFieldCorFunc > &&bField)
Definition: MdtCorFuncSet.cxx:22
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MdtCalibDbAlg::m_defaultT0
Gaudi::Property< double > m_defaultT0
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:102
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
MuonCond::DcsConstants::readyVolt
float readyVolt
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:33
CxxUtils::tokenizeInt
std::vector< int > tokenizeInt(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:55
MuonCalib::MdtCalibDataContainer::storeData
bool storeData(const Identifier &mlID, CorrectionPtr corrFuncSet, MsgStream &msg)
Definition: MdtCalibDataContainer.cxx:49
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TRTCalib_Extractor.rts
dictionary rts
Definition: TRTCalib_Extractor.py:15
CxxUtils::tokenize
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition: Control/CxxUtils/Root/StringUtils.cxx:15
CheckAppliedSFs.bin_width
bin_width
Definition: CheckAppliedSFs.py:242
MdtCalibDbAlg::m_createSlewingFunction
Gaudi::Property< bool > m_createSlewingFunction
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:83
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
MuonCalib::RtDataFromFile
Manages the I/O of the Rt realtions from/to file.
Definition: RtDataFromFile.h:21
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
MdtCalibDbAlg::m_detMgr
const MuonGM::MuonDetectorManager * m_detMgr
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:66
MuonCalib::MdtFullCalibData::rtRelation
RtRelationPtr rtRelation
Definition: MdtFullCalibData.h:21
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MdtCalibDbAlg::m_randomStream
StringProperty m_randomStream
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:111
MdtCalibDbAlg::loadTube
StatusCode loadTube(const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:762
MuonCalib::MdtTubeCalibContainer::numMultilayers
unsigned int numMultilayers() const
Definition: MdtTubeCalibContainer.h:49
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
yodamerge_tmp.npoints
npoints
Definition: yodamerge_tmp.py:250
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
MdtCondDbData
Definition: MdtCondDbData.h:21
athena.value
value
Definition: athena.py:124
MdtCalibDbAlg::m_AthRNGSvc
ServiceHandle< IAthRNGSvc > m_AthRNGSvc
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:110
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
MdtCalibDbAlg::getRtResolutionInterpolation
static std::unique_ptr< MuonCalib::RtResolutionLookUp > getRtResolutionInterpolation(const std::vector< MuonCalib::SamplePoint > &sample_points)
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:876
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonCalib::IRtRelation::SetTmaxDiff
void SetTmaxDiff(const double d)
set the difference in total drift time betwene the two multilayers (ML1 - ML2)
Definition: IRtRelation.h:39
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:225
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
MdtCalibDbAlg::legacyTubePayloadToJSON
StatusCode legacyTubePayloadToJSON(const coral::AttributeList &attr, nlohmann::json &json) const
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:646
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
dumpTruth.statusCode
statusCode
Definition: dumpTruth.py:85
THROW_EXCEPTION
#define THROW_EXCEPTION(MSG)
Definition: MMReadoutElement.cxx:48
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
MdtCalibDbAlg::m_TsCorrectionT0
Gaudi::Property< double > m_TsCorrectionT0
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:100
MuonCalib::MdtTubeCalibContainer::setCalib
bool setCalib(SingleTubeCalib &&val, const Identifier &tubeId, MsgStream &msg)
set the calibration constants of a single tube
Definition: MdtTubeCalibContainer.cxx:19
x
#define x
MdtCalibDbAlg::loadRt
StatusCode loadRt(const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:383
MuonCalib::MdtFullCalibData
class which holds the full set of calibration constants for a given tube
Definition: MdtFullCalibData.h:15
MuonCalib::SamplePoint::set_error
void set_error(const double merror)
Definition: SamplePoint.h:63
MdtCalibDbAlg::m_TimeSlewingCorrection
Gaudi::Property< bool > m_TimeSlewingCorrection
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:95
MdtCalibDbAlg::getInnerTubeRadius
std::optional< double > getInnerTubeRadius(const Identifier &id) const
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:271
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
MuonCalib::CalibFunc::par
double par(unsigned int index) const
Definition: CalibFunc.h:41
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
MdtCalibDbAlg::m_writeKey
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > m_writeKey
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:121
MuonCalib::MdtTubeCalibContainer::numLayers
unsigned int numLayers() const
Definition: MdtTubeCalibContainer.h:50
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::statusCode
unsigned int statusCode
Definition: MdtTubeCalibContainer.h:26
MuonCalib::SamplePoint::set_x2
void set_x2(const double mx2)
set the error of the x2 coordinate sample point to merror
Definition: SamplePoint.h:61
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MdtCalibDbAlg::m_prop_beta
Gaudi::Property< double > m_prop_beta
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:108
MuonCalib::RtFromPoints::getRtRelationLookUp
static RtRelationLookUp getRtRelationLookUp(const std::vector< SamplePoint > &sample_points)
Definition: RtFromPoints.cxx:76
MuonCalib::MdtFullCalibData::tubeCalib
TubeContainerPtr tubeCalib
Definition: MdtFullCalibData.h:22
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonCalib::SamplePoint::x1
double x1() const
< get the x1 coordinate of the sample point
Definition: SamplePoint.h:43
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
MdtCalibDbAlg::m_RTfileName
StringProperty m_RTfileName
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:114
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MdtCalibDbAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:63
MuonGM::MuonDetectorManager::getMdtReadoutElement
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:204
FullCPAlgorithmsTest_eljob.sh
sh
Definition: FullCPAlgorithmsTest_eljob.py:114
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
lumiFormat.i
int i
Definition: lumiFormat.py:85
MdtCalibDbAlg::m_UseMLRt
Gaudi::Property< bool > m_UseMLRt
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:96
CoralUtilities::readBlobAsString
bool readBlobAsString(const coral::Blob &, std::string &)
Definition: blobaccess.cxx:85
beamspotman.n
n
Definition: beamspotman.py:731
RCU::Shell
Definition: ShellExec.cxx:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonCond::DcsConstants
Helper struct to cache all dcs constants in a common place of the memory.
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:31
MdtIdHelper
Definition: MdtIdHelper.h:61
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
MdtCalibDbAlg::m_readKeyDCS
SG::ReadCondHandleKey< MdtCondDbData > m_readKeyDCS
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:124
MuonCalib::CalibFunc::ParVec
std::vector< double > ParVec
Definition: CalibFunc.h:35
MdtCalibDbAlg::legacyRtPayloadToJSON
StatusCode legacyRtPayloadToJSON(const coral::AttributeList &attr, nlohmann::json &json) const
Parses the legacy payload for the RT functions to a json format.
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:290
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MuonCalib::MdtTubeCalibContainer::numTubes
unsigned int numTubes() const
Definition: MdtTubeCalibContainer.h:51
MdtCalibDbAlg::m_newFormat2020
Gaudi::Property< bool > m_newFormat2020
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:76
MdtCalibDbAlg::m_t0Spread
Gaudi::Property< double > m_t0Spread
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:104
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
MuonGMR4::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius.
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
lumiFormat.array
array
Definition: lumiFormat.py:91
MdtCalibDbAlg::m_r4detMgr
const MuonGMR4::MuonDetectorManager * m_r4detMgr
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:67
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::adcCal
float adcCal
quality flag for the SingleTubeCalib constants: 0 all ok, 1 no hits found, 2 too few hits,...
Definition: MdtTubeCalibContainer.h:24
MuonCalib::TIME_SLEWING_CORRECTION_APPLIED
@ TIME_SLEWING_CORRECTION_APPLIED
Definition: MdtCalibCreationFlags.h:10
MdtCalibDbAlg::m_readKeyRt
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyRt
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:119
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
MuonCalib::SamplePoint::x2
double x2() const
get the error on the x2 coordinate of the sample point
Definition: SamplePoint.h:45
MuonGMR4::MdtReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:22
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MuonCalib::SamplePoint
Definition: SamplePoint.h:16
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MdtCalibDbAlg::declareDependency
StatusCode declareDependency(const EventContext &ctx, SG::WriteCondHandle< MuonCalib::MdtCalibDataContainer > &writeHandle) const
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:96
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::inversePropSpeed
float inversePropSpeed
multiplicative correction factor for ADC measurement w.r.t.
Definition: MdtTubeCalibContainer.h:22
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
HI::TowerBins::numLayers
constexpr unsigned int numLayers()
Definition: HIEventDefs.h:23
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:63
MuonCalib::MdtCalibDataContainer::getCalibData
const MdtFullCalibData * getCalibData(const Identifier &measId, MsgStream &msg) const
Returns the calibration data associated with this station
Definition: MdtCalibDataContainer.cxx:38
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
MuonCalib::SamplePoint::set_x1
void set_x1(const double mx1)
set the x2 coordinate of the sample point to mx2
Definition: SamplePoint.h:59
SG::ReadCondHandleKey< CondAttrListCollection >
MdtCalibDbAlg::m_readKeyTube
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyTube
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:120
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
MdtCalibDbAlg::m_MeanCorrectionVsR
Gaudi::Property< std::vector< float > > m_MeanCorrectionVsR
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:98
MdtCalibDbAlg::m_checkTubes
Gaudi::Property< bool > m_checkTubes
only needed to retrieve information on number of tubes etc. (no alignment needed)
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:74
MdtCalibDbAlg::defaultT0s
StatusCode defaultT0s(MuonCalib::MdtCalibDataContainer &writeCdoTube) const
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:597
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MdtCalibDbAlg::m_RNGWrapper
ATHRNG::RNGWrapper * m_RNGWrapper
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:112
MdtCalibDbAlg::m_t0Shift
Gaudi::Property< double > m_t0Shift
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:103
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
MuonCalib::CalibFunc::nPar
unsigned int nPar() const
Definition: CalibFunc.h:39
MuonIdHelper::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: MuonIdHelper.h:143
MdtCalibDbAlg::defaultRt
StatusCode defaultRt(MuonCalib::MdtCalibDataContainer &writeCdoRt, LoadedRtMap &loadedRts) const
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:147
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
MuonCalib::MdtCalibDataContainer::hasDataForChannel
bool hasDataForChannel(const Identifier &measId, MsgStream &msg) const
Checks whether a calibration data object is already present.
Definition: MdtCalibDataContainer.cxx:33
MuonCalib::MdtCorFuncSet::setSlewing
void setSlewing(std::unique_ptr< IMdtSlewCorFunc > &&slew)
Definition: MdtCorFuncSet.cxx:19
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib
Definition: MdtTubeCalibContainer.h:18
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
IOVInfiniteRange::infiniteTime
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.
Definition: IOVInfiniteRange.h:47
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
MdtCalibDbAlg::m_idToFixedIdTool
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idToFixedIdTool
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:64
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonCalib::RtData_t_r_reso::DataVec
std::vector< double > DataVec
Definition: RtData_t_r_reso.h:18
calibdata.tube
tube
Definition: calibdata.py:31
MdtCalibDbAlg::LoadedRtMap
std::map< Identifier, RtRelationPtr > LoadedRtMap
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MdtCalibDbAlg.h:50
plot_times.times
def times(fn)
Definition: plot_times.py:11
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition: WriteCondHandle.h:275
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Identifier
Definition: IdentifierFieldParser.cxx:14