Skip to content

Commit

Permalink
fix: Add hit count in root dump reader (#3929)
Browse files Browse the repository at this point in the history
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.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## 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.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
benjaminhuth authored Dec 2, 2024
1 parent 6cbf203 commit c4c5f95
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Examples/Io/Root/src/RootAthenaDumpReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c4c5f95

Please sign in to comment.