ATLAS Offline Software
Loading...
Searching...
No Matches
AlignmentDeviation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONALIGNERRORBASE_ALIGNMENTDEVIATION_H
6#define MUONALIGNERRORBASE_ALIGNMENTDEVIATION_H
7
8#include <iosfwd>
9#include <vector>
10
12
13namespace Trk {
14
15 class RIO_OnTrack;
16
21 public:
22 AlignmentDeviation (const std::vector<const Trk::RIO_OnTrack*>& hits, // not owned
23 std::size_t hitshash,
24 bool hitshashdone);
25
27
31 virtual int nPar() const = 0;
32
37 virtual double getCovariance(int ipar, int jpar) const = 0;
38
43 virtual Amg::Transform3D getTransform(const std::vector<double>& parameters) const = 0;
44
48 const std::vector<const Trk::RIO_OnTrack*>& getListOfHits() const;
49
53 std::size_t getHashOfHits() const;
54
58 void setHashOfHits(std::size_t hash);
59
63 bool hasValidHashOfHits() const;
64
68 virtual void print(std::ostream& out) const = 0;
69
70 protected:
71 std::vector<const Trk::RIO_OnTrack*> m_hits; // not owned
72 std::size_t m_hitshash;
74 };
75
76 inline
77 AlignmentDeviation::AlignmentDeviation (const std::vector<const Trk::RIO_OnTrack*>& hits, // not owned
78 std::size_t hitshash,
79 bool hitshashdone)
80 : m_hits (hits),
81 m_hitshash (hitshash),
82 m_hitshashdone (hitshashdone)
83 {
84 }
85
86 inline const std::vector<const Trk::RIO_OnTrack*>& AlignmentDeviation::getListOfHits() const { return m_hits; }
87
88 inline std::size_t AlignmentDeviation::getHashOfHits() const { return m_hitshash; }
89
90 inline void AlignmentDeviation::setHashOfHits(std::size_t hash) {
91 m_hitshash = hash;
92 m_hitshashdone = true;
93 }
94
96
97} // namespace Trk
98#endif
AlignmentDeviation(const std::vector< const Trk::RIO_OnTrack * > &hits, std::size_t hitshash, bool hitshashdone)
virtual double getCovariance(int ipar, int jpar) const =0
The error matrix on the free parameters.
std::vector< const Trk::RIO_OnTrack * > m_hits
void setHashOfHits(std::size_t hash)
Set hash built out of associated hits - cannot be calculated in constructor because of dependencies.
virtual void print(std::ostream &out) const =0
Verbose.
bool hasValidHashOfHits() const
Return if the hash created form associated hits is set.
virtual Amg::Transform3D getTransform(const std::vector< double > &parameters) const =0
Return a Transform in the global coordinate system, given a list of parameters.
const std::vector< const Trk::RIO_OnTrack * > & getListOfHits() const
Return the list of hits the transform should be applied to.
virtual int nPar() const =0
The number of free parameters.
std::size_t getHashOfHits() const
Return hash built out of associated hits for fast comparison if deviations have same content.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
Eigen::Affine3d Transform3D
Ensure that the ATLAS eigen extensions are properly loaded.