ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MdtDriftCircleOnTrack Class Referencefinal

This class represents the corrected MDT measurements, where the corrections include the effects of wire sag etc. More...

#include <MdtDriftCircleOnTrack.h>

Inheritance diagram for Muon::MdtDriftCircleOnTrack:
Collaboration diagram for Muon::MdtDriftCircleOnTrack:

Public Member Functions

 MdtDriftCircleOnTrack ()=default
 Default ctor - for use by POOL only.
 MdtDriftCircleOnTrack (const MdtDriftCircleOnTrack &)
MdtDriftCircleOnTrackoperator= (const MdtDriftCircleOnTrack &)
 MdtDriftCircleOnTrack (MdtDriftCircleOnTrack &&)=default
MdtDriftCircleOnTrackoperator= (MdtDriftCircleOnTrack &&)=default
 MdtDriftCircleOnTrack (const MdtPrepData *RIO, Trk::LocalParameters &&locPos, Amg::MatrixX &&errDriftRadius, const double driftTime, const Trk::DriftCircleStatus status, const Amg::Vector3D &globDir, const double positionAlongWire, const MuonDriftCircleErrorStrategy &errorStrategy)
 Constructor for both non-sagged and sagged wire (default is non-sagged, since saggedSurface=0).
 MdtDriftCircleOnTrack (const MdtPrepData *RIO, Trk::LocalParameters &&locPos, Amg::MatrixX &&errDriftRadius, const double driftTime, const Trk::DriftCircleStatus status, const double positionAlongWire, const MuonDriftCircleErrorStrategy &errorStrategy)
 Constructor without global direction for both non-sagged and sagged wire (default is non-sagged, since saggedSurface=0).
 MdtDriftCircleOnTrack (const ElementLinkToIDC_MDT_Container &RIO, Trk::LocalParameters &&locPos, Amg::MatrixX &&errDriftRadius, const Identifier &id, const MuonGM::MdtReadoutElement *detEl, const double driftTime, const Trk::DriftCircleStatus status, const double positionAlongWire, const double localAngle, const MuonDriftCircleErrorStrategy &errorStrategy)
virtual ~MdtDriftCircleOnTrack ()=default
 Destructor:
Trk::DriftCircleSide side () const
 Returns the side on which the drift radius is wrt to the track.
Trk::DriftCircleStatus status () const
 Returns the status of the drift radius calibration.
virtual MdtDriftCircleOnTrackclone () const override final
 Pseudo-constructor, needed to avoid excessive RTTI.
virtual const MdtPrepDataprepRawData () const override final
 Returns the PrepRawData used to create this corrected measurement.
const ElementLinkToIDC_MDT_ContainerprepRawDataLink () const
IdentifierHash collectionHash () const
 Returns the hashID of the PRD collection.
virtual IdentifierHash idDE () const override final
 Returns an invalid hash.
virtual const MuonGM::MdtReadoutElementdetectorElement () const override final
 Returns the detector element, assoicated with the PRD of this class.
virtual const Trk::StraightLineSurfaceassociatedSurface () const override final
 Returns the surface on which this measurement was taken.
virtual const Amg::Vector3DglobalPosition () const override final
 Returns the global Position.
virtual bool rioType (Trk::RIO_OnTrackType::Type type) const override final
 Method checking the Rio On Track type.
double driftRadius () const
 Returns the value of the drift radius.
double driftTime () const
 Returns the value of the drift time used to obtain the drift radius.
double positionAlongWire () const
 Returns the position along the wire, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.
double localAngle () const
 Returns the local angle, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.
const MuonDriftCircleErrorStrategyerrorStrategy () const
 Get information about the creation strategy used by Muon::MdtDriftCircleOnTrackCreator when making this object.
virtual MsgStream & dump (MsgStream &stream) const override final
 Dumps information about the PRD.
virtual std::ostream & dump (std::ostream &stream) const override final
 Dumps information about the PRD.
