12 ATH_CHECK(m_trackContainerKey.initialize());
15 ATH_CHECK(m_trackingGeometryTool.retrieve());
16 ATH_CHECK(m_extrapolationTool.retrieve());
17 ATH_CHECK(m_ProtoTrackCollectionFromFPGAKey.initialize());
18 ATH_CHECK(m_detectorElementToGeometryIdMapKey.initialize());
20 return StatusCode::SUCCESS;
31 return StatusCode::SUCCESS;
33 ATH_MSG_DEBUG(
"I received " <<myProtoTracks->size()<<
" proto-tracks");
46 detectorElementToGeometryIdMap{m_detectorElementToGeometryIdMapKey, ctx};
47 ATH_CHECK(detectorElementToGeometryIdMap.isValid());
49 Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
50 Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
52 Acts::CalibrationContext calContext = Acts::CalibrationContext();
59 for (
auto & proto : *myProtoTracks){
60 auto res = m_actsFitter->fit(ctx, proto.measurements, *proto.parameters,
61 m_trackingGeometryTool->getGeometryContext(ctx).context(),
62 m_extrapolationTool->getMagneticFieldContext(ctx),
63 Acts::CalibrationContext(),
64 **detectorElementToGeometryIdMap);
67 if (
res->size() == 0 )
continue;
68 if(proto.measurements.empty())
continue;
69 ATH_MSG_DEBUG(
".......Done track with size "<< proto.measurements.size());
70 const auto trackProxy =
res->getTrack(0);
71 if (not trackProxy.hasReferenceSurface()) {
72 ATH_MSG_INFO(
"There is not reference surface for this track");
75 auto destProxy = trackContainer.getTrack(trackContainer.addTrack());
76 destProxy.copyFrom(trackProxy,
true);
78 std::unique_ptr<ActsTrk::TrackContainer> constTracksContainer = m_tracksBackendHandlesHelper.moveToConst(std::move(trackContainer),
79 m_trackingGeometryTool->getGeometryContext(ctx).context(), ctx);
80 ATH_CHECK(trackContainerHandle.
record(std::move(constTracksContainer)));
82 return StatusCode::SUCCESS;