IAP GITLAB

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

add qgsjetII id

parent 86bbba26
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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;
}
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