9#ifndef MUONCALIBR4_MDTCALIBDBALGR4_H
10#define MUONCALIBR4_MDTCALIBDBALGR4_H
22#include <nlohmann/json.hpp>
31 using AthReentrantAlgorithm::AthReentrantAlgorithm;
35 virtual StatusCode
execute(
const EventContext& ctx)
const override;
59 const std::vector<double>& pars)
const;
64 const std::vector<double>& pars)
const;
70 const std::vector<double>& pars,
87 "Conditions object containing the calibrations"};
90 Gaudi::Property<std::string>
m_rtJSON{
this,
"RtJSON",
""};
91 Gaudi::Property<std::string>
m_t0JSON{
this,
"TubeT0JSON",
""};
94 "Path to an external root file to read the Rt relation from"};
96 "Path to an external root file to read the T0 constants from"};
98 Gaudi::Property<std::string>
m_rtTreeName{
this,
"RtTreeName",
"RtCalibConstants"};
99 Gaudi::Property<std::string>
m_t0TreeName{
this,
"T0TreeName",
"T0CalibConstants"};
103 Gaudi::Property<std::string>
m_dbPayloadType {
this,
"dbPayloadType",
"TTree",
"specify the format of the payload in the database. Can be TTree or JSON"};
105 Gaudi::Property<double>
m_prop_beta{
this,
"PropagationSpeedBeta", 1.,
"Speed of the signal propagation"};
110 "If set to true, the B-field correction functions are initialized for each rt-relation that is loaded."};
113 "If set to true, the slewing correction functions are initialized for each rt-relation that is loaded."};
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
An algorithm that can be simultaneously executed in multiple threads.
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
virtual bool isReEntrant() const override
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