IAP GITLAB

Skip to content
Snippets Groups Projects
Forked from Air Shower Physics / corsika
3408 commits behind the upstream repository.
COASTUserLib.cc 3.60 KiB

/*
 * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
 *
 * See file AUTHORS for a list of contributors.
 *
 * This software is distributed under the terms of the GNU General Public
 * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
 * the license.
 */

#include <interface/CorsikaInterface.h>

#include <corsika/coast/COASTProcess.h>
#include <corsika/coast/COASTStack.h>
#include <corsika/geometry/CoordinateSystem.h>
#include <corsika/geometry/Line.h>
#include <corsika/geometry/Point.h>
#include <corsika/geometry/Trajectory.h>
#include <corsika/geometry/Vector.h>
#include <corsika/units/PhysicalUnits.h>

#include <crs/CInteraction.h>
#include <crs/CParticle.h>
#include <crs/CorsikaTypes.h>
#include <crs/TSubBlock.h>

#include <iostream>
#include <sstream>

using namespace std;
using namespace corsika;
using namespace corsika::units::si;

corsika::coast::COASTProcess gCorsikaProcess;

/*
  Data is one CORSIKA data-block constining of 21 SubBlocks.
  A SubBlock can be:
  - thinned mode:     39 (Particles) * 8 (ENTRIES) * 4 (BYTES)
  - not-thinned mode: 39 (Particles) * 7 (ENTRIES) * 4 (BYTES)
*/
extern "C" void wrida_([[maybe_unused]] const CREAL* Data) {
  // crs::CParticleFortranPtr p;
  // const bool isF = prminfo_(p);
}

extern "C" void inida_([[maybe_unused]] const char* filename,
                       [[maybe_unused]] const int& thinning,
                       [[maybe_unused]] const int& /*curved*/,
                       [[maybe_unused]] const int& /*slant*/,
                       [[maybe_unused]] const int& /*stackinput*/,
                       [[maybe_unused]] const int& /*preshower*/,
                       [[maybe_unused]] int str_length) {
  gCorsikaProcess.Init();
}

extern "C" void cloda_() {
  // crs::CParticleFortranPtr pptr;
  // const bool isF = prminfo_(pptr);
  // gCorsikaProcess.Close();
}

void interaction_([[maybe_unused]] const crs::CInteraction& interaction) {
  /*
    all interactions in the shower are available in this function !
    the information availabel in the CInteraction class are:
    double x;
    double y;
    double z;