ATLAS Offline Software
SpacePointCalibrator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONSPACEPOINTCALIBRATOR_SPACEPOINTCALIBRATOR_H
5 #define MUONSPACEPOINTCALIBRATOR_SPACEPOINTCALIBRATOR_H
6 
8 
9 
15 
19 
20 #include "GaudiKernel/PhysicalConstants.h"
25 
26 
27 
28 namespace MuonR4{
29  /*** @brief Implementation of the space point calibrator interface */
30  class SpacePointCalibrator : public extends<AthAlgTool, ISpacePointCalibrator>,
32  public:
34  using base_class::base_class;
35 
36  StatusCode initialize() override final;
37 
38  CalibSpacePointPtr calibrate(const EventContext& ctx,
39  const SpacePoint* spacePoint,
40  const Amg::Vector3D& seedPosInChamb,
41  const Amg::Vector3D& seedDirInChamb,
42  const double timeDelay) const override final;
43 
44  CalibSpacePointPtr calibrate(const EventContext& ctx,
45  const CalibratedSpacePoint& spacePoint,
46  const Amg::Vector3D& seedPosInChamb,
47  const Amg::Vector3D& seedDirInChamb,
48  const double timeDelay) const override final;
49 
50 
51  CalibSpacePointVec calibrate(const EventContext& ctx,
52  const std::vector<const SpacePoint*>& spacePoints,
53  const Amg::Vector3D& seedPosInChamb,
54  const Amg::Vector3D& seedDirInChamb,
55  const double timeDelay) const override final;
56 
57  CalibSpacePointVec calibrate(const EventContext& ctx,
59  const Amg::Vector3D& seedPosInChamb,
60  const Amg::Vector3D& seedDirInChamb,
61  const double timeDelay) const override final;
62 
63  double driftVelocity(const EventContext& ctx,
64  const CalibratedSpacePoint& spacePoint) const override final;
65  double driftAcceleration(const EventContext& ctx,
66  const CalibratedSpacePoint& spacePoint) const override final;
67 
80  std::pair<double, double> calibrateMM(const EventContext& ctx, const ActsGeometryContext& gctx, const xAOD::MMCluster& cluster,
81  const Amg::Vector3D& globalPos, const Amg::Vector3D& globalDir) const;
82 
83 
84 
85 
100  std::pair<double, double> calibratesTGC(const EventContext& ctx, const ActsGeometryContext& gctx, const xAOD::sTgcStripCluster& cluster,
101  double posAlongTheStrip, const Amg::Vector3D& globalPos, const Amg::Vector3D& globalDir) const;
102 
103  void calibrateSourceLink(const Acts::GeometryContext& geoctx,
104  const Acts::CalibrationContext& cctx,
105  const Acts::SourceLink& link,
106  ActsTrk::MutableTrackContainer::TrackStateProxy state) const override final;
107  private:
109  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
110 
111  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
112 
113  ToolHandle<IMdtCalibrationTool> m_mdtCalibrationTool{this, "MdtCalibrationTool", ""};
114 
115  ToolHandle<Muon::INSWCalibTool> m_nswCalibTool{this, "NSWCalibTool", ""};
116 
117  ToolHandle<Muon::IMMClusterBuilderTool> m_clusterBuilderToolMM{this, "MMClusterBuilder", ""};
118 
120 
124  Gaudi::Property<double> m_muonPropSpeed{this, "PropagationSpeed", 1./ Gaudi::Units::c_light };
125 
127  Gaudi::Property<double> m_rpcSignalVelocity {this, "rpcSignalVelocity", 0.5 * Gaudi::Units::c_light,
128  "Propagation speed of the signal inside the rpc strip"};
129  /*** Resolution of the rpc time measurement */
130  Gaudi::Property<double> m_rpcTimeResolution{this, "rpcTimeResolution", 0.6 * Gaudi::Units::nanosecond,
131  "Estimated time resolution of the strip readout"};
132 
134  Gaudi::Property<bool> m_useRpcTime{this, "useRpcTime", false};
136  Gaudi::Property<bool> m_useTgcTime{this, "useTgcTime", false,
137  "Load the Tgc BC-ID on the track states for the fit"};
138  Gaudi::Property<bool> m_usesTgcTime{this, "usesTgcTime", false,
139  "Load the sTgc time on the track states for the fit"};
140  };
141 
142 }
143 #endif
xAOD::sTgcStripCluster_v1
Definition: sTgcStripCluster_v1.h:13
xAOD::MMCluster_v1
Definition: MMCluster_v1.h:20
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
ActsGeometryContext.h
IMdtCalibrationTool.h
INSWCalibTool.h
SpacePoint.h
sTgcStripCluster.h
ISpacePointCalibrator.h
python.SystemOfUnits.nanosecond
float nanosecond
Definition: SystemOfUnits.py:134
SG::ReadHandleKey< ActsGeometryContext >
MuonR4::SpacePointCalibrator::m_muonPropSpeed
Gaudi::Property< double > m_muonPropSpeed
Assumed propagation velocity of the muon through the detector.
Definition: SpacePointCalibrator.h:124
MuonR4::CalibSpacePointVec
ISpacePointCalibrator::CalibSpacePointVec CalibSpacePointVec
Definition: SpacePointCalibrator.cxx:38
MuonR4::SpacePointCalibrator::m_rpcSignalVelocity
Gaudi::Property< double > m_rpcSignalVelocity
How fast does an electron signal travel along an rpc strip
Definition: SpacePointCalibrator.h:127
MuonR4::SpacePointCalibrator::m_useRpcTime
Gaudi::Property< bool > m_useRpcTime
Load the Rpc time on the track states for the track fit.
Definition: SpacePointCalibrator.h:134
MuonR4::SpacePointCalibrator::m_useTgcTime
Gaudi::Property< bool > m_useTgcTime
Load the Tgc bunch crossing ID on the track states.
Definition: SpacePointCalibrator.h:136
CalibratedSpacePoint.h
MuonR4::SpacePointCalibrator::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: SpacePointCalibrator.h:111
MuonR4::SpacePointCalibrator::calibratesTGC
std::pair< double, double > calibratesTGC(const EventContext &ctx, const ActsGeometryContext &gctx, const xAOD::sTgcStripCluster &cluster, double posAlongTheStrip, const Amg::Vector3D &globalPos, const Amg::Vector3D &globalDir) const
Calibrates the position and covariance of an sTGC (small-strip Thin Gap Chamber) cluster.
Definition: SpacePointCalibrator.cxx:338
MuonR4::SpacePointCalibrator::m_nswCalibTool
ToolHandle< Muon::INSWCalibTool > m_nswCalibTool
Definition: SpacePointCalibrator.h:115
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
MuonDetectorManager.h
MuonR4::SpacePointCalibrator::calibrateSourceLink
void calibrateSourceLink(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, ActsTrk::MutableTrackContainer::TrackStateProxy state) const override final
Definition: SpacePointCalibrator.cxx:356
MeasurementCalibratorBase.h
MuonR4::SpacePointCalibrator::m_clusterBuilderToolMM
ToolHandle< Muon::IMMClusterBuilderTool > m_clusterBuilderToolMM
Definition: SpacePointCalibrator.h:117
MuonR4::SpacePointCalibrator::driftVelocity
double driftVelocity(const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const override final
Definition: SpacePointCalibrator.cxx:294
ActsTrk::detail::MeasurementCalibratorBase
Base class providing the boiler code to fill the Acts multi trajectory track states.
Definition: MeasurementCalibratorBase.h:24
F600IntegrationConfig.spacePoints
spacePoints
Definition: F600IntegrationConfig.py:122
MuonR4::SpacePointCalibrator::driftAcceleration
double driftAcceleration(const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const override final
Definition: SpacePointCalibrator.cxx:303
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:24
sTgcMeasurement.h
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:73
MuonR4::SpacePointCalibrator::m_usesTgcTime
Gaudi::Property< bool > m_usesTgcTime
Definition: SpacePointCalibrator.h:138
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::SpacePointCalibrator::m_mdtCalibrationTool
ToolHandle< IMdtCalibrationTool > m_mdtCalibrationTool
Definition: SpacePointCalibrator.h:113
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::SpacePointCalibrator
Definition: SpacePointCalibrator.h:31
MuonR4::SpacePointCalibrator::calibrate
CalibSpacePointPtr calibrate(const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
Definition: SpacePointCalibrator.cxx:80
MuonR4::CalibSpacePointPtr
ISpacePointCalibrator::CalibSpacePointPtr CalibSpacePointPtr
Definition: SpacePointCalibrator.cxx:39
MuonR4::SpacePointCalibrator::m_rpcTimeResolution
Gaudi::Property< double > m_rpcTimeResolution
Definition: SpacePointCalibrator.h:130
MuonR4::CalibratedSpacePoint
The calibrated Space point is created during the calibration process.
Definition: CalibratedSpacePoint.h:14
MuonR4::SpacePointCalibrator::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
access to the ACTS geometry context
Definition: SpacePointCalibrator.h:109
MuonR4::SpacePointCalibrator::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: SpacePointCalibrator.h:119
IMMClusterBuilderTool.h
IMuonIdHelperSvc.h
MuonR4::SpacePointCalibrator::calibrateMM
std::pair< double, double > calibrateMM(const EventContext &ctx, const ActsGeometryContext &gctx, const xAOD::MMCluster &cluster, const Amg::Vector3D &globalPos, const Amg::Vector3D &globalDir) const
Calibrates the position and covariance of a MicroMegas (MM) cluster.
Definition: SpacePointCalibrator.cxx:314
MuonR4::SpacePointCalibrator::initialize
StatusCode initialize() override final
Definition: SpacePointCalibrator.cxx:43
ServiceHandle< Muon::IMuonIdHelperSvc >