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"
69 ATH_MSG_DEBUG(
" initialize Random Number Service: running with t0 shift "
74 ATH_MSG_ERROR(
"Could not get random number engine from AthRNGSvc. Abort.");
75 return StatusCode::FAILURE;
80 ATH_MSG_INFO(
"************************************" << std::endl
81 <<
" Running with Calibration Deformations! " << std::endl
82 <<
" For performance studies only!" << std::endl
83 <<
" **************************************");
94 return StatusCode::SUCCESS;
101 if (key.empty())
continue;
105 return StatusCode::FAILURE;
108 ATH_MSG_INFO(
"Size of CondAttrListCollection " << readHandle.
fullKey() <<
" readCdoRt->size()= " << readHandle->size());
115 return StatusCode::FAILURE;
117 if (readHandle->hasDCS()) {
120 return StatusCode::SUCCESS;
127 <<
". In theory this should not be called, but may happen"
128 <<
" if multiple concurrent events are being processed out of order.");
129 return StatusCode::SUCCESS;
136 gran = RegionGranularity::OneRt;
138 ATH_MSG_DEBUG(
"Save one set of calibration constants per multi layer");
139 gran = RegionGranularity::OnePerMultiLayer;
140 }
else ATH_MSG_DEBUG(
"Save one set of calibration constants per chamber");
141 std::unique_ptr<MuonCalib::MdtCalibDataContainer> writeCdo = std::make_unique<MuonCalib::MdtCalibDataContainer>(
m_idHelperSvc.get(), gran);
146 return StatusCode::SUCCESS;
152 std::ifstream inputFile(fileName);
155 return StatusCode::FAILURE;
168 for (
unsigned int n = 0; n < rts.nRts(); ++n) {
169 std::unique_ptr<MuonCalib::RtDataFromFile::RtRelation> rt(rts.getRt(n));
176 if (times.size() < 2) {
178 return StatusCode::FAILURE;
181 if (times.size() != radii.size() || times.size() != reso.size()) {
183 return StatusCode::FAILURE;
186 double t_min = times[0];
187 double bin_size = times[1] - t_min;
190 return StatusCode::FAILURE;
196 rtPars.push_back(t_min);
197 rtPars.push_back(bin_size);
200 rtPars.insert(rtPars.end(), radii.begin(), radii.end());
206 resoPars.insert(resoPars.end(), reso.begin(), reso.end());
211 std::shared_ptr<MuonCalib::IRtRelation> rtRel{std::make_shared<RtRelationLookUp>(rtPars)};
212 std::shared_ptr<MuonCalib::IRtResolution> resoRel{std::make_shared<RtResolutionLookUp>(resoPars)};
222 RtRelationPtr MdtRt = std::make_shared<MuonCalib::MdtRtRelation>(rtRel, resoRel);
237 if (writeCdo.
granularity() != RegionGranularity::OnePerMultiLayer)
continue;
248 if (!writeCdo.
storeData(detElId, storeMe, msgStream())) {
250 return StatusCode::FAILURE;
254 loadedRts[detElId] = MdtRt;
259 if (
msgLvl(MSG::VERBOSE)) {
260 int npoints = rtRel->nPar() - 2;
262 for (
int ipt = 0; ipt < npoints; ++ipt) {
263 double t = t_min + ipt * bin_size;
264 ATH_MSG_VERBOSE(
" " << ipt <<
" " << t <<
" " << rtRel->radius(t) <<
" " << resoRel->resolution(t));
271 return StatusCode::SUCCESS;
274 static std::atomic<bool> rtWarningPrinted =
false;
278 if (detEl) {
return std::make_optional<double>(detEl->
innerTubeRadius()); }
282 if (detEl) {
return std::make_optional<double>(detEl->
innerTubeRadius()); }
284 if (!rtWarningPrinted) {
285 ATH_MSG_WARNING(
"getInnerTubeRadius() - no Muon station known under the name "
287 rtWarningPrinted =
true;
293 std::string
data{}, delim{};
294 if (attr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
298 return StatusCode::FAILURE;
302 data = *(
static_cast<const std::string *
>((attr[
"data"]).addressOfData()));
305 const std::vector<std::string> tokens =
tokenize(
data, delim);
306 if (tokens.size() < 2) {
308 return StatusCode::FAILURE;
310 const std::string&
header = tokens[0];
311 const std::string& payload = tokens[1];
314 unsigned int numPoints{0};
315 nlohmann::json channel{};
317 channel[
"appliedRT"] = rt_ts_applied;
322 if(tokensHeader.size()< 2){
323 ATH_MSG_FATAL(
"Failed to deduce extract number of points & calib Identifier from "<<
header);
324 return StatusCode::FAILURE;
326 unsigned int calibId = tokensHeader[0];
327 numPoints = tokensHeader[1];
331 return StatusCode::FAILURE;
335 ATH_MSG_WARNING(
"The translation from the calibration ID with station: "
336 <<
id.stationNameString()<<
"("<<
id.stationName()<<
") "
337 <<
" eta:"<<
id.
eta()<<
" phi: "<<
id.
phi());
339 channel[
"station"] =
m_idHelperSvc->stationNameString(athenaId);
342 channel[
"ml"] = idHelper.
multilayer(athenaId);
343 channel[
"layer"] = idHelper.
tubeLayer(athenaId);
344 channel[
"tube"] = idHelper.
tube(athenaId);
347 const std::vector<double> dataPoints =
tokenizeDouble(payload,
",");
348 std::vector<double> radii{}, times{}, resos{};
349 radii.reserve(numPoints);
350 times.reserve(numPoints);
351 resos.reserve(numPoints);
355 for (
unsigned int k = 0 ; k < dataPoints.size(); ++k) {
356 const double value = dataPoints[k];
359 radii.push_back(value);
362 times.push_back(value);
365 resos.push_back(value);
372 if (radii.size() != numPoints ||
373 times.size() != numPoints ||
374 resos.size() != numPoints) {
375 ATH_MSG_FATAL(
"Payload "<<payload<<
" does not lead to the expected number of points "<<numPoints<<
" vs. "<<dataPoints.size());
376 return StatusCode::FAILURE;
378 channel[
"radii"] = std::move(radii);
379 channel[
"times"] = std::move(times);
380 channel[
"resolutions"] = std::move(resos);
381 json.push_back(channel);
382 return StatusCode::SUCCESS;
392 return StatusCode::FAILURE;
396 nlohmann::json rtCalibJson = nlohmann::json::array();
400 itr != readHandleRt->end(); ++itr) {
401 const coral::AttributeList &atr = itr->second;
403 if (atr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
407 return StatusCode::FAILURE;
411 data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
414 nlohmann::json yy = nlohmann::json::parse(
data);
415 for (
auto &it : yy.items()) {
416 nlohmann::json yx = it.value();
417 rtCalibJson.push_back(yx);
424 itr != readHandleRt->end(); ++itr) {
431 for (
const auto& payload : rtCalibJson) {
432 const bool rt_ts_applied = payload[
"appliedRT"];
434 const std::string
stName = payload[
"station"];
436 payload[
"ml"], payload[
"layer"], payload[
"tube"]);
439 if (!innerTubeRadius)
continue;
442 const std::vector<double> radii = payload[
"radii"];
443 const std::vector<double> times = payload[
"times"];
444 const std::vector<double> resolutions = payload[
"resolutions"];
457 std::vector<MuonCalib::SamplePoint> tr_points{}, ts_points{};
459 float multilayer_tmax_diff{-std::numeric_limits<float>::max()};
462 for (
unsigned int k = 0; k < radii.size(); ++k) {
463 float radius = radii[k];
465 float oldradius = radius;
467 float rshift =
m_rtShift * 1.87652e-2 * radius * (radius - *innerTubeRadius);
468 radius = oldradius +
rshift;
469 ATH_MSG_DEBUG(
"DEFORM RT: old radius " << oldradius <<
" new radius " << radius <<
" shift " <<
rshift
474 float oldradius = radius;
476 ATH_MSG_DEBUG(
"DEFORM RT: old radius " << oldradius <<
" new radius " << radius <<
" scale factor " <<
m_rtScale);
480 float time = times[k];
484 float sigma = resolutions[k];
488 if (tr_point.
x2() < -99) {
489 multilayer_tmax_diff = tr_point.
x1();
490 }
else if (tr_points.empty() || (tr_points.back().x1() < tr_point.
x1() && tr_points.back().x2() < tr_point.
x2())) {
491 tr_points.push_back(tr_point);
492 ts_points.push_back(ts_point);
497 if (ts_points.size() < 3) {
499 return StatusCode::FAILURE;
503 float sign(rt_ts_applied ? -1.0 : 1.0);
505 for (
auto & tr_point : tr_points) {
506 int slice_number =
static_cast<int>(std::floor(tr_point.
x2() / slice_width));
507 if (slice_number < 0) slice_number = 0;
516 if (
msgLvl(MSG::VERBOSE)) {
519 ATH_MSG_VERBOSE(point.x1() <<
"|" << point.x2() <<
"|" << point.error());
522 for (
unsigned int i = 0; i < reso->nPar(); i++) {
ATH_MSG_VERBOSE(i <<
" " << reso->par(i)); }
527 if (!reso || !rt) {
continue; }
529 if (rt->par(1) == 0.) {
533 return StatusCode::FAILURE;
536 if (multilayer_tmax_diff > -8e8) { rt->SetTmaxDiff(multilayer_tmax_diff); }
538 RtRelationPtr rt_rel = std::make_shared<MuonCalib::MdtRtRelation>(std::move(rt), std::move(reso));
540 if (!writeCdo.
storeData(athenaId ,rt_rel, msgStream()))
return StatusCode::FAILURE;
542 loadedRtRel[athenaId] = rt_rel;
547 if (loadedRtRel.empty()) {
548 return StatusCode::SUCCESS;
551 ATH_MSG_DEBUG(
"Initializing " << loadedRtRel.size()<<
" b-field functions");
556 if (readCondHandleDb->hasDCS()) {
557 condDbData = readCondHandleDb.
cptr();
559 ATH_MSG_INFO(
"Do not retrieve the HV from DCS. Fall back to 2730 & 3080");
564 for (
const auto& [athenaId, rtRelation] : loadedRtRel) {
565 CorrectionPtr corrFuncSet = std::make_unique<MuonCalib::MdtCorFuncSet>();
568 std::vector<double> corr_params(2);
569 bool loadDefault{
false};
574 if (corr_params[0] < std::numeric_limits<float>::epsilon()) {
578 }
else loadDefault =
true;
581 corr_params[0] = 2730.0;
583 corr_params[0] = 3080.0;
586 corr_params[1] = 0.11;
587 corrFuncSet->
setBField(std::make_unique<MuonCalib::BFieldCorFunc>(
"medium", corr_params, rtRelation->rt()));
592 if (!writeCdo.
storeData(athenaId, corrFuncSet, msgStream()))
return StatusCode::FAILURE;
595 return StatusCode::SUCCESS;
605 for (; it != it_end; ++it) {
616 if (!writeCdo.
storeData(*it, tubes, msgStream()))
return StatusCode::FAILURE;
622 unsigned int nlayers = tubes->
numLayers();
623 unsigned int ntubes = tubes->
numTubes();
624 int size = nml * nlayers * ntubes;
627 <<
" size " << size <<
" ml " << nml <<
" l " << nlayers <<
" t " << ntubes);
628 for (
unsigned int ml = 1; ml <= nml; ++ml) {
629 for (
unsigned int l = 1; l <= nlayers; ++l) {
630 for (
unsigned int t = 1; t <= ntubes; ++t) {
640 return StatusCode::SUCCESS;
646 if (attr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
650 return StatusCode::FAILURE;
654 data = *(
static_cast<const std::string *
>((attr[
"data"]).addressOfData()));
657 if (tokens.size() < 2) {
659 return StatusCode::FAILURE;
661 std::string&
header = tokens[0];
662 const std::string& payload = tokens[1];
669 int eta{0},
phi{0}, nTubes{0};
672 const std::vector<std::string> headerTokens =
tokenize(
header,
",");
675 nTubes =
atoi(headerTokens[5]);
681 static std::atomic<bool> idWarningPrinted =
false;
682 if (!idWarningPrinted) {
684 <<
" is invalid. Skipping");
685 idWarningPrinted.store(
true, std::memory_order_relaxed);
687 return StatusCode::SUCCESS;
689 nlohmann::json channel{};
691 channel[
"appliedT0"] = t0_ts_applied;
692 channel[
"station"] =
stName;
693 channel[
"eta"] =
eta;
694 channel[
"phi"] =
phi;
696 const std::vector<double> payLoadData =
tokenizeDouble(payload,
",");
697 std::vector<double> tzeros{}, meanAdcs{};
698 std::vector<int> statusCodes{};
701 for (
unsigned int k = 0; k < payLoadData.size(); ++k){
702 const double value = payLoadData[k];
705 tzeros.push_back(value);
708 statusCodes.push_back(value);
711 meanAdcs.push_back(value);
717 if (statusCodes.size() != tzeros.size() ||
718 statusCodes.size() != meanAdcs.size() ||
719 statusCodes.empty()) {
721 return StatusCode::FAILURE;
724 int ml{1}, layer{1}, tube{1};
728 const int tubesPerLay = std::max(idHelper.
tubeMax(chamID), idHelper.
tubeMax(secondMlID));
730 if (
m_checkTubes && (numMl * numLayers * tubesPerLay) != nTubes) {
731 ATH_MSG_FATAL(
"Calibration database differs in terms of number of tubes for chamber "
732 <<
m_idHelperSvc->toStringChamber(chamID)<<
". Expected "<<(numMl * numLayers * tubesPerLay)
733 <<
" vs. observed "<<nTubes);
734 return StatusCode::FAILURE;
736 nlohmann::json calibData = nlohmann::json::array();
737 for (
unsigned int k = 0; k < tzeros.size(); ++k) {
738 nlohmann::json channelData{};
739 channelData[
"ml"] = ml;
740 channelData[
"layer"] =layer;
741 channelData[
"tube"] = tube;
742 channelData[
"t0"] = tzeros[k];
743 channelData[
"meanAdc"] = meanAdcs[k];
744 channelData[
"status"] = statusCodes[k];
746 if (tube > tubesPerLay){
750 if (layer > numLayers){
754 calibData.push_back(std::move(channelData));
756 channel[
"calibConstants"] = std::move(calibData);
757 json.push_back(std::move(channel));
758 return StatusCode::SUCCESS;
767 nlohmann::json t0CalibJson = nlohmann::json::array();
770 itr != readHandleTube->end(); ++itr) {
771 const coral::AttributeList &atr = itr->second;
773 if (atr[
"data"].specification().
type() ==
typeid(coral::Blob)) {
777 return StatusCode::FAILURE;
781 data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
784 nlohmann::json yy = nlohmann::json::parse(
data);
785 for (
auto &it : yy.items()) {
786 nlohmann::json yx = it.value();
787 t0CalibJson.push_back(yx);
794 itr != readHandleTube->end(); ++itr) {
800 const float inversePropSpeed = 1. / (Gaudi::Units::c_light *
m_prop_beta);
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"];
816 static std::atomic<bool> idWarningPrinted =
false;
817 if (!idWarningPrinted) {
819 <<
" is not valid, skipping");
820 idWarningPrinted.store(
true, std::memory_order_relaxed);
834 if (!writeCdo.
storeData(chId, tubes, msgStream())) {
836 <<
" ID fields: "<<
stName<<
","<<ieta<<
","<<iphi);
837 return StatusCode::FAILURE;
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"];
851 CLHEP::HepRandomEngine *engine =
m_RNGWrapper->getEngine(ctx);
852 double sh = CLHEP::RandGaussZiggurat::shoot(engine, 0.,
m_t0Spread);
854 ATH_MSG_VERBOSE(
"T0 spread " <<
sh <<
" t0 " << tzero <<
" id " << ml <<
" " << l <<
" " << t);
859 const int statusCode = tubeChannel[
"status"];
860 const double meanAdc = tubeChannel[
"meanAdc"];
864 datatube.
adcCal = meanAdc;
866 tubes->
setCalib(std::move(datatube), tubeId, msgStream());
872 return StatusCode::SUCCESS;
879 std::vector<Double_t>
x(sample_points.size(),0);
880 std::vector<Double_t>
y(sample_points.size(),0);
882 for (
unsigned int i = 0; i < sample_points.size(); i++) {
883 x[i] = sample_points[i].x1();
884 y[i] = sample_points[i].x2();
886 TSpline3
sp(
"Rt Res Tmp",
x.data(),
y.data(), sample_points.size());
890 unsigned int nb_points(100);
891 std::vector<double> res_param(nb_points + 2);
892 Double_t bin_width = (
x[sample_points.size() - 1] -
x[0]) /
static_cast<Double_t
>(nb_points);
895 res_param[1] = bin_width;
896 for (
unsigned int k = 0; k < nb_points; k++) {
897 Double_t xx =
x[0] + k * bin_width;
898 res_param[k + 2] =
sp.Eval(xx);
899 if (std::isnan(res_param[k + 2])) {
900 TFile outf(
"kacke.root",
"RECREATE");
903 "encountered nan element");
906 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
Base class for conditions algorithms.
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.
StringProperty m_randomStream
Gaudi::Property< double > m_TsCorrectionT0
SG::ReadCondHandleKey< MdtCondDbData > m_readKeyDCS
StringProperty m_RTfileName
MdtCalibDbAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_checkTubes
only needed to retrieve information on number of tubes etc. (no alignment needed)
Gaudi::Property< bool > m_UseMLRt
Gaudi::Property< double > m_t0Shift
Gaudi::Property< double > m_prop_beta
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > m_writeKey
static std::unique_ptr< MuonCalib::RtResolutionLookUp > getRtResolutionInterpolation(const std::vector< MuonCalib::SamplePoint > &sample_points)
Gaudi::Property< double > m_rtShift
Gaudi::Property< double > m_rtScale
Gaudi::Property< bool > m_newFormat2020
virtual StatusCode initialize() override
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idToFixedIdTool
Gaudi::Property< bool > m_TimeSlewingCorrection
MuonCalib::MdtFullCalibData::RtRelationPtr RtRelationPtr
Gaudi::Property< bool > m_createSlewingFunction
StatusCode loadTube(const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
ServiceHandle< IAthRNGSvc > m_AthRNGSvc
StatusCode defaultT0s(MuonCalib::MdtCalibDataContainer &writeCdoTube) const
std::map< Identifier, RtRelationPtr > LoadedRtMap
const MuonGMR4::MuonDetectorManager * m_r4detMgr
Gaudi::Property< double > m_t0Spread
ATHRNG::RNGWrapper * m_RNGWrapper
Gaudi::Property< double > m_defaultT0
StatusCode declareDependency(const EventContext &ctx, SG::WriteCondHandle< MuonCalib::MdtCalibDataContainer > &writeHandle) const
std::optional< double > getInnerTubeRadius(const Identifier &id) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyRt
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode loadRt(const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
StatusCode defaultRt(MuonCalib::MdtCalibDataContainer &writeCdoRt, LoadedRtMap &loadedRts) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyTube
Gaudi::Property< bool > m_create_b_field_function
Gaudi::Property< bool > m_useNewGeo
const MuonGM::MuonDetectorManager * m_detMgr
Gaudi::Property< std::vector< float > > m_MeanCorrectionVsR
StatusCode legacyRtPayloadToJSON(const coral::AttributeList &attr, nlohmann::json &json) const
Parses the legacy payload for the RT functions to a json format.
StatusCode legacyTubePayloadToJSON(const coral::AttributeList &attr, nlohmann::json &json) const
virtual StatusCode execute(const EventContext &ctx) const override
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
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
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
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)