ATLAS Offline Software
Loading...
Searching...
No Matches
RectangleBounds.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 RectangleBounds*
7RectangleBounds::clone() const
8{
9 return new RectangleBounds(*this);
10}
11
12inline bool
13RectangleBounds::inside(const Amg::Vector2D& locpo,
14 double tol1,
15 double tol2) const
16{
17 return (
18 (fabs(locpo[locX]) < m_boundValues[RectangleBounds::bv_halfX] + tol1) &&
19 (fabs(locpo[locY]) < m_boundValues[RectangleBounds::bv_halfY] + tol2));
20}
21
22inline bool
23RectangleBounds::insideLoc1(const Amg::Vector2D& locpo, double tol1) const
24{
25 return (fabs(locpo[locX]) < m_boundValues[RectangleBounds::bv_halfX] + tol1);
26}
27
28inline bool
29RectangleBounds::insideLoc2(const Amg::Vector2D& locpo, double tol2) const
30{
31 return (fabs(locpo[locY]) < m_boundValues[RectangleBounds::bv_halfY] + tol2);
32}
33
34inline double
35RectangleBounds::halflengthPhi() const
36{
37 return this->halflengthX();
38}
39
40inline double
41RectangleBounds::halflengthEta() const
42{
43 return this->halflengthY();
44}
45
46inline double
47RectangleBounds::halflengthX() const
48{
49 return m_boundValues[RectangleBounds::bv_halfX];
50}
51
52inline double
53RectangleBounds::halflengthY() const
54{
55 return m_boundValues[RectangleBounds::bv_halfY];
56}
57
58inline double
59RectangleBounds::r() const
60{
61 return sqrt(m_boundValues[RectangleBounds::bv_halfX] *
62 m_boundValues[RectangleBounds::bv_halfX] +
63 m_boundValues[RectangleBounds::bv_halfY] *
64 m_boundValues[RectangleBounds::bv_halfY]);
65}
66
67} // end of namespace
68