ATLAS Offline Software
Loading...
Searching...
No Matches
MuonAlign::AlignmentTranslationDeviation Class Reference

#include <AlignmentTranslationDeviation.h>

Inheritance diagram for MuonAlign::AlignmentTranslationDeviation:
Collaboration diagram for MuonAlign::AlignmentTranslationDeviation:

Public Member Functions

 AlignmentTranslationDeviation (const Amg::Vector3D &u, double sigma, const std::vector< const Trk::RIO_OnTrack * > &hits)
virtual ~AlignmentTranslationDeviation ()=default
virtual int nPar () const
 The number of free parameters.
virtual double getCovariance (int ipar, int jpar) const
 The error matrix on the free parameters.
virtual Amg::Transform3D getTransform (const std::vector< double > &parameters) const
 Return a Transform in the global coordinate system, given a list of parameters.
virtual void print (std::ostream &out) const
 Verbose.
const Amg::Vector3DgetU () const
 Get the translation direction vector.
double getSigma () const
 Get the error to apply to this NP.
const std::vector< const Trk::RIO_OnTrack * > & getListOfHits () const
 Return the list of hits the transform should be applied to.
std::size_t getHashOfHits () const
 Return hash built out of associated hits for fast comparison if deviations have same content.
void setHashOfHits (std::size_t hash)
 Set hash built out of associated hits - cannot be calculated in constructor because of dependencies.
bool hasValidHashOfHits () const
 Return if the hash created form associated hits is set.

Protected Attributes

std::vector< const Trk::RIO_OnTrack * > m_hits
std::size_t m_hitshash
bool m_hitshashdone

Private Attributes

Amg::Vector3D m_u
double m_sigma

Detailed Description

Definition at line 11 of file AlignmentTranslationDeviation.h.

Constructor & Destructor Documentation

◆ AlignmentTranslationDeviation()

AlignmentTranslationDeviation::AlignmentTranslationDeviation ( const Amg::Vector3D & u,
double sigma,
const std::vector< const Trk::RIO_OnTrack * > & hits )

Definition at line 11 of file AlignmentTranslationDeviation.cxx.

12 :
13 AlignmentDeviation (hits, 0, false),
14 m_u(u.unit()), m_sigma(sigma)
15{
16}
AlignmentDeviation(const std::vector< const Trk::RIO_OnTrack * > &hits, std::size_t hitshash, bool hitshashdone)
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77

◆ ~AlignmentTranslationDeviation()

virtual MuonAlign::AlignmentTranslationDeviation::~AlignmentTranslationDeviation ( )
virtualdefault

Member Function Documentation

◆ getCovariance()

double AlignmentTranslationDeviation::getCovariance ( int ipar,
int jpar ) const
virtual

The error matrix on the free parameters.

Track fitters should use this to compute a constraint on the free parameters.

Implements Trk::AlignmentDeviation.

Definition at line 20 of file AlignmentTranslationDeviation.cxx.

20{ return m_sigma * m_sigma; }

◆ getHashOfHits()

std::size_t Trk::AlignmentDeviation::getHashOfHits ( ) const
inlineinherited

Return hash built out of associated hits for fast comparison if deviations have same content.

Definition at line 88 of file AlignmentDeviation.h.

88{ return m_hitshash; }

◆ getListOfHits()

const std::vector< const Trk::RIO_OnTrack * > & Trk::AlignmentDeviation::getListOfHits ( ) const
inlineinherited

Return the list of hits the transform should be applied to.

Definition at line 86 of file AlignmentDeviation.h.

86{ return m_hits; }
std::vector< const Trk::RIO_OnTrack * > m_hits

◆ getSigma()

double MuonAlign::AlignmentTranslationDeviation::getSigma ( ) const
inline

Get the error to apply to this NP.

Definition at line 47 of file AlignmentTranslationDeviation.h.

47{ return m_sigma; }

◆ getTransform()

Amg::Transform3D AlignmentTranslationDeviation::getTransform ( const std::vector< double > & parameters) const
virtual

Return a Transform in the global coordinate system, given a list of parameters.

Implements Trk::AlignmentDeviation.

Definition at line 22 of file AlignmentTranslationDeviation.cxx.

22 {
23 Amg::Transform3D t(Amg::Translation3D(parameters[0] * m_u));
24 return t;
25}
Eigen::Affine3d Transform3D
Eigen::Translation< double, 3 > Translation3D

◆ getU()

const Amg::Vector3D & MuonAlign::AlignmentTranslationDeviation::getU ( ) const
inline

Get the translation direction vector.

Definition at line 42 of file AlignmentTranslationDeviation.h.

42{ return m_u; }

◆ hasValidHashOfHits()

bool Trk::AlignmentDeviation::hasValidHashOfHits ( ) const
inlineinherited

Return if the hash created form associated hits is set.

Definition at line 95 of file AlignmentDeviation.h.

◆ nPar()

int AlignmentTranslationDeviation::nPar ( ) const
virtual

The number of free parameters.

Implements Trk::AlignmentDeviation.

Definition at line 18 of file AlignmentTranslationDeviation.cxx.

18{ return 1; }

◆ print()

void AlignmentTranslationDeviation::print ( std::ostream & out) const
virtual

Verbose.

Implements Trk::AlignmentDeviation.

Definition at line 27 of file AlignmentTranslationDeviation.cxx.

27 {
28 out << "A translation along (" << m_u.x() << ", " << m_u.y() << ", " << m_u.z() << ") with sigma=" << m_sigma << " mm applied to "
29 << m_hits.size() << " hits" << std::endl;
30}

◆ setHashOfHits()

void Trk::AlignmentDeviation::setHashOfHits ( std::size_t hash)
inlineinherited

Set hash built out of associated hits - cannot be calculated in constructor because of dependencies.

Definition at line 90 of file AlignmentDeviation.h.

Member Data Documentation

◆ m_hits

std::vector<const Trk::RIO_OnTrack*> Trk::AlignmentDeviation::m_hits
protectedinherited

Definition at line 71 of file AlignmentDeviation.h.

◆ m_hitshash

std::size_t Trk::AlignmentDeviation::m_hitshash
protectedinherited

Definition at line 72 of file AlignmentDeviation.h.

◆ m_hitshashdone

bool Trk::AlignmentDeviation::m_hitshashdone
protectedinherited

Definition at line 73 of file AlignmentDeviation.h.

◆ m_sigma

double MuonAlign::AlignmentTranslationDeviation::m_sigma
private

Definition at line 51 of file AlignmentTranslationDeviation.h.

◆ m_u

Amg::Vector3D MuonAlign::AlignmentTranslationDeviation::m_u
private

Definition at line 50 of file AlignmentTranslationDeviation.h.


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