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 { ...@@ -263,15 +263,29 @@ namespace corsika::epos {
// ::epos::nucl1_.laproj = projectile.get_nucleus_Z(); // Z // ::epos::nucl1_.laproj = projectile.get_nucleus_Z(); // Z
// ::epos::nucl1_.maproj = projectile.get_nucleus_A();; // A // ::epos::nucl1_.maproj = projectile.get_nucleus_A();; // A
// } else { // } 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_.laproj = -1; // Z (-1 for hadron)
::epos::nucl1_.maproj = 1; // A ::epos::nucl1_.maproj = 1; // A
//} //}
// target // target
//if(is_nucleus(targetCode)){ int targetMassNumber = 1; // proton
::epos::hadr25_.idtargin = 1120; // id "NEXUS code" if (is_nucleus(targetCode)) { // nucleus
::epos::nucl1_.latarg = 1; // Z (-1 with id 1220 for neutron) targetMassNumber = get_nucleus_A(targetCode);
::epos::nucl1_.matarg = 1; // A 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 // hadron-nucleon momentum
::epos::hadr1_.pnll = float(200); ::epos::hadr1_.pnll = float(200);
......
...@@ -55,8 +55,8 @@ namespace corsika::epos { ...@@ -55,8 +55,8 @@ namespace corsika::epos {
default_prng_type& RNG_ = RNGManager::getInstance().getRandomStream("epos"); default_prng_type& RNG_ = RNGManager::getInstance().getRandomStream("epos");
HEPEnergyType const minEnergyCoM_ = -10. * 1e9 * electronvolt; HEPEnergyType const minEnergyCoM_ = -10. * 1e9 * electronvolt;
HEPEnergyType const maxEnergyCoM_ = -1.e6 * 1e9 * electronvolt; HEPEnergyType const maxEnergyCoM_ = -1.e6 * 1e9 * electronvolt;
int const maxTargetMassNumber_ = -1; int const maxTargetMassNumber_ = 20;
int const minNuclearTargetA_ = -10; int const minNuclearTargetA_ = 4;
}; };
} // namespace corsika::epos } // 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