ATLAS Offline Software
Loading...
Searching...
No Matches
AnnulusBoundsPC.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5namespace Trk {
6 inline AnnulusBoundsPC* AnnulusBoundsPC::clone() const {
7 return new AnnulusBoundsPC(m_minR, m_maxR, m_phiMin, m_phiMax, m_moduleOrigin, m_phiAvg);
8 }
9
10 inline bool AnnulusBoundsPC::operator==(const SurfaceBounds& sb) const {
11 if (sb.type() != SurfaceBounds::Annulus) return false;
12
13 const AnnulusBoundsPC* ab = dynamic_cast<const AnnulusBoundsPC*>(&sb);
14 if (ab == nullptr) return false; // is AnnulusBounds, but not PC
15
16 if (m_boundValues.size() != ab->m_boundValues.size()) return false;
17
18 for (size_t i=0;i<m_boundValues.size();i++) {
19 if (m_boundValues[i] != ab->m_boundValues[i]) return false;
20 }
21
22 return true;
23 }
24
25 inline SurfaceBounds::BoundsType AnnulusBoundsPC::type() const {
26 return Trk::SurfaceBounds::Annulus;
27 }
28
29}
30