ATLAS Offline Software
Loading...
Searching...
No Matches
MdtDriftCircleOnTrack.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONRIO_ONTRACK_MDTDRIFTCIRCLEONTRACK_H
5#define MUONRIO_ONTRACK_MDTDRIFTCIRCLEONTRACK_H
6
7// Base classes
10
11
14
16#include "AthLinks/ElementLink.h"
19
20
21#include <cassert>
22
24
25namespace Trk{
26 class LocalParameters;
27 class ITrkEventCnvTool;
28}
29
30namespace Muon
31{
32 class MuonEventCnvTool;
34
38public:
39
43
46
49
52
53
54
77 Trk::LocalParameters&& locPos,
78 Amg::MatrixX&& errDriftRadius,
79 const double driftTime,
81 const Amg::Vector3D& globDir,
82 const double positionAlongWire,
84
107 Trk::LocalParameters&& locPos,
108 Amg::MatrixX&& errDriftRadius,
109 const double driftTime,
111 const double positionAlongWire,
113
114
115 // Alternate constructor that doesn't dereference the RIO link.
117 Trk::LocalParameters&& locPos,
118 Amg::MatrixX&& errDriftRadius,
119 const Identifier& id,
120 const MuonGM::MdtReadoutElement* detEl,
121 const double driftTime,
123 const double positionAlongWire,
124 const double localAngle,
126
128 virtual ~MdtDriftCircleOnTrack() = default;
129
132
137
139 virtual MdtDriftCircleOnTrack* clone() const override final;
140
142 virtual const MdtPrepData* prepRawData() const override final;
144
147
149 virtual IdentifierHash idDE() const override final{ return IdentifierHash(); }
150
152 virtual const MuonGM::MdtReadoutElement* detectorElement() const override final;
153
158 virtual const Trk::StraightLineSurface& associatedSurface() const override final;
159
164 virtual const Amg::Vector3D& globalPosition() const override final;
165
166 virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final {
168 }
169
176 double driftRadius() const;
177
182 double driftTime() const;
183
185 double positionAlongWire() const;
186
188 double localAngle() const;
189
192
194 virtual MsgStream& dump( MsgStream& stream) const override final;
195
197 virtual std::ostream& dump( std::ostream& stream) const override final;
198
199 // /////////////////////////////////////////////////////////////////
200 // Private data:
201 // /////////////////////////////////////////////////////////////////
202private:
205 virtual void setLocalParameters( const Trk::LocalParameters& locPos);
206
209 virtual void setValues(const Trk::TrkDetElementBase*,
210 const Trk::PrepRawData*) override final;
211
214 void setGlobalPosition(Amg::Vector3D&& loc3Dframe) const;
215
216 //Sets the error strategy, only used by the Muon::MdtDriftCircleOnTrackCreator
218
221
224
227
229 double m_localAngle{0.};
230
233
235 double m_driftTime{0.};
236
239
240 /*** Pointer to the detector element. Needed if no prepData is present*/
242
243};
244
245// /////////////////////////////////////////////////////////////////
246// Inline methods:
247// /////////////////////////////////////////////////////////////////:
248
250 if (m_status == Trk::UNDECIDED) return Trk::NONE;
251 if (localParameters()[Trk::driftRadius] < 0. ) return Trk::LEFT;
252 return Trk::RIGHT;
253}
254
258 if (m_rio.isValid()) return m_rio.cachedElement();
259 return nullptr;
260}
261
263
267
274
279}
280inline double MdtDriftCircleOnTrack::driftTime() const { return m_driftTime; }
282inline double MdtDriftCircleOnTrack::localAngle() const { return m_localAngle; }
287 const Trk::PrepRawData* prd) {
288
289 m_detEl = dynamic_cast<const MuonGM::MdtReadoutElement*>(detEl);
290 if (!prd) return;
292 throw std::runtime_error("No Mdt prd given to MdtDriftCircleOnTrack");
293 }
294 m_rio.setElement(static_cast<const MdtPrepData*>(prd));
295}
296
297}
298
299#endif // MUONRIOONTRACK_MUONDRIFTCIRCLEONTRACK_H
300
301
Cached unique_ptr with atomic update.
ElementLink< Muon::MdtPrepDataContainer > ElementLinkToIDC_MDT_Container
Eigen::Matrix< double, 3, 1 > Vector3D
This is a "hash" representation of an Identifier.
MdtDriftCircleOnTrack()=default
Default ctor - for use by POOL only.
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Interface for the reconstruction to MDT calibration and alignment corrections.
const MuonDriftCircleErrorStrategy & errorStrategy() const
Get information about the creation strategy used by Muon::MdtDriftCircleOnTrackCreator when making th...
Trk::DriftCircleStatus status() const
Returns the status of the drift radius calibration.
virtual IdentifierHash idDE() const override final
Returns an invalid hash.
IdentifierHash collectionHash() const
Returns the hashID of the PRD collection.
double localAngle() const
Returns the local angle, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.
double m_positionAlongWire
This is the position of the point of closest approach, in the local z coord (i.e.
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global Position.
double driftRadius() const
Returns the value of the drift radius.
void setGlobalPosition(Amg::Vector3D &&loc3Dframe) const
Uses the passed loc3Dframe to calculate and set the global coord of this hit.
MdtDriftCircleOnTrack()=default
Default ctor - for use by POOL only.
double driftTime() const
Returns the value of the drift time used to obtain the drift radius.
const ElementLinkToIDC_MDT_Container & prepRawDataLink() const
virtual void setValues(const Trk::TrkDetElementBase *, const Trk::PrepRawData *) override final
Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
virtual ~MdtDriftCircleOnTrack()=default
Destructor:
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_globalPosition
global position of the measurement.
virtual void setLocalParameters(const Trk::LocalParameters &locPos)
Sets the local parameters.
double m_driftTime
This is the drift time used to obtain the drift radius.
double m_localAngle
This angle is the position of the point of closest approach in cylindrical coordinates,...
Trk::DriftCircleStatus m_status
information on the status of the Mdt measurement - see Trk::DriftCircleStatus for definitions
const MuonGM::MdtReadoutElement * m_detEl
ElementLinkToIDC_MDT_Container m_rio
the pointer to the MdtPrepData object (mutable because it might need to be recreated when reading tra...
MdtDriftCircleOnTrack(MdtDriftCircleOnTrack &&)=default
virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final
Method checking the Rio On Track type.
virtual MdtDriftCircleOnTrack * clone() const override final
Pseudo-constructor, needed to avoid excessive RTTI.
void setErrorStrategy(const MuonDriftCircleErrorStrategy &strategy)
Trk::DriftCircleSide side() const
Returns the side on which the drift radius is wrt to the track.
MdtDriftCircleOnTrack & operator=(const MdtDriftCircleOnTrack &)
MdtDriftCircleOnTrack & operator=(MdtDriftCircleOnTrack &&)=default
double positionAlongWire() const
Returns the position along the wire, as determined by the extrapolation used when creating this Trk::...
virtual const Trk::StraightLineSurface & associatedSurface() const override final
Returns the surface on which this measurement was taken.
virtual const MuonGM::MdtReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
MuonDriftCircleErrorStrategy m_errorStrategy
Records information about the 'strategy' used by Muon::MdtDriftCircleOnTrackCreator to make this obje...
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
Class to represent measurements from the Monitored Drift Tubes.
Definition MdtPrepData.h:33
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the Mdt tube which was hit.
Tool used in the persisency convertors to help rebuild EDM objects.
double get(ParamDefs par) const
Retrieve specified parameter (const version).
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
LocalParameters m_localParams
virtual bool type(PrepRawDataType type) const
Interface method checking the type.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
Identifier identify() const
return the identifier -extends MeasurementBase
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
This is the base class for all tracking detector elements with read-out relevant information.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 3, 1 > Vector3D
CachedUniquePtrT< const T > CachedUniquePtr
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
DriftCircleSide
Enumerates the 'side' of the wire on which the tracks passed (i.e.
@ RIGHT
the drift radius is positive (see Trk::AtaStraightLine)
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)
@ NONE
it was not possible to determine the which side of the straw the track passed;
DriftCircleStatus
Enumerates the 'status' of the wire on which the tracks passed (based on the TRT_Side enum,...
@ UNDECIDED
sign of drift radius has not been determined
@ driftRadius
trt, straws
Definition ParamDefs.h:53
-event-from-file