23 inline void increaseHitCount(
24 std::vector<ActsExamples::ParticleHitCount>& particleHitCounts,
27 auto it = std::find_if(particleHitCounts.begin(), particleHitCounts.end(),
29 return (phc.particleId == particleId);
32 if (
it != particleHitCounts.end()) {
35 particleHitCounts.push_back({particleId, 1
u});
40 inline void sortHitCount(
41 std::vector<ActsExamples::ParticleHitCount>& particleHitCounts) {
42 std::sort(particleHitCounts.begin(), particleHitCounts.end(),
54 std::vector<ActsExamples::ParticleHitCount>& particleHitCounts) {
55 particleHitCounts.clear();
57 for (
auto hitIndex : protoTrack) {
59 for (
auto hitParticle :
makeRange(hitParticlesMap.equal_range(hitIndex))) {
60 increaseHitCount(particleHitCounts, hitParticle.second);
63 sortHitCount(particleHitCounts);
69 std::vector<ParticleHitCount>& particleHitCounts) {
70 particleHitCounts.clear();
83 state.getUncalibratedSourceLink().template get<IndexSourceLink>();
84 auto hitIndex = sl.
index();
85 for (
auto hitParticle :
makeRange(hitParticlesMap.equal_range(hitIndex))) {
86 increaseHitCount(particleHitCounts, hitParticle.second);
90 sortHitCount(particleHitCounts);