CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
qgsjet-II-04.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 #include <string>
12 
13 //----------------------------------------------
14 // C++ interface for the QGSJetII event generator
15 //----------------------------------------------
16 // wrapper
17 
18 extern "C" {
19 
20 // data memory layout
21 
22 extern struct { int nsp; } qgarr12_;
23 
24 const int nptmax = 95000;
25 const int iapmax = 208;
26 
27 extern struct {
28  double esp[nptmax][4];
29  int ich[nptmax];
30 } qgarr14_;
31 
32 extern struct {
33  // c nsf - number of secondary fragments;
34  // c iaf(i) - mass of the i-th fragment
35  int nsf;
36  int iaf[iapmax];
37 } qgarr13_;
38 
39 extern struct {
40  int nwt;
41  int nwp;
42 } qgarr55_;
43 
47 class datadir {
48 private:
49  datadir operator=(const std::string& dir);
50  datadir operator=(const datadir&);
51 
52 public:
53  datadir(const std::string& dir);
54  char data[132];
55 };
56 
57 // functions
58 void qgset_();
59 void qgaini_(
60  const char* datdir); // Note: there is a length limiation 132 from fortran-qgsjet here
61 
71 void qgini_(const double& e0n, const int& icp0, const int& iap, const int& iat);
72 
76 void qgconf_();
77 
86 double qgsect_(const double& e0n, const int& icz, const int& iap0, const int& iat0);
87 
91 double qgran_(int&);
92 }
93 
94 #include <corsika/detail/modules/qgsjetII/qgsjet-II-04.inl>
Small helper class to provide a data-directory name in the format qgsjetII expects.