15 ATH_CHECK(m_trackContainerKey.initialize());
22 ATH_CHECK(m_trackingGeometryTool.retrieve());
23 ATH_CHECK(m_ATLASConverterTool.retrieve());
24 ATH_CHECK(m_extrapolationTool.retrieve());
26 return StatusCode::SUCCESS;
34 if (!thePixelClusters.
isValid()){
36 return StatusCode::FAILURE;
40 if (!theStripClusters.
isValid()){
42 return StatusCode::FAILURE;
47 auto trackContainerHandle =
SG::makeHandle(m_trackContainerKey, ctx);
50 std::vector<ActsTrk::ProtoTrack> myProtoTracks;
51 ATH_CHECK(m_patternBuilder->findProtoTracks(ctx,
55 ATH_MSG_INFO(
"I received " <<myProtoTracks.size()<<
" proto-tracks");
68 std::vector<const InDetDD::SiDetectorElementCollection *> detEleColl;
69 detEleColl.reserve(m_detEleCollKeys.size());
70 for (
const auto &detEleCollKey : m_detEleCollKeys)
72 ATH_MSG_DEBUG(
"Reading input condition data with key " << detEleCollKey.key());
75 detEleColl.push_back(detEleCollHandle.
retrieve());
76 if (detEleColl.back() ==
nullptr)
78 ATH_MSG_FATAL(detEleCollKey.fullKey() <<
" is not available.");
79 return StatusCode::FAILURE;
81 ATH_MSG_DEBUG(
"Retrieved " << detEleColl.back()->size() <<
" input condition elements from key " << detEleCollKey.key());
85 for (
auto & coll : detEleColl)
87 for (
const auto *det_el : *coll){
88 const Acts::Surface &surface =
89 m_ATLASConverterTool->trkSurfaceToActsSurface(det_el->surface());
96 for (
const auto & coll : detEleColl)
103 Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
104 Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
106 Acts::CalibrationContext calContext = Acts::CalibrationContext();
113 for (
auto & proto : myProtoTracks){
114 auto res = m_actsFitter->fit(ctx, proto.measurements,*proto.parameters,
115 m_trackingGeometryTool->getGeometryContext(ctx).context(),
116 m_extrapolationTool->getMagneticFieldContext(ctx),
117 Acts::CalibrationContext(),
118 trackingSurfaceHelper);
121 if (
res->size() == 0 )
continue;
122 if(not proto.measurements.size())
continue;
123 ATH_MSG_DEBUG(
".......Done track with size "<< proto.measurements.size());
124 const auto trackProxy =
res->getTrack(0);
125 if (not trackProxy.hasReferenceSurface()) {
126 ATH_MSG_INFO(
"There is not reference surface for this track");
129 auto destProxy = trackContainer.getTrack(trackContainer.addTrack());
130 destProxy.copyFrom(trackProxy,
true);
132 std::unique_ptr<ActsTrk::TrackContainer> constTracksContainer = m_tracksBackendHandlesHelper.moveToConst(std::move(trackContainer),
133 m_trackingGeometryTool->getGeometryContext(ctx).context(), ctx);
134 ATH_CHECK(trackContainerHandle.record(std::move(constTracksContainer)));
137 return StatusCode::SUCCESS;