18 m_trackingGeometry(nullptr),
19 m_trackingGeometryName(
"AtlasTrackingGeometry")
21 declareInterface<IVertexMapper>(
this);
39 return StatusCode::SUCCESS;
46 return StatusCode::SUCCESS;
52 if (
detStore()->
retrieve(m_trackingGeometry, m_trackingGeometryName).isFailure()){
53 ATH_MSG_ERROR(
"Could not retrieve the tracking geometry. Bailing out.");
54 return StatusCode::FAILURE;
56 return StatusCode::SUCCESS;
72 std::vector<const Trk::Layer*> mSensitiveLayers;
74 for (
const auto & mLayer : mLayerObjects){
75 if (mLayer->surfaceArray()){
77 mSensitiveLayers.push_back(mLayer);
81 if (!mSensitiveLayers.empty()){
83 double mDistance = 10e10;
84 const Layer* mLayer =
nullptr;
88 for (
auto& sLayer : mSensitiveLayers) {
93 (sLayer->surfaceRepresentation().type() ==
99 Intersection sIntersection = sLayer->surfaceRepresentation().straightLineIntersection(
vertex,mDirection,
false,
false);
101 if (sIntersection.
valid){
103 double currentDistance = fabs(sIntersection.
pathLength);
104 if ( currentDistance < mDistance ){
106 mDistance = currentDistance;
116 std::vector<SurfaceIntersection> testSurfaces;
125 for (
auto& tSurface : testSurfaces){
127 Intersection tsfInter = tSurface.object->straightLineIntersection(
vertex,mDirection,
false,
false);
132 mSurface = tSurface.object;