32 ATH_CHECK(seedHandle.
record(std::make_unique<ActsTrk::SeedContainer>()));
36 std::map<Identifier::value_type, const xAOD::SpacePoint*> spacePointMap;
41 if (!spacePoint->measurements().empty()) {
42 const auto identifier = spacePoint->measurements().at(0)->identifier();
45 auto [it, inserted] = spacePointMap.emplace(identifier, spacePoint);
47 ATH_MSG_ERROR(
"Duplicate identifier 0x" << std::hex << identifier << std::dec
48 <<
" found for space point. Keeping first occurrence.");
53 seeds->
reserve(tracksHandle->size());
55 for (
const auto& track : *tracksHandle) {
56 std::vector<const xAOD::SpacePoint*> spacePointsToStoreInSeed;
57 for (
const auto& hit : track.getFPGATrackSimHitPtrs()) {
59 if (hit->isReal() && hit->isPixel()) {
60 ATH_MSG_DEBUG(
"Hit coordinates in module " << hit->getRdoIdentifier()
61 <<
": (" << hit->getPhiCoord() <<
", " << hit->getEtaCoord() <<
")");
64 auto it = spacePointMap.find(hit->getRdoIdentifier());
65 if (it != spacePointMap.end()) {
66 spacePointsToStoreInSeed.push_back(it->second);
69 << std::hex << hit->getRdoIdentifier() << std::dec);
81 const float quality = track.getChi2ndof() != 0.0 ? 1.0 / track.getChi2ndof() : 0.0;
83 seeds->
push_back(spacePointsToStoreInSeed, quality, track.getZ0());
88 return StatusCode::SUCCESS;