std::unique_ptr< RIO_OnTrackuniqueClone () const
 NVI clone returning unique_ptr.
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type.
Identifier identify () const
 return the identifier -extends MeasurementBase
const LocalParameters & localParameters () const
 Interface method to get the LocalParameters.
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError.

Static Public Member Functions

static std::size_t numberOfInstantiations ()

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations

Protected Attributes

Identifier m_identifier {}
 Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)
LocalParameters m_localParams
Amg::MatrixX m_localCovariance

Private Member Functions

virtual void setLocalParameters (const Trk::LocalParameters &locPos)
 Sets the local parameters.
virtual void setValues (const Trk::TrkDetElementBase *, const Trk::PrepRawData *) override final
 Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
void setGlobalPosition (Amg::Vector3D &&loc3Dframe) const
 Uses the passed loc3Dframe to calculate and set the global coord of this hit.
void setErrorStrategy (const MuonDriftCircleErrorStrategy &strategy)

Private Attributes

Trk::DriftCircleStatus m_status {Trk::DriftCircleStatus::UNDECIDED}
 information on the status of the Mdt measurement - see Trk::DriftCircleStatus for definitions
ElementLinkToIDC_MDT_Container m_rio {}
 the pointer to the MdtPrepData object (mutable because it might need to be recreated when reading tracks)
CxxUtils::CachedUniquePtr< Amg::Vector3Dm_globalPosition {}
 global position of the measurement.
double m_localAngle {0.}
 This angle is the position of the point of closest approach in cylindrical coordinates, and is needed to construct the global position.
