ATLAS Offline Software
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Trk::ParametersBase< DIM, T > Class Template Referenceabstract

#include <ParametersBase.h>

Inheritance diagram for Trk::ParametersBase< DIM, T >:
Collaboration diagram for Trk::ParametersBase< DIM, T >:

Public Member Functions

virtual ~ParametersBase ()=default
 virtual Destructor More...
 
double charge () const
 Returns the charge. More...
 
const Amg::Vector3Dposition () const
 Access method for the position. More...
 
const Amg::Vector3Dmomentum () const
 Access method for the momentum. More...
 
double pT () const
 Access method for transverse momentum. More...
 
double eta () const
 Access method for pseudorapidity - from momentum. More...
 
virtual bool operator== (const ParametersBase< DIM, T > &) const
 equality operator More...
 
virtual bool hasSurface () const override=0
 Test to see if there's a not null surface ptr. More...
 
virtual const SurfaceassociatedSurface () const override=0
 Access to the Surface associated to the Parameters. More...
 
virtual Amg::RotationMatrix3D measurementFrame () const override=0
 Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perigee Surface. More...
 
virtual ParametersBase< DIM, T > * clone () const override=0
 clone method for polymorphic deep copy More...
 
std::unique_ptr< ParametersBase< DIM, T > > uniqueClone () const
 clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existing clone method. More...
 
constexpr virtual ParametersType type () const override=0
 Return the ParametersType enum. More...
 
constexpr virtual SurfaceType surfaceType () const override=0
 Returns the Surface Type enum for the surface used to define the derived class. More...
 
virtual MsgStream & dump (MsgStream &out) const
 Dumps relevant information about the track parameters into the ostream. More...
 
virtual std::ostream & dump (std::ostream &out) const
 
const AmgVector (DIM) &parameters() const
 Access methods for the parameters. More...
 
 AmgVector (DIM) &parameters()
 
const AmgSymMatrix (DIM) *covariance() const
 Access method for the covariance matrix - returns nullptr if no covariance matrix is given. More...
 
 AmgSymMatrix (DIM) *covariance()
 
constexpr bool isCharged () const
 Returns true if Charged or false if Neutral. More...
 
Amg::Vector2D localPosition () const
 Access method for the local coordinates, \((loc1,loc2)\) local parameter definitions differ for each surface type. More...
 
void setParameters (const AmgVector(DIM) &param)
 set parameters More...
 
void setCovariance (const AmgSymMatrix(DIM) &cov)
 set covariance More...
 
void updateParameters (const AmgVector(DIM) &, const AmgSymMatrix(DIM) &)
 Update parameters and covariance , passing covariance by ref. More...
 
void updateParameters (const AmgVector(DIM) &)
 Update parameters. More...
 

Static Public Attributes

static constexpr int dim = DIM
 

Protected Member Functions

 ParametersBase ()=default
 
 ParametersBase (ParametersBase &&) noexcept=default
 
ParametersBaseoperator= (ParametersBase &&) noexcept=default
 
 ParametersBase (const ParametersBase &)=default
 
ParametersBaseoperator= (const ParametersBase &)=default
 
 ParametersBase (const AmgVector(DIM) parameters, std::optional< AmgSymMatrix(DIM)> &&covariance, const T chargeDef)
 
 ParametersBase (std::optional< AmgSymMatrix(DIM)> &&covariance)
 
 ParametersBase (const AmgVector(DIM) &parameters, std::optional< AmgSymMatrix(DIM)> &&covariance=std::nullopt)
 
virtual void updateParametersHelper (const AmgVector(DIM) &) override=0
 contains the n parameters More...
 
 AmgVector (DIM) m_parameters
 contains the n x n covariance matrix More...
 

Protected Attributes

Amg::Vector3D m_position
 point on track More...
 
Amg::Vector3D m_momentum
 momentum at this point on track More...
 
std::optional< AmgSymMatrix(DIM)> m_covariance = std::nullopt
 charge definition for this track More...
 
m_chargeDef {}
 charge definition for this track More...
 

Detailed Description

template<int DIM, class T>
class Trk::ParametersBase< DIM, T >

The base class for neutral and charged Track parameters. It represents the free state of a trajectory, represented by the track parameters. The position and the momentum are both given in the tracking reference frame.

Template Parameters
DIMnumber of track parameters (usually 5)
Tcharge of track (either Trk::Charged or Trk::Neutral)

The relevant allowed aliases and specialization are under TrkParameters and TrkNeutralParameters and not in this package.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Christos Anastopoulos (Athena MT modifications)

Definition at line 54 of file ParametersBase.h.

Constructor & Destructor Documentation

◆ ~ParametersBase()

template<int DIM, class T >
virtual Trk::ParametersBase< DIM, T >::~ParametersBase ( )
virtualdefault

