IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 761248fd authored by Felix Riehn's avatar Felix Riehn Committed by ralfulrich
Browse files

use conversion in interaction

parent d6631c3d
No related branches found
No related tags found
1 merge request!318Resolve "EPOS is missing"
......@@ -263,15 +263,29 @@ namespace corsika::epos {
// ::epos::nucl1_.laproj = projectile.get_nucleus_Z(); // Z
// ::epos::nucl1_.maproj = projectile.get_nucleus_A();; // A
// } else {
::epos::hadr25_.idprojin = 1120 ; // id "NEXUS code"
::epos::hadr25_.idprojin = convertToEposRaw(corsikaBeamId); //1120 ; // id "NEXUS code"
::epos::nucl1_.laproj = -1; // Z (-1 for hadron)
::epos::nucl1_.maproj = 1; // A
//}
// target
//if(is_nucleus(targetCode)){
::epos::hadr25_.idtargin = 1120; // id "NEXUS code"
::epos::nucl1_.latarg = 1; // Z (-1 with id 1220 for neutron)
::epos::nucl1_.matarg = 1; // A
int targetMassNumber = 1; // proton
if (is_nucleus(targetCode)) { // nucleus
targetMassNumber = get_nucleus_A(targetCode);
if (targetMassNumber > maxTargetMassNumber_)
throw std::runtime_error("Epos target mass outside range.");
} else {
if (targetCode != Proton::code || targetCode != Neutron::code)
throw std::runtime_error("Epos target not possible.");
// proton or neutron target
::epos::hadr25_.idtargin = convertToEposRaw(targetCode);
if (targetCode == Proton::code)
::epos::nucl1_.latarg = 1; // Z
else
::epos::nucl1_.latarg = -1; // Z (-1 with id 1220 for neutron)
::epos::nucl1_.matarg = 1; // A
}
CORSIKA_LOG_DEBUG("Interaction: target epos code/A: {}", targetMassNumber);
// hadron-nucleon momentum
::epos::hadr1_.pnll = float(200);
......
......@@ -55,8 +55,8 @@ namespace corsika::epos {
default_prng_type& RNG_ = RNGManager::getInstance().getRandomStream("epos");
HEPEnergyType const minEnergyCoM_ = -10. * 1e9 * electronvolt;
HEPEnergyType const maxEnergyCoM_ = -1.e6 * 1e9 * electronvolt;
int const maxTargetMassNumber_ = -1;
int const minNuclearTargetA_ = -10;
int const maxTargetMassNumber_ = 20;
int const minNuclearTargetA_ = 4;
};
} // namespace corsika::epos
......
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