ATLAS Offline Software
BoundaryDiscSurface.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 ///////////////////////////////////////////////////////////////////
6 // BoundaryDiscSurface.icc, (c) ATLAS Detector software
7 ///////////////////////////////////////////////////////////////////
8 
9 template<class Tvol>
10 inline const Surface&
11 BoundaryDiscSurface<Tvol>::surfaceRepresentation() const
12 {
13  return *this;
14 }
15 template<class Tvol>
16 inline Surface&
17 BoundaryDiscSurface<Tvol>::surfaceRepresentation()
18 {
19  return *this;
20 }
21 
22 template<class Tvol>
23 inline const Tvol*
24 BoundaryDiscSurface<Tvol>::attachedVolume(const TrackParameters& parms,
25  PropDirection dir) const
26 {
27  const Tvol* attVolume = nullptr;
28  if ((this->surfaceRepresentation().normal()).dot(dir * parms.momentum()) >
29  0.) {
30  attVolume = BoundarySurface<Tvol>::m_outsideVolume;
31  if (BoundarySurface<Tvol>::m_outsideVolumeArray.get()) {
32  attVolume = BoundarySurface<Tvol>::m_outsideVolumeArray.get()->object(
33  parms.position());
34  }
35  } else {
36  attVolume = BoundarySurface<Tvol>::m_insideVolume;
37  if (BoundarySurface<Tvol>::m_insideVolumeArray.get()) {
38  attVolume = BoundarySurface<Tvol>::m_insideVolumeArray.get()->object(
39  parms.position());
40  }
41  }
42  return attVolume;
43 }
44 
45 template<class Tvol>
46 inline const Tvol*
47 BoundaryDiscSurface<Tvol>::attachedVolume(const Amg::Vector3D& pos,
48  const Amg::Vector3D& mom,
49  PropDirection dir) const
50 {
51  const Tvol* attVolume = nullptr;
52  if ((this->surfaceRepresentation().normal()).dot(dir * mom) > 0.) {
53  attVolume = BoundarySurface<Tvol>::m_outsideVolume;
54  if (BoundarySurface<Tvol>::m_outsideVolumeArray.get()) {
55  attVolume =
56  BoundarySurface<Tvol>::m_outsideVolumeArray.get()->object(pos);
57  }
58  } else {
59  attVolume = BoundarySurface<Tvol>::m_insideVolume;
60  if (BoundarySurface<Tvol>::m_insideVolumeArray.get()) {
61  attVolume = BoundarySurface<Tvol>::m_insideVolumeArray.get()->object(pos);
62  }
63  }
64  return attVolume;
65 }
66