ATLAS Offline Software
TrapezoidBounds.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 namespace Trk {
6 
7 inline TrapezoidBounds*
8 TrapezoidBounds::clone() const
9 {
10  return new TrapezoidBounds(*this);
11 }
12 
13 inline double
14 TrapezoidBounds::minHalflengthX() const
15 {
16  return m_boundValues[TrapezoidBounds::bv_minHalfX];
17 }
18 
19 inline double
20 TrapezoidBounds::maxHalflengthX() const
21 {
22  return m_boundValues[TrapezoidBounds::bv_maxHalfX];
23 }
24 
25 inline double
26 TrapezoidBounds::halflengthY() const
27 {
28  return m_boundValues[TrapezoidBounds::bv_halfY];
29 }
30 
31 inline double
32 TrapezoidBounds::minHalflengthPhi() const
33 {
34  return minHalflengthX();
35 }
36 
37 inline double
38 TrapezoidBounds::maxHalflengthPhi() const
39 {
40  return maxHalflengthX();
41 }
42 
43 inline double
44 TrapezoidBounds::halflengthEta() const
45 {
46  return halflengthY();
47 }
48 
49 inline double
50 TrapezoidBounds::alpha() const
51 {
52  return m_alpha;
53 }
54 
55 inline double
56 TrapezoidBounds::beta() const
57 {
58  return m_beta;
59 }
60 
61 inline double
62 TrapezoidBounds::r() const
63 {
64  return sqrt(m_boundValues[TrapezoidBounds::bv_maxHalfX] *
65  m_boundValues[TrapezoidBounds::bv_maxHalfX] +
66  m_boundValues[TrapezoidBounds::bv_halfY] *
67  m_boundValues[TrapezoidBounds::bv_halfY]);
68 }
69 
70 inline bool
71 TrapezoidBounds::insideLoc1(const Amg::Vector2D& locpo, double tol1) const
72 {
73  return (std::abs(locpo[locX]) <
74  m_boundValues[TrapezoidBounds::bv_maxHalfX] + tol1);
75 }
76 
77 inline bool
78 TrapezoidBounds::insideLoc2(const Amg::Vector2D& locpo, double tol2) const
79 {
80  return (std::abs(locpo[locY]) < m_boundValues[TrapezoidBounds::bv_halfY] + tol2);
81 }
82 
83 } // end of namespace
84