25 return StatusCode::SUCCESS;
33 if (!thePixelClusters.
isValid()){
35 return StatusCode::FAILURE;
39 if (!theStripClusters.
isValid()){
41 return StatusCode::FAILURE;
46 auto trackContainerHandle =
SG::makeHandle(m_trackContainerKey, ctx);
49 auto myProtoTracks = std::make_unique<ActsTrk::ProtoTrackCollection>();
50 ATH_CHECK(m_patternBuilder->findProtoTracks(ctx,
54 ATH_MSG_INFO(
"I received " << myProtoTracks->size() <<
" proto-tracks");
65 const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
66 const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
71 Acts::VectorTrackContainer trackBackend;
72 Acts::VectorMultiTrajectory trackStateBackend;
76 for (
auto & proto : *myProtoTracks){
77 auto res = m_actsFitter->fit(proto.measurements,*proto.parameters,
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");
90 destProxy.copyFrom(trackProxy,
true);
91 if ( m_copyParametersFromFit ) {
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)));
109 if (not m_protoTrackCollectionKey.empty()) {
111 ATH_CHECK(handle.record(std::move(myProtoTracks)));
114 return StatusCode::SUCCESS;