ATLAS Offline Software
Loading...
Searching...
No Matches
DiscTrapezoidalBounds.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5namespace Trk {
6
7inline DiscTrapezoidalBounds*
8DiscTrapezoidalBounds::clone() const
9{
10 return new DiscTrapezoidalBounds(*this);
11}
12
13
14inline bool
15DiscTrapezoidalBounds::insideLoc1(const Amg::Vector2D& locpo, double tol1) const
16{
17 double alpha =
18 fabs(locpo[locPhi] - m_boundValues[DiscTrapezoidalBounds::bv_averagePhi]);
19 if (alpha > M_PI)
20 alpha = 2 * M_PI - alpha;
21
22 return (locpo[locR] >
23 (m_boundValues[DiscTrapezoidalBounds::bv_rMin] *
24 cos(m_boundValues[DiscTrapezoidalBounds::bv_halfPhiSector]) /
25 cos(alpha) -
26 tol1) &&
27 locpo[locR] <
28 (m_boundValues[DiscTrapezoidalBounds::bv_rMax] *
29 cos(m_boundValues[DiscTrapezoidalBounds::bv_halfPhiSector]) /
30 cos(alpha) +
31 tol1));
32}
33
34inline bool
35DiscTrapezoidalBounds::insideLoc2(const Amg::Vector2D& locpo, double tol2) const
36{
37 double alpha =
38 fabs(locpo[locPhi] - m_boundValues[DiscTrapezoidalBounds::bv_averagePhi]);
39 if (alpha > M_PI)
40 alpha = 2. * M_PI - alpha;
41 return (alpha <=
42 (m_boundValues[DiscTrapezoidalBounds::bv_halfPhiSector] + tol2));
43}
44
45inline double
46DiscTrapezoidalBounds::rMin() const
47{
48 return m_boundValues[DiscTrapezoidalBounds::bv_rMin];
49}
50
51inline double
52DiscTrapezoidalBounds::rMax() const
53{
54 return m_boundValues[DiscTrapezoidalBounds::bv_rMax];
55}
56
57inline double
58DiscTrapezoidalBounds::r() const
59{
60 return m_boundValues[DiscTrapezoidalBounds::bv_rMax];
61}
62
63inline double
64DiscTrapezoidalBounds::averagePhi() const
65{
66 return m_boundValues[DiscTrapezoidalBounds::bv_averagePhi];
67}
68
69inline double
70DiscTrapezoidalBounds::rCenter() const
71{
72 return m_boundValues[DiscTrapezoidalBounds::bv_rCenter];
73}
74
75inline double
76DiscTrapezoidalBounds::stereo() const
77{
78 return m_boundValues[DiscTrapezoidalBounds::bv_stereo];
79}
80
81inline double
82DiscTrapezoidalBounds::halfPhiSector() const
83{
84 return m_boundValues[DiscTrapezoidalBounds::bv_halfPhiSector];
85}
86
87inline double
88DiscTrapezoidalBounds::minHalflengthX() const
89{
90 return m_boundValues[DiscTrapezoidalBounds::bv_minHalfX];
91}
92
93inline double
94DiscTrapezoidalBounds::maxHalflengthX() const
95{
96 return m_boundValues[DiscTrapezoidalBounds::bv_maxHalfX];
97}
98
99inline double
100DiscTrapezoidalBounds::halflengthY() const
101{
102 return m_boundValues[DiscTrapezoidalBounds::bv_halfY];
103}
104
105} // end of namespace
106