From 84de4c029dbe8f99406ad3125f453937c9e4cc31 Mon Sep 17 00:00:00 2001 From: Felix Riehn <felix@matilda> Date: Thu, 23 Apr 2020 14:36:50 +0100 Subject: [PATCH] add qgsjetII id --- Documentation/Examples/CMakeLists.txt | 2 +- Documentation/Examples/particle_list_example.cc | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Documentation/Examples/CMakeLists.txt b/Documentation/Examples/CMakeLists.txt index af5958a0b..3cce06787 100644 --- a/Documentation/Examples/CMakeLists.txt +++ b/Documentation/Examples/CMakeLists.txt @@ -3,7 +3,7 @@ target_link_libraries (helix_example CORSIKAgeometry CORSIKAunits) install (TARGETS helix_example DESTINATION share/examples) CORSIKA_ADD_TEST (particle_list_example) -target_link_libraries (particle_list_example CORSIKAparticles CORSIKAunits CORSIKAprocesses ProcessSibyll) +target_link_libraries (particle_list_example CORSIKAparticles CORSIKAunits CORSIKAprocesses ProcessSibyll ProcessQGSJetII) install (TARGETS particle_list_example DESTINATION share/examples) CORSIKA_ADD_TEST (geometry_example) diff --git a/Documentation/Examples/particle_list_example.cc b/Documentation/Examples/particle_list_example.cc index 90645159a..51cd31c9b 100644 --- a/Documentation/Examples/particle_list_example.cc +++ b/Documentation/Examples/particle_list_example.cc @@ -10,6 +10,7 @@ #include <corsika/particles/ParticleProperties.h> #include <corsika/process/ProcessSequence.h> +#include <corsika/process/qgsjetII/ParticleConversion.h> #include <corsika/process/sibyll/ParticleConversion.h> #include <corsika/setup/SetupEnvironment.h> #include <corsika/units/PhysicalUnits.h> @@ -25,23 +26,26 @@ using namespace std; // The example main program for a particle list // int main() { - cout << "--------------------" + cout << "------------------------------------------" << "particles in CORSIKA" - << "--------------------" << endl; + << "------------------------------------------" << endl; cout << std::setw(20) << "Name" << " | " << std::setw(10) << "PDG-id" << " | " << std::setw(10) << "SIBYLL-id" + << " | " << std::setw(10) << "QGSJETII-id" << " | " << std::setw(18) << "PDG-mass (GeV)" << " | " << std::setw(18) << "SIBYLL-mass (GeV)" << " | " << endl; - cout << std::setw(58) << std::setfill('-') << "-" << endl; + cout << std::setw(104) << std::setfill('-') << "-" << endl; for (auto p : corsika::particles::detail::all_particles) { if (p != Code::Unknown && !IsNucleus(p)) cout << std::setw(20) << std::setfill(' ') << p << " | " << std::setw(10) << static_cast<int>(GetPDG(p)) << " | " << std::setw(10) << static_cast<int>(corsika::process::sibyll::ConvertToSibyll(p)) << " | " + << std::setw(10) + << static_cast<int>(corsika::process::qgsjetII::ConvertToQgsjetII(p)) << " | " << std::setw(18) << GetMass(p) / 1_GeV << " | " << std::setw(18) << corsika::process::sibyll::GetSibyllMass(p) / 1_GeV << " | " << endl; } - cout << std::setw(54) << std::setfill('-') << "-" << endl; + cout << std::setw(104) << std::setfill('-') << "-" << endl; } -- GitLab