1 //--------------------------------------------------------------------------
2 #ifndef HERWIG_WRAPPER_H
3 #define HERWIG_WRAPPER_H
5 //////////////////////////////////////////////////////////////////////////
6 // Matt.Dobbs@Cern.CH, November 200July 2002
7 // Wrapper for FORTRAN version of Herwig
8 // Wrapper written for Herwig 6.4
9 //////////////////////////////////////////////////////////////////////////
13 // This pre-compiler directive is included (2002-01-16) to allow compatibility
14 // with MS Visual C++, which interfaces to fortran in a different manner.
15 // For it to work you need to define the _WIN32 variable when compiling.
16 #ifdef _WIN32 // Platform: Windows MS Visual C++
18 // Sorry, there is NO version currently available for Vusual C++.
20 #else // Generic version, tested on Linux ecgs/gcc
22 //--------------------------------------------------------------------------
23 // HERWIG Common Block Declarations
25 // COMMON/HWPROC/EBEAM1,EBEAM2,PBEAM1,PBEAM2,IPROC,MAXEV
28 double EBEAM1,EBEAM2,PBEAM1,PBEAM2;
32 #define hwproc hwproc_
34 // COMMON/HWBEAM/IPART1,IPART2
40 #define hwbeam hwbeam_
42 // CHARACTER*8 PART1,PART2
43 // COMMON/HWBMCH/PART1,PART2
46 char PART1[8],PART2[8];
49 #define hwbmch hwbmch_
51 // COMMON/HWEVNT/AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,WSQSUM,
52 // & IDHW(NMXHEP),IERROR,ISTAT,LWEVT,MAXER,MAXPR,NOWGT,NRN(2),NUMER,
53 // & NUMERU,NWGTS,GENSOF
54 const int herwig_hepevt_size = 4000;
57 double AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,WSQSUM;
58 int IDHW[herwig_hepevt_size],IERROR,ISTAT,LWEVT,MAXER,MAXPR;
59 int NOWGT,NRN[2],NUMER,NUMERU,NWGTS;
60 int GENSOF; //Beware! in F77 this is logical
63 #define hwevnt hwevnt_
65 // C Basic parameters (and quantities derived from them)
66 // COMMON/HWPRAM/AFCH(16,2),ALPHEM,B1LIM,BETAF,BTCLM,CAFAC,CFFAC,
67 // & CLMAX,CLP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NDEC,PRVTX,SOFTME,
88 ZPRIME,PRNDEF,PRNTEX,PRNWEB; //Beware! in F77 these are logical
91 #define hwpram hwpram_
93 //--------------------------------------------------------------------------
94 // HERWIG routines declaration
96 #define hwigin hwigin_ // initialise other common blocks
97 #define hwigup hwigup_ // initialise HepUP run common block
98 #define hwuinc hwuinc_ // compute parameter-dependent constants
99 #define hwusta hwusta_ // call hwusta to make any particle stable
100 #define hweini hweini_ // initialise elementary process
101 #define hwuine hwuine_ // initialise event
102 #define hwepro hwepro_ // generate HERWIG hard subprocess
103 #define hwupro hwupro_ // read USER hard subprocess from HepUP event common
104 #define hwbgen hwbgen_ // generate parton cascades
105 #define hwdhob hwdhob_ // do heavy object decays
106 #define hwcfor hwcfor_ // do cluster hadronization
107 #define hwcdec hwcdec_ // do cluster decay
108 #define hwdhad hwdhad_ // do unstable particle decays
109 #define hwdhvy hwdhvy_ // do heavy flavour decays
110 #define hwmevt hwmevt_ // add soft underlying event if needed
111 #define hwufne hwufne_ // event generation completed, wrap up event ....
112 #define hwefin hwefin_ // terminate elementary process
114 #define hwudpr hwudpr_ // prints out particle/decay properties
115 #define hwuepr hwuepr_ // prints out event data
116 #define hwupup hwupup_ // prints out HepEUP user common block event data
117 #define hwegup hwegup_ // terminal calculations to replace HWEFIN for HepUP
122 void hwusta(const char*,int);
142 //--------------------------------------------------------------------------
144 // ( with gcc it works to initialize the block data by calling
145 // "hwudat();" at beginning. )
147 #define hwudat hwudat_
153 #include "HepMC/GenCrossSection.h"
157 /// calculate the Herwig cross section and statistical error
158 GenCrossSection getHerwigCrossSection(int ngen);
164 #endif // HERWIG_WRAPPER_H
166 //--------------------------------------------------------------------------