ATLAS Offline Software
Loading...
Searching...
No Matches
RotatedTrapezoidBounds.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 {
6inline RotatedTrapezoidBounds*
7RotatedTrapezoidBounds::clone() const
8{
9 return new RotatedTrapezoidBounds(*this);
10}
11
12inline double
13RotatedTrapezoidBounds::halflengthX() const
14{
15 return m_boundValues[RotatedTrapezoidBounds::bv_halfX];
16}
17
18inline double
19RotatedTrapezoidBounds::minHalflengthY() const
20{
21 return m_boundValues[RotatedTrapezoidBounds::bv_minHalfY];
22}
23
24inline double
25RotatedTrapezoidBounds::maxHalflengthY() const
26{
27 return m_boundValues[RotatedTrapezoidBounds::bv_maxHalfY];
28}
29
30inline double
31RotatedTrapezoidBounds::r() const
32{
33 return sqrt(m_boundValues[RotatedTrapezoidBounds::bv_halfX] *
34 m_boundValues[RotatedTrapezoidBounds::bv_halfX] +
35 m_boundValues[RotatedTrapezoidBounds::bv_maxHalfY] *
36 m_boundValues[RotatedTrapezoidBounds::bv_maxHalfY]);
37}
38
39inline bool
40RotatedTrapezoidBounds::insideLoc1(const Amg::Vector2D& pos,
41 double tol1) const
42{
43 const Amg::Vector2D locpo = m_rotMat * pos;
44 return (std::abs(locpo[locX]) <
45 m_boundValues[RotatedTrapezoidBounds::bv_halfX] + tol1);
46}
47
48inline bool
49RotatedTrapezoidBounds::insideLoc2(const Amg::Vector2D& pos,
50 double tol2) const
51{
52 const Amg::Vector2D locpo = m_rotMat * pos;
53 return (std::abs(locpo[locY]) <
54 m_boundValues[RotatedTrapezoidBounds::bv_maxHalfY] + tol2);
55}
56} // end of namespace
57