Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:10

0001 //--------------------------------------------------------------------------
0002 #ifndef HERWIG_WRAPPER_H
0003 #define HERWIG_WRAPPER_H
0004 
0005 //////////////////////////////////////////////////////////////////////////
0006 // Matt.Dobbs@Cern.CH, November 200July 2002
0007 // Wrapper for FORTRAN version of Herwig
0008 // Wrapper written for Herwig 6.4
0009 //////////////////////////////////////////////////////////////////////////
0010 
0011 #include <ctype.h>
0012 
0013 // This pre-compiler directive is included (2002-01-16) to allow compatibility
0014 // with MS Visual C++, which interfaces to fortran in a different manner.
0015 // For it to work you need to define the _WIN32 variable when compiling.
0016 #ifdef _WIN32 // Platform: Windows MS Visual C++
0017 
0018 //  Sorry, there is NO version currently available for Vusual C++.
0019 
0020 #else // Generic version, tested on Linux ecgs/gcc
0021 
0022 //--------------------------------------------------------------------------
0023 // HERWIG Common Block Declarations
0024 
0025 //        COMMON/HWPROC/EBEAM1,EBEAM2,PBEAM1,PBEAM2,IPROC,MAXEV
0026 extern "C" {
0027     extern struct {
0028     double EBEAM1,EBEAM2,PBEAM1,PBEAM2;
0029         int IPROC,MAXEV;
0030     } hwproc_;
0031 }
0032 #define hwproc hwproc_
0033 
0034 //      COMMON/HWBEAM/IPART1,IPART2
0035 extern "C" {
0036     extern struct {
0037         int IPART1, IPART2;
0038     } hwbeam_;
0039 }
0040 #define hwbeam hwbeam_
0041 
0042 //        CHARACTER*8 PART1,PART2
0043 //        COMMON/HWBMCH/PART1,PART2
0044 extern "C" {
0045     extern struct {
0046     char PART1[8],PART2[8];
0047     } hwbmch_;
0048 }
0049 #define hwbmch hwbmch_
0050 
0051 //  COMMON/HWEVNT/AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,WSQSUM,
0052 //       & IDHW(NMXHEP),IERROR,ISTAT,LWEVT,MAXER,MAXPR,NOWGT,NRN(2),NUMER,
0053 //       & NUMERU,NWGTS,GENSOF
0054 const int herwig_hepevt_size = 4000;
0055 extern "C" {
0056     extern struct hwgev {
0057     double AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,WSQSUM;
0058     int IDHW[herwig_hepevt_size],IERROR,ISTAT,LWEVT,MAXER,MAXPR;
0059     int NOWGT,NRN[2],NUMER,NUMERU,NWGTS;
0060     int GENSOF; //Beware! in F77 this is logical
0061     } hwevnt_;
0062 }
0063 #define hwevnt hwevnt_
0064 
0065 //  C Basic parameters (and quantities derived from them)
0066 //        COMMON/HWPRAM/AFCH(16,2),ALPHEM,B1LIM,BETAF,BTCLM,CAFAC,CFFAC,
0067 //       & CLMAX,CLPOW,CLSMR(2),CSPEED,ENSOF,ETAMIX,F0MIX,F1MIX,F2MIX,GAMH,
0068 //       & GAMW,GAMZ,GAMZP,GEV2NB,H1MIX,PDIQK,PGSMX,PGSPL(4),PHIMIX,PIFAC,
0069 //       & PRSOF,PSPLT(2),PTRMS,PXRMS,QCDL3,QCDL5,QCDLAM,QDIQK,QFCH(16),QG,
0070 //       & QSPAC,QV,SCABI,SWEIN,TMTOP,VFCH(16,2),VCKM(3,3),VGCUT,VQCUT,
0071 //       & VPCUT,ZBINM,EFFMIN,OMHMIX,ET2MIX,PH3MIX,GCUTME,
0072 //       & IOPREM,IPRINT,ISPAC,LRSUD,LWSUD,MODPDF(2),NBTRY,NCOLO,NCTRY,
0073 //       & NDTRY,NETRY,NFLAV,NGSPL,NSTRU,NSTRY,NZBIN,IOP4JT(2),NPRFMT,
0074 //       & AZSOFT,AZSPIN,CLDIR(2),HARDME,NOSPAC,PRNDEC,PRVTX,SOFTME,ZPRIME,
0075 //       & PRNDEF,PRNTEX,PRNWEB
0076 
0077 extern "C" {
0078     extern struct {
0079     double AFCH[2][16],ALPHEM,B1LIM,BETAF,BTCLM,CAFAC,CFFAC,
0080         CLMAX,CLPOW,CLSMR[2],CSPEED,ENSOF,ETAMIX,F0MIX,F1MIX,F2MIX,GAMH,
0081         GAMW,GAMZ,GAMZP,GEV2NB,H1MIX,PDIQK,PGSMX,PGSPL[4],PHIMIX,PIFAC,
0082         PRSOF,PSPLT[2],PTRMS,PXRMS,QCDL3,QCDL5,QCDLAM,QDIQK,QFCH[16],QG,
0083         QSPAC,QV,SCABI,SWEIN,TMTOP,VFCH[2][16],VCKM[3][3],VGCUT,VQCUT,
0084         VPCUT,ZBINM,EFFMIN,OMHMIX,ET2MIX,PH3MIX,GCUTME;
0085     int IOPREM,IPRINT,ISPAC,LRSUD,LWSUD,MODPDF[2],NBTRY,NCOLO,NCTRY,
0086         NDTRY,NETRY,NFLAV,NGSPL,NSTRU,NSTRY,NZBIN,IOP4JT[2],NPRFMT;
0087     int AZSOFT,AZSPIN,CLDIR[2],HARDME,NOSPAC,PRNDEC,PRVTX,SOFTME,
0088         ZPRIME,PRNDEF,PRNTEX,PRNWEB; //Beware! in F77 these are logical
0089     } hwpram_;
0090 }
0091 #define hwpram hwpram_
0092 
0093 //--------------------------------------------------------------------------
0094 // HERWIG routines declaration
0095 
0096 #define hwigin hwigin_  // initialise other common blocks
0097 #define hwigup hwigup_  // initialise HepUP run common block
0098 #define hwuinc hwuinc_  // compute parameter-dependent constants
0099 #define hwusta hwusta_  // call hwusta to make any particle stable
0100 #define hweini hweini_  // initialise elementary process
0101 #define hwuine hwuine_  // initialise event
0102 #define hwepro hwepro_  // generate HERWIG hard subprocess
0103 #define hwupro hwupro_  // read USER hard subprocess from HepUP event common
0104 #define hwbgen hwbgen_  // generate parton cascades
0105 #define hwdhob hwdhob_  // do heavy object decays
0106 #define hwcfor hwcfor_  // do cluster hadronization
0107 #define hwcdec hwcdec_  // do cluster decay
0108 #define hwdhad hwdhad_  // do unstable particle decays
0109 #define hwdhvy hwdhvy_  // do heavy flavour decays
0110 #define hwmevt hwmevt_  // add soft underlying event if needed 
0111 #define hwufne hwufne_  // event generation completed, wrap up event .... 
0112 #define hwefin hwefin_  // terminate elementary process
0113 
0114 #define hwudpr hwudpr_  // prints out particle/decay properties
0115 #define hwuepr hwuepr_  // prints out event data
0116 #define hwupup hwupup_  // prints out HepEUP user common block event data
0117 #define hwegup hwegup_  // terminal calculations to replace HWEFIN for HepUP
0118     extern "C" {
0119         void hwigin(void);
0120         void hwigup(void);
0121         void hwuinc(void);
0122         void hwusta(const char*,int);
0123         void hweini(void);
0124         void hwuine(void);
0125         void hwepro(void);
0126         void hwupro(void);
0127         void hwbgen(void);
0128         void hwdhob(void);
0129         void hwcfor(void);
0130         void hwcdec(void);
0131         void hwdhad(void);
0132         void hwdhvy(void);
0133         void hwmevt(void);
0134         void hwufne(void);
0135         void hwefin(void);
0136         void hwudpr(void);
0137         void hwuepr(void);
0138     void hwupup(void);
0139     void hwegup(void);
0140     }
0141 
0142 //--------------------------------------------------------------------------
0143 // HERWIG block data
0144 // ( with gcc it works to initialize the block data by calling 
0145 //   "hwudat();" at beginning. )
0146 
0147 #define hwudat hwudat_
0148 extern "C" {
0149     void hwudat(void);
0150 }
0151 
0152 
0153 #include "HepMC/GenCrossSection.h"
0154 
0155 namespace HepMC {
0156 
0157 /// calculate the Herwig cross section and statistical error
0158 GenCrossSection getHerwigCrossSection(int ngen);
0159 
0160 } // HepMC
0161 
0162 #endif // Platform
0163 
0164 #endif  // HERWIG_WRAPPER_H
0165 
0166 //--------------------------------------------------------------------------