From 3dc7ce11df414a987a2ae87c0a61e6d54239e73f Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 2 Dec 2024 14:41:29 -0500 Subject: [PATCH] UndoAfterBurner: skip particles that are not created by generator (#1683) ### Briefly, what does this PR introduce? This provides a file size reduction: ``` before 3.1M after 2.7M ``` ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [x] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? Unlikely. ### Does this PR change default behavior? Yes --- src/algorithms/reco/UndoAfterBurner.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/algorithms/reco/UndoAfterBurner.cc b/src/algorithms/reco/UndoAfterBurner.cc index 69430e97e..129674f47 100644 --- a/src/algorithms/reco/UndoAfterBurner.cc +++ b/src/algorithms/reco/UndoAfterBurner.cc @@ -115,6 +115,9 @@ void eicrecon::UndoAfterBurner::process( // Now, loop through events and apply operations to the MCparticles for (const auto& p: *mcparts) { + if (p.isCreatedInSimulation()) { + continue; + } ROOT::Math::PxPyPzEVector mc(p.getMomentum().x, p.getMomentum().y, p.getMomentum().z, p.getEnergy());