double m_positionAlongWire {0.}
 This is the position of the point of closest approach, in the local z coord (i.e.
double m_driftTime {0.}
 This is the drift time used to obtain the drift radius.
MuonDriftCircleErrorStrategy m_errorStrategy {}
 Records information about the 'strategy' used by Muon::MdtDriftCircleOnTrackCreator to make this object.
const MuonGM::MdtReadoutElementm_detEl {nullptr}

Friends

class Trk::ITrkEventCnvTool
class Muon::MuonEventCnvTool
class Muon::MdtDriftCircleOnTrackCreator

Detailed Description

This class represents the corrected MDT measurements, where the corrections include the effects of wire sag etc.

Definition at line 37 of file MdtDriftCircleOnTrack.h.

Constructor & Destructor Documentation

◆ MdtDriftCircleOnTrack() [1/6]

Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack ( )
default

Default ctor - for use by POOL only.

Do not use yourself!

◆ MdtDriftCircleOnTrack() [2/6]

Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack ( const MdtDriftCircleOnTrack & other)

Definition at line 64 of file MdtDriftCircleOnTrack.cxx.

64 :
65 Trk::RIO_OnTrack{ other },
66 m_status{other.m_status},
67 m_rio{other.m_rio},
68 m_localAngle{other.m_localAngle},
69 m_positionAlongWire{other.m_positionAlongWire},
70 m_driftTime{other.m_driftTime},
71 m_errorStrategy{other.m_errorStrategy},
72 m_detEl{other.m_detEl} {
73}
double m_positionAlongWire
This is the position of the point of closest approach, in the local z coord (i.e.
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...
MuonDriftCircleErrorStrategy m_errorStrategy
Records information about the 'strategy' used by Muon::MdtDriftCircleOnTrackCreator to make this obje...

◆ MdtDriftCircleOnTrack() [3/6]

Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack ( MdtDriftCircleOnTrack && )
default

◆ MdtDriftCircleOnTrack() [4/6]

Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack ( const MdtPrepData * RIO,
Trk::LocalParameters && locPos,
Amg::MatrixX && errDriftRadius,
const double driftTime,
const Trk::DriftCircleStatus status,
const Amg::Vector3D & globDir,
const double positionAlongWire,
const MuonDriftCircleErrorStrategy & errorStrategy )

Constructor for both non-sagged and sagged wire (default is non-sagged, since saggedSurface=0).

Using the constructor implies the sign solution of the MDT is resolved.

The identifier hash, det element pointer etc are taken from RIO (the MdtPrepData pointer) so it is vital that this pointer is not zero.

Parameters
[in]RIOpointer to parent MdtPrepData used to create this RIO_OnTrack
[in]locPoslocal position (i.e. drift radius) of the measurement. This drift radius includes all corrections
[in]errDriftRadiusthe Amg::MatrixX (should be 1d, and contains the error on the drift radius measurement)
[in]driftTimedrift time used to obtain the drift radius
[in]statusstatus of drift circle. See Trk::DriftCircleStatus for definitions.
[in]globDirthe predicted/extrapolated track direction (used to calculate global position)
[in]positionAlongWirethis is the extrapolated position along the wire. i.e. it is NOT a measurement, and so should not be included in the Amg::MatrixX
[in]saggedSurfacepointer to a Trk::StraightLineSurface created at the sagged position of the wire. It is not mandatory (i.e. if nothing is passed, or a zero pointer then the non-sagged wire is used). If something is passed, this object will own it (i.e. it will be deleted by this object)
[in]creationParametersA bitword containing information about the construction of the ROT. See m_rotCreationParameters for details.

scaling the direction with drift radius

Definition at line 16 of file MdtDriftCircleOnTrack.cxx.

23 :
24 Trk::RIO_OnTrack{std::move(locPos), std::move(errDriftRadius), RIO->identify()},
29
30 assert(m_status!=Trk::UNDECIDED); // use of this constructor implies that the side is decided
31
32 m_rio.setElement(RIO);
33 m_globalPosition.store(std::make_unique<Amg::Vector3D>(associatedSurface().localToGlobal(m_localParams, predictedTrackDirection, positionAlongWire)));
34
35 Amg::Vector3D loc_gDirection = predictedTrackDirection;
36
38 if(driftRadius() > std::numeric_limits<float>::epsilon()) {
39 // Set loc_gDirection's perpendicular distance equal to driftRadius
40 Amg::setPerp(loc_gDirection, std::abs(driftRadius()));
41 const double ratio = loc_gDirection.x() / std::abs(driftRadius());
42 const double calc_angle = std::abs(ratio) >= 1. ? M_PI * (ratio < 0.) : std::acos(ratio);
43 m_localAngle = (loc_gDirection.y()<0.) ? 2*M_PI - calc_angle : calc_angle;
44 }
45}
#define M_PI
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.
double driftRadius() const
Returns the value of the drift radius.
double driftTime() const
Returns the value of the drift time used to obtain the drift radius.
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_globalPosition
global position of the measurement.
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.
LocalParameters m_localParams
void setPerp(Amg::Vector3D &v, double perp)
scales the vector in the xy plane without changing the z coordinate nor the angles
Eigen::Matrix< double, 3, 1 > Vector3D
@ UNDECIDED
sign of drift radius has not been determined

◆ MdtDriftCircleOnTrack() [5/6]

Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack ( const MdtPrepData * RIO,
Trk::LocalParameters && locPos,
Amg::MatrixX && errDriftRadius,
const double driftTime,
const Trk::DriftCircleStatus status,
const double positionAlongWire,
const MuonDriftCircleErrorStrategy & errorStrategy )

Constructor without global direction for both non-sagged and sagged wire (default is non-sagged, since saggedSurface=0).

This necessarily implies that the DriftCircleStatus is UNDECIDED, since without the GlobalDirection it cannot be worked out. In order to have a fully defined MdtDriftCircleOnTrack it is necessary to use the complete constructor (above)

The identifier hash, det element pointer etc are taken from RIO (the MdtPrepData pointer) so it is vital that this pointer is not zero.

Parameters
[in]RIOpointer to parent MdtPrepData used to create this RIO_OnTrack
[in]locPoslocal position (i.e. drift radius) of the measurement. This drift radius includes all corrections
[in]errDriftRadiusthe Amg::MatrixX (should be 1d, and contains the error on the drift radius measurement)
[in]driftTimedrift time used to obtain the drift radius
[in]statusstatus of drift circle. See Trk::DriftCircleStatus for definitions.
[in]positionAlongWirethis is the extrapolated position along the wire. i.e. it is NOT a measurement, and so should not be included in the Amg::MatrixX
[in]saggedSurfacepointer to a Trk::StraightLineSurface created at the sagged position of the wire. It is not mandatory (i.e. if nothing is passed, or a zero pointer then the non-sagged wire is used). If something is passed, this object will own it (i.e. it will be deleted by this object)
[in]creationParametersA bitword containing information about the construction of the ROT. See m_rotCreationParameters for details.

Definition at line 48 of file MdtDriftCircleOnTrack.cxx.

54 :
55 Trk::RIO_OnTrack{std::move(locPos), std::move(errDriftRadius), RIO->identify()},
60 assert(m_status!=Trk::DECIDED); // use of this constructor implies that the side is not decided
61 m_rio.setElement(RIO);
62}
@ DECIDED
sign of drift radius has been determined

