12#include "CLHEP/Random/RandGaussZiggurat.h"
13#include "CoralBase/Attribute.h"
14#include "CoralBase/AttributeListSpecification.h"
15#include "GaudiKernel/PhysicalConstants.h"
41#include "GeoModelKernel/throwExcept.h"
68 ATH_MSG_DEBUG(
" initialize Random Number Service: running with t0 shift "
73 ATH_MSG_ERROR(
"Could not get random number engine from AthRNGSvc. Abort.");
74 return StatusCode::FAILURE;
79 ATH_MSG_INFO(
"************************************" << std::endl
80 <<
" Running with Calibration Deformations! " << std::endl
81 <<
" For performance studies only!" << std::endl
82 <<
" **************************************");
96 return StatusCode::SUCCESS;
103 if (key.empty())
continue;
107 return StatusCode::FAILURE;
110 ATH_MSG_INFO(
"Size of CondAttrListCollection " << readHandle.
fullKey() <<
" readCdoRt->size()= " << readHandle->size());
114 return StatusCode::SUCCESS;
119 return StatusCode::FAILURE;
121 if (readHandle->hasDCS()) {
124 return StatusCode::SUCCESS;
131 <<
". In theory this should not be called, but may happen"
132 <<
" if multiple concurrent events are being processed out of order.");
133 return StatusCode::SUCCESS;
140 gran = RegionGranularity::OneRt;
142 ATH_MSG_DEBUG(
"Save one set of calibration constants per multi layer");
143 gran = RegionGranularity::OnePerMultiLayer;
144 }
else ATH_MSG_DEBUG(
"Save one set of calibration constants per chamber");
145 std::unique_ptr<MuonCalib::MdtCalibDataContainer> writeCdo = std::make_unique<MuonCalib::MdtCalibDataContainer>(
m_idHelperSvc.get(), gran);
150 return StatusCode::SUCCESS;
156 std::ifstream inputFile(fileName);
159 return StatusCode::FAILURE;
172 for (
unsigned int n = 0; n < rts.nRts(); ++n) {
173 std::unique_ptr<MuonCalib::RtDataFromFile::RtRelation> rt(rts.getRt(n));
180 if (times.size() < 2) {
182 return StatusCode::FAILURE;
185 if (times.size() != radii.size() || times.size() != reso.size()) {
187 return StatusCode::FAILURE;
190 double t_min = times[0];
191 double bin_size = times[1] - t_min;
194 return StatusCode::FAILURE;
200 rtPars.push_back(t_min);
201 rtPars.push_back(bin_size);
204 rtPars.insert(rtPars.end(), radii.begin(), radii.end());
210 resoPars.insert(resoPars.end(), reso.begin(), reso.end());
215 std::shared_ptr<MuonCalib::IRtRelation> rtRel{std::make_shared<RtRelationLookUp>(rtPars)};
216 std::shared_ptr<MuonCalib::IRtResolution> resoRel{std::make_shared<RtResolutionLookUp>(resoPars)};
226 RtRelationPtr MdtRt = std::make_shared<MuonCalib::MdtRtRelation>(rtRel, resoRel);
241 if (writeCdo.
granularity() != RegionGranularity::OnePerMultiLayer)
continue;
252 if (!writeCdo.
storeData(detElId, storeMe, msgStream())) {
254 return StatusCode::FAILURE;
258 loadedRts[detElId] = MdtRt;
263 if (
msgLvl(MSG::VERBOSE)) {
264 int npoints = rtRel->nPar() - 2;
266 for (
int ipt = 0; ipt < npoints; ++ipt) {
267 double t = t_min + ipt * bin_size;
268 ATH_MSG_VERBOSE(
" " << ipt <<
" " << t <<
" " << rtRel->radius(t) <<
" " << resoRel->resolution(t));
275 return StatusCode::SUCCESS;
278 static std::atomic<bool> rtWarningPrinted =
false;
282 if (detEl) {
return std::make_optional<double>(detEl->
innerTubeRadius()); }
286 if (detEl) {
return std::make_optional<double>(detEl->
innerTubeRadius()); }
288 if (!rtWarningPrinted) {
289 ATH_MSG_WARNING(
"getInnerTubeRadius() - no Muon station known under the name "
291 rtWarningPrinted =
true;
297 std::string
data{}, delim{};
298 if (attr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
302 return StatusCode::FAILURE;
306 data = *(
static_cast<const std::string *
>((attr[
"data"]).addressOfData()));
309 const std::vector<std::string> tokens =
tokenize(
data, delim);
310 if (tokens.size() < 2) {
312 return StatusCode::FAILURE;
314 const std::string&
header = tokens[0];
315 const std::string& payload = tokens[1];
318 unsigned int numPoints{0};
319 nlohmann::json channel{};
321 channel[
"appliedRT"] = rt_ts_applied;
326 if(tokensHeader.size()< 2){
327 ATH_MSG_FATAL(
"Failed to deduce extract number of points & calib Identifier from "<<
header);
328 return StatusCode::FAILURE;
330 unsigned int calibId = tokensHeader[0];
331 numPoints = tokensHeader[1];
335 return StatusCode::FAILURE;
339 ATH_MSG_WARNING(
"The translation from the calibration ID with station: "
340 <<
id.stationNameString()<<
"("<<
id.stationName()<<
") "
341 <<
" eta:"<<
id.
eta()<<
" phi: "<<
id.
phi());
343 channel[
"station"] =
m_idHelperSvc->stationNameString(athenaId);
346 channel[
"ml"] = idHelper.
multilayer(athenaId);
347 channel[
"layer"] = idHelper.
tubeLayer(athenaId);
348 channel[
"tube"] = idHelper.
tube(athenaId);
351 const std::vector<double> dataPoints =
tokenizeDouble(payload,
",");
352 std::vector<double> radii{}, times{}, resos{};
353 radii.reserve(numPoints);
354 times.reserve(numPoints);
355 resos.reserve(numPoints);
359 for (
unsigned int k = 0 ; k < dataPoints.size(); ++k) {
360 const double value = dataPoints[k];
363 radii.push_back(value);
366 times.push_back(value);
369 resos.push_back(value);
376 if (radii.size() != numPoints ||
377 times.size() != numPoints ||
378 resos.size() != numPoints) {
379 ATH_MSG_FATAL(
"Payload "<<payload<<
" does not lead to the expected number of points "<<numPoints<<
" vs. "<<dataPoints.size());
380 return StatusCode::FAILURE;
382 channel[
"radii"] = std::move(radii);
383 channel[
"times"] = std::move(times);
384 channel[
"resolutions"] = std::move(resos);
385 json.push_back(channel);
386 return StatusCode::SUCCESS;
396 return StatusCode::FAILURE;
400 nlohmann::json rtCalibJson = nlohmann::json::array();
404 itr != readHandleRt->end(); ++itr) {
405 const coral::AttributeList &atr = itr->second;
407 if (atr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
411 return StatusCode::FAILURE;
415 data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
418 nlohmann::json yy = nlohmann::json::parse(
data);
419 for (
auto &it : yy.items()) {
420 nlohmann::json yx = it.value();
421 rtCalibJson.push_back(yx);
428 itr != readHandleRt->end(); ++itr) {
435 for (
const auto& payload : rtCalibJson) {
436 const bool rt_ts_applied = payload[
"appliedRT"];
438 const std::string
stName = payload[
"station"];
440 payload[
"ml"], payload[
"layer"], payload[
"tube"]);
443 if (!innerTubeRadius)
continue;
446 const std::vector<double> radii = payload[
"radii"];
447 const std::vector<double> times = payload[
"times"];
448 const std::vector<double> resolutions = payload[
"resolutions"];
461 std::vector<MuonCalib::SamplePoint> tr_points{}, ts_points{};
463 float multilayer_tmax_diff{-std::numeric_limits<float>::max()};
466 for (
unsigned int k = 0; k < radii.size(); ++k) {
467 float radius = radii[k];
469 float oldradius = radius;
471 float rshift =
m_rtShift * 1.87652e-2 * radius * (radius - *innerTubeRadius);
472 radius = oldradius +
rshift;
473 ATH_MSG_DEBUG(
"DEFORM RT: old radius " << oldradius <<
" new radius " << radius <<
" shift " <<
rshift
478 float oldradius = radius;
480 ATH_MSG_DEBUG(
"DEFORM RT: old radius " << oldradius <<
" new radius " << radius <<
" scale factor " <<
m_rtScale);
484 float time = times[k];
488 float sigma = resolutions[k];
492 if (tr_point.
x2() < -99) {
493 multilayer_tmax_diff = tr_point.
x1();
494 }
else if (tr_points.empty() || (tr_points.back().x1() < tr_point.
x1() && tr_points.back().x2() < tr_point.
x2())) {
495 tr_points.push_back(tr_point);
496 ts_points.push_back(ts_point);
501 if (ts_points.size() < 3) {
503 return StatusCode::FAILURE;
507 float sign(rt_ts_applied ? -1.0 : 1.0);
509 for (
auto & tr_point : tr_points) {
510 int slice_number =
static_cast<int>(std::floor(tr_point.
x2() / slice_width));
511 if (slice_number < 0) slice_number = 0;
520 if (
msgLvl(MSG::VERBOSE)) {
523 ATH_MSG_VERBOSE(point.x1() <<
"|" << point.x2() <<
"|" << point.error());
526 for (
unsigned int i = 0; i < reso->nPar(); i++) {
ATH_MSG_VERBOSE(i <<
" " << reso->par(i)); }
531 if (!reso || !rt) {
continue; }
533 if (rt->par(1) == 0.) {
537 return StatusCode::FAILURE;
540 if (multilayer_tmax_diff > -8e8) { rt->SetTmaxDiff(multilayer_tmax_diff); }
542 RtRelationPtr rt_rel = std::make_shared<MuonCalib::MdtRtRelation>(std::move(rt), std::move(reso));
544 if (!writeCdo.
storeData(athenaId ,rt_rel, msgStream()))
return StatusCode::FAILURE;
546 loadedRtRel[athenaId] = rt_rel;
551 if (loadedRtRel.empty()) {
552 return StatusCode::SUCCESS;
555 ATH_MSG_DEBUG(
"Initializing " << loadedRtRel.size()<<
" b-field functions");
560 if (readCondHandleDb->hasDCS()) {
561 condDbData = readCondHandleDb.
cptr();
563 ATH_MSG_INFO(
"Do not retrieve the HV from DCS. Fall back to 2730 & 3080");
568 for (
const auto& [athenaId, rtRelation] : loadedRtRel) {
569 CorrectionPtr corrFuncSet = std::make_unique<MuonCalib::MdtCorFuncSet>();
572 std::vector<double> corr_params(2);
573 bool loadDefault{
false};
578 if (corr_params[0] < std::numeric_limits<float>::epsilon()) {
582 }
else loadDefault =
true;
585 corr_params[0] = 2730.0;
587 corr_params[0] = 3080.0;
590 corr_params[1] = 0.11;
591 corrFuncSet->
setBField(std::make_unique<MuonCalib::BFieldCorFunc>(
"medium", corr_params, rtRelation->rt()));
596 if (!writeCdo.
storeData(athenaId, corrFuncSet, msgStream()))
return StatusCode::FAILURE;
599 return StatusCode::SUCCESS;
609 for (; it != it_end; ++it) {
620 if (!writeCdo.
storeData(*it, tubes, msgStream()))
return StatusCode::FAILURE;
626 unsigned int nlayers = tubes->
numLayers();
627 unsigned int ntubes = tubes->
numTubes();
628 int size = nml * nlayers * ntubes;
631 <<
" size " << size <<
" ml " << nml <<
" l " << nlayers <<
" t " << ntubes);
632 for (
unsigned int ml = 1; ml <= nml; ++ml) {
633 for (
unsigned int l = 1; l <= nlayers; ++l) {
634 for (
unsigned int t = 1; t <= ntubes; ++t) {
644 return StatusCode::SUCCESS;
650 if (attr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
654 return StatusCode::FAILURE;
658 data = *(
static_cast<const std::string *
>((attr[
"data"]).addressOfData()));
661 if (tokens.size() < 2) {
663 return StatusCode::FAILURE;
665 std::string&
header = tokens[0];
666 const std::string& payload = tokens[1];
673 int eta{0},
phi{0}, nTubes{0};
676 const std::vector<std::string> headerTokens =
tokenize(
header,
",");
679 nTubes =
atoi(headerTokens[5]);
685 static std::atomic<bool> idWarningPrinted =
false;
686 if (!idWarningPrinted) {
688 <<
" is invalid. Skipping");
689 idWarningPrinted.store(
true, std::memory_order_relaxed);
691 return StatusCode::SUCCESS;
693 nlohmann::json channel{};
695 channel[
"appliedT0"] = t0_ts_applied;
696 channel[
"station"] =
stName;
697 channel[
"eta"] =
eta;
698 channel[
"phi"] =
phi;
700 const std::vector<double> payLoadData =
tokenizeDouble(payload,
",");
701 std::vector<double> tzeros{}, meanAdcs{};
702 std::vector<int> statusCodes{};
705 for (
unsigned int k = 0; k < payLoadData.size(); ++k){
706 const double value = payLoadData[k];
709 tzeros.push_back(value);
712 statusCodes.push_back(value);
715 meanAdcs.push_back(value);
721 if (statusCodes.size() != tzeros.size() ||
722 statusCodes.size() != meanAdcs.size() ||
723 statusCodes.empty()) {
725 return StatusCode::FAILURE;
728 int ml{1}, layer{1}, tube{1};
732 const int tubesPerLay = std::max(idHelper.
tubeMax(chamID), idHelper.
tubeMax(secondMlID));
734 if (
m_checkTubes && (numMl * numLayers * tubesPerLay) != nTubes) {
735 ATH_MSG_FATAL(
"Calibration database differs in terms of number of tubes for chamber "
736 <<
m_idHelperSvc->toStringChamber(chamID)<<
". Expected "<<(numMl * numLayers * tubesPerLay)
737 <<
" vs. observed "<<nTubes);
738 return StatusCode::FAILURE;
740 nlohmann::json calibData = nlohmann::json::array();
741 for (
unsigned int k = 0; k < tzeros.size(); ++k) {
742 nlohmann::json channelData{};
743 channelData[
"ml"] = ml;
744 channelData[
"layer"] =layer;
745 channelData[
"tube"] = tube;
746 channelData[
"t0"] = tzeros[k];
747 channelData[
"meanAdc"] = meanAdcs[k];
748 channelData[
"status"] = statusCodes[k];
750 if (tube > tubesPerLay){
754 if (layer > numLayers){
758 calibData.push_back(std::move(channelData));
760 channel[
"calibConstants"] = std::move(calibData);
761 json.push_back(std::move(channel));
762 return StatusCode::SUCCESS;
771 nlohmann::json t0CalibJson = nlohmann::json::array();
774 itr != readHandleTube->end(); ++itr) {
775 const coral::AttributeList &atr = itr->second;
777 if (atr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
781 return StatusCode::FAILURE;
785 data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
788 nlohmann::json yy = nlohmann::json::parse(
data);
789 for (
auto &it : yy.items()) {
790 nlohmann::json yx = it.value();
791 t0CalibJson.push_back(yx);
798 itr != readHandleTube->end(); ++itr) {
804 const float inversePropSpeed = 1. / (Gaudi::Units::c_light *
m_prop_beta);
810 for (
const auto& chambChannel : t0CalibJson) {
811 const std::string
stName = chambChannel[
"station"];
812 const int ieta = chambChannel[
"eta"];
813 const int iphi = chambChannel[
"phi"];
814 const bool t0_ts_applied = chambChannel[
"appliedT0"];
820 static std::atomic<bool> idWarningPrinted =
false;
821 if (!idWarningPrinted) {
823 <<
" is not valid, skipping");
824 idWarningPrinted.store(
true, std::memory_order_relaxed);
838 if (!writeCdo.
storeData(chId, tubes, msgStream())) {
840 <<
" ID fields: "<<
stName<<
","<<ieta<<
","<<iphi);
841 return StatusCode::FAILURE;
844 const nlohmann::json& tubeConstants = chambChannel[
"calibConstants"];
845 for (
const auto& tubeChannel : tubeConstants) {
846 const int ml = tubeChannel[
"ml"];
847 const int l = tubeChannel[
"layer"];
848 const int t = tubeChannel[
"tube"];
849 double tzero = tubeChannel[
"t0"];
855 CLHEP::HepRandomEngine *engine =
m_RNGWrapper->getEngine(ctx);
856 double sh = CLHEP::RandGaussZiggurat::shoot(engine, 0.,
m_t0Spread);
858 ATH_MSG_VERBOSE(
"T0 spread " <<
sh <<
" t0 " << tzero <<
" id " << ml <<
" " << l <<
" " << t);
863 const int statusCode = tubeChannel[
"status"];
864 const double meanAdc = tubeChannel[
"meanAdc"];
868 datatube.
adcCal = meanAdc;
870 tubes->
setCalib(std::move(datatube), tubeId, msgStream());
876 return StatusCode::SUCCESS;
883 std::vector<Double_t>
x(sample_points.size(),0);
884 std::vector<Double_t>
y(sample_points.size(),0);
886 for (
unsigned int i = 0; i < sample_points.size(); i++) {
887 x[i] = sample_points[i].x1();
888 y[i] = sample_points[i].x2();
890 TSpline3
sp(
"Rt Res Tmp",
x.data(),
y.data(), sample_points.size());
894 unsigned int nb_points(100);
895 std::vector<double> res_param(nb_points + 2);
896 Double_t bin_width = (
x[sample_points.size() - 1] -
x[0]) /
static_cast<Double_t
>(nb_points);
899 res_param[1] = bin_width;
900 for (
unsigned int k = 0; k < nb_points; k++) {
901 Double_t xx =
x[0] + k * bin_width;
902 res_param[k + 2] =
sp.Eval(xx);
903 if (std::isnan(res_param[k + 2])) {
904 TFile outf(
"kacke.root",
"RECREATE");
907 "encountered nan element");
910 return std::make_unique<MuonCalib::RtResolutionLookUp>(std::move(res_param));
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
char data[hepevt_bytes_allocation_ATLAS]
Abstract interface to IOVDbSvc to access IOVRange and tag information.
MdtFullCalibData::CorrectionPtr CorrectionPtr
MdtFullCalibData::TubeContainerPtr TubeContainerPtr
MdtCalibDataContainer::RegionGranularity RegionGranularity
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
ChanAttrListMap::const_iterator const_iterator
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.
value_type get_compact() const
Get the compact id.
const DcsConstants & getHvState(const Identifier &multiLayerID) const
Identifier multilayerID(const Identifier &channeldID) const
int multilayer(const Identifier &id) const
Access to components of the ID.
Identifier elementID(int stationName, int stationEta, int stationPhi) const
int tube(const Identifier &id) const
static int tubeLayerMax()
int tubeLayer(const Identifier &id) const
int numberOfMultilayers(const Identifier &id) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
std::vector< double > ParVec
bool storeData(const Identifier &mlID, CorrectionPtr corrFuncSet, MsgStream &msg)
bool hasDataForChannel(const Identifier &measId, MsgStream &msg) const
Checks whether a calibration data object is already present.
void setInversePropSpeed(const float speed)
RegionGranularity granularity() const
const MdtFullCalibData * getCalibData(const Identifier &measId, MsgStream &msg) const
Returns the calibration data associated with this station.
void setBField(std::unique_ptr< IMdtBFieldCorFunc > &&bField)
void setSlewing(std::unique_ptr< IMdtSlewCorFunc > &&slew)
unsigned int numLayers() const
unsigned int numMultilayers() const
bool setCalib(SingleTubeCalib val, const Identifier &tubeId, MsgStream &msg)
set the calibration constants of a single tube
unsigned int numTubes() const
Implements fixed identifiers not dependent upon Athena Identifier for internal use in the calibration...
Manages the I/O of the Rt realtions from/to file.
std::vector< double > DataVec
static std::unique_ptr< IRtRelation > getRtRelationLookUp(const std::vector< SamplePoint > &sample_points)
This class provides a sample point for the BaseFunctionFitter.
double x2() const
get the error on the x2 coordinate of the sample point
void set_error(const double merror)
void set_x2(const double mx2)
set the error of the x2 coordinate sample point to merror
void set_x1(const double mx1)
set the x2 coordinate of the sample point to mx2
double x1() const
< get the x1 coordinate of the sample point
Readout element to describe the Monitored Drift Tube (Mdt) chambers Mdt chambers usually comrpise out...
double innerTubeRadius() const
Returns the inner tube radius.
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
std::vector< Identifier >::const_iterator const_id_iterator
const_id_iterator module_end() const
const_id_iterator module_begin() const
Iterators over full set of ids.
const_id_iterator detectorElement_begin() const
Iterators over full set of ids.
const_id_iterator detectorElement_end() const
Gaudi::Property< bool > m_newFormat2020
ServiceHandle< IAthRNGSvc > m_AthRNGSvc
Gaudi::Property< bool > m_TimeSlewingCorrection
MuonCalib::MdtFullCalibData::RtRelationPtr RtRelationPtr
ATHRNG::RNGWrapper * m_RNGWrapper
Gaudi::Property< bool > m_createSlewingFunction
SG::ReadCondHandleKey< MdtCondDbData > m_readKeyDCS
Gaudi::Property< bool > m_useNewGeo
const MuonGM::MuonDetectorManager * m_detMgr
StatusCode legacyTubePayloadToJSON(const coral::AttributeList &attr, nlohmann::json &json) const
virtual StatusCode execute(const EventContext &ctx) const override
std::optional< double > getInnerTubeRadius(const Identifier &id) const
Gaudi::Property< double > m_prop_beta
StatusCode declareDependency(const EventContext &ctx, SG::WriteCondHandle< MuonCalib::MdtCalibDataContainer > &writeHandle) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyTube
Gaudi::Property< double > m_t0Spread
Gaudi::Property< double > m_t0Shift
Gaudi::Property< double > m_defaultT0
StringProperty m_RTfileName
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > m_writeKey
StatusCode defaultRt(MuonCalib::MdtCalibDataContainer &writeCdoRt, LoadedRtMap &loadedRts) const
Gaudi::Property< double > m_TsCorrectionT0
Gaudi::Property< bool > m_checkTubes
only needed to retrieve information on number of tubes etc. (no alignment needed)
virtual StatusCode initialize() override
Gaudi::Property< double > m_rtShift
Gaudi::Property< std::vector< float > > m_MeanCorrectionVsR
StringProperty m_randomStream
StatusCode loadTube(const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idToFixedIdTool
StatusCode legacyRtPayloadToJSON(const coral::AttributeList &attr, nlohmann::json &json) const
Parses the legacy payload for the RT functions to a json format.
StatusCode defaultT0s(MuonCalib::MdtCalibDataContainer &writeCdoTube) const
Gaudi::Property< bool > m_UseMLRt
Gaudi::Property< bool > m_create_b_field_function
std::map< Identifier, RtRelationPtr > LoadedRtMap
static std::unique_ptr< MuonCalib::RtResolutionLookUp > getRtResolutionInterpolation(const std::vector< MuonCalib::SamplePoint > &sample_points)
Gaudi::Property< double > m_rtScale
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode loadRt(const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyRt
const MuonGMR4::MuonDetectorManager * m_r4detMgr
static std::string find_calib_file(const std::string &logical_file_name)
const DataObjID & fullKey() const
const EventIDRange & getRange()
const_pointer_type cptr()
void addDependency(const EventIDRange &range)
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
bool readBlobAsString(const coral::Blob &, std::string &)
std::vector< int > tokenizeInt(const std::string &the_str, std::string_view delimiter)
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
std::vector< double > tokenizeDouble(const std::string &the_str, std::string_view delimiter)
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
@ TIME_SLEWING_CORRECTION_APPLIED
const std::string & stName(StIndex index)
convert StIndex into a string
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
class which holds the full set of calibration constants for a given tube
TubeContainerPtr tubeCalib
GeoModel::TransientConstSharedPtr< MdtTubeCalibContainer > TubeContainerPtr
GeoModel::TransientConstSharedPtr< MdtCorFuncSet > CorrectionPtr
float adcCal
quality flag for the SingleTubeCalib constants: 0 all ok, 1 no hits found, 2 too few hits,...
float t0
< relative t0 in chamber (ns)
Helper struct to cache all dcs constants in a common place of the memory.
#define THROW_EXCEPTION(MESSAGE)