virtual Destructor

◆ ParametersBase() [1/6]

template<int DIM, class T >
Trk::ParametersBase< DIM, T >::ParametersBase ( )
protecteddefault

◆ ParametersBase() [2/6]

template<int DIM, class T >
Trk::ParametersBase< DIM, T >::ParametersBase ( ParametersBase< DIM, T > &&  )
protecteddefaultnoexcept

◆ ParametersBase() [3/6]

template<int DIM, class T >
Trk::ParametersBase< DIM, T >::ParametersBase ( const ParametersBase< DIM, T > &  )
protecteddefault

◆ ParametersBase() [4/6]

template<int DIM, class T >
Trk::ParametersBase< DIM, T >::ParametersBase ( const AmgVector(DIM)  parameters,
std::optional< AmgSymMatrix(DIM)> &&  covariance,
const chargeDef 
)
protected

◆ ParametersBase() [5/6]

template<int DIM, class T >
Trk::ParametersBase< DIM, T >::ParametersBase ( std::optional< AmgSymMatrix(DIM)> &&  covariance)
protected

◆ ParametersBase() [6/6]

template<int DIM, class T >
Trk::ParametersBase< DIM, T >::ParametersBase ( const AmgVector(DIM) &  parameters,
std::optional< AmgSymMatrix(DIM)> &&  covariance = std::nullopt 
)
protected

Member Function Documentation

◆ AmgSymMatrix() [1/2]

template<int DIM, class T >
Trk::ParametersCommon< DIM, T >::AmgSymMatrix ( DIM  )
inherited

◆ AmgSymMatrix() [2/2]

template<int DIM, class T >
const Trk::ParametersCommon< DIM, T >::AmgSymMatrix ( DIM  ) const
inherited

Access method for the covariance matrix - returns nullptr if no covariance matrix is given.

◆ AmgVector() [1/3]

template<int DIM, class T >
Trk::ParametersCommon< DIM, T >::AmgVector ( DIM  ) &
inherited

◆ AmgVector() [2/3]

template<int DIM, class T >
const Trk::ParametersCommon< DIM, T >::AmgVector ( DIM  ) const &
inherited

Access methods for the parameters.

◆ AmgVector() [3/3]

template<int DIM, class T >
Trk::ParametersCommon< DIM, T >::AmgVector ( DIM  )
protectedinherited

contains the n x n covariance matrix

◆ associatedSurface()

template<int DIM, class T >
virtual const Surface& Trk::ParametersBase< DIM, T >::associatedSurface ( ) const
overridepure virtual

Access to the Surface associated to the Parameters.

Implements Trk::ParametersCommon< DIM, T >.

Implemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ charge()

template<int DIM, class T >
double Trk::ParametersBase< DIM, T >::charge ( ) const

Returns the charge.

◆ clone()

template<int DIM, class T >
virtual ParametersBase<DIM, T>* Trk::ParametersBase< DIM, T >::clone ( ) const
overridepure virtual

clone method for polymorphic deep copy

Returns
new object copied from the concrete type of this object.

Implements Trk::ParametersCommon< DIM, T >.

Implemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ dump() [1/2]

template<int DIM, class T >
virtual MsgStream& Trk::ParametersBase< DIM, T >::dump ( MsgStream &  out) const
virtual

Dumps relevant information about the track parameters into the ostream.

Reimplemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ dump() [2/2]

template<int DIM, class T >
virtual std::ostream& Trk::ParametersBase< DIM, T >::dump ( std::ostream &  out) const
virtual

◆ eta()

template<int DIM, class T >
double Trk::ParametersBase< DIM, T >::eta ( ) const

Access method for pseudorapidity - from momentum.

◆ hasSurface()

template<int DIM, class T >
virtual bool Trk::ParametersBase< DIM, T >::hasSurface ( ) const
overridepure virtual

Test to see if there's a not null surface ptr.

Implements Trk::ParametersCommon< DIM, T >.

Implemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ isCharged()

template<int DIM, class T >
constexpr bool Trk::ParametersCommon< DIM, T >::isCharged ( ) const
constexprinherited

Returns true if Charged or false if Neutral.

◆ localPosition()

template<int DIM, class T >
Amg::Vector2D Trk::ParametersCommon< DIM, T >::localPosition ( ) const
inherited

Access method for the local coordinates, \((loc1,loc2)\) local parameter definitions differ for each surface type.

◆ measurementFrame()

template<int DIM, class T >
virtual Amg::RotationMatrix3D Trk::ParametersBase< DIM, T >::measurementFrame ( ) const
overridepure virtual

Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perigee Surface.

  • the default implementation is the RotationMatrix3D of the transform

Implements Trk::ParametersCommon< DIM, T >.

Implemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ momentum()

template<int DIM, class T >
const Amg::Vector3D& Trk::ParametersBase< DIM, T >::momentum ( ) const

