Skip to content

Commit

Permalink
Merge pull request #42236 from sbein/from-CMSSW_10_6_X_2023-07-10-2300
Browse files Browse the repository at this point in the history
Ensure electron mass does not go to 0 after FastSim bremsstrahlung
  • Loading branch information
cmsbuild authored Aug 17, 2023
2 parents bf7ba25 + a9022f2 commit 2c7c8d7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ void fastsim::Bremsstrahlung::interact(fastsim::Particle & particle, const Simpl
// 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 @@ -164,6 +165,9 @@ void fastsim::Bremsstrahlung::interact(fastsim::Particle & particle, const Simpl

// Update the original e+/-
particle.momentum() -= photonMom;

// Reset mass to original, since the above codes for decay e->e+gamma, ignoring proton
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 2c7c8d7

Please sign in to comment.