ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
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. More...
 
 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). More...
 
 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). More...
 
 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: More...
 
Trk::DriftCircleSide side () const
 Returns the side on which the drift radius is wrt to the track. More...
 
Trk::DriftCircleStatus status () const
 Returns the status of the drift radius calibration. More...
 
virtual MdtDriftCircleOnTrackclone () const override final
 Pseudo-constructor, needed to avoid excessive RTTI. More...
 
virtual const MdtPrepDataprepRawData () const override final
 Returns the PrepRawData used to create this corrected measurement. More...
 
const ElementLinkToIDC_MDT_ContainerprepRawDataLink () const
 
IdentifierHash collectionHash () const
 Returns the hashID of the PRD collection. More...
 
virtual IdentifierHash idDE () const override final
 Returns an invalid hash. More...
 
virtual const MuonGM::MdtReadoutElementdetectorElement () const override final
 Returns the detector element, assoicated with the PRD of this class. More...
 
virtual const Trk::StraightLineSurfaceassociatedSurface () const override final
 Returns the surface on which this measurement was taken. More...
 
virtual const Amg::Vector3DglobalPosition () const override final
 Returns the global Position. More...
 
virtual bool rioType (Trk::RIO_OnTrackType::Type type) const override final
 Method checking the Rio On Track type. More...
 
double driftRadius () const
 Returns the value of the drift radius. More...
 
double driftTime () const
 Returns the value of the drift time used to obtain the drift radius. More...
 
double positionAlongWire () const
 Returns the position along the wire, as determined by the extrapolation used when creating this Trk::RIO_OnTrack. More...
 
double localAngle () const
 Returns the local angle, as determined by the extrapolation used when creating this Trk::RIO_OnTrack. More...
 
const MuonDriftCircleErrorStrategyerrorStrategy () const
 Get information about the creation strategy used by Muon::MdtDriftCircleOnTrackCreator when making this object. More...
 
virtual MsgStream & dump (MsgStream &stream) const override final
 Dumps information about the PRD. More...
 
virtual std::ostream & dump (std::ostream &stream) const override final
 Dumps information about the PRD. More...
 
std::unique_ptr< RIO_OnTrackuniqueClone () const
 NVI clone returning unique_ptr. More...
 
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type. More...
 
Identifier identify () const
 return the identifier -extends MeasurementBase More...
 
const LocalParameters & localParameters () const
 Interface method to get the LocalParameters. More...
 
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError. More...
 

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) More...
 
LocalParameters m_localParams
 
Amg::MatrixX m_localCovariance
 

Private Member Functions

virtual void setLocalParameters (const Trk::LocalParameters &locPos)
 Sets the local parameters. More...
 
virtual void setValues (const Trk::TrkDetElementBase *, const Trk::PrepRawData *) override final
 Sets the DetElement and Trk::PrepRawData pointers after reading from disk. More...
 
void setGlobalPosition (Amg::Vector3D &&loc3Dframe) const
 Uses the passed loc3Dframe to calculate and set the global coord of this hit. More...
 
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 More...
 
ElementLinkToIDC_MDT_Container m_rio {}
 the pointer to the MdtPrepData object (mutable because it might need to be recreated when reading tracks) More...
 
CxxUtils::CachedUniquePtr< Amg::Vector3Dm_globalPosition {}
 global position of the measurement. More...
 
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. More...
 
double m_positionAlongWire {0.}
 This is the position of the point of closest approach, in the local z coord (i.e. More...
 
double m_driftTime {0.}
 This is the drift time used to obtain the drift radius. More...
 
MuonDriftCircleErrorStrategy m_errorStrategy {}
 Records information about the 'strategy' used by Muon::MdtDriftCircleOnTrackCreator to make this object. More...
 
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  :
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 }

◆ 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 }

◆ 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 }

◆ 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} {}

◆ ~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 }

◆ 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); }

◆ 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 }

◆ 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 }

◆ 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:

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 }

◆ 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 }

◆ 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; }

◆ 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 }

◆ 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()

static 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  }

◆ 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  }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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  }

◆ 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  };

Friends And Related Function Documentation

◆ 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.

◆ 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.

◆ 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.

◆ m_globalPosition

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

global position of the measurement.

