18 return StatusCode::SUCCESS;
32 ATH_CHECK(seedHandle.record(std::make_unique<ActsTrk::SeedContainer>()));
35 std::multimap<xAOD::DetectorIDHashType, Acts::SpacePointIndex2> spacePointMap;
36 seeds->
spacePoints().reserve(spacePointsHandle->size());
40 if (!spacePoint->measurements().empty()) {
42 spacePointMap.emplace(spacePoint->measurements().at(0)->identifierHash(), seeds->
spacePoints().size()-1
ul);
46 seeds->reserve(trackOutput->size());
48 for(
unsigned int i = 3;
i < trackOutput->size();
i++)
57 std::vector<Acts::SpacePointIndex2> spacePointsToStoreInSeed;
60 unsigned int hitsInTrack = 0;
71 isLast = Ghit_w1.last;
74 auto identifierHashW2 = Ghit_w2.cluster1;
77 auto range = spacePointMap.equal_range(identifierHashW2);
79 constexpr
float kEpsilon = 0.1;
81 if (std::abs(
x - spacePoint->
x()) < kEpsilon &&
82 std::abs(
y - spacePoint->
y()) < kEpsilon&&
83 std::abs(
z - spacePoint->
z()) < kEpsilon) {
84 spacePointsToStoreInSeed.push_back(
it->second);
91 if(hitsInTrack != spacePointsToStoreInSeed.size())
93 ATH_MSG_WARNING(
"Track does not have the same number of hits in the output as the seed container hitsInTrack: "<<hitsInTrack<<
" spacePointsToStoreInSeed: "<<spacePointsToStoreInSeed.size());
97 auto seed = seeds->
push_back(spacePointsToStoreInSeed);
103 seed.quality() = 0.0;
111 ATH_MSG_INFO(
"HW Recorded " << seeds->size() <<
" seeds");
113 return StatusCode::SUCCESS;