ATLAS Offline Software
Loading...
Searching...
No Matches
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
10using 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
19int AlignmentRotationDeviation::nPar() const { return 1; }
20
21double AlignmentRotationDeviation::getCovariance(int, int) const { return m_sigma * m_sigma; }
22
23Amg::Transform3D AlignmentRotationDeviation::getTransform(const std::vector<double>& parameters) const {
26 Amg::AngleAxis3D angleaxis = Eigen::AngleAxis<double>(parameters[0], m_axis);
27 Amg::Transform3D t = transl2 * angleaxis * transl1;
28
29 return t;
30}
31
32void 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}
virtual void print(std::ostream &out) const
Verbose.
AlignmentRotationDeviation(Amg::Vector3D center, Amg::Vector3D axis, double sigma, const std::vector< const Trk::RIO_OnTrack * > &hits)
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.
AlignmentDeviation(const std::vector< const Trk::RIO_OnTrack * > &hits, std::size_t hitshash, bool hitshashdone)
std::vector< const Trk::RIO_OnTrack * > m_hits
Eigen::AngleAxisd AngleAxis3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D
STL namespace.