ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
Trk::PseudoMeasurementOnTrack Class Referencefinal

Class to handle pseudo-measurements in fitters and on track objects. More...

#include <PseudoMeasurementOnTrack.h>

Inheritance diagram for Trk::PseudoMeasurementOnTrack:
Collaboration diagram for Trk::PseudoMeasurementOnTrack:

Public Member Functions

 PseudoMeasurementOnTrack ()
 Default Constructor for POOL. More...
 
 PseudoMeasurementOnTrack (const PseudoMeasurementOnTrack &)=default
 
 PseudoMeasurementOnTrack (PseudoMeasurementOnTrack &&) noexcept=default
 
PseudoMeasurementOnTrackoperator= (const PseudoMeasurementOnTrack &)=default
 
PseudoMeasurementOnTrackoperator= (PseudoMeasurementOnTrack &&) noexcept=default
 
 PseudoMeasurementOnTrack (LocalParameters &&locpars, Amg::MatrixX &&locerr, const Surface &assocSurf)
 
 PseudoMeasurementOnTrack (LocalParameters &&locpars, Amg::MatrixX &&locerr, ConstSurfaceUniquePtr assocSurf)
 
virtual ~PseudoMeasurementOnTrack () override final=default
 Destructor. More...
 
virtual PseudoMeasurementOnTrackclone () const override final
 virtual constructor, not absolutely needed but given for EDM symmetry More...
 
std::unique_ptr< PseudoMeasurementOnTrackuniqueClone () const
 NVI unique_ptr version of clone. More...
 
virtual const SurfaceassociatedSurface () const override final
 returns the surface for the local to global transformation (interface from MeasurementBase) More...
 
bool hasSurface () const
 Test to see if an associated surface exists. More...
 
virtual const Amg::Vector3DglobalPosition () const override final
 returns the global Position (interface from MeasurementBase) More...
 
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type. More...
 
virtual MsgStream & dump (MsgStream &out) const override final
 produces logfile output about its content in MsgStream form. More...
 
virtual std::ostream & dump (std::ostream &out) const override final
 produces logfile output about its content in stdout form. More...
 
const LocalParameterslocalParameters () const
 Interface method to get the LocalParameters. More...
 
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError. More...
 
void destroySurface () noexcept
 destroySurface deletes the ptr if not null and the surface isFree Usefull also for testing More...
 
const S * surfacePtr ()
 return the ptr we hold useful for tests More...
 
const S * release () noexcept
 release ala unique_ptr release More...
 

Static Public Member Functions

static const S * cloneHelper (const S *input)
 Helper for cloning or not when we need depending on if the surface isFree. More...
 

Protected Attributes

Amg::Vector3D m_globalPosition
 Global position of the PMoT. More...
 
LocalParameters m_localParams
 
Amg::MatrixX m_localCovariance
 
const S * m_associatedSurface = nullptr
 

Friends

class ::TrackCollectionCnv
 

Detailed Description

Class to handle pseudo-measurements in fitters and on track objects.

Such virtual measurements are typically used to feed crude values into track fitters for otherwise unconstraint fit parameters. Inherits from the common Trk::MeasurementBase but NOT from Trk::RIO_OnTrack since it is not necessarily connected to a "real" identifier, PRD or detectorElement. Through the Trk::MeasurementBase inheritance this class can be stored and persistified.

Author
Common Tracking SW Group

Definition at line 41 of file PseudoMeasurementOnTrack.h.

Constructor & Destructor Documentation

◆ PseudoMeasurementOnTrack() [1/5]

Trk::PseudoMeasurementOnTrack::PseudoMeasurementOnTrack ( )

Default Constructor for POOL.

Definition at line 53 of file PseudoMeasurementOnTrack.cxx.

55  , SurfacePtrHolder(nullptr)
56  , m_globalPosition(INVALID_VECTOR3D)
57 {}

◆ PseudoMeasurementOnTrack() [2/5]

Trk::PseudoMeasurementOnTrack::PseudoMeasurementOnTrack ( const PseudoMeasurementOnTrack )
default

◆ PseudoMeasurementOnTrack() [3/5]

Trk::PseudoMeasurementOnTrack::PseudoMeasurementOnTrack ( PseudoMeasurementOnTrack &&  )
defaultnoexcept

◆ PseudoMeasurementOnTrack() [4/5]

Trk::PseudoMeasurementOnTrack::PseudoMeasurementOnTrack ( LocalParameters &&  locpars,
Amg::MatrixX &&  locerr,
const Surface assocSurf 
)

Definition at line 32 of file PseudoMeasurementOnTrack.cxx.

