IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 220750df authored by Ralf M Ulrich's avatar Ralf M Ulrich
Browse files

Merge branch '257-particle-list-example'

parents d91131b9 add4ca92
No related branches found
No related tags found
1 merge request!186Resolve "particle list example"
Pipeline #1303 canceled
Showing with 330 additions and 163 deletions
...@@ -2,6 +2,10 @@ CORSIKA_ADD_TEST (helix_example) ...@@ -2,6 +2,10 @@ CORSIKA_ADD_TEST (helix_example)
target_link_libraries (helix_example CORSIKAgeometry CORSIKAunits) target_link_libraries (helix_example CORSIKAgeometry CORSIKAunits)
install (TARGETS helix_example DESTINATION share/examples) install (TARGETS helix_example DESTINATION share/examples)
CORSIKA_ADD_TEST (particle_list_example)
target_link_libraries (particle_list_example CORSIKAparticles CORSIKAunits CORSIKAprocesses ProcessSibyll ProcessQGSJetII)
install (TARGETS particle_list_example DESTINATION share/examples)
CORSIKA_ADD_TEST (geometry_example) CORSIKA_ADD_TEST (geometry_example)
target_link_libraries (geometry_example CORSIKAgeometry CORSIKAunits) target_link_libraries (geometry_example CORSIKAgeometry CORSIKAunits)
install (TARGETS geometry_example DESTINATION share/examples) install (TARGETS geometry_example DESTINATION share/examples)
......
/*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* See file AUTHORS for a list of contributors.
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#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>
#include <iomanip>
#include <iostream>
#include <string>
using namespace corsika::units;
using namespace corsika::units::si;
using namespace corsika::particles;
using namespace std;
//
// The example main program for a particle list
//
int main() {
cout << "------------------------------------------"
<< "particles in CORSIKA"
<< "------------------------------------------" << 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(104) << std::setfill('-') << "-" << endl;
for (auto p : getAllParticles()) {
if (!IsNucleus(p)) {
corsika::process::sibyll::SibyllCode sib_id =
corsika::process::sibyll::ConvertToSibyll(p);
auto const sib_mass =
(sib_id != corsika::process::sibyll::SibyllCode::Unknown
? to_string(corsika::process::sibyll::GetSibyllMass(p) / 1_GeV)
: "--");
auto const qgs_id =
corsika::process::qgsjetII::ConvertToQgsjetII(p);
cout << std::setw(20) << std::setfill(' ') << p << " | " << std::setw(10)
<< static_cast<int>(GetPDG(p)) << " | " << std::setw(10)
<< (sib_id != corsika::process::sibyll::SibyllCode::Unknown
? to_string(static_cast<int>(sib_id))
: "--")
<< " | " << std::setw(10)
<< (qgs_id != corsika::process::qgsjetII::QgsjetIICode::Unknown
? to_string(static_cast<int>(qgs_id))
: "--")
<< " | "
<< std::setw(18) << std::setprecision(5) << GetMass(p) / 1_GeV << " | "
<< std::setw(18) << std::setprecision(5) << sib_mass << " | " << endl;
}
}
cout << std::setw(104) << std::setfill('-') << "-" << endl;
}
...@@ -152,6 +152,10 @@ namespace corsika::particles { ...@@ -152,6 +152,10 @@ namespace corsika::particles {
return Proton::GetMass() * vZ + (vA - vZ) * Neutron::GetMass(); return Proton::GetMass() * vZ + (vA - vZ) * Neutron::GetMass();
} }
std::initializer_list<Code> constexpr getAllParticles() {
return detail::all_particles;
}
} // namespace corsika::particles } // namespace corsika::particles
#endif #endif
...@@ -316,6 +316,13 @@ def gen_properties(particle_db): ...@@ -316,6 +316,13 @@ def gen_properties(particle_db):
# number of particles, size of tables # number of particles, size of tables
string = "static constexpr std::size_t size = {size:d};\n".format(size = len(particle_db)) string = "static constexpr std::size_t size = {size:d};\n".format(size = len(particle_db))
string += "\n" string += "\n"
# all particle initializer_list
string += "constexpr std::initializer_list<Code> all_particles = {"
for k in particle_db:
string += " Code::{name:s},\n".format(name = k)
string += "};\n"
string += "\n"
# particle masses table # particle masses table
string += "static constexpr std::array<corsika::units::si::HEPMassType const, size> masses = {\n" string += "static constexpr std::array<corsika::units::si::HEPMassType const, size> masses = {\n"
......
...@@ -58,8 +58,7 @@ namespace corsika::process::qgsjetII { ...@@ -58,8 +58,7 @@ namespace corsika::process::qgsjetII {
#include <corsika/process/qgsjetII/Generated.inc> #include <corsika/process/qgsjetII/Generated.inc>
QgsjetIICode constexpr ConvertToQgsjetII(corsika::particles::Code pCode) { QgsjetIICode constexpr ConvertToQgsjetII(corsika::particles::Code pCode) {
return static_cast<QgsjetIICode>( return corsika2qgsjetII[static_cast<corsika::particles::CodeIntType>(pCode)];
corsika2qgsjetII[static_cast<corsika::particles::CodeIntType>(pCode)]);
} }
corsika::particles::Code constexpr ConvertFromQgsjetII(QgsjetIICode pCode) { corsika::particles::Code constexpr ConvertFromQgsjetII(QgsjetIICode pCode) {
......
...@@ -13,15 +13,26 @@ import pickle, sys, itertools ...@@ -13,15 +13,26 @@ import pickle, sys, itertools
# loads the pickled particle_db (which is an OrderedDict)
# definition of particle_db dict is: "name", "antiName", "pdg", "mass", "electric_charge", "lifetime", "ngc_code", "isNucleus", "isHadron"
def load_particledb(filename): def load_particledb(filename):
'''
loads the pickled particle_db (which is an OrderedDict)
definition of particle_db dict is: "name", "antiName", "pdg", "mass", "electric_charge", "lifetime", "ngc_code", "isNucleus", "isHadron"
'''
with open(filename, "rb") as f: with open(filename, "rb") as f:
particle_db = pickle.load(f) particle_db = pickle.load(f)
return particle_db return particle_db
def set_default_qgsjetII_definition(particle_db): def set_default_qgsjetII_definition(particle_db):
'''
Also particles not explicitly known by QGSJetII may in fact interact via mapping
to cross section types (xsType) and hadron type (hadronType)
This is achieved here.
The function return nothing, but modified the input particle_db by adding the
fields 'xsType' and 'hadronType'
'''
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
# the cross-section types # the cross-section types
xsType = "CannotInteract" xsType = "CannotInteract"
...@@ -43,7 +54,7 @@ def set_default_qgsjetII_definition(particle_db): ...@@ -43,7 +54,7 @@ def set_default_qgsjetII_definition(particle_db):
hadronType = "PiPlusType" hadronType = "PiPlusType"
else: else:
hadronType = "PiMinusType" hadronType = "PiMinusType"
elif ((pdg>=300 and pdg<400) or pdg in [130, 10313, 10323]): # kanos elif ((pdg>=300 and pdg<400) or pdg in [130, 10313, 10323]): # kaons
xsType = "Kaons" xsType = "Kaons"
if (charge>0): if (charge>0):
hadronType = "KaonPlusType" hadronType = "KaonPlusType"
...@@ -69,13 +80,15 @@ def set_default_qgsjetII_definition(particle_db): ...@@ -69,13 +80,15 @@ def set_default_qgsjetII_definition(particle_db):
hadronType = "AntiProtonType" hadronType = "AntiProtonType"
# all othe not-captured cased are hopefully irrelevant # all othe not-captured cased are hopefully irrelevant
pData['qgsjetII_xsType'] = xsType pData['qgsjetII_xsType'] = xsType
pData['qgsjetII_hadronType'] = hadronType pData['qgsjetII_hadronType'] = hadronType
# read the qgsjet-codes data file
def read_qgsjetII_codes(filename, particle_db): def read_qgsjetII_codes(filename, particle_db):
'''
reads the qgsjet-codes data file. For particles known to QGSJetII the 'qgsjetII_code' is set in the particle_db, as
well as the 'xsType' is updated in case it is different from its default value set above.
'''
with open(filename) as f: with open(filename) as f:
for line in f: for line in f:
line = line.strip() line = line.strip()
...@@ -91,28 +104,36 @@ def read_qgsjetII_codes(filename, particle_db): ...@@ -91,28 +104,36 @@ def read_qgsjetII_codes(filename, particle_db):
raise Exception("Identifier '{:s}' not found in particle_db".format(identifier)) raise Exception("Identifier '{:s}' not found in particle_db".format(identifier))
# generates the enum to access qgsjetII particles by readable names
def generate_qgsjetII_enum(particle_db): def generate_qgsjetII_enum(particle_db):
'''
generates the enum to access qgsjetII particles by readable names
'''
output = "enum class QgsjetIICode : int8_t {\n" output = "enum class QgsjetIICode : int8_t {\n"
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
if pData.get('qgsjetII_code') != None: if 'qgsjetII_code' in pData:
output += " {:s} = {:d},\n".format(identifier, pData['qgsjetII_code']) output += " {:s} = {:d},\n".format(identifier, pData['qgsjetII_code'])
output += "};\n" output += "};\n"
return output return output
# generates the look-up table to convert corsika codes to qgsjetII codes
def generate_corsika2qgsjetII(particle_db): def generate_corsika2qgsjetII(particle_db):
string = "std::array<QgsjetIICodeIntType, {:d}> constexpr corsika2qgsjetII = {{\n".format(len(particle_db)) '''
generates the look-up table to convert corsika codes to qgsjetII codes
'''
string = "std::array<QgsjetIICode, {:d}> constexpr corsika2qgsjetII = {{\n".format(len(particle_db))
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
modelCode = pData.get("qgsjetII_code", 0) if 'qgsjetII_code' in pData:
string += " {:d}, // {:s}\n".format(modelCode, identifier if modelCode else identifier + " (not implemented in QGSJETII)") string += " QgsjetIICode::{:s}, \n".format(identifier)
else:
string += " QgsjetIICode::Unknown, // {:s}\n".format(identifier + ' not implemented in QGSJetII')
string += "};\n" string += "};\n"
return string return string
# generates the look-up table to convert corsika codes to qgsjetII codes
def generate_corsika2qgsjetII_xsType(particle_db): def generate_corsika2qgsjetII_xsType(particle_db):
'''
generates the look-up table to convert corsika codes to qgsjetII codes
'''
string = "std::array<QgsjetIIXSClass, {:d}> constexpr corsika2qgsjetIIXStype = {{\n".format(len(particle_db)) string = "std::array<QgsjetIIXSClass, {:d}> constexpr corsika2qgsjetIIXStype = {{\n".format(len(particle_db))
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
modelCodeXS = pData.get("qgsjetII_xsType", "CannotInteract") modelCodeXS = pData.get("qgsjetII_xsType", "CannotInteract")
...@@ -121,8 +142,10 @@ def generate_corsika2qgsjetII_xsType(particle_db): ...@@ -121,8 +142,10 @@ def generate_corsika2qgsjetII_xsType(particle_db):
return string return string
# generates the look-up table to convert corsika codes to qgsjetII codes
def generate_corsika2qgsjetII_hadronType(particle_db): def generate_corsika2qgsjetII_hadronType(particle_db):
'''
generates the look-up table to convert corsika codes to qgsjetII codes
'''
string = "std::array<QgsjetIIHadronType, {:d}> constexpr corsika2qgsjetIIHadronType = {{\n".format(len(particle_db)) string = "std::array<QgsjetIIHadronType, {:d}> constexpr corsika2qgsjetIIHadronType = {{\n".format(len(particle_db))
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
modelCode = pData.get("qgsjetII_hadronType", "UndefinedType") modelCode = pData.get("qgsjetII_hadronType", "UndefinedType")
...@@ -131,8 +154,10 @@ def generate_corsika2qgsjetII_hadronType(particle_db): ...@@ -131,8 +154,10 @@ def generate_corsika2qgsjetII_hadronType(particle_db):
return string return string
# generates the look-up table to convert qgsjetII codes to corsika codes
def generate_qgsjetII2corsika(particle_db) : def generate_qgsjetII2corsika(particle_db) :
'''
generates the look-up table to convert qgsjetII codes to corsika codes
'''
minID = 0 minID = 0
for identifier, pData in particle_db.items() : for identifier, pData in particle_db.items() :
if 'qgsjetII_code' in pData: if 'qgsjetII_code' in pData:
......
# input file for particle conversion to/from QGSJet # input file for particle conversion to/from QGSJet
# the format of this file is: "corsika-identifier" "qgsjet-id" "xs-class" # the format of this file is: "corsika-identifier" "qgsjet-id" "xs-class"
# The 'Unknown' particle is needed to mark all particles qgsjetII does
# not know
# IMPORTANT Note: the code "20" MAY NOT BE USED by qgsjetII. Change to
# another positive integer if a conflict arises. Since we use std::array
# to store PID data keep the number as low as reasonable.
Unknown 20 CannotInteract
# Note, we list here only the particles, which are produced by # Note, we list here only the particles, which are produced by
# QGSJetII as secondaries. There is additional mapping of corsika # QGSJetII as secondaries. There is additional mapping of corsika
# particles on QGSJetII "xs-class"es and "hadron-type"s, which are # particles on QGSJetII "xs-class"es and "hadron-type"s, which are
......
...@@ -13,7 +13,15 @@ ...@@ -13,7 +13,15 @@
using namespace corsika::process::sibyll; using namespace corsika::process::sibyll;
// const std::map<sibyll::PID, ParticleProperties::InternalParticleCode> corsika::units::si::HEPMassType corsika::process::sibyll::GetSibyllMass(
// process::sibyll::Sibyll2Corsika = { corsika::particles::Code const pCode) {
// {PID::E_MINUS, InternalParticleCode::Electron}, using namespace corsika::units;
//}; using namespace corsika::units::si;
if (pCode == corsika::particles::Code::Nucleus)
throw std::runtime_error("Cannot GetMass() of particle::Nucleus -> unspecified");
auto sCode = ConvertToSibyllRaw(pCode);
if (sCode == 0)
throw std::runtime_error("GetSibyllMass: unknown particle!");
else
return sqrt(get_sibyll_mass2(sCode)) * 1_GeV;
}
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#define _include_processes_sibyll_particles_h_ #define _include_processes_sibyll_particles_h_
#include <corsika/particles/ParticleProperties.h> #include <corsika/particles/ParticleProperties.h>
#include <corsika/process/sibyll/sibyll2.3c.h>
#include <corsika/units/PhysicalUnits.h>
#include <string> #include <string>
...@@ -20,11 +22,23 @@ namespace corsika::process::sibyll { ...@@ -20,11 +22,23 @@ namespace corsika::process::sibyll {
enum class SibyllCode : int8_t; enum class SibyllCode : int8_t;
using SibyllCodeIntType = std::underlying_type<SibyllCode>::type; using SibyllCodeIntType = std::underlying_type<SibyllCode>::type;
/**
These are the possible projectile for which Sibyll knows the cross section
*/
enum class SibyllXSClass : int8_t {
CannotInteract = 0,
Baryon = 1,
Pion = 2,
Kaon = 3,
};
using SibyllXSClassIntType = std::underlying_type<SibyllXSClass>::type;
#include <corsika/process/sibyll/Generated.inc> #include <corsika/process/sibyll/Generated.inc>
SibyllCode constexpr ConvertToSibyll(corsika::particles::Code pCode) { SibyllCode constexpr ConvertToSibyll(corsika::particles::Code pCode) {
return static_cast<SibyllCode>( return
corsika2sibyll[static_cast<corsika::particles::CodeIntType>(pCode)]); corsika2sibyll[static_cast<corsika::particles::CodeIntType>(pCode)];
} }
corsika::particles::Code constexpr ConvertFromSibyll(SibyllCode pCode) { corsika::particles::Code constexpr ConvertFromSibyll(SibyllCode pCode) {
...@@ -43,13 +57,15 @@ namespace corsika::process::sibyll { ...@@ -43,13 +57,15 @@ namespace corsika::process::sibyll {
} }
int constexpr GetSibyllXSCode(corsika::particles::Code pCode) { int constexpr GetSibyllXSCode(corsika::particles::Code pCode) {
return corsika2sibyllXStype[static_cast<corsika::particles::CodeIntType>(pCode)]; return static_cast<SibyllXSClassIntType>(corsika2sibyllXStype[static_cast<corsika::particles::CodeIntType>(pCode)]);
} }
bool constexpr CanInteract(corsika::particles::Code pCode) { bool constexpr CanInteract(corsika::particles::Code pCode) {
return GetSibyllXSCode(pCode) > 0; return GetSibyllXSCode(pCode) > 0;
} }
corsika::units::si::HEPMassType GetSibyllMass(corsika::particles::Code const);
} // namespace corsika::process::sibyll } // namespace corsika::process::sibyll
#endif #endif
...@@ -13,65 +13,83 @@ import pickle, sys, itertools ...@@ -13,65 +13,83 @@ import pickle, sys, itertools
# loads the pickled particle_db (which is an OrderedDict)
def load_particledb(filename): def load_particledb(filename):
'''
loads the pickled particle_db (which is an OrderedDict)
'''
with open(filename, "rb") as f: with open(filename, "rb") as f:
particle_db = pickle.load(f) particle_db = pickle.load(f)
return particle_db return particle_db
#
def read_sibyll_codes(filename, particle_db): def read_sibyll_codes(filename, particle_db):
'''
reads to sibyll codes data file
For particls known to sibyll, add 'sibyll_code' and 'sibyll_xsType' to particle_db
'''
with open(filename) as f: with open(filename) as f:
for line in f: for line in f:
line = line.strip() line = line.strip()
if line[0] == '#': if len(line)==0 or line[0] == '#':
continue continue
identifier, sib_code, canInteractFlag, xsType = line.split() identifier, sib_code, canInteractFlag, xsType = line.split()
try: try:
particle_db[identifier]["sibyll_code"] = int(sib_code) particle_db[identifier]["sibyll_code"] = int(sib_code)
particle_db[identifier]["sibyll_xsType"] = int(xsType) particle_db[identifier]["sibyll_xsType"] = xsType
except KeyError as e: except KeyError as e:
raise Exception("Identifier '{:s}' not found in particle_db".format(identifier)) raise Exception("Identifier '{:s}' not found in particle_db".format(identifier))
# generates the enum to access sibyll particles by readable names
def generate_sibyll_enum(particle_db): def generate_sibyll_enum(particle_db):
'''
generates the enum to access sibyll particles by readable names
'''
output = "enum class SibyllCode : int8_t {\n" output = "enum class SibyllCode : int8_t {\n"
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
if pData.get('sibyll_code') != None: if 'sibyll_code' in pData:
output += " {:s} = {:d},\n".format(identifier, pData['sibyll_code']) output += " {:s} = {:d},\n".format(identifier, pData['sibyll_code'])
output += "};\n" output += "};\n"
return output return output
# generates the look-up table to convert corsika codes to sibyll codes
def generate_corsika2sibyll(particle_db): def generate_corsika2sibyll(particle_db):
string = "std::array<SibyllCodeIntType, {:d}> constexpr corsika2sibyll = {{\n".format(len(particle_db)) '''
generates the look-up table to convert corsika codes to sibyll codes
'''
string = "std::array<SibyllCode, {:d}> constexpr corsika2sibyll = {{\n".format(len(particle_db))
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
sibCode = pData.get("sibyll_code", 0) if 'sibyll_code' in pData:
string += " {:d}, // {:s}\n".format(sibCode, identifier if sibCode else identifier + " (not implemented in SIBYLL)") string += " SibyllCode::{:s}, \n".format(identifier)
else:
string += " SibyllCode::Unknown, // {:s}\n".format(identifier + ' not implemented in SIBYLL')
string += "};\n" string += "};\n"
return string return string
# generates the look-up table to convert corsika codes to sibyll codes
def generate_corsika2sibyll_xsType(particle_db): def generate_corsika2sibyll_xsType(particle_db):
string = "std::array<int, {:d}> constexpr corsika2sibyllXStype = {{\n".format(len(particle_db)) '''
generates the look-up table to convert corsika codes to sibyll codes
'''
string = "std::array<SibyllXSClass, {:d}> constexpr corsika2sibyllXStype = {{\n".format(len(particle_db))
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
sibCodeXS = pData.get("sibyll_xsType", 0) if 'sibyll_xsType' in pData:
string += " {:d}, // {:s}\n".format(sibCodeXS, identifier if sibCodeXS else identifier + " (not implemented in SIBYLL)") string += " SibyllXSClass::{:s}, // {:s}\n".format(pData['sibyll_xsType'], identifier)
else:
string += " SibyllXSClass::CannotInteract, // {:s}\n".format(identifier + ' not implemented in SIBYLL')
string += "};\n" string += "};\n"
return string return string
# generates the look-up table to convert sibyll codes to corsika codes
def generate_sibyll2corsika(particle_db) : def generate_sibyll2corsika(particle_db) :
'''
generates the look-up table to convert sibyll codes to corsika codes
'''
string = "" string = ""
minID = 0 minID = 0
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <random> #include <random>
int get_nwounded() { return s_chist_.nwd; } int get_nwounded() { return s_chist_.nwd; }
double get_sibyll_mass2(int& id) { return s_mass1_.am2[id]; } double get_sibyll_mass2(int& id) { return s_mass1_.am2[abs(id) - 1]; }
double s_rndm_(int&) { double s_rndm_(int&) {
static corsika::random::RNG& rng = static corsika::random::RNG& rng =
......
# input file for particle conversion to/from SIBYLL # input file for particle conversion to/from SIBYLL
# the format of this file is: "corsika-identifier" "sibyll-id" "can-interact-in-sibyll" "cross-section-type" # the format of this file is: "corsika-identifier" "sibyll-id" "can-interact-in-sibyll" "cross-section-type"
Electron 3 0 0
Positron 2 0 0 # The unknown particle is to handle all particles that are not known to SIBYLL.
NuE 15 0 0 # It is important that sibyll-id does not overlap with any existing sibyll particle!
NuEBar 16 0 0 # Be careful
MuMinus 5 0 0 Unknown 0 0 CannotInteract
MuPlus 4 0 0
NuMu 17 0 0 # Here is the list of particles known to sibyll
NuMuBar 18 0 0 Electron 3 0 CannotInteract
TauMinus 91 0 0 Positron 2 0 CannotInteract
TauPlus 90 0 0 NuE 15 0 CannotInteract
NuTau 92 0 0 NuEBar 16 0 CannotInteract
NuTauBar 93 0 0 MuMinus 5 0 CannotInteract
Gamma 1 0 0 MuPlus 4 0 CannotInteract
Pi0 6 1 2 NuMu 17 0 CannotInteract
# rho0 could interact but sibyll has no cross section/interaction length. was used for gamma had int NuMuBar 18 0 CannotInteract
Rho0 27 0 0 TauMinus 91 0 CannotInteract
K0Long 11 1 3 TauPlus 90 0 CannotInteract
K0 21 0 3 NuTau 92 0 CannotInteract
K0Bar 22 0 3 NuTauBar 93 0 CannotInteract
PiPlus 7 1 2 Gamma 1 0 CannotInteract
PiMinus 8 1 2 Pi0 6 1 Pion
RhoPlus 25 0 0 # rho0 could interact but sibyll has no cross section/interaction length. was used for gamma had int
RhoMinus 26 0 0 Rho0 27 0 CannotInteract
Eta 23 0 0 K0Long 11 1 Kaon
EtaPrime 24 0 0 K0 21 0 Kaon
Pi1300Plus 62 0 0 K0Bar 22 0 Kaon
Pi1300Minus 63 0 0 PiPlus 7 1 Pion
Pi1300_0 61 0 0 PiMinus 8 1 Pion
Omega 32 0 0 RhoPlus 25 0 CannotInteract
K0Short 12 1 3 RhoMinus 26 0 CannotInteract
KStar0 30 0 0 Eta 23 0 CannotInteract
KStar0Bar 31 0 0 EtaPrime 24 0 CannotInteract
KPlus 9 1 3 Pi1300Plus 62 0 CannotInteract
KMinus 10 1 3 Pi1300Minus 63 0 CannotInteract
KStarPlus 28 0 0 Pi1300_0 61 0 CannotInteract
KStarMinus 29 0 0 Omega 32 0 CannotInteract
KStar0_1430_0 66 0 0 K0Short 12 1 Kaon
KStar0_1430_0Bar 67 0 0 KStar0 30 0 CannotInteract
KStar0_1430_Plus 64 0 0 KStar0Bar 31 0 CannotInteract
KStar0_1430_MinusBar 65 0 0 KPlus 9 1 Kaon
DPlus 59 1 3 KMinus 10 1 Kaon
DMinus 60 1 3 KStarPlus 28 0 CannotInteract
DStarPlus 78 0 0 KStarMinus 29 0 CannotInteract
DStarMinus 79 0 0 KStar0_1430_0 66 0 CannotInteract
D0 71 1 3 KStar0_1430_0Bar 67 0 CannotInteract
D0Bar 72 1 3 KStar0_1430_Plus 64 0 CannotInteract
DStar0 80 0 0 KStar0_1430_MinusBar 65 0 CannotInteract
DStar0Bar 81 0 0 DPlus 59 1 Kaon
DsPlus 74 1 3 DMinus 60 1 Kaon
DsMinus 75 1 3 DStarPlus 78 0 CannotInteract
DStarSPlus 76 0 0 DStarMinus 79 0 CannotInteract
DStarSMinus 77 0 0 D0 71 1 Kaon
EtaC 73 0 0 D0Bar 72 1 Kaon
Neutron 14 1 1 DStar0 80 0 CannotInteract
AntiNeutron -14 1 1 DStar0Bar 81 0 CannotInteract
Delta0 42 0 0 DsPlus 74 1 Kaon
Delta0Bar -42 0 0 DsMinus 75 1 Kaon
DeltaMinus 43 0 0 DStarSPlus 76 0 CannotInteract
DeltaPlusBar -43 0 0 DStarSMinus 77 0 CannotInteract
Proton 13 1 1 EtaC 73 0 CannotInteract
AntiProton -13 1 1 Neutron 14 1 Baryon
N1440Plus 51 0 0 AntiNeutron -14 1 Baryon
N1440MinusBar -51 0 0 Delta0 42 0 CannotInteract
N1440_0 52 0 0 Delta0Bar -42 0 CannotInteract
N1440_0Bar -52 0 0 DeltaMinus 43 0 CannotInteract
N1710Plus 53 0 0 DeltaPlusBar -43 0 CannotInteract
N1710MinusBar -53 0 0 Proton 13 1 Baryon
N1710_0 54 0 0 AntiProton -13 1 Baryon
N1710_0Bar -54 0 0 N1440Plus 51 0 CannotInteract
DeltaPlus 41 0 0 N1440MinusBar -51 0 CannotInteract
DeltaMinusBar -41 0 0 N1440_0 52 0 CannotInteract
DeltaPlusPlus 40 0 0 N1440_0Bar -52 0 CannotInteract
DeltaMinusMinusBar -40 0 0 N1710Plus 53 0 CannotInteract
SigmaMinus 36 1 1 N1710MinusBar -53 0 CannotInteract
SigmaPlusBar -36 1 1 N1710_0 54 0 CannotInteract
SigmaStarMinus 46 0 0 N1710_0Bar -54 0 CannotInteract
SigmaStarPlusBar -46 0 0 DeltaPlus 41 0 CannotInteract
SigmaStarPlus 44 0 0 DeltaMinusBar -41 0 CannotInteract
SigmaStarMinusBar -44 0 0 DeltaPlusPlus 40 0 CannotInteract
SigmaStar0 45 0 0 DeltaMinusMinusBar -40 0 CannotInteract
SigmaStar0Bar -45 0 0 SigmaMinus 36 1 Baryon
Lambda0 39 1 1 SigmaPlusBar -36 1 Baryon
Lambda0Bar -39 1 1 SigmaStarMinus 46 0 CannotInteract
Sigma0 35 1 1 SigmaStarPlusBar -46 0 CannotInteract
Sigma0Bar -35 1 1 SigmaStarPlus 44 0 CannotInteract
SigmaPlus 34 1 1 SigmaStarMinusBar -44 0 CannotInteract
SigmaMinusBar -34 1 1 SigmaStar0 45 0 CannotInteract
XiMinus 38 1 1 SigmaStar0Bar -45 0 CannotInteract
XiPlusBar -38 1 1 Lambda0 39 1 Baryon
Xi0 37 1 1 Lambda0Bar -39 1 Baryon
Xi0Bar -37 1 1 Sigma0 35 1 Baryon
XiStarMinus 48 0 0 Sigma0Bar -35 1 Baryon
XiStarPlusBar -48 0 0 SigmaPlus 34 1 Baryon
XiStar0 47 0 0 SigmaMinusBar -34 1 Baryon
XiStar0Bar -47 0 0 XiMinus 38 1 Baryon
OmegaMinus 49 0 0 XiPlusBar -38 1 Baryon
OmegaPlusBar -49 0 0 Xi0 37 1 Baryon
SigmaC0 86 0 0 Xi0Bar -37 1 Baryon
SigmaC0Bar -86 0 0 XiStarMinus 48 0 CannotInteract
SigmaStarC0 96 0 0 XiStarPlusBar -48 0 CannotInteract
SigmaStarC0Bar -96 0 0 XiStar0 47 0 CannotInteract
LambdaCPlus 89 1 1 XiStar0Bar -47 0 CannotInteract
LambdaCMinusBar -89 1 1 OmegaMinus 49 0 CannotInteract
XiC0 88 1 1 OmegaPlusBar -49 0 CannotInteract
XiC0Bar -88 1 1 SigmaC0 86 0 CannotInteract
SigmaCPlus 85 0 0 SigmaC0Bar -86 0 CannotInteract
SigmaCMinusBar -85 0 0 SigmaStarC0 96 0 CannotInteract
SigmaStarCPlus 95 0 0 SigmaStarC0Bar -96 0 CannotInteract
SigmaStarCMinusBar -95 0 0 LambdaCPlus 89 1 Baryon
SigmaCPlusPlus 84 0 0 LambdaCMinusBar -89 1 Baryon
SigmaCMinusMinusBar -84 0 0 XiC0 88 1 Baryon
SigmaStarCPlusPlus 94 0 0 XiC0Bar -88 1 Baryon
SigmaStarCMinusMinusBar -94 0 0 SigmaCPlus 85 0 CannotInteract
XiCPlus 87 1 1 SigmaCMinusBar -85 0 CannotInteract
XiCMinusBar -87 1 1 SigmaStarCPlus 95 0 CannotInteract
XiStarCPlus 97 0 0 SigmaStarCMinusBar -95 0 CannotInteract
XiStarCMinusBar -97 0 0 SigmaCPlusPlus 84 0 CannotInteract
XiStarC0 98 0 0 SigmaCMinusMinusBar -84 0 CannotInteract
XiStarC0Bar -98 0 0 SigmaStarCPlusPlus 94 0 CannotInteract
OmegaC0 99 0 0 SigmaStarCMinusMinusBar -94 0 CannotInteract
OmegaC0Bar -99 0 0 XiCPlus 87 1 Baryon
Jpsi 83 0 0 XiCMinusBar -87 1 Baryon
Phi 33 0 0 XiStarCPlus 97 0 CannotInteract
#Unknown 0 0 0 XiStarCMinusBar -97 0 CannotInteract
XiStarC0 98 0 CannotInteract
XiStarC0Bar -98 0 CannotInteract
OmegaC0 99 0 CannotInteract
OmegaC0Bar -99 0 CannotInteract
Jpsi 83 0 CannotInteract
Phi 33 0 CannotInteract
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
using namespace corsika; using namespace corsika;
using namespace corsika::process::sibyll; using namespace corsika::process::sibyll;
using namespace corsika::units;
using namespace corsika::units::si;
TEST_CASE("Sibyll", "[processes]") { TEST_CASE("Sibyll", "[processes]") {
...@@ -59,6 +61,11 @@ TEST_CASE("Sibyll", "[processes]") { ...@@ -59,6 +61,11 @@ TEST_CASE("Sibyll", "[processes]") {
REQUIRE(process::sibyll::GetSibyllXSCode(particles::Code::SigmaPlus) == 1); REQUIRE(process::sibyll::GetSibyllXSCode(particles::Code::SigmaPlus) == 1);
REQUIRE(process::sibyll::GetSibyllXSCode(particles::Code::PiMinus) == 2); REQUIRE(process::sibyll::GetSibyllXSCode(particles::Code::PiMinus) == 2);
} }
SECTION("sibyll mass") {
REQUIRE_FALSE(process::sibyll::GetSibyllMass(particles::Code::Electron) == 0_GeV);
}
} }
#include <corsika/geometry/Point.h> #include <corsika/geometry/Point.h>
......
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