2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
6 inline bool ConeBounds::operator==(const ConeBounds& bo) const
8 return *this == static_cast<const SurfaceBounds& >(bo);
12 ConeBounds::clone() const
14 return new ConeBounds(*this);
18 ConeBounds::inside(const Amg::Vector2D& locpo, double tol1, double tol2) const
20 double z = locpo[locZ];
21 bool insideZ = z > (m_boundValues[ConeBounds::bv_minZ] - tol2) &&
22 z < (m_boundValues[ConeBounds::bv_maxZ] + tol2);
25 // TODO: Do we need some sort of "R" tolerance also here (take
26 // it off the z tol2 in that case?) or does the rphi tol1 cover
27 // this? (Could argue either way)
28 double coneR = z * m_tanAlpha;
29 double minRPhi = coneR * minPhi() - tol1;
30 double maxRPhi = coneR * maxPhi() + tol1;
31 return minRPhi < locpo[locRPhi] && locpo[locRPhi] < maxRPhi;
35 ConeBounds::inside(const Amg::Vector3D& glopo, double tol1, double tol2) const
37 // coords are (rphi,z)
39 Amg::Vector2D(glopo.perp() * glopo.phi(), glopo.z()), tol1, tol2);
43 ConeBounds::inside(const Amg::Vector3D& glopo, const BoundaryCheck& bchk) const
45 // coords are (rphi,z)
46 return inside(Amg::Vector2D(glopo.perp() * glopo.phi(), glopo.z()),
52 ConeBounds::inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const
54 return ConeBounds::inside(locpo, bchk.toleranceLoc1, bchk.toleranceLoc2);
58 ConeBounds::insideLoc1(const Amg::Vector2D& locpo, double tol1) const
60 double z = locpo[locZ];
61 double coneR = z * m_tanAlpha;
62 double minRPhi = coneR * minPhi() - tol1;
63 double maxRPhi = coneR * maxPhi() + tol1;
64 return minRPhi < locpo[locRPhi] && locpo[locRPhi] < maxRPhi;
68 ConeBounds::insideLoc2(const Amg::Vector2D& locpo, double tol2) const
70 double z = locpo[locZ];
71 return (z > (m_boundValues[ConeBounds::bv_minZ] - tol2) &&
72 z < (m_boundValues[ConeBounds::bv_maxZ] + tol2));
78 double z = fabs(m_boundValues[ConeBounds::bv_maxZ]);
79 double mz = fabs(m_boundValues[ConeBounds::bv_minZ]);
82 return fabs(z * m_tanAlpha);
86 ConeBounds::r(double z) const
88 return fabs(z * m_tanAlpha);
92 ConeBounds::tanAlpha() const
98 ConeBounds::sinAlpha() const
104 ConeBounds::cosAlpha() const
110 ConeBounds::alpha() const
112 return m_boundValues[ConeBounds::bv_alpha];
116 ConeBounds::minZ() const
118 return m_boundValues[ConeBounds::bv_minZ];
122 ConeBounds::maxZ() const
124 return m_boundValues[ConeBounds::bv_maxZ];
128 ConeBounds::averagePhi() const
130 return m_boundValues[ConeBounds::bv_averagePhi];
134 ConeBounds::halfPhiSector() const
136 return m_boundValues[ConeBounds::bv_halfPhiSector];