ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCalibInput.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 MDTCALIBINTEFACES_MDTCALIBINPUT_H
5#define MDTCALIBINTEFACES_MDTCALIBINPUT_H
6
8
9#include <GaudiKernel/PhysicalConstants.h>
11#include <Identifier/Identifier.h>
13#include <variant>
15namespace MuonGM{
18}
19namespace MuonGMR4{
22}
23namespace Muon{
24 class MdtPrepData;
25}
26
27namespace Trk {
29}
30
31namespace ActsTrk {
32 class GeometryContext;
33}
34class MdtDigit;
35
37 public:
45 MdtCalibInput(const Identifier& id,
46 const int16_t adc,
47 const int16_t tdc,
48 const MuonGMR4::MdtReadoutElement* reEle,
49 const ActsTrk::GeometryContext& gctx);
50
57 MdtCalibInput(const Identifier& id,
58 const int16_t adc,
59 const int16_t tdc,
60 const MuonGM::MdtReadoutElement* reEle);
61
66 MdtCalibInput(const MdtDigit& digit,
67 const MuonGM::MuonDetectorManager& detMgr);
68
73 MdtCalibInput(const MdtDigit& digit,
75 const ActsTrk::GeometryContext& gctx);
82 const ActsTrk::GeometryContext& gctx);
83
84
85 MdtCalibInput(MdtCalibInput&& other) = default;
87
90 const Identifier& identify() const;
92 int16_t tdc() const;
94 int16_t adc() const;
99
101 const Amg::Vector3D& closestApproach() const;
103 void setClosestApproach(const Amg::Vector3D& approach);
104
106 const Amg::Vector3D& trackDirection() const;
110 void setTrackDirection(const Amg::Vector3D& trackDir,
111 bool hasPhi);
113 bool trackDirHasPhi() const;
114
116 double timeOfFlight() const;
118 void setTimeOfFlight(const double toF);
119
121 double triggerTime() const;
123 void setTriggerTime(const double trigTime);
125 double distanceToTrack() const;
126 enum class BFieldComp{
129 };
130
132 Amg::Vector2D projectMagneticField(const Amg::Vector3D& fieldInGlob) const;
134 double signalPropagationDistance() const;
137
139 const Amg::Vector3D& surfaceCenter() const;
141 double tubeLength() const;
143 double readOutSide() const;
145 double innerTubeR() const;
146 private:
148 const Amg::Transform3D& localToGlobal() const;
150 Amg::Vector3D center() const;
154 int16_t m_adc{0};
156 int16_t m_tdc{0};
157
161 using ReadoutEle_t = std::variant<const MuonGM::MdtReadoutElement*, const MuonGMR4::MdtReadoutElement*>;
169 Amg::Vector3D m_trackDir{Amg::Vector3D::Zero()};
171 bool m_trackHasPhi{false};
173 static constexpr double s_inverseSpeed{1. / Gaudi::Units::c_light};
174 double m_ToF{center().mag() * s_inverseSpeed};
176 double m_trigTime{0.};
178 double m_distToTrack{0.};
179
180};
181
182std::ostream& operator<<(std::ostream& ostr, const MdtCalibInput& input);
183
184
185#endif
std::ostream & operator<<(std::ostream &ostr, const MdtCalibInput &input)
This is a "hash" representation of an Identifier.
const MuonGM::MdtReadoutElement * legacyDescriptor() const
Returns the legacy readout element.
MdtCalibInput & operator=(MdtCalibInput &&other)=default
std::variant< const MuonGM::MdtReadoutElement *, const MuonGMR4::MdtReadoutElement * > ReadoutEle_t
Variant type to store the legacy & Phase-II style readout geometry in a single variable.
void setClosestApproach(const Amg::Vector3D &approach)
Sets the closest approach.
double timeOfFlight() const
Returns the time of flight.
int16_t tdc() const
Returns the tdc counts of the hit.
MdtCalibInput(const Identifier &id, const int16_t adc, const int16_t tdc, const MuonGMR4::MdtReadoutElement *reEle, const ActsTrk::GeometryContext &gctx)
Minimal constructor in the PhaseII geomerty setup.
bool trackDirHasPhi() const
Returns whether the track has a phi constaint or not.
double m_trigTime
Trigger time.
static constexpr double s_inverseSpeed
Time of flight.
const Amg::Vector3D & surfaceCenter() const
Returns the center of the associated surface.
void setTimeOfFlight(const double toF)
Sets the time of flight (Usually globPos.mag() * inverseSpeed of light)
double distanceToTrack() const
Returns the distance to track (signed)
double triggerTime() const
Returns the trigger offset time.
double signalPropagationDistance() const
Calculates the distance that the signal has to travel along the wire.
Identifier m_id
Tube identifier.
int16_t m_tdc
Tdc counts of the hit.
Amg::Vector3D center() const
Translational part of the local -> global transform.
const ActsTrk::GeometryContext * m_gctx
Geometry context, needed to fetch the alignment.
Amg::Vector3D m_approach
Point of closest approach of the track.
double readOutSide() const
Returns the sign of the readout position in local coordinates.
const MuonGMR4::MdtReadoutElement * decriptor() const
Returns the R4 readout element.
void setTrackDirection(const Amg::Vector3D &trackDir, bool hasPhi)
Sets the direction of the externally determined track.
IdentifierHash m_hash
Measurement hash of the Identifier (needed for Phase II)
int16_t adc() const
Returns the amount of accumulated charge.
void setTriggerTime(const double trigTime)
Sets the trigger offset time.
const Amg::Vector3D & closestApproach() const
Returns the point of closest approach to the wire.
Amg::Vector3D m_trackDir
Global track direction.
const Identifier & identify() const
Returns the Identifier of the hit.
ReadoutEle_t m_RE
Pointer to the associated readout element.
int16_t m_adc
Adc counts of the hit.
double tubeLength() const
Returns the tube length.
double innerTubeR() const
Returns the inner tube radius.
Amg::Vector2D projectMagneticField(const Amg::Vector3D &fieldInGlob) const
Splits the B-field into the components that point along the transverse track direction & along the tu...
bool m_trackHasPhi
Does the track direction contain a phi constraint.
const Trk::StraightLineSurface & legacySurface() const
Returns the assocaited ideal surface (Throw exception if no legacy RE is available)
const Amg::Vector3D & trackDirection() const
Returns the track direction (Can be zero)
double m_distToTrack
Distance to track (signed)
const Amg::Transform3D & localToGlobal() const
Local to global transformation of the tube.
MdtCalibInput(MdtCalibInput &&other)=default
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Class to represent measurements from the Monitored Drift Tubes.
Definition MdtPrepData.h:33
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
MdtDriftCircle_v1 MdtDriftCircle