IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b4f5d5b1 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by Maximilian Reininghaus
Browse files

K0Long to K0 K0Bar conversion in event generation

parent bd44dc4d
No related branches found
No related tags found
1 merge request!124Resolve "Neutral kaon mixing for UrQMD"
......@@ -109,7 +109,7 @@ GrammageType UrQMD::GetInteractionLength(SetupParticle& vParticle) const {
corsika::process::EProcessReturn UrQMD::DoInteraction(SetupProjectile& vProjectile) {
using namespace units::si;
auto const projectileCode = vProjectile.GetPID();
auto projectileCode = vProjectile.GetPID();
auto const projectileEnergyLab = vProjectile.GetEnergy();
auto const& projectileMomentumLab = vProjectile.GetMomentum();
auto const& projectilePosition = vProjectile.GetPosition();
......@@ -159,6 +159,13 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupProjectile& vProjecti
rsys_.bdist = nucrad_(targetA) + nucrad_(1) + 2 * options_.CTParam[30 - 1];
rsys_.ebeam = (projectileEnergyLab - vProjectile.GetMass()) * (1 / 1_GeV);
if (projectileCode == particles::Code::K0Long) {
std::uniform_int_distribution dist(0, 1);
projectileCode = (dist(fRNG) == 1) ? particles::Code::K0 : particles::Code::K0Bar;
} else if (projectileCode == particles::Code::K0Short) {
throw std::runtime_error("K0Short should not interact");
}
auto const [ityp, iso3] = ConvertToUrQMD(projectileCode);
// todo: conversion of K_long/short into strong eigenstates;
inputs_.spityp[0] = ityp;
......
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