Newer
Older
/*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* 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.
*/
#pragma once
#include <array>
/**
* \file epos.hpp
*
* Interface file for the EPOS library.
*/
namespace epos {
/**
* \function epos::rndm_interface
*
* this is the random number hook to external packages.
*
* CORSIKA8, for example, has to provide an implementation of this.
**/
/**
* \function epos::double_rndm_interface
*
* this is the random number hook to external packages.
*
* CORSIKA8, for example, has to provide an implementation of this.
**/
extern double double_rndm_interface();
void ainit_();
void aepos_(int&);
void hdecin_(bool&);
void hnbspd_(int&);
void hnbpajini_();
void conini_();
void psaini_();
void emsini_(double&, int&, int&);
void paramini_(int&);
void xsigma_();
//
// cross section from tables
//
// c------------------------------------------------------------------------------
// function eposcrse(ek,mapro,matar,id)
// c------------------------------------------------------------------------------
// c inelastic cross section of epos
// c (id=0 corresponds to air)
// c ek - kinetic energy for the interaction in the lab
// c maproj - projec mass number (1<maproj<64)
// c matarg - target mass number (1<matarg<64)
// c------------------------------------------------------------------------------
float eposcrse_(float&, int&, int&, int&);
float eposelacrse_(float&, int&, int&, int&);
// calculate cross section
// c------------------------------------------------------------------------------
// subroutine crseaaEpos(sigt,sigi,sigc,sige)
// c------------------------------------------------------------------------------
// c nucleus-nucleus (hadron) cross section of epos from simplified (realistic)
// c simulations
// c (id=0 corresponds to air)
// c sigt = sig tot
// c sigi = sig inelastic (cut + projectile diffraction)
// c sigc = sig cut
// c sige = sig elastic (includes target diffraction)
// c------------------------------------------------------------------------------
void crseaaepos_(float&, float&, float&, float&);
void emsaaa_(int&);
void gakfra_(int&, int&);
void utghost_(int&);
void bjinta_(int&);
void utresc_(int&);
void emsfrag_(int&);
// get particles hadron class: meson, baryon etc..???
void iclass_(int&, int&);
// get charge for id
void idchrg_(int&, int&);
// get isospin, spin, strangeness for id
void idspin_(int&, int&, int&, int&);
// get mass for id
// convert id from one format to another
// additional random number functions
void ranfini_(double&, int&, int&);
void ranfcv_(double&);
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// common blocks as
// defined in epos.inc
extern struct { int inicnt; } cicnt_;
extern struct {
int intpol;
int isigma;
int iomega;
int isetcs;
} hadr6_;
extern struct { int infragm; } nucl6_;
extern struct {
int iorsce;
int iorsdf;
int iorshh;
int ionudi;
} cjinti_;
extern struct {
float airznxs[3];
float airanxs[3];
float airwnxs[3];
float airavznxs;
float airavanxs;
} nxsair_;
extern struct {
int iappl;
int model;
} appli_;
extern struct {
int iapplxs;
int modelxs;
} xsappli_;
extern struct {
int nevent;
int nfull;
int nfreeze;
int ninicon;
} events_;
extern struct {
int neventxs;
int iframexs;
} xsevent_;
// common/metr1/iospec,iocova,iopair,iozero,ioflac,iomom
extern struct {
int iospec;
int iocova;
int iopair;
int iozero;
int ioflac;
int iomom;
} metr1_;
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
extern struct {
int ifrade;
int iframe;
int idecay;
int jdecay;
int iremn;
} othe2_;
extern struct { int ktnbod; } metr7_;
extern struct {
float egylow;
float egyfac;
} had12_;
extern struct {
int laproj;
int maproj;
int latarg;
int matarg;
float core;
float fctrmx;
} nucl1_;
extern struct {
float amproj;
float amtarg;
float ypjtl;
float yhaha;
float pnullx;
} chadron_;
extern struct {
int iomodl;
int idproj;
int idtarg;
float wexcit;
} hadr2_;
extern struct {
int idprojin;
int idtargin;
float rexdifi[4];
float rexndii[4];
int irdmpr;
int isoproj;
int isotarg;
} hadr25_;
extern struct {
float engy;
float elepti;
float elepto;
float angmue;
int icinpu;
} lept1_;
extern struct {
float egymin;
float egymax;
float elab;
float ecms;
float ekin;
} enrgy_;
extern struct {
float pnll;
float ptq;
float exmass;
float cutmss;
float wproj;
float wtarg;
} hadr1_;
unsigned int constexpr idxD0 = 0;
unsigned int constexpr idxD1 = 2;
unsigned int constexpr idxD = 1;
unsigned int constexpr nclha = 4;
unsigned int constexpr nclegy = 100;
extern struct {
float alpD[nclha][nclha][idxD1 - idxD0 + 1];
float alpdp[nclha][nclha][idxD1 - idxD0 + 1];
float alpDpp[nclha][nclha][idxD1 - idxD0 + 1];
float betD[nclha][nclha][idxD1 - idxD0 + 1];
float betDp[nclha][nclha][idxD1 - idxD0 + 1];
float betDpp[nclha][nclha][idxD1 - idxD0 + 1];
float gamD[nclha][nclha][idxD1 - idxD0 + 1];
float delD[nclha][nclha][idxD1 - idxD0 + 1];
int idxDmin;
float bmxdif[nclha][nclha];
float bkmxndif;
} Dparam_;
extern struct {
float phievt;
int nevt;
float bimevt;
int kolevt;
int koievt;
float pmxevt;
float egyevt;
int npjevt;
int ntgevt;
int npnevt;
int nppevt;
int ntnevt;
int ntpevt;
int jpnevt;
int jppevt;
int jtnevt;
int jtpevt;
float xbjevt;
float qsqevt;
int nglevt;
float zppevt;
float zptevt;
int minfra;
int maxfra;
int kohevt;
} cevt_;
extern struct {
double seedi;
double seedj;
double seedj2;
double seedc;
int iseqini;
int iseqsim;
} cseed_;
extern struct {
int istore;
int istmax;
int gaumx;
int irescl;
int ntrymx;
int nclean;
int iopdg;
int ioidch;
} othe1_;
extern struct {
int ifop;
int ifmt;
int ifch;
int ifcx;
int ifhi;
int ifdt;
int ifcp;
int ifdr;
} files_;
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
extern struct {
char fnch[500];
char fnhi[500];
char fndt[500];
char fnii[500];
char fnid[500];
char fnie[500];
char fnrj[500];
char fnmt[500];
char fngrv[500];
char fncp[500];
char fnnx[500];
char fncs[500];
char fndr[500];
char fnhpf[500];
} fname_;
extern struct {
int nfnch;
int nfnhi;
int nfndt;
int nfnii;
int nfnid;
int nfnie;
int nfnrj;
int nfnmt;
int nfngrv;
int nfncp;
int nfnnx;
int nfncs;
int nfndr;
int nfnhpf;
} nfname_;
extern struct {
int iprmpt;
int ish;
int ishsub;
int irandm;
int irewch;
int iecho;
int modsho;
int idensi;
} prnt1_;
unsigned int constexpr mmry = 1;
unsigned int constexpr mxptl = 200000 / mmry;
extern struct {
int nptl;
float pptl[mxptl][5];
int iorptl[mxptl];
int idptl[mxptl];
int istptl[mxptl];
float tivptl[mxptl][2];
int ifrptl[mxptl][2];
int jorptl[mxptl];
float xorptl[mxptl][4];
int ibptl[mxptl][4];
int ityptl[mxptl];
} cptl_;
extern struct {
float sigtot;
float sigcut;
float sigela;
float sloela;
float sigsd;
float sigine;
float sigdif;
float sigineaa;
float sigtotaa;
float sigelaaa;
float sigcutaa;
float sigdd;
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
} hadr5_;
unsigned int constexpr mxnody = 200;
extern struct {
int nrnody;
int nody[mxnody];
} nodcy_;
extern struct {
int iclpro;
int icltar;
int iclegy;
} had10_;
/**
Small helper class to provide a data-directory name in the format eposlhc expects
*/
class datadir {
private:
datadir operator=(const std::string& dir);
datadir operator=(const datadir&);
public:
datadir(const std::string& dir);
char data[500];
int length;