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 225 additions and 813 deletions
#include <utl/Stack.h>
int main(int argc, char** argv) { return 0; }
add_subdirectory (NullModel)
add_subdirectory (Sibyll)
set (
MODEL_SOURCES
NullModel.cc
)
set (
MODEL_HEADERS
NullModel.h
)
set (
MODEL_NAMESPACE
corsika/process/null_model
)
add_library (ProcessNullModel STATIC ${MODEL_SOURCES})
CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessNullModel ${MODEL_NAMESPACE} ${MODEL_HEADERS})
set_target_properties (
ProcessNullModel
PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
# PUBLIC_HEADER "${MODEL_HEADERS}"
)
# target dependencies on other libraries (also the header onlys)
target_link_libraries (
ProcessNullModel
CORSIKAunits
)
target_include_directories (
ProcessNullModel
INTERFACE
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include/include>
)
install (
TARGETS ProcessNullModel
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
# PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
)
# --------------------
# code unit testing
add_executable (testNullModel testNullModel.cc)
target_link_libraries (
testNullModel
CORSIKAgeometry
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (NAME testNullModel COMMAND testNullModel)
#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 (DummyStack)
add_subdirectory (SuperStupidStack)
set (DummyStack_HEADERS DummyStack.h)
set (DummyStack_NAMESPACE corsika/stack/dummy)
add_library (DummyStack INTERFACE)
CORSIKA_COPY_HEADERS_TO_NAMESPACE (DummyStack ${DummyStack_NAMESPACE} ${DummyStack_HEADERS})
target_link_libraries (
DummyStack
INTERFACE
CORSIKAstackinterface
CORSIKAunits
CORSIKAparticles
)
target_include_directories (
DummyStack
INTERFACE
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
install (
FILES
${DummyStack_HEADERS}
DESTINATION
include/${DummyStack_NAMESPACE}
)
#ifndef _include_dummystack_h_
#define _include_dummystack_h_
#include <corsika/particles/ParticleProperties.h>
#include <corsika/stack/Stack.h>
#include <corsika/units/PhysicalUnits.h>
#include <string>
#include <vector>
namespace corsika::stack {
namespace dummy {
/**
* 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:
};
/**
*
* Memory implementation of the most simple (stupid) particle stack object.
*/
class DummyStackImpl {
public:
void Init() {}
void Clear() {}
int GetSize() const { return 0; }
int GetCapacity() const { return 0; }
/**
* Function to copy particle at location i2 in stack to i1
*/
void Copy(const int i1, const int i2) {}
protected:
void IncrementSize() {}
void DecrementSize() {}
}; // end class DummyStackImpl
typedef StackIterator<DummyStackImpl, ParticleRead<DummyStackImpl> > Particle;
typedef Stack<DummyStackImpl, Particle> DummyStack;
} // namespace dummy
} // namespace corsika::stack
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.