◆ MdtDriftCircleOnTrack() [6/6]

Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack ( const ElementLinkToIDC_MDT_Container & RIO,
Trk::LocalParameters && locPos,
Amg::MatrixX && errDriftRadius,
const Identifier & id,
const MuonGM::MdtReadoutElement * detEl,
const double driftTime,
const Trk::DriftCircleStatus status,
const double positionAlongWire,
const double localAngle,
const MuonDriftCircleErrorStrategy & errorStrategy )

Definition at line 74 of file MdtDriftCircleOnTrack.cxx.

83 :
84 Trk::RIO_OnTrack{std::move(locPos), std::move(errDriftRadius), id},
86 m_rio{RIO},
91 m_detEl{detEl} {}
double localAngle() const
Returns the local angle, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.

◆ ~MdtDriftCircleOnTrack()

virtual Muon::MdtDriftCircleOnTrack::~MdtDriftCircleOnTrack ( )
virtualdefault

Destructor:

Member Function Documentation

◆ associatedSurface()

const Trk::StraightLineSurface & Muon::MdtDriftCircleOnTrack::associatedSurface ( ) const
inlinefinaloverridevirtual

Returns the surface on which this measurement was taken.

  • If hasSaggedSurface()==false, then the surface will be that of the matching Detector Element
  • If hasSaggedSurface()==true, then the surface will be a special surface, representing the sagged position of the wire at the coords of this measurement.

Implements Trk::RIO_OnTrack.

Definition at line 271 of file MdtDriftCircleOnTrack.h.

271 {
272 return detectorElement()->surface(identify());
273}
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
virtual const MuonGM::MdtReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
Identifier identify() const
return the identifier -extends MeasurementBase

◆ clone()

MdtDriftCircleOnTrack * Muon::MdtDriftCircleOnTrack::clone ( ) const
inlinefinaloverridevirtual

Pseudo-constructor, needed to avoid excessive RTTI.


Implements Trk::RIO_OnTrack.

Definition at line 256 of file MdtDriftCircleOnTrack.h.

256{ return new MdtDriftCircleOnTrack(*this); }
MdtDriftCircleOnTrack()=default
Default ctor - for use by POOL only.

◆ collectionHash()

IdentifierHash Muon::MdtDriftCircleOnTrack::collectionHash ( ) const
inline

Returns the hashID of the PRD collection.

Definition at line 264 of file MdtDriftCircleOnTrack.h.

264 {
265 return prepRawData()->collectionHash();
266}
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the Mdt tube which was hit.

◆ detectorElement()

const MuonGM::MdtReadoutElement * Muon::MdtDriftCircleOnTrack::detectorElement ( ) const
inlinefinaloverridevirtual

Returns the detector element, assoicated with the PRD of this class.

Implements Trk::RIO_OnTrack.

Definition at line 268 of file MdtDriftCircleOnTrack.h.

268 {
270}
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.

