IAP GITLAB

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

allow K0Short interaction in UrQMD

parent a7a109b4
No related branches found
No related tags found
2 merge requests!234WIP: Initial example of python as script language from C++,!205UrQMD improvements
...@@ -292,10 +292,9 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupProjectile& vProjecti ...@@ -292,10 +292,9 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupProjectile& vProjecti
rsys_.bdist = nucrad_(targetA) + nucrad_(1) + 2 * options_.CTParam[30 - 1]; rsys_.bdist = nucrad_(targetA) + nucrad_(1) + 2 * options_.CTParam[30 - 1];
rsys_.ebeam = (projectileEnergyLab - vProjectile.GetMass()) * (1 / 1_GeV); rsys_.ebeam = (projectileEnergyLab - vProjectile.GetMass()) * (1 / 1_GeV);
if (projectileCode == particles::Code::K0Long) { if (projectileCode == particles::Code::K0Long ||
projectileCode == particles::Code::K0Short) {
projectileCode = fBooleanDist(fRNG) ? particles::Code::K0 : particles::Code::K0Bar; projectileCode = fBooleanDist(fRNG) ? 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); auto const [ityp, iso3] = ConvertToUrQMD(projectileCode);
...@@ -438,9 +437,7 @@ std::pair<int, int> corsika::process::UrQMD::ConvertToUrQMD( ...@@ -438,9 +437,7 @@ std::pair<int, int> corsika::process::UrQMD::ConvertToUrQMD(
void UrQMD::readXSFile(std::string const& filename) { void UrQMD::readXSFile(std::string const& filename) {
std::ifstream file(filename, std::ios::in); std::ifstream file(filename, std::ios::in);
if (!file.is_open()) { if (!file.is_open()) { throw std::runtime_error(filename + " could not be opened."); }
throw std::runtime_error(filename + " could not be opened.");
}
std::string line; std::string line;
......
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