IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 6335d9c5 authored by Ralf Ulrich's avatar Ralf Ulrich
Browse files

Merge branch 'milestone2' into 'master'

milestone2

See merge request AirShowerPhysics/corsika!50
parents e161a9be 741782fd
No related branches found
No related merge requests found
...@@ -39,7 +39,7 @@ endif() ...@@ -39,7 +39,7 @@ endif()
# enable warnings and disallow non-standard language # enable warnings and disallow non-standard language
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers") set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O0")
# clang produces a lot of unecessary warnings without this: # clang produces a lot of unecessary warnings without this:
add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>") add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>")
......
...@@ -44,7 +44,8 @@ with every binary and source distribution. The copyright transfer is ...@@ -44,7 +44,8 @@ with every binary and source distribution. The copyright transfer is
necessary to be able to effectively defend the project in case of necessary to be able to effectively defend the project in case of
litigation. The copyright holder may change, if decided by the CORSIKA litigation. The copyright holder may change, if decided by the CORSIKA
Project. The current copyright holder is the CORSIKA Project Project. The current copyright holder is the CORSIKA Project
corsika-project@lists.kit.edu, with the current chair person Ralf Ulrich (KIT) ralf.ulrich@kit.edu. corsika-project@lists.kit.edu, with the current chair person
Ralf Ulrich (KIT) ralf.ulrich@kit.edu.
## Definition of a "contributor" ## Definition of a "contributor"
Contributor is a person of whom at least one merge request was Contributor is a person of whom at least one merge request was
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
The CORSIKA Project very much welcomes contributions. Here we outlined The CORSIKA Project very much welcomes contributions. Here we outlined
how you can find the right place to contribute, and how to do that. how you can find the right place to contribute, and how to do that.
Connect to https://gitlab.ikp.kit.edu and corsika-devel@lists.kit.edu (self-register at https://www.lists.kit.edu/sympa/subscribe/corsika-devel) Connect to https://gitlab.ikp.kit.edu and corsika-devel@lists.kit.edu (self-register at https://www.lists.kit.edu/sympa/subscribe/corsika-devel) to get in touch with the project.
or write to corsika-project@lists.kit.edu to get in touch with the project.
The CORSIKA Project decides on the [GUIDELINES](CONTRIBUTING.md) and can decide to The CORSIKA Project decides on the [GUIDELINES](CONTRIBUTING.md) and can decide to
change/improve them. change/improve them.
...@@ -13,7 +12,8 @@ change/improve them. ...@@ -13,7 +12,8 @@ change/improve them.
ideas, discussions, or bugs fix requests. ideas, discussions, or bugs fix requests.
- New issues can be created, or existing issues - New issues can be created, or existing issues
picked up or contributed to. picked up or contributed to.
- Issues are discussed in meetings or via corsika-devel@lists.kit.edu within the CORSIKA Project. - Issues are discussed in meetings or via corsika-devel@lists.kit.edu
within the CORSIKA Project.
- Issues are assigned to milestones. - Issues are assigned to milestones.
- The work on issues is performed in `branches` that can be best - The work on issues is performed in `branches` that can be best
created directly via the gitlab web interface. created directly via the gitlab web interface.
...@@ -121,7 +121,8 @@ required all the time: ...@@ -121,7 +121,8 @@ required all the time:
- responsibility for a particular functionality or software/management part - responsibility for a particular functionality or software/management part
- have read and follow these [GUIDELINES](CONTRIBUTING.md) - have read and follow these [GUIDELINES](CONTRIBUTING.md)
- active in the CORSIKA Project, that means responsive to - active in the CORSIKA Project, that means responsive to
discussions and problems in corsika-devel@list.kit.edu or on https//gitlab.ikp.kit.edu, of relevant *Issues*, discussions and problems in corsika-devel@list.kit.edu or on https//gitlab.ikp.kit.edu,
of relevant *Issues*,
or in (phone) meetings or in (phone) meetings
- agreement to the [COLLABORATION_AGREEMENT](COLLABORATION_AGREEMENT.md) is strictly required - agreement to the [COLLABORATION_AGREEMENT](COLLABORATION_AGREEMENT.md) is strictly required
- the members of the CORSIKA Project panel agree - the members of the CORSIKA Project panel agree
...@@ -54,11 +54,11 @@ class ProcessCut : public corsika::process::ContinuousProcess<ProcessCut> { ...@@ -54,11 +54,11 @@ class ProcessCut : public corsika::process::ContinuousProcess<ProcessCut> {
EnergyType fECut; EnergyType fECut;
mutable EnergyType fEnergy = 0_GeV; EnergyType fEnergy = 0_GeV;
mutable EnergyType fEmEnergy = 0_GeV; EnergyType fEmEnergy = 0_GeV;
mutable int fEmCount = 0; int fEmCount = 0;
mutable EnergyType fInvEnergy = 0_GeV; EnergyType fInvEnergy = 0_GeV;
mutable int fInvCount = 0; int fInvCount = 0;
public: public:
ProcessCut(const EnergyType v) ProcessCut(const EnergyType v)
...@@ -141,7 +141,7 @@ public: ...@@ -141,7 +141,7 @@ public:
} }
template <typename Particle, typename Stack> template <typename Particle, typename Stack>
EProcessReturn DoContinuous(Particle& p, setup::Trajectory&, Stack&) const { EProcessReturn DoContinuous(Particle& p, setup::Trajectory&, Stack&) {
const Code pid = p.GetPID(); const Code pid = p.GetPID();
EnergyType energy = p.GetEnergy(); EnergyType energy = p.GetEnergy();
cout << "ProcessCut: DoContinuous: " << pid << " E= " << energy cout << "ProcessCut: DoContinuous: " << pid << " E= " << energy
...@@ -237,7 +237,7 @@ int main() { ...@@ -237,7 +237,7 @@ int main() {
// setup particle stack, and add primary particle // setup particle stack, and add primary particle
setup::Stack stack; setup::Stack stack;
stack.Clear(); stack.Clear();
const hep::EnergyType E0 = 100_GeV; const hep::EnergyType E0 = 100_TeV;
double theta = 0.; double theta = 0.;
double phi = 0.; double phi = 0.;
{ {
......
...@@ -138,7 +138,7 @@ namespace corsika::process { ...@@ -138,7 +138,7 @@ namespace corsika::process {
template <typename Particle, typename Stack> template <typename Particle, typename Stack>
EProcessReturn SelectInteraction( EProcessReturn SelectInteraction(
Particle& p, Stack& s, corsika::units::si::InverseGrammageType lambda_select, Particle& p, Stack& s, [[maybe_unused]]corsika::units::si::InverseGrammageType lambda_select,
corsika::units::si::InverseGrammageType& lambda_inv_count) { corsika::units::si::InverseGrammageType& lambda_inv_count) {
if constexpr (is_process_sequence<T1type>::value) { if constexpr (is_process_sequence<T1type>::value) {
...@@ -205,7 +205,7 @@ namespace corsika::process { ...@@ -205,7 +205,7 @@ namespace corsika::process {
// select decay process // select decay process
template <typename Particle, typename Stack> template <typename Particle, typename Stack>
EProcessReturn SelectDecay(Particle& p, Stack& s, EProcessReturn SelectDecay(Particle& p, Stack& s,
corsika::units::si::InverseTimeType decay_select, [[maybe_unused]] corsika::units::si::InverseTimeType decay_select,
corsika::units::si::InverseTimeType& decay_inv_count) { corsika::units::si::InverseTimeType& decay_inv_count) {
if constexpr (is_process_sequence<T1>::value) { if constexpr (is_process_sequence<T1>::value) {
// if A is a process sequence --> check inside // if A is a process sequence --> check inside
......
...@@ -28,7 +28,7 @@ namespace corsika::process { ...@@ -28,7 +28,7 @@ namespace corsika::process {
namespace sibyll { namespace sibyll {
class Decay : public corsika::process::DecayProcess<Decay> { class Decay : public corsika::process::DecayProcess<Decay> {
mutable int fCount = 0; int fCount = 0;
public: public:
Decay() {} Decay() {}
...@@ -182,7 +182,7 @@ namespace corsika::process { ...@@ -182,7 +182,7 @@ namespace corsika::process {
pin.SetMomentum(p.GetMomentum()); pin.SetMomentum(p.GetMomentum());
// setting particle mass with Corsika values, may be inconsistent with sibyll // setting particle mass with Corsika values, may be inconsistent with sibyll
// internal values // internal values
#warning setting particle mass with Corsika values, may be inconsistent with sibyll internal values // TODO: #warning setting particle mass with Corsika values, may be inconsistent with sibyll internal values
pin.SetMass(corsika::particles::GetMass(pCode)); pin.SetMass(corsika::particles::GetMass(pCode));
// remember position // remember position
Point decayPoint = p.GetPosition(); Point decayPoint = p.GetPosition();
......
...@@ -26,8 +26,8 @@ namespace corsika::process::sibyll { ...@@ -26,8 +26,8 @@ namespace corsika::process::sibyll {
class Interaction : public corsika::process::InteractionProcess<Interaction> { class Interaction : public corsika::process::InteractionProcess<Interaction> {
mutable int fCount = 0; int fCount = 0;
mutable int fNucCount = 0; int fNucCount = 0;
public: public:
Interaction() {} Interaction() {}
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
#include <corsika/particles/ParticleProperties.h> #include <corsika/particles/ParticleProperties.h>
#include <corsika/geometry/Point.h>
#include <corsika/units/PhysicalUnits.h>
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
// cpp file // cpp file
#include <catch2/catch.hpp> #include <catch2/catch.hpp>
...@@ -69,8 +72,10 @@ TEST_CASE("Sibyll", "[processes]") { ...@@ -69,8 +72,10 @@ TEST_CASE("Sibyll", "[processes]") {
#include <corsika/setup/SetupStack.h> #include <corsika/setup/SetupStack.h>
#include <corsika/setup/SetupTrajectory.h> #include <corsika/setup/SetupTrajectory.h>
#include <corsika/particles/ParticleProperties.h>
using namespace corsika::units::si; using namespace corsika::units::si;
using namespace corsika::units;
TEST_CASE("SibyllInterface", "[processes]") { TEST_CASE("SibyllInterface", "[processes]") {
...@@ -82,13 +87,13 @@ TEST_CASE("SibyllInterface", "[processes]") { ...@@ -82,13 +87,13 @@ TEST_CASE("SibyllInterface", "[processes]") {
geometry::Line line(origin, v); geometry::Line line(origin, v);
geometry::Trajectory<geometry::Line> track(line, 10_s); geometry::Trajectory<geometry::Line> track(line, 10_s);
setup::Stack stack;
auto particle = stack.NewParticle();
SECTION("InteractionInterface") { SECTION("InteractionInterface") {
setup::Stack stack;
auto particle = stack.NewParticle();
Interaction model; Interaction model;
model.Init(); model.Init();
[[maybe_unused]] const process::EProcessReturn ret = [[maybe_unused]] const process::EProcessReturn ret =
model.DoInteraction(particle, stack); model.DoInteraction(particle, stack);
...@@ -98,8 +103,22 @@ TEST_CASE("SibyllInterface", "[processes]") { ...@@ -98,8 +103,22 @@ TEST_CASE("SibyllInterface", "[processes]") {
SECTION("DecayInterface") { SECTION("DecayInterface") {
setup::Stack stack;
auto particle = stack.NewParticle();
{
const hep::EnergyType E0 = 10_GeV;
particle.SetPID(particles::Code::Proton);
hep::MomentumType P0 = sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
auto plab = stack::super_stupid::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
particle.SetEnergy(E0);
particle.SetMomentum(plab);
particle.SetTime(0_ns);
geometry::Point p(cs, 0_m, 0_m, 0_m);
particle.SetPosition(p);
}
Decay model; Decay model;
model.Init(); model.Init();
/*[[maybe_unused]] const process::EProcessReturn ret =*/model.DoDecay(particle, /*[[maybe_unused]] const process::EProcessReturn ret =*/model.DoDecay(particle,
stack); stack);
......
...@@ -13,6 +13,8 @@ only specific model parameters can still be changed. ...@@ -13,6 +13,8 @@ only specific model parameters can still be changed.
CORSIKA8 is released under the GPL3 license. See [license file](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/LICENSE) which is part of every release and the source code. CORSIKA8 is released under the GPL3 license. See [license file](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/LICENSE) which is part of every release and the source code.
If you use, or want to refer to, CORSIKA8 please cite ["Towards a Next Generation of CORSIKA: A Framework for the Simulation of Particle Cascades in Astroparticle Physics", Comput.Softw.Big Sci. 3 (2019) 2](https://doi.org/10.1007/s41781-018-0013-0). We kindly ask (and expect) any relevant improvement or addition to be offered or contributed to the main CORSIKA8 repository for the benefit of the whole community.
When you contribute to CORSIKA check the guidelines outlined here: When you contribute to CORSIKA check the guidelines outlined here:
[coding guidelines](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/CONTRIBUTING.md). Code that fails the review by the CORSIKA author group must be improved before it can be merged in the official code base. After your code has been accepted and merged you become a contributor of the CORSIKA project and you should include yourself in the [AUTHORS](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/AUTHORS) file. [coding guidelines](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/CONTRIBUTING.md). Code that fails the review by the CORSIKA author group must be improved before it can be merged in the official code base. After your code has been accepted and merged you become a contributor of the CORSIKA project and you should include yourself in the [AUTHORS](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/AUTHORS) file.
...@@ -22,7 +24,9 @@ We also want to point you to the [MCnet guidelines](https://gitlab.ikp.kit.edu/A ...@@ -22,7 +24,9 @@ We also want to point you to the [MCnet guidelines](https://gitlab.ikp.kit.edu/A
## Installation ## Installation
Prerequisites: eigen3, boost, cmake, g++, git. On Ubuntu 18.04, just do: CORSIKA8 is tested regularly at least on gcc7.3.0 and clang-6.0.0.
Additional software prerequisites: eigen3, boost, cmake, g++, git.
On a bare Ubuntu 18.04, just add:
``` ```
sudo apt-get install libeigen3-dev libboost-dev cmake g++ git sudo apt-get install libeigen3-dev libboost-dev cmake g++ git
``` ```
...@@ -62,6 +66,7 @@ sudo apt-get install doxygen graphviz ...@@ -62,6 +66,7 @@ sudo apt-get install doxygen graphviz
Switch to the corsika build directory and do Switch to the corsika build directory and do
``` ```
make doxygen make doxygen
make install
``` ```
browse with firefox: browse with firefox:
``` ```
......
...@@ -8,23 +8,23 @@ href="https://gitlab.ikp.kit.edu/AirShowerPhysics">https://gitlab.ikp.kit.edu</a ...@@ -8,23 +8,23 @@ href="https://gitlab.ikp.kit.edu/AirShowerPhysics">https://gitlab.ikp.kit.edu</a
you got the code from somewhere else, consider to switch to the you got the code from somewhere else, consider to switch to the
official development repository. If you want to report bugs, or want official development repository. If you want to report bugs, or want
to suggest features or future development, please submit an "issue" on to suggest features or future development, please submit an "issue" on
this gitlab server. this gitlab server. We only accept Issues and discussion via our
central development server https://gitlab.ikp.kit.edu.
CORSIKA is the most comprehensive framework for simulating particle Write to corsika-devel@lists.kit.edu, or even register yourself at
cascades in astrophysical environments, for example extensive air https://www.lists.kit.edu/sympa/info/corsika-devel to get in contact
showers. The impact of stochastic and continuous processes on the with other developers.
cascade development is simulated. To boost computational efficiency
different techniques are provided, like thinning or cascade equations.
The software makes extensive use of static design patterns and If you use, or want to refer to, CORSIKA8 please cite <a href="https://doi.org/10.1007/s41781-018-0013-0">"Towards a Next
compiler optimization. Thus, the most fundamental configuration Generation of CORSIKA: A Framework for the Simulation of Particle
decision of the user must be performed at compile time. At runtime Cascades in Astroparticle Physics" [Comput.Softw.Big Sci. 3 (2019)
only spcific parameters can still be changed. 2]</a>. We kindly ask (and
expect) any relevant improvement or addition to be offered or
When you contribute to CORSIKA, follow the guidlines outlined here: contributed to the main CORSIKA8 repository for the benefit of the
whole community.
For more information, see also the
<a <a
href="https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/wikis/home">Development href="https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/README.md">central README.md file</a>.
wiki text</a>
*/ */
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