◆ driftRadius()

double Muon::MdtDriftCircleOnTrack::driftRadius ( ) const
inline

Returns the value of the drift radius.

Obviously to use this method you need to cast to a MdtDriftCircleOnTrack if you have a pointer or reference to the base class (Trk::RIO_OnTrack). An alternative is to use:

double get(ParamDefs par) const
Retrieve specified parameter (const version).
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
@ driftRadius
trt, straws
Definition ParamDefs.h:53
Warning
This method assumes that the MdtDriftCircleOnTrack has been filled correctly. There are no checks!

Definition at line 277 of file MdtDriftCircleOnTrack.h.

277 {
279}

◆ driftTime()

double Muon::MdtDriftCircleOnTrack::driftTime ( ) const
inline

Returns the value of the drift time used to obtain the drift radius.

Obviously to use this method you need to cast to a MdtDriftCircleOnTrack if you have a pointer or reference to the base class (Trk::RIO_OnTrack).

Definition at line 280 of file MdtDriftCircleOnTrack.h.

280{ return m_driftTime; }

◆ dump() [1/2]

MsgStream & Muon::MdtDriftCircleOnTrack::dump ( MsgStream & stream) const
finaloverridevirtual

Dumps information about the PRD.

Reimplemented from Trk::RIO_OnTrack.

Definition at line 130 of file MdtDriftCircleOnTrack.cxx.

131{
132 stream << MSG::INFO<<"MdtDriftCircleOnTrack {"<<std::endl;
134 stream << "DriftTime: "<<m_driftTime<<std::endl;
135 stream << "Status: "<<m_status<<std::endl;
136 stream << "Global position (x,y,z) = ";
137 stream << Amg::toString(globalPosition(),2)<<std::endl;
138
139 stream << "Position along wire: "<<positionAlongWire()<<", \tlocal angle="<<localAngle()<<std::endl;
140 stream << "Creation strategy: "<<m_errorStrategy;
141 stream<<"}"<<endmsg;
142 return stream;
143}
#define endmsg
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global Position.
virtual MsgStream & dump(MsgStream &out) const override
returns the some information about this RIO_OnTrack.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.

◆ dump() [2/2]

std::ostream & Muon::MdtDriftCircleOnTrack::dump ( std::ostream & stream) const
finaloverridevirtual

Dumps information about the PRD.

Reimplemented from Trk::RIO_OnTrack.

Definition at line 145 of file MdtDriftCircleOnTrack.cxx.

146{
147 stream << "MdtDriftCircleOnTrack {"<<std::endl;
149 stream << "DriftTime: "<<m_driftTime<<std::endl;
150 stream << "Status: "<<m_status<<std::endl;
151
152 stream << "Position along wire: "<<positionAlongWire()<<", \tlocal angle="<<localAngle()<<std::endl;
153 // stream << "Creation strategy: "<<m_errorStrategy; //FIXME!
154 stream<<"}"<<std::endl;
155 return stream;
156}

◆ errorStrategy()

const MuonDriftCircleErrorStrategy & Muon::MdtDriftCircleOnTrack::errorStrategy ( ) const
inline

Get information about the creation strategy used by Muon::MdtDriftCircleOnTrackCreator when making this object.

Definition at line 283 of file MdtDriftCircleOnTrack.h.

283 {
284 return m_errorStrategy;
285}

◆ globalPosition()

const Amg::Vector3D & Muon::MdtDriftCircleOnTrack::globalPosition ( ) const
finaloverridevirtual

Returns the global Position.

Be aware that this is calculated from the predicted position along the tube, and the drift radius. i.e. it is partly inferred from other data, and so is not a 'true' measurement.

Implements Trk::RIO_OnTrack.

Definition at line 108 of file MdtDriftCircleOnTrack.cxx.