36  : Trk::MeasurementBase(std::move(locpars), std::move(locerr))
37  , SurfacePtrHolder(assocSurf)
39 {
40 }

◆ PseudoMeasurementOnTrack() [5/5]

Trk::PseudoMeasurementOnTrack::PseudoMeasurementOnTrack ( LocalParameters &&  locpars,
Amg::MatrixX &&  locerr,
Trk::ConstSurfaceUniquePtr  assocSurf 
)

Definition at line 42 of file PseudoMeasurementOnTrack.cxx.

46  : Trk::MeasurementBase(std::move(locpars), std::move(locerr))
47  , SurfacePtrHolder(assocSurf.release())
49 {
50 }

◆ ~PseudoMeasurementOnTrack()

virtual Trk::PseudoMeasurementOnTrack::~PseudoMeasurementOnTrack ( )
finaloverridevirtualdefault

Destructor.

Member Function Documentation

◆ associatedSurface()

const Surface & Trk::PseudoMeasurementOnTrack::associatedSurface ( ) const
inlinefinaloverridevirtual

returns the surface for the local to global transformation (interface from MeasurementBase)

Implements Trk::MeasurementBase.

Definition at line 110 of file PseudoMeasurementOnTrack.h.

111 {
112  return *m_associatedSurface;
113 }

◆ clone()

PseudoMeasurementOnTrack * Trk::PseudoMeasurementOnTrack::clone ( ) const
inlinefinaloverridevirtual

virtual constructor, not absolutely needed but given for EDM symmetry

Implements Trk::MeasurementBase.

Definition at line 104 of file PseudoMeasurementOnTrack.h.

105 {
106  return new PseudoMeasurementOnTrack(*this);
107 }

◆ cloneHelper()

template<typename S >
static const S* Trk::SurfacePtrHolderImpl< S >::cloneHelper ( const S *  input)
inlinestaticinherited

Helper for cloning or not when we need depending on if the surface isFree.

Definition at line 147 of file SurfaceHolderImpl.h.

148  {
149  return (input && input->isFree() ? input->clone() : input);
150  }

◆ destroySurface()

template<typename S >
void Trk::SurfacePtrHolderImpl< S >::destroySurface ( )
inlinenoexceptinherited

destroySurface deletes the ptr if not null and the surface isFree Usefull also for testing

Definition at line 128 of file SurfaceHolderImpl.h.

129  {
130  if (m_associatedSurface && m_associatedSurface->isFree()) {
131  delete m_associatedSurface;
132  }
133  //
134  m_associatedSurface = nullptr;
135  }

◆ dump() [1/2]

MsgStream & Trk::PseudoMeasurementOnTrack::dump ( MsgStream &  out) const
finaloverridevirtual

produces logfile output about its content in MsgStream form.

Implements Trk::MeasurementBase.

Definition at line 60 of file PseudoMeasurementOnTrack.cxx.

61 {
62  std::string name(typeid(*this).name());
63  sl << "Concrete dump method not implemented - using base class" << std::endl;
64  sl << name << "\t local position = " << this->localParameters() << std::endl;
65  sl << name << "\t global position ( " << this->globalPosition().x() << " , "
66  << this->globalPosition().y() << " , " << this->globalPosition().z()
67  << " ) " << std::endl;
68  sl << name << "\t has error matrix: " << std::endl;
69  sl << this->localCovariance() << std::endl;
70  sl << name << "\t has associated surface:" << std::endl;
71  sl << this->associatedSurface() << std::endl;
72  return sl;
73 }

◆ dump() [2/2]

std::ostream & Trk::PseudoMeasurementOnTrack::dump ( std::ostream &  out) const
finaloverridevirtual

produces logfile output about its content in stdout form.

Implements Trk::MeasurementBase.

Definition at line 76 of file PseudoMeasurementOnTrack.cxx.

77 {
78  std::string name(typeid(*this).name());
79  sl << "Concrete dump method not implemented - using base class" << std::endl;
80  sl << name << "\t local position = " << this->localParameters() << std::endl;
81  sl << name << "\t global position ( " << this->globalPosition().x() << " , "
82  << this->globalPosition().y() << " , " << this->globalPosition().z()
83  << " ) " << std::endl;
84  sl << name << "\t has error matrix: " << std::endl;
85  sl << this->localCovariance() << std::endl;
86  sl << name << "\t has associated surface:" << std::endl;
87  sl << this->associatedSurface() << std::endl;
88  return sl;
89 }

◆ globalPosition()

const Amg::Vector3D & Trk::PseudoMeasurementOnTrack::globalPosition ( ) const
inlinefinaloverridevirtual

