2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 ///////////////////////////////////////////////////////////////////
6 // BoundaryCylinderSurface.icc, (c) ATLAS Detector software
7 ///////////////////////////////////////////////////////////////////
11 BoundaryCylinderSurface<Tvol>::surfaceRepresentation() const
18 BoundaryCylinderSurface<Tvol>::surfaceRepresentation()
25 BoundaryCylinderSurface<Tvol>::attachedVolume(const TrackParameters& parms,
26 PropDirection dir) const
28 const Tvol* attVolume = nullptr;
29 auto locPos = this->surfaceRepresentation().globalToLocal(parms.position());
30 Amg::Vector3D localNormal{};
32 localNormal = this->surfaceRepresentation().normal(*locPos);
37 if (localNormal.dot(dir * parms.momentum()) > 0.) {
38 attVolume = BoundarySurface<Tvol>::m_outsideVolume;
39 if (BoundarySurface<Tvol>::m_outsideVolumeArray.get()) {
40 attVolume = BoundarySurface<Tvol>::m_outsideVolumeArray.get()->object(
44 attVolume = BoundarySurface<Tvol>::m_insideVolume;
45 if (BoundarySurface<Tvol>::m_insideVolumeArray.get()) {
46 attVolume = BoundarySurface<Tvol>::m_insideVolumeArray.get()->object(
55 BoundaryCylinderSurface<Tvol>::attachedVolume(const Amg::Vector3D& pos,
56 const Amg::Vector3D& mom,
57 PropDirection dir) const
59 const Tvol* attVolume = nullptr;
60 // const Amg::Vector2D* lp =
61 // CylinderSurface::globalToLocal(pos, 2.*Gaudi::Units::mm);
63 // The new interface returns true or false , based on internal tolerance
64 // there is not nullptr to check.
65 const bool intol = CylinderSurface::globalToLocal(pos, pos, lp);
68 Amg::Vector3D localNormal = CylinderSurface::normal(lp);
69 if (localNormal.dot(dir * mom) > 0.) {
70 attVolume = BoundarySurface<Tvol>::m_outsideVolume;
71 if (BoundarySurface<Tvol>::m_outsideVolumeArray.get()) {
73 BoundarySurface<Tvol>::m_outsideVolumeArray.get()->object(pos);
76 attVolume = BoundarySurface<Tvol>::m_insideVolume;
77 if (BoundarySurface<Tvol>::m_insideVolumeArray.get()) {
79 BoundarySurface<Tvol>::m_insideVolumeArray.get()->object(pos);