From c4c5f95aaca94faa5aa70ed697f3b16d700a3a3a Mon Sep 17 00:00:00 2001 From: Benjamin Huth <37871400+benjaminhuth@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:30:47 +0100 Subject: [PATCH] fix: Add hit count in root dump reader (#3929) Adds hit count information to particles read from the `RootAthenaDumpReader`. Even though simhits != measurements strictely speaking, in that scenario it is ok to assume this I think. ## Summary by CodeRabbit - **New Features** - Enhanced particle measurement tracking by updating the `newParticle` object to accurately reflect the number of hits during processing. - **Bug Fixes** - Improved accuracy in the processing of particles by ensuring the number of hits is correctly determined. --- Examples/Io/Root/src/RootAthenaDumpReader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Examples/Io/Root/src/RootAthenaDumpReader.cpp b/Examples/Io/Root/src/RootAthenaDumpReader.cpp index 47e5150501a..421affa36ba 100644 --- a/Examples/Io/Root/src/RootAthenaDumpReader.cpp +++ b/Examples/Io/Root/src/RootAthenaDumpReader.cpp @@ -672,6 +672,7 @@ RootAthenaDumpReader::reprocessParticles( } auto newParticle = particle.withParticleId(fatrasBarcode); + newParticle.final().setNumberOfHits(std::distance(begin, end)); newParticles.push_back(newParticle); for (auto it = begin; it != end; ++it) {