ATLAS Offline Software
MdtAnalyticRtCalibAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #ifndef MUONCALIBR4_MDTANALYTICCALIBALG_H
10 #define MUONCALIBR4_MDTANALYTICCALIBALG_H
11 
13 
17 
18 
21 #include "Acts/Utilities/Helpers.hpp"
22 
23 namespace MuonCalib{
24  class SamplePoint;
25 }
26 namespace MuonCalibR4{
28  public:
29  using AthReentrantAlgorithm::AthReentrantAlgorithm;
30  virtual ~MdtAnalyticRtCalibAlg() = default;
31 
32  virtual StatusCode initialize() override final;
33  virtual StatusCode execute(const EventContext& ctx) const override final;
34 
35  enum class PolyType{
36  ChebyChev,
37  Legendre,
38  Simple
39  };
41 
42  private:
43 
44  void drawRt(const EventContext& ctx,
45  const Identifier& detId,
46  const std::vector<MuonCalib::SamplePoint>& rtPoints,
47  const MuonCalib::MdtRtRelation& inRel) const;
48 
49  void drawResoFunc(const EventContext& ctx,
50  const Identifier& detId,
51  const std::vector<MuonCalib::SamplePoint>& resoPoints,
52  const MuonCalib::IRtResolution& inReso) const;
53 
59  RtRelationPtr translateRt(const EventContext& ctx,
60  const Identifier& detId,
61  const MuonCalib::MdtRtRelation& inRel) const;
62 
63 
64  std::vector<Identifier> tubeIds(const Identifier& chId) const;
65 
66  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
68  ServiceHandle<MuonValR4::IRootVisualizationService> m_visualSvc{this, "VisualSvc", "MuonValR4::RootVisualizationService"};
71 
72  SG::ReadCondHandleKey<MuonCalib::MdtCalibDataContainer> m_readKey{this, "ReadKey", "MdtCalibConstantsR4"};
74  "Conditions object containing the calibrations"};
75 
77  Gaudi::Property<unsigned> m_maxOrder{this, "maxOrder", 12};
79  Gaudi::Property<int> m_polyTypeRt{this, "PolyTypeRt", Acts::toUnderlying(PolyType::ChebyChev)};
81  Gaudi::Property<int> m_polyTypeTr{this, "PolyTypeTr", Acts::toUnderlying(PolyType::Legendre)};
83  Gaudi::Property<bool> m_fitRtReso{this, "FitRtReso", true};
85  Gaudi::Property<double> m_relUncReso{this, "RelUncertOnReso", 0.01};
87  Gaudi::Property<unsigned> m_maxOrderReso{this, "maxOrderReso", 25};
89  Gaudi::Property<float> m_chiCutOff{this,"chi2CutOff", 0.05};
90 
92  Gaudi::Property<bool> m_saveDiagnostic{this, "saveDiagnosticHist", true};
94  Gaudi::Property<std::string> m_outStream{this, "OutStream", "MDTANALYTICRTS"};
96  Gaudi::Property<unsigned> m_precCutOff{this,"precCutOff", 6};
98  Gaudi::Property<bool> m_fillMissingCh{this, "fillMissingCh", true};
100  Gaudi::Property<float> m_missingT0{this, "missingT0", 5.4597301};
101  };
102 }
103 
104 
105 
106 #endif
GeoModel::TransientConstSharedPtr< MdtRtRelation >
MuonCalibR4::MdtAnalyticRtCalibAlg::PolyType::ChebyChev
@ ChebyChev
MuonCalibR4::MdtAnalyticRtCalibAlg::m_polyTypeTr
Gaudi::Property< int > m_polyTypeTr
Toggle the polynomial for the Rt-relation: ChebyChev or Legendre.
Definition: MdtAnalyticRtCalibAlg.h:81
MuonCalibR4::MdtAnalyticRtCalibAlg::m_maxOrderReso
Gaudi::Property< unsigned > m_maxOrderReso
Maximal order to use for the resolution
Definition: MdtAnalyticRtCalibAlg.h:87
MuonCalibR4::MdtAnalyticRtCalibAlg::m_saveDiagnostic
Gaudi::Property< bool > m_saveDiagnostic
Save diagnostic histograms.
Definition: MdtAnalyticRtCalibAlg.h:92
MuonCalibR4::MdtAnalyticRtCalibAlg::m_fillMissingCh
Gaudi::Property< bool > m_fillMissingCh
At the end of the translation, it's checked whether all channels have been assigned.
Definition: MdtAnalyticRtCalibAlg.h:98
MuonCalibR4::MdtAnalyticRtCalibAlg::translateRt
RtRelationPtr translateRt(const EventContext &ctx, const Identifier &detId, const MuonCalib::MdtRtRelation &inRel) const
Translates the rt / tr & resolution relation from a look-up table into the requested polynomial type.
Definition: MdtAnalyticRtCalibAlg.cxx:147
MdtCalibDataContainer.h
MuonCalibR4::MdtAnalyticRtCalibAlg::PolyType::Legendre
@ Legendre
WriteCondHandleKey.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonCalibR4::MdtAnalyticRtCalibAlg::initialize
virtual StatusCode initialize() override final
Definition: MdtAnalyticRtCalibAlg.cxx:27
MuonCalib::MdtRtRelation
class which holds calibration constants per rt-region
Definition: MdtRtRelation.h:19
MuonCalibR4::MdtAnalyticRtCalibAlg::m_visualSvc
ServiceHandle< MuonValR4::IRootVisualizationService > m_visualSvc
Service handle of the visualization service.
Definition: MdtAnalyticRtCalibAlg.h:68
MuonValR4::IRootVisualizationService::ClientToken
Token class to identify a particular visualization client.
Definition: IRootVisualizationService.h:36
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
MuonCalibR4::MdtAnalyticRtCalibAlg::m_relUncReso
Gaudi::Property< double > m_relUncReso
Assignment of the relative uncertainty on each resolution data point.
Definition: MdtAnalyticRtCalibAlg.h:85
MuonCalibR4::MdtAnalyticRtCalibAlg::m_precCutOff
Gaudi::Property< unsigned > m_precCutOff
Precision cut-off to treat two incoming rt-relations as equivalent.
Definition: MdtAnalyticRtCalibAlg.h:96
MuonCalibR4::MdtAnalyticRtCalibAlg::m_writeKey
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > m_writeKey
Definition: MdtAnalyticRtCalibAlg.h:73
MuonCalibR4::MdtAnalyticRtCalibAlg::m_maxOrder
Gaudi::Property< unsigned > m_maxOrder
Maximum order of the polynomial in use.
Definition: MdtAnalyticRtCalibAlg.h:77
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalibR4::MdtAnalyticRtCalibAlg::m_readKey
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > m_readKey
Definition: MdtAnalyticRtCalibAlg.h:72
MuonCalibR4::MdtAnalyticRtCalibAlg::m_outStream
Gaudi::Property< std::string > m_outStream
StreamName of the diagnostic histograms.
Definition: MdtAnalyticRtCalibAlg.h:94
MuonCalibR4
Definition: MdtAnalyticRtCalibAlg.cxx:25
MuonCalibR4::MdtAnalyticRtCalibAlg::tubeIds
std::vector< Identifier > tubeIds(const Identifier &chId) const
Definition: MdtAnalyticRtCalibAlg.cxx:132
ReadCondHandleKey.h
AthReentrantAlgorithm.h
MuonCalibR4::MdtAnalyticRtCalibAlg::drawRt
void drawRt(const EventContext &ctx, const Identifier &detId, const std::vector< MuonCalib::SamplePoint > &rtPoints, const MuonCalib::MdtRtRelation &inRel) const
Definition: MdtAnalyticRtCalibAlg.cxx:244
MuonCalibR4::MdtAnalyticRtCalibAlg::m_missingT0
Gaudi::Property< float > m_missingT0
Default t0 constant to use, in case there's
Definition: MdtAnalyticRtCalibAlg.h:100
MuonCalibR4::MdtAnalyticRtCalibAlg::m_clientToken
MuonValR4::IRootVisualizationService::ClientToken m_clientToken
Token to be presented to the visualization service
Definition: MdtAnalyticRtCalibAlg.h:70
IRootVisualizationService.h
MuonCalib::IRtResolution
Generic interface to retrieve the resolution on the drift radius as a function of the drift time.
Definition: IRtResolution.h:20
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer >
MuonCalib::MdtFullCalibData::RtRelationPtr
GeoModel::TransientConstSharedPtr< MdtRtRelation > RtRelationPtr
Definition: MdtFullCalibData.h:17
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer >
MuonCalibR4::MdtAnalyticRtCalibAlg
Definition: MdtAnalyticRtCalibAlg.h:27
MuonCalibR4::MdtAnalyticRtCalibAlg::m_chiCutOff
Gaudi::Property< float > m_chiCutOff
Stop incrementing the order once the chi2CutOff is reached
Definition: MdtAnalyticRtCalibAlg.h:89
MuonCalibR4::MdtAnalyticRtCalibAlg::~MdtAnalyticRtCalibAlg
virtual ~MdtAnalyticRtCalibAlg()=default
MuonCalibR4::MdtAnalyticRtCalibAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtAnalyticRtCalibAlg.h:66
MuonCalibR4::MdtAnalyticRtCalibAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: MdtAnalyticRtCalibAlg.cxx:39
MuonCalibR4::MdtAnalyticRtCalibAlg::PolyType
PolyType
Definition: MdtAnalyticRtCalibAlg.h:35
MuonCalibR4::MdtAnalyticRtCalibAlg::drawResoFunc
void drawResoFunc(const EventContext &ctx, const Identifier &detId, const std::vector< MuonCalib::SamplePoint > &resoPoints, const MuonCalib::IRtResolution &inReso) const
Definition: MdtAnalyticRtCalibAlg.cxx:306
IMuonIdHelperSvc.h
MuonCalibR4::MdtAnalyticRtCalibAlg::m_fitRtReso
Gaudi::Property< bool > m_fitRtReso
Toggle whether the resolution shall be also converted into a polynomial.
Definition: MdtAnalyticRtCalibAlg.h:83
MuonCalibR4::MdtAnalyticRtCalibAlg::m_polyTypeRt
Gaudi::Property< int > m_polyTypeRt
Toggle the polynomial for the Rt-relation: ChebyChev or Legendre.
Definition: MdtAnalyticRtCalibAlg.h:79
ServiceHandle< Muon::IMuonIdHelperSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14