IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 5e84ee8a authored by ralfulrich's avatar ralfulrich
Browse files

working

parents 6a2eafd3 ca4ed4f5
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <corsika/stack/Stack.h> #include <corsika/stack/Stack.h>
#include <corsika/cascade/sibyll2.3c.h> #include <corsika/cascade/sibyll2.3c.h>
#include <corsika/process/sibyll/ParticleConversion.h>
using namespace std; using namespace std;
using namespace corsika::stack; using namespace corsika::stack;
...@@ -17,8 +18,8 @@ class SibStackData { ...@@ -17,8 +18,8 @@ class SibStackData {
void Clear() { s_plist_.np = 0; } void Clear() { s_plist_.np = 0; }
int GetSize() const { return s_plist_.np-1; } int GetSize() const { return s_plist_.np; }
int GetCapacity() const { return s_plist_.np-1; } int GetCapacity() const { return 8000; }
void SetId(const int i, const int v) { s_plist_.llist[i]=v; } void SetId(const int i, const int v) { s_plist_.llist[i]=v; }
...@@ -45,6 +46,9 @@ class ParticleInterface : public ParticleBase<StackIteratorInterface> { ...@@ -45,6 +46,9 @@ class ParticleInterface : public ParticleBase<StackIteratorInterface> {
public: public:
void SetEnergy(const double v) { GetStackData().SetEnergy(GetIndex(), v); } void SetEnergy(const double v) { GetStackData().SetEnergy(GetIndex(), v); }
double GetEnergy() const { return GetStackData().GetEnergy(GetIndex()); } double GetEnergy() const { return GetStackData().GetEnergy(GetIndex()); }
void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
corsika::process::sibyll::SibyllCode GetPID() const { return static_cast<corsika::process::sibyll::SibyllCode> (GetStackData().GetId(GetIndex())); }
}; };
......
...@@ -23,6 +23,14 @@ extern"C"{ ...@@ -23,6 +23,14 @@ extern"C"{
}s_plist_; }s_plist_;
extern struct {
double cbr[223+16+12+8];
int kdec[1338+6*(16+12+8)];
int lbarp[99];
int idb[99];
}s_csydec_;
// additional particle stack for the mother particles of unstable particles // additional particle stack for the mother particles of unstable particles
// stable particles have entry zero // stable particles have entry zero
extern struct { extern struct {
......
...@@ -28,7 +28,11 @@ def read_sibyll_codes(filename, pythia_db): ...@@ -28,7 +28,11 @@ def read_sibyll_codes(filename, pythia_db):
line = line.strip() line = line.strip()
if line[0] == '#': if line[0] == '#':
continue continue
<<<<<<< HEAD
identifier, sib_code, canInteractFlag, xsType = line.split() identifier, sib_code, canInteractFlag, xsType = line.split()
=======
identifier, sib_code, canInteractFlag, xsctnId = line.split()
>>>>>>> ca4ed4f568320603f81b9a4f0c19a45fb6dd1d58
try: try:
pythia_db[identifier]["sibyll_code"] = int(sib_code) pythia_db[identifier]["sibyll_code"] = int(sib_code)
pythia_db[identifier]["sibyll_canInteract"] = int(canInteractFlag) pythia_db[identifier]["sibyll_canInteract"] = int(canInteractFlag)
......
...@@ -14,7 +14,8 @@ NuTau 92 0 0 ...@@ -14,7 +14,8 @@ NuTau 92 0 0
NuTauBar 93 0 0 NuTauBar 93 0 0
Gamma 1 0 0 Gamma 1 0 0
Pi0 6 1 2 Pi0 6 1 2
Rho0 27 1 2 # rho0 could interact but sibyll has no cross section/interaction length. was used for gamma had int
Rho0 27 0 0
K0Long 11 1 3 K0Long 11 1 3
PiPlus 7 1 2 PiPlus 7 1 2
PiMinus 8 1 2 PiMinus 8 1 2
......
...@@ -33,11 +33,16 @@ TEST_CASE("Sibyll", "[processes]") { ...@@ -33,11 +33,16 @@ TEST_CASE("Sibyll", "[processes]") {
13 ); 13 );
} }
<<<<<<< HEAD
SECTION("handledBySibyll") { SECTION("handledBySibyll") {
=======
SECTION("KnownBySibyll") {
>>>>>>> ca4ed4f568320603f81b9a4f0c19a45fb6dd1d58
REQUIRE(process::sibyll::KnownBySibyll(corsika::particles::Electron::GetCode())); REQUIRE(process::sibyll::KnownBySibyll(corsika::particles::Electron::GetCode()));
REQUIRE_FALSE( REQUIRE_FALSE(
process::sibyll::KnownBySibyll(corsika::particles::XiPrimeC0::GetCode())); process::sibyll::KnownBySibyll(corsika::particles::XiPrimeC0::GetCode()));
<<<<<<< HEAD
} }
SECTION("canInteractInSibyll") { SECTION("canInteractInSibyll") {
...@@ -48,5 +53,7 @@ TEST_CASE("Sibyll", "[processes]") { ...@@ -48,5 +53,7 @@ TEST_CASE("Sibyll", "[processes]") {
process::sibyll::CanInteract(corsika::particles::Electron::GetCode())); process::sibyll::CanInteract(corsika::particles::Electron::GetCode()));
REQUIRE_FALSE( REQUIRE_FALSE(
process::sibyll::CanInteract(corsika::particles::SigmaC0::GetCode())); process::sibyll::CanInteract(corsika::particles::SigmaC0::GetCode()));
=======
>>>>>>> ca4ed4f568320603f81b9a4f0c19a45fb6dd1d58
} }
} }
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