ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
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. More...
 
virtual double getCovariance (int ipar, int jpar) const
 The error matrix on the free parameters. More...
 
virtual Amg::Transform3D getTransform (const std::vector< double > &parameters) const
 Return a Transform in the global coordinate system, given a list of parameters. More...
 
virtual void print (std::ostream &out) const
 Verbose. More...
 
const Amg::Vector3DgetCenter () const
 Get the rotation center. More...
 
const Amg::Vector3DgetAxis () const
 Get the rotation axis. More...
 
double getSigma () const
 Get the error to apply to this NP. More...
 
const std::vector< const Trk::RIO_OnTrack * > & getListOfHits () const
 Return the list of hits the transform should be applied to. More...
 
std::size_t getHashOfHits () const
 Return hash built out of associated hits for fast comparison if deviations have same content. More...
 
void setHashOfHits (std::size_t hash)
 Set hash built out of associated hits - cannot be calculated in constructor because of dependencies. More...
 
bool hasValidHashOfHits () const
 Return if the hash created form associated hits is set. More...
 

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 }

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

◆ 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  {
24  Amg::Translation3D transl1(-m_center);
26  Amg::AngleAxis3D angleaxis = Eigen::AngleAxis<double>(parameters[0], m_axis);
27  Amg::Transform3D t = transl2 * angleaxis * transl1;
28 
29  return t;
30 }

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

95 { return m_hitshashdone; }

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

90  {
91  m_hitshash = hash;
92  m_hitshashdone = true;
93  }

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:
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
yodamerge_tmp.axis
list axis
Definition: yodamerge_tmp.py:241
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::AlignmentDeviation::m_hitshashdone
bool m_hitshashdone
Definition: AlignmentDeviation.h:73
Trk::AlignmentDeviation::m_hitshash
std::size_t m_hitshash
Definition: AlignmentDeviation.h:72
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonAlign::AlignmentRotationDeviation::m_sigma
double m_sigma
Definition: AlignmentRotationDeviation.h:58
MuonAlign::AlignmentRotationDeviation::m_axis
Amg::Vector3D m_axis
Definition: AlignmentRotationDeviation.h:57
Trk::AlignmentDeviation::AlignmentDeviation
AlignmentDeviation(const std::vector< const Trk::RIO_OnTrack * > &hits, std::size_t hitshash, bool hitshashdone)
Definition: AlignmentDeviation.h:77
Trk::AlignmentDeviation::m_hits
std::vector< const Trk::RIO_OnTrack * > m_hits
Definition: AlignmentDeviation.h:71
MuonAlign::AlignmentRotationDeviation::m_center
Amg::Vector3D m_center
Definition: AlignmentRotationDeviation.h:56
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45