IAP GITLAB

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

pythia test

parent 42c52264
No related branches found
No related tags found
1 merge request!280Refactory 2020
...@@ -90,8 +90,8 @@ check-clang-format: ...@@ -90,8 +90,8 @@ check-clang-format:
tags: tags:
- corsika - corsika
before_script: before_script:
- apt install -y -qq python3-pip - apt-get update && apt-get install -y -qq python3-pip
- pip install conan - pip3 install conan
script: script:
- mkdir -p build - mkdir -p build
- cd build - cd build
......
...@@ -136,7 +136,7 @@ namespace corsika::pythia8 { ...@@ -136,7 +136,7 @@ namespace corsika::pythia8 {
void Decay::printDecayConfig(const Code vCode) { void Decay::printDecayConfig(const Code vCode) {
CORSIKA_LOG_INFO("Decay: Pythia decay configuration:"); CORSIKA_LOG_INFO("Decay: Pythia decay configuration:");
CORSIKA_LOG_INFO(" {} is {} " , vCode, (isStable(vCode)?"stable":"unstable")); CORSIKA_LOG_INFO(" {} is {} ", vCode, (isStable(vCode) ? "stable" : "unstable"));
} }
void Decay::printDecayConfig() { void Decay::printDecayConfig() {
......
...@@ -34,8 +34,8 @@ namespace corsika::pythia8 { ...@@ -34,8 +34,8 @@ namespace corsika::pythia8 {
if (!initialized_) { if (!initialized_) {
pythia_.readString("Print:quiet = off"); pythia_.readString("Print:quiet = off");
pythia_.readString("Check:particleData = on"); // during init pythia_.readString("Check:particleData = on"); // during init
pythia_.readString("Check:event = on"); // default: on pythia_.readString("Check:event = on"); // default: on
pythia_.readString("Check:levelParticleData = 12"); // 1 is default pythia_.readString("Check:levelParticleData = 12"); // 1 is default
// TODO: proper process initialization for MinBias needed // TODO: proper process initialization for MinBias needed
pythia_.readString("HardQCD:all = on"); pythia_.readString("HardQCD:all = on");
......
...@@ -52,7 +52,7 @@ namespace corsika::pythia8 { ...@@ -52,7 +52,7 @@ namespace corsika::pythia8 {
private: private:
void init(); void init();
bool isStable(Code const vCode); bool isStable(Code const vCode);
void setStable(std::vector<Code> const&); void setStable(std::vector<Code> const&);
void setUnstable(Code const); void setUnstable(Code const);
......
...@@ -129,7 +129,7 @@ TEST_CASE("ConexOutput", "[output validation]") { ...@@ -129,7 +129,7 @@ TEST_CASE("ConexOutput", "[output validation]") {
std::istreambuf_iterator<char> end; std::istreambuf_iterator<char> end;
while (begin1 != end && begin1ref != end) { while (begin1 != end && begin1ref != end) {
CHECK(*begin1 == *begin1ref); CHECK(*begin1 == *begin1ref);
++begin1; ++begin1;
++begin1ref; ++begin1ref;
......
...@@ -36,7 +36,6 @@ TEST_CASE("Pythia", "[processes]") { ...@@ -36,7 +36,6 @@ TEST_CASE("Pythia", "[processes]") {
pythia.readString("ProcessLevel:all = off"); pythia.readString("ProcessLevel:all = off");
pythia.init(); pythia.init();
Event& event = pythia.event; Event& event = pythia.event;
...@@ -164,6 +163,6 @@ TEST_CASE("pythia process") { ...@@ -164,6 +163,6 @@ TEST_CASE("pythia process") {
corsika::pythia8::Interaction model; corsika::pythia8::Interaction model;
model.doInteraction(view); model.doInteraction(view);
[[maybe_unused]] const GrammageType length = model.getInteractionLength(particle); [[maybe_unused]] const GrammageType length = model.getInteractionLength(particle);
CHECK(length == 50_g / square(1_cm)); CHECK(length == 82.2524_kg / square(1_m));
} }
} }
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