StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Herwig6.h
1 #ifndef __Herwig6__
2 #define __Herwig6__
3 
4 #include "StarCallf77.h"
5 #include <string>
6 using namespace std;
7 
8 #include "TObject.h"
11 
15 
17 
19 
21 
24 //
25 // Interface to common Blocks
26 //
27 
28 #define address_of_hepeup F77_NAME( address_of_hepeup, ADDRESS_OF_HEPEUP )
29 struct HEPEUP_t {
30  /* PARAMETER (MAXNUP=500)
31  INTEGER NUP,IDPRUP,IDUP,ISTUP,MOTHUP,ICOLUP
32  DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP,PUP,VTIMUP,SPINUP
33  COMMON/HEPEUP/NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP,
34  & IDUP(MAXNUP),ISTUP(MAXNUP),MOTHUP(2,MAXNUP),
35  & ICOLUP(2,MAXNUP),PUP(5,MAXNUP),VTIMUP(MAXNUP),
36  & SPINUP(MAXNUP)*/
37  /* Layout of the memory. */
38  Int_t nup;
39  Int_t idprup;
40  Double_t xwgtup;
41  Double_t scalup;
42  Double_t aqedup;
43  Double_t aqcdup;
44  Int_t _idup[500];
45  Int_t _istup[500];
46  Int_t _mothup[500][2];
47  Int_t _icolup[500][2];
48  Double_t _pup[500][5];
49  Double_t _vtimup[500];
50  Double_t _spinup[500];
51  /* Add access methods which mimic fortran arrays */
52  Int_t &idup( Int_t i ){return _idup[i-1]; }
53  Int_t &istup( Int_t i ){return _istup[i-1]; }
54  Int_t &mothup( Int_t i, Int_t j ){return _mothup[j-1][i-1]; }
55  Int_t &icolup( Int_t i, Int_t j ){return _icolup[j-1][i-1]; }
56  Double_t &pup( Int_t i, Int_t j ){return _pup[j-1][i-1]; }
57  Double_t &vtimup( Int_t i ){return _vtimup[i-1]; }
58  Double_t &spinup( Int_t i ){return _spinup[i-1]; }
59 };
60 extern "C" HEPEUP_t *address_of_hepeup();
61 
62 #define address_of_hwgup F77_NAME( adress_of_hwgup, ADDRESS_OF_HWGUP )
63 struct HWGUP_t {
64  /* INTEGER MAXNUP,ILOC,JLOC
65  PARAMETER (MAXNUP=500,NMXHEP=4000)
66  COMMON /HWGUP/ILOC(NMXHEP),JLOC(MAXNUP)*/
67  Int_t _iloc[4000];
68  Int_t _jloc[500];
69  /* Add access methods which mimic fortran arrays */
70  Int_t &iloc( Int_t i ){return _iloc[i-1]; }
71  Int_t &jloc( Int_t i ){return _jloc[i-1]; }
72 };
73 extern "C" HWGUP_t *address_of_hwgup();
74 
75 #define address_of_hepevt F77_NAME( address_of_hepevt, ADDRESS_OF_HEPEVT )
76 struct HEPEVT_t {
77  /* PARAMETER (NMXHEP=4000)
78  INTEGER NEVHEP,NHEP,ISTHEP,IDHEP,JMOHEP,JDAHEP
79  DOUBLE PRECISION PHEP,VHEP
80  COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
81  & JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
82  address_of_hepevt = loc ( nevhep )*/
83  /* Layout of the memory */
84  Int_t nevhep;
85  Int_t nhep;
86  Int_t _isthep[4000];
87  Int_t _idhep[4000];
88  Int_t _jmohep[4000][2];
89  Int_t _jdahep[4000][2];
90  Double_t _phep[4000][2];
91  Double_t _vhep[4000][4];
92  /* Add access methods which mimic fortran arrays */
93  Int_t &isthep( Int_t i ){return _isthep[i-1]; }
94  Int_t &idhep( Int_t i ){return _idhep[i-1]; }
95  Int_t &jmohep( Int_t i, Int_t j ){return _jmohep[j-1][i-1]; }
96  Int_t &jdahep( Int_t i, Int_t j ){return _jdahep[j-1][i-1]; }
97  Double_t &phep( Int_t i, Int_t j ){return _phep[j-1][i-1]; }
98  Double_t &vhep( Int_t i, Int_t j ){return _vhep[j-1][i-1]; }
99 };
100 extern "C" HEPEVT_t *address_of_hepevt();
101 
102 #define address_of_hwbeam F77_NAME( address_of_hwbeam, ADDRESS_OF_HWBEAM )
103 struct HWBEAM_t {
104  /* INTEGER IPART1,IPART2
105  COMMON/HWBEAM/IPART1,IPART2*/
106  /* Layout of the memory */
107  Int_t ipart1;
108  Int_t ipart2;
109 };
110 extern "C" HWBEAM_t *address_of_hwbeam();
111 
112 #define address_of_hwproc F77_NAME( address_of_hwproc, ADDRESS_OF_HWPROC )
113 struct HWPROC_t {
114  /* DOUBLE PRECISION EBEAM1,EBEAM2,PBEAM1,PBEAM2
115  INTEGER IPROC,MAXEV
116  COMMON/HWPROC/EBEAM1,EBEAM2,PBEAM1,PBEAM2,IPROC,MAXEV*/
117  Double_t ebeam1;
118  Double_t ebeam2;
119  Double_t pbeam1;
120  Double_t pbeam2;
121  Int_t iproc;
122  Int_t maxev;
123 };
124 extern "C" HWPROC_t *address_of_hwproc();
125 
126 #define address_of_hwpram F77_NAME( address_of_hwpram, ADDRESS_OF_HWPRAM )
127 struct HWPRAM_t {
128  /* DOUBLE PRECISION AFCH,ALPHEM,B1LIM,BETAF,BTCLM,CAFAC,CFFAC,
129  & CLMAX,CLPOW,CLSMR,CSPEED,ENSOF,ETAMIX,F0MIX,F1MIX,F2MIX,GAMH,
130  & GAMW,GAMZ,GAMZP,GEV2NB,H1MIX,PDIQK,PGSMX,PGSPL,PHIMIX,PIFAC,
131  & PRSOF,PSPLT,PTRMS,PXRMS,QCDL3,QCDL5,QCDLAM,QDIQK,QFCH,QG,
132  & QSPAC,QV,SCABI,SWEIN,TMTOP,VFCH,VCKM,VGCUT,VQCUT,
133  & VPCUT,ZBINM,EFFMIN,OMHMIX,ET2MIX,PH3MIX,GCUTME
134  INTEGER IOPREM,IPRINT,ISPAC,LRSUD,LWSUD,MODPDF,NBTRY,NCOLO,
135  & NCTRY,NDTRY,NETRY,NFLAV,NGSPL,NSTRU,NSTRY,NZBIN,IOP4JT,
136  & NPRFMT,CLDIR
137  LOGICAL AZSOFT,AZSPIN,HARDME,NOSPAC,PRNDEC,PRVTX,SOFTME,ZPRIME,
138  & PRNDEF,PRNTEX,PRNWEB
139  COMMON/HWPRAM/AFCH(16,2),ALPHEM,B1LIM,BETAF,BTCLM,CAFAC,CFFAC,
140  & CLMAX,CLPOW,CLSMR(2),CSPEED,ENSOF,ETAMIX,F0MIX,F1MIX,F2MIX,GAMH,
141  & GAMW,GAMZ,GAMZP,GEV2NB,H1MIX,PDIQK,PGSMX,PGSPL(4),PHIMIX,PIFAC,
142  & PRSOF,PSPLT(2),PTRMS,PXRMS,QCDL3,QCDL5,QCDLAM,QDIQK,QFCH(16),QG,
143  & QSPAC,QV,SCABI,SWEIN,TMTOP,VFCH(16,2),VCKM(3,3),VGCUT,VQCUT,
144  & VPCUT,ZBINM,EFFMIN,OMHMIX,ET2MIX,PH3MIX,GCUTME,
145  & IOPREM,IPRINT,ISPAC,LRSUD,LWSUD,MODPDF(2),NBTRY,NCOLO,NCTRY,
146  & NDTRY,NETRY,NFLAV,NGSPL,NSTRU,NSTRY,NZBIN,IOP4JT(2),NPRFMT,
147  & AZSOFT,AZSPIN,CLDIR(2),HARDME,NOSPAC,PRNDEC,PRVTX,SOFTME,ZPRIME,
148  & PRNDEF,PRNTEX,PRNWEB */
149  Double_t _afch[2][16];
150  Double_t alphem;
151  Double_t b1lim;
152  Double_t betaf;
153  Double_t btclm;
154  Double_t cafac;
155  Double_t cffac;
156  Double_t clmax;
157  Double_t clpow;
158  Double_t _clsmr[2];
159  Double_t cspeed;
160  Double_t ensof;
161  Double_t etamix;
162  Double_t f0mix;
163  Double_t f1mix;
164  Double_t f2mix;
165  Double_t gamh;
166  Double_t gamw;
167  Double_t gamz;
168  Double_t gamzp;
169  Double_t gev2nb;
170  Double_t h1mix;
171  Double_t pdiqk;
172  Double_t pgsmx;
173  Double_t _pgspl[4];
174  Double_t phimix;
175  Double_t pifac;
176  Double_t prsof;
177  Double_t _psplt[2];
178  Double_t ptrms;
179  Double_t pxrms;
180  Double_t qcdl3;
181  Double_t qcdl5;
182  Double_t qcdlam;
183  Double_t qdiqk;
184  Double_t _qfch[16];
185  Double_t qg;
186  Double_t qspac;
187  Double_t qv;
188  Double_t scabi;
189  Double_t swein;
190  Double_t tmtop;
191  Double_t _vfch[2][16];
192  Double_t _vckm[3][3];
193  Double_t vgcut;
194  Double_t vqcut;
195  Double_t vpcut;
196  Double_t zbinm;
197  Double_t effmin;
198  Double_t omhmix;
199  Double_t et2mix;
200  Double_t ph3mix;
201  Double_t gcutme;
202  Int_t ioprem;
203  Int_t iprint;
204  Int_t ispac;
205  Int_t lrsud;
206  Int_t lwsud;
207  Int_t _modpdf[2];
208  Int_t nbtry;
209  Int_t ncolo;
210  Int_t nctry;
211  Int_t ndtry;
212  Int_t netry;
213  Int_t nflav;
214  Int_t ngspl;
215  Int_t nstru;
216  Int_t nstry;
217  Int_t nzbin;
218  Int_t _iop4jt[2];
219  Int_t nprfmt;
220  Bool_t azsoft;
221  Bool_t azspin;
222  Int_t _cldir[2];
223  Bool_t hardme;
224  Bool_t nospac;
225  Bool_t prndec;
226  Bool_t prvtx;
227  Bool_t softme;
228  Bool_t zprime;
229  Bool_t prndef;
230  Bool_t prntex;
231  Bool_t prnweb;
232  Double_t &afch( Int_t i, Int_t j ){return _afch[j-1][i-1]; }
233  Double_t &clsmr( Int_t i ){return _clsmr[i-1]; }
234  Double_t &psplt( Int_t i ){return _psplt[i-1]; }
235  Double_t &qfch( Int_t i ){return _qfch[i-1]; }
236  Double_t &vfch( Int_t i, Int_t j ){return _vfch[j-1][i-1]; }
237  Double_t &vckm( Int_t i, Int_t j ){return _vckm[j-1][i-1]; }
238  Int_t &modpdf( Int_t i ){return _modpdf[i-1]; }
239  Int_t &iop4jt( Int_t i ){return _iop4jt[i-1]; }
240  Int_t &cldir( Int_t i ){return _cldir[i-1]; }
241 };
242 extern "C" HWPRAM_t *address_of_hwpram();
243 
244 #define address_of_hwbrch F77_NAME( address_of_hwbrch, ADDRESS_OF_HWBRCH )
245 struct HWBRCH_t {
246  /* INTEGER INHAD,JNHAD
247  DOUBLE PRECISION ANOMSC,HARDST,PTINT,XFACT
248  COMMON/HWBRCH/ANOMSC(2,2),HARDST,PTINT(3,2),XFACT,INHAD,JNHAD,
249  & NSPAC(7),ISLENT,BREIT,FROST,USECMF*/
250  Double_t _anomsc[2][2];
251  Double_t hardst;
252  Double_t _ptint[2][3];
253  Double_t xfact;
254  Int_t inhad;
255  Int_t jnhad;
256  Double_t &anomsc( Int_t i, Int_t j ){return _anomsc[j-1][i-1]; }
257  Double_t &ptint( Int_t i, Int_t j ){return _ptint[j-1][i-1]; }
258 };
259 extern "C" HWBRCH_t *address_of_hwbrch();
260 
261 #define address_of_hwevnt F77_NAME( address_of_hwevnt, ADDRESS_OF_HWEVNT )
262 struct HWEVNT_t {
263  /*
264    DOUBLE PRECISION AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,
265  & WSQSUM
266  INTEGER IDHW,IERROR,ISTAT,LWEVT,MAXER,MAXPR,NRN,NUMER,NUMERU,
267  & NWGTS
268  LOGICAL NOWGT,GENSOF
269  PARAMETER (NMXHEP=4000)
270  COMMON/HWEVNT/AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,WSQSUM,
271  & IDHW(NMXHEP),IERROR,ISTAT,LWEVT,MAXER,MAXPR,NOWGT,NRN(2),NUMER,
272  & NUMERU,NWGTS,GENSOF*/
273  Double_t avwgt;
274  Double_t evwgt;
275  Double_t gamwt;
276  Double_t tlout;
277  Double_t wbigst;
278  Double_t wgtmax;
279  Double_t wgtsum;
280  Double_t wsqsum;
281  Int_t _idhw[4000];
282  Int_t ierror;
283  Int_t istat;
284  Int_t lwevt;
285  Int_t maxer;
286  Int_t maxpr;
287  Bool_t nowgt;
288  Int_t _nrn[2];
289  Int_t numer;
290  Int_t nwgts;
291  Bool_t gensof;
292  Int_t &idhw( Int_t i ){return _idhw[i-1]; }
293  Int_t &nrn( Int_t i ){return _nrn[i-1]; }
294 };
295 extern "C" HWEVNT_t *address_of_hwevnt();
296 
297 #define address_of_hwhard F77_NAME( address_of_hwhard, ADDRESS_OF_HWHARD )
298 struct HWHARD_t {
299  /* DOUBLE PRECISION ASFIXD,CLQ,COSS,COSTH,CTMAX,DISF,EMLST,EMMAX,
300  & EMMIN,EMPOW,EMSCA,EPOLN,GCOEF,GPOLN,OMEGA0,PHOMAS,PPOLN,
301  & PTMAX,PTMIN,PTPOW,Q2MAX,Q2MIN,Q2POW,Q2WWMN,Q2WWMX,QLIM,SINS,THMAX,
302  & Y4JT,TMNISR,TQWT,XX,XLMIN,XXMIN,YBMAX,YBMIN,YJMAX,YJMIN,YWWMAX,
303  & YWWMIN,WHMIN,ZJMAX,ZMXISR
304  INTEGER IAPHIG,IBRN,IBSH,ICO,IDCMF,IDN,IFLMAX,IFLMIN,IHPRO,IPRO,
305  & MAPQ,MAXFL
306  LOGICAL BGSHAT,COLISR,FSTEVT,FSTWGT,GENEV,HVFCEN,TPOL,DURHAM
307  COMMON/HWHARD/ASFIXD,CLQ(7,6),COSS,COSTH,CTMAX,DISF(13,2),EMLST,
308  & EMMAX,EMMIN,EMPOW,EMSCA,EPOLN(3),GCOEF(7),GPOLN,OMEGA0,PHOMAS,
309  & PPOLN(3),PTMAX,PTMIN,PTPOW,Q2MAX,Q2MIN,Q2POW,Q2WWMN,Q2WWMX,QLIM,
310  & SINS,THMAX,Y4JT,TMNISR,TQWT,XX(2),XLMIN,XXMIN,YBMAX,YBMIN,YJMAX,
311  & YJMIN,YWWMAX,YWWMIN,WHMIN,ZJMAX,ZMXISR,IAPHIG,IBRN(2),IBSH,
312  & ICO(10),IDCMF,IDN(10),IFLMAX,IFLMIN,IHPRO,IPRO,MAPQ(6),MAXFL,
313  & BGSHAT,COLISR,FSTEVT,FSTWGT,GENEV,HVFCEN,TPOL,DURHAM*/
314  Double_t asfixd;
315  Double_t _clq[6][7];
316  Double_t coss;
317  Double_t costh;
318  Double_t ctmax;
319  Double_t _disf[2][13];
320  Double_t emlst;
321  Double_t emmax;
322  Double_t emmin;
323  Double_t empow;
324  Double_t emsca;
325  Double_t _epoln[3];
326  Double_t _gcoef[7];
327  Double_t gpoln;
328  Double_t omega0;
329  Double_t phomas;
330  Double_t _ppoln[3];
331  Double_t ptmax;
332  Double_t ptmin;
333  Double_t ptpow;
334  Double_t q2max;
335  Double_t q2min;
336  Double_t q2pow;
337  Double_t q2wwmn;
338  Double_t q2wwmx;
339  Double_t qlim;
340  Double_t sins;
341  Double_t thmax;
342  Double_t y4jt;
343  Double_t tmnisr;
344  Double_t tqwt;
345  Double_t _xx[2];
346  Double_t xlmin;
347  Double_t xxmin;
348  Double_t ybmax;
349  Double_t ybmin;
350  Double_t yjmax;
351  Double_t yjmin;
352  Double_t ywwmax;
353  Double_t ywwmin;
354  Double_t whmin;
355  Double_t zjmax;
356  Double_t zmxisr;
357  Int_t iaphig;
358  Int_t _ibrn[2];
359  Int_t ibsh;
360  Int_t _ico[10];
361  Int_t idcmf;
362  Int_t _idn[10];
363  Int_t iflmax;
364  Int_t iflmin;
365  Int_t ihpro;
366  Int_t ipro;
367  Int_t _mapq[6];
368  Int_t maxfl;
369  Bool_t bgshat;
370  Bool_t colisr;
371  Bool_t fstevt;
372  Bool_t fstwgt;
373  Bool_t genev;
374  Bool_t hvfcen;
375  Bool_t tpol;
376  Bool_t durham;
377  Double_t &clq( Int_t i, Int_t j ){return _clq[j-1][i-1]; }
378  Double_t &disf( Int_t i, Int_t j){return _disf[j-1][i-1]; }
379  Double_t &epoln( Int_t i ){return _epoln[i-1]; }
380  Double_t &gcoef( Int_t i ){return _gcoef[i-1]; }
381  Double_t &ppoln( Int_t i ){return _ppoln[i-1]; }
382  Double_t &xx( Int_t i ){return _xx[i-1]; }
383  Int_t &ibrn( Int_t i ){return _ibrn[i-1]; }
384  Int_t &ico( Int_t i ){return _ico[i-1]; }
385  Int_t &idn( Int_t i ){return _idn[i-1]; }
386  Int_t &mapq( Int_t i ){return _mapq[i-1]; }
387 };
388 extern "C" HWHARD_t *address_of_hwhard();
389 
390 #define address_of_custom F77_NAME( address_of_custom, ADDRESS_OF_CUSTOM )
391 struct CUSTOM_t {
392  Double_t hwmans;
393  Double_t hwmant;
394  Double_t hwmanu;
395 };
396 extern "C" CUSTOM_t *address_of_custom();
397 
398 void HWSetBeams( string part1, string part2 );
399 
400 void InitializeEvent( vector<string> particles );
401 
402 void GenerateEvent();
403 
404 void HWEFIN();
405 
406 #endif