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