]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updates to HERWIG 6.507 and use with MC@NLO (R. Guernane)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Jun 2006 12:28:55 +0000 (12:28 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Jun 2006 12:28:55 +0000 (12:28 +0000)
THerwig/AliGenHerwig.cxx
THerwig/AliGenHerwig.h
THerwig/HCommon.h
THerwig/Herwig6Calls.h
THerwig/THerwig6.cxx
THerwig/THerwig6.h
THerwig/driver.h [new file with mode: 0644]

index 58dde0daa45e87cc110a813e903d81044f675d26..ff8b535843d6ad3a27b5012bbe518c4af6bb3876 100644 (file)
@@ -30,6 +30,8 @@
 #include "Riostream.h"
 #include "AliMC.h"
 
+#include "driver.h"
+
 ClassImp(AliGenHerwig)
 
 
@@ -55,7 +57,9 @@ ClassImp(AliGenHerwig)
     fPtRMS(0),
     fMaxPr(10),
     fMaxErrors(1000),
-    fEnSoft(1)
+    fEnSoft(1),
+    fEv1Pr(0),
+    fEv2Pr(0)
 {
 // Constructor
 }
@@ -77,6 +81,8 @@ AliGenHerwig::AliGenHerwig(Int_t npart)
     fEnSoft=1.0;
     fMaxPr=10;
     fMaxErrors=1000;
+    fEv1Pr=0;
+    fEv2Pr=0;
     // Set random number generator   
     AliHerwigRndm::SetHerwigRandom(GetRandom());
 }
@@ -94,6 +100,13 @@ AliGenHerwig::~AliGenHerwig()
 // Destructor
 }
 
+void AliGenHerwig::SetEventListRange(Int_t eventFirst, Int_t eventLast)
+{
+  fEv1Pr = ++eventFirst;
+  fEv2Pr = ++eventLast;
+  if ( fEv2Pr == -1 ) fEv2Pr = fEv2Pr;
+}
+
 void AliGenHerwig::Init()
 {
 // Initialisation
@@ -110,6 +123,26 @@ void AliGenHerwig::Init()
   fHerwig->SetMAXPR(fMaxPr);
   fHerwig->SetMAXER(fMaxErrors);
   fHerwig->SetENSOF(fEnSoft);
+  
+  fHerwig->SetEV1PR(fEv1Pr);
+  fHerwig->SetEV2PR(fEv2Pr);
+
+// C---D,U,S,C,B,T QUARK AND GLUON MASSES (IN THAT ORDER)
+//       RMASS(1)=0.32
+//       RMASS(2)=0.32
+//       RMASS(3)=0.5
+//       RMASS(4)=1.55
+//       RMASS(5)=4.95
+//       RMASS(6)=174.3
+//       RMASS(13)=0.75
+
+  fHerwig->SetRMASS(4,1.2);
+  fHerwig->SetRMASS(5,4.75);
+  
+  if ( fProcess < 0 ) strncpy(VVJIN.QQIN,fFileName.Data(),50);
+
+  fHerwig->Hwusta("PI0     ");
+
   // compute parameter dependent constants
   fHerwig->PrepareRun();
 }
@@ -154,6 +187,10 @@ void AliGenHerwig::InitPDF()
       fModPDF=46;
       fAutPDF="CTEQ";
       break;
+    case kCTEQ5M:
+      fModPDF=48;
+      fAutPDF="CTEQ";
+      break;
     default:
       cerr << "This structure function is not inplemented " << fStrucFunc << endl;
       break;
@@ -232,7 +269,7 @@ void AliGenHerwig::Generate()
                          origin[0], origin[1], origin[2], 
                          tof,
                          polar[0], polar[1], polar[2],
-                         kPPrimary, nt, 1., ks);
+                         kPPrimary, nt, fHerwig->GetEVWGT(), ks);
                KeepTrack(nt);
                newPos[i]=nt;
            } // end of if: selection of particle
index 3611455c4dc66540f795597d7e266ad3dca5c6ab..bf7372011486d42c4ffab3959e55ecca27117e40 100644 (file)
@@ -52,6 +52,10 @@ class AliGenHerwig : public AliGenMC
     virtual void    SetMaxErrors(Int_t i) {fMaxErrors=i;}
     virtual void    FinishRun();
     virtual void    SetEnSoft(Double_t e) {fEnSoft=e;}
