Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MdtCalibDbAlg.h"
6 
9 
15 
20 
21 #include "CxxUtils/StringUtils.h"
22 #include "GaudiKernel/PhysicalConstants.h"
23 
24 #include "CoralBase/Attribute.h"
25 #include "CoralBase/AttributeListSpecification.h"
26 #include "CoralBase/Blob.h"
28 
30 
31 #include <unordered_map>
32 #include <fstream>
33 
34 #include "TFile.h"
35 #include "TTree.h"
36 
37 
38 using namespace MuonCalib;
40 
41 
42 
43 #define SET_BRANCHADDRESS(tree, branchName) \
44  { \
45  if (!tree.GetBranch(#branchName)) { \
46  ATH_MSG_FATAL("The branch "<<#branchName<<" does not exist."); \
47  return StatusCode::FAILURE; \
48  } \
49  if (tree.SetBranchAddress(#branchName,&branchName) != 0){ \
50  ATH_MSG_FATAL("Failed to connect branch "<<#branchName<<"."); \
51  return StatusCode::FAILURE; \
52  } \
53  }
54 
55 namespace MuonCalibR4 {
56 
58  ATH_MSG_VERBOSE("Initialize...");
59  ATH_CHECK(m_idHelperSvc.retrieve());
60  ATH_CHECK(m_writeKey.initialize());
61 
63  if (m_t0TreeName.value().empty()) {
64  m_t0RootFile.value().clear();
65  }
66  if (m_rtTreeName.value().empty()) {
67  m_rtRootFile.value().clear();
68  }
69  const bool initRt = (m_rtJSON.value().empty() && m_rtRootFile.value().empty());
70  const bool initT0 = (m_t0JSON.value().empty() && m_t0RootFile.value().empty());
71  ATH_CHECK(m_readKeyRt.initialize(initRt));
72  ATH_CHECK(m_readKeyTube.initialize(initT0));
73 
74  if (m_rtRootFile.value().size()) {
75  ATH_MSG_INFO("Load RT - calibration constants from ROOT File "<<m_rtRootFile);
76  m_rtJSON.clear();
77  } else if (m_rtJSON.value().size()) {
78  ATH_MSG_INFO("Load the RT- calibration constants from JSON file "<<m_rtJSON);
79  m_rtTreeName.clear();
80  } else {
81  ATH_MSG_INFO("Load RT - calibration constants from COOL: "<<m_readKeyRt.fullKey());
82  }
83  if (m_t0RootFile.value().size()) {
84  ATH_MSG_INFO("Load T0 - calibration constants from ROOT File "<<m_t0RootFile);
85  m_t0JSON.clear();
86  } else if (m_t0JSON.value().size()) {
87  ATH_MSG_INFO("Load the T0 - calibration constants from JSON file "<<m_t0JSON);
88  m_t0TreeName.clear();
89  }
90  return StatusCode::SUCCESS;
91 }
92 
93 StatusCode MdtCalibDbAlg::execute(const EventContext& ctx) const {
94  ATH_MSG_VERBOSE("Executing MdtCalibDbAlgR4");
95  SG::WriteCondHandle writeHandle{m_writeKey, ctx};
96  if(writeHandle.isValid()) {
97  ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid.");
98  return StatusCode::SUCCESS;
99  }
100  writeHandle.addDependency(EventIDRange(IOVInfiniteRange::infiniteRunLB()));
101  auto writeCdo = std::make_unique<MdtCalibDataContainer>(m_idHelperSvc.get(), RegionGranularity::OnePerMultiLayer);
103  writeCdo->setInversePropSpeed(1./ (m_prop_beta * Gaudi::Units::c_light));
104 
106  if (!m_readKeyRt.empty()) {
107  SG::ReadCondHandle readHandle{m_readKeyRt, ctx};
108  ATH_CHECK(readHandle.isValid());
109  writeHandle.addDependency(readHandle);
110  for(CondAttrListCollection::const_iterator itr = readHandle->begin();
111  itr != readHandle->end(); ++itr) {
112  const coral::AttributeList& atr = itr->second;
113  if(atr["data"].specification().type() != typeid(coral::Blob)) {
114  ATH_MSG_FATAL( "Data column is not of type blob!" );
115  return StatusCode::FAILURE;
116  }
117 
118  coral::Blob blob = atr["data"].data<coral::Blob>();
119 
120  if(m_dbPayloadType =="TTree"){
121  std::unique_ptr<TTree> tree;
122  if(!CoralUtilities::readBlobAsTTree(blob, tree, "RtCalibConstants")) {
123  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!");
124  return StatusCode::FAILURE;
125  }
126  ATH_CHECK(parseRtPayload(*tree, *writeCdo));
127  } else if (m_dbPayloadType=="JSON") {
128  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
129  std::string data{};
130  if (!CoralUtilities::readBlobAsString(atr["data"].data<coral::Blob>(), data)) {
131  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
132  return StatusCode::FAILURE;
133  }
135  ATH_CHECK(parseRtPayload(std::move(rtBlob),*writeCdo));
136  } else {
137  ATH_MSG_FATAL("Payload type " << m_dbPayloadType << " not understood. Options are: TTree or JSON");
138  return StatusCode::FAILURE;
139  }
140  }
141 
142  } else if (!m_rtRootFile.value().empty()) {
143  std::unique_ptr<TFile> inFile{TFile::Open(m_rtRootFile.value().c_str(), "READ")};
144  if(!inFile || inFile->IsZombie()) {
145  ATH_MSG_FATAL("Failed to open file "<<m_rtRootFile);
146  return StatusCode::FAILURE;
147  }
148  TTree* tree{nullptr};
149  inFile->GetObject(m_rtTreeName.value().c_str(), tree);
150  if (!tree) {
151  ATH_MSG_FATAL("The object "<<m_rtRootFile<<" does not contain "<<m_rtTreeName);
152  return StatusCode::FAILURE;
153  }
154  ATH_CHECK(parseRtPayload(*tree, *writeCdo));
155  } else if (!m_rtJSON.value().empty()) {
156  std::ifstream inFile{m_rtJSON};
157  if (!inFile.good()) {
158  ATH_MSG_FATAL("Failed to open "<<m_rtJSON);
159  return StatusCode::FAILURE;
160  }
161  nlohmann::json rtBlob{};
162  inFile >> rtBlob;
163  ATH_CHECK(parseRtPayload(std::move(rtBlob),*writeCdo));
164  }
165  if (!m_readKeyTube.empty()) {
166  SG::ReadCondHandle readHandle{m_readKeyTube, ctx};
167  ATH_CHECK(readHandle.isValid());
168  writeHandle.addDependency(readHandle);
169  for(CondAttrListCollection::const_iterator itr = readHandle->begin();
170  itr != readHandle->end(); ++itr) {
171  const coral::AttributeList& atr = itr->second;
172  if(atr["data"].specification().type() != typeid(coral::Blob)) {
173  ATH_MSG_FATAL( "Data column is not of type blob!" );
174  return StatusCode::FAILURE;
175  }
176 
177  coral::Blob blob = atr["data"].data<coral::Blob>();
178 
179  if(m_dbPayloadType =="TTree"){
180  std::unique_ptr<TTree> tree;
181  if(!CoralUtilities::readBlobAsTTree(blob, tree, "T0CalibConstants")) {
182  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!");
183  return StatusCode::FAILURE;
184  }
185  ATH_CHECK(parseT0Payload(*tree, *writeCdo));
186  } else if (m_dbPayloadType=="JSON") {
187  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
188  std::string data{};
189  if (!CoralUtilities::readBlobAsString(atr["data"].data<coral::Blob>(), data)) {
190  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
191  return StatusCode::FAILURE;
192  }
194  ATH_CHECK(parseT0Payload(std::move(rtBlob),*writeCdo));
195  } else {
196  ATH_MSG_FATAL("Payload type " << m_dbPayloadType << " not understood. Options are: TTree or JSON");
197  return StatusCode::FAILURE;
198  }
199 
200  }
201  } else if (!m_t0RootFile.value().empty()) {
202  std::unique_ptr<TFile> inFile{TFile::Open(m_t0RootFile.value().c_str(), "READ")};
203  if(!inFile || inFile->IsZombie()) {
204  ATH_MSG_FATAL("Failed to open file "<<m_t0RootFile);
205  return StatusCode::FAILURE;
206  }
207  TTree* tree{nullptr};
208  inFile->GetObject(m_t0TreeName.value().c_str(), tree);
209  if (!tree) {
210  ATH_MSG_FATAL("The object "<<m_rtRootFile<<" does not contain "<<m_t0TreeName);
211  return StatusCode::FAILURE;
212  }
213  ATH_CHECK(parseT0Payload(*tree, *writeCdo));
214  } else {
215  std::ifstream inFile{m_t0JSON};
216  if (!inFile.good()) {
217  ATH_MSG_FATAL("Failed to open "<<m_t0JSON);
218  return StatusCode::FAILURE;
219  }
220  nlohmann::json t0Blob{};
221  inFile >> t0Blob;
222  ATH_CHECK(parseT0Payload(std::move(t0Blob), *writeCdo));
223  }
224 
225  ATH_CHECK(writeHandle.record(std::move(writeCdo)));
226  ATH_MSG_INFO("Recorded succesfully "<<m_writeKey.fullKey()<<" "<<writeHandle.getRange());
227  return StatusCode::SUCCESS;
228 }
229 
230 
231 StatusCode MdtCalibDbAlg::parseRtPayload(TTree& rtTree,
232  MdtCalibDataContainer& outContainer) const {
233  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
234 
235  std::string* rtType{nullptr}, *trType{nullptr}, *resoType{nullptr};
236 
237  std::vector<double>* rtParams{nullptr}, *trParams{nullptr}, *resoParams{nullptr};
238 
239  std::vector<std::string>* stationName{nullptr};
240  std::vector<short>* stationEta{nullptr};
241  std::vector<unsigned short>* stationPhi{nullptr}, *multiLayer{nullptr};
242 
243  SET_BRANCHADDRESS(rtTree, rtType);
244  SET_BRANCHADDRESS(rtTree, trType);
245  SET_BRANCHADDRESS(rtTree, resoType);
246  SET_BRANCHADDRESS(rtTree, rtParams);
247  SET_BRANCHADDRESS(rtTree, trParams);
248  SET_BRANCHADDRESS(rtTree, resoParams);
250  SET_BRANCHADDRESS(rtTree, stationEta);
251  SET_BRANCHADDRESS(rtTree, stationPhi);
252  SET_BRANCHADDRESS(rtTree, multiLayer);
253 
254  for (Long64_t e = 0; e< rtTree.GetEntries(); ++e) {
255  rtTree.GetEntry(e);
256  ATH_MSG_VERBOSE("Load "<<e<<"-th calibration constant Valid for "<<stationName->size()<< " det elements.");
257  std::vector<Identifier> detIds{};
258  for (unsigned ch = 0; ch < stationName->size(); ++ch){
259  const Identifier detElId = idHelper.channelID(stationName->at(ch), stationEta->at(ch), stationPhi->at(ch),
260  multiLayer->at(ch), 1, 1);
261  detIds.emplace_back(detElId);
262  }
263  IRtRelationPtr rtRel{makeRt(*rtType, *rtParams)};
264  if(!rtRel) {
265  return StatusCode::FAILURE;
266  }
267  ITrRelationPtr trRel = (*trType).size() ? makeTr(*trType, *trParams) : nullptr;
268  if ((*trType).size() && !trRel) {
269  return StatusCode::FAILURE;
270  }
271  IRtResolutionPtr rtReso = makeReso(*resoType, *resoParams, rtRel);
272  if (!rtReso) {
273  return StatusCode::FAILURE;
274  }
276  std::make_unique<MdtRtRelation>(std::move(rtRel), std::move(rtReso), std::move(trRel));
277  for (const Identifier& detId : detIds) {
278  if (!outContainer.storeData(detId, mdtRel, msgStream())){
279  return StatusCode::FAILURE;
280  }
281  }
282  }
283  return StatusCode::SUCCESS;
284 }
285 IRtRelationPtr MdtCalibDbAlg::makeRt(const std::string& rtType, const std::vector<double>& rtParams) const {
286  IRtRelationPtr rtRel{};
287  if (rtType == "RtRelationLookUp") {
288  rtRel = std::make_unique<RtRelationLookUp>(rtParams);
289  } else if (rtType == "RtLegendre"){
290  rtRel = std::make_unique<RtLegendre>(rtParams);
291  } else if (rtType == "RtChebyshev") {
292  rtRel = std::make_unique<RtChebyshev>(rtParams);
293  }
294  if (rtRel) {
295  ATH_MSG_VERBOSE("Fetched new rt-relation <"<<rtType<<"> valid for drift times ranging from "
296  <<rtRel->tLower()<<"-"<<rtRel->tUpper()<<".");
297  } else {
298  ATH_MSG_FATAL("The rt-relation function type <"<<rtType<<"> is not yet supported.");
299  }
300  return rtRel;
301 }
302 
303 ITrRelationPtr MdtCalibDbAlg::makeTr(const std::string& trType, const std::vector<double>& trParams) const {
304  ITrRelationPtr trRel{};
305  if (trType == "TrChebyshev") {
306  trRel = std::make_unique<TrChebyshev>(trParams);
307  } else if(trType == "TrLegendre") {
308  trRel = std::make_unique<TrLegendre>(trParams);
309  }
310  if (trRel) {
311  ATH_MSG_VERBOSE("Fetched new tr-relation <"<<trType<<"> valid for drift radii ranging from "
312  <<trRel->minRadius()<<"-"<<trRel->maxRadius()<<".");
313  } else {
314  ATH_MSG_FATAL("The rt-relation function type <"<<trType<<"> is not yet supported.");
315  }
316  return trRel;
317 }
318 
319 IRtResolutionPtr MdtCalibDbAlg::makeReso(const std::string& resoType, const std::vector<double>& resoParams,
320  IRtRelationPtr rt) const {
321  IRtResolutionPtr rtReso{};
322  if (resoType == "RtResolutionLookUp") {
323  rtReso = std::make_unique<RtResolutionLookUp>(resoParams);
324  } else if (resoType == "RtResolutionChebyshev") {
325  rtReso = std::make_unique<RtResolutionChebyshev>(resoParams);
326  } else if (resoType == "RadiusResolutionChebyshev") {
327  rtReso = std::make_unique<RadiusResolutionChebyshev>(resoParams, rt);
328  } else {
329  ATH_MSG_FATAL("The rt resolution type <"<<resoType<<"> is not yet supported.");
330  }
331  return rtReso;
332 }
333 StatusCode MdtCalibDbAlg::parseRtPayload(const nlohmann::json& rtBlob,
334  MdtCalibDataContainer& outContainer) const{
335  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
336 
338  for (auto& payload : rtBlob.items()) {
339  std::vector<Identifier> detIds{};
340 
341  const nlohmann::json calibConstants = payload.value();
343  for (auto& chambList : calibConstants["chambers"].items()) {
344  const nlohmann::json chambPayload = chambList.value();
345  const std::string station = chambPayload["station"];
346  const int eta = chambPayload["eta"];
347  const int phi = chambPayload["phi"];
348  const int ml = chambPayload["ml"];
349  const Identifier mlId{idHelper.channelID(station, eta, phi, ml, 1, 1)};
350  detIds.emplace_back(mlId);
351  }
352 
354  const nlohmann::json rtPayload = calibConstants["rtRelation"];
355  ITrRelationPtr trRel{};
356  IRtRelationPtr rtRel = makeRt(rtPayload["type"], rtPayload["params"]);
357  if (!rtRel) {
358  return StatusCode::FAILURE;
359  }
360  if (calibConstants.find("trRelation") != calibConstants.end()) {
361  const nlohmann::json trPayload = calibConstants["trRelation"];
362  trRel = makeTr(trPayload["type"], trPayload["params"]);
363  if (!trRel) {
364  return StatusCode::FAILURE;
365  }
366  }
368  const nlohmann::json resoPayload = calibConstants["rtReso"];
369  IRtResolutionPtr rtReso =makeReso(resoPayload["type"], resoPayload["params"], rtRel);
370  if (!rtReso) {
371  return StatusCode::FAILURE;
372  }
374  std::make_unique<MdtRtRelation>(std::move(rtRel), std::move(rtReso), std::move(trRel));
375 
376 
378  for (const Identifier& mlId : detIds) {
379  if (outContainer.hasDataForChannel(mlId,msgStream()) &&
380  outContainer.getCalibData(mlId, msgStream())->rtRelation) {
381  continue;
382  }
383  if (!outContainer.storeData(mlId, mdtRel, msgStream())) {
384  return StatusCode::FAILURE;
385  }
386  }
387  }
388  return StatusCode::SUCCESS;
389 }
390 
391 StatusCode MdtCalibDbAlg::parseT0Payload(TTree& t0Tree,
392  MuonCalib::MdtCalibDataContainer& outContainer) const {
393 
394  std::string* stationName{nullptr};
395  short stationEta{0};
396  unsigned short stationPhi{0}, code{0};
397  float t0{0.f}, adc{0.f};
398  std::vector<unsigned short>* multiLayer{nullptr}, *tubeLayer{nullptr}, *tube{nullptr};
399 
401  SET_BRANCHADDRESS(t0Tree, stationEta);
402  SET_BRANCHADDRESS(t0Tree, stationPhi);
403  SET_BRANCHADDRESS(t0Tree, code);
404  SET_BRANCHADDRESS(t0Tree, t0);
405  SET_BRANCHADDRESS(t0Tree, adc);
406  SET_BRANCHADDRESS(t0Tree, multiLayer);
407  SET_BRANCHADDRESS(t0Tree, tubeLayer);
408  SET_BRANCHADDRESS(t0Tree, tube);
409 
411  using SingleTubeCalibPtr = MdtTubeCalibContainer::SingleTubeCalibPtr;
412  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
413 
414  std::set<SingleTubeCalibPtr, CalibParamSorter> t0Constants{CalibParamSorter{std::pow(0.1, m_t0CalibPrec)}};
415  for (Long64_t e = 0 ; e <t0Tree.GetEntries(); ++e) {
416  t0Tree.GetEntry(e);
417  bool isValid{false};
418  const Identifier detId = idHelper.elementID(*stationName, stationEta, stationPhi, isValid);
419  if (!isValid) {
420  ATH_MSG_FATAL("Failed to create a valid Identifier from "<<(*stationName)<<", "<<stationEta<<", "
421  <<stationPhi);
422  return StatusCode::FAILURE;
423  }
424  TubeContainerPtr calibChannels = std::make_unique<MdtTubeCalibContainer>(m_idHelperSvc.get(), detId);
425  SingleTubeCalibPtr t0Calib = std::make_unique<SingleTubeCalib>();
426  t0Calib->adcCal = adc;
427  t0Calib->t0 = t0;
428  t0Calib->statusCode = code;
429  t0Calib = (*t0Constants.insert(t0Calib).first);
430  for (unsigned int ch = 0; ch < multiLayer->size(); ++ch){
431  const Identifier tubeId{idHelper.channelID(detId, multiLayer->at(ch),
432  tubeLayer->at(ch), tube->at(ch), isValid)};
433  if (!isValid) {
434  ATH_MSG_FATAL("Failed to get a valid tube Identifier for "<<m_idHelperSvc->toStringChamber(detId)
435  <<", ml: "<<multiLayer->at(ch)<<", tl: "<<tubeLayer->at(ch)<<", tube: "<<tube->at(ch));
436  return StatusCode::FAILURE;
437  }
438  if (!calibChannels->setCalib(t0Calib, tubeId, msgStream())) {
439  return StatusCode::FAILURE;
440  }
441  }
442  if (!outContainer.storeData(detId, calibChannels, msgStream())){
443  return StatusCode::FAILURE;
444  }
445  }
446  return StatusCode::SUCCESS;
447 }
448 StatusCode MdtCalibDbAlg::parseT0Payload(const nlohmann::json& t0Blob,
449  MdtCalibDataContainer& outContainer) const {
450  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
452  using SingleTubeCalibPtr = MdtTubeCalibContainer::SingleTubeCalibPtr;
453 
454  std::set<SingleTubeCalibPtr, CalibParamSorter> t0Constants{CalibParamSorter{std::pow(0.1, m_t0CalibPrec)}};
456  for (auto& dbEntry : t0Blob.items()) {
457  const nlohmann::json payload = dbEntry.value();
458  const std::string station = payload["station"];
459  const int eta = payload["eta"];
460  const int phi = payload["phi"];
461  bool isValid{false};
462  const Identifier detId = idHelper.elementID(station, eta, phi, isValid);
463  if (!isValid) {
464  ATH_MSG_FATAL("Failed to create a valid identifier from "<<station<<", "<<eta<<", "<<phi);
465  return StatusCode::FAILURE;
466  }
467  TubeContainerPtr calibChannels = std::make_unique<MdtTubeCalibContainer>(m_idHelperSvc.get(), detId);
468 
469  for (auto& calibEntry : payload["calibConstants"].items()){
470  const nlohmann::json calibPayload = calibEntry.value();
471  SingleTubeCalibPtr calibConstant{std::make_unique<SingleTubeCalib>()};
472  calibConstant->t0 = calibPayload["t0"];
473  calibConstant->adcCal = calibPayload["adc"];
474  calibConstant->statusCode = calibPayload["code"];
475  calibConstant = *t0Constants.insert(calibConstant).first;
476  for (auto& tubeEntry : calibPayload["tubes"].items()) {
477  const nlohmann::json tubePayload = tubeEntry.value();
478  const int ml = tubePayload["ml"];
479  const int tubeLayer = tubePayload["tl"];
480  const std::string tubeStr = tubePayload["no"];
481  const std::vector<std::string> tubeTokens{CxxUtils::tokenize(tubeStr, ";")};
482  std::vector<int> tubes{};
483  for (const std::string& token: tubeTokens) {
484  if (token.find("-") == std::string::npos) {
485  tubes.emplace_back(CxxUtils::atoi(token));
486  } else {
487  const std::vector<std::string> rangeToken{CxxUtils::tokenize(token,"-")};
488  if (rangeToken.size() != 2) {
489  ATH_MSG_FATAL("No valid tube range token: "<<token);
490  return StatusCode::FAILURE;
491  }
492  const int tubeLow{CxxUtils::atoi(rangeToken[0])}, tubeHigh{CxxUtils::atoi(rangeToken[1])};
493  if (tubeLow >= tubeHigh){
494  ATH_MSG_FATAL("Invalid range "<<tubeLow<<"-"<<tubeHigh
495  <<". The lower end must be strictly smaller than the upper one");
496  return StatusCode::FAILURE;
497  }
498  for (int tube = tubeLow; tube<=tubeHigh; ++tube) {
499  tubes.push_back(tube);
500  }
501  }
502  }
503  for (const int tube : tubes) {
504  const Identifier tubeId = idHelper.channelID(detId,ml, tubeLayer, tube, isValid);
505  if (!isValid) {
506  ATH_MSG_FATAL("No valid tube identifier from "<<m_idHelperSvc->toStringDetEl(detId)
507  <<", layer: "<<tubeLayer<<", tube: "<<tube);
508  return StatusCode::FAILURE;
509  }
510  if (!calibChannels->setCalib(calibConstant, tubeId, msgStream())){
511  return StatusCode::FAILURE;
512  }
513  }
514  }
515  }
516  if (!outContainer.storeData(detId, std::move(calibChannels), msgStream())) {
517  return StatusCode::FAILURE;
518  }
519  }
520 
521  return StatusCode::SUCCESS;
522 }
523 
524 }
525 
526 
MdtCalibDbAlg.h
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
GeoModel::TransientConstSharedPtr< IRtRelation >
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
SingleTubeCalib
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib SingleTubeCalib
Definition: MdtCalibrationTool.cxx:29
CalibParamSorter.h
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
json
nlohmann::json json
Definition: HistogramDef.cxx:9
MuonCalib::MdtCalibDataContainer::RegionGranularity
RegionGranularity
Definition: MdtCalibDataContainer.h:26
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonCalib::MdtCalibDataContainer::storeData
bool storeData(const Identifier &mlID, CorrectionPtr corrFuncSet, MsgStream &msg)
Definition: MdtCalibDataContainer.cxx:52
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
MuonCalib::CalibParamSorter
Helper struct to group Mdt calibration constants which are equivalent within the target precision.
Definition: CalibParamSorter.h:12
makeTOC.inFile
string inFile
Definition: makeTOC.py:5
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1082
tree
TChain * tree
Definition: tile_monitor.h:30
StringUtils.h
RtRelationLookUp.h
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:778
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
histSizes.code
code
Definition: histSizes.py:129
dumpNswErrorDb.calibEntry
calibEntry
Definition: dumpNswErrorDb.py:29
CoralUtilities::readBlobAsString
bool readBlobAsString(const coral::Blob &, std::string &)
Definition: blobaccess.cxx:85
MdtCalibDbAlg::initialize
virtual StatusCode initialize() override
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:52
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
IOVInfiniteRange::infiniteRunLB
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
Definition: IOVInfiniteRange.h:39
MdtIdHelper
Definition: MdtIdHelper.h:61
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
RtResolutionLookUp.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCalibR4
Definition: MdtAnalyticRtCalibAlg.cxx:24
TrLegendre.h
IOVInfiniteRange.h
RtResolutionChebyshev.h
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:71
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:41
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
MuonCalib::MdtTubeCalibContainer::setCalib
bool setCalib(SingleTubeCalibPtr val, const Identifier &tubeId, MsgStream &msg)
set the calibration constants of a single tube
Definition: MdtTubeCalibContainer.cxx:19
MuonCalib::MdtTubeCalibContainer::SingleTubeCalibPtr
GeoModel::TransientConstSharedPtr< SingleTubeCalib > SingleTubeCalibPtr
Definition: MdtTubeCalibContainer.h:28
blobaccess.h
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
RtChebyshev.h
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
MuonCalib::MdtCalibDataContainer
Definition: MdtCalibDataContainer.h:20
MdtFullCalibData.h
MdtCalibDbAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:122
TrChebyshev.h
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:36
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib
Definition: MdtTubeCalibContainer.h:19
SET_BRANCHADDRESS
#define SET_BRANCHADDRESS(tree, branchName)
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx:43
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
RtLegendre.h
sTgcDigitEffiDump.multiLayer
int multiLayer
Definition: sTgcDigitEffiDump.py:36
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
CoralUtilities::readBlobAsTTree
bool readBlobAsTTree(const coral::Blob &blob, std::unique_ptr< TTree > &tree, const std::string_view name="tree")
Interprets the coral::Blob as a TTree instance.
Definition: blobaccess.cxx:107
calibdata.tube
tube
Definition: calibdata.py:31
RadiusResolutionChebyshev.h
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
Identifier
Definition: IdentifierFieldParser.cxx:14