Skip to content

Commit

Permalink
Fixing ordering of four momentum in SecondaryParticleRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Feb 26, 2024
1 parent 19fd4f2 commit 7bb6359
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/dataclasses/private/InteractionRecord.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ std::array<double, 4> 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<double, 3> const & SecondaryParticleRecord::GetInitialPosition() const {
Expand Down

0 comments on commit 7bb6359

Please sign in to comment.