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 void Py1Ent( int ip, int kf, double energy, double theta, double phi );
24 int PyComp( int kf );
25 
26 
27 
28 //
29 // Interface to the PYJETS common block
30 //
31 
32 #define address_of_pyjets F77_NAME( address_of_pyjets, ADDRESS_OF_PYJETS )
33 struct PyJets_t {
34  /* Layout of the memory. */
35  Int_t n;
36  Int_t npad;
37  Int_t _k[5][4000];
38  Double_t _p[5][4000];
39  Double_t _v[5][4000];
40  /* Add access methods which mimic fortran arrays */
41  Int_t &k( Int_t i, Int_t j ){ return _k[j-1][i-1]; }
42  Double_t &p( Int_t i, Int_t j ){ return _p[j-1][i-1]; }
43  Double_t &v( Int_t i, Int_t j ){ return _v[j-1][i-1]; }
44 };
45 extern "C" PyJets_t *address_of_pyjets();
46 
47 //
48 // Interface to the PYSUBS common block
49 // COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
50 //
51 #define address_of_pysubs F77_NAME( address_of_pysubs, ADDRESS_OF_PYSUBS )
52 struct PySubs_t {
53  Int_t msel; // Process selection switch
54  Int_t padding; //
55  Int_t _msub[500]; // Individual processes (indexed from zero)
56  Int_t _kfin[81][2]; //
57  Double_t _ckin[200]; //
58  Int_t &msub( Int_t i ){ return _msub[i-1]; }
59  Int_t &kfin( Int_t i, Int_t j ){ return _kfin[j-40][i-1]; }
60  Double_t &ckin( Int_t i ){ return _ckin[i-1]; }
61 };
62 extern "C" PySubs_t *address_of_pysubs();
63 
64 //
65 // Interface to the PYDAT1 common block
66 // COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
67 //
68 #define address_of_pydat1 F77_NAME( address_of_pydat1, ADDRESS_OF_PYDAT1 )
69 struct PyDat1_t{
70  Int_t _mstu[200];
71  Double_t _paru[200];
72  Int_t _mstj[200];
73  Double_t _parj[200];
74  Int_t &mstu(Int_t i){return _mstu[i-1];}
75  Double_t &paru(Int_t i){return _paru[i-1];}
76  Int_t &mstj(Int_t i){return _mstj[i-1];}
77  Double_t &parj(Int_t i){return _parj[i-1];}
78 };
79 extern "C" PyDat1_t *address_of_pydat1();
80 
81 //
82 // Interface to the PYDAT3 common block
83 // COMMON/PYDAT3/MDCY(500,3),MDME(8000,2),BRAT(8000),KFDP(8000,5)
84 //
85 #define address_of_pydat3 F77_NAME( address_of_pydat3, ADDRESS_OF_PYDAT3 )
86 struct PyDat3_t {
87  Int_t _mdcy[3][500];
88  Int_t _mdme[2][8000];
89  Double_t _brat[8000];
90  Int_t _kfdp[8000];
91  Int_t &mdcy(Int_t i, Int_t j){ return _mdcy[j-1][i-1]; }
92  Int_t &mdme(Int_t i, Int_t j){ return _mdme[j-1][i-1]; }
93  Double_t &brat(Int_t i){ return _brat[i-1]; }
94  Int_t &kfdp(Int_t i){ return _kfdp[i-1]; }
95 };
96 extern "C" PyDat3_t *address_of_pydat3();
97 
98 //
99 // Interface to the PYPARS common block
100 // COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
101 //
102 #define address_of_pypars F77_NAME( address_of_pypars, ADDRESS_OF_PYPARS )
103 struct PyPars_t {
104  Int_t _mstp[200];
105  Double_t _parp[200];
106  Int_t _msti[200];
107  Double_t _pari[200];
108  Int_t &mstp( Int_t i ){ return _mstp[i-1]; }
109  Double_t &parp( Int_t i ){ return _parp[i-1]; }
110  Int_t &msti( Int_t i ){ return _msti[i-1]; }
111  Double_t &pari( Int_t i ){ return _pari[i-1]; }
112 };
113 extern "C" PyPars_t *address_of_pypars();
114 
115 //
116 // Interface to the PYINT5 common block
117 // COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
118 //
119 #define address_of_pyint5 F77_NAME( address_of_pyint5, ADDRESS_OF_PYINT5 )
120 struct PyInt5_t {
121  Int_t _ngen[3][501];
122  Double_t _xsec[3][501];
123  Int_t &ngen( Int_t isub, Int_t i){ return _ngen[i-1][isub]; }
124  Double_t &xsec( Int_t isub, Int_t i){ return _xsec[i-1][isub]; }
125 };
126 extern "C" PyInt5_t *address_of_pyint5();
127 
128 #endif