IAP GITLAB

Commit 6335d9c5 authored by Ralf Ulrich's avatar Ralf Ulrich

Merge branch 'milestone2' into 'master'

milestone2

See merge request AirShowerPhysics/corsika!50
parents e161a9be 741782fd
......@@ -39,7 +39,7 @@ endif()
# enable warnings and disallow non-standard language
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers")
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:
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
necessary to be able to effectively defend the project in case of
litigation. The copyright holder may change, if decided by the CORSIKA
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"
Contributor is a person of whom at least one merge request was
......
......@@ -2,8 +2,7 @@
The CORSIKA Project very much welcomes contributions. Here we outlined
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)
or write to corsika-project@lists.kit.edu to get in touch with the project.
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.
The CORSIKA Project decides on the [GUIDELINES](CONTRIBUTING.md) and can decide to
change/improve them.
......@@ -13,7 +12,8 @@ change/improve them.
ideas, discussions, or bugs fix requests.
- New issues can be created, or existing issues
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.
- The work on issues is performed in `branches` that can be best
created directly via the gitlab web interface.
......@@ -121,7 +121,8 @@ required all the time:
- responsibility for a particular functionality or software/management part
- have read and follow these [GUIDELINES](CONTRIBUTING.md)
- 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
- agreement to the [COLLABORATION_AGREEMENT](COLLABORATION_AGREEMENT.md) is strictly required
- the members of the CORSIKA Project panel agree
......@@ -54,11 +54,11 @@ class ProcessCut : public corsika::process::ContinuousProcess<ProcessCut> {
EnergyType fECut;
mutable EnergyType fEnergy = 0_GeV;
mutable EnergyType fEmEnergy = 0_GeV;
mutable int fEmCount = 0;
mutable EnergyType fInvEnergy = 0_GeV;
mutable int fInvCount = 0;
EnergyType fEnergy = 0_GeV;
EnergyType fEmEnergy = 0_GeV;
int fEmCount = 0;
EnergyType fInvEnergy = 0_GeV;
int fInvCount = 0;
public:
ProcessCut(const EnergyType v)
......@@ -141,7 +141,7 @@ public:
}
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();
EnergyType energy = p.GetEnergy();
cout << "ProcessCut: DoContinuous: " << pid << " E= " << energy
......@@ -237,7 +237,7 @@ int main() {
// setup particle stack, and add primary particle
setup::Stack stack;
stack.Clear();
const hep::EnergyType E0 = 100_GeV;
const hep::EnergyType E0 = 100_TeV;
double theta = 0.;
double phi = 0.;
{
......
......@@ -138,7 +138,7 @@ namespace corsika::process {
template <typename Particle, typename Stack>
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) {
if constexpr (is_process_sequence<T1type>::value) {
......@@ -205,7 +205,7 @@ namespace corsika::process {
// select decay process
template <typename Particle, typename Stack>
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) {
if constexpr (is_process_sequence<T1>::value) {
// if A is a process sequence --> check inside
......
......@@ -28,7 +28,7 @@ namespace corsika::process {
namespace sibyll {
class Decay : public corsika::process::DecayProcess<Decay> {
mutable int fCount = 0;
int fCount = 0;
public:
Decay() {}
......@@ -182,7 +182,7 @@ namespace corsika::process {
pin.SetMomentum(p.GetMomentum());
// setting particle mass with Corsika values, may be inconsistent with sibyll
// 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));
// remember position
Point decayPoint = p.GetPosition();
......
......@@ -26,8 +26,8 @@ namespace corsika::process::sibyll {
class Interaction : public corsika::process::InteractionProcess<Interaction> {
mutable int fCount = 0;
mutable int fNucCount = 0;
int fCount = 0;
int fNucCount = 0;
public:
Interaction() {}
......
......@@ -15,6 +15,9 @@
#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
// cpp file
#include <catch2/catch.hpp>
......@@ -69,8 +72,10 @@ TEST_CASE("Sibyll", "[processes]") {
#include <corsika/setup/SetupStack.h>
#include <corsika/setup/SetupTrajectory.h>
#include <corsika/particles/ParticleProperties.h>
using namespace corsika::units::si;
using namespace corsika::units;
TEST_CASE("SibyllInterface", "[processes]") {
......@@ -82,13 +87,13 @@ TEST_CASE("SibyllInterface", "[processes]") {
geometry::Line line(origin, v);
geometry::Trajectory<geometry::Line> track(line, 10_s);
setup::Stack stack;
auto particle = stack.NewParticle();
SECTION("InteractionInterface") {
setup::Stack stack;
auto particle = stack.NewParticle();
Interaction model;
model.Init();
[[maybe_unused]] const process::EProcessReturn ret =
model.DoInteraction(particle, stack);
......@@ -98,8 +103,22 @@ TEST_CASE("SibyllInterface", "[processes]") {
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;
model.Init();
/*[[maybe_unused]] const process::EProcessReturn ret =*/model.DoDecay(particle,
stack);
......
......@@ -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.
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:
[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
## 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
```
......@@ -62,6 +66,7 @@ sudo apt-get install doxygen graphviz
Switch to the corsika build directory and do
```
make doxygen
make install
```
browse with firefox:
```
......
......@@ -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
official development repository. If you want to report bugs, or want
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
cascades in astrophysical environments, for example extensive air
showers. The impact of stochastic and continuous processes on the
cascade development is simulated. To boost computational efficiency
different techniques are provided, like thinning or cascade equations.
Write to corsika-devel@lists.kit.edu, or even register yourself at
https://www.lists.kit.edu/sympa/info/corsika-devel to get in contact
with other developers.
The software makes extensive use of static design patterns and
compiler optimization. Thus, the most fundamental configuration
decision of the user must be performed at compile time. At runtime
only spcific parameters can still be changed.
When you contribute to CORSIKA, follow the guidlines outlined here:
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
Generation of CORSIKA: A Framework for the Simulation of Particle
Cascades in Astroparticle Physics" [Comput.Softw.Big Sci. 3 (2019)
2]</a>. 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.
For more information, see also the
<a
href="https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/wikis/home">Development
wiki text</a>
href="https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/README.md">central README.md file</a>.
*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment