ATLAS Offline Software
Loading...
Searching...
No Matches
PerigeeSurface.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5namespace Trk {
6
7inline bool PerigeeSurface::operator==(const PerigeeSurface& persf) const
8{
9 if (this == &persf){
10 return true;
11 }
12 return (center() == persf.center());
13}
14
15/** Return the surface type */
16inline constexpr SurfaceType
17PerigeeSurface::type() const
18{
19 return PerigeeSurface::staticType;
20}
21template<int DIM, class T>
22std::unique_ptr<ParametersT<DIM, T, PerigeeSurface>>
23PerigeeSurface::createUniqueParameters(
24 double l1,
25 double l2,
26 double phi,
27 double theta,
28 double qop,
29 std::optional<AmgSymMatrix(DIM)> cov) const
30{
31 return std::make_unique<ParametersT<DIM, T, PerigeeSurface>>(
32 l1, l2, phi, theta, qop, *this, std::move(cov));
33}
34
35/** Use the Surface as a ParametersBase constructor, from global parameters */
36template<int DIM, class T>
37std::unique_ptr<ParametersT<DIM, T, PerigeeSurface>>
38PerigeeSurface::createUniqueParameters(
39 const Amg::Vector3D& position,
40 const Amg::Vector3D& momentum,
41 double charge,
42 std::optional<AmgSymMatrix(DIM)> cov) const
43{
44 return std::make_unique<ParametersT<DIM, T, PerigeeSurface>>(
45 position, momentum, charge, *this, std::move(cov));
46}
47
48inline PerigeeSurface*
49PerigeeSurface::clone() const
50{
51 return new PerigeeSurface(*this);
52}
53
54inline const Amg::Vector3D&
55PerigeeSurface::normal() const
56{
57 return s_xAxis;
58}
59
60inline Amg::Vector3D
61PerigeeSurface::normal(const Amg::Vector2D&) const
62{
63 return Amg::Vector3D(normal());
64}
65
66inline bool
67PerigeeSurface::insideBounds(const Amg::Vector2D&, double, double) const
68{
69 return true;
70}
71
72inline bool
73PerigeeSurface::insideBoundsCheck(const Amg::Vector2D&,
74 const BoundaryCheck&) const
75{
76 return true;
77}
78
79inline bool
80PerigeeSurface::isOnSurface(const Amg::Vector3D&,
81 const BoundaryCheck&,
82 double,
83 double) const
84{
85 return true;
86}
87
88inline const NoBounds&
89PerigeeSurface::bounds() const
90{
91 return s_perigeeBounds;
92}
93
94inline const Amg::Vector3D&
95PerigeeSurface::lineDirection() const
96{
97 if (m_lineDirection.isValid()) {
98 return *(m_lineDirection.ptr());
99 }
100
101 if (Surface::m_transforms) {
102 if (!m_lineDirection.isValid()) {
103 m_lineDirection.set(transform().linear().col(2));
104 return *(m_lineDirection.ptr());
105 }
106 }
107 return Trk::s_zAxis;
108}
109
110/** the pathCorrection for derived classes with thickness */
111inline double
112PerigeeSurface::pathCorrection(const Amg::Vector3D&, const Amg::Vector3D&) const
113{
114 return 1.;
115}
116
117/** Return properly formatted class name for screen output */
118inline std::string
119PerigeeSurface::name() const
120{
121 return "Trk::PerigeeSurface";
122}
123
124}