ATLAS Offline Software
AlignmentRotationDeviation.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 #include <utility>
9 
10 using namespace MuonAlign;
11 
13  const std::vector<const Trk::RIO_OnTrack*>& hits) :
14  AlignmentDeviation (hits, 0, false),
15  m_center(std::move(center)), m_axis(std::move(axis)), m_sigma(sigma)
16 {
17 }
18 
19 int AlignmentRotationDeviation::nPar() const { return 1; }
20 
21 double AlignmentRotationDeviation::getCovariance(int, int) const { return m_sigma * m_sigma; }
22 
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 }
31 
32 void AlignmentRotationDeviation::print(std::ostream& out) const {
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 }
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
MuonAlign
Definition: AlignmentRotationDeviation.h:10
MuonAlign::AlignmentRotationDeviation::getTransform
virtual Amg::Transform3D getTransform(const std::vector< double > &parameters) const
Return a Transform in the global coordinate system, given a list of parameters.
Definition: AlignmentRotationDeviation.cxx:23
MuonAlign::AlignmentRotationDeviation::getCovariance
virtual double getCovariance(int ipar, int jpar) const
The error matrix on the free parameters.
Definition: AlignmentRotationDeviation.cxx:21
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonAlign::AlignmentRotationDeviation::AlignmentRotationDeviation
AlignmentRotationDeviation(Amg::Vector3D center, Amg::Vector3D axis, double sigma, const std::vector< const Trk::RIO_OnTrack * > &hits)
Definition: AlignmentRotationDeviation.cxx:12
MuonAlign::AlignmentRotationDeviation::m_sigma
double m_sigma
Definition: AlignmentRotationDeviation.h:58
MuonAlign::AlignmentRotationDeviation::m_axis
Amg::Vector3D m_axis
Definition: AlignmentRotationDeviation.h:57
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
AlignmentRotationDeviation.h
Trk::AlignmentDeviation::m_hits
std::vector< const Trk::RIO_OnTrack * > m_hits
Definition: AlignmentDeviation.h:71
MuonAlign::AlignmentRotationDeviation::nPar
virtual int nPar() const
The number of free parameters.
Definition: AlignmentRotationDeviation.cxx:19
MuonAlign::AlignmentRotationDeviation::m_center
Amg::Vector3D m_center
Definition: AlignmentRotationDeviation.h:56
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
MuonAlign::AlignmentRotationDeviation::print
virtual void print(std::ostream &out) const
Verbose.
Definition: AlignmentRotationDeviation.cxx:32