Definition at line 226 of file MdtDriftCircleOnTrack.h.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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:
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:107
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
Trk::RIO_OnTrack::dump
virtual MsgStream & dump(MsgStream &out) const override
returns the some information about this RIO_OnTrack.
Definition: RIO_OnTrack.cxx:32
Trk::NONE
@ NONE
it was not possible to determine the which side of the straw the track passed;
Definition: DriftCircleSide.h:18
Muon::MdtDriftCircleOnTrack::prepRawData
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
Definition: MdtDriftCircleOnTrack.h:257
Muon::MdtDriftCircleOnTrack::m_detEl
const MuonGM::MdtReadoutElement * m_detEl
Definition: MdtDriftCircleOnTrack.h:241
Trk::RIO_OnTrack::clone
virtual RIO_OnTrack * clone() const override=0
Pseudo-constructor, needed to avoid excessive RTTI.
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Muon::MdtDriftCircleOnTrack::errorStrategy
const MuonDriftCircleErrorStrategy & errorStrategy() const
Get information about the creation strategy used by Muon::MdtDriftCircleOnTrackCreator when making th...
Definition: MdtDriftCircleOnTrack.h:283
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::PrepRawData::type
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
Muon::MdtDriftCircleOnTrack::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
Definition: MdtDriftCircleOnTrack.h:268
Muon::MdtDriftCircleOnTrack::m_rio
ElementLinkToIDC_MDT_Container m_rio
the pointer to the MdtPrepData object (mutable because it might need to be recreated when reading tra...
Definition: MdtDriftCircleOnTrack.h:223
x
#define x
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::MdtDriftCircleOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global Position.
Definition: MdtDriftCircleOnTrack.cxx:108
Muon::MdtDriftCircleOnTrack::driftTime
double driftTime() const
Returns the value of the drift time used to obtain the drift radius.
Definition: MdtDriftCircleOnTrack.h:280
Trk::RIO_OnTrack::type
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Definition: RIO_OnTrack.h:110
Trk::UNDECIDED
@ UNDECIDED
sign of drift radius has not been determined
Definition: DriftCircleStatus.h:20
Trk::LocalParameters::get
double get(ParamDefs par) const
Retrieve specified parameter (const version).
Muon::MdtDriftCircleOnTrack::m_localAngle
double m_localAngle
This angle is the position of the point of closest approach in cylindrical coordinates,...
Definition: MdtDriftCircleOnTrack.h:229
Muon::MdtDriftCircleOnTrack::side
Trk::DriftCircleSide side() const
Returns the side on which the drift radius is wrt to the track.
Definition: MdtDriftCircleOnTrack.h:249
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:53
Trk::RIGHT
@ RIGHT
the drift radius is positive (see Trk::AtaStraightLine)
Definition: DriftCircleSide.h:22
Muon::MdtDriftCircleOnTrack::m_positionAlongWire
double m_positionAlongWire
This is the position of the point of closest approach, in the local z coord (i.e.
Definition: MdtDriftCircleOnTrack.h:232
Muon::MdtDriftCircleOnTrack::localAngle
double localAngle() const
Returns the local angle, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.
Definition: MdtDriftCircleOnTrack.h:282
Muon::MdtDriftCircleOnTrack::positionAlongWire
double positionAlongWire() const
Returns the position along the wire, as determined by the extrapolation used when creating this Trk::...
Definition: MdtDriftCircleOnTrack.h:281
Muon::MdtDriftCircleOnTrack::driftRadius
double driftRadius() const
Returns the value of the drift radius.
Definition: MdtDriftCircleOnTrack.h:277
Muon::MdtDriftCircleOnTrack::status
Trk::DriftCircleStatus status() const
Returns the status of the drift radius calibration.
Definition: MdtDriftCircleOnTrack.h:255
Muon::MdtDriftCircleOnTrack::m_status
Trk::DriftCircleStatus m_status
information on the status of the Mdt measurement - see Trk::DriftCircleStatus for definitions
Definition: MdtDriftCircleOnTrack.h:220
Muon::MdtDriftCircleOnTrack::m_globalPosition
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_globalPosition
global position of the measurement.
Definition: MdtDriftCircleOnTrack.h:226
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Trk::DECIDED
@ DECIDED
sign of drift radius has been determined
Definition: DriftCircleStatus.h:18
Amg::setPerp
void setPerp(Amg::Vector3D &v, double perp)
scales the vector in the xy plane without changing the z coordinate nor the angles
Definition: GeoPrimitivesHelpers.h:94
Trk::RIO_OnTrackType::MdtDriftCircle
@ MdtDriftCircle
Definition: RIO_OnTrack.h:60
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Muon::MdtDriftCircleOnTrack::setGlobalPosition
void setGlobalPosition(Amg::Vector3D &&loc3Dframe) const
Uses the passed loc3Dframe to calculate and set the global coord of this hit.
Definition: MdtDriftCircleOnTrack.cxx:125
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
Trk::ObjectCounter< Trk::RIO_OnTrack >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
y
#define y
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:295
Muon::MdtPrepData::collectionHash
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the Mdt tube which was hit.
Definition: MdtPrepData.h:148
Trk::RIO_OnTrack::m_identifier
Identifier m_identifier
Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)
Definition: RIO_OnTrack.h:149
Muon::MdtDriftCircleOnTrack::associatedSurface
virtual const Trk::StraightLineSurface & associatedSurface() const override final
Returns the surface on which this measurement was taken.
Definition: MdtDriftCircleOnTrack.h:271
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:891
Trk::LEFT
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)
Definition: DriftCircleSide.h:20
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Muon::MdtDriftCircleOnTrack::m_driftTime
double m_driftTime
This is the drift time used to obtain the drift radius.
Definition: MdtDriftCircleOnTrack.h:235
Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack
MdtDriftCircleOnTrack()=default
Default ctor - for use by POOL only.
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:141
Muon::MdtDriftCircleOnTrack::m_errorStrategy
MuonDriftCircleErrorStrategy m_errorStrategy
Records information about the 'strategy' used by Muon::MdtDriftCircleOnTrackCreator to make this obje...
Definition: MdtDriftCircleOnTrack.h:238