Skip to content

Commit

Permalink
Merge pull request #42452 from srimanob/130_ElectronBremFS
Browse files Browse the repository at this point in the history
[13_0] Preserve electron mass after FastSim Bremsstrahlung emmision
  • Loading branch information
cmsbuild authored Aug 8, 2023
2 parents b40417d + 1364196 commit 8c66f9b
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 8c66f9b

Please sign in to comment.