9#ifndef MUONCALIBR4_MDTCALIBDBALGR4_H
10#define MUONCALIBR4_MDTCALIBDBALGR4_H
22#include <nlohmann/json.hpp>
31 using AthCondAlgorithm::AthCondAlgorithm;
35 virtual StatusCode
execute(
const EventContext& ctx)
const override;
58 const std::vector<double>& pars)
const;
63 const std::vector<double>& pars)
const;
69 const std::vector<double>& pars,
86 "Conditions object containing the calibrations"};
89 Gaudi::Property<std::string>
m_rtJSON{
this,
"RtJSON",
""};
90 Gaudi::Property<std::string>
m_t0JSON{
this,
"TubeT0JSON",
""};
93 "Path to an external root file to read the Rt relation from"};
95 "Path to an external root file to read the T0 constants from"};
97 Gaudi::Property<std::string>
m_rtTreeName{
this,
"RtTreeName",
"RtCalibConstants"};
98 Gaudi::Property<std::string>
m_t0TreeName{
this,
"T0TreeName",
"T0CalibConstants"};
102 Gaudi::Property<std::string>
m_dbPayloadType {
this,
"dbPayloadType",
"TTree",
"specify the format of the payload in the database. Can be TTree or JSON"};
104 Gaudi::Property<double>
m_prop_beta{
this,
"PropagationSpeedBeta", 1.,
"Speed of the signal propagation"};
109 "If set to true, the B-field correction functions are initialized for each rt-relation that is loaded."};
112 "If set to true, the slewing correction functions are initialized for each rt-relation that is loaded."};
Base class for conditions algorithms.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Base class for conditions algorithms.
StatusCode parseRtPayload(const nlohmann::json &rtBlob, MuonCalib::MdtCalibDataContainer &outContainer) const
MuonCalib::IRtRelationPtr makeRt(const std::string &rtType, const std::vector< double > &pars) const
Creates a new rt function from the typeName & the list of parameters.
Gaudi::Property< std::string > m_dbPayloadType
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode parseT0Payload(const nlohmann::json &t0Blob, MuonCalib::MdtCalibDataContainer &outContainer) const
Trnaslates a t0 - JSON payload into transient memory.
Gaudi::Property< std::string > m_rtRootFile
MuonCalib::MdtCalibDataContainer::RtRelationPtr RtRelationPtr
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyTube
Gaudi::Property< std::string > m_t0TreeName
Gaudi::Property< unsigned > m_t0CalibPrec
Precision cut off to treat 2 t0 constants as equivalent.
virtual StatusCode initialize() override
Gaudi::Property< bool > m_create_b_field_function
MuonCalib::MdtCalibDataContainer::TubeContainerPtr TubeContainerPtr
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > m_writeKey
MuonCalib::IRtResolutionPtr makeReso(const std::string &resoType, const std::vector< double > &pars, MuonCalib::IRtRelationPtr rt) const
Creates a new resoltuion function from the typeName & the list of parameters.
Gaudi::Property< bool > m_createSlewingFunction
Gaudi::Property< std::string > m_rtJSON
External Rt & T0 JSON files.
Gaudi::Property< std::string > m_rtTreeName
MuonCalib::ITrRelationPtr makeTr(const std::string &trType, const std::vector< double > &pars) const
Creates a new tr function from the typeName & the list of parameters.
virtual ~MdtCalibDbAlg()=default
Gaudi::Property< double > m_prop_beta
Gaudi::Property< std::string > m_t0RootFile
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyRt
MuonCalib::MdtCalibDataContainer::CorrectionPtr CorrectionPtr
Gaudi::Property< std::string > m_t0JSON
virtual StatusCode execute(const EventContext &ctx) const override
MdtFullCalibData::TubeContainerPtr TubeContainerPtr
MdtFullCalibData::CorrectionPtr CorrectionPtr
MdtFullCalibData::RtRelationPtr RtRelationPtr
GeoModel::TransientConstSharedPtr< IRtRelation > IRtRelationPtr
GeoModel::TransientConstSharedPtr< ITrRelation > ITrRelationPtr
GeoModel::TransientConstSharedPtr< IRtResolution > IRtResolutionPtr