IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 6db75839 authored by Felix Riehn's avatar Felix Riehn Committed by Maximilian Reininghaus
Browse files

add warning when setting particles unstable in epos

parent 8dc690f0
No related branches found
No related tags found
1 merge request!449Fix epos again again
...@@ -48,6 +48,11 @@ namespace corsika::epos { ...@@ -48,6 +48,11 @@ namespace corsika::epos {
if (eid != 0) { if (eid != 0) {
::epos::nodcy_.nrnody = ::epos::nodcy_.nrnody + 1; ::epos::nodcy_.nrnody = ::epos::nodcy_.nrnody + 1;
::epos::nodcy_.nody[::epos::nodcy_.nrnody - 1] = eid; ::epos::nodcy_.nody[::epos::nodcy_.nrnody - 1] = eid;
} else {
CORSIKA_LOG_WARN(
"particle conversion Corsika-->Epos not known for {}. Using {}. Setting "
"unstable in Epos!",
p, eid);
} }
} }
} }
...@@ -284,7 +289,7 @@ namespace corsika::epos { ...@@ -284,7 +289,7 @@ namespace corsika::epos {
"beamA={}, " "beamA={}, "
"beamZ={} " "beamZ={} "
"targetId={}, " "targetId={}, "
"ELab={:4.3f} GeV,", "ELab={:12.2f} GeV,",
BeamId, BeamA, BeamZ, TargetId, EnergyLab / 1_GeV); BeamId, BeamA, BeamZ, TargetId, EnergyLab / 1_GeV);
// read cross section from epos internal tables // read cross section from epos internal tables
...@@ -300,7 +305,7 @@ namespace corsika::epos { ...@@ -300,7 +305,7 @@ namespace corsika::epos {
int const iBeam = epos::getEposXSCode( int const iBeam = epos::getEposXSCode(
BeamId); // 0 (can not interact, 1: pion-like, 2: proton-like, 3:kaon-like) BeamId); // 0 (can not interact, 1: pion-like, 2: proton-like, 3:kaon-like)
CORSIKA_LOGGER_TRACE(logger_, CORSIKA_LOGGER_TRACE(logger_,
"projectile cross section type={} " "readCrossSectionTableLab: projectile cross section type={} "
"(0: cannot interact, 1:pion, 2:baryon, 3:kaon)", "(0: cannot interact, 1:pion, 2:baryon, 3:kaon)",
iBeam); iBeam);
...@@ -314,16 +319,25 @@ namespace corsika::epos { ...@@ -314,16 +319,25 @@ namespace corsika::epos {
int iMode = 3; // 0: air, >0 not air int iMode = 3; // 0: air, >0 not air
CORSIKA_LOGGER_DEBUG(logger_, CORSIKA_LOGGER_TRACE(logger_,
"inside Epos " "readCrossSectionTableLab: inside Epos "
"beamId={}, beamXS={}", "beamId={}, beamXS={}",
::epos::hadr2_.idproj, ::epos::had10_.iclpro); ::epos::hadr2_.idproj, ::epos::had10_.iclpro);
CORSIKA_LOGGER_TRACE(logger_,
"readCrossSectionTableLab: calling Epos cross section with"
"Ekin = {}, Abeam = {}, Atarget = {}, iMode = {}",
Ekin, Abeam, Atarget, iMode);
// cross section from table, FAST // cross section from table, FAST
float sigProdEpos = ::epos::eposcrse_(Ekin, Abeam, Atarget, iMode); float sigProdEpos = ::epos::eposcrse_(Ekin, Abeam, Atarget, iMode);
// sig-el from analytic calculation, no fast // sig-el from analytic calculation, no fast
float sigElaEpos = ::epos::eposelacrse_(Ekin, Abeam, Atarget, iMode); float sigElaEpos = ::epos::eposelacrse_(Ekin, Abeam, Atarget, iMode);
CORSIKA_LOGGER_TRACE(logger_,
"readCrossSectionTableLab: result: sigProd = {}, sigEla = {}",
sigProdEpos, sigElaEpos);
return std::make_tuple(sigProdEpos * 1_mb, sigElaEpos * 1_mb); return std::make_tuple(sigProdEpos * 1_mb, sigElaEpos * 1_mb);
} }
......
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