9#ifndef MDTCALIBDBCOOLSTRTOOL_MDTCALIBDBALG_H
10#define MDTCALIBDBCOOLSTRTOOL_MDTCALIBDBALG_H
16#include "CLHEP/Random/RandomEngine.h"
17#include "CoralBase/Blob.h"
30#include "nlohmann/json.hpp"
40 using AthCondAlgorithm::AthCondAlgorithm;
43 virtual StatusCode
execute(
const EventContext& ctx)
const override;
67 ToolHandle<MuonCalib::IIdToFixedIdTool>
m_idToFixedIdTool{
this,
"IdToFixedIdTool",
"MuonCalib::IdToFixedIdTool"};
73 "Switch between the legacy and the new geometry"};
77 Gaudi::Property<bool>
m_checkTubes{
this,
"checkTubes",
true,
"If true the number of tubes must agree between the conditions DB & geometry"};
79 Gaudi::Property<bool>
m_newFormat2020{
this,
"NewFormat2020",
false,
"Use the new calibration data format "};
84 "If set to true, the B-field correction functions are initialized for each rt-relation that is loaded."};
87 "If set to true, the slewing correction functions are initialized for each rt-relation that is loaded."};
99 Gaudi::Property<bool>
m_UseMLRt{
this,
"UseMLRt",
false,
"Enable use of ML-RTs from COOL"};
105 Gaudi::Property<double>
m_defaultT0{
this,
"defaultT0", 40.,
"default T0 value to be used in absence of DB information"};
106 Gaudi::Property<double>
m_t0Shift{
this,
"T0Shift", 0.,
"for simulation: common shift of all T0s, in ns"};
107 Gaudi::Property<double>
m_t0Spread{
this,
"T0Spread", 0.,
"for simulation: sigma for random smeraing of T0s, in ns"};
109 Gaudi::Property<double>
m_rtShift{
this,
"RTShift", 0.,
"for simulations: maximum RT distortion, in mm"};
110 Gaudi::Property<double>
m_rtScale{
this,
"RTScale", 1.,
"for simulations: a muliplicitive scale to the drift r"};
111 Gaudi::Property<double>
m_prop_beta{
this,
"PropagationSpeedBeta", 1.,
"Speed of the signal propagation"};
117 StringProperty
m_RTfileName{
this,
"RT_InputFile",
"MuonCondAlg/Muon_RT_default.data",
118 "single input ascii file for default RT to be applied in absence of DB information"};
120 static std::unique_ptr<MuonCalib::RtResolutionLookUp>
getRtResolutionInterpolation(
const std::vector<MuonCalib::SamplePoint>& sample_points);
125 "Conditions object containing the calibrations"};
Base class for conditions algorithms.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
A wrapper class for event-slot-local random engines.
Base class for conditions algorithms.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
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 ~MdtCalibDbAlg()=default
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
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
GeoModel::TransientConstSharedPtr< MdtRtRelation > RtRelationPtr