returns the global Position (interface from MeasurementBase)

Implements Trk::MeasurementBase.

Definition at line 122 of file PseudoMeasurementOnTrack.h.

123 {
124  return m_globalPosition;
125 }

◆ hasSurface()

bool Trk::PseudoMeasurementOnTrack::hasSurface ( ) const
inline

Test to see if an associated surface exists.

Definition at line 116 of file PseudoMeasurementOnTrack.h.

117 {
118  return m_associatedSurface != nullptr;
119 }

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

◆ operator=() [1/2]

PseudoMeasurementOnTrack& Trk::PseudoMeasurementOnTrack::operator= ( const PseudoMeasurementOnTrack )
default

◆ operator=() [2/2]

PseudoMeasurementOnTrack& Trk::PseudoMeasurementOnTrack::operator= ( PseudoMeasurementOnTrack &&  )
defaultnoexcept

◆ release()

template<typename S >
const S* Trk::SurfacePtrHolderImpl< S >::release ( )
inlinenoexceptinherited

release ala unique_ptr release

Definition at line 139 of file SurfaceHolderImpl.h.

140  {
141  const S* tmp = m_associatedSurface;
142  m_associatedSurface = nullptr;
143  return tmp;
144  }

◆ surfacePtr()

template<typename S >
const S* Trk::SurfacePtrHolderImpl< S >::surfacePtr ( )
inlineinherited

return the ptr we hold useful for tests

Definition at line 137 of file SurfaceHolderImpl.h.

137 { return m_associatedSurface; }

◆ type()

virtual bool Trk::PseudoMeasurementOnTrack::type ( MeasurementBaseType::Type  type) const
inlinefinaloverridevirtual

Extended method checking the type.

Implements Trk::MeasurementBase.

Definition at line 88 of file PseudoMeasurementOnTrack.h.

89  {
91  }

◆ uniqueClone()

std::unique_ptr<PseudoMeasurementOnTrack> Trk::PseudoMeasurementOnTrack::uniqueClone ( ) const
inline

NVI unique_ptr version of clone.

Definition at line 72 of file PseudoMeasurementOnTrack.h.

73  {
74  return std::unique_ptr<PseudoMeasurementOnTrack>(clone());
75  };

Friends And Related Function Documentation

◆ ::TrackCollectionCnv

friend class ::TrackCollectionCnv
friend

Definition at line 46 of file PseudoMeasurementOnTrack.h.

Member Data Documentation

◆ m_associatedSurface

template<typename S >
const S* Trk::SurfacePtrHolderImpl< S >::m_associatedSurface = nullptr
protectedinherited

Definition at line 153 of file SurfaceHolderImpl.h.

◆ m_globalPosition

Amg::Vector3D Trk::PseudoMeasurementOnTrack::m_globalPosition
protected

Global position of the PMoT.

Definition at line 100 of file PseudoMeasurementOnTrack.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.


The documentation for this class was generated from the following files:
Trk::SurfacePtrHolder
SurfacePtrHolderImpl< Surface > SurfacePtrHolder
Definition: SurfaceHolders.h:25
Trk::PseudoMeasurementOnTrack::clone
virtual PseudoMeasurementOnTrack * clone() const override final
virtual constructor, not absolutely needed but given for EDM symmetry
Definition: PseudoMeasurementOnTrack.h:104
Trk::PseudoMeasurementOnTrack::m_globalPosition
Amg::Vector3D m_globalPosition
Global position of the PMoT.
Definition: PseudoMeasurementOnTrack.h:100
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
Trk::PseudoMeasurementOnTrack::associatedSurface
virtual const Surface & associatedSurface() const override final
returns the surface for the local to global transformation (interface from MeasurementBase)
Definition: PseudoMeasurementOnTrack.h:110
Trk::PseudoMeasurementOnTrack::type
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Definition: PseudoMeasurementOnTrack.h:88
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
Trk::SurfacePtrHolderImpl::m_associatedSurface
const S * m_associatedSurface
Definition: SurfaceHolderImpl.h:153
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
Trk::PseudoMeasurementOnTrack::PseudoMeasurementOnTrack
PseudoMeasurementOnTrack()
Default Constructor for POOL.
Definition: PseudoMeasurementOnTrack.cxx:53
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::PseudoMeasurementOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
returns the global Position (interface from MeasurementBase)
Definition: PseudoMeasurementOnTrack.h:122
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
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::MeasurementBaseType::PseudoMeasurementOnTrack
@ PseudoMeasurementOnTrack
Definition: MeasurementBase.h:51