From 7bb635953611739d41b110b73ef0ba231ba78688 Mon Sep 17 00:00:00 2001 From: Austin Schneider Date: Mon, 26 Feb 2024 11:33:21 -0700 Subject: [PATCH] Fixing ordering of four momentum in SecondaryParticleRecord --- projects/dataclasses/private/InteractionRecord.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/dataclasses/private/InteractionRecord.cxx b/projects/dataclasses/private/InteractionRecord.cxx index d9bed081..ee73a714 100644 --- a/projects/dataclasses/private/InteractionRecord.cxx +++ b/projects/dataclasses/private/InteractionRecord.cxx @@ -440,7 +440,10 @@ std::array SecondaryParticleRecord::GetFourMomentum() const { if(not momentum_set) { UpdateMomentum(); } - return {momentum.at(0), momentum.at(1), momentum.at(2), GetEnergy()}; + if(not energy_set) { + UpdateEnergy(); + } + return {energy, momentum.at(0), momentum.at(1), momentum.at(2)}; } std::array const & SecondaryParticleRecord::GetInitialPosition() const {