+    
+    virtual void    SetHardProcessFile(TString filename) {fFileName=TString(filename);};
+    virtual void    SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
+
  protected:
     Bool_t SelectFlavor(Int_t pid);
 
@@ -77,6 +81,9 @@ class AliGenHerwig : public AliGenMC
     Int_t       fMaxPr;          // maximum number of events to print out
     Int_t       fMaxErrors;      // maximum number of errors allowed
     Double_t    fEnSoft;          // change on soft energy distribution
+    Int_t       fEv1Pr;          // first event to be printed
+    Int_t       fEv2Pr;          // last event to be printed
+    TString     fFileName;       //!Name of file to read from hard scattering
       
  private:
     // check if particle is selected as parent particle
index c59439516477d02f0997bb3dd19f834b86f807dd..63d2c3b4f9cc05f067ca0affc1d3f9bbc78b2aa9 100644 (file)
@@ -5,6 +5,8 @@
 // author: j. g. contreras jgcn@moni.mda.cinvestav.mx
 // date: december 22, 2000
 
+struct dcpx {double dr,di;};
+
 int const NMXHEP = 2000;
 
 struct Hepevt_t {
@@ -444,6 +446,181 @@ struct Hwclus_t {
   int    NCL;
 };
 
+// herwig 6.507
+
+struct Hwgrav_t {
+  double GRVLAM;
+  double EMGRV;
+  double GAMGRV;
+};
+
+struct Hw6202_t {
+  double VIPWID[3];
+  double DXRCYL;
+  double DXZMAX;
+  double DXRSPH;
+  int    WZRFR;
+  int    FIX4JT;
+  int    IMSSM;
+  int    IHIGGS;
+  int    PARITY;
+  int    LRSUSY;
+};
+
+struct Hw6203_t {
+  double ABWGT;
+  double ABWSUM;
+  double AVABW;
+  int    NNEGWT;
+  int    NNEGEV;
+  int    NEGWTS;
+};
+
+int const IMAXCH = 20;
+
+struct Hw6300_t {
+  double MJJMIN;
+  double CHNPRB[IMAXCH];
+  int    IOPSTP;
+  int    IOPSH;
+  int    OPTM;
+  int    CHON[IMAXCH];
+};
+
+
+int const NXMRS = 49;
+int const NQMRS = 37;
+int const NPMRS = 8;
+
+struct Hwpmrs_t {
+  double FMRS[NQMRS+1][NXMRS][NPMRS][3];
+};
+
+struct Hwcirc_t {
+  int    CIRCOP;
+  int    CIRCAC;
+  int    CIRCVR;
+  int    CIRCRV;
+  int    CIRCCH;
+};
+
+int const NCFMAX = 3;
+int const NMODE2 = 500;
+int const NMODE3 = 500;
+int const NDIAGR = 8;
+int const NMODEB = 50;
+int const NMODE4 = 4;
+
+struct Hwdspb_t {
+  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;
+};
+
+struct Hwdsp2_t {
+  double A2MODE[NMODE2][2];
+  double P2MODE[NMODE2];
+  double WT2MAX[NMODE2];
+  int    ID2PRT[NMODE2];
+  int    I2DRTP[NMODE2];
+  int    N2MODE;
+};
+
+struct Hwdsp3_t {
+  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];
+};
+
+struct Hwdsp4_t {
+  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;
+};
+
+struct Hwdspn_t {
+  int    NDECSY;
+  int    NSEARCH;
+  int    LRDEC;
+  int    LWDEC;
+  int    SYSPIN;
+  int    THREEB;
+  int    FOURB;
+  char   TAUDEC[6];
+};
+
+int const NMXSPN = 50;
+
+struct Hwspin_t {
+  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;
+};
+
+struct Hwstau_t {
+  int    JAK1;
+  int    JAK2;
+  int    ITDKRC;
+  int    IFPHOT;
+};
+
+int const MAXHRP = 100;
+
+struct Hwgupr_t {
+  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;    
+};
+
+struct Hw6500_t {
+  int    PRESPL;
+};
+
+struct Hw6504_t {
+  int    ITOPRD;
+};
+
+struct Hw6506_t {
+  double PDFX0;
+  double PDFPOW;
+};
+
+
 
 extern "C" {
   void  hwigin_();
index 09331dd6761bd07a083aa30b19f81e192b26d7a0..e3b4d8f3558cdf762d05539fe837e071276331f2 100644 (file)
@@ -8,7 +8,9 @@
 // author: j. g. contreras jgcn@moni.mda.cinvestav.mx
 // date: december 22, 2000
 
-int const NMXHEP = 2000;
+struct dcpx {double dr,di;};
+
+int const NMXHEP = 4000;
 
 struct Hepevt_t {
   int NEVHEP;
@@ -151,7 +153,7 @@ struct Hwparp_t {
   int TMPAR[NMXPAR];
 };
 
-int const MODMAX = 5;
+int const MODMAX = 50;
 
 struct Hwbosc_t {
   double  ALPFAC;
@@ -339,7 +341,7 @@ struct Hwdist_t {
   double HBAR;
   double PLTCUT;
   double VMIN2;
-  double VTXPIP[4];
+  double VTXPIP[5];
   double XMIX[2];
   double XMRCT[2];
   double YMIX[2];
@@ -411,7 +413,7 @@ struct Hwsusy_t {
   double GHSQSS[2][2][6][4];
   double XLMNSS;
   double RMMNSS;
-  double IMSSM;
+  double DMSSM;
   double SENHNC[24];
   double SSPARITY;
   int    SUSYIN;
@@ -447,6 +449,181 @@ struct Hwclus_t {
   int    NCL;
 };
 
+// herwig 6.507
+
+struct Hwgrav_t {
+  double GRVLAM;
+  double EMGRV;
+  double GAMGRV;
+};
+
+struct Hw6202_t {
+  double VIPWID[3];
+  double DXRCYL;
+  double DXZMAX;
+  double DXRSPH;
+  int    WZRFR;
+  int    FIX4JT;
+  int    IMSSM;
+  int    IHIGGS;
+  int    PARITY;
+  int    LRSUSY;
+};
+
+struct Hw6203_t {
+  double ABWGT;
+  double ABWSUM;
+  double AVABW;
+  int    NNEGWT;
+  int    NNEGEV;
+  int    NEGWTS;
+};
+
+int const IMAXCH = 20;
+
+struct Hw6300_t {
+  double MJJMIN;
+  double CHNPRB[IMAXCH];
+  int    IOPSTP;
+  int    IOPSH;
+  int    OPTM;
+  int    CHON[IMAXCH];
+};
+
+
+int const NXMRS = 49;
+int const NQMRS = 37;
+int const NPMRS = 8;
+
+struct Hwpmrs_t {
+  double FMRS[NQMRS+1][NXMRS][NPMRS][3];
+};
+
+struct Hwcirc_t {
+  int     CIRCOP;
+  int     CIRCAC;
+  int     CIRCVR;
+  int     CIRCRV;
+  int     CIRCCH;
+};
+
+int const NCFMAX = 3;
+int const NMODE2 = 500;
+int const NMODE3 = 500;
+int const NDIAGR = 8;
+int const NMODEB = 50;
+int const NMODE4 = 4;
+
+struct Hwdspb_t {
+  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;
+};
+
+struct Hwdsp2_t {
+  double A2MODE[NMODE2][2];
+  double P2MODE[NMODE2];
+  double WT2MAX[NMODE2];
+  int    ID2PRT[NMODE2];
+  int    I2DRTP[NMODE2];
+  int    N2MODE;
+};
+
+struct Hwdsp3_t {
+  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[NDIAGR][NMODE3];
+  int    I3DRTP[NDIAGR][NMODE3];
+  int    N3MODE;
+  int    NDI3BY[NMODE3];
+  int    N3NCFL[NMODE3];
+  int    I3DRCF[NDIAGR][NMODE3];
+};
+
+struct Hwdsp4_t {
+  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;
+};
+
+struct Hwdspn_t {
+  int    NDECSY;
+  int    NSEARCH;
+  int    LRDEC;
+  int    LWDEC;
+  int    SYSPIN;
+  int    THREEB;
+  int    FOURB;
+  char   TAUDEC[6];
+};
+
+int const NMXSPN = 50;
+
+struct Hwspin_t {
+  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;
+};
+
+struct Hwstau_t {
+  int    JAK1;
+  int    JAK2;
+  int    ITDKRC;
+  int    IFPHOT;
+};
+
+int const MAXHRP = 100;
+
+struct Hwgupr_t {
+  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;    
+};
+
+struct Hw6500_t {
+  int    PRESPL;
+};
+
+struct Hw6504_t {
+  int    ITOPRD;
+};
+
+struct Hw6506_t {
+  double PDFX0;
+  double PDFPOW;
+};
+
+
 
 extern "C" {
   void  hwigin_();
index 74acce0e500d5c7833e5b518a961155a93491488..d1d3f2b06fc261f8db18233c64bde2f5b4450382 100644 (file)
@@ -100,6 +100,23 @@ THerwig6::THerwig6() : TGenerator("Herwig6","Herwig6") {
   fHwrpar = (Hwrpar_t*) herwig6_common_block_address_((char*)"HWRPAR",6);
   fHwminb = (Hwminb_t*) herwig6_common_block_address_((char*)"HWMINB",6);
   fHwclus = (Hwclus_t*) herwig6_common_block_address_((char*)"HWCLUS",6);
+  fHwgrav = (Hwgrav_t*) herwig6_common_block_address_((char*)"HWGRAV",6);
+  fHw6202 = (Hw6202_t*) herwig6_common_block_address_((char*)"HW6202",6);
+  fHw6203 = (Hw6203_t*) herwig6_common_block_address_((char*)"HW6203",6);
+  fHw6300 = (Hw6300_t*) herwig6_common_block_address_((char*)"HW6300",6);
+  fHwpmrs = (Hwpmrs_t*) herwig6_common_block_address_((char*)"HWPMRS",6);
+  fHwcirc = (Hwcirc_t*) herwig6_common_block_address_((char*)"HWCIRC",6);
+  fHwdspb = (Hwdspb_t*) herwig6_common_block_address_((char*)"HWDSPB",6);
+  fHwdsp2 = (Hwdsp2_t*) herwig6_common_block_address_((char*)"HWDSP2",6);
+  fHwdsp3 = (Hwdsp3_t*) herwig6_common_block_address_((char*)"HWDSP3",6);
+  fHwdsp4 = (Hwdsp4_t*) herwig6_common_block_address_((char*)"HWDSP4",6);
+  fHwdspn = (Hwdspn_t*) herwig6_common_block_address_((char*)"HWDSPN",6);
+  fHwspin = (Hwspin_t*) herwig6_common_block_address_((char*)"HWSPIN",6);
+  fHwstau = (Hwstau_t*) herwig6_common_block_address_((char*)"HWSTAU",6);
+  fHwgupr = (Hwgupr_t*) herwig6_common_block_address_((char*)"HWGUPR",6);
+  fHw6500 = (Hw6500_t*) herwig6_common_block_address_((char*)"HW6500",6);
+  fHw6504 = (Hw6504_t*) herwig6_common_block_address_((char*)"HW6504",6);
+  fHw6506 = (Hw6506_t*) herwig6_common_block_address_((char*)"HW6506",6);
  }
 
 //------------------------------------------------------------------------------
@@ -452,6 +469,12 @@ void THerwig6::Hwefin()
   hwefin_();
 }
 
+void THerwig6::Hwiodk(int iopt)
+
+{
+  hwiodk_(iopt);
+}
+
 void THerwig6::SetupTest()
 {
   // exampe of running herwig and generating one event
index 1a651d75af46f4c5eacd7711f5c4bd9582656a41..932bb7e1d4741eee1da48de5a12c7c0822d4e4a4 100644 (file)
@@ -57,6 +57,15 @@ C-----------------------------------------------------------------------
 
 /* declarations from ROOT */
 #include "TGenerator.h"
+
+typedef enum
+{
+   kHwCharm         =  1704, 
+   kHwBeauty        =  1705,
+   kHwCharmMCATNLO  = -1704,
+   kHwBeautyMCATNLO = -1705
+} Process_t;
+
 class TObjArray;
 
 // Translation of Fortran commons from the Herwig6
@@ -66,7 +75,9 @@ class TObjArray;
 // author: j. g. contreras jgcn@moni.mda.cinvestav.mx
 // date: december 22, 2000
 
-int const NMXHEP = 2000;
+typedef struct {double dr,di;} dcpx;
+
+int const NMXHEP = 4000;
 
 typedef struct {
   int NEVHEP;
@@ -209,7 +220,7 @@ typedef struct {
   int TMPAR[NMXPAR];
 } Hwparp_t;
 
-int const MODMAX = 5;
+int const MODMAX = 50;
 
 typedef struct {
   double  ALPFAC;
@@ -260,6 +271,8 @@ typedef struct {
   int    NUMERU;
   int    NWGTS;
   int    GENSOF;
+  int    EV1PR;
+  int    EV2PR;
 } Hwevnt_t;
 
 typedef struct {
@@ -397,7 +410,7 @@ typedef struct {
   double HBAR;
   double PLTCUT;
   double VMIN2;
-  double VTXPIP[4];
+  double VTXPIP[5];
   double XMIX[2];
   double XMRCT[2];
   double YMIX[2];
@@ -469,7 +482,7 @@ typedef struct {
   double GHSQSS[2][2][6][4];
   double XLMNSS;
   double RMMNSS;
-  double IMSSM;
+  double DMSSM;
   double SENHNC[24];
   double SSPARITY;
   int    SUSYIN;
@@ -505,6 +518,182 @@ typedef struct {
   int    NCL;
 } Hwclus_t;
 
+// herwig 6.507
+
+typedef struct {
+  double GRVLAM;
+  double EMGRV;
+  double GAMGRV;
+} Hwgrav_t;
+
+typedef struct {
+  double VIPWID[3];
+  double DXRCYL;
+  double DXZMAX;
+  double DXRSPH;
+  int     WZRFR;
+  int     FIX4JT;
+  int     IMSSM;
+  int     IHIGGS;
+  int     PARITY;
+  int     LRSUSY;
+} Hw6202_t;
+
+typedef struct {
+  double ABWGT;
+  double ABWSUM;
+  double AVABW;
+  int     NNEGWT;
+  int     NNEGEV;
+  int     NEGWTS;
+} Hw6203_t;
+
+int const IMAXCH = 20;
+
+typedef struct {
+  double MJJMIN;
+  double CHNPRB[IMAXCH];
+  int     IOPSTP;
+  int     IOPSH;
+  int     OPTM;
+  int     CHON[IMAXCH];
+} Hw6300_t;
+
+
+int const NXMRS = 49;
+int const NQMRS = 37;
+int const NPMRS = 8;
+
+typedef struct {
+  double FMRS[NQMRS+1][NXMRS][NPMRS][3];
+} Hwpmrs_t;
+
+typedef struct {
+  int     CIRCOP;
+  int     CIRCAC;
+  int     CIRCVR;
+  int     CIRCRV;
+  int     CIRCCH;
+} Hwcirc_t;
+
+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;
+} Hwdspb_t;
+
+typedef struct {
+  double A2MODE[NMODE2][2];
+  double P2MODE[NMODE2];
+  double WT2MAX[NMODE2];
+  int     ID2PRT[NMODE2];
+  int     I2DRTP[NMODE2];
+  int     N2MODE;
+} Hwdsp2_t;
+
+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];
+} Hwdsp3_t;
+
+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;
+} Hwdsp4_t;
+
+typedef struct {
+  int     NDECSY;
+  int     NSEARCH;
+  int     LRDEC;
+  int     LWDEC;
+  int     SYSPIN;
+  int     THREEB;
+  int     FOURB;
+  char   TAUDEC[6];
+} Hwdspn_t;
+
+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;
+} Hwspin_t;
+
+typedef struct {
+  int     JAK1;
+  int     JAK2;
+  int     ITDKRC;
+  int     IFPHOT;
+} Hwstau_t;
+
+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;    
+} Hwgupr_t;
+
+typedef struct {
+  int    PRESPL;
+} Hw6500_t;
+
+typedef struct {
+  int    ITOPRD;
+} Hw6504_t;
+
+typedef struct {
+  double PDFX0;
+  double PDFPOW;
+} Hw6506_t;
+
+
+
 
 extern "C" {
   void  hwigin_();
@@ -522,6 +711,7 @@ extern "C" {
   void  hwmevt_();
   void  hwufne_();
   void  hwefin_();
+  void  hwiodk_(int);
 }
 
 
@@ -548,7 +738,7 @@ public:
 
   // acces to hep common block
   Hepevt_t*   GetHepevt        () const     { return fHepevt; }
-  int         GetNevhep        () const     { return fHepevt->NEVHEP; }
+  int         GetNEVHEP        () const     { return fHepevt->NEVHEP; }
   int         GetNhep          () const     { return fHepevt->NHEP; }
   int         GetISTHEP    (int i)const     { return fHepevt->ISTHEP[i-1]; }
   int         GetIDHEP     (int i)const     { return fHepevt->IDHEP[i-1]; }
@@ -644,11 +834,20 @@ public:
   double      GetAVWGT         () const     { return fHwevnt->AVWGT; }
   int         GetMAXPR         () const     { return fHwevnt->MAXPR; }
   void        SetMAXPR    (int i)           { fHwevnt->MAXPR = i; }
+  
+  void        SetEV1PR    (int i)           { fHwevnt->EV1PR = i; }
+  void        SetEV2PR    (int i)           { fHwevnt->EV2PR = i; }
+  
   int         GetMAXER         () const     { return fHwevnt->MAXER; }
   void        SetMAXER    (int i)           { fHwevnt->MAXER = i; }
   int         GetNRN      (int i) const     { return fHwevnt->NRN[i-1]; }
   void        SetNRN    (int i, int j)      { fHwevnt->NRN[i-1] = j; }
+  double      GetEVWGT         () const     { return fHwevnt->EVWGT; }
 
+  int         GetIDHW     (int i) const     { return fHwevnt->IDHW[i]; }
+  
+  int         GetIERROR        () const     { return fHwevnt->IERROR; }
+  
   // /HWHARD/
   Hwhard_t*   GetHwhard        ()           { return fHwhard; }
   double      GetPTMIN         () const     { return fHwhard->PTMIN; }
@@ -678,6 +877,9 @@ public:
   // /HWUNAM/
   Hwunam_t*   GetHwunam        ()           { return fHwunam; }
 
+  void        GetRNAME (int i, char a[9])   { for (int j=0;j<8;j++) a[j] = fHwunam->RNAME[i][j]; a[8] = '\0';}
+/*  char*       GetRNAME(int i) { return fHwunam->RNAME[i]; }*/
+  
   // /HWUPDT/
   Hwupdt_t*   GetHwupdt        ()           { return fHwupdt; }
 
@@ -740,6 +942,7 @@ public:
   void             Hwmevt();
   void             Hwufne();
   void             Hwefin();
+  void             Hwiodk(int iopt);
   void             SetupTest();
 protected:
 
@@ -769,6 +972,23 @@ protected:
   Hwrpar_t* fHwrpar; // R-Parity violating parameters and colours
   Hwminb_t* fHwminb; // Parameters for minimum bias/soft underlying event
   Hwclus_t* fHwclus; // Cluster common used by soft event routines
+  Hwgrav_t* fHwgrav;
+  Hw6202_t* fHw6202;
+  Hw6203_t* fHw6203;
+  Hw6300_t* fHw6300;
+  Hwpmrs_t* fHwpmrs;
+  Hwcirc_t* fHwcirc;
+  Hwdspb_t* fHwdspb;
+  Hwdsp2_t* fHwdsp2;
+  Hwdsp3_t* fHwdsp3;
+  Hwdsp4_t* fHwdsp4;
+  Hwdspn_t* fHwdspn;
+  Hwspin_t* fHwspin;
+  Hwstau_t* fHwstau;
+  Hwgupr_t* fHwgupr;
+  Hw6500_t* fHw6500;
+  Hw6504_t* fHw6504;
+  Hw6506_t* fHw6506;
 
   ClassDef(THerwig6,0)  //Interface to Herwig6.1 Event Generator
 };
diff --git a/THerwig/driver.h b/THerwig/driver.h
new file mode 100644 (file)
index 0000000..feac689
--- /dev/null
@@ -0,0 +1,13 @@
+#include "Rtypes.h"
+#include "cfortran.h"
+//
+// COMMON/VVJIN/QQIN
+//
+extern "C" {
+
+    typedef struct {
+        char QQIN[50];
+} vvjinCommon;
+#define VVJIN COMMON_BLOCK(VVJIN,vvjin)
+COMMON_BLOCK_DEF(vvjinCommon,VVJIN);
+}