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