2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 ///////////////////////////////////////////////////////////////////
6 // BoundarySubtractedCylinderSurface.icc, (c) ATLAS Detector software
7 ///////////////////////////////////////////////////////////////////
11 BoundarySubtractedCylinderSurface<Tvol>::surfaceRepresentation() const
18 BoundarySubtractedCylinderSurface<Tvol>::surfaceRepresentation()
25 BoundarySubtractedCylinderSurface<Tvol>::attachedVolume(
26 const TrackParameters& parms,
27 PropDirection dir) const
29 const Tvol* attVolume = nullptr;
30 // (ST) buggy line - assumes the parms are at this boundary surface !
31 // const HepGeom::Vector3D<double>* localNormal =
32 // this->surfaceRepresentation().normal(parms.localPosition()); replacing with
33 auto locPos = this->surfaceRepresentation().globalToLocal(parms.position());
34 Amg::Vector3D localNormal{};
36 localNormal = this->surfaceRepresentation().normal(*locPos);
42 if (localNormal.dot(dir * parms.momentum()) > 0.) {
43 attVolume = BoundarySurface<Tvol>::m_outsideVolume;
44 if (BoundarySurface<Tvol>::m_outsideVolumeArray.get()) {
45 attVolume = BoundarySurface<Tvol>::m_outsideVolumeArray.get()->object(
49 attVolume = BoundarySurface<Tvol>::m_insideVolume;
50 if (BoundarySurface<Tvol>::m_insideVolumeArray.get()) {
51 attVolume = BoundarySurface<Tvol>::m_insideVolumeArray.get()->object(
60 BoundarySubtractedCylinderSurface<Tvol>::attachedVolume(
61 const Amg::Vector3D& pos,
62 const Amg::Vector3D& mom,
63 PropDirection dir) const
65 const Tvol* attVolume = nullptr;
66 auto lp = Surface::globalToLocal(pos, 2.);
68 const 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);