ATLAS Offline Software
Loading...
Searching...
No Matches
ResidualPull.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <stdexcept>
6
7namespace Trk {
8// constructor with parameters
9inline Trk::ResidualPull::ResidualPull(
10 std::vector<double> residual,
11 std::vector<double> pull,
12 bool pullValid,
13 Trk::ResidualPull::ResidualType type,
14 int parameterKey,
15 double sineStripAngle)
16 : m_residual(std::move(residual))
17 , m_pull(std::move(pull))
18 , m_pullValid(pullValid)
19 , m_residualType(type)
20 , m_parameterKey(parameterKey)
21 , m_sineStripAngle(sineStripAngle)
22{
23 if (m_residual.size() != m_pull.size()) {
24 throw std::runtime_error(
25 "Trk::ResidualPull: residual and pull sizes differ");
26 }
27}
28
29// return the parameter key of the Trk::LocalParameters (of the measurement)
30// used for the calculation
31inline int
32Trk::ResidualPull::parameterKey() const
33{
34 return m_parameterKey;
35}
36
37// return the dimension of the residual and pull
38inline int
39Trk::ResidualPull::dimension() const
40{
41 return m_residual.size();
42}
43inline const std::vector<double>&
44ResidualPull::residual() const
45{
46 return m_residual;
47}
48
49inline const std::vector<double>&
50ResidualPull::pull() const
51{
52 return m_pull;
53}
54
55inline bool
56ResidualPull::isPullValid() const
57{
58 return m_pullValid;
59}
60
61inline ResidualPull::ResidualType
62ResidualPull::residualType() const
63{
64 return m_residualType;
65}
66
67inline double
68ResidualPull::sineStripAngle() const
69{
70 return m_sineStripAngle;
71}
72
73}
74