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

#include <AlignmentRotationDeviation.h>

Inheritance diagram for MuonAlign::AlignmentRotationDeviation:
Collaboration diagram for MuonAlign::AlignmentRotationDeviation:

Public Member Functions

 AlignmentRotationDeviation (Amg::Vector3D center, Amg::Vector3D axis, double sigma, const std::vector< const Trk::RIO_OnTrack * > &hits)
virtual ~AlignmentRotationDeviation ()=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::Vector3DgetCenter () const
 Get the rotation center.
const Amg::Vector3DgetAxis () const
 Get the rotation axis.
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_center
Amg::Vector3D m_axis
double m_sigma

Detailed Description

Definition at line 11 of file AlignmentRotationDeviation.h.

Constructor & Destructor Documentation

◆ AlignmentRotationDeviation()

AlignmentRotationDeviation::AlignmentRotationDeviation ( Amg::Vector3D center,
Amg::Vector3D axis,
double sigma,
const std::vector< const Trk::RIO_OnTrack * > & hits )

Definition at line 12 of file AlignmentRotationDeviation.cxx.

13 :
14 AlignmentDeviation (hits, 0, false),
15 m_center(std::move(center)), m_axis(std::move(axis)), m_sigma(sigma)
16{
17}
AlignmentDeviation(const std::vector< const Trk::RIO_OnTrack * > &hits, std::size_t hitshash, bool hitshashdone)

◆ ~AlignmentRotationDeviation()

virtual MuonAlign::AlignmentRotationDeviation::~AlignmentRotationDeviation ( )
virtualdefault

Member Function Documentation

◆ getAxis()

const Amg::Vector3D & MuonAlign::AlignmentRotationDeviation::getAxis ( ) const
inline

Get the rotation axis.

Definition at line 48 of file AlignmentRotationDeviation.h.

48{ return m_axis; }

◆ getCenter()

const Amg::Vector3D & MuonAlign::AlignmentRotationDeviation::getCenter ( ) const
inline

Get the rotation center.

Definition at line 43 of file AlignmentRotationDeviation.h.

43{ return m_center; }

◆ getCovariance()

double AlignmentRotationDeviation::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 21 of file AlignmentRotationDeviation.cxx.

21{ 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::AlignmentRotationDeviation::getSigma ( ) const
inline

Get the error to apply to this NP.

Definition at line 53 of file AlignmentRotationDeviation.h.

53{ return m_sigma; }

◆ getTransform()

Amg::Transform3D AlignmentRotationDeviation::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 23 of file AlignmentRotationDeviation.cxx.

23 {
26 Amg::AngleAxis3D angleaxis = Eigen::AngleAxis<double>(parameters[0], m_axis);
27 Amg::Transform3D t = transl2 * angleaxis * transl1;
28
29 return t;
30}
Eigen::AngleAxisd AngleAxis3D
Eigen::Affine3d Transform3D
Eigen::Translation< double, 3 > Translation3D

◆ 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 AlignmentRotationDeviation::nPar ( ) const
virtual

The number of free parameters.

Implements Trk::AlignmentDeviation.

Definition at line 19 of file AlignmentRotationDeviation.cxx.

19{ return 1; }

◆ print()

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

Verbose.

Implements Trk::AlignmentDeviation.

Definition at line 32 of file AlignmentRotationDeviation.cxx.

32 {
33 out << "A rotation around center = (" << m_center.x() << ", " << m_center.y() << ", " << m_center.z() << ") and axis = (" << m_axis.x()
34 << ", " << m_axis.y() << ", " << m_axis.z() << ") with sigma=" << m_sigma << " mrad applied to " << m_hits.size() << " hits"
35 << std::endl;
36}

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

Amg::Vector3D MuonAlign::AlignmentRotationDeviation::m_axis
private

Definition at line 57 of file AlignmentRotationDeviation.h.

◆ m_center

Amg::Vector3D MuonAlign::AlignmentRotationDeviation::m_center
private

Definition at line 56 of file AlignmentRotationDeviation.h.

◆ 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::AlignmentRotationDeviation::m_sigma
private

Definition at line 58 of file AlignmentRotationDeviation.h.


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