ATLAS Offline Software
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 
7 namespace Trk {
8 // constructor with parameters
9 inline 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
31 inline int
32 Trk::ResidualPull::parameterKey() const
33 {
34  return m_parameterKey;
35 }
36 
37 // return the dimension of the residual and pull
38 inline int
39 Trk::ResidualPull::dimension() const
40 {
41  return m_residual.size();
42 }
43 inline const std::vector<double>&
44 ResidualPull::residual() const
45 {
46  return m_residual;
47 }
48 
49 inline const std::vector<double>&
50 ResidualPull::pull() const
51 {
52  return m_pull;
53 }
54 
55 inline bool
56 ResidualPull::isPullValid() const
57 {
58  return m_pullValid;
59 }
60 
61 inline ResidualPull::ResidualType
62 ResidualPull::residualType() const
63 {
64  return m_residualType;
65 }
66 
67 inline double
68 ResidualPull::sineStripAngle() const
69 {
70  return m_sineStripAngle;
71 }
72 
73 }
74