IAP GITLAB

Skip to content
Snippets Groups Projects
Commit fa194cf8 authored by ralfulrich's avatar ralfulrich Committed by Ralf Ulrich
Browse files

added explicit conex init method. This allows to run multiple showers, and re-init

parent 38e6dc9e
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,9 @@ namespace corsika {
CORSIKA_LOG_DEBUG("showerCore (C8): {}",
showerCore_.getCoordinates(center.getCoordinateSystem()));
int randomSeeds[3] = {1234, 0, 0}; // will be overwritten later??
int randomSeeds[3] = {1234, 0,
0}; // SEEDS ARE NOT USED. All random numbers are obtained from
// the CORSIKA 8 stream "conex" and "epos"!
int heModel = eSibyll23;
int nShower = 1; // large to avoid final stats.
......@@ -118,13 +120,13 @@ namespace corsika {
theta, phi);
int ipart = static_cast<int>(primaryPDG_);
auto rng = RNGManager<>::getInstance().getRandomStream("conex");
double dimpact = 0.; // valid only if shower core is fixed on the observation plane;
// for skimming showers an offset is needed like in CONEX
std::array<int, 3> ioseed{static_cast<int>(rng()), static_cast<int>(rng()),
static_cast<int>(rng())};
// SEEDS ARE NOT USED. All random numbers are obtained from
// the CORSIKA 8 stream "conex" and "epos"!
std::array<int, 3> ioseed{1,1,1};
double xminp = injectionHeight_ / 1_m;
......
......@@ -17,6 +17,19 @@
* This file is an integral part of the epos interface. It must be
* linked to the executable linked to epos exactly once
*
* Note, that the fortran random numbe interface functions are all
* defined in the epos corsika 8 interface:
*
* ranfst, ranfgt, rmmaqd, ranfini, ranfcv, rmmard, rangen, drangen
*
* All of them use the epos_random_interface registered as "epos" stream.
*
* Thus, the fortran part of CONEX will use the "epos" CORSIKA 8 random stream,
* only the CONEX c++ part will use the "conex" random stream.
*
* Since EPOS and CONEX use the same fortran symbols for access to
* random numbers this can only be changed by renaming inside the
* fortran part.
*/
namespace conex {
......
......@@ -101,7 +101,8 @@ TEST_CASE("CONEXSourceCut") {
[[maybe_unused]] corsika::sibyll::NuclearInteraction sibyllNuc(sibyll, env);
CONEXhybrid conex(center, showerAxis, t, injectionHeight, E0, get_PDG(Code::Proton));
conex.init();
HEPEnergyType const Eem{1_PeV};
auto const momentum = showerAxis.getDirection() * Eem;
......
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