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
71 // Translation of Fortran commons from the Herwig6
72 // f77 program into c++ structures to be used in ROOT
73 // and declaration of Fortran functions as extern
74 // C functions to be called from the class Herwig6
75 // author: j. g. contreras jgcn@moni.mda.cinvestav.mx
76 // date: december 22, 2000
78 typedef struct {double dr,di;} dcpx;
80 int const NMXHEP = 4000;
87 int JMOHEP[NMXHEP][2];
88 int JDAHEP[NMXHEP][2];
89 double PHEP[NMXHEP][5];
90 double VHEP[NMXHEP][4];
203 int const NMXPAR = 500;
210 int JMOPAR[NMXPAR][2];
211 int JDAPAR[NMXPAR][2];
212 double PPAR[NMXPAR][5];
213 double VPAR[NMXPAR][4];
217 double DECPAR[NMXPAR][2];
218 double PHIPAR[NMXPAR][2];
219 double RHOPAR[NMXPAR][2];
223 int const MODMAX = 50;
230 double RHOHEP[NMXHEP][3];
236 int JCOPAR[NMXPAR][4];
344 int const NMXRES = 500;
347 double RLTIM[NMXRES+1];
348 double RMASS[NMXRES+1];
349 double RSPIN[NMXRES+1];
354 int VTOCDK[NMXRES+1];
355 int VTORDK[NMXRES+1];
356 int QORQQB[NMXRES+1];
357 int QBORQQ[NMXRES+1];
361 char RNAME[NMXRES+1][8];
362 char TXNAME[NMXRES+1][2][37];
365 int const NMXDKS = 4000;
366 int const NMXMOD = 200;
369 double BRFRAC[NMXDKS];
370 double CMMOM[NMXDKS];
371 double DKLTM[NMXRES];
373 int IDKPRD[NMXDKS][5];
385 double REPWT[5][4][4];
390 double SWTEF[NMXRES];
393 int const NMXCDK = 4000;
396 double CLDKWT[NMXCDK];
397 double CTHRPW[12][12];
427 double VTXQDK[NMXQDK][4];
433 int const NMXSUD = 1024;
437 double QEV[6][NMXSUD];
438 double SUD[6][NMXSUD];
467 double QMIXSS[2][2][6];
468 double LMIXSS[2][2][6];
482 double GHSQSS[2][2][6][4];
492 double LAMDA1[3][3][3];
493 double LAMDA2[3][3][3];
494 double LAMDA3[3][3][3];
513 int const NMXCL = 500;
516 double PPCL[NMXCL][5];
551 int const IMAXCH = 20;
555 double CHNPRB[IMAXCH];
563 int const NXMRS = 49;
564 int const NQMRS = 37;
568 double FMRS[NQMRS+1][NXMRS][NPMRS][3];
579 int const NCFMAX = 3;
580 int const NMODE2 = 500;
581 int const NMODE3 = 500;
582 int const NDIAGR = 8;
583 int const NMODEB = 50;
584 int const NMODE4 = 4;
587 double ABMODE[NMODEB][2];
588 double BBMODE[NMODEB][12][2];
589 double PBMODE[NMODEB][12];
590 double WTBMAX[NMODEB][12];
598 double A2MODE[NMODE2][2];
599 double P2MODE[NMODE2];
600 double WT2MAX[NMODE2];
607 double A3MODE[NMODE3][NDIAGR][2];
608 double B3MODE[NMODE3][NDIAGR][2];
609 double P3MODE[NMODE3];
610 double WT3MAX[NMODE3];
611 double SPN3CF[NMODE3][NCFMAX][NCFMAX];
613 int I3MODE[NMODE3][NDIAGR];
614 int I3DRTP[NMODE3][NDIAGR];
618 int I3DRCF[NMODE3][NDIAGR];
622 double A4MODE[NMODE4][12][2];
623 double B4MODE[NMODE4][12][2];
624 double P4MODE[NMODE4][12][12];
625 double WT4MAX[NMODE4][12][12];
627 int I4MODE[NMODE4][2];
642 int const NMXSPN = 50;
645 dcpx MESPN[NMXSPN][NCFMAX][2][2][2][2];
646 dcpx RHOSPN[NMXSPN][2][2];
647 double SPNCFC[NMXSPN][NCFMAX][NCFMAX];
650 int JDASPN[NMXSPN][2];
666 int const MAXHRP = 100;
669 double LHWGT[MAXHRP];
670 double LHWGTS[MAXHRP];
671 double LHXSCT[MAXHRP];
672 double LHXERR[MAXHRP];
673 double LHXMAX[MAXHRP];
701 void hwusta_(char * name, int);
722 /* THerwig6 class declaration */
723 class THerwig6 : public TGenerator {
724 //----------------------------------------------------------------------------
726 //----------------------------------------------------------------------------
728 // ****** constructors and destructor
730 THerwig6(const THerwig6 & source): TGenerator(source) {
731 Fatal("THerwig6","Copy constructor not implemented yet");
733 THerwig6 & operator=(const THerwig6 & /*source*/) {
734 Fatal("THerwig6","Assignment operator not implemented yet");
739 // acces to hep common block
740 Hepevt_t* GetHepevt () const { return fHepevt; }
741 int GetNEVHEP () const { return fHepevt->NEVHEP; }
742 int GetNhep () const { return fHepevt->NHEP; }
743 int GetISTHEP (int i)const { return fHepevt->ISTHEP[i-1]; }
744 int GetIDHEP (int i)const { return fHepevt->IDHEP[i-1]; }
745 int GetJMOHEP (int i, int j) const
746 { return fHepevt->JMOHEP[i-1][j-1]; }
747 int GetJDAHEP (int i, int j) const
748 { return fHepevt->JDAHEP[i-1][j-1]; }
749 double GetPHEP (int i, int j) const
750 { return fHepevt->PHEP[i-1][j-1]; }
751 double GetVHEP (int i, int j) const
752 { return fHepevt->VHEP[i-1][j-1]; }
754 // access to Herwig6 common-blocks
755 // WARNING: Some arrays start in 1, others in 0. Look up the manual!
759 Hwbeam_t* GetHwbeam () { return fHwbeam; }
760 int GetIPART1 () const { return fHwbeam->IPART1; }
761 int GetIPART2 () const { return fHwbeam->IPART2; }
764 Hwbmch_t* GetHwbmch () { return fHwbmch; }
765 char* GetPART1 () const { return fHwbmch->PART1; }
766 char* GetPART2 () const { return fHwbmch->PART2; }
770 Hwproc_t* GetHwproc () { return fHwproc; }
771 double GetEBEAM1 () const { return fHwproc->EBEAM1; }
772 double GetEBEAM2 () const { return fHwproc->EBEAM2; }
773 double GetPBEAM1 () const { return fHwproc->PBEAM1; }
774 double GetPBEAM2 () const { return fHwproc->PBEAM2; }
775 int GetIPROC () const { return fHwproc->IPROC; }
776 int GetMAXEV () const { return fHwproc->MAXEV; }
779 Hwpram_t* GetHwpram () { return fHwpram; }
780 double GetQCDLAM () const { return fHwpram->QCDLAM; }
781 void SetQCDLAM (double q) { fHwpram->QCDLAM = q; }
782 double GetVQCUT () const { return fHwpram->VQCUT; }
783 void SetVQCUT (double v) { fHwpram->VQCUT = v; }
784 double GetVGCUT () const { return fHwpram->VGCUT; }
785 void SetVGCUT (double v) { fHwpram->VGCUT = v; }
786 double GetVPCUT () const { return fHwpram->VPCUT; }
787 void SetVPCUT (double v) { fHwpram->VPCUT = v; }
788 double GetCLMAX () const { return fHwpram->CLMAX; }
789 void SetCLMAX (double c) { fHwpram->CLMAX = c; }
790 double GetCLPOW () const { return fHwpram->CLPOW; }
791 void SetCLPOW (double c) { fHwpram->CLPOW = c; }
792 double GetPSPLT (int i) const { return fHwpram->PSPLT[i-1];}
793 void SetPSPLT (int i, double p) { fHwpram->PSPLT[i-1] = p;}
794 double GetQDIQK () const { return fHwpram->QDIQK; }
795 void SetQDIQK (double q) { fHwpram->QDIQK = q; }
796 double GetPDIQK () const { return fHwpram->PDIQK; }
797 void SetPDIQK (double p) { fHwpram->PDIQK = p; }
798 double GetQSPAC () const { return fHwpram->QSPAC; }
799 void SetQSPAC (double q) { fHwpram->QSPAC = q; }
800 double GetPTRMS () const { return fHwpram->PTRMS; }
801 void SetPTRMS (double p) { fHwpram->PTRMS = p; }
802 double GetENSOF () const { return fHwpram->ENSOF; }
803 void SetENSOF (double e) { fHwpram->ENSOF = e; }
804 int GetIPRINT () const { return fHwpram->IPRINT; }
805 void SetIPRINT (int i) { fHwpram->IPRINT = i; }
806 int GetMODPDF (int i) const { return fHwpram->MODPDF[i-1];}
807 void SetMODPDF (int i, int j) { fHwpram->MODPDF[i-1] = j; }
808 int GetNSTRU () const { return fHwpram->NSTRU; }
809 void SetNSTRU (int i) { fHwpram->NSTRU = i; }
812 Hwprch_t* GetHwprch () { return fHwprch; }
813 char* GetAUTPDF (int i) { return fHwprch->AUTPDF[i-1]; }
814 void SetAUTPDF(int i,const char* s){ strncpy(fHwprch->AUTPDF[i-1],s,20);}
815 char* GetBDECAY () { return fHwprch->BDECAY; }
818 Hwpart_t* GetHwpart () { return fHwpart; }
821 Hwparp_t* GetHwparp () { return fHwparp; }
824 Hwbosc_t* GetHwbosc () { return fHwbosc; }
827 Hwparc_t* GetHwparc () { return fHwparc; }
830 Hwbrch_t* GetHwbrch () { return fHwbrch; }
833 Hwevnt_t* GetHwevnt () { return fHwevnt; }
834 double GetAVWGT () const { return fHwevnt->AVWGT; }
835 int GetMAXPR () const { return fHwevnt->MAXPR; }
836 void SetMAXPR (int i) { fHwevnt->MAXPR = i; }
838 void SetEV1PR (int i) { fHwevnt->EV1PR = i; }
839 void SetEV2PR (int i) { fHwevnt->EV2PR = i; }
841 int GetMAXER () const { return fHwevnt->MAXER; }
842 void SetMAXER (int i) { fHwevnt->MAXER = i; }
843 int GetNRN (int i) const { return fHwevnt->NRN[i-1]; }
844 void SetNRN (int i, int j) { fHwevnt->NRN[i-1] = j; }
845 double GetEVWGT () const { return fHwevnt->EVWGT; }
847 int GetIDHW (int i) const { return fHwevnt->IDHW[i]; }
849 int GetIERROR () const { return fHwevnt->IERROR; }
852 Hwhard_t* GetHwhard () { return fHwhard; }
853 double GetPTMIN () const { return fHwhard->PTMIN; }
854 void SetPTMIN (double d) { fHwhard->PTMIN = d; }
855 double GetPTPOW () const { return fHwhard->PTPOW; }
856 void SetPTPOW (double d) { fHwhard->PTPOW = d; }
857 double GetYJMIN () const { return fHwhard->YJMIN; }
858 void SetYJMIN (double d) { fHwhard->YJMIN = d; }
859 double GetYJMAX () const { return fHwhard->YJMAX; }
860 void SetYJMAX (double d) { fHwhard->YJMAX = d; }
861 double GetQ2MIN () const { return fHwhard->Q2MIN; }
862 void SetQ2MIN (double d) { fHwhard->Q2MIN = d; }
863 double GetQ2MAX () const { return fHwhard->Q2MAX; }
864 void SetQ2MAX (double d) { fHwhard->Q2MAX = d; }
865 double GetYBMIN () const { return fHwhard->YBMIN; }
866 void SetYBMIN (double d) { fHwhard->YBMIN = d; }
867 double GetYBMAX () const { return fHwhard->YBMAX; }
868 void SetYBMAX (double d) { fHwhard->YBMAX = d; }
869 double GetZJMAX () const { return fHwhard->ZJMAX; }
870 void SetZJMAX (double d) { fHwhard->ZJMAX = d; }
873 Hwprop_t* GetHwprop () { return fHwprop; }
874 double GetRMASS (int i) const { return fHwprop->RMASS[i]; }
875 void SetRMASS (int i, double r) { fHwprop->RMASS[i] = r; }
878 Hwunam_t* GetHwunam () { return fHwunam; }
880 void GetRNAME (int i, char a[9]) { for (int j=0;j<8;j++) a[j] = fHwunam->RNAME[i][j]; a[8] = '\0';}
881 /* char* GetRNAME(int i) { return fHwunam->RNAME[i]; }*/
884 Hwupdt_t* GetHwupdt () { return fHwupdt; }
887 Hwuwts_t* GetHwuwts () { return fHwuwts; }
890 Hwuclu_t* GetHwuclu () { return fHwuclu; }
893 Hwdist_t* GetHwdist () { return fHwdist; }
896 Hwqdks_t* GetHwqdkt () { return fHwqdks; }
899 Hwusud_t* GetHwusud () { return fHwusud; }
902 Hwsusy_t* GetHwsusy () { return fHwsusy; }
905 Hwrpar_t* GetHwrpar () { return fHwrpar; }
908 Hwminb_t* GetHwminb () { return fHwminb; }
911 Hwclus_t* GetHwclus () { return fHwclus; }
914 // the user would call
916 // change by himself the parameters s/he wants
917 // Hwusta to make stable the particles s/he wants
919 // GenerateEvent as many times as wished
920 // An example is given in SetupTest
922 void GenerateEvent();
923 void Initialize(const char *beam, const char *target, double pbeam1, double pbeam2, int iproc);
925 void OpenFortranFile(int lun, char* name);
926 void CloseFortranFile(int lun);
927 Int_t ImportParticles(TClonesArray *particles, Option_t *option="");
928 TObjArray *ImportParticles(Option_t *option="");
929 TObjArray *Particles() { return fParticles; }
932 void Hwusta(char * name);
945 void Hwiodk(int iopt);
949 Hepevt_t* fHepevt; // Standard hep common block
950 // Herwig6 common-blocks
951 Hwbeam_t* fHwbeam; // Beams, process and number of events
952 Hwbmch_t* fHwbmch; // Beams, process and number of events
953 Hwproc_t* fHwproc; // Beams, process and number of events
954 Hwpram_t* fHwpram; // Basic parameters (and quantities derived from them)
955 Hwprch_t* fHwprch; // Basic parameters (and quantities derived from them)
956 Hwpart_t* fHwpart; // Parton shower common
957 Hwparp_t* fHwparp; // Parton polarization common
958 Hwbosc_t* fHwbosc; // Electroweak boson common
959 Hwparc_t* fHwparc; // Parton colour common
960 Hwbrch_t* fHwbrch; // Branching common
961 Hwevnt_t* fHwevnt; // Event common
962 Hwhard_t* fHwhard; // Hard subprocess common
963 Hwprop_t* fHwprop; // Particle properties
964 Hwunam_t* fHwunam; // Particle properties
965 Hwupdt_t* fHwupdt; // Particle decays
966 Hwuwts_t* fHwuwts; // Weights used in cluster decays
967 Hwuclu_t* fHwuclu; // Parameters for cluster decays
968 Hwdist_t* fHwdist; // Variables controling mixing and vertex information
969 Hwqdks_t* fHwqdks; // Arrays for temporarily storing heavy-b,c-hadrons decaying partonicaly
970 Hwusud_t* fHwusud; // Parameters for Sudakov form factors
971 Hwsusy_t* fHwsusy; // SUSY parameters
972 Hwrpar_t* fHwrpar; // R-Parity violating parameters and colours
973 Hwminb_t* fHwminb; // Parameters for minimum bias/soft underlying event
974 Hwclus_t* fHwclus; // Cluster common used by soft event routines
993 ClassDef(THerwig6,0) //Interface to Herwig6.1 Event Generator