IAP GITLAB

Skip to content
Snippets Groups Projects
Commit e7e34470 authored by ralfulrich's avatar ralfulrich
Browse files

there is no momentum update in bethe-bloch, just kinetic energy.

parent 2ffa9f2d
No related branches found
No related tags found
No related merge requests found
...@@ -163,8 +163,7 @@ namespace corsika { ...@@ -163,8 +163,7 @@ namespace corsika {
auto Enew = E + dE; auto Enew = E + dE;
CORSIKA_LOG_TRACE("EnergyLoss dE={} MeV, E={} GeV, Ekin={} GeV, Enew={} GeV", CORSIKA_LOG_TRACE("EnergyLoss dE={} MeV, E={} GeV, Ekin={} GeV, Enew={} GeV",
dE / 1_MeV, E / 1_GeV, Ekin / 1_GeV, Enew / 1_GeV); dE / 1_MeV, E / 1_GeV, Ekin / 1_GeV, Enew / 1_GeV);
p.setEnergy(Enew); p.setEnergy(Enew); // kinetic energy on stack
updateMomentum(p, Enew);
fillProfile(t, dE); fillProfile(t, dE);
return ProcessReturn::Ok; return ProcessReturn::Ok;
} }
...@@ -194,13 +193,6 @@ namespace corsika { ...@@ -194,13 +193,6 @@ namespace corsika {
vTrack, maxGrammage); vTrack, maxGrammage);
} }
template <typename TParticle>
inline void BetheBlochPDG::updateMomentum(TParticle& vP, HEPEnergyType Enew) {
HEPMomentumType Pnew = elab2plab(Enew, vP.getMass());
auto pnew = vP.getMomentum();
vP.setMomentum(pnew * Pnew / pnew.getNorm());
}
template <typename TTrajectory> template <typename TTrajectory>
inline void BetheBlochPDG::fillProfile(TTrajectory const& vTrack, inline void BetheBlochPDG::fillProfile(TTrajectory const& vTrack,
const HEPEnergyType dE) { const HEPEnergyType dE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment