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
11 Class THerwig6 is an interface to the Herwig program
13 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
27 C-----------------------------------------------------------------------
28 C matrix element corrections to top decay and Drell-Yan type processes
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-----------------------------------------------------------------------
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-----------------------------------------------------------------------
58 /* declarations from ROOT */
59 #include "TGenerator.h"
65 kHwCharmMCATNLO = -1704,
66 kHwBeautyMCATNLO = -1705,
67 kHwJetsMCATNLO = -1396
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
79 typedef struct {double dr,di;} dcpx;
81 int const NMXHEP = 4000;
88 int JMOHEP[NMXHEP][2];
89 int JDAHEP[NMXHEP][2];
90 double PHEP[NMXHEP][5];
91 double VHEP[NMXHEP][4];
204 int const NMXPAR = 500;
211 int JMOPAR[NMXPAR][2];
212 int JDAPAR[NMXPAR][2];
213 double PPAR[NMXPAR][5];
214 double VPAR[NMXPAR][4];
218 double DECPAR[NMXPAR][2];
219 double PHIPAR[NMXPAR][2];
220 double RHOPAR[NMXPAR][2];
224 int const MODMAX = 50;
231 double RHOHEP[NMXHEP][3];
237 int JCOPAR[NMXPAR][4];
345 int const NMXRES = 500;
348 double RLTIM[NMXRES+1];
349 double RMASS[NMXRES+1];
350 double RSPIN[NMXRES+1];
355 int VTOCDK[NMXRES+1];
356 int VTORDK[NMXRES+1];
357 int QORQQB[NMXRES+1];
358 int QBORQQ[NMXRES+1];
362 char RNAME[NMXRES+1][8];
363 char TXNAME[NMXRES+1][2][37];
366 int const NMXDKS = 4000;
367 int const NMXMOD = 200;
370 double BRFRAC[NMXDKS];
371 double CMMOM[NMXDKS];
372 double DKLTM[NMXRES];
374 int IDKPRD[NMXDKS][5];
386 double REPWT[5][4][4];
391 double SWTEF[NMXRES];
394 int const NMXCDK = 4000;
397 double CLDKWT[NMXCDK];
398 double CTHRPW[12][12];
428 double VTXQDK[NMXQDK][4];
434 int const NMXSUD = 1024;
438 double QEV[6][NMXSUD];
439 double SUD[6][NMXSUD];
468 double QMIXSS[2][2][6];
469 double LMIXSS[2][2][6];
483 double GHSQSS[2][2][6][4];
493 double LAMDA1[3][3][3];
494 double LAMDA2[3][3][3];
495 double LAMDA3[3][3][3];
514 int const NMXCL = 500;
517 double PPCL[NMXCL][5];
552 int const IMAXCH = 20;
556 double CHNPRB[IMAXCH];
564 int const NXMRS = 49;
565 int const NQMRS = 37;
569 double FMRS[NQMRS+1][NXMRS][NPMRS][3];
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;
588 double ABMODE[NMODEB][2];
589 double BBMODE[NMODEB][12][2];
590 double PBMODE[NMODEB][12];
591 double WTBMAX[NMODEB][12];
599 double A2MODE[NMODE2][2];
600 double P2MODE[NMODE2];
601 double WT2MAX[NMODE2];
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];
614 int I3MODE[NMODE3][NDIAGR];
615 int I3DRTP[NMODE3][NDIAGR];
619 int I3DRCF[NMODE3][NDIAGR];
623 double A4MODE[NMODE4][12][2];
624 double B4MODE[NMODE4][12][2];
625 double P4MODE[NMODE4][12][12];
626 double WT4MAX[NMODE4][12][12];
628 int I4MODE[NMODE4][2];
643 int const NMXSPN = 50;
646 dcpx MESPN[NMXSPN][NCFMAX][2][2][2][2];
647 dcpx RHOSPN[NMXSPN][2][2];
648 double SPNCFC[NMXSPN][NCFMAX][NCFMAX];
651 int JDASPN[NMXSPN][2];
667 int const MAXHRP = 100;
670 double LHWGT[MAXHRP];
671 double LHWGTS[MAXHRP];
672 double LHXSCT[MAXHRP];
673 double LHXERR[MAXHRP];
674 double LHXMAX[MAXHRP];
702 void hwusta_(char * name, int);
729 /* THerwig6 class declaration */
730 class THerwig6 : public TGenerator {
731 //----------------------------------------------------------------------------
733 //----------------------------------------------------------------------------
735 // ****** constructors and destructor
737 THerwig6(const THerwig6 & source);
738 THerwig6 & operator=(const THerwig6 & /*source*/) {
739 Fatal("THerwig6","Assignment operator not implemented yet");
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]; }
759 // access to Herwig6 common-blocks
760 // WARNING: Some arrays start in 1, others in 0. Look up the manual!
764 Hwbeam_t* GetHwbeam () { return fHwbeam; }
765 int GetIPART1 () const { return fHwbeam->IPART1; }
766 int GetIPART2 () const { return fHwbeam->IPART2; }
769 Hwbmch_t* GetHwbmch () { return fHwbmch; }
770 char* GetPART1 () const { return fHwbmch->PART1; }
771 char* GetPART2 () const { return fHwbmch->PART2; }
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; }
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; }
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; }
823 Hwpart_t* GetHwpart () { return fHwpart; }
826 Hwparp_t* GetHwparp () { return fHwparp; }
829 Hwbosc_t* GetHwbosc () { return fHwbosc; }
832 Hwparc_t* GetHwparc () { return fHwparc; }
835 Hwbrch_t* GetHwbrch () { return fHwbrch; }
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; }
843 void SetEV1PR (int i) { fHwevnt->EV1PR = i; }
844 void SetEV2PR (int i) { fHwevnt->EV2PR = i; }
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; }
852 int GetIDHW (int i) const { return fHwevnt->IDHW[i]; }
854 int GetIERROR () const { return fHwevnt->IERROR; }
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; }
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; }
883 Hwunam_t* GetHwunam () { return fHwunam; }
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]; }*/
889 Hwupdt_t* GetHwupdt () { return fHwupdt; }
892 Hwuwts_t* GetHwuwts () { return fHwuwts; }
895 Hwuclu_t* GetHwuclu () { return fHwuclu; }
898 Hwdist_t* GetHwdist () { return fHwdist; }
901 Hwqdks_t* GetHwqdkt () { return fHwqdks; }
904 Hwusud_t* GetHwusud () { return fHwusud; }
907 Hwsusy_t* GetHwsusy () { return fHwsusy; }
910 Hwrpar_t* GetHwrpar () { return fHwrpar; }
913 Hwminb_t* GetHwminb () { return fHwminb; }
916 Hwclus_t* GetHwclus () { return fHwclus; }
919 // the user would call
921 // change by himself the parameters s/he wants
922 // Hwusta to make stable the particles s/he wants
924 // GenerateEvent as many times as wished
925 // An example is given in SetupTest
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);
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; }
939 void Hwusta(char * name);
952 void Hwiodk(int iopt);
954 // Jimmy subroutines:
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
1004 ClassDef(THerwig6,0) //Interface to Herwig6.1 Event Generator