]> git.uio.no Git - u/mrichter/AliRoot.git/blob - THerwig/THerwig6.h
Updating the AliAnalysisFemtoTask to work with
[u/mrichter/AliRoot.git] / THerwig / THerwig6.h
1 #ifndef THERWIG6_H
2 #define THERWIG6_H
3
4 // declaration of c++ Class THerwig6 to be used in ROOT
5 // this is a c++ interface to the F77 Herwig6 program
6 // author: j. g. contreras jgcn@moni.mda.cinvestav.mx
7 // date: december 22, 2000
8
9 /*
10
11  Class THerwig6 is an interface to the Herwig program
12
13 C-----------------------------------------------------------------------
14 C                           H E R W I G
15 C
16 C            a Monte Carlo event generator for simulating
17 C        +---------------------------------------------------+
18 C        | Hadron Emission Reactions With Interfering Gluons |
19 C        +---------------------------------------------------+
20 C I.G. Knowles(*), G. Marchesini(+), M.H. Seymour($) and B.R. Webber(#)
21 C-----------------------------------------------------------------------
22 C with Minimal Supersymmetric Standard Model Matrix Elements by
23 C                  S. Moretti($) and K. Odagiri($)
24 C-----------------------------------------------------------------------
25 C R parity violating Supersymmetric Decays and Matrix Elements by
26 C                          P. Richardson(&)
27 C-----------------------------------------------------------------------
28 C matrix element corrections to top decay and Drell-Yan type processes
29 C                         by G. Corcella(+)
30 C-----------------------------------------------------------------------
31 C Deep Inelastic Scattering and Heavy Flavour Electroproduction by
32 C                  G. Abbiendi(@) and L. Stanco(%)
33 C-----------------------------------------------------------------------
34 C and Jet Photoproduction in Lepton-Hadron Collisions by J. Chyla(~)
35 C-----------------------------------------------------------------------
36 C(*)  Department of Physics & Astronomy, University of Edinburgh
37 C(+)  Dipartimento di Fisica, Universita di Milano
38 C($)  Rutherford Appleton Laboratory
39 C(#)  Cavendish Laboratory, Cambridge
40 C(&)  Department of Physics, University of Oxford
41 C(@)  Dipartimento di Fisica, Universita di Bologna
42 C(%)  Dipartimento di Fisica, Universita di Padova
43 C(~)  Institute of Physics, Prague
44 C-----------------------------------------------------------------------
45 C                  Version 6.100 - 16th December 1999
46 C-----------------------------------------------------------------------
47 C Main reference:
48 C    G.Marchesini,  B.R.Webber,  G.Abbiendi,  I.G.Knowles,  M.H.Seymour,
49 C    and L.Stanco, Computer Physics Communications 67 (1992) 465.
50 C-----------------------------------------------------------------------
51 C Please send e-mail about  this program  to one of the  authors at the
52 C following Internet addresses:
53 C    I.Knowles@ed.ac.uk        Giuseppe.Marchesini@mi.infn.it
54 C    M.Seymour@rl.ac.uk        webber@hep.phy.cam.ac.uk
55 C-----------------------------------------------------------------------
56 */
57
58 /* declarations from ROOT */
59 #include "TGenerator.h"
60
61 typedef enum
62 {
63    kHwCharm         =  1704,
64    kHwBeauty        =  1705,
65    kHwCharmMCATNLO  = -1704,
66    kHwBeautyMCATNLO = -1705,
67    kHwJetsMCATNLO   = -1396
68 } Process_t;
69
70 class TObjArray;
71
72 // Translation of Fortran commons from the Herwig6
73 // f77 program into c++ structures to be used in ROOT
74 // and declaration of Fortran functions as extern
75 // C functions to be called from the class Herwig6
76 // author: j. g. contreras jgcn@moni.mda.cinvestav.mx
77 // date: december 22, 2000
78
79 typedef struct {double dr,di;} dcpx;
80
81 int const NMXHEP = 4000;
82
83 typedef struct {
84   int NEVHEP;
85   int NHEP;
86   int ISTHEP[NMXHEP];
87   int IDHEP[NMXHEP];
88   int JMOHEP[NMXHEP][2];
89   int JDAHEP[NMXHEP][2];
90   double PHEP[NMXHEP][5];
91   double VHEP[NMXHEP][4];
92 } Hepevt_t;
93
94 typedef struct {
95   int IPART1;
96   int IPART2;
97 } Hwbeam_t;
98
99 typedef struct {
100   char PART1[8];
101   char PART2[8];
102 } Hwbmch_t;
103
104 typedef struct {
105   double EBEAM1;
106   double EBEAM2;
107   double PBEAM1;
108   double PBEAM2;
109   int    IPROC;
110   int    MAXEV;
111 } Hwproc_t;
112
113 typedef struct {
114   double AFCH[2][16];
115   double ALPHEM;
116   double B1LIM;
117   double BETAF;
118   double BTCLM;
119   double CAFAC;
120   double CFFAC;
121   double CLMAX;
122   double CLPOW;
123   double CLSMR[2];
124   double CSPEED;
125   double ENSOF;
126   double ETAMIX;
127   double F0MIX;
128   double F1MIX;
129   double F2MIX;
130   double GAMH;
131   double GAMW;
132   double GAMZ;
133   double GAMZP;
134   double GEV2NB;
135   double H1MIX;
136   double PDIQK;
137   double PGSMX;
138   double PGSPL[4];
139   double PHIMIX;
140   double PIFAC;
141   double PRSOF;
142   double PSPLT[2];
143   double PTRMS;
144   double PXRMS;
145   double QCDL3;
146   double QCDL5;
147   double QCDLAM;
148   double QDIQK;
149   double QFCH[16];
150   double QG;
151   double QSPAC;
152   double QV;
153   double SCABI;
154   double SWEIN;
155   double TMTOP;
156   double VFCH[2][16];
157   double VCKM[3][3];
158   double VGCUT;
159   double VQCUT;
160   double VPCUT;
161   double ZBINM;
162   double EFFMIN;
163   double OMHMIX;
164   double ET2MIX;
165   double PH3MIX;
166   double GCUTME;
167   int    IOPREM;
168   int    IPRINT;
169   int    ISPAC;
170   int    LRSUD;
171   int    LWSUD;
172   int    MODPDF[2];
173   int    NBTRY;
174   int    NCOLO;
175   int    NCTRY;
176   int    NDTRY;
177   int    NETRY;
178   int    NFLAV;
179   int    NGSPL;
180   int    NSTRU;
181   int    NSTRY;
182   int    NZBIN;
183   int    IOP4JT[2];
184   int    NPRFMT;
185   int AZSOFT;
186   int AZSPIN;
187   int CLDIR[2];
188   int HARDME;
189   int NOSPAC;
190   int PRNDEC;
191   int PRVTX;
192   int SOFTME;
193   int ZPRIME;
194   int PRNDEF;
195   int PRNTEX;
196   int PRNWEB;
197 } Hwpram_t;
198
199 typedef struct {
200   char AUTPDF[2][20];
201   char BDECAY[4];
202 } Hwprch_t;
203
204 int const NMXPAR = 500;
205
206 typedef struct {
207   int  NEVPAR;
208   int  NPAR;
209   int  ISTPAR[NMXPAR];
210   int  IDPAR[NMXPAR];
211   int  JMOPAR[NMXPAR][2];
212   int  JDAPAR[NMXPAR][2];
213   double  PPAR[NMXPAR][5];
214   double  VPAR[NMXPAR][4];
215 } Hwpart_t;
216
217 typedef struct {
218   double DECPAR[NMXPAR][2];
219   double PHIPAR[NMXPAR][2];
220   double RHOPAR[NMXPAR][2];
221   int TMPAR[NMXPAR];
222 } Hwparp_t;
223
224 int const MODMAX = 50;
225
226 typedef struct {
227   double  ALPFAC;
228   double  BRHIG[12];
229   double  ENHANC[12];
230   double  GAMMAX;
231   double  RHOHEP[NMXHEP][3];
232   int     IOPHIG;
233   int     MODBOS[MODMAX];
234 } Hwbosc_t;
235
236 typedef struct {
237   int     JCOPAR[NMXPAR][4];
238 } Hwparc_t;
239
240 typedef struct {
241   double ANOMSC[2][2];
242   double HARDST;
243   double PTINT[2][3];
244   double XFACT;
245   int    INHAD;
246   int    JNHAD;
247   int    NSPAC[7];
248   int    ISLENT;
249   int    BREIT;
250   int    FROST;
251   int    USECMF;
252 } Hwbrch_t;
253
254 typedef struct {
255   double AVWGT;
256   double EVWGT;
257   double GAMWT;
258   double TLOUT;
259   double WBIGST;
260   double WGTMAX;
261   double WGTSUM;
262   double WSQSUM;
263   int    IDHW[NMXHEP];
264   int    IERROR;
265   int    ISTAT;
266   int    LWEVT;
267   int    MAXER;
268   int    MAXPR;
269   int    NOWGT;
270   int    NRN[2];
271   int    NUMER;
272   int    NUMERU;
273   int    NWGTS;
274   int    GENSOF;
275   int    EV1PR;
276   int    EV2PR;
277 } Hwevnt_t;
278
279 typedef struct {
280   double ASFIXD;
281   double CLQ[6][7];
282   double COSS;
283   double COSTH;
284   double CTMAX;
285   double DISF[2][13];
286   double EMLST;
287   double EMMAX;
288   double EMMIN;
289   double EMPOW;
290   double EMSCA;
291   double EPOLN[3];
292   double GCOEF[7];
293   double GPOLN;
294   double OMEGA0;
295   double PHOMAS;
296   double PPOLN[3];
297   double PTMAX;
298   double PTMIN;
299   double PTPOW;
300   double Q2MAX;
301   double Q2MIN;
302   double Q2POW;
303   double Q2WWMN;
304   double Q2WWMX;
305   double QLIM;
306   double SINS;
307   double THMAX;
308   double Y4JT;
309   double TMNISR;
310   double TQWT;
311   double XX[2];
312   double XLMIN;
313   double XXMIN;
314   double YBMAX;
315   double YBMIN;
316   double YJMAX;
317   double YJMIN;
318   double YWWMAX;
319   double YWWMIN;
320   double WHMIN;
321   double ZJMAX;
322   double ZMXISR;
323   int    IAPHIG;
324   int    IBRN[2];
325   int    IBSH;
326   int    ICO[10];
327   int    IDCMF;
328   int    IDN[10];
329   int    IFLMAX;
330   int    IFLMIN;
331   int    IHPRO;
332   int    IPRO;
333   int    MAPQ[10];
334   int    MAXFL;
335   int    BGSHAT;
336   int    COLISR;
337   int    FSTEVT;
338   int    FSTWGT;
339   int    GENEV;
340   int    HVFCEN;
341   int    TPOL;
342   int     DURHAM;
343 } Hwhard_t;
344
345 int const NMXRES = 500;
346
347 typedef struct {
348   double RLTIM[NMXRES+1];
349   double RMASS[NMXRES+1];
350   double RSPIN[NMXRES+1];
351   int    ICHRG[NMXRES+1];
352   int    IDPDG[NMXRES+1];
353   int    IFLAV[NMXRES+1];
354   int    NRES;
355   int    VTOCDK[NMXRES+1];
356   int    VTORDK[NMXRES+1];
357   int    QORQQB[NMXRES+1];
358   int    QBORQQ[NMXRES+1];
359 } Hwprop_t;
360
361 typedef struct {
362   char RNAME[NMXRES+1][8];
363   char TXNAME[NMXRES+1][2][37];
364 } Hwunam_t;
365
366 int const NMXDKS = 4000;
367 int const NMXMOD = 200;
368
369 typedef struct {
370   double BRFRAC[NMXDKS];
371   double CMMOM[NMXDKS];
372   double DKLTM[NMXRES];
373   int    IDK[NMXDKS];
374   int    IDKPRD[NMXDKS][5];
375   int    LNEXT[NMXDKS];
376   int    LSTRT[NMXRES];
377   int    NDKYS;
378   int    NME[NMXDKS];
379   int    NMODES[NMXRES];
380   int    NPRODS[NMXDKS];
381   int    DKPSET;
382   int    RSTAB[NMXRES+1];
383 } Hwupdt_t;
384
385 typedef struct {
386   double REPWT[5][4][4];
387   double SNGWT;
388   double DECWT;
389   double QWT[3];
390   double PWT[12];
391   double SWTEF[NMXRES];
392 } Hwuwts_t;
393
394 int const NMXCDK = 4000;
395
396 typedef struct {
397   double CLDKWT[NMXCDK];
398   double CTHRPW[12][12];
399   double PRECO;
400   double RESN[12][12];
401   double RMIN[12][12];
402   int    LOCN[12][12];
403   int    NCLDK[NMXCDK];
404   int    NRECO;
405   int    CLRECO;
406 } Hwuclu_t;
407
408 typedef struct {
409   double EXAG;
410   double GEV2MM;
411   double HBAR;
412   double PLTCUT;
413   double VMIN2;
414   double VTXPIP[5];
415   double XMIX[2];
416   double XMRCT[2];
417   double YMIX[2];
418   double YMRCT[2];
419   int    IOPDKL;
420   int    MAXDKL;
421   int    MIXING;
422   int    PIPSMR;
423 } Hwdist_t;
424
425 int const NMXQDK=20;
426
427 typedef struct {
428   double VTXQDK[NMXQDK][4];
429   int    IMQDK[NMXQDK];
430   int    LOCQ[NMXQDK];
431   int    NQDK;
432 } Hwqdks_t;
433
434 int const NMXSUD = 1024;
435
436 typedef struct {
437   double ACCUR;
438   double QEV[6][NMXSUD];
439   double SUD[6][NMXSUD];
440   int    INTER;
441   int    NQEV;
442   int    NSUD;
443   int    SUDORD;
444 } Hwusud_t;
445
446 typedef struct {
447   double TANB;
448   double ALPHAH;
449   double COSBPA;
450   double SINBPA;
451   double COSBMA;
452   double SINBMA;
453   double COSA;
454   double SINA;
455   double COSB;
456   double SINB;
457   double COTB;
458   double ZMIXSS[4][4];
459   double ZMXNSS[4][4];
460   double ZSGNSS[4];
461   double LFCH[16];
462   double RFCH[16];
463   double SLFCH[4][16];
464   double SRFCH[4][16];
465   double WMXUSS[2][2];
466   double WMXVSS[2][2];
467   double WSGNSS[2];
468   double QMIXSS[2][2][6];
469   double LMIXSS[2][2][6];
470   double THETAT;
471   double THETAB;
472   double THETAL;
473   double ATSS;
474   double ABSS;
475   double ALSS;
476   double MUSS;
477   double FACTSS;
478   double GHWWSS[3];
479   double GHZZSS[3];
480   double GHDDSS[4];
481   double GHUUSS[4];
482   double GHWHSS[3];
483   double GHSQSS[2][2][6][4];
484   double XLMNSS;
485   double RMMNSS;
486   double DMSSM;
487   double SENHNC[24];
488   double SSPARITY;
489   int    SUSYIN;
490 } Hwsusy_t;
491
492 typedef struct {
493   double LAMDA1[3][3][3];
494   double LAMDA2[3][3][3];
495   double LAMDA3[3][3][3];
496   int    HRDCOL[5][2];
497   int    RPARTY;
498   int    COLUPD;
499 } Hwrpar_t;
500
501 typedef struct {
502   double PMBN1;
503   double PMBN2;
504   double PMBN3;
505   double PMBK1;
506   double PMBK2;
507   double PMBM1;
508   double PMBM2;
509   double PMBP1;
510   double PMBP2;
511   double PMBP3;
512 } Hwminb_t;
513
514 int const NMXCL = 500;
515
516 typedef struct {
517   double PPCL[NMXCL][5];
518   int    IDCL[NMXCL];
519   int    NCL;
520 } Hwclus_t;
521
522 // herwig 6.507
523
524 typedef struct {
525   double GRVLAM;
526   double EMGRV;
527   double GAMGRV;
528 } Hwgrav_t;
529
530 typedef struct {
531   double VIPWID[3];
532   double DXRCYL;
533   double DXZMAX;
534   double DXRSPH;
535   int      WZRFR;
536   int      FIX4JT;
537   int      IMSSM;
538   int      IHIGGS;
539   int      PARITY;
540   int      LRSUSY;
541 } Hw6202_t;
542
543 typedef struct {
544   double ABWGT;
545   double ABWSUM;
546   double AVABW;
547   int      NNEGWT;
548   int      NNEGEV;
549   int      NEGWTS;
550 } Hw6203_t;
551
552 int const IMAXCH = 20;
553
554 typedef struct {
555   double MJJMIN;
556   double CHNPRB[IMAXCH];
557   int      IOPSTP;
558   int      IOPSH;
559   int      OPTM;
560   int      CHON[IMAXCH];
561 } Hw6300_t;
562
563
564 int const NXMRS = 49;
565 int const NQMRS = 37;
566 int const NPMRS = 8;
567
568 typedef struct {
569   double FMRS[NQMRS+1][NXMRS][NPMRS][3];
570 } Hwpmrs_t;
571
572 typedef struct {
573   int      CIRCOP;
574   int      CIRCAC;
575   int      CIRCVR;
576   int      CIRCRV;
577   int      CIRCCH;
578 } Hwcirc_t;
579
580 int const NCFMAX = 3;
581 int const NMODE2 = 500;
582 int const NMODE3 = 500;
583 int const NDIAGR = 8;
584 int const NMODEB = 50;
585 int const NMODE4 = 4;
586
587 typedef struct {
588   double ABMODE[NMODEB][2];
589   double BBMODE[NMODEB][12][2];
590   double PBMODE[NMODEB][12];
591   double WTBMAX[NMODEB][12];
592   int      IDBPRT[NMODEB];
593   int      IBDRTP[NMODEB];
594   int      IBMODE[NMODEB];
595   int      NBMODE;
596 } Hwdspb_t;
597
598 typedef struct {
599   double A2MODE[NMODE2][2];
600   double P2MODE[NMODE2];
601   double WT2MAX[NMODE2];
602   int      ID2PRT[NMODE2];
603   int      I2DRTP[NMODE2];
604   int      N2MODE;
605 } Hwdsp2_t;
606
607 typedef struct {
608   double A3MODE[NMODE3][NDIAGR][2];
609   double B3MODE[NMODE3][NDIAGR][2];
610   double P3MODE[NMODE3];
611   double WT3MAX[NMODE3];
612   double SPN3CF[NMODE3][NCFMAX][NCFMAX];
613   int      ID3PRT[NMODE3];
614   int      I3MODE[NMODE3][NDIAGR];
615   int      I3DRTP[NMODE3][NDIAGR];
616   int      N3MODE;
617   int      NDI3BY[NMODE3];
618   int      N3NCFL[NMODE3];
619   int      I3DRCF[NMODE3][NDIAGR];
620 } Hwdsp3_t;
621
622 typedef struct {
623   double A4MODE[NMODE4][12][2];
624   double B4MODE[NMODE4][12][2];
625   double P4MODE[NMODE4][12][12];
626   double WT4MAX[NMODE4][12][12];
627   int      ID4PRT[NMODE4];
628   int      I4MODE[NMODE4][2];
629   int      N4MODE;
630 } Hwdsp4_t;
631
632 typedef struct {
633   int      NDECSY;
634   int      NSEARCH;
635   int      LRDEC;
636   int      LWDEC;
637   int      SYSPIN;
638   int      THREEB;
639   int      FOURB;
640   char   TAUDEC[6];
641 } Hwdspn_t;
642
643 int const NMXSPN = 50;
644
645 typedef struct {
646   dcpx   MESPN[NMXSPN][NCFMAX][2][2][2][2];
647   dcpx   RHOSPN[NMXSPN][2][2];
648   double SPNCFC[NMXSPN][NCFMAX][NCFMAX];
649   int      IDSPN[NMXSPN];
650   int      JMOSPN[NMXSPN];
651   int      JDASPN[NMXSPN][2];
652   int      NSPN;
653   int      ISNHEP[NMXHEP];
654   int      NSNTRY;
655   int      DECSPN[NMXSPN];
656   int      NCFL[NMXSPN];
657   int      SPCOPT;
658 } Hwspin_t;
659
660 typedef struct {
661   int      JAK1;
662   int      JAK2;
663   int      ITDKRC;
664   int      IFPHOT;
665 } Hwstau_t;
666
667 int const MAXHRP = 100;
668
669 typedef struct {
670   double LHWGT[MAXHRP];
671   double LHWGTS[MAXHRP];
672   double LHXSCT[MAXHRP];
673   double LHXERR[MAXHRP];
674   double LHXMAX[MAXHRP];
675   double LHMXSM;
676   int      LHIWGT[MAXHRP];
677   int      LHNEVT[MAXHRP];
678   int      ITYPLH;
679   int      LHSOFT;
680   int      LHGLSF;
681 } Hwgupr_t;
682
683 typedef struct {
684   int    PRESPL;
685 } Hw6500_t;
686
687 typedef struct {
688   int    ITOPRD;
689 } Hw6504_t;
690
691 typedef struct {
692   double PDFX0;
693   double PDFPOW;
694 } Hw6506_t;
695
696
697
698
699 extern "C" {
700   void  hwigin_();
701   void  hwuinc_();
702   void  hwusta_(char * name, int);
703   void  hweini_();
704   void  hwuine_();
705   void  hwepro_();
706   void  hwbgen_();
707   void  hwdhob_();
708   void  hwcfor_();
709   void  hwcdec_();
710   void  hwdhad_();
711   void  hwdhvy_();
712   void  hwmevt_();
713   void  hwufne_();
714   void  hwefin_();
715   void  hwiodk_(int);
716 }
717
718 // JIMMY4.2
719 extern "C" {
720   void  jimmin_();
721   void  jminit_();
722   void  jmefin_();
723 }
724
725
726
727
728
729 /* THerwig6 class declaration */
730 class THerwig6 : public TGenerator {
731 //----------------------------------------------------------------------------
732 //  functions:
733 //----------------------------------------------------------------------------
734 public:
735                                 // ****** constructors and destructor
736   THerwig6();
737   THerwig6(const THerwig6 & source);
738   THerwig6 & operator=(const THerwig6 & /*source*/) {
739     Fatal("THerwig6","Assignment operator not implemented yet");
740     return *this;
741   }
742   virtual ~THerwig6();
743
744   // acces to hep common block
745   Hepevt_t*   GetHepevt        () const     { return fHepevt; }
746   int         GetNEVHEP        () const     { return fHepevt->NEVHEP; }
747   int         GetNhep          () const     { return fHepevt->NHEP; }
748   int         GetISTHEP    (int i)const     { return fHepevt->ISTHEP[i-1]; }
749   int         GetIDHEP     (int i)const     { return fHepevt->IDHEP[i-1]; }
750   int         GetJMOHEP (int i, int j) const
751     { return fHepevt->JMOHEP[i-1][j-1]; }
752   int         GetJDAHEP (int i, int j) const
753     { return fHepevt->JDAHEP[i-1][j-1]; }
754   double      GetPHEP   (int i, int j) const
755     { return fHepevt->PHEP[i-1][j-1]; }
756   double      GetVHEP   (int i, int j) const
757     { return fHepevt->VHEP[i-1][j-1]; }
758
759   // access to Herwig6 common-blocks
760   // WARNING: Some arrays start in 1, others in 0. Look up the manual!
761
762   // /HWBEAM/
763
764   Hwbeam_t*   GetHwbeam        ()           { return fHwbeam; }
765   int         GetIPART1        () const     { return fHwbeam->IPART1; }
766   int         GetIPART2        () const     { return fHwbeam->IPART2; }
767
768   // /HWBMCH/
769   Hwbmch_t*   GetHwbmch        ()           { return fHwbmch; }
770   char*       GetPART1         () const     { return fHwbmch->PART1; }
771   char*       GetPART2         () const     { return fHwbmch->PART2; }
772
773
774   // /HWPROC/
775   Hwproc_t*   GetHwproc        ()           { return fHwproc; }
776   double      GetEBEAM1        () const     { return fHwproc->EBEAM1; }
777   double      GetEBEAM2        () const     { return fHwproc->EBEAM2; }
778   double      GetPBEAM1        () const     { return fHwproc->PBEAM1; }
779   double      GetPBEAM2        () const     { return fHwproc->PBEAM2; }
780   int         GetIPROC         () const     { return fHwproc->IPROC; }
781   int         GetMAXEV         () const     { return fHwproc->MAXEV; }
782
783   // /HWPRAM/
784   Hwpram_t*   GetHwpram        ()           { return fHwpram; }
785   double      GetQCDLAM        () const     { return fHwpram->QCDLAM; }
786   void        SetQCDLAM   (double q)        { fHwpram->QCDLAM = q; }
787   double      GetVQCUT         () const     { return fHwpram->VQCUT; }
788   void        SetVQCUT    (double v)        { fHwpram->VQCUT = v; }
789   double      GetVGCUT         () const     { return fHwpram->VGCUT; }
790   void        SetVGCUT    (double v)        { fHwpram->VGCUT = v; }
791   double      GetVPCUT         () const     { return fHwpram->VPCUT; }
792   void        SetVPCUT    (double v)        { fHwpram->VPCUT = v; }
793   double      GetCLMAX         () const     { return fHwpram->CLMAX; }
794   void        SetCLMAX    (double c)        { fHwpram->CLMAX = c; }
795   double      GetCLPOW         () const     { return fHwpram->CLPOW; }
796   void        SetCLPOW    (double c)        { fHwpram->CLPOW = c; }
797   double      GetPSPLT    (int i) const     { return fHwpram->PSPLT[i-1];}
798   void        SetPSPLT    (int i, double p) { fHwpram->PSPLT[i-1] = p;}
799   double      GetQDIQK         () const     { return fHwpram->QDIQK; }
800   void        SetQDIQK    (double q)        { fHwpram->QDIQK = q; }
801   double      GetPDIQK         () const     { return fHwpram->PDIQK; }
802   void        SetPDIQK    (double p)        { fHwpram->PDIQK = p; }
803   double      GetQSPAC         () const     { return fHwpram->QSPAC; }
804   void        SetQSPAC    (double q)        { fHwpram->QSPAC = q; }
805   double      GetPTRMS         () const     { return fHwpram->PTRMS; }
806   void        SetPTRMS    (double p)        { fHwpram->PTRMS = p; }
807   double      GetENSOF         () const     { return fHwpram->ENSOF; }
808   void        SetENSOF    (double e)        { fHwpram->ENSOF = e; }
809   int         GetIPRINT        () const     { return fHwpram->IPRINT; }
810   void        SetIPRINT   (int i)           { fHwpram->IPRINT = i; }
811   int         GetMODPDF   (int i) const     { return fHwpram->MODPDF[i-1];}
812   void        SetMODPDF   (int i, int j)  { fHwpram->MODPDF[i-1] = j; }
813   int         GetNSTRU         () const     { return fHwpram->NSTRU; }
814   void        SetNSTRU    (int i)          { fHwpram->NSTRU = i; }
815
816   // /HWPRCH/
817   Hwprch_t*   GetHwprch        ()           { return fHwprch; }
818   char*       GetAUTPDF     (int i)         { return fHwprch->AUTPDF[i-1]; }
819   void        SetAUTPDF(int i,const char* s){ strncpy(fHwprch->AUTPDF[i-1],s,20);}
820   char*       GetBDECAY        ()           { return fHwprch->BDECAY; }
821
822   // /HWPART/
823   Hwpart_t*   GetHwpart        ()           { return fHwpart; }
824
825   // /HWPARP/
826   Hwparp_t*   GetHwparp        ()           { return fHwparp; }
827
828   // /HWBOSC/
829   Hwbosc_t*   GetHwbosc        ()           { return fHwbosc; }
830
831   // /HWPARC/
832   Hwparc_t*   GetHwparc        ()           { return fHwparc; }
833
834   // /HWBRCH/
835   Hwbrch_t*   GetHwbrch        ()           { return fHwbrch; }
836
837   // /HWEVNT/
838   Hwevnt_t*   GetHwevnt        ()           { return fHwevnt; }
839   double      GetAVWGT         () const     { return fHwevnt->AVWGT; }
840   int         GetMAXPR         () const     { return fHwevnt->MAXPR; }
841   void        SetMAXPR    (int i)           { fHwevnt->MAXPR = i; }
842
843   void        SetEV1PR    (int i)           { fHwevnt->EV1PR = i; }
844   void        SetEV2PR    (int i)           { fHwevnt->EV2PR = i; }
845
846   int         GetMAXER         () const     { return fHwevnt->MAXER; }
847   void        SetMAXER    (int i)           { fHwevnt->MAXER = i; }
848   int         GetNRN      (int i) const     { return fHwevnt->NRN[i-1]; }
849   void        SetNRN    (int i, int j)      { fHwevnt->NRN[i-1] = j; }
850   double      GetEVWGT         () const     { return fHwevnt->EVWGT; }
851
852   int         GetIDHW     (int i) const     { return fHwevnt->IDHW[i]; }
853
854   int         GetIERROR        () const     { return fHwevnt->IERROR; }
855
856   // /HWHARD/
857   Hwhard_t*   GetHwhard        ()           { return fHwhard; }
858   double      GetPTMIN         () const     { return fHwhard->PTMIN; }
859   void        SetPTMIN    (double d)        { fHwhard->PTMIN = d; }
860   double      GetPTPOW         () const     { return fHwhard->PTPOW; }
861   void        SetPTPOW    (double d)        { fHwhard->PTPOW = d; }
862   double      GetYJMIN         () const     { return fHwhard->YJMIN; }
863   void        SetYJMIN    (double d)        { fHwhard->YJMIN = d; }
864   double      GetYJMAX         () const     { return fHwhard->YJMAX; }
865   void        SetYJMAX    (double d)        { fHwhard->YJMAX = d; }
866   double      GetQ2MIN         () const     { return fHwhard->Q2MIN; }
867   void        SetQ2MIN    (double d)        { fHwhard->Q2MIN = d; }
868   double      GetQ2MAX         () const     { return fHwhard->Q2MAX; }
869   void        SetQ2MAX    (double d)        { fHwhard->Q2MAX = d; }
870   double      GetYBMIN         () const     { return fHwhard->YBMIN; }
871   void        SetYBMIN    (double d)        { fHwhard->YBMIN = d; }
872   double      GetYBMAX         () const     { return fHwhard->YBMAX; }
873   void        SetYBMAX    (double d)        { fHwhard->YBMAX = d; }
874   double      GetZJMAX        ()  const     { return fHwhard->ZJMAX; }
875   void        SetZJMAX    (double d)        { fHwhard->ZJMAX = d; }
876
877   // /HWPROP/
878   Hwprop_t*   GetHwprop        ()           { return fHwprop; }
879   double      GetRMASS      (int i) const   { return fHwprop->RMASS[i]; }
880   void        SetRMASS    (int i, double r) { fHwprop->RMASS[i] = r; }
881
882   // /HWUNAM/
883   Hwunam_t*   GetHwunam        ()           { return fHwunam; }
884
885   void        GetRNAME (int i, char a[9])   { for (int j=0;j<8;j++) a[j] = fHwunam->RNAME[i][j]; a[8] = '\0';}
886 /*  char*       GetRNAME(int i) { return fHwunam->RNAME[i]; }*/
887
888   // /HWUPDT/
889   Hwupdt_t*   GetHwupdt        ()           { return fHwupdt; }
890
891   // /HWUWTS/
892   Hwuwts_t*   GetHwuwts        ()           { return fHwuwts; }
893
894   // /HWUCLU/
895   Hwuclu_t*   GetHwuclu        ()           { return fHwuclu; }
896
897   // /HWDIST/
898   Hwdist_t*   GetHwdist        ()           { return fHwdist; }
899
900   // /HWQDKT/
901   Hwqdks_t*   GetHwqdkt        ()           { return fHwqdks; }
902
903   // /HWUSUD/
904   Hwusud_t*   GetHwusud        ()           { return fHwusud; }
905
906   // /HWSUSY/
907   Hwsusy_t*   GetHwsusy        ()           { return fHwsusy; }
908
909   // /HWRPAR/
910   Hwrpar_t*   GetHwrpar        ()           { return fHwrpar; }
911
912   // /HWMINB/
913   Hwminb_t*   GetHwminb        ()           { return fHwminb; }
914
915   // /HWCLUS/
916   Hwclus_t*   GetHwclus        ()           { return fHwclus; }
917
918   // Herwig6 routines
919   // the user would call
920   //   Initialize
921   //   change by himself the parameters s/he wants
922   //   Hwusta to make stable the particles s/he wants
923   //   PrepareRun
924   //   GenerateEvent as many times as wished
925   // An example is given in SetupTest
926
927   void             GenerateEvent();
928   void             Initialize(const char *beam, const char *target, double pbeam1, double pbeam2, int iproc);
929   void             InitializeJimmy(const char *beam, const char *target, double pbeam1, double pbeam2, int iproc);
930   void             PrepareRun();
931   void             PrepareRunJimmy();
932   void             OpenFortranFile(int lun, char* name);
933   void             CloseFortranFile(int lun);
934   Int_t            ImportParticles(TClonesArray *particles, Option_t *option="");
935   TObjArray       *ImportParticles(Option_t *option="");
936   TObjArray       *Particles() { return fParticles; }
937   void             Hwigin();
938   void             Hwuinc();
939   void             Hwusta(char * name);
940   void             Hweini();
941   void             Hwuine();
942   void             Hwepro();
943   void             Hwbgen();
944   void             Hwdhob();
945   void             Hwcfor();
946   void             Hwcdec();
947   void             Hwdhad();
948   void             Hwdhvy();
949   void             Hwmevt();
950   void             Hwufne();
951   void             Hwefin();
952   void             Hwiodk(int iopt);
953   void             SetupTest();
954  // Jimmy subroutines:
955   void             Jminit();
956   void             Jimmin();
957   void             Jmefin();
958 protected:
959
960   Hepevt_t* fHepevt; // Standard hep common block
961   // Herwig6 common-blocks
962   Hwbeam_t* fHwbeam; // Beams, process and number of events
963   Hwbmch_t* fHwbmch; // Beams, process and number of events
964   Hwproc_t* fHwproc; // Beams, process and number of events
965   Hwpram_t* fHwpram; // Basic parameters (and quantities derived from them)
966   Hwprch_t* fHwprch; // Basic parameters (and quantities derived from them)
967   Hwpart_t* fHwpart; // Parton shower common
968   Hwparp_t* fHwparp; // Parton polarization common
969   Hwbosc_t* fHwbosc; // Electroweak boson common
970   Hwparc_t* fHwparc; // Parton colour common
971   Hwbrch_t* fHwbrch; // Branching common
972   Hwevnt_t* fHwevnt; // Event common
973   Hwhard_t* fHwhard; // Hard subprocess common
974   Hwprop_t* fHwprop; // Particle properties
975   Hwunam_t* fHwunam; // Particle properties
976   Hwupdt_t* fHwupdt; // Particle decays
977   Hwuwts_t* fHwuwts; // Weights used in cluster decays
978   Hwuclu_t* fHwuclu; // Parameters for cluster decays
979   Hwdist_t* fHwdist; // Variables controling mixing and vertex information
980   Hwqdks_t* fHwqdks; // Arrays for temporarily storing heavy-b,c-hadrons decaying partonicaly
981   Hwusud_t* fHwusud; // Parameters for Sudakov form factors
982   Hwsusy_t* fHwsusy; // SUSY parameters
983   Hwrpar_t* fHwrpar; // R-Parity violating parameters and colours
984   Hwminb_t* fHwminb; // Parameters for minimum bias/soft underlying event
985   Hwclus_t* fHwclus; // Cluster common used by soft event routines
986   Hwgrav_t* fHwgrav;
987   Hw6202_t* fHw6202;
988   Hw6203_t* fHw6203;
989   Hw6300_t* fHw6300;
990   Hwpmrs_t* fHwpmrs;
991   Hwcirc_t* fHwcirc;
992   Hwdspb_t* fHwdspb;
993   Hwdsp2_t* fHwdsp2;
994   Hwdsp3_t* fHwdsp3;
995   Hwdsp4_t* fHwdsp4;
996   Hwdspn_t* fHwdspn;
997   Hwspin_t* fHwspin;
998   Hwstau_t* fHwstau;
999   Hwgupr_t* fHwgupr;
1000   Hw6500_t* fHw6500;
1001   Hw6504_t* fHw6504;
1002   Hw6506_t* fHw6506;
1003
1004   ClassDef(THerwig6,0)  //Interface to Herwig6.1 Event Generator
1005 };
1006
1007 #endif