108 {
109 if (!m_globalPosition) {
110 if (side()==Trk::NONE) {
111 // side not defined, so we cannot determine the global position better than the position along the wire
112 Amg::Vector3D loc3Dframe = m_positionAlongWire * Amg::Vector3D::UnitZ();
113 setGlobalPosition(std::move(loc3Dframe));
114 } else {
115 // get global position where track and drift radius intersect.
116 double x = driftRadius()*std::sin(m_localAngle);
117 double y = driftRadius()*std::cos(m_localAngle);
118 Amg::Vector3D loc3Dframe(x, y, m_positionAlongWire);
119 setGlobalPosition(std::move(loc3Dframe));
120 }
121 }
122 return *m_globalPosition;
123}
#define y
#define x
void setGlobalPosition(Amg::Vector3D &&loc3Dframe) const
Uses the passed loc3Dframe to calculate and set the global coord of this hit.
Trk::DriftCircleSide side() const
Returns the side on which the drift radius is wrt to the track.
@ NONE
it was not possible to determine the which side of the straw the track passed;

◆ idDE()

virtual IdentifierHash Muon::MdtDriftCircleOnTrack::idDE ( ) const
inlinefinaloverridevirtual

Returns an invalid hash.

Todo
Remove

Implements Trk::RIO_OnTrack.

Definition at line 149 of file MdtDriftCircleOnTrack.h.

149{ return IdentifierHash(); }

◆ identify()

Identifier Trk::RIO_OnTrack::identify ( ) const
inlineinherited

return the identifier -extends MeasurementBase

Definition at line 152 of file RIO_OnTrack.h.

153 { return m_identifier; }
Identifier m_identifier
Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)

◆ localAngle()

double Muon::MdtDriftCircleOnTrack::localAngle ( ) const
inline

Returns the local angle, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.

Definition at line 282 of file MdtDriftCircleOnTrack.h.

282{ return m_localAngle; }

◆ localCovariance()

const Amg::MatrixX & Trk::MeasurementBase::localCovariance ( ) const
inlineinherited

Interface method to get the localError.

Definition at line 138 of file MeasurementBase.h.

139{
140 return m_localCovariance;
141}
Amg::MatrixX m_localCovariance

◆ localParameters()

const Trk::LocalParameters & Trk::MeasurementBase::localParameters ( ) const
inlineinherited

Interface method to get the LocalParameters.

Definition at line 132 of file MeasurementBase.h.

133{
134 return m_localParams;
135}

◆ numberOfInstantiations()

std::size_t Trk::ObjectCounter< Trk::RIO_OnTrack >::numberOfInstantiations ( )
inlinestaticinherited

Definition at line 25 of file TrkObjectCounter.h.

26 {
27#ifndef NDEBUG
28 return s_numberOfInstantiations.load();
29#endif
30 return 0;
31 }
Helper to enable counting number of instantiations in debug builds.

◆ operator=() [1/2]

MdtDriftCircleOnTrack & Muon::MdtDriftCircleOnTrack::operator= ( const MdtDriftCircleOnTrack & other)

Definition at line 94 of file MdtDriftCircleOnTrack.cxx.

94 {
95 if (&other != this){
96 static_cast<Trk::RIO_OnTrack&>(*this) = other;
97 m_status = other.m_status;
98 m_rio = other.m_rio;
99 m_localAngle = other.m_localAngle;
100 m_driftTime = other.m_driftTime;
101 m_errorStrategy = other.m_errorStrategy;
102 m_positionAlongWire = other.m_positionAlongWire;
103 m_detEl = other.m_detEl;
104 m_globalPosition.release();
105 }
106 return *this;
107}

◆ operator=() [2/2]

MdtDriftCircleOnTrack & Muon::MdtDriftCircleOnTrack::operator= ( MdtDriftCircleOnTrack && )
default

◆ positionAlongWire()

double Muon::MdtDriftCircleOnTrack::positionAlongWire ( ) const
inline

Returns the position along the wire, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.

Definition at line 281 of file MdtDriftCircleOnTrack.h.

281{ return m_positionAlongWire; }

◆ prepRawData()

