ATLAS Offline Software
BoundaryPlaneSurface.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 // BoundaryPlaneSurface.icc, (c) ATLAS Detector software
7 ///////////////////////////////////////////////////////////////////
8 
9 template<class Tvol>
10 inline const Surface&
11 BoundaryPlaneSurface<Tvol>::surfaceRepresentation() const
12 {
13  return *this;
14 }
15 
16 template<class Tvol>
17 inline Surface&
18 BoundaryPlaneSurface<Tvol>::surfaceRepresentation()
19 {
20  return *this;
21 }
22 
23 
24 template<class Tvol>
25 inline const Tvol*
26 BoundaryPlaneSurface<Tvol>::attachedVolume(const TrackParameters& parms,
27  PropDirection dir) const
28 {
29  const Tvol* attVolume = nullptr;
30  if ((this->surfaceRepresentation().normal()).dot(dir * parms.momentum()) >
31  0.) {
32  attVolume = BoundarySurface<Tvol>::m_outsideVolume;
33  if (BoundarySurface<Tvol>::m_outsideVolumeArray.get()) {
34  attVolume = BoundarySurface<Tvol>::m_outsideVolumeArray.get()->object(
35  parms.localPosition());
36  }
37  } else {
38  attVolume = BoundarySurface<Tvol>::m_insideVolume;
39  if (BoundarySurface<Tvol>::m_insideVolumeArray.get()) {
40  attVolume = BoundarySurface<Tvol>::m_insideVolumeArray.get()->object(
41  parms.localPosition());
42  }
43  }
44  return attVolume;
45 }
46 
47 template<class Tvol>
48 inline const Tvol*
49 BoundaryPlaneSurface<Tvol>::attachedVolume(const Amg::Vector3D& pos,
50  const Amg::Vector3D& mom,
51  PropDirection dir) const
52 {
53  const Tvol* attVolume = nullptr;
54  if ((this->surfaceRepresentation().normal()).dot(dir * mom) > 0.) {
55  attVolume = BoundarySurface<Tvol>::m_outsideVolume;
56  if (BoundarySurface<Tvol>::m_outsideVolumeArray.get()) {
57  attVolume =
58  BoundarySurface<Tvol>::m_outsideVolumeArray.get()->object(pos);
59  }
60  } else {
61  attVolume = BoundarySurface<Tvol>::m_insideVolume;
62  if (BoundarySurface<Tvol>::m_insideVolumeArray.get()) {
63  attVolume = BoundarySurface<Tvol>::m_insideVolumeArray.get()->object(pos);
64  }
65  }
66  return attVolume;
67 }
68