IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 0a7077f1 authored by Felix Riehn's avatar Felix Riehn
Browse files

shut up pythia

parent 3c603763
No related branches found
No related tags found
1 merge request!549Draft: "Use Pythia for interactions"
...@@ -50,7 +50,7 @@ namespace corsika::pythia8 { ...@@ -50,7 +50,7 @@ namespace corsika::pythia8 {
pythia_.readString("Beams:allowVariableEnergy = on"); pythia_.readString("Beams:allowVariableEnergy = on");
pythia_.readString("Beams:frameType = 1"); // CoM pythia_.readString("Beams:frameType = 1"); // CoM
pythia_.settings.parm("Beams:eCM", 400_TeV/1_GeV); pythia_.settings.parm("Beams:eCM", 400_TeV / 1_GeV);
// needed when regular Pythia (not Angantyr) takes over for pp // needed when regular Pythia (not Angantyr) takes over for pp
pythia_.readString("SoftQCD:all = on"); pythia_.readString("SoftQCD:all = on");
...@@ -74,7 +74,7 @@ namespace corsika::pythia8 { ...@@ -74,7 +74,7 @@ namespace corsika::pythia8 {
pythia_.readString("HadronLevel:Decay = off"); pythia_.readString("HadronLevel:Decay = off");
// Reduce printout and relax energy-momentum conservation. // Reduce printout and relax energy-momentum conservation.
//pythia_.readString("Print:quiet = on"); pythia_.readString("Print:quiet = on");
pythia_.readString("Check:epTolErr = 0.1"); pythia_.readString("Check:epTolErr = 0.1");
pythia_.readString("Check:epTolWarn = 0.0001"); pythia_.readString("Check:epTolWarn = 0.0001");
pythia_.readString("Check:mTolErr = 0.01"); pythia_.readString("Check:mTolErr = 0.01");
...@@ -218,10 +218,11 @@ namespace corsika::pythia8 { ...@@ -218,10 +218,11 @@ namespace corsika::pythia8 {
projectileId, corsika::pythia8::Interaction::canInteract(projectileId)); projectileId, corsika::pythia8::Interaction::canInteract(projectileId));
// define system (this is Nucleus-Nucleus!!) // define system (this is Nucleus-Nucleus!!)
auto const sqrtS2NN = (projectileP4 + targetP4/get_nucleus_A(targetId)).getNormSqr(); auto const sqrtS2NN =
(projectileP4 + targetP4 / get_nucleus_A(targetId)).getNormSqr();
HEPEnergyType const sqrtSNN = sqrt(sqrtS2NN); HEPEnergyType const sqrtSNN = sqrt(sqrtS2NN);
HEPEnergyType const eProjectileLab = HEPEnergyType const eProjectileLab = calculate_lab_energy(
calculate_lab_energy(sqrtS2NN, get_mass(projectileId), get_mass(targetId)/get_nucleus_A(targetId)); sqrtS2NN, get_mass(projectileId), get_mass(targetId) / get_nucleus_A(targetId));
if (!isValid(projectileId, targetId, sqrtSNN)) { if (!isValid(projectileId, targetId, sqrtSNN)) {
throw std::runtime_error("invalid target,projectile,energy combination."); throw std::runtime_error("invalid target,projectile,energy combination.");
...@@ -240,11 +241,11 @@ namespace corsika::pythia8 { ...@@ -240,11 +241,11 @@ namespace corsika::pythia8 {
// auto const pProjLab = proj4MomLab.getSpaceLikeComponents().getComponents(rotCS); // auto const pProjLab = proj4MomLab.getSpaceLikeComponents().getComponents(rotCS);
// variables to talk to Pythia // variables to talk to Pythia
double const eCM_pythia = double const eCM_pythia = sqrtSNN / 1_GeV; // CoM energy hadron-Nucleon
sqrtSNN / 1_GeV; // CoM energy hadron-Nucleon
double const idA_pythia = static_cast<double>(get_PDG(projectileId)); double const idA_pythia = static_cast<double>(get_PDG(projectileId));
double const idB_pythia = static_cast<double>(get_PDG(targetId)); double const idB_pythia = static_cast<double>(get_PDG(targetId));
CORSIKA_LOG_INFO("re-configuring pythia idA={}, idB={}, ecm={} GeV", idA_pythia, idB_pythia, eCM_pythia); CORSIKA_LOG_INFO("re-configuring pythia idA={}, idB={}, ecm={} GeV", idA_pythia,
idB_pythia, eCM_pythia);
// configure event // configure event
pythia_.setBeamIDs(idA_pythia, idB_pythia); pythia_.setBeamIDs(idA_pythia, idB_pythia);
pythia_.setKinematics(eCM_pythia); pythia_.setKinematics(eCM_pythia);
......
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