const MdtPrepData * Muon::MdtDriftCircleOnTrack::prepRawData ( ) const
inlinefinaloverridevirtual

Returns the PrepRawData used to create this corrected measurement.

Implements Trk::RIO_OnTrack.

Definition at line 257 of file MdtDriftCircleOnTrack.h.

257 {
258 if (m_rio.isValid()) return m_rio.cachedElement();
259 return nullptr;
260}

◆ prepRawDataLink()

const ElementLinkToIDC_MDT_Container & Muon::MdtDriftCircleOnTrack::prepRawDataLink ( ) const
inline

Definition at line 262 of file MdtDriftCircleOnTrack.h.

262{ return m_rio; }

◆ rioType()

virtual bool Muon::MdtDriftCircleOnTrack::rioType ( Trk::RIO_OnTrackType::Type type) const
inlinefinaloverridevirtual

Method checking the Rio On Track type.

Implements Trk::RIO_OnTrack.

Definition at line 166 of file MdtDriftCircleOnTrack.h.

166 {
168 }
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.

◆ setErrorStrategy()

void Muon::MdtDriftCircleOnTrack::setErrorStrategy ( const MuonDriftCircleErrorStrategy & strategy)
inlineprivate

Definition at line 276 of file MdtDriftCircleOnTrack.h.

◆ setGlobalPosition()

void Muon::MdtDriftCircleOnTrack::setGlobalPosition ( Amg::Vector3D && loc3Dframe) const
private

Uses the passed loc3Dframe to calculate and set the global coord of this hit.

If there is a sagged wire defined, this will be used for the transformation, otherwise the detector element surface is used

Definition at line 125 of file MdtDriftCircleOnTrack.cxx.

125 {
126 Amg::Vector3D globPos = associatedSurface().transform() * loc3Dframe;
127 m_globalPosition.set(std::make_unique<Amg::Vector3D>(std::move(globPos)));
128}
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.

◆ setLocalParameters()

void Muon::MdtDriftCircleOnTrack::setLocalParameters ( const Trk::LocalParameters & locPos)
inlineprivatevirtual

Sets the local parameters.

Warning
Only intended for use by the Muon::MdtDriftCircleOnTrackCreator

Definition at line 275 of file MdtDriftCircleOnTrack.h.

275{ m_localParams = locParams; }

◆ setValues()

void Muon::MdtDriftCircleOnTrack::setValues ( const Trk::TrkDetElementBase * detEl,
const Trk::PrepRawData * prd )
inlinefinaloverrideprivatevirtual

Sets the DetElement and Trk::PrepRawData pointers after reading from disk.

Warning
Only intended for use by persistency convertors

Implements Trk::RIO_OnTrack.

Definition at line 286 of file MdtDriftCircleOnTrack.h.

287 {
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}
virtual bool type(PrepRawDataType type) const
Interface method checking the type.

◆ side()

Trk::DriftCircleSide Muon::MdtDriftCircleOnTrack::side ( ) const
inline

Returns the side on which the drift radius is wrt to the track.

Definition at line 249 of file MdtDriftCircleOnTrack.h.

249 {
250 if (m_status == Trk::UNDECIDED) return Trk::NONE;
251 if (localParameters()[Trk::driftRadius] < 0. ) return Trk::LEFT;
252 return Trk::RIGHT;
253}
@ RIGHT
the drift radius is positive (see Trk::AtaStraightLine)
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)

◆ status()

Trk::DriftCircleStatus Muon::MdtDriftCircleOnTrack::status ( ) const
inline

Returns the status of the drift radius calibration.

(for more information see the definition of TrkEventPrimitives/DriftCircleStatus)

Definition at line 255 of file MdtDriftCircleOnTrack.h.

255{ return m_status; }

◆ type()

virtual bool Trk::RIO_OnTrack::type ( MeasurementBaseType::Type type) const
inlinefinaloverridevirtualinherited

Extended method checking the type.

Implements Trk::MeasurementBase.

