33 if (!thePixelClusters.
isValid()){
35 return StatusCode::FAILURE;
37 ATH_MSG_DEBUG(
"I found " <<thePixelClusters->size()<<
" pix clusters");
39 if (!theStripClusters.
isValid()){
41 return StatusCode::FAILURE;
43 ATH_MSG_DEBUG(
"I found " <<theStripClusters->size()<<
" strip clusters");
49 auto myProtoTracks = std::make_unique<ActsTrk::ProtoTrackCollection>();
54 ATH_MSG_INFO(
"I received " << myProtoTracks->size() <<
" proto-tracks");
66 const Acts::MagneticFieldContext mfContext =
m_extrapolationTool->getMagneticFieldContext(ctx);
71 Acts::VectorTrackContainer trackBackend;
72 Acts::VectorMultiTrajectory trackStateBackend;
76 for (
auto & proto : *myProtoTracks){
78 tgContext, mfContext, calContext);
81 if (
res->size() == 0 )
continue;
82 if(not proto.measurements.size())
continue;
83 ATH_MSG_DEBUG(
".......Done track with size "<< proto.measurements.size());
84 const auto trackProxy =
res->getTrack(0);
85 if (not trackProxy.hasReferenceSurface()) {
86 ATH_MSG_INFO(
"There is not reference surface for this track");
89 auto destProxy = trackContainer.getTrack(trackContainer.addTrack());
90 destProxy.copyFrom(trackProxy);
94 std::make_unique<Acts::BoundTrackParameters>( trackProxy.referenceSurface().getSharedPtr(),
95 trackProxy.parameters(),
96 trackProxy.covariance(),
97 trackProxy.particleHypothesis());
105 std::unique_ptr<ActsTrk::TrackContainer> constTracksContainer = std::make_unique<ActsTrk::TrackContainer>( std::move(constTrackBackend),
106 std::move(constTrackStateBackend) );
107 ATH_CHECK(trackContainerHandle.record(std::move(constTracksContainer)));
111 ATH_CHECK(handle.record(std::move(myProtoTracks)));
114 return StatusCode::SUCCESS;