12 ATH_CHECK(m_trackContainerKey.initialize());
16 ATH_CHECK(m_trackingGeometryTool.retrieve());
17 ATH_CHECK(m_ATLASConverterTool.retrieve());
18 ATH_CHECK(m_extrapolationTool.retrieve());
19 ATH_CHECK(m_ProtoTrackCollectionFromFPGAKey.initialize());
21 return StatusCode::SUCCESS;
32 return StatusCode::SUCCESS;
34 ATH_MSG_DEBUG(
"I received " <<myProtoTracks->size()<<
" proto-tracks");
47 std::vector<const InDetDD::SiDetectorElementCollection *> detEleColl;
48 detEleColl.reserve(m_detEleCollKeys.size());
49 for (
const auto &detEleCollKey : m_detEleCollKeys)
51 ATH_MSG_DEBUG(
"Reading input condition data with key " << detEleCollKey.key());
54 detEleColl.push_back(detEleCollHandle.
retrieve());
55 if (detEleColl.back() ==
nullptr)
57 ATH_MSG_FATAL(detEleCollKey.fullKey() <<
" is not available.");
58 return StatusCode::FAILURE;
60 ATH_MSG_DEBUG(
"Retrieved " << detEleColl.back()->size() <<
" input condition elements from key " << detEleCollKey.key());
64 for (
auto & coll : detEleColl)
66 for (
const auto *det_el : *coll){
67 const Acts::Surface &surface =
68 m_ATLASConverterTool->trkSurfaceToActsSurface(det_el->surface());
75 for (
const auto & coll : detEleColl)
82 Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
83 Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
85 Acts::CalibrationContext calContext = Acts::CalibrationContext();
92 for (
auto & proto : *myProtoTracks){
93 auto res = m_actsFitter->fit(ctx, proto.measurements, *proto.parameters,
94 m_trackingGeometryTool->getGeometryContext(ctx).context(),
95 m_extrapolationTool->getMagneticFieldContext(ctx),
96 Acts::CalibrationContext(),
97 trackingSurfaceHelper);
100 if (
res->size() == 0 )
continue;
101 if(proto.measurements.empty())
continue;
102 ATH_MSG_DEBUG(
".......Done track with size "<< proto.measurements.size());
103 const auto trackProxy =
res->getTrack(0);
104 if (not trackProxy.hasReferenceSurface()) {
105 ATH_MSG_INFO(
"There is not reference surface for this track");
108 auto destProxy = trackContainer.getTrack(trackContainer.addTrack());
109 destProxy.copyFrom(trackProxy,
true);
111 std::unique_ptr<ActsTrk::TrackContainer> constTracksContainer = m_tracksBackendHandlesHelper.moveToConst(std::move(trackContainer),
112 m_trackingGeometryTool->getGeometryContext(ctx).context(), ctx);
113 ATH_CHECK(trackContainerHandle.
record(std::move(constTracksContainer)));
115 return StatusCode::SUCCESS;