ATLAS Offline Software
Loading...
Searching...
No Matches
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
5namespace Trk {
6
7inline TrapezoidBounds*
8TrapezoidBounds::clone() const
9{
10 return new TrapezoidBounds(*this);
11}
12
13inline double
14TrapezoidBounds::minHalflengthX() const
15{
16 return m_boundValues[TrapezoidBounds::bv_minHalfX];
17}
18
19inline double
20TrapezoidBounds::maxHalflengthX() const
21{
22 return m_boundValues[TrapezoidBounds::bv_maxHalfX];
23}
24
25inline double
26TrapezoidBounds::halflengthY() const
27{
28 return m_boundValues[TrapezoidBounds::bv_halfY];
29}
30
31inline double
32TrapezoidBounds::minHalflengthPhi() const
33{
34 return minHalflengthX();
35}
36
37inline double
38TrapezoidBounds::maxHalflengthPhi() const
39{
40 return maxHalflengthX();
41}
42
43inline double
44TrapezoidBounds::halflengthEta() const
45{
46 return halflengthY();
47}
48
49inline double
50TrapezoidBounds::alpha() const
51{
52 return m_alpha;
53}
54
55inline double
56TrapezoidBounds::beta() const
57{
58 return m_beta;
59}
60
61inline double
62TrapezoidBounds::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
70inline bool
71TrapezoidBounds::insideLoc1(const Amg::Vector2D& locpo, double tol1) const
72{
73 return (std::abs(locpo[locX]) <
74 m_boundValues[TrapezoidBounds::bv_maxHalfX] + tol1);
75}
76
77inline bool
78TrapezoidBounds::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