From eec8952aa2ba2f2202d581ce9931b3fb08a0bcb9 Mon Sep 17 00:00:00 2001 From: ralfulrich <ralf.ulrich@kit.edu> Date: Wed, 23 Dec 2020 16:14:59 +0100 Subject: [PATCH] pythia test --- .gitlab-ci.yml | 4 ++-- corsika/detail/modules/pythia8/Decay.inl | 2 +- corsika/detail/modules/pythia8/Interaction.inl | 4 ++-- corsika/modules/pythia8/Decay.hpp | 2 +- tests/modules/testCONEX.cpp | 2 +- tests/modules/testPythia8.cpp | 3 +-- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b0f1da56..4b35bd3c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,8 +90,8 @@ check-clang-format: tags: - corsika before_script: - - apt install -y -qq python3-pip - - pip install conan + - apt-get update && apt-get install -y -qq python3-pip + - pip3 install conan script: - mkdir -p build - cd build diff --git a/corsika/detail/modules/pythia8/Decay.inl b/corsika/detail/modules/pythia8/Decay.inl index e2a8a24d0..662afa95a 100644 --- a/corsika/detail/modules/pythia8/Decay.inl +++ b/corsika/detail/modules/pythia8/Decay.inl @@ -136,7 +136,7 @@ namespace corsika::pythia8 { void Decay::printDecayConfig(const Code vCode) { 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() { diff --git a/corsika/detail/modules/pythia8/Interaction.inl b/corsika/detail/modules/pythia8/Interaction.inl index 590a0fec4..f92f8f46e 100644 --- a/corsika/detail/modules/pythia8/Interaction.inl +++ b/corsika/detail/modules/pythia8/Interaction.inl @@ -34,8 +34,8 @@ namespace corsika::pythia8 { if (!initialized_) { pythia_.readString("Print:quiet = off"); - pythia_.readString("Check:particleData = on"); // during init - pythia_.readString("Check:event = on"); // default: on + pythia_.readString("Check:particleData = on"); // during init + pythia_.readString("Check:event = on"); // default: on pythia_.readString("Check:levelParticleData = 12"); // 1 is default // TODO: proper process initialization for MinBias needed pythia_.readString("HardQCD:all = on"); diff --git a/corsika/modules/pythia8/Decay.hpp b/corsika/modules/pythia8/Decay.hpp index 0285b2786..2bdfccb3c 100644 --- a/corsika/modules/pythia8/Decay.hpp +++ b/corsika/modules/pythia8/Decay.hpp @@ -52,7 +52,7 @@ namespace corsika::pythia8 { private: void init(); - + bool isStable(Code const vCode); void setStable(std::vector<Code> const&); void setUnstable(Code const); diff --git a/tests/modules/testCONEX.cpp b/tests/modules/testCONEX.cpp index d93542c5f..635fee1b5 100644 --- a/tests/modules/testCONEX.cpp +++ b/tests/modules/testCONEX.cpp @@ -129,7 +129,7 @@ TEST_CASE("ConexOutput", "[output validation]") { std::istreambuf_iterator<char> end; - while (begin1 != end && begin1ref != end) { + while (begin1 != end && begin1ref != end) { CHECK(*begin1 == *begin1ref); ++begin1; ++begin1ref; diff --git a/tests/modules/testPythia8.cpp b/tests/modules/testPythia8.cpp index 3c8ebd95d..94dfda89e 100644 --- a/tests/modules/testPythia8.cpp +++ b/tests/modules/testPythia8.cpp @@ -36,7 +36,6 @@ TEST_CASE("Pythia", "[processes]") { pythia.readString("ProcessLevel:all = off"); - pythia.init(); Event& event = pythia.event; @@ -164,6 +163,6 @@ TEST_CASE("pythia process") { corsika::pythia8::Interaction model; model.doInteraction(view); [[maybe_unused]] const GrammageType length = model.getInteractionLength(particle); - CHECK(length == 50_g / square(1_cm)); + CHECK(length == 82.2524_kg / square(1_m)); } } -- GitLab