IAP GITLAB

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • AirShowerPhysics/corsika
  • rulrich/corsika
  • AAAlvesJr/corsika
  • Andre/corsika
  • arrabito/corsika
  • Nikos/corsika
  • olheiser73/corsika
  • AirShowerPhysics/papers/corsika
  • pranav/corsika
9 results
Show changes
Showing
with 347 additions and 14972 deletions
#include <corsika/process/null_model/NullModel.h>
using namespace corsika::process::null_model;
NullModel::NullModel() {}
NullModel::~NullModel() {}
void NullModel::init() {}
void NullModel::run() {}
double NullModel::GetStepLength() { return 0; }
#ifndef _Physics_NullModel_NullModel_h_
#define _Physics_NullModel_NullModel_h_
namespace corsika::process {
namespace null_model {
class NullModel {
public:
NullModel();
~NullModel();
void init();
void run();
double GetStepLength();
};
} // namespace null_model
} // namespace corsika::process
#endif
set (
MODEL_SOURCES
ParticleConversion.cc
)
set (
MODEL_HEADERS
ParticleConversion.h
)
set (
MODEL_NAMESPACE
corsika/process/sibyll
)
add_library (ProcessSibyll STATIC ${MODEL_SOURCES})
CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessSibyll ${MODEL_NAMESPACE} ${MODEL_HEADERS})
set_target_properties (
ProcessSibyll
PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
# PUBLIC_HEADER "${MODEL_HEADERS}"
)
# target dependencies on other libraries (also the header onlys)
target_link_libraries (
ProcessSibyll
CORSIKAunits
)
target_include_directories (
ProcessSibyll
INTERFACE
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include/include>
)
install (
TARGETS ProcessSibyll
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
# PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
)
# --------------------
# code unit testing
add_executable (testSibyll testSibyll.cc)
target_link_libraries (
testSibyll
CORSIKAgeometry
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (NAME testSibyll COMMAND testSibyll)
#include <corsika/particles/ParticleProperties.h>
#include <corsika/process/sibyll/ParticleConversion.h>
using namespace corsika::process::sibyll;
// const std::map<sibyll::PID, ParticleProperties::InternalParticleCode>
// process::sibyll::Sibyll2Corsika = {
// {PID::E_MINUS, InternalParticleCode::Electron},
//};
#ifndef _include_processes_sibyll_particles_h_
#define _include_processes_sibyll_particles_h_
#include <corsika/particles/ParticleProperties.h>
#include <map>
namespace corsika::process {
namespace sibyll {
enum class PID : int {
E_MINUS = 3,
E_PLUS = 2,
NU_E = 15,
NU_E_BAR = 16,
MU_MINUS = 5,
MU_PLUS = 4,
NU_MU = 17,
NU_MU_BAR = 18,
TAU_MINUS = 91,
TAU_PLUS = 90,
NU_TAU = 92,
NU_TAU_BAR = 93,
GAMMA = 1,
PI_0 = 6,
RHO_0 = 27,
K_L_0 = 11,
PI_PLUS = 7,
PI_MINUS = 8,
RHO_PLUS = 25,
RHO_MINUS = 26,
ETA = 23,
OMEGA = 32,
K_S_0 = 12,
K_STAR_0 = 30,
K_STAR_BAR_0 = 31,
K_PLUS = 9,
K_MINUS = 10,
K_STAR_PLUS = 28,
K_STAR_MINUS = 29,
D_PLUS = 59,
D_MINUS = 60,
D_STAR_PLUS = 78,
D_STAR_MINUS = 79,
D_0 = 71,
D_BAR_0 = 72,
D_STAR_0 = 80,
D_STAR_BAR_0 = 81,
D_S_PLUS = 74,
D_S_MINUS = 75,
D_STAR_S_PLUS = 76,
D_STAR_S_MINUS = 77,
ETA_C = 73,
N_0 = 14,
N_BAR_0 = -14,
DELTA_0 = 42,
DELTA_BAR_0 = -42,
P_PLUS = 13,
P_BAR_MINUS = -13,
DELTA_PLUS = 41,
DELTA_BAR_MINUS = -41,
DELTA_PLUS_PLUS = 40,
DELTA_BAR_MINUS_MINUS = -40,
SIGMA_MINUS = 36,
SIGMA_BAR_PLUS = -36,
LAMBDA_0 = 39,
LAMBDA_BAR_0 = -39,
SIGMA_0 = 35,
SIGMA_BAR_0 = -35,
SIGMA_PLUS = 34,
SIGMA_BAR_MINUS = -34,
XI_MINUS = 38,
XI_BAR_PLUS = -38,
XI_0 = 37,
XI_BAR_0 = -37,
OMEGA_MINUS = 49,
OMEGA_BAR_PLUS = -49,
SIGMA_C_0 = 86,
SIGMA_C_BAR_0 = -86,
SIGMA_STAR_C_0 = 96,
SIGMA_STAR_C_BAR_0 = -96,
LAMBDA_C_PLUS = 89,
LAMBDA_C_BAR_MINUS = -89,
XI_C_0 = 88,
XI_C_BAR_0 = -88,
SIGMA_C_PLUS = 85,
SIGMA_C_BAR_MINUS = -85,
SIGMA_STAR_C_PLUS = 95,
SIGMA_STAR_C_BAR_MINUS = -95,
SIGMA_C_PLUS_PLUS = 84,
SIGMA_C_BAR_MINUS_MINUS = -84,
SIGMA_STAR_C_PLUS_PLUS = 94,
SIGMA_STAR_C_BAR_MINUS_MINUS = -94,
XI_C_PLUS = 87,
XI_C_BAR_MINUS = -87,
OMEGA_C_0 = 99,
OMEGA_C_BAR_0 = -99,
J_PSI = 83,
VOID = 0,
};
static const std::map<sibyll::PID, corsika::particles::Code> Sibyll2Corsika = {
{PID::E_MINUS, corsika::particles::Code::Electron},
{PID::E_PLUS, corsika::particles::Code::Positron},
{PID::NU_E, corsika::particles::Code::NuE},
{PID::NU_E_BAR, corsika::particles::Code::NuEBar},
{PID::MU_MINUS, corsika::particles::Code::MuMinus},
{PID::MU_PLUS, corsika::particles::Code::MuPlus},
{PID::NU_MU, corsika::particles::Code::NuMu},
{PID::NU_MU_BAR, corsika::particles::Code::NuMuBar},
{PID::TAU_MINUS, corsika::particles::Code::TauMinus},
/*
TAU_PLUS = 90,
NU_TAU = 92,
NU_TAU_BAR = 93,
GAMMA = 1,
PI_0 = 6,
RHO_0 = 27,
K_L_0 = 11,
PI_PLUS = 7,
PI_MINUS = 8,
RHO_PLUS = 25,
RHO_MINUS = 26,
ETA = 23,
OMEGA = 32,
K_S_0 = 12,
K_STAR_0 = 30,
K_STAR_BAR_0 = 31,
K_PLUS = 9,
K_MINUS = 10,
K_STAR_PLUS = 28,
K_STAR_MINUS = 29,
D_PLUS = 59,
D_MINUS = 60,
D_STAR_PLUS = 78,
D_STAR_MINUS = 79,
D_0 = 71,
D_BAR_0 = 72,
D_STAR_0 = 80,
D_STAR_BAR_0 = 81,
D_S_PLUS = 74,
D_S_MINUS = 75,
D_STAR_S_PLUS = 76,
D_STAR_S_MINUS = 77,
ETA_C = 73,
N_0 = 14,
N_BAR_0 = -14,
DELTA_0 = 42,
DELTA_BAR_0 = -42,
P_PLUS = 13,
P_BAR_MINUS = -13,
DELTA_PLUS = 41,
DELTA_BAR_MINUS = -41,
DELTA_PLUS_PLUS = 40,
DELTA_BAR_MINUS_MINUS = -40,
SIGMA_MINUS = 36,
SIGMA_BAR_PLUS = -36,
LAMBDA_0 = 39,
LAMBDA_BAR_0 = -39,
SIGMA_0 = 35,
SIGMA_BAR_0 = -35,
SIGMA_PLUS = 34,
SIGMA_BAR_MINUS = -34,
XI_MINUS = 38,
XI_BAR_PLUS = -38,
XI_0 = 37,
XI_BAR_0 = -37,
OMEGA_MINUS = 49,
OMEGA_BAR_PLUS = -49,
SIGMA_C_0 = 86,
SIGMA_C_BAR_0 = -86,
SIGMA_STAR_C_0 = 96,
SIGMA_STAR_C_BAR_0 = -96,
LAMBDA_C_PLUS = 89,
LAMBDA_C_BAR_MINUS = -89,
XI_C_0 = 88,
XI_C_BAR_0 = -88,
SIGMA_C_PLUS = 85,
SIGMA_C_BAR_MINUS = -85,
SIGMA_STAR_C_PLUS = 95,
SIGMA_STAR_C_BAR_MINUS = -95,
SIGMA_C_PLUS_PLUS = 84,
SIGMA_C_BAR_MINUS_MINUS = -84,
SIGMA_STAR_C_PLUS_PLUS = 94,
SIGMA_STAR_C_BAR_MINUS_MINUS = -94,
XI_C_PLUS = 87,
XI_C_BAR_MINUS = -87,
OMEGA_C_0 = 99,
OMEGA_C_BAR_0 = -99,
J_PSI = 83,
VOID = 0,*/
};
} // namespace sibyll
} // namespace corsika::process
#endif
E_MINUS 3
E_PLUS 2
NU_E 15
NU_E_BAR 16
MU_MINUS 5
MU_PLUS 4
NU_MU 17
NU_MU_BAR 18
TAU_MINUS 91
TAU_PLUS 90
NU_TAU 92
NU_TAU_BAR 93
GAMMA 1
PI_0 6
RHO_0 27
K_L_0 11
PI_PLUS 7
PI_MINUS 8
RHO_PLUS 25
RHO_MINUS 26
ETA 23
OMEGA 32
K_S_0 12
K_STAR_0 30
K_STAR_BAR_0 31
K_PLUS 9
K_MINUS 10
K_STAR_PLUS 28
K_STAR_MINUS 29
D_PLUS 59
D_MINUS 60
D_STAR_PLUS 78
D_STAR_MINUS 79
D_0 71
D_BAR_0 72
D_STAR_0 80
D_STAR_BAR_0 81
D_S_PLUS 74
D_S_MINUS 75
D_STAR_S_PLUS 76
D_STAR_S_MINUS 77
ETA_C 73
N_0 14
N_BAR_0 -14
DELTA_0 42
DELTA_BAR_0 -42
P_PLUS 13
P_BAR_MINUS -13
DELTA_PLUS 41
DELTA_BAR_MINUS -41
DELTA_PLUS_PLUS 40
DELTA_BAR_MINUS_MINUS -40
SIGMA_MINUS 36
SIGMA_BAR_PLUS -36
LAMBDA_0 39
LAMBDA_BAR_0 -39
SIGMA_0 35
SIGMA_BAR_0 -35
SIGMA_PLUS 34
SIGMA_BAR_MINUS -34
XI_MINUS 38
XI_BAR_PLUS -38
XI_0 37
XI_BAR_0 -37
OMEGA_MINUS 49
OMEGA_BAR_PLUS -49
SIGMA_C_0 86
SIGMA_C_BAR_0 -86
SIGMA_STAR_C_0 96
SIGMA_STAR_C_BAR_0 -96
LAMBDA_C_PLUS 89
LAMBDA_C_BAR_MINUS -89
XI_C_0 88
XI_C_BAR_0 -88
SIGMA_C_PLUS 85
SIGMA_C_BAR_MINUS -85
SIGMA_STAR_C_PLUS 95
SIGMA_STAR_C_BAR_MINUS -95
SIGMA_C_PLUS_PLUS 84
SIGMA_C_BAR_MINUS_MINUS -84
SIGMA_STAR_C_PLUS_PLUS 94
SIGMA_STAR_C_BAR_MINUS_MINUS -94
XI_C_PLUS 87
XI_C_BAR_MINUS -87
OMEGA_C_0 99
OMEGA_C_BAR_0 -99
J_PSI 83
VOID 0
#include <corsika/particles/ParticleProperties.h>
#include <corsika/process/sibyll/ParticleConversion.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>
using namespace corsika;
TEST_CASE("Sibyll", "[processes]") {
SECTION("ParticleConversion") {
REQUIRE(corsika::particles::Electron::GetCode() ==
process::sibyll::Sibyll2Corsika.at(process::sibyll::PID::E_MINUS));
}
SECTION("Data") {
REQUIRE(corsika::particles::GetName(process::sibyll::Sibyll2Corsika.at(
process::sibyll::PID::E_PLUS)) == "e+");
}
SECTION("bla") {}
SECTION("blubb") {}
}
This diff is collapsed.
add_subdirectory (SuperStupidStack)
set (SuperStupidStack_HEADERS SuperStupidStack.h)
set (SuperStupidStack_NAMESPACE corsika/stack/super_stupid)
add_library (SuperStupidStack INTERFACE)
CORSIKA_COPY_HEADERS_TO_NAMESPACE (SuperStupidStack ${SuperStupidStack_NAMESPACE} ${SuperStupidStack_HEADERS})
target_link_libraries (
SuperStupidStack
INTERFACE
CORSIKAstackinterface
CORSIKAunits
CORSIKAparticles
)
target_include_directories (
SuperStupidStack
INTERFACE
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
install (
FILES
${SuperStupidStack_HEADERS}
DESTINATION
include/${SuperStupidStack_NAMESPACE}
)
#ifndef _include_superstupidstack_h_
#define _include_superstupidstack_h_
#include <string>
#include <vector>
#include <corsika/particles/ParticleProperties.h>
#include <corsika/stack/Stack.h>
#include <corsika/units/PhysicalUnits.h>
namespace corsika::stack {
namespace super_stupid {
using corsika::particles::Code;
using corsika::units::EnergyType;
using corsika::units::operator""_GeV; // literals;
/**
* Example of a particle object on the stack.
*/
template <typename _Stack>
class ParticleRead : public StackIteratorInfo<_Stack, ParticleRead<_Stack> > {
using StackIteratorInfo<_Stack, ParticleRead>::GetIndex;
using StackIteratorInfo<_Stack, ParticleRead>::GetStack;
public:
void SetId(const Code id) { GetStack().SetId(GetIndex(), id); }
void SetEnergy(const EnergyType& e) { GetStack().SetEnergy(GetIndex(), e); }
Code GetId() const { return GetStack().GetId(GetIndex()); }
const EnergyType& GetEnergy() const { return GetStack().GetEnergy(GetIndex()); }
};
/**
*
* Memory implementation of the most simple (stupid) particle stack object.
*/
class SuperStupidStackImpl {
public:
void Clear() {
fDataE.clear();
fDataId.clear();
}
int GetSize() const { return fDataId.size(); }
int GetCapacity() const { return fDataId.size(); }
void SetId(const int i, const Code id) { fDataId[i] = id; }
void SetEnergy(const int i, const EnergyType& e) { fDataE[i] = e; }
const Code GetId(const int i) const { return fDataId[i]; }
const EnergyType& GetEnergy(const int i) const { return fDataE[i]; }
/**
* Function to copy particle at location i2 in stack to i1
*/
void Copy(const int i1, const int i2) {
fDataE[i2] = fDataE[i1];
fDataId[i2] = fDataId[i1];
}
protected:
void IncrementSize() {
fDataE.push_back(0_GeV);
fDataId.push_back(Code::unknown);
}
void DecrementSize() {
if (fDataE.size() > 0) {
fDataE.pop_back();
fDataId.pop_back();
}
}
private:
/// the actual memory to store particle data
std::vector<Code> fDataId;
std::vector<EnergyType> fDataE;
}; // end class SuperStupidStackImpl
typedef StackIterator<SuperStupidStackImpl, ParticleRead<SuperStupidStackImpl> >
Particle;
typedef Stack<SuperStupidStackImpl, Particle> SuperStupidStack;
} // namespace super_stupid
} // namespace corsika::stack
#endif
add_library (CORSIKAthirdparty INTERFACE)
target_include_directories (CORSIKAthirdparty SYSTEM
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/ThirdParty>
$<INSTALL_INTERFACE:include/ThirdParty>
)
install (DIRECTORY phys DESTINATION include/ThirdParty/)
install (DIRECTORY catch2 DESTINATION include/ThirdParty/)
/**
@page ThirdParty
@tableofcontents
In the directory ThirdParty we provide simple dependencies. This
minimizes the need to install additional software for the user. Note
the individual copyrights and licences here!
@section PhysUnits
The PhysUnits library is an external dependency included here just for
convenience:
Original source code from: https://github.com/martinmoene/PhysUnits-CT-Cpp11#references
Licence: BSL-1.0 (https://github.com/martinmoene/PhysUnits-CT-Cpp11/blob/master/LICENSE_1_0.txt)
References: https://github.com/martinmoene/PhysUnits-CT-Cpp11#references
@section catch2
The catch2 unit testing library is from: https://github.com/catchorg/Catch2
Licence: BSL-1.0 (https://github.com/martinmoene/PhysUnits-CT-Cpp11/blob/master/LICENSE_1_0.txt)
References: https://github.com/catchorg/Catch2
@section eigen3
eigen3 ....
*/
This diff is collapsed.
File deleted
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.