Definition at line 110 of file RIO_OnTrack.h.

111 {
113 }
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.

◆ uniqueClone()

std::unique_ptr< RIO_OnTrack > Trk::RIO_OnTrack::uniqueClone ( ) const
inlineinherited

NVI clone returning unique_ptr.

Definition at line 97 of file RIO_OnTrack.h.

97 {
98 return std::unique_ptr<RIO_OnTrack>(clone());
99 };
virtual RIO_OnTrack * clone() const override=0
Pseudo-constructor, needed to avoid excessive RTTI.

◆ Muon::MdtDriftCircleOnTrackCreator

Definition at line 42 of file MdtDriftCircleOnTrack.h.

◆ Muon::MuonEventCnvTool

friend class Muon::MuonEventCnvTool
friend

Definition at line 41 of file MdtDriftCircleOnTrack.h.

◆ Trk::ITrkEventCnvTool

friend class Trk::ITrkEventCnvTool
friend

Definition at line 40 of file MdtDriftCircleOnTrack.h.

Member Data Documentation

◆ m_detEl

const MuonGM::MdtReadoutElement* Muon::MdtDriftCircleOnTrack::m_detEl {nullptr}
private

Definition at line 241 of file MdtDriftCircleOnTrack.h.

241{nullptr};

◆ m_driftTime

double Muon::MdtDriftCircleOnTrack::m_driftTime {0.}
private

This is the drift time used to obtain the drift radius.

Definition at line 235 of file MdtDriftCircleOnTrack.h.

235{0.};

◆ m_errorStrategy

MuonDriftCircleErrorStrategy Muon::MdtDriftCircleOnTrack::m_errorStrategy {}
private

Records information about the 'strategy' used by Muon::MdtDriftCircleOnTrackCreator to make this object.

Definition at line 238 of file MdtDriftCircleOnTrack.h.

238{};

◆ m_globalPosition

CxxUtils::CachedUniquePtr<Amg::Vector3D> Muon::MdtDriftCircleOnTrack::m_globalPosition {}
private

global position of the measurement.

Definition at line 226 of file MdtDriftCircleOnTrack.h.

226{};

◆ m_identifier

Identifier Trk::RIO_OnTrack::m_identifier {}
protectedinherited

Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)

Definition at line 149 of file RIO_OnTrack.h.

149{};

◆ m_localAngle

double Muon::MdtDriftCircleOnTrack::m_localAngle {0.}
private

This angle is the position of the point of closest approach in cylindrical coordinates, and is needed to construct the global position.

Definition at line 229 of file MdtDriftCircleOnTrack.h.

229{0.};

◆ m_localCovariance

Amg::MatrixX Trk::MeasurementBase::m_localCovariance
protectedinherited

Definition at line 112 of file MeasurementBase.h.

◆ m_localParams

LocalParameters Trk::MeasurementBase::m_localParams
protectedinherited

Definition at line 111 of file MeasurementBase.h.

◆ m_positionAlongWire

double Muon::MdtDriftCircleOnTrack::m_positionAlongWire {0.}
private

This is the position of the point of closest approach, in the local z coord (i.e.

along the wire), and is needed to construct the global position

Definition at line 232 of file MdtDriftCircleOnTrack.h.

232{0.};

◆ m_rio

ElementLinkToIDC_MDT_Container Muon::MdtDriftCircleOnTrack::m_rio {}
private

the pointer to the MdtPrepData object (mutable because it might need to be recreated when reading tracks)

Definition at line 223 of file MdtDriftCircleOnTrack.h.

223{};

◆ m_status

Trk::DriftCircleStatus Muon::MdtDriftCircleOnTrack::m_status {Trk::DriftCircleStatus::UNDECIDED}
private

information on the status of the Mdt measurement - see Trk::DriftCircleStatus for definitions

Definition at line 220 of file MdtDriftCircleOnTrack.h.

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< Trk::RIO_OnTrack >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.


The documentation for this class was generated from the following files: