Skip to content

Commit

Permalink
backport
Browse files Browse the repository at this point in the history
  • Loading branch information
Norraphat committed Aug 2, 2023
1 parent 7c30d80 commit 1364196
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void fastsim::Bremsstrahlung::interact(fastsim::Particle& particle,
// Needed to rotate photons to the lab frame
double theta = particle.momentum().Theta();
double phi = particle.momentum().Phi();
double m2dontchange = particle.momentum().mass() * particle.momentum().mass();

// Calculate energy of these photons and add them to the event
for (unsigned int i = 0; i < nPhotons; ++i) {
Expand All @@ -155,6 +156,10 @@ void fastsim::Bremsstrahlung::interact(fastsim::Particle& particle,

// Update the original e+/-
particle.momentum() -= photonMom;
particle.momentum().SetXYZT(particle.momentum().px(),
particle.momentum().py(),
particle.momentum().pz(),
sqrt(pow(particle.momentum().P(), 2) + m2dontchange));
}
}

Expand Down

0 comments on commit 1364196

Please sign in to comment.