34 return StatusCode::SUCCESS;
36 ATH_MSG_DEBUG(
"I received " <<myProtoTracks->size()<<
" proto-tracks");
48 const Acts::GeometryContext tgContext =
m_ctxProvider.getGeometryContext(ctx);
49 const Acts::MagneticFieldContext mfContext =
m_ctxProvider.getMagneticFieldContext(ctx);
50 const Acts::CalibrationContext calContext{
m_ctxProvider.getCalibrationContext(ctx)};
54 Acts::VectorTrackContainer trackBackend;
55 Acts::VectorMultiTrajectory trackStateBackend;
57 std::move(trackStateBackend) );
61 bool initializedColumns =
false;
63 for (
auto & proto : *myProtoTracks){
65 tgContext, mfContext, calContext);
68 if (
res->size() == 0 )
continue;
69 if(proto.measurements.empty())
continue;
70 ATH_MSG_DEBUG(
".......Done track with size "<< proto.measurements.size());
71 const auto trackProxy =
res->getTrack(0);
72 if (not trackProxy.hasReferenceSurface()) {
73 ATH_MSG_INFO(
"There is not reference surface for this track");
76 if (!initializedColumns) {
77 trackContainer.ensureDynamicColumns(*
res);
78 initializedColumns =
true;
81 auto destProxy = trackContainer.getTrack(trackContainer.addTrack());
82 destProxy.copyFrom(trackProxy);
87 Acts::ConstVectorTrackContainer ctrackBackend( std::move(trackContainer.container()) );
88 Acts::ConstVectorMultiTrajectory ctrackStateBackend( std::move(trackContainer.trackStateContainer()) );
89 std::unique_ptr<ActsTrk::TrackContainer> constTracksContainer = std::make_unique<ActsTrk::TrackContainer>( std::move(ctrackBackend),
90 std::move(ctrackStateBackend) );
92 ATH_CHECK(trackContainerHandle.
record(std::move(constTracksContainer)));
94 return StatusCode::SUCCESS;