ATLAS Offline Software
Loading...
Searching...
No Matches
DiscBounds.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4namespace Trk {
5inline DiscBounds*
6DiscBounds::clone() const
7{
8 return new DiscBounds(*this);
9}
10
11
12inline bool
13DiscBounds::insideLoc1(const Amg::Vector2D& locpo, double tol1) const
14{
15 return (locpo[locR] > (m_boundValues[DiscBounds::bv_rMin] - tol1) &&
16 locpo[locR] < (m_boundValues[DiscBounds::bv_rMax] + tol1));
17}
18
19inline bool
20DiscBounds::insideLoc2(const Amg::Vector2D& locpo, double tol2) const
21{
22 double alpha = fabs(locpo[locPhi] - m_boundValues[DiscBounds::bv_averagePhi]);
23 if (alpha > M_PI)
24 alpha = 2. * M_PI - alpha;
25 // alpha -= alpha > M_PI ? 2.*M_PI : 0.;
26 // alpha += alpha < -M_PI ? 2.*M_PI : 0.;
27 bool insidePhi =
28 (alpha <= (m_boundValues[DiscBounds::bv_halfPhiSector] + tol2));
29 return insidePhi;
30}
31
32inline double
33DiscBounds::rMin() const
34{
35 return m_boundValues[DiscBounds::bv_rMin];
36}
37
38inline double
39DiscBounds::rMax() const
40{
41 return m_boundValues[DiscBounds::bv_rMax];
42}
43
44inline double
45DiscBounds::r() const
46{
47 return m_boundValues[DiscBounds::bv_rMax];
48}
49
50inline double
51DiscBounds::averagePhi() const
52{
53 return m_boundValues[DiscBounds::bv_averagePhi];
54}
55
56inline double
57DiscBounds::halfPhiSector() const
58{
59 return m_boundValues[DiscBounds::bv_halfPhiSector];
60}
61
62} // end of namespace
63