HepMC Reference Documentation

HepMC

PythiaWrapper6_4_WIN32.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 #ifdef  _WIN32  // This version is for Windows MS Visual C++ only.
00003 #ifndef PYTHIA_WRAPPER_6_H
00004 #define PYTHIA_WRAPPER_6_H
00005 
00007 // Matt.Dobbs@Cern.CH, November 2000
00008 // Version 6.200 update October 2001
00009 // Wrapper for FORTRAN version of Pythia 
00010 // The _WIN32 version is provided by Witold Pokorski 
00011 //       <Witold.Pokorski@Cern.CH>, 2002-01-22, and is the version 
00012 //       which should be used when compiling on Windows MS Visual C++.
00013 // This wrapper is NOT intended as a part of HepMC - it is only supplied
00014 // for your convenience.
00016 // 
00017 // A simple example of calling Pythia from C++ using this header file is
00018 // given in test/test_PythiaWrapper.cxx
00019 //
00020 // Note the pyhepc routine is used by Pythia to fill
00021 // the HEPEVT common block uses double precision and 4000 entries.
00022 //
00023 
00024 #include <ctype.h>
00025 #include <string.h>
00026 
00027 //--------------------------------------------------------------------------
00028 // Initialization routine
00029 
00030 
00031 extern "C" {
00032     void INITPYDATA(void);
00033 }
00034 #define initpydata INITPYDATA
00035 
00036 
00037 //--------------------------------------------------------------------------
00038 // PYTHIA Common Block Declarations
00039 
00040 const int pyjets_maxn =4000;
00041 struct PYJETS_DEF {
00042         int n, npad, k[5][pyjets_maxn];
00043         double p[5][pyjets_maxn], v[5][pyjets_maxn];
00044 };
00045 
00046 struct PYDAT1_DEF{
00047         int mstu[200];
00048         double paru[200];
00049         int mstj[200];
00050         double parj[200];
00051 };
00052 
00053 struct PYDAT2_DEF{
00054         int kchg[4][500];
00055         double pmas[4][500], parf[2000], vckm[4][4];  
00056 };
00057 
00058 struct PYDAT3_DEF{
00059         int mdcy[3][500], mdme[2][8000];
00060         double brat[8000];
00061         int kfdp[5][8000];
00062 };
00063 
00064 struct PYDATR_DEF{
00065         int mrpy[6];
00066         double rrpy[100];
00067     };
00068 
00069 struct PYSUBS_DEF{
00070         int msel, mselpd, msub[500], kfin[81][2];
00071         double ckin[200];
00072 };
00073 
00074 struct PYPARS_DEF{
00075         int mstp[200];
00076         double parp[200];
00077         int msti[200];
00078         double pari[200];
00079 };
00080 
00081 struct PYINT1_DEF{
00082         int mint[400];
00083         double vint[400];
00084 };
00085 
00086 struct PYINT2_DEF{
00087         int iset[500], kfpr[2][500];
00088         double coef[20][500];
00089         int icol[2][4][40];       // was [320] was [40][4][2]
00090 };
00091 
00092 struct PYINT5_DEF{
00093         int ngenpd, ngen[3][501];
00094         double xsec[3][501];
00095 };
00096 
00097 
00098 extern "C" PYSUBS_DEF PYSUBS;
00099 extern "C" PYJETS_DEF PYJETS;
00100 extern "C" PYDAT1_DEF PYDAT1;
00101 extern "C" PYDAT2_DEF PYDAT2;
00102 extern "C" PYPARS_DEF PYPARS;
00103 extern "C" PYDATR_DEF PYDATR;
00104 extern "C" PYDAT3_DEF PYDAT3;
00105 extern "C" PYINT1_DEF PYINT1;
00106 extern "C" PYINT2_DEF PYINT2;
00107 extern "C" PYINT5_DEF PYINT5;
00108 
00109 
00110 #define pysubs PYSUBS
00111 #define pyjets PYJETS
00112 #define pydat1 PYDAT1
00113 #define pydat2 PYDAT2
00114 #define pypars PYPARS
00115 #define pydatr PYDATR
00116 #define pydat3 PYDAT3
00117 #define pyint1 PYINT1
00118 #define pyint2 PYINT2
00119 #define pyint5 PYINT5
00120 
00121 
00122 
00123 //--------------------------------------------------------------------------
00124 // PYTHIA routines declaration
00125 
00126 
00127 extern "C" {
00128         void __stdcall PYHEPC(int*);
00129         void __stdcall PYINIT(const char*,int,const char*,int,const char*,int,double*);
00130         void __stdcall PYLIST(int*);
00131         void __stdcall PYSTAT(int*);
00132         void __stdcall PYEVNT();
00133         void __stdcall UPINIT();
00134         void __stdcall UPEVNT();
00135 }
00136 
00137 //--------------------------------------------------------------------------
00138 // PYTHIA block data
00139 // ( with gcc it works to initialize the block data by calling 
00140 //   "pydata();" at beginning, but this fails for f77, so the fortran routine
00141 //   initpydata.f is supplied ... call it instead for platform independent
00142 //   behaviour )
00143 
00144 
00145 extern "C" {
00146     void __stdcall PYDATA(void);
00147 }
00148 
00149 inline void call_pyhepc( int mode ){ PYHEPC( &mode ); }
00150 inline void call_pyinit( const char* frame, const char* beam, const char* target,
00151                   double win ) 
00152 { PYINIT( frame,strlen(frame),beam,strlen(beam),target,strlen(target),&win); }
00153 inline void call_pylist( int mode ){ PYLIST( &mode ); }
00154 inline void call_pystat( int mode ){ PYSTAT( &mode ); }
00155 inline void call_pyevnt(){ PYEVNT(); }
00156 inline void call_upinit(){ UPINIT(); }
00157 inline void call_upevnt(){ UPEVNT(); }
00158 
00159 
00160 
00161 
00162 #endif  // PYTHIA_WRAPPER_6_H
00163 #endif  // _WIN32
00164 //--------------------------------------------------------------------------

Generated on Fri Feb 17 00:31:25 2012 for HepMC by  doxygen 1.4.7