1 //--------------------------------------------------------------------------
2 #ifdef _WIN32 // This version is for Windows MS Visual C++ only.
3 #ifndef PYTHIA_WRAPPER_6_H
4 #define PYTHIA_WRAPPER_6_H
6 //////////////////////////////////////////////////////////////////////////
7 // Matt.Dobbs@Cern.CH, November 2000
8 // Version 6.200 update October 2001
9 // Wrapper for FORTRAN version of Pythia
10 // The _WIN32 version is provided by Witold Pokorski
11 // <Witold.Pokorski@Cern.CH>, 2002-01-22, and is the version
12 // which should be used when compiling on Windows MS Visual C++.
13 // This wrapper is NOT intended as a part of HepMC - it is only supplied
14 // for your convenience.
15 //////////////////////////////////////////////////////////////////////////
17 // A simple example of calling Pythia from C++ using this header file is
18 // given in test/test_PythiaWrapper.cxx
20 // Note the pyhepc routine is used by Pythia to fill
21 // the HEPEVT common block uses double precision and 4000 entries.
27 //--------------------------------------------------------------------------
28 // Initialization routine
32 void INITPYDATA(void);
34 #define initpydata INITPYDATA
37 //--------------------------------------------------------------------------
38 // PYTHIA Common Block Declarations
40 const int pyjets_maxn =4000;
42 int n, npad, k[5][pyjets_maxn];
43 double p[5][pyjets_maxn], v[5][pyjets_maxn];
55 double pmas[4][500], parf[2000], vckm[4][4];
59 int mdcy[3][500], mdme[2][8000];
70 int msel, mselpd, msub[500], kfin[81][2];
87 int iset[500], kfpr[2][500];
89 int icol[2][4][40]; // was [320] was [40][4][2]
93 int ngenpd, ngen[3][501];
98 extern "C" PYSUBS_DEF PYSUBS;
99 extern "C" PYJETS_DEF PYJETS;
100 extern "C" PYDAT1_DEF PYDAT1;
101 extern "C" PYDAT2_DEF PYDAT2;
102 extern "C" PYPARS_DEF PYPARS;
103 extern "C" PYDATR_DEF PYDATR;
104 extern "C" PYDAT3_DEF PYDAT3;
105 extern "C" PYINT1_DEF PYINT1;
106 extern "C" PYINT2_DEF PYINT2;
107 extern "C" PYINT5_DEF PYINT5;
110 #define pysubs PYSUBS
111 #define pyjets PYJETS
112 #define pydat1 PYDAT1
113 #define pydat2 PYDAT2
114 #define pypars PYPARS
115 #define pydatr PYDATR
116 #define pydat3 PYDAT3
117 #define pyint1 PYINT1
118 #define pyint2 PYINT2
119 #define pyint5 PYINT5
123 //--------------------------------------------------------------------------
124 // PYTHIA routines declaration
128 void __stdcall PYHEPC(int*);
129 void __stdcall PYINIT(const char*,int,const char*,int,const char*,int,double*);
130 void __stdcall PYLIST(int*);
131 void __stdcall PYSTAT(int*);
132 void __stdcall PYEVNT();
133 void __stdcall UPINIT();
134 void __stdcall UPEVNT();
137 //--------------------------------------------------------------------------
139 // ( with gcc it works to initialize the block data by calling
140 // "pydata();" at beginning, but this fails for f77, so the fortran routine
141 // initpydata.f is supplied ... call it instead for platform independent
146 void __stdcall PYDATA(void);
149 inline void call_pyhepc( int mode ){ PYHEPC( &mode ); }
150 inline void call_pyinit( const char* frame, const char* beam, const char* target,
152 { PYINIT( frame,strlen(frame),beam,strlen(beam),target,strlen(target),&win); }
153 inline void call_pylist( int mode ){ PYLIST( &mode ); }
154 inline void call_pystat( int mode ){ PYSTAT( &mode ); }
155 inline void call_pyevnt(){ PYEVNT(); }
156 inline void call_upinit(){ UPINIT(); }
157 inline void call_upevnt(){ UPEVNT(); }
162 #endif // PYTHIA_WRAPPER_6_H
164 //--------------------------------------------------------------------------