Access method for the momentum.

◆ operator=() [1/2]

template<int DIM, class T >
ParametersBase& Trk::ParametersBase< DIM, T >::operator= ( const ParametersBase< DIM, T > &  )
protecteddefault

◆ operator=() [2/2]

template<int DIM, class T >
ParametersBase& Trk::ParametersBase< DIM, T >::operator= ( ParametersBase< DIM, T > &&  )
protecteddefaultnoexcept

◆ operator==()

template<int DIM, class T >
virtual bool Trk::ParametersBase< DIM, T >::operator== ( const ParametersBase< DIM, T > &  ) const
virtual

equality operator

Reimplemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ position()

template<int DIM, class T >
const Amg::Vector3D& Trk::ParametersBase< DIM, T >::position ( ) const

Access method for the position.

◆ pT()

template<int DIM, class T >
double Trk::ParametersBase< DIM, T >::pT ( ) const

Access method for transverse momentum.

◆ setCovariance()

template<int DIM, class T >
void Trk::ParametersCommon< DIM, T >::setCovariance ( const AmgSymMatrix(DIM) &  cov)
inherited

set covariance

◆ setParameters()

template<int DIM, class T >
void Trk::ParametersCommon< DIM, T >::setParameters ( const AmgVector(DIM) &  param)
inherited

set parameters

◆ surfaceType()

template<int DIM, class T >
constexpr virtual SurfaceType Trk::ParametersBase< DIM, T >::surfaceType ( ) const
constexproverridepure virtual

Returns the Surface Type enum for the surface used to define the derived class.

Implements Trk::ParametersCommon< DIM, T >.

Implemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ type()

template<int DIM, class T >
constexpr virtual ParametersType Trk::ParametersBase< DIM, T >::type ( ) const
constexproverridepure virtual

Return the ParametersType enum.

Implements Trk::ParametersCommon< DIM, T >.

Implemented in Trk::CurvilinearParametersT< DIM, T, S >.

◆ uniqueClone()

template<int DIM, class T >
std::unique_ptr<ParametersBase<DIM, T> > Trk::ParametersBase< DIM, T >::uniqueClone ( ) const
inline

clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existing clone method.

Returns
new object copied from the concrete type of this object.

Definition at line 97 of file ParametersBase.h.

97  {
98  return std::unique_ptr<ParametersBase<DIM, T>>(this->clone());
99  }

◆ updateParameters() [1/2]

template<int DIM, class T >
void Trk::ParametersCommon< DIM, T >::updateParameters ( const AmgVector(DIM) &  )
inherited

Update parameters.

Derived classes override the implementation via updateParametersHelper as this could possibly lead to updating other data members

◆ updateParameters() [2/2]

template<int DIM, class T >
void Trk::ParametersCommon< DIM, T >::updateParameters ( const AmgVector(DIM) &  ,
const AmgSymMatrix(DIM) &   
)
inherited

Update parameters and covariance , passing covariance by ref.

A covariance is created if one does not exist. Otherwise in place update occurs via assignment.

Derived classes override the implementation via updateParametersHelper as this could possibly lead to updating other data members

◆ updateParametersHelper()

template<int DIM, class T >
virtual void Trk::ParametersBase< DIM, T >::updateParametersHelper ( const AmgVector(DIM) &  )
overrideprotectedpure virtual

contains the n parameters

Implements Trk::ParametersCommon< DIM, T >.

Implemented in Trk::CurvilinearParametersT< DIM, T, S >.

Member Data Documentation

◆ dim

template<int DIM, class T >
constexpr int Trk::ParametersCommon< DIM, T >::dim = DIM
staticconstexprinherited

Definition at line 50 of file ParametersCommon.h.

◆ m_chargeDef

template<int DIM, class T >
T Trk::ParametersCommon< DIM, T >::m_chargeDef {}
protectedinherited

charge definition for this track

Definition at line 149 of file ParametersCommon.h.

◆ m_covariance

template<int DIM, class T >
std::optional<AmgSymMatrix(DIM)> Trk::ParametersCommon< DIM, T >::m_covariance = std::nullopt
protectedinherited

charge definition for this track

Definition at line 147 of file ParametersCommon.h.

◆ m_momentum

template<int DIM, class T >
Amg::Vector3D Trk::ParametersBase< DIM, T >::m_momentum
protected

momentum at this point on track

Definition at line 141 of file ParametersBase.h.

◆ m_position

template<int DIM, class T >
Amg::Vector3D Trk::ParametersBase< DIM, T >::m_position
protected

point on track

Definition at line 140 of file ParametersBase.h.


The documentation for this class was generated from the following file:
Trk::ParametersBase::clone
virtual ParametersBase< DIM, T > * clone() const override=0
clone method for polymorphic deep copy