StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Pythia6.h
1 #ifndef __Pythia6_h__
2 #define __Pythia6_h__
3 
4 #include "StarCallf77.h"
5 #include <string>
6 using namespace std;
7 
8 #include "TObject.h"
9 
11 void PyEvnt();
13 void PyStat( Int_t stat );
15 void PyList( Int_t list );
17 void PyTune( Int_t tune );
19 void PyHepc( Int_t mode );
21 void PyInit( string frame, string blue, string yellow, Double_t energy );
22 
23 
24 //
25 // Interface to the PYJETS common block
26 //
27 
28 #define address_of_pyjets F77_NAME( address_of_pyjets, ADDRESS_OF_PYJETS )
29 struct PyJets_t {
30  /* Layout of the memory. */
31  Int_t n;
32  Int_t npad;
33  Int_t _k[5][4000];
34  Double_t _p[5][4000];
35  Double_t _v[5][4000];
36  /* Add access methods which mimic fortran arrays */
37  Int_t &k( Int_t i, Int_t j ){ return _k[j-1][i-1]; }
38  Double_t &p( Int_t i, Int_t j ){ return _p[j-1][i-1]; }
39  Double_t &v( Int_t i, Int_t j ){ return _v[j-1][i-1]; }
40 };
41 extern "C" PyJets_t *address_of_pyjets();
42 
43 //
44 // Interface to the PYSUBS common block
45 // COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
46 //
47 #define address_of_pysubs F77_NAME( address_of_pysubs, ADDRESS_OF_PYSUBS )
48 struct PySubs_t {
49  Int_t msel;
50  Int_t padding;
51  Int_t _msub[500];
52  Int_t _kfin[81][2];
53  Double_t _ckin[200];
54  Int_t &msub( Int_t i ){ return _msub[i-1]; }
55  Int_t &kfin( Int_t i, Int_t j ){ return _kfin[j-40][i-1]; }
56  Double_t &ckin( Int_t i ){ return _ckin[i-1]; }
57 };
58 extern "C" PySubs_t *address_of_pysubs();
59 
60 //
61 // Interface to the PYDAT1 common block
62 // COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
63 //
64 #define address_of_pydat1 F77_NAME( address_of_pydat1, ADDRESS_OF_PYDAT1 )
65 struct PyDat1_t{
66  Int_t _mstu[200];
67  Double_t _paru[200];
68  Int_t _mstj[200];
69  Double_t _parj[200];
70  Int_t &mstu(Int_t i){return _mstu[i-1];}
71  Double_t &paru(Int_t i){return _paru[i-1];}
72  Int_t &mstj(Int_t i){return _mstj[i-1];}
73  Double_t &parj(Int_t i){return _parj[i-1];}
74 };
75 extern "C" PyDat1_t *address_of_pydat1();
76 
77 //
78 // Interface to the PYDAT3 common block
79 // COMMON/PYDAT3/MDCY(500,3),MDME(8000,2),BRAT(8000),KFDP(8000,5)
80 //
81 #define address_of_pydat3 F77_NAME( address_of_pydat3, ADDRESS_OF_PYDAT3 )
82 struct PyDat3_t {
83  Int_t _mdcy[3][500];
84  Int_t _mdme[2][8000];
85  Double_t _brat[8000];
86  Int_t _kfdp[8000];
87  Int_t &mdcy(Int_t i, Int_t j){ return _mdcy[j-1][i-1]; }
88  Int_t &mdme(Int_t i, Int_t j){ return _mdme[j-1][i-1]; }
89  Double_t &brat(Int_t i){ return _brat[i-1]; }
90  Int_t &kfdp(Int_t i){ return _kfdp[i-1]; }
91 };
92 extern "C" PyDat3_t *address_of_pydat3();
93 
94 //
95 // Interface to the PYPARS common block
96 // COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
97 //
98 #define address_of_pypars F77_NAME( address_of_pypars, ADDRESS_OF_PYPARS )
99 struct PyPars_t {
100  Int_t _mstp[200];
101  Double_t _parp[200];
102  Int_t _msti[200];
103  Double_t _pari[200];
104  Int_t &mstp( Int_t i ){ return _mstp[i-1]; }
105  Double_t &parp( Int_t i ){ return _parp[i-1]; }
106  Int_t &msti( Int_t i ){ return _msti[i-1]; }
107  Double_t &pari( Int_t i ){ return _pari[i-1]; }
108 };
109 extern "C" PyPars_t *address_of_pypars();
110 
111 //
112 // Interface to the PYINT5 common block
113 // COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
114 //
115 #define address_of_pyint5 F77_NAME( address_of_pyint5, ADDRESS_OF_PYINT5 )
116 struct PyInt5_t {
117  Int_t _ngen[3][501];
118  Double_t _xsec[3][501];
119  Int_t &ngen( Int_t isub, Int_t i){ return _ngen[i-1][isub]; }
120  Double_t &xsec( Int_t isub, Int_t i){ return _xsec[i-1][isub]; }
121 };
122 extern "C" PyInt5_t *address_of_pyint5();
123 
124 #endif