+#ifndef HerwigCommon
+#define HerwigCommon
+
+#ifndef __CFORTRAN_LOADED
+#include <cfortran.h>
+#endif
+
+extern "C" {
// Translation of Fortran commons from the Herwig6
// f77 program into c++ structures to be used in ROOT
// and declaration of Fortran functions as extern
// author: j. g. contreras jgcn@moni.mda.cinvestav.mx
// date: december 22, 2000
-int const NMXHEP = 2000;
+struct dcpx {double dr,di;};
-struct Hepevt_t {
+int const NMXHEP = 4000;
+
+typedef struct {
int NEVHEP;
int NHEP;
int ISTHEP[NMXHEP];
int JDAHEP[NMXHEP][2];
double PHEP[NMXHEP][5];
double VHEP[NMXHEP][4];
-};
+} HepevtCommon;
+
+#define HEPEVT COMMON_BLOCK(HEPEVT, hepevt)
+ COMMON_BLOCK_DEF(HepevtCommon, HEPEVT);
-struct Hwbeam_t {
+
+typedef struct {
int IPART1;
int IPART2;
-};
+} HwbeamCommon;
+
+#define HWBEAM COMMON_BLOCK(HWBEAM, hwbeam)
+ COMMON_BLOCK_DEF(HwbeamCommon, HWBEAM);
-struct Hwbmch_t {
+typedef struct {
char PART1[8];
char PART2[8];
-};
+} HwbmchCommon;
+
+#define HWBMCH COMMON_BLOCK(HWBMCH, hwbmch)
+ COMMON_BLOCK_DEF(HwbmchCommon, HWBMCH);
-struct Hwproc_t {
+
+typedef struct {
double EBEAM1;
double EBEAM2;
double PBEAM1;
double PBEAM2;
int IPROC;
int MAXEV;
-};
+} HwprocCommon;
+
+#define HWPROC COMMON_BLOCK(HWPROC, hwproc)
+ COMMON_BLOCK_DEF(HwprocCommon, HWPROC);
-struct Hwpram_t {
+
+typedef struct {
double AFCH[2][16];
double ALPHEM;
double B1LIM;
int PRNDEF;
int PRNTEX;
int PRNWEB;
-};
+} HwpramCommon;
+
+#define HWPRAM COMMON_BLOCK(HWPRAM, hwpram)
+ COMMON_BLOCK_DEF(HwpramCommon, HWPRAM);
-struct Hwprch_t {
+typedef struct {
char AUTPDF[2][20];
char BDECAY[4];
-};
+} HwprchCommon;
+
+#define HWPRCH COMMON_BLOCK(HWPRCH, hwprch)
+ COMMON_BLOCK_DEF(HwprchCommon, HWPRCH);
int const NMXPAR = 500;
-struct Hwpart_t {
+typedef struct {
int NEVPAR;
int NPAR;
int ISTPAR[NMXPAR];
int JDAPAR[NMXPAR][2];
double PPAR[NMXPAR][5];
double VPAR[NMXPAR][4];
-};
+} HwpartCommon;
-struct Hwparp_t {
+#define HWPART COMMON_BLOCK(HWPART, hwpart)
+ COMMON_BLOCK_DEF(HwpartCommon, HWPART);
+
+typedef struct {
double DECPAR[NMXPAR][2];
double PHIPAR[NMXPAR][2];
double RHOPAR[NMXPAR][2];
int TMPAR[NMXPAR];
-};
+} HwparpCommon;
+
+#define HWPARP COMMON_BLOCK(HWPARP, hwparp)
+ COMMON_BLOCK_DEF(HwparpCommon, HWPARP);
int const MODMAX = 5;
-struct Hwbosc_t {
+typedef struct {
double ALPFAC;
double BRHIG[12];
double ENHANC[12];
double RHOHEP[NMXHEP][3];
int IOPHIG;
int MODBOS[MODMAX];
-};
+} HwboscCommon;
-struct Hwparc_t {
+#define HWBOSC COMMON_BLOCK(HWBOSC, hwbosc)
+ COMMON_BLOCK_DEF(HwboscCommon, HWBOSC);
+
+typedef struct {
int JCOPAR[NMXPAR][4];
-};
+} HwparcCommon;
+
+#define HWPARC COMMON_BLOCK(HWPARC, hwparc)
+ COMMON_BLOCK_DEF(HwparcCommon, HWPARC);
-struct Hwbrch_t {
+typedef struct {
double ANOMSC[2][2];
double HARDST;
double PTINT[2][3];
int BREIT;
int FROST;
int USECMF;
-};
+} HwbrchCommon;
+
+#define HWBRCH COMMON_BLOCK(HWBRCH, hwbrch)
+ COMMON_BLOCK_DEF(HwbrchCommon, HWBRCH);
-struct Hwevnt_t {
+typedef struct {
double AVWGT;
double EVWGT;
double GAMWT;
int NUMERU;
int NWGTS;
int GENSOF;
-};
+} HwevntCommon;
-struct Hwhard_t {
+#define HWEVNT COMMON_BLOCK(HWEVNT, hwevnt)
+ COMMON_BLOCK_DEF(HwevntCommon, HWEVNT);
+
+typedef struct {
double ASFIXD;
double CLQ[6][7];
double COSS;
int HVFCEN;
int TPOL;
int DURHAM;
-};
+} HwhardCommon;
+
+#define HWHARD COMMON_BLOCK(HWHARD, hwhard)
+ COMMON_BLOCK_DEF(HwhardCommon, HWHARD);
int const NMXRES = 500;
-struct Hwprop_t {
+typedef struct {
double RLTIM[NMXRES+1];
double RMASS[NMXRES+1];
double RSPIN[NMXRES+1];
int VTORDK[NMXRES+1];
int QORQQB[NMXRES+1];
int QBORQQ[NMXRES+1];
-};
+} HwpropCommon;
-struct Hwunam_t {
+#define HWPROP COMMON_BLOCK(HWPROP, hwprop)
+ COMMON_BLOCK_DEF(HwpropCommon, HWPROP);
+
+typedef struct {
char RNAME[NMXRES+1][8];
char TXNAME[NMXRES+1][2][37];
-};
+} HwunamCommon;
+
+#define HWUNAM COMMON_BLOCK(HWUNAM, hwunam)
+ COMMON_BLOCK_DEF(HwunamCommon, HWUNAM);
int const NMXDKS = 4000;
int const NMXMOD = 200;
-struct Hwupdt_t {
+typedef struct {
double BRFRAC[NMXDKS];
double CMMOM[NMXDKS];
double DKLTM[NMXRES];
int NPRODS[NMXDKS];
int DKPSET;
int RSTAB[NMXRES+1];
-};
+} HwupdtCommon;
+
+#define HWUPDT COMMON_BLOCK(HWUPDT, hwupdt)
+ COMMON_BLOCK_DEF(HwupdtCommon, HWUPDT);
-struct Hwuwts_t {
+
+typedef struct {
double REPWT[5][4][4];
double SNGWT;
double DECWT;
double QWT[3];
double PWT[12];
double SWTEF[NMXRES];
-};
+} HwuwtsCommon;
+
+#define HWUWTS COMMON_BLOCK(HWUWTS, hwuwts)
+ COMMON_BLOCK_DEF(HwuwtsCommon, HWUWTS);
+
int const NMXCDK = 4000;
-struct Hwuclu_t {
+typedef struct {
double CLDKWT[NMXCDK];
double CTHRPW[12][12];
double PRECO;
int NCLDK[NMXCDK];
int NRECO;
int CLRECO;
-};
+} HwucluCommon;
+
+#define HWUCLU COMMON_BLOCK(HWUCLU, hwuclu)
+ COMMON_BLOCK_DEF(HwucluCommon, HWUCLU);
+
-struct Hwdist_t {
+typedef struct {
double EXAG;
double GEV2MM;
double HBAR;
int MAXDKL;
int MIXING;
int PIPSMR;
-};
+} HwdistCommon;
+
+#define HWDIST COMMON_BLOCK(HWDIST, hwdist)
+ COMMON_BLOCK_DEF(HwdistCommon, HWDIST);
int const NMXQDK=20;
-struct Hwqdks_t {
+typedef struct {
double VTXQDK[NMXQDK][4];
int IMQDK[NMXQDK];
int LOCQ[NMXQDK];
int NQDK;
-};
+} HwqdksCommon;
+
+#define HWQDKS COMMON_BLOCK(HWQDKS, hwqdks)
+ COMMON_BLOCK_DEF(HwqdksCommon, HWQDKS);
int const NMXSUD = 1024;
-struct Hwusud_t {
+typedef struct {
double ACCUR;
double QEV[6][NMXSUD];
double SUD[6][NMXSUD];
int NQEV;
int NSUD;
int SUDORD;
-};
+} HwusudCommon;
-struct Hwsusy_t {
+#define HWUSUD COMMON_BLOCK(HWUSUD, hwusud)
+ COMMON_BLOCK_DEF(HwusudCommon, HWUSUD);
+
+typedef struct {
double TANB;
double ALPHAH;
double COSBPA;
double SENHNC[24];
double SSPARITY;
int SUSYIN;
-};
+} HwsusyCommon;
+
+#define HWSUSY COMMON_BLOCK(HWSUSY, hwsusy)
+ COMMON_BLOCK_DEF(HwsusyCommon, HWSUSY);
-struct Hwrpar_t {
+typedef struct {
double LAMDA1[3][3][3];
double LAMDA2[3][3][3];
double LAMDA3[3][3][3];
int HRDCOL[5][2];
int RPARTY;
int COLUPD;
-};
+} HwrparCommon;
+
+#define HWRPAR COMMON_BLOCK(HWRPAR, hwrpar)
+ COMMON_BLOCK_DEF(HwrparCommon, HWRPAR);
-struct Hwminb_t {
+typedef struct {
double PMBN1;
double PMBN2;
double PMBN3;
double PMBP1;
double PMBP2;
double PMBP3;
-};
+} HwminbCommon;
+
+#define HWMINB COMMON_BLOCK(HWMINB, hwminb)
+ COMMON_BLOCK_DEF(HwminbCommon, HWMINB);
int const NMXCL = 500;
-struct Hwclus_t {
+typedef struct {
double PPCL[NMXCL][5];
int IDCL[NMXCL];
int NCL;
-};
+} HwclusCommon;
+
+#define HWCLUS COMMON_BLOCK(HWCLUS, hwclus)
+ COMMON_BLOCK_DEF(HwclusCommon, HWCLUS);
+
+// herwig 6.507
+
+typedef struct Hwgrav_t {
+ double GRVLAM;
+ double EMGRV;
+ double GAMGRV;
+} HwgravCommon;
+
+#define HWGRAV COMMON_BLOCK(HWGRAV, hwgrav)
+ COMMON_BLOCK_DEF(HwgravCommon, HWGRAV);
+
+typedef struct {
+ double VIPWID[3];
+ double DXRCYL;
+ double DXZMAX;
+ double DXRSPH;
+ int WZRFR;
+ int FIX4JT;
+ int IMSSM;
+ int IHIGGS;
+ int PARITY;
+ int LRSUSY;
+} Hw6202Common;
+
+#define HW6202 COMMON_BLOCK(HW6202, hw6202)
+ COMMON_BLOCK_DEF(Hw6202Common, HW6202);
+
+typedef struct {
+ double ABWGT;
+ double ABWSUM;
+ double AVABW;
+ int NNEGWT;
+ int NNEGEV;
+ int NEGWTS;
+} Hw6203Common;
+
+#define HW6203 COMMON_BLOCK(HW6203, hw6203)
+ COMMON_BLOCK_DEF(Hw6203Common, HW6203);
+
+int const IMAXCH = 20;
+
+typedef struct {
+ double MJJMIN;
+ double CHNPRB[IMAXCH];
+ int IOPSTP;
+ int IOPSH;
+ int OPTM;
+ int CHON[IMAXCH];
+} Hw6300Common;
+
+#define HW6300 COMMON_BLOCK(HW6300, hw6300)
+ COMMON_BLOCK_DEF(Hw6300Common, HW6300);
+
+int const NXMRS = 49;
+int const NQMRS = 37;
+int const NPMRS = 8;
+
+typedef struct {
+ double FMRS[NQMRS+1][NXMRS][NPMRS][3];
+} HwpmrsCommon;
+
+#define HWPMRS COMMON_BLOCK(HWPMRS, hwpmrs)
+ COMMON_BLOCK_DEF(HwpmrsCommon, HWPMRS);
+
+typedef struct {
+ int CIRCOP;
+ int CIRCAC;
+ int CIRCVR;
+ int CIRCRV;
+ int CIRCCH;
+} HwcircCommon;
+
+#define HWCIRC COMMON_BLOCK(HWCIRC, hwcirc)
+ COMMON_BLOCK_DEF(HwcircCommon, HWCIRC);
+
+int const NCFMAX = 3;
+int const NMODE2 = 500;
+int const NMODE3 = 500;
+int const NDIAGR = 8;
+int const NMODEB = 50;
+int const NMODE4 = 4;
+
+typedef struct {
+ double ABMODE[NMODEB][2];
+ double BBMODE[NMODEB][12][2];
+ double PBMODE[NMODEB][12];
+ double WTBMAX[NMODEB][12];
+ int IDBPRT[NMODEB];
+ int IBDRTP[NMODEB];
+ int IBMODE[NMODEB];
+ int NBMODE;
+} HwdspbCommon;
+
+#define HWDSPB COMMON_BLOCK(HWDSPB, hwdspb)
+ COMMON_BLOCK_DEF(HwdspbCommon, HWDSPB);
+
+typedef struct {
+ double A2MODE[NMODE2][2];
+ double P2MODE[NMODE2];
+ double WT2MAX[NMODE2];
+ int ID2PRT[NMODE2];
+ int I2DRTP[NMODE2];
+ int N2MODE;
+} Hwdsp2Common;
+
+#define HWDSP2 COMMON_BLOCK(HWDSP2, hwdsp2)
+ COMMON_BLOCK_DEF(Hwdsp2Common, HWDSP2);
+
+typedef struct {
+ double A3MODE[NMODE3][NDIAGR][2];
+ double B3MODE[NMODE3][NDIAGR][2];
+ double P3MODE[NMODE3];
+ double WT3MAX[NMODE3];
+ double SPN3CF[NMODE3][NCFMAX][NCFMAX];
+ int ID3PRT[NMODE3];
+ int I3MODE[NMODE3][NDIAGR];
+ int I3DRTP[NMODE3][NDIAGR];
+ int N3MODE;
+ int NDI3BY[NMODE3];
+ int N3NCFL[NMODE3];
+ int I3DRCF[NMODE3][NDIAGR];
+} Hwdsp3Common;
+
+#define HWDSP3 COMMON_BLOCK(HWDSP3, hwdsp3)
+ COMMON_BLOCK_DEF(Hwdsp3Common, HWDSP3);
+
+typedef struct {
+ double A4MODE[NMODE4][12][2];
+ double B4MODE[NMODE4][12][2];
+ double P4MODE[NMODE4][12][12];
+ double WT4MAX[NMODE4][12][12];
+ int ID4PRT[NMODE4];
+ int I4MODE[NMODE4][2];
+ int N4MODE;
+} Hwdsp4Common;
+
+#define HWDSP4 COMMON_BLOCK(HWDSP4, hwdsp4)
+ COMMON_BLOCK_DEF(Hwdsp4Common, HWDSP4);
+
+typedef struct {
+ int NDECSY;
+ int NSEARCH;
+ int LRDEC;
+ int LWDEC;
+ int SYSPIN;
+ int THREEB;
+ int FOURB;
+ char TAUDEC[6];
+} HwdspnCommon;
+
+#define HWDSPN COMMON_BLOCK(HWDSPN, hwdspn)
+ COMMON_BLOCK_DEF(HwdspnCommon, HWDSPN);
+
+int const NMXSPN = 50;
+
+typedef struct {
+ dcpx MESPN[NMXSPN][NCFMAX][2][2][2][2];
+ dcpx RHOSPN[NMXSPN][2][2];
+ double SPNCFC[NMXSPN][NCFMAX][NCFMAX];
+ int IDSPN[NMXSPN];
+ int JMOSPN[NMXSPN];
+ int JDASPN[NMXSPN][2];
+ int NSPN;
+ int ISNHEP[NMXHEP];
+ int NSNTRY;
+ int DECSPN[NMXSPN];
+ int NCFL[NMXSPN];
+ int SPCOPT;
+} HwspinCommon;
+
+#define HWSPIN COMMON_BLOCK(HWSPIN, hwspin)
+ COMMON_BLOCK_DEF(HwspinCommon, HWSPIN);
+
+typedef struct {
+ int JAK1;
+ int JAK2;
+ int ITDKRC;
+ int IFPHOT;
+} HwstauCommon;
+
+#define HWSTAU COMMON_BLOCK(HWSTAU, hwstau)
+ COMMON_BLOCK_DEF(HwstauCommon, HWSTAU);
+
+int const MAXHRP = 100;
+
+typedef struct {
+ double LHWGT[MAXHRP];
+ double LHWGTS[MAXHRP];
+ double LHXSCT[MAXHRP];
+ double LHXERR[MAXHRP];
+ double LHXMAX[MAXHRP];
+ double LHMXSM;
+ int LHIWGT[MAXHRP];
+ int LHNEVT[MAXHRP];
+ int ITYPLH;
+ int LHSOFT;
+ int LHGLSF;
+} HwguprCommon;
+
+#define HWGUPR COMMON_BLOCK(HWGUPR, hwgupr)
+ COMMON_BLOCK_DEF(HwguprCommon, HWGUPR);
+
+typedef struct {
+ int PRESPL;
+} Hw6500Common;
+
+#define HW6500 COMMON_BLOCK(HW6500, hw6500)
+ COMMON_BLOCK_DEF(Hw6500Common, HW6500);
+
+typedef struct {
+ int ITOPRD;
+} Hw6504Common;
+
+#define HW6504 COMMON_BLOCK(HW6504, hw6504)
+ COMMON_BLOCK_DEF(Hw6504Common, HW6504);
+
+typedef struct {
+ double PDFX0;
+ double PDFPOW;
+} Hw6506Common;
+
+#define HW6506 COMMON_BLOCK(HW6506, hw6506)
+ COMMON_BLOCK_DEF(Hw6506Common, HW6506);
+
+}
+
+extern "C" {
+ void hwuepr_();
+ void hwigin_();
+ void hwuinc_();
+ void hweini_();
+ void hwuine_();
+ void hwepro_();
+ void hwbgen_();
+ void hwdhob_();
+ void hwcfor_();
+ void hwcdec_();
+ void hwdhad_();
+ void hwdhvy_();
+ void hwmevt_();
+ void hwufne_();
+ void hwefin_();
+ void hwusta_(const char * name, int);
+ void hwiodk_(int);
+}
+// subroutines to be call by JIMMY
extern "C" {
- void hwigin_();
- void hwuinc_();
- void hwusta_(char * name, int);
- void hweini_();
- void hwuine_();
- void hwepro_();
- void hwbgen_();
- void hwdhob_();
- void hwcfor_();
- void hwcdec_();
- void hwdhad_();
- void hwdhvy_();
- void hwmevt_();
- void hwufne_();
- void hwefin_();
+ void jminit_();
+ void jimmin_();
+ void jmefin_();
}
+#endif