ATLAS Offline Software
Loading...
Searching...
No Matches
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"
23
26
27
28namespace 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 Acts::CalibrationContext& ctx,
58 const Amg::Vector3D& seedPosInChamb,
59 const Amg::Vector3D& seedDirInChamb,
60 const double timeDelay,
61 const CalibSpacePointVec& spacePoints) const override final;
62
63 void updateSigns(const Amg::Vector3D& trackPos,
64 const Amg::Vector3D& trackDir,
65 CalibSpacePointVec& hitsToCalib) const override final;
66
67 double driftVelocity(const Acts::CalibrationContext& ctx,
68 const CalibratedSpacePoint& spacePoint) const override final;
69
70 double driftAcceleration(const Acts::CalibrationContext& ctx,
71 const CalibratedSpacePoint& spacePoint) const override final;
72
73 void calibrateSourceLink(const Acts::GeometryContext& geoctx,
74 const Acts::CalibrationContext& cctx,
75 const Acts::SourceLink& link,
76 ActsTrk::MutableTrackContainer::TrackStateProxy state) const override final;
77
78 void stampSignsOnMeasurements(const xAOD::MuonSegment& segment) const override final;
79 private:
87 void calibrateCombinedPrd(const EventContext& ctx,
88 const ActsTrk::GeometryContext& gctx,
89 const xAOD::CombinedMuonStrip* combinedPrd,
90 ActsTrk::MutableTrackContainer::TrackStateProxy state) const;
100 std::pair<double, double> calibrateMM(const EventContext& ctx,
101 const ActsTrk::GeometryContext& gctx,
102 const xAOD::MMCluster& cluster,
103 const Amg::Vector3D& globalPos,
104 const Amg::Vector3D& globalDir) const;
116 std::pair<double, double> calibratesTGC(const EventContext& ctx,
117 const ActsTrk::GeometryContext& gctx,
118 const xAOD::sTgcStripCluster& cluster,
119 std::optional<double> posAlongTheStrip,
120 const Amg::Vector3D& globalPos,
121 const Amg::Vector3D& globalDir) const;
122
124 SG::ReadHandleKey<ActsTrk::GeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
125
126 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
127
128 ToolHandle<IMdtCalibrationTool> m_mdtCalibrationTool{this, "MdtCalibrationTool", ""};
129
130 ToolHandle<Muon::INSWCalibTool> m_nswCalibTool{this, "NSWCalibTool", ""};
131
132 ToolHandle<Muon::IMMClusterBuilderTool> m_clusterBuilderToolMM{this, "MMClusterBuilder", ""};
133
135
139 Gaudi::Property<double> m_muonPropSpeed{this, "PropagationSpeed", 1./ Gaudi::Units::c_light };
140
142 Gaudi::Property<double> m_rpcSignalVelocity {this, "rpcSignalVelocity", 0.5 * Gaudi::Units::c_light,
143 "Propagation speed of the signal inside the rpc strip"};
144 /*** Resolution of the rpc time measurement */
145 Gaudi::Property<double> m_rpcTimeResolution{this, "rpcTimeResolution", 0.6 * Gaudi::Units::nanosecond,
146 "Estimated time resolution of the strip readout"};
147
149 Gaudi::Property<bool> m_useRpcTime{this, "useRpcTime", false};
151 Gaudi::Property<bool> m_useTgcTime{this, "useTgcTime", false,
152 "Load the Tgc BC-ID on the track states for the fit"};
153 Gaudi::Property<bool> m_usesTgcTime{this, "usesTgcTime", false,
154 "Load the sTgc time on the track states for the fit"};
155 Gaudi::Property<bool> m_MdtSignFromSegment{this, "useSegmentSigns", true,
156 "Mdt drift signs are copied from the segment line instead from the track state"};
157 };
158
159}
160#endif
Base class providing the boiler code to fill the Acts multi trajectory track states.
The calibrated Space point is created during the calibration process.
Gaudi::Property< bool > m_useRpcTime
Load the Rpc time on the track states for the track fit.
void calibrateCombinedPrd(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const xAOD::CombinedMuonStrip *combinedPrd, ActsTrk::MutableTrackContainer::TrackStateProxy state) const
Calibrates the track states from a combined muon strip.
ToolHandle< Muon::IMMClusterBuilderTool > m_clusterBuilderToolMM
void calibrateSourceLink(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, ActsTrk::MutableTrackContainer::TrackStateProxy state) const override final
ToolHandle< Muon::INSWCalibTool > m_nswCalibTool
std::pair< double, double > calibratesTGC(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const xAOD::sTgcStripCluster &cluster, std::optional< 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.
double driftVelocity(const Acts::CalibrationContext &ctx, const CalibratedSpacePoint &spacePoint) const override final
ToolHandle< IMdtCalibrationTool > m_mdtCalibrationTool
CalibSpacePointPtr calibrate(const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
Gaudi::Property< double > m_rpcSignalVelocity
How fast does an electron signal travel along an rpc strip.
void updateSigns(const Amg::Vector3D &trackPos, const Amg::Vector3D &trackDir, CalibSpacePointVec &hitsToCalib) const override final
StatusCode initialize() override final
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
const MuonGMR4::MuonDetectorManager * m_detMgr
Gaudi::Property< bool > m_MdtSignFromSegment
Gaudi::Property< bool > m_useTgcTime
Load the Tgc bunch crossing ID on the track states.
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
access to the ACTS geometry context
Gaudi::Property< double > m_muonPropSpeed
Assumed propagation velocity of the muon through the detector.
Gaudi::Property< bool > m_usesTgcTime
double driftAcceleration(const Acts::CalibrationContext &ctx, const CalibratedSpacePoint &spacePoint) const override final
Gaudi::Property< double > m_rpcTimeResolution
std::pair< double, double > calibrateMM(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const xAOD::MMCluster &cluster, const Amg::Vector3D &globalPos, const Amg::Vector3D &globalDir) const
Calibrates the position and covariance of a MicroMegas (MM) cluster.
void stampSignsOnMeasurements(const xAOD::MuonSegment &segment) const override final
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Property holding a SG store/key/clid from which a ReadHandle is made.
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
ISpacePointCalibrator::CalibSpacePointVec CalibSpacePointVec
ISpacePointCalibrator::CalibSpacePointPtr CalibSpacePointPtr
sTgcStripCluster_v1 sTgcStripCluster
MMCluster_v1 MMCluster
MuonSegment_v1 MuonSegment
Reference the current persistent version:
CombinedMuonStrip_v1 CombinedMuonStrip