CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
CONEX_f.hpp
1 /*
2  * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
11 //----------------------------------------------
12 // C++ interface for the CONEX fortran code
13 //----------------------------------------------
14 // wrapper
15 
16 #include <conexConfig.h>
17 #include <conexHEModels.h>
18 #include <array>
19 
20 namespace conex {
21 
22  // the CORSIKA 8 random number interface
23 
29  extern float rndm_interface();
30 
37  extern double double_rndm_interface();
38 
39  // the CONEX fortran interface
40 
41  extern "C" {
42  extern struct { std::array<double, 16> dptl; } cxoptl_;
43 
45  extern struct {
46  std::array<double, 3> airz, aira, airw;
47  double airavz, airava;
48  std::array<double, 3> airi;
49  } cxair_;
50 
51  void cegs4_(int&, int&);
52 
53  void initconex_(int&, int*, int&, int&,
54 #ifdef CONEX_EXTENSIONS
55  int&,
56 #endif
57  const char*, int);
58  void conexrun_(int& ipart, double& energy, double& theta, double& phi,
59  double& injectionHeight, double& dimpact, int ioseed[3]);
60  void conexcascade_();
61  void hadroncascade_(int&, int&, int&, int&);
62  void solvemomentequations_(int&);
63  void show_(int& iqi, double& ei, double& xmi, double& ymi, double& zmi, double& dmi,
64  double& xi, double& yi, double& zi, double& tmi, double& ui, double& vi,
65  double& wi, int& iri, double& wti, int& latchi);
66 
67  int get_number_of_depth_bins_();
68 
69  void get_shower_data_(const int&, const int&, const int&, float&, float&, float&,
70  float&, float&);
71  void get_shower_edep_(const int&, const int&, float&, float&);
72  void get_shower_muon_(const int&, const int&, float&, float&);
73  void get_shower_gamma_(const int&, const int&, float&);
74  void get_shower_electron_(const int&, const int&, float&);
75  void get_shower_positron_(const int&, const int&, float&);
76  void get_shower_hadron_(const int&, const int&, float&);
77  }
78 
79 } // namespace conex