23 std::array<std::string,3 > caloNames = {
"EMB1_layer",
"EMB2_layer",
"EMB3_layer"};
26 const auto & name = vol->volumeName();
27 ATH_MSG_DEBUG(name <<
" - " << vol->geometryId() <<
" - surfaces: " << vol->surfaces().size());
28 if (std::ranges::contains(caloNames, name)){
29 ATH_MSG_DEBUG(
"About to insert caloName " << name <<
" into map");
34 return StatusCode::SUCCESS;
39 unsigned int lastMeasIdx = 0;
41 ATH_MSG_ERROR(
"TrackParticle has no last measurement parameters");
45 Acts::Vector3 lastPos{track->parameterX(lastMeasIdx),
46 track->parameterY(lastMeasIdx),
47 track->parameterZ(lastMeasIdx)};
52 Acts::BoundVector lastBoundParams = Acts::BoundVector::Zero();
53 lastBoundParams[Acts::eBoundPhi] = lastMom.phi();
54 lastBoundParams[Acts::eBoundTheta] = lastMom.theta();
55 lastBoundParams[Acts::eBoundQOverP] = track->charge() / lastMom.norm();
57 std::shared_ptr<const Acts::Surface> lastSurface = Acts::CurvilinearSurface(lastPos, lastMom.normalized()).planeSurface()->getSharedPtr();
59 Acts::BoundTrackParameters boundPars{
60 std::move(lastSurface),
63 Acts::ParticleHypothesis::pion()
66 Acts::Result<std::pair<std::vector<Acts::detail::Step>, Acts::RecordedMaterial>> result =
m_extrapolationTool.get()->propagationSteps(ctx, boundPars);
69 ATH_MSG_WARNING(
"Error during extrapolation: " << result.error().message());
73 const auto &[steps, _] = result.value();
75 ATH_MSG_DEBUG(
"Have extrapolated track with pt, eta and phi: " << track->pt() <<
", " << track->eta() <<
" and " << track->phi());
77 for(
const auto &step : steps) {
80 if( step.surface ==
nullptr || step.surface->geometryId().sensitive() == 0 ) {
84 Acts::GeometryIdentifier thisGeoID = step.geoID;
88 const auto &p = step.position;
89 auto eta = Acts::VectorHelpers::eta(p);
90 auto phi = Acts::VectorHelpers::phi(p);
93 else ATH_MSG_WARNING(
"Could not find this GeometryIdentifier " << thisGeoID <<
" in the map");
99 return std::make_unique<eflowTrackCaloPoints>();