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;
75 bool initializedColumns =
false;
78 for (
auto & proto : *myProtoTracks){
80 tgContext, mfContext, calContext);
83 if (
res->size() == 0 )
continue;
84 if(not proto.measurements.size())
continue;
85 ATH_MSG_DEBUG(
".......Done track with size "<< proto.measurements.size());
86 const auto trackProxy =
res->getTrack(0);
87 if (not trackProxy.hasReferenceSurface()) {
88 ATH_MSG_INFO(
"There is not reference surface for this track");
91 if (!initializedColumns) {
92 trackContainer.ensureDynamicColumns(*
res);
93 initializedColumns =
true;
95 auto destProxy = trackContainer.getTrack(trackContainer.addTrack());
96 destProxy.copyFrom(trackProxy);
100 std::make_unique<Acts::BoundTrackParameters>( trackProxy.referenceSurface().getSharedPtr(),
101 trackProxy.parameters(),
102 trackProxy.covariance(),
103 trackProxy.particleHypothesis());
111 std::unique_ptr<ActsTrk::TrackContainer> constTracksContainer = std::make_unique<ActsTrk::TrackContainer>( std::move(constTrackBackend),
112 std::move(constTrackStateBackend) );
113 ATH_CHECK(trackContainerHandle.record(std::move(constTracksContainer)));
117 ATH_CHECK(handle.record(std::move(myProtoTracks)));
120 return StatusCode::SUCCESS;