File indexing completed on 2024-11-15 09:00:42
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <string>
0010
0011 extern "C" {
0012 extern void pyinit_(const char*, const char*, const char*, double&, int, int, int);
0013 extern void pyevnt_();
0014 extern void pygive_(const char*, int);
0015 extern void pyfram_(int&);
0016 extern void pylist_(int&);
0017 extern void pystat_(int&);
0018 extern int pycomp_(int&);
0019
0020 extern struct
0021 {
0022 int n;
0023 int npad;
0024 int k[5][4000];
0025 double p[5][4000];
0026 double v[5][4000];
0027 } pyjets_;
0028 extern struct
0029 {
0030 int mdcy[3][500];
0031 int mdme[2][8000];
0032 double brat[8000];
0033 int kfpd[5][8000];
0034 } pydat3_;
0035 }
0036
0037
0038 class pythiaInterface {
0039
0040 public:
0041
0042
0043 static void pygive(const std::string cmnd) {
0044 const char* cstring = cmnd.c_str(); int len = cmnd.length();
0045 pygive_(cstring, len);
0046 }
0047
0048
0049 static void pyinit(const std::string frame, const std::string beam,
0050 const std::string target, double wIn) {
0051 const char* cframe = frame.c_str(); int lenframe = frame.length();
0052 const char* cbeam = beam.c_str(); int lenbeam = beam.length();
0053 const char* ctarget = target.c_str(); int lentarget = target.length();
0054 pyinit_(cframe, cbeam, ctarget, wIn, lenframe, lenbeam, lentarget);
0055 }
0056
0057 static void pyevnt() {pyevnt_();}
0058
0059 static void pyfram(int frame) { pyfram_(frame); }
0060
0061
0062 static void pylist(int mode) {pylist_(mode);}
0063
0064
0065 static void pystat(int mode) {pystat_(mode);}
0066
0067
0068 static int pycomp(int pdg) { return pycomp_(pdg);}
0069
0070
0071 };