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