Merge lp:~maddevelopers/mg5amcnlo/release_candidate into lp:~madteam/mg5amcnlo/trunk

Proposed by Johan Alwall
Status: Merged
Merged at revision: 105
Proposed branch: lp:~maddevelopers/mg5amcnlo/release_candidate
Merge into: lp:~madteam/mg5amcnlo/trunk
Diff against target: 171143 lines (+157699/-4638)
610 files modified
.bzrignore (+1/-0)
DECAY/DECAYVersion.txt (+1/-0)
DECAY/README (+13/-0)
DECAY/UpdateNotes.txt (+48/-0)
DECAY/alfas.inc (+11/-0)
DECAY/alfas_functions.f (+280/-0)
DECAY/calc_values.inc (+17/-0)
DECAY/coupl.inc (+50/-0)
DECAY/decay.f (+1613/-0)
DECAY/decay.inc (+105/-0)
DECAY/decay_couplings.f (+725/-0)
DECAY/decay_event.f (+2537/-0)
DECAY/decay_matrix.f (+651/-0)
DECAY/decay_mom.f (+468/-0)
DECAY/decay_printout.f (+123/-0)
DECAY/hdecay.f (+1991/-0)
DECAY/makefile (+11/-0)
DECAY/open_file.f (+46/-0)
DECAY/ran1.f (+33/-0)
DECAY/run.inc (+33/-0)
DECAY/rw_events.f (+159/-0)
DECAY/vegas.f (+247/-0)
HELAS/HELASVersion.txt (+1/-0)
HELAS/Makefile (+123/-0)
HELAS/Makefile.template (+123/-0)
HELAS/README (+24/-0)
HELAS/boostx.F (+85/-0)
HELAS/dimension.inc (+31/-0)
HELAS/eaixxx.F (+119/-0)
HELAS/eaoxxx.F (+117/-0)
HELAS/ficxxx.f (+25/-0)
HELAS/focxxx.f (+25/-0)
HELAS/fsicxx.f (+46/-0)
HELAS/fsigld.f (+71/-0)
HELAS/fsixxx.F (+98/-0)
HELAS/fsocxx.f (+46/-0)
HELAS/fsogld.f (+71/-0)
HELAS/fsoxxx.F (+98/-0)
HELAS/ftixkk.F (+129/-0)
HELAS/ftixxx.F (+151/-0)
HELAS/ftoxkk.F (+129/-0)
HELAS/ftoxxx.F (+195/-0)
HELAS/fvicxx.f (+66/-0)
HELAS/fvidmx.F (+141/-0)
HELAS/fvigld.f (+104/-0)
HELAS/fvigox.f (+71/-0)
HELAS/fvixxx.F (+118/-0)
HELAS/fvocxx.f (+66/-0)
HELAS/fvodmx.F (+141/-0)
HELAS/fvogld.f (+104/-0)
HELAS/fvogox.f (+66/-0)
HELAS/fvoxxx.F (+119/-0)
HELAS/fvtikk.F (+127/-0)
HELAS/fvtixx.F (+201/-0)
HELAS/fvtokk.F (+127/-0)
HELAS/fvtoxx.F (+189/-0)
HELAS/ggggtx.F (+126/-0)
HELAS/ggggxx.F (+144/-0)
HELAS/gggxxx.F (+126/-0)
HELAS/hiocxx.f (+38/-0)
HELAS/hiogld.f (+68/-0)
HELAS/hioxxx.F (+91/-0)
HELAS/hsssxx.F (+96/-0)
HELAS/hsstxx.F (+56/-0)
HELAS/hssxxx.F (+88/-0)
HELAS/hstlxx.F (+39/-0)
HELAS/hstxxx.F (+103/-0)
HELAS/httaxx.F (+74/-0)
HELAS/httcxx.F (+102/-0)
HELAS/httsxx.F (+80/-0)
HELAS/httxxx.F (+74/-0)
HELAS/hvsxxx.F (+117/-0)
HELAS/hvvhxx.F (+93/-0)
HELAS/hvvshx.F (+90/-0)
HELAS/hvvsxx.F (+97/-0)
HELAS/hvvtxx.F (+57/-0)
HELAS/hvvvxx.F (+109/-0)
HELAS/hvvxxx.F (+89/-0)
HELAS/ioscxx.f (+25/-0)
HELAS/iosgld.f (+58/-0)
HELAS/iosxxx.F (+83/-0)
HELAS/iotxkk.F (+88/-0)
HELAS/iotxxx.F (+111/-0)
HELAS/iovcxx.f (+38/-0)
HELAS/iovdmx.F (+124/-0)
HELAS/iovgld.f (+78/-0)
HELAS/iovgox.f (+37/-0)
HELAS/iovkxx.F (+91/-0)
HELAS/iovtkk.F (+100/-0)
HELAS/iovtxx.F (+90/-0)
HELAS/iovxxx.F (+93/-0)
HELAS/ixxxxx.F (+134/-0)
HELAS/j3xxxx.F (+167/-0)
HELAS/jeexxx.F (+137/-0)
HELAS/jgggtx.F (+191/-0)
HELAS/jgggxx.F (+121/-0)
HELAS/jggxxx.F (+82/-0)
HELAS/jiocxx.f (+96/-0)
HELAS/jiodmx.F (+174/-0)
HELAS/jiogld.f (+147/-0)
HELAS/jiogox.f (+96/-0)
HELAS/jiokxx.F (+107/-0)
HELAS/jiotxx.F (+335/-0)
HELAS/jioxxx.F (+148/-0)
HELAS/jssxxx.F (+151/-0)
HELAS/jvshxx.F (+93/-0)
HELAS/jvsshx.F (+78/-0)
HELAS/jvssxx.F (+128/-0)
HELAS/jvstxx.F (+79/-0)
HELAS/jvsxxx.F (+118/-0)
HELAS/jvtaxx.F (+75/-0)
HELAS/jvtcxx.F (+69/-0)
HELAS/jvtxxx.F (+200/-0)
HELAS/jvvkxx.F (+136/-0)
HELAS/jvvsxx.F (+110/-0)
HELAS/jvvtlx.F (+108/-0)
HELAS/jvvtxx.F (+290/-0)
HELAS/jvvxxx.F (+154/-0)
HELAS/jw3wnx.F (+233/-0)
HELAS/jw3wxx.F (+221/-0)
HELAS/jwwwnx.F (+198/-0)
HELAS/jwwwxx.F (+177/-0)
HELAS/mom2cx.F (+80/-0)
HELAS/momntx.F (+74/-0)
HELAS/oxxxxx.F (+136/-0)
HELAS/pxxxxx.F (+36/-0)
HELAS/rotxxx.F (+66/-0)
HELAS/ssssxx.F (+95/-0)
HELAS/ssstxx.F (+55/-0)
HELAS/sssxxx.F (+81/-0)
HELAS/sstlxx.F (+24/-0)
HELAS/sstxxx.F (+94/-0)
HELAS/sxxxxx.F (+57/-0)
HELAS/t2xxxx.f (+79/-0)
HELAS/tpsxxx.F (+105/-0)
HELAS/ttsaxx.F (+63/-0)
HELAS/ttscxx.F (+93/-0)
HELAS/ttssxx.F (+66/-0)
HELAS/ttsxxx.F (+63/-0)
HELAS/tttxxx.F (+231/-0)
HELAS/txxxx2.f (+60/-0)
HELAS/txxxxx.f (+168/-0)
HELAS/uggggx.F (+177/-0)
HELAS/uiovxx.F (+345/-0)
HELAS/uioxxx.F (+384/-0)
HELAS/upsxxx.F (+85/-0)
HELAS/usslxx.F (+33/-0)
HELAS/ussxxx.F (+114/-0)
HELAS/utsaxx.F (+81/-0)
HELAS/utscxx.F (+140/-0)
HELAS/utssxx.F (+82/-0)
HELAS/utsxxx.F (+81/-0)
HELAS/uttAxx.F (+400/-0)
HELAS/uttBxx.F (+834/-0)
HELAS/uvvaxx.F (+59/-0)
HELAS/uvvcxx.F (+57/-0)
HELAS/uvvvlx.F (+101/-0)
HELAS/uvvvxx.F (+227/-0)
HELAS/uvvxxx.F (+209/-0)
HELAS/v2xxxx.f (+40/-0)
HELAS/vssxxx.F (+102/-0)
HELAS/vvshxx.F (+76/-0)
HELAS/vvsshx.F (+76/-0)
HELAS/vvssxx.F (+97/-0)
HELAS/vvstxx.F (+59/-0)
HELAS/vvsxxx.F (+82/-0)
HELAS/vvtaxx.F (+57/-0)
HELAS/vvtcxx.F (+63/-0)
HELAS/vvtxkk.F (+112/-0)
HELAS/vvtxxx.F (+150/-0)
HELAS/vvvkxx.F (+113/-0)
HELAS/vvvsxx.F (+93/-0)
HELAS/vvvtlx.F (+91/-0)
HELAS/vvvtxx.F (+184/-0)
HELAS/vvvxxx.F (+126/-0)
HELAS/vxxxxx.F (+143/-0)
HELAS/w3w3nx.F (+182/-0)
HELAS/w3w3xx.F (+163/-0)
HELAS/wwwwnx.F (+163/-0)
HELAS/wwwwxx.F (+141/-0)
Template/Cards/README (+13/-0)
Template/Cards/delphes_card_ATLAS.dat (+135/-0)
Template/Cards/delphes_card_CMS.dat (+135/-0)
Template/Cards/delphes_card_default.dat (+135/-0)
Template/Cards/delphes_trigger.dat (+20/-0)
Template/Cards/delphes_trigger_ATLAS.dat (+16/-0)
Template/Cards/delphes_trigger_CMS.dat (+20/-0)
Template/Cards/grid_card.dat (+32/-0)
Template/Cards/grid_card_default.dat (+32/-0)
Template/Cards/param_card.dat (+63/-0)
Template/Cards/param_card_default.dat (+71/-0)
Template/Cards/pgs_card_ATLAS.dat (+23/-0)
Template/Cards/pgs_card_CMS.dat (+23/-0)
Template/Cards/pgs_card_LHC.dat (+23/-0)
Template/Cards/pgs_card_TEV.dat (+23/-0)
Template/Cards/pgs_card_default.dat (+23/-0)
Template/Cards/plot_card.dat (+203/-0)
Template/Cards/plot_card_default.dat (+192/-0)
Template/Cards/proc_card_mg5.dat (+36/-0)
Template/Cards/pythia_card_default.dat (+12/-0)
Template/Cards/replace_card1.dat (+4/-0)
Template/Cards/run_card.dat (+198/-0)
Template/Cards/run_card_default.dat (+198/-0)
Template/Events/banner_header.txt (+31/-0)
Template/HTML/info-default.html (+13/-0)
Template/README (+69/-0)
Template/Source/CERNLIB/abend.f (+19/-0)
Template/Source/CERNLIB/dlsqp2.f (+69/-0)
Template/Source/CERNLIB/lenocc.f (+30/-0)
Template/Source/CERNLIB/makefile (+16/-0)
Template/Source/CERNLIB/makefile_dynamic (+15/-0)
Template/Source/CERNLIB/mtlprt.f (+30/-0)
Template/Source/CERNLIB/mtlset.f (+197/-0)
Template/Source/CERNLIB/radmul.f (+207/-0)
Template/Source/DHELAS/Makefile_dynamic (+115/-0)
Template/Source/PDF/Ctq4Fn.f (+122/-0)
Template/Source/PDF/Ctq5Par.f (+711/-0)
Template/Source/PDF/Ctq5Pdf.f (+344/-0)
Template/Source/PDF/Ctq6Pdf.f (+480/-0)
Template/Source/PDF/Partonx5.f (+94/-0)
Template/Source/PDF/PhotonFlux.f (+87/-0)
Template/Source/PDF/cteq3.f (+498/-0)
Template/Source/PDF/jeppe02.f (+160/-0)
Template/Source/PDF/makefile (+24/-0)
Template/Source/PDF/makefile_dlhapdf (+21/-0)
Template/Source/PDF/makefile_dynamic (+23/-0)
Template/Source/PDF/makefile_lhapdf (+22/-0)
Template/Source/PDF/mrs98.f (+506/-0)
Template/Source/PDF/mrs98ht.f (+133/-0)
Template/Source/PDF/mrs98lo.f (+508/-0)
Template/Source/PDF/mrs99.f (+1166/-0)
Template/Source/PDF/mrst2001.f (+513/-0)
Template/Source/PDF/mrst2002.f (+264/-0)
Template/Source/PDF/opendata.f (+61/-0)
Template/Source/PDF/pdf.f (+304/-0)
Template/Source/PDF/pdf.inc (+11/-0)
Template/Source/PDF/pdf_lhapdf.f (+34/-0)
Template/Source/PDF/pdf_list.txt (+75/-0)
Template/Source/PDF/pdfwrap.f (+264/-0)
Template/Source/PDF/pdfwrap_lhapdf.f (+61/-0)
Template/Source/PDF/pdg2pdf.f (+152/-0)
Template/Source/PDF/pdg2pdf_lhapdf.f (+35/-0)
Template/Source/alfas.inc (+11/-0)
Template/Source/alfas_functions.f (+280/-0)
Template/Source/alfas_functions_lhapdf.f (+158/-0)
Template/Source/banner.f (+120/-0)
Template/Source/basecode.f (+127/-0)
Template/Source/combine_events.f (+776/-0)
Template/Source/combine_runs.f (+455/-0)
Template/Source/cuts.inc (+67/-0)
Template/Source/dgauss.f (+87/-0)
Template/Source/dsample.f (+2285/-0)
Template/Source/gen_ximprove.f (+984/-0)
Template/Source/genps.inc (+34/-0)
Template/Source/gensudgrid.f (+124/-0)
Template/Source/getissud.f (+201/-0)
Template/Source/hbook.inc (+17/-0)
Template/Source/hbook1.f (+36/-0)
Template/Source/hbook2.f (+35/-0)
Template/Source/hcurve.f (+74/-0)
Template/Source/hfill.f (+37/-0)
Template/Source/htuple.f (+243/-0)
Template/Source/invarients.f (+303/-0)
Template/Source/is-sud.f (+235/-0)
Template/Source/kin_functions.f (+691/-0)
Template/Source/makefile (+104/-0)
Template/Source/makefile_dlhapdf (+82/-0)
Template/Source/makefile_dynamic (+82/-0)
Template/Source/makefile_lhapdf (+93/-0)
Template/Source/maxconfigs.inc (+2/-0)
Template/Source/open_file.f (+46/-0)
Template/Source/pawgraphs.f (+83/-0)
Template/Source/pdf.inc (+17/-0)
Template/Source/psample.inc (+9/-0)
Template/Source/ran1.f (+33/-0)
Template/Source/ranmar.f (+241/-0)
Template/Source/readgrid.f (+135/-0)
Template/Source/run.inc (+33/-0)
Template/Source/run_config.inc (+56/-0)
Template/Source/run_printout.f (+64/-0)
Template/Source/rw_events.f (+159/-0)
Template/Source/rw_events.short.f (+162/-0)
Template/Source/rw_routines.f (+420/-0)
Template/Source/scale_events.f (+150/-0)
Template/Source/select_events.f (+300/-0)
Template/Source/setrun.f (+480/-0)
Template/Source/setrun_gen.f (+91/-0)
Template/Source/sudgrid.inc (+4/-0)
Template/Source/sum.f (+55/-0)
Template/Source/sum_html.f (+800/-0)
Template/Source/transpole.f (+301/-0)
Template/Source/write_banner.f (+116/-0)
Template/SubProcesses/addmothers.f (+298/-0)
Template/SubProcesses/check_dip.f (+537/-0)
Template/SubProcesses/check_intdip.f (+401/-0)
Template/SubProcesses/check_sa.f (+439/-0)
Template/SubProcesses/cluster.f (+844/-0)
Template/SubProcesses/cluster.inc (+35/-0)
Template/SubProcesses/cuts.f (+663/-0)
Template/SubProcesses/dipole.inc (+47/-0)
Template/SubProcesses/dipolesub.f (+408/-0)
Template/SubProcesses/driver.f (+288/-0)
Template/SubProcesses/epsterms.f (+228/-0)
Template/SubProcesses/finiteterms.f (+845/-0)
Template/SubProcesses/genps.f (+1105/-0)
Template/SubProcesses/initcluster.f (+61/-0)
Template/SubProcesses/makefile (+51/-0)
Template/SubProcesses/makefile_dip (+19/-0)
Template/SubProcesses/makefile_dlhapdf (+39/-0)
Template/SubProcesses/makefile_dynamic (+40/-0)
Template/SubProcesses/makefile_lhapdf (+50/-0)
Template/SubProcesses/makefile_mo (+42/-0)
Template/SubProcesses/makefile_mo_dlhapdf (+42/-0)
Template/SubProcesses/makefile_mo_lhapdf (+43/-0)
Template/SubProcesses/makefile_sa (+15/-0)
Template/SubProcesses/message.inc (+2/-0)
Template/SubProcesses/myamp.f (+518/-0)
Template/SubProcesses/projection.f (+2046/-0)
Template/SubProcesses/randinit (+1/-0)
Template/SubProcesses/reweight.f (+895/-0)
Template/SubProcesses/setcuts.f (+520/-0)
Template/SubProcesses/setscales.f (+175/-0)
Template/SubProcesses/shrinktops.f (+552/-0)
Template/SubProcesses/status (+1/-0)
Template/SubProcesses/subproc.txt (+1/-0)
Template/SubProcesses/sudakov.inc (+18/-0)
Template/SubProcesses/symmetry.f (+600/-0)
Template/SubProcesses/symmetry_v4.f (+835/-0)
Template/SubProcesses/transform.f (+295/-0)
Template/SubProcesses/transformint.f (+28/-0)
Template/SubProcesses/unwgt.f (+673/-0)
Template/TemplateVersion.txt (+1/-0)
Template/bin/Passto_g77.py (+90/-0)
Template/bin/Passto_gfortran.py (+96/-0)
Template/bin/TheChopper-pl (+118/-0)
Template/bin/addmasses.py (+320/-0)
Template/bin/calculate_crossx (+140/-0)
Template/bin/clean (+44/-0)
Template/bin/clean4grid (+95/-0)
Template/bin/clean_template (+102/-0)
Template/bin/cleanall (+80/-0)
Template/bin/compile (+188/-0)
Template/bin/cpall (+4/-0)
Template/bin/extract_banner-pl (+30/-0)
Template/bin/gen_cardhtml-pl (+375/-0)
Template/bin/gen_crossxhtml-pl (+399/-0)
Template/bin/gen_jpeg-pl (+84/-0)
Template/bin/generate_events (+402/-0)
Template/bin/gridrun (+246/-0)
Template/bin/makefile_gridpack (+27/-0)
Template/bin/merge.pl (+277/-0)
Template/bin/mod_file.py (+826/-0)
Template/bin/monitor (+43/-0)
Template/bin/multi_run (+124/-0)
Template/bin/multicore (+22/-0)
Template/bin/newprocess_mg5 (+107/-0)
Template/bin/plot (+70/-0)
Template/bin/plot_page-pl (+87/-0)
Template/bin/plot_pypage-pl (+72/-0)
Template/bin/put_banner (+104/-0)
Template/bin/qdeljob (+13/-0)
Template/bin/qholdjob (+25/-0)
Template/bin/qrlsjob (+25/-0)
Template/bin/qsub (+3/-0)
Template/bin/refine (+164/-0)
Template/bin/refine4grid (+116/-0)
Template/bin/remove (+60/-0)
Template/bin/replace.pl (+187/-0)
Template/bin/restore_data (+64/-0)
Template/bin/rmrun (+53/-0)
Template/bin/run.sh (+107/-0)
Template/bin/run_combine (+30/-0)
Template/bin/run_delphes (+94/-0)
Template/bin/run_genissud (+87/-0)
Template/bin/run_hep2lhe (+91/-0)
Template/bin/run_pgs (+107/-0)
Template/bin/run_plot (+47/-0)
Template/bin/run_plot_delphes (+46/-0)
Template/bin/run_plot_pgs (+47/-0)
Template/bin/run_plot_pythia (+50/-0)
Template/bin/run_pythia (+115/-0)
Template/bin/setup_model-pl (+126/-0)
Template/bin/split_banner.pl (+166/-0)
Template/bin/standalone (+56/-0)
Template/bin/store (+178/-0)
Template/bin/store4grid (+145/-0)
Template/bin/sumall (+29/-0)
Template/bin/survey (+150/-0)
Template/index.html (+64/-0)
Template/lib/Pdfdata/cteq5l.tbl (+1849/-0)
Template/lib/Pdfdata/cteq5m.tbl (+1728/-0)
Template/lib/Pdfdata/cteq6d.tbl (+3102/-0)
Template/lib/Pdfdata/cteq6l.tbl (+3102/-0)
Template/lib/Pdfdata/cteq6l1.tbl (+3102/-0)
Template/lib/Pdfdata/cteq6m.tbl (+3102/-0)
Template/lib/Pdfdata/mrsb.dat (+874/-0)
Template/lib/Pdfdata/mrse.dat (+874/-0)
Template/lib/Pdfdata/mrst2002nlo.dat (+1776/-0)
Template/makefile (+27/-0)
aloha/aloha_lib.py (+73/-34)
aloha/aloha_object.py (+24/-19)
aloha/aloha_writers.py (+12/-15)
aloha/bin/aloha (+61/-0)
aloha/create_aloha.py (+110/-39)
aloha/template_files/Makefile_F (+1/-1)
bin/create_aloha_release.py (+164/-0)
bin/create_release.py (+9/-126)
bin/mg5 (+66/-61)
bin/setup_madevent_template.py (+0/-222)
input/mg5_configuration.txt (+23/-0)
input/multiparticles_default.txt (+4/-4)
madgraph/VERSION (+2/-4)
madgraph/__init__.py (+1/-12)
madgraph/core/base_objects.py (+3/-3)
madgraph/core/diagram_generation.py (+95/-26)
madgraph/core/helas_objects.py (+168/-111)
madgraph/interface/cmd_interface.py (+580/-364)
madgraph/interface/extended_cmd.py (+59/-14)
madgraph/interface/launch_ext_program.py (+167/-26)
madgraph/interface/tutorial_text.py (+1/-0)
madgraph/iolibs/export_cpp.py (+489/-144)
madgraph/iolibs/export_python.py (+72/-1)
madgraph/iolibs/export_v4.py (+2224/-1495)
madgraph/iolibs/file_writers.py (+10/-1)
madgraph/iolibs/gen_infohtml.py (+261/-0)
madgraph/iolibs/group_subprocs.py (+640/-0)
madgraph/iolibs/helas_call_writers.py (+50/-2)
madgraph/iolibs/import_v4.py (+2/-2)
madgraph/iolibs/misc.py (+1/-1)
madgraph/iolibs/template_files/Makefile_sa_cpp_src (+1/-1)
madgraph/iolibs/template_files/auto_dsig_v4.inc (+31/-16)
madgraph/iolibs/template_files/cpp_hel_amps_cc.inc (+1/-1)
madgraph/iolibs/template_files/cpp_hel_amps_h.inc (+3/-3)
madgraph/iolibs/template_files/cpp_process_cc.inc (+2/-2)
madgraph/iolibs/template_files/cpp_process_h.inc (+1/-1)
madgraph/iolibs/template_files/cpp_process_sigmaKin_function.inc (+9/-2)
madgraph/iolibs/template_files/matrix_madevent_v4.inc (+52/-53)
madgraph/iolibs/template_files/matrix_method_python.inc (+5/-1)
madgraph/iolibs/template_files/pythia8_main_example_cc.inc (+71/-0)
madgraph/iolibs/template_files/pythia8_main_makefile.inc (+39/-0)
madgraph/iolibs/template_files/pythia8_makefile.inc (+107/-0)
madgraph/iolibs/template_files/pythia8_model_parameters_cc.inc (+4/-7)
madgraph/iolibs/template_files/pythia8_model_parameters_h.inc (+5/-6)
madgraph/iolibs/template_files/pythia8_process_cc.inc (+1/-1)
madgraph/iolibs/template_files/pythia8_process_function_definitions.inc (+4/-4)
madgraph/iolibs/template_files/pythia8_process_sigmaKin_function.inc (+11/-3)
madgraph/iolibs/template_files/pythia8_process_wavefunctions.inc (+1/-1)
madgraph/iolibs/template_files/read_slha.cc (+2/-2)
madgraph/iolibs/template_files/read_slha.h (+3/-3)
madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc (+294/-0)
madgraph/iolibs/ufo_expression_parsers.py (+1/-0)
madgraph/various/diagram_symmetry.py (+302/-0)
madgraph/various/process_checks.py (+305/-251)
madgraph/various/rambo.py (+1/-1)
models/2HDM/2HDM_UFO.log (+64/-0)
models/2HDM/__init__.py (+20/-0)
models/2HDM/couplings.py (+1279/-0)
models/2HDM/function_library.py (+54/-0)
models/2HDM/lorentz.py (+83/-0)
models/2HDM/object_library.py (+232/-0)
models/2HDM/parameters.py (+1273/-0)
models/2HDM/particles.py (+297/-0)
models/2HDM/vertices.py (+1367/-0)
models/2HDM/write_param_card.py (+145/-0)
models/4Gen/4th_Generation_Complex_CKM_UFO.log (+68/-0)
models/4Gen/__init__.py (+20/-0)
models/4Gen/couplings.py (+271/-0)
models/4Gen/function_library.py (+54/-0)
models/4Gen/lorentz.py (+71/-0)
models/4Gen/object_library.py (+232/-0)
models/4Gen/parameters.py (+671/-0)
models/4Gen/particles.py (+286/-0)
models/4Gen/vertices.py (+575/-0)
models/4Gen/write_param_card.py (+181/-0)
models/RS/RS_UFO.log (+68/-0)
models/RS/__init__.py (+20/-0)
models/RS/couplings.py (+479/-0)
models/RS/function_library.py (+54/-0)
models/RS/lorentz.py (+175/-0)
models/RS/model.pkl (+13743/-0)
models/RS/object_library.py (+228/-0)
models/RS/parameters.py (+361/-0)
models/RS/particles.py (+373/-0)
models/RS/vertices.py (+1001/-0)
models/RS/write_param_card.py (+181/-0)
models/SMScalars/SM_Plus_Scalars_UFO.log (+72/-0)
models/SMScalars/__init__.py (+20/-0)
models/SMScalars/couplings.py (+211/-0)
models/SMScalars/function_library.py (+54/-0)
models/SMScalars/lorentz.py (+71/-0)
models/SMScalars/object_library.py (+232/-0)
models/SMScalars/parameters.py (+393/-0)
models/SMScalars/particles.py (+308/-0)
models/SMScalars/restrict_default.dat (+118/-0)
models/SMScalars/vertices.py (+467/-0)
models/SMScalars/write_param_card.py (+181/-0)
models/heft/Higgs_Effective_Couplings_UFO.log (+9/-8)
models/heft/__init__.py (+5/-0)
models/heft/couplings.py (+109/-17)
models/heft/lorentz.py (+4/-4)
models/heft/object_library.py (+54/-16)
models/heft/parameters.py (+134/-10)
models/heft/particles.py (+44/-173)
models/heft/vertices.py (+174/-72)
models/heft/write_param_card.py (+86/-6)
models/heft_v4/ModelVersion.txt (+1/-0)
models/heft_v4/coupl.inc (+58/-0)
models/heft_v4/couplings.f (+593/-0)
models/heft_v4/heft_calc.html (+76/-0)
models/heft_v4/interactions.dat (+136/-0)
models/heft_v4/makefile (+25/-0)
models/heft_v4/makefile_dynamic (+24/-0)
models/heft_v4/param_card.dat (+63/-0)
models/heft_v4/particles.dat (+57/-0)
models/heft_v4/printout.f (+132/-0)
models/import_ufo.py (+159/-54)
models/model_reader.py (+9/-5)
models/mssm/restrict_default.dat (+525/-0)
models/mssm/restrict_simplified.dat (+0/-525)
models/mssm_v4/ModelVersion.txt (+1/-0)
models/mssm_v4/coupl.inc (+392/-0)
models/mssm_v4/couplings.f (+2357/-0)
models/mssm_v4/hardstop.f (+14/-0)
models/mssm_v4/interactions.dat (+979/-0)
models/mssm_v4/makefile (+22/-0)
models/mssm_v4/makefile_dynamic (+21/-0)
models/mssm_v4/mssm_calc.html (+75/-0)
models/mssm_v4/param_card.dat (+818/-0)
models/mssm_v4/particles.dat (+99/-0)
models/mssm_v4/printout.f (+866/-0)
models/mssm_v4/read_slha.f (+1775/-0)
models/mssm_v4/sm_read_values.inc (+2/-0)
models/nmssm/__init__.py (+20/-0)
models/nmssm/couplings.py (+5275/-0)
models/nmssm/function_library.py (+54/-0)
models/nmssm/lorentz.py (+79/-0)
models/nmssm/object_library.py (+232/-0)
models/nmssm/param_card.dat (+584/-0)
models/nmssm/parameters.py (+4465/-0)
models/nmssm/particles.py (+851/-0)
models/nmssm/restrict_default.dat (+584/-0)
models/nmssm/vertices.py (+6125/-0)
models/nmssm/write_param_card.py (+181/-0)
models/sm/parameters.py (+8/-0)
models/sm/particles.py (+1/-1)
models/sm/restrict_default.dat (+1/-0)
models/sm_v4/ModelVersion.txt (+1/-0)
models/sm_v4/coupl.inc (+50/-0)
models/sm_v4/couplings.f (+529/-0)
models/sm_v4/interactions.dat (+111/-0)
models/sm_v4/makefile (+25/-0)
models/sm_v4/makefile_dynamic (+24/-0)
models/sm_v4/param_card.dat (+63/-0)
models/sm_v4/particles.dat (+50/-0)
models/sm_v4/printout.f (+126/-0)
models/sm_v4/sm_calc.html (+76/-0)
models/template_files/fortran/lha_read.f (+11/-9)
models/template_files/fortran/makefile (+5/-5)
models/usrmod_v4/ConversionScript.pl (+509/-0)
models/usrmod_v4/Header_and_footer/coupl_header.dat (+53/-0)
models/usrmod_v4/Header_and_footer/couplings_footer.dat (+9/-0)
models/usrmod_v4/Header_and_footer/couplings_header.dat (+207/-0)
models/usrmod_v4/Header_and_footer/input_header.dat (+1/-0)
models/usrmod_v4/Header_and_footer/param_I.dat (+55/-0)
models/usrmod_v4/Header_and_footer/param_II.dat (+1/-0)
models/usrmod_v4/Header_and_footer/param_III.dat (+13/-0)
models/usrmod_v4/Header_and_footer/print_I.dat (+88/-0)
models/usrmod_v4/Header_and_footer/print_II.dat (+44/-0)
models/usrmod_v4/Header_and_footer/print_III.dat (+3/-0)
models/usrmod_v4/Header_and_footer/print_IV.dat (+5/-0)
models/usrmod_v4/Header_and_footer/printcoup_I.dat (+46/-0)
models/usrmod_v4/Header_and_footer/printcoup_II.dat (+24/-0)
models/usrmod_v4/Header_and_footer/rw_I.dat (+139/-0)
models/usrmod_v4/Header_and_footer/rw_II.dat (+6/-0)
models/usrmod_v4/Header_and_footer/rw_III.dat (+1/-0)
models/usrmod_v4/Header_and_footer/rw_IV.dat (+173/-0)
models/usrmod_v4/ModelVersion.txt (+1/-0)
models/usrmod_v4/README.txt (+227/-0)
models/usrmod_v4/VariableName.dat (+3/-0)
models/usrmod_v4/couplings_test.f (+70/-0)
models/usrmod_v4/couplingsvalues.f (+5/-0)
models/usrmod_v4/interactions.dat (+116/-0)
models/usrmod_v4/makefile (+27/-0)
models/usrmod_v4/makefile_dynamic (+26/-0)
models/usrmod_v4/particles.dat (+54/-0)
models/usrmod_v4/qnumbers.pl (+123/-0)
models/usrmod_v4/testprog.f (+5/-0)
models/write_param_card.py (+69/-25)
tests/acceptance_tests/test_cmd.py (+376/-41)
tests/acceptance_tests/test_model_equivalence.py (+6/-4)
tests/input_files/e+e-_e+e-.pkl (+7/-4)
tests/input_files/restrict_sm.dat (+1/-1)
tests/parallel_tests/me_comparator.py (+27/-118)
tests/parallel_tests/sample_script.py (+42/-20)
tests/unit_tests/__init__.py (+2/-1)
tests/unit_tests/core/test_base_objects.py (+1/-1)
tests/unit_tests/core/test_diagram_generation.py (+5/-2)
tests/unit_tests/iolibs/test_export_cpp.py (+769/-224)
tests/unit_tests/iolibs/test_export_python.py (+229/-5)
tests/unit_tests/iolibs/test_export_v4.py (+2249/-119)
tests/unit_tests/iolibs/test_file_writers.py (+3/-3)
tests/unit_tests/iolibs/test_group_subprocs.py (+516/-0)
tests/unit_tests/iolibs/test_helas_call_writers.py (+5/-5)
tests/unit_tests/various/test_4fermion_models.py (+9/-9)
tests/unit_tests/various/test_aloha.py (+450/-16)
tests/unit_tests/various/test_diagram_symmetry.py (+205/-0)
tests/unit_tests/various/test_diquark_models.py (+24/-24)
tests/unit_tests/various/test_import_ufo.py (+108/-13)
tests/unit_tests/various/test_process_checks.py (+12/-8)
tests/unit_tests/various/test_write_param.py (+90/-4)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/release_candidate
Reviewer Review Type Date Requested Status
Tim Stelzer Pending
FabioMaltoni Pending
Olivier Mattelaer Pending
Review via email: mp+57263@code.launchpad.net

Description of the change

Too many changes to detail here...

To post a comment you must log in.
Revision history for this message
Johan Alwall (johan-alwall) wrote :

Please check out this version and the new web interface on http://cp3wks05.fynu.ucl.ac.be/.
We are hoping to do the merge by tomorrow afternoon (April 12), as soon as I get up :-)

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

> Please check out this version and the new web interface on
> http://cp3wks05.fynu.ucl.ac.be/.
> We are hoping to do the merge by tomorrow afternoon (April 12), as soon as I
> get up :-)

Hi Johan,

Concerning the '+' problem with pythia8. I think this sould be resolve in the pythia 8 interface.
i.e made a string replacement for that. This type of quite stupid rule (you cann't name things with...) should be avoid as much as possible.

Otherwise, I agree to pass in golden master :-)

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

another (very) minor point:
one of the logger is not beautiful:
root: Finding symmetric diagrams for process g g > g g QED=0
could you try to pass in the normal format?

138. By Olivier Mattelaer

add nmssm and correct logging format in write_symmetry

139. By Johan Alwall

Allow for + in model names with C++ output by replacing + with _plus_ in class and file names

140. By Johan Alwall

Updated VERSION to 1.0.0

141. By Johan Alwall

Ensure that general param_cards can be read by model, in particular MG4 sm param_card (except for yukawa couplings, which are in different blocks)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2011-04-12 19:56:30 +0000
4@@ -0,0 +1,1 @@
5+models/RS/.DS_Store
6
7=== added directory 'DECAY'
8=== added file 'DECAY/DECAYVersion.txt'
9--- DECAY/DECAYVersion.txt 1970-01-01 00:00:00 +0000
10+++ DECAY/DECAYVersion.txt 2011-04-12 19:56:30 +0000
11@@ -0,0 +1,1 @@
12+1.0.5
13
14=== added file 'DECAY/README'
15--- DECAY/README 1970-01-01 00:00:00 +0000
16+++ DECAY/README 2011-04-12 19:56:30 +0000
17@@ -0,0 +1,13 @@
18+IMPORTANT: this is strictly a SM Decay routine!!!
19+AUTHOR: Fabio Maltoni
20+NAME : decay
21+DESCRIPTION:
22+c***********************************************************************
23+c 1. reads events from file *
24+c 2. asks which particle to decay *
25+c 3. asks the decay mode *
26+c 4. decays particle *
27+c 5. write out decayed events. *
28+c***********************************************************************
29+
30+
31
32=== added file 'DECAY/UpdateNotes.txt'
33--- DECAY/UpdateNotes.txt 1970-01-01 00:00:00 +0000
34+++ DECAY/UpdateNotes.txt 2011-04-12 19:56:30 +0000
35@@ -0,0 +1,48 @@
36+Update notes for DECAY package
37+
38+c----------------------------------------------------------------------*
39+c FIRST VERSION 16-May-2003 *
40+c----------------------------------------------------------------------*
41+c LAST UPDATE 26-Sep-2003: *
42+c - W->anything and t->b anything decays added. *
43+c - rnd number generator seed changes in sequential runs. *
44+c----------------------------------------------------------------------*
45+c LAST UPDATE 07-Nov-2003: *
46+c - exactly turns unweighted evts in unweighted evts. *
47+c - decaying identical particles in one event fixed. *
48+c - bug in the Z->jets quark fractions corrected. *
49+c - error trap routines added *
50+c----------------------------------------------------------------------*
51+c LAST UPDATE 25-Feb-2004: *
52+c - H->ZZ>leptons : wrong extra factor of two deleted *
53+c----------------------------------------------------------------------*
54+c LAST UPDATE 12-Dec-2004: *
55+c - Merging it to the official web template *
56+c----------------------------------------------------------------------*
57+c LAST UPDATE June-10-2005: *
58+c - Updated for use with new rw_events.f format *
59+c LAST UPDATE August-18-2005: *
60+c - Fixed a bug in the previous update *
61+c----------------------------------------------------------------------*
62+c LAST UPDATE 25-Jan-2006: *
63+c - Template change structure, moved to directory Decay *
64+c----------------------------------------------------------------------*
65+c LAST UPDATE 27-July-2006: *
66+c - Compliant with MadGraph_v4.0 *
67+c----------------------------------------------------------------------*
68+c LAST UPDATE Jan 2007 *
69+c - Compliant with MadGraph_v4.1 *
70+c----------------------------------------------------------------------*
71+c LAST UPDATE Mar 2008 *
72+c - RF: Fixed bug in writing rnd number seed in event file banner *
73+c----------------------------------------------------------------------*
74+c LAST UPDATE May 2008 *
75+c - FM: Fixed bug in Higgs 4 body decay *
76+c----------------------------------------------------------------------*
77+c LAST UPDATE June 2008 *
78+c - RF: Fixed bug if there is more than one event number in the *
79+c init block of event file. *
80+c----------------------------------------------------------------------*
81+c LAST UPDATE Sep 2009 *
82+c - OM: Modification for gfortran compilation compatibility *
83+c***********************************************************************
84
85=== added file 'DECAY/alfas.inc'
86--- DECAY/alfas.inc 1970-01-01 00:00:00 +0000
87+++ DECAY/alfas.inc 2011-04-12 19:56:30 +0000
88@@ -0,0 +1,11 @@
89+c***********************************************************************
90+c this files contains the common blocks for the
91+c the alpha_s settings
92+c
93+c asmz = alpha_s(Mz) is set based on the pdf chosen in setcuts.f
94+c nloop = order of the running of alpha_s based on the pdf chosen
95+c***********************************************************************
96+ integer nloop
97+ double precision asmz
98+ common/a_block/asmz,nloop
99+
100
101=== added file 'DECAY/alfas_functions.f'
102--- DECAY/alfas_functions.f 1970-01-01 00:00:00 +0000
103+++ DECAY/alfas_functions.f 2011-04-12 19:56:30 +0000
104@@ -0,0 +1,280 @@
105+C
106+C-----------------------------------------------------------------------------
107+C
108+ double precision function alfa(alfa0,qsq )
109+C
110+C-----------------------------------------------------------------------------
111+C
112+C This function returns the 1-loop value of alpha.
113+C
114+C INPUT:
115+C qsq = Q^2
116+C
117+C-----------------------------------------------------------------------------
118+C
119+ implicit none
120+ double precision qsq,alfa0
121+c
122+c constants
123+c
124+ double precision One, Three, Pi,zmass
125+ parameter( One = 1.0d0, Three = 3.0d0 )
126+ parameter( Pi = 3.14159265358979323846d0 )
127+ parameter( zmass = 91.188d0 )
128+cc
129+ alfa = alfa0 / ( 1.0d0 - alfa0*dlog( qsq/zmass**2 ) /Three /Pi )
130+ccc
131+ return
132+ end
133+
134+C
135+C-----------------------------------------------------------------------------
136+C
137+ double precision function alfaw(alfaw0,qsq,nh )
138+C
139+C-----------------------------------------------------------------------------
140+C
141+C This function returns the 1-loop value of alpha_w.
142+C
143+C INPUT:
144+C qsq = Q^2
145+C nh = # of Higgs doublets
146+C
147+C-----------------------------------------------------------------------------
148+C
149+ implicit none
150+ double precision qsq, alphaw, dum,alfaw0
151+ integer nh, nq
152+c
153+c include
154+c
155+
156+c
157+c constants
158+c
159+ double precision Two, Four, Pi, Twpi, zmass,tmass
160+ parameter( Two = 2.0d0, Four = 4.0d0 )
161+ parameter( Pi = 3.14159265358979323846d0 )
162+ parameter( Twpi = 3.0d0*Four*Pi )
163+ parameter( zmass = 91.188d0,tmass=174d0 )
164+cc
165+ if ( qsq.ge.tmass**2 ) then
166+ nq = 6
167+ else
168+ nq = 5
169+ end if
170+ dum = ( 22.0d0 - Four*nq - nh/Two ) / Twpi
171+ alfaw = alfaw0 / ( 1.0d0 + dum*alfaw0*dlog( qsq/zmass**2 ) )
172+ccc
173+ return
174+ end
175+
176+C-----------------------------------------------------------------------------
177+C
178+ DOUBLE PRECISION FUNCTION ALPHAS(Q)
179+c
180+c Evaluation of strong coupling constant alpha_S
181+c Author: R.K. Ellis
182+c
183+c q -- scale at which alpha_s is to be evaluated
184+c
185+c-- common block alfas.inc
186+c asmz -- value of alpha_s at the mass of the Z-boson
187+c nloop -- the number of loops (1,2, or 3) at which beta
188+c
189+c function is evaluated to determine running.
190+c the values of the cmass and the bmass should be set
191+c in common block qmass.
192+C-----------------------------------------------------------------------------
193+
194+ IMPLICIT NONE
195+c
196+ include 'alfas.inc'
197+ DOUBLE PRECISION Q,T,AMZ0,AMB,AMC
198+ DOUBLE PRECISION AS_OUT
199+ INTEGER NLOOP0,NF3,NF4,NF5
200+ PARAMETER(NF5=5,NF4=4,NF3=3)
201+C
202+ REAL*8 CMASS,BMASS
203+ COMMON/QMASS/CMASS,BMASS
204+ DATA CMASS,BMASS/1.42D0,4.7D0/ ! HEAVY QUARK MASSES FOR THRESHOLDS
205+C
206+ REAL*8 ZMASS
207+ DATA ZMASS/91.188D0/
208+C
209+ SAVE AMZ0,NLOOP0,AMB,AMC
210+ DATA AMZ0,NLOOP0/0D0,0/
211+ IF (Q .LE. 0D0) THEN
212+ WRITE(6,*) 'q .le. 0 in alphas'
213+ WRITE(6,*) 'q= ',Q
214+ STOP
215+ ENDIF
216+ IF (asmz .LE. 0D0) THEN
217+ WRITE(6,*) 'asmz .le. 0 in alphas',asmz
218+c WRITE(6,*) 'continue with asmz=0.1185'
219+ STOP
220+ asmz=0.1185D0
221+ ENDIF
222+ IF (CMASS .LE. 0.3D0) THEN
223+ WRITE(6,*) 'cmass .le. 0.3GeV in alphas',CMASS
224+c WRITE(6,*) 'continue with cmass=1.5GeV?'
225+ STOP
226+ CMASS=1.42D0
227+ ENDIF
228+ IF (BMASS .LE. 0D0) THEN
229+ WRITE(6,*) 'bmass .le. 0 in alphas',BMASS
230+ WRITE(6,*) 'COMMON/QMASS/CMASS,BMASS'
231+ STOP
232+ BMASS=4.7D0
233+ ENDIF
234+c--- establish value of coupling at b- and c-mass and save
235+ IF ((asmz .NE. AMZ0) .OR. (NLOOP .NE. NLOOP0)) THEN
236+ AMZ0=asmz
237+ NLOOP0=NLOOP
238+ T=2D0*DLOG(BMASS/ZMASS)
239+ CALL NEWTON1(T,asmz,AMB,NLOOP,NF5)
240+ T=2D0*DLOG(CMASS/BMASS)
241+ CALL NEWTON1(T,AMB,AMC,NLOOP,NF4)
242+ ENDIF
243+
244+c--- evaluate strong coupling at scale q
245+ IF (Q .LT. BMASS) THEN
246+ IF (Q .LT. CMASS) THEN
247+ T=2D0*DLOG(Q/CMASS)
248+ CALL NEWTON1(T,AMC,AS_OUT,NLOOP,NF3)
249+ ELSE
250+ T=2D0*DLOG(Q/BMASS)
251+ CALL NEWTON1(T,AMB,AS_OUT,NLOOP,NF4)
252+ ENDIF
253+ ELSE
254+ T=2D0*DLOG(Q/ZMASS)
255+ CALL NEWTON1(T,asmz,AS_OUT,NLOOP,NF5)
256+ ENDIF
257+ ALPHAS=AS_OUT
258+ RETURN
259+ END
260+
261+
262+ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF)
263+C Author: R.K. Ellis
264+
265+c--- calculate a_out using nloop beta-function evolution
266+c--- with nf flavours, given starting value as-in
267+c--- given as_in and logarithmic separation between
268+c--- input scale and output scale t.
269+c--- Evolution is performed using Newton's method,
270+c--- with a precision given by tol.
271+
272+ IMPLICIT NONE
273+ INTEGER NLOOP,NF
274+ REAL*8 T,A_IN,A_OUT,AS,TOL,F2,F3,F,FP,DELTA
275+ REAL*8 B0(3:5),C1(3:5),C2(3:5),DEL(3:5)
276+ PARAMETER(TOL=5.D-4)
277+C--- B0=(11.-2.*NF/3.)/4./PI
278+ DATA B0/0.716197243913527D0,0.66314559621623D0,0.61009394851893D0/
279+C--- C1=(102.D0-38.D0/3.D0*NF)/4.D0/PI/(11.D0-2.D0/3.D0*NF)
280+ DATA C1/.565884242104515D0,0.49019722472304D0,0.40134724779695D0/
281+C--- C2=(2857.D0/2.D0-5033*NF/18.D0+325*NF**2/54)
282+C--- /16.D0/PI**2/(11.D0-2.D0/3.D0*NF)
283+ DATA C2/0.453013579178645D0,0.30879037953664D0,0.14942733137107D0/
284+C--- DEL=SQRT(4*C2-C1**2)
285+ DATA DEL/1.22140465909230D0,0.99743079911360D0,0.66077962451190D0/
286+ F2(AS)=1D0/AS+C1(NF)*LOG((C1(NF)*AS)/(1D0+C1(NF)*AS))
287+ F3(AS)=1D0/AS+0.5D0*C1(NF)
288+ & *LOG((C2(NF)*AS**2)/(1D0+C1(NF)*AS+C2(NF)*AS**2))
289+ & -(C1(NF)**2-2D0*C2(NF))/DEL(NF)
290+ & *ATAN((2D0*C2(NF)*AS+C1(NF))/DEL(NF))
291+
292+
293+ A_OUT=A_IN/(1D0+A_IN*B0(NF)*T)
294+ IF (NLOOP .EQ. 1) RETURN
295+ A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T))
296+ IF (A_OUT .LT. 0D0) AS=0.3D0
297+ 30 AS=A_OUT
298+
299+ IF (NLOOP .EQ. 2) THEN
300+ F=B0(NF)*T+F2(A_IN)-F2(AS)
301+ FP=1D0/(AS**2*(1D0+C1(NF)*AS))
302+ ENDIF
303+ IF (NLOOP .EQ. 3) THEN
304+ F=B0(NF)*T+F3(A_IN)-F3(AS)
305+ FP=1D0/(AS**2*(1D0+C1(NF)*AS+C2(NF)*AS**2))
306+ ENDIF
307+ A_OUT=AS-F/FP
308+ DELTA=ABS(F/FP/AS)
309+ IF (DELTA .GT. TOL) GO TO 30
310+ RETURN
311+ END
312+
313+
314+C-----------------------------------------------------------------------------
315+C
316+ double precision function mfrun(mf,scale,asmz,nloop)
317+C
318+C-----------------------------------------------------------------------------
319+C
320+C This function returns the 2-loop value of a MSbar fermion mass
321+C at a given scale.
322+C
323+C INPUT: mf = MSbar mass of fermion at MSbar fermion mass scale
324+C scale = scale at which the running mass is evaluated
325+C asmz = AS(MZ) : this is passed to alphas(scale,asmz,nloop)
326+C nloop = # of loops in the evolution
327+C
328+C
329+C
330+C EXTERNAL: double precision alphas(scale,asmz,nloop)
331+C
332+C-----------------------------------------------------------------------------
333+C
334+ implicit none
335+C
336+C ARGUMENTS
337+C
338+ double precision mf,scale,asmz
339+ integer nloop
340+C
341+C LOCAL
342+C
343+ double precision beta0, beta1,gamma0,gamma1
344+ double precision A1,as,asmf,l2
345+ integer nf
346+C
347+C EXTERNAL
348+C
349+ double precision alphas
350+ external alphas
351+c
352+c CONSTANTS
353+c
354+ double precision One, Two, Three, Pi
355+ parameter( One = 1.0d0, Two = 2.0d0, Three = 3.0d0 )
356+ parameter( Pi = 3.14159265358979323846d0)
357+ double precision tmass
358+ parameter(tmass=174d0)
359+cc
360+C
361+C
362+ if ( mf.gt.tmass ) then
363+ nf = 6
364+ else
365+ nf = 5
366+ end if
367+
368+ beta0 = ( 11.0d0 - Two/Three *nf )/4d0
369+ beta1 = ( 102d0 - 38d0/Three*nf )/16d0
370+ gamma0= 1d0
371+ gamma1= ( 202d0/3d0 - 20d0/9d0*nf )/16d0
372+ A1 = -beta1*gamma0/beta0**2+gamma1/beta0
373+ as = alphas(scale)
374+ asmf = alphas(mf)
375+ l2 = (1+ A1*as/Pi)/(1+ A1*asmf/Pi)
376+
377+
378+ mfrun = mf * (as/asmf)**(gamma0/beta0)
379+
380+ if(nloop.eq.2) mfrun =mfrun*l2
381+ccc
382+ return
383+ end
384+
385
386=== added file 'DECAY/calc_values.inc'
387--- DECAY/calc_values.inc 1970-01-01 00:00:00 +0000
388+++ DECAY/calc_values.inc 2011-04-12 19:56:30 +0000
389@@ -0,0 +1,17 @@
390+c
391+c Calculated intermediate values that are printed out
392+c
393+ double precision decw, w_w_nl, w_w_tau, w_w_ud, w_w_cs
394+ double precision decz, w_z_nn, w_z_ll, w_z_tau
395+ double precision w_z_uu, w_z_dd, w_z_cc, w_z_bb
396+ double precision mt_h,mb_h,mc_h
397+ double precision w_h_tt,w_h_bb,w_h_tau,w_h_cc
398+ double precision w_h_ww,w_h_zz,w_h_WLWL,w_h_ZLZL
399+ common/calc_values/
400+ & decw, w_w_nl, w_w_tau, w_w_ud, w_w_cs,
401+ & decz, w_z_nn, w_z_ll, w_z_tau,
402+ & w_z_uu, w_z_dd, w_z_cc, w_z_bb,
403+ & mt_h, mb_h, mc_h,
404+ & w_h_tt,w_h_bb,w_h_tau,w_h_cc,
405+ & w_h_ww,w_h_zz,w_h_WLWL,w_h_ZLZL
406+
407
408=== added file 'DECAY/coupl.inc'
409--- DECAY/coupl.inc 1970-01-01 00:00:00 +0000
410+++ DECAY/coupl.inc 2011-04-12 19:56:30 +0000
411@@ -0,0 +1,50 @@
412+c====================================================================
413+c
414+c Define common block containing all coupling constants and masses
415+c which are used in the HELAS routines.
416+c
417+c These include masses, widths and real/complex couplings.
418+c
419+c This file can be built automatically from particles.dat and
420+c interactions.dat
421+c
422+c====================================================================
423+c
424+c QCD
425+c
426+ double complex gg(2)
427+ double precision g
428+ common /COUPL_QCD/ g,gg
429+c
430+c kinematical masses
431+c
432+ double precision hmass, wmass, zmass, amass,
433+ & tmass, bmass, lmass, cmass
434+ common /COUPL_MASS/ hmass, wmass, zmass, amass,
435+ & tmass, bmass, lmass, cmass
436+c
437+c widths
438+c
439+ double precision hwidth, wwidth, zwidth,
440+ & twidth, lwidth, awidth
441+ common /COUPL_WIDTH/ hwidth, wwidth, zwidth,
442+ & twidth, lwidth, awidth
443+c
444+c couplings in the feynman rules
445+c
446+ double complex gal(2), gad(2), gau(2), gwf(2),
447+ & gzn(2), gzl(2), gzd(2), gzu(2)
448+ double precision gw, gwwa, gwwz
449+ common /COUPL_GAUGE/ gal , gad , gau , gwf ,
450+ & gzn , gzl , gzd , gzu ,
451+ & gw, gwwa, gwwz
452+c
453+ double complex gwfc(2), gwfs(2), gwfm(2)
454+ common /coupl_ckm/ gwfc, gwfs , gwfm
455+c
456+ double complex gwwh, gzzh, gwwhh, gzzhh, ghhh, ghhhh
457+ common /COUPL_SCAL/ gwwh, gzzh, gwwhh, gzzhh, ghhh, ghhhh
458+c
459+ double complex ghtop(2), ghbot(2), ghtau(2), ghcha(2)
460+ common /COUPL_YUK/ ghtop , ghbot , ghtau , ghcha
461+
462
463=== added file 'DECAY/decay.f'
464--- DECAY/decay.f 1970-01-01 00:00:00 +0000
465+++ DECAY/decay.f 2011-04-12 19:56:30 +0000
466@@ -0,0 +1,1613 @@
467+ program decay
468+c***********************************************************************
469+c 1. reads events from file *
470+c 2. asks which particle to decay *
471+c 3. asks the decay mode *
472+c 4. decays particle *
473+c 5. write out decayed events. *
474+c----------------------------------------------------------------------*
475+c FIRST VERSION 16-May-2003 *
476+c----------------------------------------------------------------------*
477+c LAST UPDATE 26-Sep-2003: *
478+c - W->anything and t->b anything decays added. *
479+c - rnd number generator seed changes in sequential runs. *
480+c----------------------------------------------------------------------*
481+c LAST UPDATE 07-Nov-2003: *
482+c - exactly turns unweighted evts in unweighted evts. *
483+c - decaying identical particles in one event fixed. *
484+c - bug in the Z->jets quark fractions corrected. *
485+c - error trap routines added *
486+c----------------------------------------------------------------------*
487+c LAST UPDATE 25-Feb-2004: *
488+c - H->ZZ>leptons : wrong extra factor of two deleted *
489+c----------------------------------------------------------------------*
490+c LAST UPDATE 12-Dec-2004: *
491+c - Merging it to the official web template *
492+c----------------------------------------------------------------------*
493+c LAST UPDATE June-10-2005: *
494+c - Updated for use with new rw_events.f format *
495+c LAST UPDATE August-18-2005: *
496+c - Fixed a bug in the previous update *
497+c----------------------------------------------------------------------*
498+c LAST UPDATE July-27-2006: *
499+c - Make it compliant with MadGraph v 4.0 *
500+c***********************************************************************
501+ implicit none
502+ include 'decay.inc'
503+c
504+c parameters
505+c
506+ real*8 smallmass
507+ parameter (smallmass=1d0)
508+c
509+c Local
510+c
511+c
512+ integer nexternal, ic(7,MaxParticles),idecay(MaxParticles)
513+ double precision P(0:4,MaxParticles),wgt
514+ integer i,k,iten
515+ integer nevent,nfound(0:MaxParticles)
516+ data nevent/0/
517+c
518+ real*8 sum(0:maxievent),maxwgt(0:maxievent)
519+ character*50 dec_name
520+ character*3 name
521+ character*132 buff
522+ character*140 buff2
523+ integer iseed
524+ real*8 aa
525+ real*8 scale,aqcd,aqed
526+ integer ievent,eventnr,eventnumber
527+ integer maxpup
528+ parameter(maxpup=100)
529+ integer idbmup(2),pdfgup(2),pdfsup(2),idwtup,nprup,lprup
530+ double precision ebmup(2),xsecup,xerrup,xmaxup
531+C
532+ logical done,firsttime,fopenend,lwrite,newbanner
533+ LOGICAL DEBUG
534+ data firsttime/.true./
535+ data done/.false./
536+ DATA DEBUG/.TRUE./
537+c
538+c external
539+c
540+ real*8 dot
541+ real xran1
542+c
543+c Global
544+c
545+ include 'coupl.inc'
546+ data id /201*' '/
547+c
548+ character*70 infile,outfile
549+ integer run_mode
550+ common/mode/run_mode,infile
551+c
552+ integer iunit
553+ common/to_lh/iunit
554+
555+ integer sizeievent
556+ common/ievents/sizeievent
557+c
558+c Date
559+c
560+c CHARACTER*20 DATE
561+c EXTERNAL DATE_Y2KBUG
562+
563+c-----
564+c Begin Code
565+c-----
566+c
567+ write(*,*) '*****************************************************'
568+ write(*,*) '* DECAY *'
569+ write(*,*) '* a MadEvent program *'
570+ write(*,*) '* for decaying unstable particles *'
571+ write(*,*) '* in the Standar Model *'
572+ write(*,*) '* --------------------------------- *'
573+ write(*,*) '* version compliant with MG_ME_V4.0 *'
574+ write(*,*) '* *'
575+ write(*,*) '* 27-July-2006 *'
576+ write(*,*) '*****************************************************'
577+c
578+c run mode: 0 calculates partial widths
579+c 1 decays event in file
580+c
581+ write(*,*)
582+ write(*,*) ' Input run mode:'
583+ write(*,*) ' ---------------'
584+ write(*,*)
585+ write(*,*) ' 0 = calculates decay widths'
586+ write(*,*) ' 1 = decay events in file'
587+ write(*,*)
588+
589+ read(*,'(i1)') run_mode
590+
591+c
592+c initialize rnd number for decay
593+c
594+ call rnd_init(lunrnd,iseed)
595+c
596+c
597+c open scratch file which will contain the param_card.dat
598+c
599+ open(lunp,status='scratch')
600+c
601+ if(run_mode.eq.0) then
602+c
603+c calculates the decay width at LO
604+c
605+ write(*,*) '*****************************************************'
606+ write(*,*) '* run_mode=0 => calculting decay widths *'
607+ write(*,*) '*****************************************************'
608+ write(*,*)
609+ write(*,*) ' Input parameter file (e.g. ../Cards/param_card.dat)'
610+ write(*,*) ' ---------------------------------------------------'
611+ write(*,*)
612+ read(*,'(a)') infile
613+ open(lunr,file=infile,status='old',err=102)
614+ write(*,*)
615+ write(*,*) '*****************************************************'
616+ write(*,*) '* Using file: *'
617+ write(*,'(1x,a1,a25,a1)') ' ',infile,' '
618+ write(*,*) '* for the input params. *'
619+ write(*,*) '* *'
620+ write(*,*) '* >>>>>>Total widths are recalculated here<<<<< *'
621+ write(*,*) '*****************************************************'
622+ write(*,*)
623+
624+ goto 103
625+ 102 write(*,*) 'file', infile ,' not found : stopping here'
626+ stop
627+ 103 continue
628+
629+c
630+c write the param information into the scratch file
631+c
632+ done=.false.
633+ do while(.not.done)
634+ read(lunr,'(a132)',err=101,end=101) buff
635+ write(lunp,'(a132)') buff
636+ enddo
637+c
638+ 101 continue
639+
640+ elseif(run_mode.eq.1) then
641+
642+ write(*,*) '*****************************************************'
643+ write(*,*) '* run_mode=1 => decaying events *'
644+ write(*,*) '* *'
645+ write(*,*) '* Using the param_card.dat in the banner for *'
646+ write(*,*) '* the input params. *'
647+ write(*,*) '* *'
648+ write(*,*) '* >>>>>>Total widths are recalculated here<<<<< *'
649+ write(*,*) '*****************************************************'
650+c
651+ write(*,*) 'input event file: (e.g. events.lhe)'
652+ read(*,'(a)') infile
653+c
654+ write(*,*) 'name for output file: (e.g. dec-events.lhe)'
655+ read(*,'(a)') outfile
656+c
657+ open(lunr,file=infile,status='old')
658+ open(lunw,status='scratch')
659+ open(luni,file=outfile,status='unknown')
660+c
661+c copy old banner into new banner and the param_card.dat into the scratch file
662+c
663+ done=.false.
664+ lwrite=.false.
665+ newbanner=.false.
666+ read(lunr,'(a132)',err=99) buff
667+ do while(index(buff,'<init>') .eq. 0)
668+ if(index(buff,"<header>") .ne. 0) newbanner=.true.
669+ if (index(buff,"<slha>") .ne. 0 .or.
670+ $ index(buff,"Begin param_card.dat") .ne. 0) lwrite=.true.
671+ if (index(buff,"</slha>") .ne. 0 .or.
672+ $ index(buff,"End param_card.dat") .ne. 0) lwrite=.false.
673+c
674+ if(index(buff,'</header>') .eq. 0 .and.
675+ $ (newbanner .or. index(buff,'-->') .eq. 0 ))
676+ $ write(luni,'(a)') buff(1:len_trim(buff))
677+ if(lwrite) write(lunp,'(a)') buff(1:len_trim(buff))
678+c if(lwrite) write(*,'(a50)') 'found in param_card: ',buff
679+c if(.not.lwrite) write(*,'(a50)') 'found in banner: ',buff
680+ read(lunr,'(a132)',err=99) buff
681+ enddo
682+c
683+ rewind(lunr)
684+c
685+ endif
686+
687+ call setpara
688+ call printout
689+ call set_mass
690+ call set_id
691+c
692+c
693+c
694+ write(*,*) '*****************************************************'
695+ aa=xran1(iseed)
696+ write(*,'(a22,f8.6,a24)') ' * first rnd number= ',aa ,
697+ & ' *'
698+ write(*,*) '*****************************************************'
699+c
700+c Input the particle to be decayed
701+c
702+ write(*,*)
703+ write(*,*) ' Implemented decays are for:'
704+ write(*,*) ' ---------------------------'
705+ write(*,*)
706+ write(*,*) ' Leptons: ta- ta+'
707+ write(*,*) ' Quarks : t t~'
708+ write(*,*) ' Bosons : z w+ w- h'
709+ write(*,*) ' Input particle to be decayed (e.g. t~):'
710+ read(*,'(a3)',err=99) name
711+ call case_trap(name,3)
712+c
713+c identify the particle ip
714+c
715+ ip=0
716+ i=-25
717+ do while(i.le.25.and.ip.eq.0)
718+ if(name.eq.id(i)) ip=i
719+ i=i+1
720+ enddo
721+c
722+ if(ip.eq.0) goto 99 ! particle not existing
723+c
724+c find out whether the decay requested is implemented.
725+c In case it is, printout the possibilities and
726+c ask the user to choose.
727+c
728+ call decay_modes(dec_name)
729+ if(imode.eq.0) goto 99 ! decay not implemented
730+c
731+c setting up branching ratio, widths and so on..
732+c
733+ call init
734+c
735+c write out decay information
736+c
737+ write(*,*)
738+ write(*,*) '----------------------------------------------'
739+ write(*,*) ' Decay information '
740+ write(*,*) '----------------------------------------------'
741+ write(*,*) ' '
742+ write(*,*) ' particle name : ',id(ip)
743+ write(*,*) ' decay mode : ',dec_name
744+c
745+c calculate the MC partial width for normalization purposes
746+c
747+ call tot_decay
748+c
749+ if(run_mode.eq.0) goto 98 !If only decay width is needed, I'm done
750+c
751+c first check that the particle to be decayed
752+c is present in the events and gather some info
753+c on the events
754+c
755+
756+ write(*,*) ' '
757+ write(*,*) ' Wait....Reading In Event File '
758+ write(*,*) ' '
759+ done=.false.
760+ nevent=0
761+ sizeievent=0
762+ do i=0,maxievent
763+ sum(i)=0d0
764+ maxwgt(i)=-1d0
765+ enddo
766+ do i=0,MaxParticles
767+ nfound(i)=0
768+ enddo
769+ do while (.not. done)
770+ call read_event(lunr,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff2,done)
771+ if(.not.done) then
772+ call find_particle(ip,nexternal,ic,k,idecay)
773+ nfound(k)=nfound(k)+1
774+ eventnumber=eventnr(ievent)
775+ sum(eventnumber)=sum(eventnumber)+wgt
776+ maxwgt(eventnumber) = max(wgt,maxwgt(eventnumber))
777+ nevent=nevent+1
778+ endif
779+ enddo
780+ do i=1, sizeievent
781+ sum(0)=sum(0)+sum(i)
782+ maxwgt(0)=maxwgt(0)+maxwgt(i)
783+ enddo
784+
785+
786+ rewind(lunr)
787+
788+ write(*,*) '----------------------------------------------'
789+ write(*,*) ' Input events information '
790+ write(*,*) '----------------------------------------------'
791+ write(*,*) ' '
792+ write(*,*) ' Input Event file : ',infile
793+ write(*,*) ' Number of Events : ',nevent
794+ write(*,*) ' Integrated weight (pb) : ',sum(0)
795+ write(*,*) ' Max wgt : ',maxwgt(0)
796+ write(*,*) ' Average wgt : ',sum(0)/nevent
797+ write(*,*)
798+
799+ if(nfound(0).eq.nevent) then
800+ write(*,*) ' There are no events with particle ',
801+ & id(ip),' to decay !!'
802+ stop
803+ else
804+ do i=0,MaxParticles
805+ if(nfound(i).gt.0) then
806+ write(*,'(1x,a14,i2,a1,a2,a13,i10)')
807+ & ' Events with ',i,' ',id(ip),' :',nfound(i)
808+ endif
809+ enddo
810+ endif
811+
812+
813+c
814+c read each event, decay it, and write it out
815+c note that it is NOT assumed that all the events
816+c have the same number of particles in the final
817+c state or the same type. Each event is treated
818+c independently from the others.
819+c
820+ write(*,*) ' '
821+ write(*,*) '----------------------------------------------'
822+ write(*,*) ' Decay events in file : in progress '
823+ write(*,*) '----------------------------------------------'
824+ write(*,*) ' '
825+ done=.false.
826+ i = 0
827+ do while (.not. done)
828+ call read_event(lunr,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff2,done)
829+ if (.not. done) then
830+ i=i+1
831+ call decay_event(P,wgt,nexternal,ic)
832+ call write_event(lunw,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff2)
833+ endif
834+ iten=int(real(nevent)/10e0)+1
835+ if(real(i)/real(iten).eq.real(i/iten)) then
836+ write(*,'(10x,i3,a)')int(real(i)/real(nevent)*100),' % done'
837+ endif
838+ enddo
839+ write(*,*) ' 100% done'
840+c
841+c decayed event information
842+c
843+c-- statistics of the decay_event routine
844+c
845+ write(*,*)
846+ write(*,*) '----------------------------------------------'
847+ write(*,*) ' Statistics of the unweighting '
848+ write(*,*) '----------------------------------------------'
849+ write(*,*) ' '
850+ write(*,*) ' Events weighted = ' ,n_wei
851+ write(*,*) ' Events unweighted = ' ,nevent
852+ write(*,*) ' Width (wgt) = ' ,s_wei/real(n_wei), ' GeV'
853+ write(*,*) ' Width (unwgt) = ' ,s_unw/real(n_wei), ' GeV'
854+ IF(DEBUG) then
855+ write(*,*) ' Events over = ' ,n_ove
856+ write(*,*) ' Integral over = ' ,s_ove/real(n_wei), ' GeV'
857+ ENDIF
858+ write(*,*) ' '
859+c
860+ write(*,*) ' '
861+ write(*,*) ' Wait....Writing Out Decayed Event file '
862+ write(*,*) ' '
863+ rewind(lunw)
864+ done=.false.
865+ nevent=0
866+ do i=0,sizeievent
867+ sum(i)=0d0
868+ maxwgt(i)=-1d0
869+ enddo
870+ do while (.not. done)
871+ call read_event(lunw,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff2,done)
872+ if(.not.done) then
873+ eventnumber=eventnr(ievent)
874+ sum(eventnumber)=sum(eventnumber)+wgt
875+ maxwgt(eventnumber) = max(wgt,maxwgt(eventnumber))
876+ nevent=nevent+1
877+ endif
878+ enddo
879+ sum(0)=0d0
880+ maxwgt(0)=-1d0
881+ do i=1, sizeievent
882+ sum(0)=sum(0)+sum(i)
883+ maxwgt(0)=maxwgt(0)+maxwgt(i)
884+ enddo
885+
886+c RF: To write the correct iseed in the banner, read it again form file iseed.dat
887+ open(lunrnd,file='./iseed.dat',status="old",err=300)
888+ read(lunrnd,err=300,end=300,fmt='(i10)') iseed
889+ iseed=iseed+1
890+ close(lunrnd)
891+ 300 continue
892+cend RF
893+
894+
895+ write(*,*) '----------------------------------------------'
896+ write(*,*) ' Output events information '
897+ write(*,*) '----------------------------------------------'
898+ write(*,*) ' '
899+ write(*,*) ' Output Event file : ',outfile
900+ write(*,*) ' Number of Events : ',nevent
901+ write(*,*) ' Integrated weight (pb) : ',sum(0)
902+ write(*,*) ' Max wgt : ',maxwgt(0)
903+ write(*,*) ' Average wgt : ',sum(0)/nevent
904+ write(*,*) ' '
905+c
906+ if(newbanner) then
907+ write(luni,'(a)') "<MGDecayInfo>"
908+ else
909+ write(luni,'(a)') "#********************************************************************"
910+ write(luni,'(a)') '# particle decayed '
911+ write(luni,'(a)') "#********************************************************************"
912+ endif
913+ write(luni,'(a,a3)') '# particle name : ',id(ip)
914+ write(luni,'(a,a)') '# decay mode : ',dec_name
915+ write(luni,'(a,e10.5)') '# MC partial width: ',MC_width
916+ write(luni,'(a,i10 )') '# Rnd seed : ',iseed
917+ write(luni,'(a,i10 )') '# Number of Events : ',nevent
918+ write(luni,'(a,e10.5)') '# Integrated weight (pb): ',sum(0)
919+ write(luni,'(a,e10.5)') '# Max wgt : ',maxwgt(0)
920+ write(luni,'(a,e10.5)') '# Average wgt : ',sum(0)/nevent
921+ if(newbanner) then
922+ write(luni,'(a)') '</MGDecayInfo>'
923+ write(luni,'(a)') '</header>'
924+ else
925+ write(luni,'(a)') '#********************************************************************'
926+ write(luni,'(a)') '-->'
927+ endif
928+
929+
930+C Write out compulsory init info
931+ write(luni,'(a)') '<init>'
932+
933+ rewind(lunr)
934+ do while(index(buff,'</init') .eq. 0)
935+ read(lunr,'(a132)',err=99) buff
936+ if (index(buff,'<init') .eq. 0) cycle
937+ read(lunr,*) (idbmup(i),i=1,2),(ebmup(i),i=1,2),(pdfgup(i),i=1,2),
938+ $ (pdfsup(i),i=1,2),idwtup,nprup
939+ write(luni,90) (idbmup(i),i=1,2),(ebmup(i),i=1,2),(pdfgup(i),i=1,2),
940+ $ (pdfsup(i),i=1,2),idwtup,nprup
941+ do i=1,sizeievent
942+ read(lunr,*) xsecup,xerrup,xmaxup,lprup
943+ write(luni,91) sum(i),xerrup*sum(i)/xsecup,maxwgt(i),lprup
944+ enddo
945+ enddo
946+ write(luni,'(a)') '</init>'
947+
948+ 90 FORMAT(2i6,2e19.11,2i2,2i6,i2,i3)
949+ 91 FORMAT(3e19.11,i4)
950+
951+ rewind(lunw)
952+ i=0
953+ done = .false.
954+ do while (.not. done)
955+ call read_event(lunw,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff2,done)
956+
957+ if (.not. done) then
958+ call write_event(luni,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff2)
959+
960+ endif
961+ i=i+1
962+ enddo
963+
964+
965+ 98 continue
966+
967+ write(luni,'(a)')'</LesHouchesEvents>'
968+
969+c
970+c close datafiles
971+c
972+ close(luni)
973+ close(lunr)
974+ close(lunw)
975+
976+ stop
977+
978+ 99 write(*,*) 'error'
979+ stop
980+
981+ end
982+
983+
984+
985+ integer function eventnr(number)
986+c*************************************************************************
987+c function that should be given a number and returns
988+c the number:
989+c 1 for the first number (i.e. the first time this
990+c function gets executed)
991+c 2 for the second number if the second number is
992+c diffent from the first, otherwise it returns 1
993+c 3 for the third number, if the third number is
994+c different from the first or second, otherwise
995+c it returns 1, or 2 depending if the third number
996+c is equal to the first or the second.
997+c 4 etc.
998+c It updates also a common block with the total number
999+c of different values used as the argument of this function
1000+c
1001+c before the first call to this function sizeievent should
1002+c should be set to 0.
1003+c*************************************************************************
1004+ include "decay.inc"
1005+ integer i,number,test(maxievent)
1006+ logical exist
1007+
1008+ integer sizeievent
1009+ common/ievents/sizeievent
1010+
1011+ save test
1012+
1013+ exist = .false.
1014+ if (sizeievent.lt.1)goto 188
1015+ do i=1, sizeievent
1016+ if (number.eq.test(i))then
1017+ exist=.true.
1018+ eventnr=i
1019+ endif
1020+ enddo
1021+
1022+ 188 continue
1023+ if (.not.exist)then
1024+ sizeievent=sizeievent+1
1025+ eventnr=sizeievent
1026+ test(sizeievent)=number
1027+ endif
1028+
1029+ if (sizeievent.ge.maxievent)then
1030+ write (*,*)
1031+ & 'Error, too many different event numbers in event file'
1032+ return
1033+ endif
1034+
1035+ return
1036+ end
1037+
1038+
1039+
1040+
1041+
1042+
1043+ subroutine set_id
1044+c****************************************
1045+c to set the particles ids
1046+*****************************************
1047+ implicit none
1048+ include 'decay.inc'
1049+c
1050+c
1051+c-Quarks: d u s c b t d~ u~ s~ c~ b~ t~
1052+ id(1) ='d'
1053+ id(2) ='u'
1054+ id(3) ='s'
1055+ id(4) ='c'
1056+ id(5) ='b'
1057+ id(6) ='t'
1058+ id(-1)='d~'
1059+ id(-2)='u~'
1060+ id(-3)='s~'
1061+ id(-4)='c~'
1062+ id(-5)='b~'
1063+ id(-6)='t~'
1064+c-Leptons: e- mu- ta- ve vm vt e+ mu+ ta+ ve~ vm~ vt~
1065+ id(11) ='e-'
1066+ id(12) ='ve'
1067+ id(13) ='mu-'
1068+ id(14) ='vm'
1069+ id(15) ='ta-'
1070+ id(16) ='vt'
1071+ id(-11)='e+'
1072+ id(-12)='ve~'
1073+ id(-13)='mu+'
1074+ id(-14)='vm~'
1075+ id(-15)='ta+'
1076+ id(-16)='vt~'
1077+c-Bosons: g a z w+ w- h
1078+ id(21) ='g'
1079+ id(22) ='a'
1080+ id(23) ='z'
1081+ id(24) ='w+'
1082+ id(-24) ='w-'
1083+ id(25) ='h'
1084+ return
1085+ end
1086+
1087+
1088+ subroutine set_mass
1089+c****************************************
1090+c to set the particles ids
1091+*****************************************
1092+ implicit none
1093+ include 'decay.inc'
1094+ include 'coupl.inc'
1095+c
1096+c
1097+c-Quarks: d u s c b t d~ u~ s~ c~ b~ t~
1098+ pdgmass(1) =0d0
1099+ pdgmass(2) =0d0
1100+ pdgmass(3) =0d0
1101+ pdgmass(4) =cmass
1102+ pdgmass(5) =bmass
1103+ pdgmass(6) =tmass
1104+ pdgmass(-1)=0d0
1105+ pdgmass(-2)=0d0
1106+ pdgmass(-3)=0d0
1107+ pdgmass(-4)=cmass
1108+ pdgmass(-5)=bmass
1109+ pdgmass(-6)=tmass
1110+c-Leptons: e- mu- ta- ve vm vt e+ mu+ ta+ ve~ vm~ vt~
1111+ pdgmass(11) =0d0
1112+ pdgmass(12) =0d0
1113+ pdgmass(13) =0d0
1114+ pdgmass(14) =0d0
1115+ pdgmass(15) =lmass
1116+ pdgmass(16) =0d0
1117+ pdgmass(-11)=0d0
1118+ pdgmass(-12)=0d0
1119+ pdgmass(-13)=0d0
1120+ pdgmass(-14)=0d0
1121+ pdgmass(-15)=lmass
1122+ pdgmass(-16)=0d0
1123+c-Bosons: g a z w+ w- h
1124+ pdgmass(21) =0d0
1125+ pdgmass(22) =0d0
1126+ pdgmass(23) =zmass
1127+ pdgmass(24) =wmass
1128+ pdgmass(-24) =wmass
1129+ pdgmass(25) =hmass
1130+ return
1131+ end
1132+
1133+ subroutine decay_modes(dec_name)
1134+c*********************************************
1135+c to set the particles ids
1136+c*********************************************
1137+ implicit none
1138+ include 'decay.inc'
1139+c
1140+c argument
1141+c
1142+ character*50 dec_name
1143+c
1144+c common
1145+c
1146+ include 'coupl.inc'
1147+c
1148+c local
1149+c
1150+ character*50 string(30)
1151+ integer i
1152+c----------
1153+c START
1154+c----------
1155+
1156+ write(*,*) 'particle to decay :',id(ip)
1157+ write(*,*)
1158+ write(*,*) 'Implemented decay modes:'
1159+ write(*,*) '------------------------'
1160+c
1161+ if(ip.eq.6) then !top
1162+ string(1) = ' t -> b w+ '
1163+ string(2) = ' t -> b ve e+'
1164+ string(3) = ' t -> b vm mu+'
1165+ string(4) = ' t -> b vt ta+'
1166+ string(5) = ' t -> b vl l+ (e+mu)'
1167+ string(6) = ' t -> b vl l+ (e+mu+ta)'
1168+ string(7) = ' t -> b j j (ud+cs)'
1169+ string(8) = ' t -> b anything (e+mu+ta+ud+cs)'
1170+
1171+ write(*,'(i2,2x,a40)') (i,string(i),i=1,8)
1172+ write(*,*) ' '
1173+ write(*,*) 'your choice is:'
1174+ read (*,*) imode
1175+ if(.not.(imode.ge.1.and.imode.le.8)) then
1176+ write(*,*) 'choice not implemented'
1177+ imode=0
1178+ return
1179+ endif
1180+ if(imode.eq.1) then !number of particles in the decay
1181+ nd=2
1182+ else
1183+ nd=3
1184+ endif
1185+ dec_name=string(imode)
1186+ m1=tmass
1187+ return
1188+ endif
1189+c
1190+ if(ip.eq.-6) then !anti-top
1191+ string(1) = ' t~ -> b~ w- '
1192+ string(2) = ' t~ -> b~ e- ve~'
1193+ string(3) = ' t~ -> b~ mu- vm~'
1194+ string(4) = ' t~ -> b~ ta- vt~'
1195+ string(5) = ' t~ -> b~ l- vl~ (e+mu)'
1196+ string(6) = ' t~ -> b~ l- vl~ (e+mu+ta)'
1197+ string(7) = ' t~ -> b~ j j (ud+cs)'
1198+ string(8) = ' t~ -> b~ anything (e+mu+ta+ud+cs)'
1199+ write(*,'(i2,2x,a40)') (i,string(i),i=1,8)
1200+ write(*,*) ' '
1201+ write(*,*) 'your choice is:'
1202+ read (*,*) imode
1203+ if(.not.(imode.ge.1.and.imode.le.8)) then
1204+ write(*,*) 'choice not implemented'
1205+ imode=0
1206+ return
1207+ endif
1208+ if(imode.eq.1) then !number of particles in the decay
1209+ nd=2
1210+ else
1211+ nd=3
1212+ endif
1213+ m1=tmass
1214+ dec_name=string(imode)
1215+ return
1216+ endif
1217+c
1218+ if(ip.eq.15) then ! tau-
1219+ string(1) = ' ta- -> vt e- ve~ '
1220+ string(2) = ' ta- -> vt mu- vm~ '
1221+ string(3) = ' ta- -> vt l- vl~ (e+mu) '
1222+ string(4) = ' ta- -> vt pi- '
1223+ string(5) = ' ta- -> vt rho(770)-'
1224+ write(*,'(i2,2x,a30)') (i,string(i),i=1,5)
1225+ write(*,*) ' '
1226+ write(*,*) 'your choice is:'
1227+ read (*,*) imode
1228+ if(.not.(imode.ge.1.and.imode.le.5)) then
1229+ write(*,*) 'choice not implemented'
1230+ imode=0
1231+ return
1232+ endif
1233+ if(imode.le.3) then !number of particles in the decay
1234+ nd=3
1235+ else
1236+ nd=2
1237+ endif
1238+ m1=lmass
1239+ dec_name=string(imode)
1240+ return
1241+ endif
1242+c
1243+ if(ip.eq.-15) then ! tau+
1244+ string(1) = ' ta+ -> vt~ ve e+ '
1245+ string(2) = ' ta+ -> vt~ vm mu+ '
1246+ string(3) = ' ta+ -> vt~ vl l+ (e+mu)'
1247+ string(4) = ' ta+ -> vt~ pi+ '
1248+ string(5) = ' ta+ -> vt~ rho(770)+'
1249+ write(*,'(i2,2x,a30)') (i,string(i),i=1,5)
1250+ write(*,*) ' '
1251+ write(*,*) 'your choice is:'
1252+ read (*,*) imode
1253+ if(.not.(imode.ge.1.and.imode.le.5)) then
1254+ write(*,*) 'choice not implemented'
1255+ imode=0
1256+ endif
1257+ if(imode.le.3) then !number of particles in the decay
1258+ nd=3
1259+ else
1260+ nd=2
1261+ endif
1262+ m1=lmass
1263+ dec_name=string(imode)
1264+ return
1265+ endif
1266+c
1267+ if(ip.eq.23) then ! z
1268+ string(1) = ' z -> e- e+ '
1269+ string(2) = ' z -> mu- mu+ '
1270+ string(3) = ' z -> ta- ta+ '
1271+ string(4) = ' z -> l- l+ (e+mu)'
1272+ string(5) = ' z -> l- l+ (e+mu+ta )'
1273+ string(6) = ' z -> vl vl~ (ve+vm+vt)'
1274+ string(7) = ' z -> b b~ '
1275+ string(8) = ' z -> c c~ '
1276+ string(9) = ' z -> j j~ (u+d+c+s) '
1277+ string(10)= ' z -> j j~ (u+d+c+s+b)'
1278+ string(11)= ' z -> visible (e+mu+ta+u+d+c+s+b)'
1279+ string(12)= ' z -> anything'
1280+
1281+ write(*,'(i2,2x,a40)') (i,string(i),i=1,10)
1282+ write(*,*) ' '
1283+ write(*,*) 'your choice is:'
1284+ read (*,*) imode
1285+ if(.not.(imode.ge.1.and.imode.le.12)) then
1286+ write(*,*) 'choice not implemented'
1287+ imode=0
1288+ return
1289+ endif
1290+ m1=zmass
1291+ nd=2 !number of particles in the decay
1292+ dec_name=string(imode)
1293+ return
1294+ endif
1295+c
1296+ if(ip.eq.24) then ! w+
1297+ string(1) = ' w+ -> e+ ve'
1298+ string(2) = ' w+ -> mu+ vm'
1299+ string(3) = ' w+ -> ta+ vt '
1300+ string(4) = ' w+ -> l+ vl (e+mu)'
1301+ string(5) = ' w+ -> l+ vl (e+mu+ta)'
1302+ string(6) = ' w+ -> j j (ud+cs)'
1303+ string(7) = ' w+ -> anything (e+mu+ta+ud+cs)'
1304+
1305+ write(*,'(i2,2x,a40)') (i,string(i),i=1,7)
1306+ write(*,*) 'your choice is:'
1307+ write(*,*) ' '
1308+ read (*,*) imode
1309+ if(.not.(imode.ge.1.and.imode.le.7)) then
1310+ write(*,*) 'choice not implemented'
1311+ imode=0
1312+ endif
1313+ nd=2 !number of particles in the decay
1314+ m1=wmass
1315+ dec_name=string(imode)
1316+ return
1317+ endif
1318+c
1319+ if(ip.eq.-24) then ! w-
1320+ string(1) = ' w- -> e- ve~'
1321+ string(2) = ' w- -> mu- vm~'
1322+ string(3) = ' w- -> ta- vt~ '
1323+ string(4) = ' w- -> l- vl~ (e+mu)'
1324+ string(5) = ' w- -> l- vl~ (e+mu+ta)'
1325+ string(6) = ' w- -> j j (ud+cs)'
1326+ string(7) = ' w- -> anything (e+mu+ta+ud+cs)'
1327+ write(*,'(i2,2x,a40)') (i,string(i),i=1,7)
1328+ write(*,*) 'your choice is:'
1329+ write(*,*) ' '
1330+ read (*,*) imode
1331+ if(.not.(imode.ge.1.and.imode.le.7)) then
1332+ write(*,*) 'choice not implemented'
1333+ imode=0
1334+ return
1335+ endif
1336+ m1=wmass
1337+ nd=2 !number of particles in the decay
1338+ dec_name=string(imode)
1339+ return
1340+ endif
1341+c
1342+ if(ip.eq.25) then ! h
1343+ string(1) =' h -> b b~ '
1344+ string(2) =' h -> ta- ta+'
1345+ string(3) =' h -> mu- mu+'
1346+ string(4) =' h -> c c~ '
1347+ string(5) =' h -> t t~ (when m_h>2*m_t)'
1348+ string(6) =' h -> g g '
1349+ string(7) =' h -> a a '
1350+ string(8) =' h -> z a (when m_h> m_z)'
1351+ string(9) =' h -> w+ w- (when m_h>2*m_w)'
1352+ string(10)=" h -> w* w -> l vl l' vl' (l,l'=e,mu)"
1353+ string(11)=" h -> w* w -> l vl l' vl' (l,l'=e,mu,ta)"
1354+ string(12)=" h -> w* w -> j j l vl (jj=ud,cs;l=e,mu)"
1355+ string(13)=" h -> w* w -> j j l vl (jj=ud,cs;l=e,mu,ta)"
1356+ string(14)=' h -> z z (when m_h>2*m_z)'
1357+ string(15)=" h -> z* z -> l- l+ l-' l+'(l,l'=e,mu)"
1358+ string(16)=" h -> z* z -> l- l+ l-' l+'(l,l'=e,mu,ta)"
1359+ string(17)=" h -> z* z -> j j~ l- l+ (j=u,d,c,s;l=e,mu )"
1360+ string(18)=" h -> z* z -> j j~ l- l+ (j=u,d,c,s;l=e,mu,ta)"
1361+ string(19)=" h -> z* z -> b b~ l- l+ (l=e,mu )"
1362+ string(20)=" h -> z* z -> b b~ l- l+ (l=e,mu,ta )"
1363+ string(21)=" h -> z* z -> vl vl~ l-' l+'(l=e,mu,ta;l'=e,mu) "
1364+ string(22)=" h -> z* z -> vl vl~ l-' l+'(l,l'=e,mu,ta) "
1365+
1366+ write(*,'(i2,2x,a50)') (i,string(i),i=1,22)
1367+ write(*,*) 'your choice is:'
1368+ write(*,*) ' '
1369+ read (*,*) imode
1370+ if(.not.(imode.ge.1.and.imode.le.22)) then
1371+ write(*,*) 'choice not implemented'
1372+ imode=0
1373+ return
1374+ endif
1375+c-- number of decay products
1376+ ND=4
1377+ m1=hmass
1378+ if(imode.le.9.or.imode.eq.14) ND=2
1379+ dec_name=string(imode)
1380+ return
1381+ endif
1382+
1383+ write(*,*) 'no decay mode implemented for particle ',id(ip)
1384+
1385+
1386+ return
1387+ end
1388+
1389+
1390+ double precision function dot(p1,p2)
1391+C****************************************************************************
1392+C 4-Vector Dot product
1393+C****************************************************************************
1394+ implicit none
1395+ double precision p1(0:3),p2(0:3)
1396+ dot=p1(0)*p2(0)-p1(1)*p2(1)-p1(2)*p2(2)-p1(3)*p2(3)
1397+ end
1398+
1399+
1400+ subroutine init
1401+c********************************************************
1402+c sets up : the branching ratios (best=HDECAY or PDG)
1403+c LO partial widths
1404+c ND: the number of decay products
1405+c********************************************************
1406+ implicit none
1407+c
1408+c Include
1409+c
1410+ include 'decay.inc'
1411+ include 'coupl.inc'
1412+ include 'calc_values.inc'
1413+c
1414+c-----
1415+cstart
1416+c-----
1417+c
1418+
1419+c
1420+c PDG2002 values for the Branching ratios:
1421+c
1422+
1423+c-- tau
1424+ br_ta_lv =0.175d0
1425+ br_ta_pi =0.111d0
1426+ br_ta_ro =0.254d0
1427+c-- w
1428+ br_w_lv =0.1068d0
1429+ br_w_jj =1d0-3d0*br_w_lv
1430+c-- z
1431+ br_z_ll =0.0336d0
1432+ br_z_vv =0.2000d0
1433+ br_z_cc =0.1176d0
1434+ br_z_bb =0.1514d0
1435+ br_z_jj =0.6991d0-br_z_cc-br_z_bb
1436+
1437+ write(*,*)
1438+ write(*,*) '----------------------------------------------'
1439+ write(*,*) ' Relevant branching ratios '
1440+ write(*,*) '----------------------------------------------'
1441+ write(*,*)
1442+
1443+c-------------------------------------------------------------------
1444+ if(abs(ip).eq.6) then !top
1445+
1446+
1447+ write(*,16) 'BR (t -> b w ) = ', 1d0
1448+ bratio=1d0
1449+ if(imode.eq.2) then
1450+ write(*,16) 'BR (w -> e ve ) = ', br_w_lv
1451+ bratio=br_w_lv
1452+ elseif(imode.eq.3) then
1453+ write(*,16) 'BR (w -> mu vm ) = ', br_w_lv
1454+ bratio=br_w_lv
1455+ elseif(imode.eq.4) then
1456+ write(*,16) 'BR (w -> tau vt ) = ', br_w_lv
1457+ bratio=br_w_lv
1458+ elseif(imode.eq.5) then
1459+ write(*,15) 'BR (w -> l vl ) = ', 2d0*br_w_lv,' (l=e,mu)'
1460+ bratio=2d0*br_w_lv
1461+ elseif(imode.eq.6) then
1462+ write(*,15) 'BR (w -> l vl ) = ', 3d0*br_w_lv,' (l=e,mu,ta)'
1463+ bratio=3d0*br_w_lv
1464+ elseif(imode.eq.7) then
1465+ write(*,15) 'BR (w -> j j ) = ', br_w_jj ,' (jj=ud+cs)'
1466+ bratio=br_w_jj
1467+ elseif(imode.eq.8) then
1468+ write(*,15) 'BR (w ->anything) = ',1d0
1469+ bratio=1d0
1470+ endif
1471+
1472+ If(imode.eq.1) then !t -> b w+
1473+ calc_width=twidth
1474+ elseif(imode.eq.2.or.imode.eq.3.or.imode.eq.5) then ! t -> b vl l+
1475+ calc_width=twidth*(w_w_nl/wwidth)
1476+ if(imode.eq.5) calc_width=calc_width*2d0
1477+ elseif(imode.eq.4) then ! t -> b vt tau+
1478+ calc_width=twidth*(w_w_tau/wwidth)
1479+ elseif(imode.eq.6) then ! t -> b vl l+
1480+ calc_width=twidth*((2d0*w_w_nl+w_w_tau)/wwidth)
1481+ elseif(imode.eq.7) then ! t -> b j j
1482+ calc_width=twidth*(w_w_ud+w_w_cs)/wwidth
1483+ elseif(imode.eq.8) then ! t -> b anything
1484+ calc_width=twidth
1485+ endif
1486+
1487+ endif
1488+c-------------------------------------------------------------------
1489+ if(abs(ip).eq.15) then !tau
1490+ if(imode.eq.1) then
1491+ write(*,16) 'BR (ta -> vt e ve) = ', br_ta_lv
1492+ bratio=br_ta_lv
1493+ elseif(imode.eq.2) then
1494+ write(*,16) 'BR (ta -> vt mu vm) = ', br_ta_lv
1495+ bratio=br_ta_lv
1496+ elseif(imode.eq.3) then
1497+ write(*,15) 'BR (ta -> vt l vl) = ', 2d0*br_ta_lv,' (l=e,mu)'
1498+ bratio=2d0*br_ta_lv
1499+ elseif(imode.eq.4) then
1500+ write(*,16) 'BR (ta -> vt pi ) = ', br_ta_pi
1501+ bratio=br_ta_pi
1502+ elseif(imode.eq.5) then
1503+ write(*,16) 'BR (ta -> vt rho ) = ', br_ta_ro
1504+ bratio=br_ta_ro
1505+ endif
1506+
1507+ if(imode.eq.1.or.imode.eq.2) then !ta -> vt vl l
1508+ calc_width=lwidth*br_ta_lv
1509+ elseIf(imode.eq.3) then
1510+ calc_width=2d0*lwidth*br_ta_lv
1511+ elseIf(imode.eq.5) then ! tau -> vt rho
1512+ calc_width=lwidth*br_ta_ro
1513+ elseif(imode.eq.4) then ! tau -> vt pi
1514+ calc_width=lwidth*br_ta_pi
1515+ endif
1516+
1517+ endif
1518+
1519+c-------------------------------------------------------------------
1520+ if(ip.eq.23) then ! z
1521+ if (imode.eq.1) then
1522+ write(*,16) 'BR (z -> e- e+ ) = ', br_z_ll
1523+ bratio=br_z_ll
1524+ elseif(imode.eq.2) then
1525+ write(*,16) 'BR (z -> mu- mu+) = ', br_z_ll
1526+ bratio=br_z_ll
1527+ elseif(imode.eq.3) then
1528+ write(*,16) 'BR (z -> ta- ta+) = ', br_z_ll
1529+ bratio=br_z_ll
1530+ elseif(imode.eq.4) then
1531+ write(*,15) 'BR (z -> l- l+ ) = ', 2d0*br_z_ll,' (l=e,mu)'
1532+ bratio=2d0*br_z_ll
1533+ elseif(imode.eq.5) then
1534+ write(*,15) 'BR (z -> l- l+ ) = ', 3d0*br_z_ll,' (l=e,mu,ta)'
1535+ bratio=3d0*br_z_ll
1536+ elseif(imode.eq.6) then
1537+ write(*,15) 'BR (z -> vl vl~ ) = ', br_z_vv,' (l=e,mu,ta)'
1538+ bratio=br_z_vv
1539+ elseif(imode.eq.7) then
1540+ write(*,16) 'BR (z -> b b~ ) = ', br_z_bb
1541+ bratio=br_z_bb
1542+ elseif(imode.eq.8)then
1543+ write(*,16) 'BR (z -> c c~ ) = ', br_z_cc
1544+ bratio=br_z_cc
1545+ elseif(imode.eq.9)then
1546+ write(*,15) 'BR (z -> j j~ ) = ', br_z_jj+br_z_cc,
1547+ & ' (j=u+d+c+s)'
1548+ bratio=br_z_jj+br_z_cc
1549+ elseif(imode.eq.10)then
1550+ write(*,15) 'BR (z -> j j~ ) = ',
1551+ & br_z_jj+br_z_bb+br_z_cc,' (j=u+d+c+s+b)'
1552+ bratio=br_z_jj+br_z_bb+br_z_cc
1553+ elseif(imode.eq.11)then
1554+ write(*,15) 'BR (z -> visible) = ',
1555+ & br_z_jj+br_z_bb+br_z_cc+3d0*br_z_ll,
1556+ & ' (j=l+j)'
1557+ bratio=br_z_jj+br_z_bb+br_z_cc+3d0*br_z_ll
1558+ elseif(imode.eq.12)then
1559+ write(*,15) 'BR (z -> anyth. ) = ',
1560+ & 1d0,' (j=l+v+j)'
1561+ bratio=1d0
1562+ endif
1563+
1564+
1565+ If(imode.eq.1.or.imode.eq.2) then ! z->e- e+
1566+ calc_width=w_z_ll
1567+ elseif(imode.eq.4) then ! z->e- e+,mu-mu+,ta-ta+
1568+ calc_width=2d0*w_z_ll
1569+ elseif(imode.eq.3) then ! z->ta- ta+
1570+ calc_width=w_z_tau
1571+ elseif(imode.eq.5) then ! z->e- e+,mu-mu+,ta-ta+
1572+ calc_width=2d0*w_z_ll+w_z_tau
1573+ elseif(imode.eq.6) then ! z-> vl vl~
1574+ calc_width=w_z_nn*3d0
1575+ elseif(imode.eq.7) then ! z->b b~
1576+ calc_width=w_z_bb
1577+ elseif(imode.eq.8) then ! z->c c~
1578+ calc_width=w_z_cc
1579+ elseif(imode.eq.9) then ! z->jj (u+d+c+s)
1580+ calc_width=Two*w_z_dd + w_z_uu + w_z_cc
1581+ elseif(imode.eq.10) then !* z->jj (u+d+c+s+b)
1582+ calc_width=Two*w_z_dd + w_z_uu + w_z_cc + w_z_bb
1583+ elseif(imode.eq.11) then !* z->any (l+u+d+c+s+b)
1584+ calc_width=zwidth-w_z_nn*3d0
1585+ elseif(imode.eq.12) then !* total width
1586+ calc_width=zwidth
1587+ endif
1588+ endif
1589+
1590+c-------------------------------------------------------------------
1591+ if(abs(ip).eq.24) then ! w
1592+ if (imode.eq.1) then
1593+ write(*,16) 'BR (w -> e ve ) = ', br_w_lv
1594+ bratio=br_w_lv
1595+ elseif(imode.eq.2) then
1596+ write(*,16) 'BR (w -> mu vm ) = ', br_w_lv
1597+ bratio=br_w_lv
1598+ elseif(imode.eq.3) then
1599+ write(*,16) 'BR (w -> tau vt ) = ', br_w_lv
1600+ bratio=br_w_lv
1601+ elseif(imode.eq.4) then
1602+ write(*,15) 'BR (w -> l vl ) = ', 2d0*br_w_lv,' (l=e,mu)'
1603+ bratio=2d0*br_w_lv
1604+ elseif(imode.eq.5) then
1605+ write(*,15) 'BR (w -> l vl ) = ', 3d0*br_w_lv,' (l=e,mu,ta)'
1606+ bratio=3d0*br_w_lv
1607+ elseif(imode.eq.6) then
1608+ write(*,15) 'BR (w -> j j ) = ', br_w_jj ,' (jj=ud+cs)'
1609+ bratio=br_w_jj
1610+ elseif(imode.eq.7) then
1611+ write(*,15) 'BR (w ->anything) = 1 (=e+mu+ta+ud+cs)'
1612+ bratio=1d0
1613+ endif
1614+
1615+ If(imode.eq.1.or.imode.eq.2) then !w-> l ve
1616+ calc_width=w_w_nl
1617+ elseif(imode.eq.3) then ! w -> ta vt
1618+ calc_width=w_w_tau
1619+ elseif(imode.eq.4) then ! w -> l vl (e,mu)
1620+ calc_width=2d0*w_w_nl
1621+ elseif(imode.eq.5) then ! w -> l vl (e,mu,tau)
1622+ calc_width=2d0*w_w_nl+w_w_tau
1623+ elseif(imode.eq.6) then ! w -> ud+cs
1624+ calc_width=w_w_ud+w_w_cs
1625+ elseif(imode.eq.7) then ! w -> anything
1626+ calc_width=wwidth
1627+ endif
1628+
1629+ endif
1630+
1631+c-------------------------------------------------------------------
1632+ if(ip.eq.25) then ! higgs
1633+
1634+ write(*,15) 'Higgs mass = ', hmass, ' GeV'
1635+ write(*,15) 'Higgs tot width = ', SMWDTH, ' GeV'
1636+ if(imode.eq.1) then
1637+ write(*,16) 'BR (h -> b b~ ) = ', SMBRB
1638+ bratio=SMBRB
1639+ elseif(imode.eq.2) then
1640+ write(*,16) 'BR (h -> ta+ ta-) = ', SMBRL
1641+ bratio=SMBRL
1642+ elseif(imode.eq.3) then
1643+ write(*,16) 'BR (h -> mu+ mu-) = ', SMBRM
1644+ bratio=SMBRM
1645+ elseif(imode.eq.4) then
1646+ write(*,16) 'BR (h -> c c~ ) = ', SMBRC
1647+ bratio=SMBRC
1648+ elseif(imode.eq.5) then
1649+ write(*,16) 'BR (h -> t t~ ) = ', SMBRT
1650+ bratio=SMBRT
1651+ elseif(imode.eq.6) then
1652+ write(*,16) 'BR (h -> g g ) = ', SMBRG
1653+ bratio=SMBRG
1654+ elseif(imode.eq.7) then
1655+ write(*,16) 'BR (h -> a a ) = ', SMBRGA
1656+ bratio=SMBRGA
1657+ elseif(imode.eq.8) then
1658+ write(*,16) 'BR (h -> z a ) = ', SMBRZGA
1659+ bratio=SMBRZGA
1660+ elseif(imode.ge.9.and.imode.le.13) then
1661+ write(*,16) 'BR (h -> w+ w- ) = ', SMBRW
1662+ bratio=SMBRW
1663+ elseif(imode.ge.14.and.imode.le.22) then
1664+ write(*,16) 'BR (h -> z z ) = ', SMBRZ
1665+ bratio=SMBRZ
1666+ endif
1667+
1668+ if(imode.eq.10) then
1669+ write(*,15) 'BR (w -> l vl ) = ', 2d0*br_w_lv,' (l=e,mu)'
1670+ bratio=bratio*(2d0*br_w_lv)**2
1671+ elseif(imode.eq.11) then
1672+ write(*,15) 'BR (w -> l vl ) = ', 3d0*br_w_lv,' (l=e,mu,ta)'
1673+ bratio=bratio*(3d0*br_w_lv)**2
1674+ elseif(imode.eq.12) then
1675+ write(*,15) 'BR (w -> j j ) = ', br_w_jj ,' (jj=ud+cs)'
1676+ write(*,15) 'BR (w -> l vl ) = ', 2d0*br_w_lv,' (l=e,mu)'
1677+ bratio=bratio*2d0*br_w_jj*2d0*br_w_lv
1678+ elseif(imode.eq.13) then
1679+ write(*,15) 'BR (w -> j j ) = ', br_w_jj ,' (jj=ud+cs)'
1680+ write(*,15) 'BR (w -> l vl ) = ', 3d0*br_w_lv,' (l=e,mu,ta)'
1681+ bratio=bratio*2d0*br_w_jj*3d0*br_w_lv
1682+ endif
1683+
1684+ if(imode.eq.15) then
1685+ write(*,15) 'BR (z -> l- l+ ) = ', 2d0*br_z_ll,' (l=e,mu)'
1686+ bratio=bratio*(2d0*br_z_ll)**2
1687+ elseif(imode.eq.16) then
1688+ write(*,15) 'BR (z -> l- l+ ) = ', 3d0*br_z_ll,' (l=e,mu,ta)'
1689+ bratio=bratio*(3d0*br_z_ll)**2
1690+ elseif(imode.eq.17) then
1691+ write(*,15) 'BR (z -> j j~ ) = ', br_z_jj+br_z_cc,
1692+ & ' (j=u+d+c+s)'
1693+ write(*,15) 'BR (z -> l- l+ ) = ', 2d0*br_z_ll,' (l=e,mu)'
1694+ bratio=bratio*(br_z_jj+br_z_cc)*2d0*br_z_ll*2d0
1695+ elseif(imode.eq.18) then
1696+ write(*,15) 'BR (z -> j j~ ) = ', br_z_jj+br_z_cc,
1697+ & ' (j=u+d+c+s)'
1698+ write(*,15) 'BR (z -> l- l+ ) = ', 3d0*br_z_ll,' (l=e,mu,ta)'
1699+ bratio=bratio*(br_z_jj+br_z_cc)*3d0*br_z_ll*2d0
1700+ elseif(imode.eq.19) then
1701+ write(*,16) 'BR (z -> b b~ ) = ', br_z_bb
1702+ write(*,15) 'BR (z -> l- l+ ) = ', 2d0*br_z_ll,' (l=e,mu)'
1703+ bratio=bratio*br_z_bb*2d0*br_z_ll*2d0
1704+ elseif(imode.eq.20) then
1705+ write(*,16) 'BR (z -> b b~ ) = ', br_z_bb
1706+ write(*,15) 'BR (z -> l- l+ ) = ', 3d0*br_z_ll,' (l=e,mu,ta)'
1707+ bratio=bratio*br_z_bb*3d0*br_z_ll*2d0
1708+ elseif(imode.eq.21) then
1709+ write(*,15) 'BR (z -> vl vl~ ) = ', br_z_vv,' (l=e,mu,ta)'
1710+ write(*,15) 'BR (z -> l- l+ ) = ', 2d0*br_z_ll,' (l=e,mu)'
1711+ bratio=bratio*br_z_vv*2d0*br_z_ll*2d0
1712+ elseif(imode.eq.22) then
1713+ write(*,15) 'BR (z -> vl vl~ ) = ', br_z_vv,' (l=e,mu,ta)'
1714+ write(*,15) 'BR (z -> l- l+ ) = ', 3d0*br_z_ll,' (l=e,mu,ta)'
1715+ bratio=bratio*br_z_vv*3d0*br_z_ll*2d0
1716+ endif
1717+
1718+
1719+ write(*,16) 'Best tot Br Ratio = ', bratio
1720+
1721+ If(imode.eq.1) then ! h->b b~
1722+ calc_width=w_h_bb
1723+ elseif(imode.eq.2) then ! h->ta- ta+
1724+ calc_width=w_h_tau
1725+ elseif(imode.eq.3) then ! h->mu- mu+
1726+ calc_width=w_h_tau/(lmass/0.105658389d0)**2
1727+ elseif(imode.eq.4) then ! h-> c c~
1728+ calc_width=w_h_cc
1729+ elseif(imode.eq.5) then ! h-> t t~
1730+ if(hmass.le.2d0*tmass) then
1731+ write(*,*)
1732+ write(*,*) 'Error: this decay mode assumes m_h>2 m_t'
1733+ write(*,*)
1734+ stop
1735+ endif
1736+ calc_width=w_h_tt
1737+ elseif(imode.eq.6) then ! h-> g g
1738+ calc_width=SMBRG*SMWDTH
1739+ elseif(imode.eq.7) then ! h-> a a
1740+ calc_width= SMBRGA*SMWDTH
1741+ elseif(imode.eq.8) then ! h-> z a
1742+ if(hmass.le.zmass) then
1743+ write(*,*)
1744+ write(*,*) 'Error: this decay mode assumes m_h>m_Z'
1745+ write(*,*)
1746+ stop
1747+ endif
1748+ calc_width= SMBRZGA*SMWDTH
1749+ elseif(imode.eq.9) then ! h-> w w
1750+ if(hmass.le.2d0*wmass) then
1751+ write(*,*)
1752+ write(*,*) 'Error: this decay mode assumes m_h>2*m_W'
1753+ write(*,*)
1754+ stop
1755+ endif
1756+ calc_width=w_h_ww
1757+ elseif(imode.eq.10) then ! h -> w* w -> e ve mu vmu
1758+ calc_width= SMBRW*SMWDTH*(2d0*w_w_nl/wwidth)**2
1759+ elseif(imode.eq.11) then ! h -> w* w -> l vl l' vl' (l,l'=e,mu,ta)
1760+ calc_width= SMBRW*SMWDTH*((2d0*w_w_nl+w_w_tau)/wwidth)**2
1761+ elseif(imode.eq.12) then ! h -> w* w -> j j l vl (jj=ud,cs;l=e,mu)
1762+ calc_width= SMBRW*SMWDTH*2d0*(2d0*w_w_nl*(w_w_ud+w_w_cs))/wwidth**2
1763+ elseif(imode.eq.13) then !h -> w* w -> j j l vl (jj=ud,cs;l=e,mu,ta)
1764+ calc_width= SMBRW*SMWDTH*2d0*
1765+ & ((2d0*w_w_nl+w_w_tau)*(w_w_ud+w_w_cs))/wwidth**2
1766+ elseif(imode.eq.14) then ! h-> z z
1767+ if(hmass.le.2d0*zmass) then
1768+ write(*,*)
1769+ write(*,*) 'Error: this decay mode assumes m_h>2*m_Z'
1770+ write(*,*)
1771+ stop
1772+ endif
1773+ calc_width=w_h_zz
1774+ elseif(imode.eq.15) then ! h -> z* z -> l- l+ l-' l+'(l,l'=e,mu)
1775+ calc_width= SMBRZ*SMWDTH*(2d0*w_z_ll/zwidth)**2
1776+ elseif(imode.eq.16) then ! h -> z* z -> l- l+ l-' l+'(l,l'=e,mu,ta)
1777+ calc_width= SMBRZ*SMWDTH*
1778+ & ((2d0*w_z_ll+w_z_tau)/zwidth)**2
1779+ elseif(imode.eq.17) then ! h -> z* z -> j j~ l- l+ (j=u,d,c,s;l=e,mu )
1780+ calc_width= SMBRZ*SMWDTH*2d0*
1781+ & (2d0*w_z_ll*(Two*w_z_dd + w_z_uu + w_z_cc))/zwidth**2
1782+ elseif(imode.eq.18) then ! h -> z* z -> j j~ l- l+ (j=u,d,c,s;l=e,mu,ta)
1783+ calc_width= SMBRZ*SMWDTH*2d0*
1784+ & ((2d0*w_z_ll+w_z_tau)*
1785+ & (Two*w_z_dd + w_z_uu + w_z_cc))/zwidth**2
1786+ elseif(imode.eq.19) then ! h -> z* z -> b b~ l- l+ (l=e,mu )
1787+ calc_width=SMBRZ*SMWDTH*2d0*
1788+ & w_z_ll*w_z_bb*2d0/zwidth**2
1789+ elseif(imode.eq.20) then ! h -> z* z -> b b~ l- l+ (l=e,mu,ta )
1790+ calc_width=SMBRZ*SMWDTH*2d0*
1791+ & (2d0*w_z_ll+w_z_tau)*w_z_bb/zwidth**2
1792+ elseif(imode.eq.21) then ! h -> z* z -> vl vl~ l-' l+'(l=e,mu,ta;l'=e,mu)
1793+ calc_width=SMBRZ*SMWDTH*2d0*
1794+ & 3d0*w_z_nn*2d0*w_z_ll/zwidth**2
1795+ elseif(imode.eq.22) then ! h -> z* z -> vl vl~ l-' l+'(l,l'=e,mu,ta)
1796+ calc_width=SMBRZ*SMWDTH*2d0*
1797+ & 3d0*w_z_nn*(2d0*w_z_ll+w_z_tau)/zwidth**2
1798+ endif
1799+
1800+ calc_br=calc_width/SMWDTH
1801+ write(*,16) 'Calc Br Ratio = ', calc_br
1802+
1803+ endif
1804+
1805+
1806+
1807+
1808+
1809+
1810+ 15 format( 3x,a,f9.5,a )
1811+ 16 format( 3x,a,f9.5 )
1812+
1813+
1814+
1815+ return
1816+ end
1817+
1818+
1819+ subroutine tot_decay
1820+c**********************************************************
1821+c vegas evaluation of the width
1822+c**********************************************************
1823+ implicit none
1824+ include 'decay.inc'
1825+c
1826+c LOCAL
1827+c
1828+ INTEGER init,itmx,ncall,nprn,ndim,i
1829+ REAL*4 region(2*mxdim),fxn,tgral,chi2a,sd
1830+ real*8 diff,eff,ave_wei
1831+ LOGICAL WRITEOUT
1832+ DATA WRITEOUT /.TRUE./
1833+c
1834+c EXTERNAL
1835+c
1836+ EXTERNAL FXN
1837+c
1838+c-----
1839+c Begin
1840+c-----
1841+c
1842+c
1843+c write out that calculation is going on
1844+c
1845+ write(*,*)
1846+ write(*,*) '----------------------------------------------'
1847+ write(*,*) ' MC Evaluation of the Partial Width '
1848+ write(*,*) '----------------------------------------------'
1849+c
1850+c-MC
1851+c
1852+ ndim =3*ND-4 !number of dimensions of the phase space
1853+c
1854+c-warm up
1855+c
1856+ init =0
1857+ ncall =100000
1858+ itmx =5
1859+ nprn =0
1860+ do i=1,ndim
1861+ region(i)=0E0
1862+ region(ndim+i)=1E0
1863+ enddo
1864+ call vegas(region,ndim,fxn,init,ncall,itmx,nprn,tgral,sd,chi2a)
1865+c
1866+c-final run
1867+c
1868+ mxwgt =0d0 !reset the maximum weight to zero
1869+ ncall =maxpoints
1870+ itmx =1 !only one large iteration
1871+ nprn =0
1872+ init =1
1873+ call vegas(region,ndim,fxn,init,ncall,itmx,nprn,tgral,sd,chi2a)
1874+c
1875+c-result
1876+c
1877+ MC_width=tgral
1878+ mxwgt=mxwgt*real(ncall)
1879+ eff=MC_width/mxwgt*100e0
1880+C
1881+C write results on the screen
1882+C
1883+ write(*,*) ' '
1884+ write(*,*) ' LO partial width = ' ,calc_width, ' GeV'
1885+ write(*,*) ' MC partial width = ' ,MC_width,' +-',sd,' GeV'
1886+ write(*,*) ' Max. wgt = ' ,mxwgt
1887+ write(*,1) ' Unwgt. Eff.(%) = ' ,eff
1888+ 1 format(1x,a21,1x,f4.1)
1889+c
1890+c write the result on a log file when WRITEOUT=.true.
1891+c
1892+ IF(WRITEOUT) THEN
1893+ open(lunout,file='all_decay.dat',status='unknown')
1894+ call toend(lunout)
1895+ diff=0d0
1896+ if(calc_width.gt.0d0) then
1897+ diff=(calc_width-MC_width)/(calc_width+MC_width)*100d0
1898+ endif
1899+ write(lunout,'(a3,2x,i2,2x,e12.5,2x,e10.5,
1900+ & 1x,f5.2,3x,e10.5,3x,f5.1)')
1901+ & id(ip),imode,calc_width,MC_width,diff,mxwgt,eff
1902+ close(lunout)
1903+ ENDIF
1904+
1905+
1906+ return
1907+ end
1908+
1909+
1910+ real*4 function fxn(xx,wgt)
1911+c**********************************************************
1912+c vegas evaluation of the width
1913+c**********************************************************
1914+ implicit none
1915+ include 'decay.inc'
1916+c
1917+c arguments
1918+c
1919+ real*4 xx(mxdim),wgt
1920+c
1921+c Local
1922+c
1923+ integer IDS(MaxDecPart),ICOL(2,MaxDecPart)
1924+ integer jhel(MaxDecPart)
1925+ double precision pd(0:3,MaxDecPart),px(0:3),weight
1926+ integer i
1927+c
1928+c External
1929+c
1930+ real xran1
1931+ integer iseed
1932+ data iseed/1/ !this value is irrelevant
1933+ integer get_hel
1934+c
1935+c Global
1936+c
1937+ include 'coupl.inc'
1938+ include 'calc_values.inc'
1939+c
1940+c-----
1941+c Begin
1942+c-----
1943+c-- momentum-random if you want to check Lorentz Invariance
1944+ PD(0,1)=M1
1945+ PD(1,1)=0d0
1946+ PD(2,1)=0d0
1947+ PD(3,1)=0d0
1948+ PD(1,1)=xran1(iseed)*10d0
1949+ PD(2,1)=xran1(iseed)*10d0
1950+ PD(3,1)=xran1(iseed)*10d0
1951+ PD(0,1)=dsqrt(M1**2+PD(1,1)**2+PD(2,1)**2+PD(3,1)**2)
1952+
1953+c-- helicity
1954+ if(abs(ip).eq.24.or.ip.eq.23) then
1955+ jhel(1) = get_hel(xran1(iseed),3)
1956+ else
1957+ jhel(1) = get_hel(xran1(iseed),2)
1958+ endif
1959+c-- pass information to the common block
1960+ do i=1,mxdim
1961+ x(i)=xx(i)
1962+ enddo
1963+C
1964+ CALL EVENT(PD,JHEL,IDS,ICOL,WEIGHT)
1965+C
1966+c write(*,*) 'from fxn: weight=',weight
1967+ mxwgt = max(weight*wgt,mxwgt) !max weight = wgt * fxn
1968+ fxn = REAL(weight)
1969+C
1970+ return
1971+ end
1972+
1973+
1974+ subroutine toend(iunit)
1975+c**********************************************************
1976+c read a file until the end
1977+c**********************************************************
1978+ ios = 0
1979+ dowhile(ios.eq.0)
1980+ read(unit=iunit,fmt='(1x)',iostat=ios)
1981+ enddo
1982+ end
1983+
1984+ subroutine find_particle(ipp,nexternal,ic,n,idecay)
1985+c***********************************************************
1986+c looks for particle ip in the event ic and
1987+c returns the n instances found which
1988+c are not decayed yet. idecay(i) gives the position
1989+c of the i-th particle to be decayed.
1990+c***********************************************************
1991+ implicit none
1992+ include 'decay.inc'
1993+c
1994+c Arguments
1995+c
1996+ integer n,ipp,nexternal,ic(7,MaxParticles),idecay(MaxParticles)
1997+c
1998+c Local
1999+c
2000+ integer i
2001+
2002+c-----
2003+c Begin Code
2004+c-----
2005+
2006+ n=0
2007+ do i=1,nexternal
2008+ idecay(i)=0
2009+ if (ic(1,i) .eq. ipp .and. ic(6,i) .eq. 1 ) then
2010+ n=n+1
2011+ idecay(n)=i
2012+ endif
2013+ enddo
2014+
2015+ return
2016+ end
2017+
2018+
2019+
2020+ subroutine rnd_init(iunit,iseed)
2021+c***********************************************************
2022+c initialize rnd number generator xran1 by reading iseed.dat
2023+c***********************************************************
2024+ implicit none
2025+c
2026+c Arguments
2027+c
2028+ integer iunit,iseed
2029+c
2030+c External
2031+c
2032+ real xran1
2033+c
2034+c Local
2035+c
2036+ real*8 aa
2037+ character*50 adummy
2038+ logical done
2039+ character*(132) buff
2040+c-----
2041+c Begin Code
2042+c-----
2043+
2044+c
2045+c calculating decay rates only
2046+c
2047+c- try to open the iseed.dat file
2048+ open(iunit,file='./iseed.dat',status="old",err=200)
2049+ read(iunit,err=200,end=200,fmt='(i10)') iseed
2050+ write(*,*) '*****************************************************'
2051+ write(*,*) '* reading seed from iseed.dat *'
2052+ write(*,'(a22,i6,a26)')
2053+ & ' * rnd number seed = ',iseed ,' *'
2054+
2055+ rewind(iunit)
2056+ write(iunit,fmt='(i10)') iseed-1
2057+ close(iunit)
2058+ write(*,*) '*****************************************************'
2059+ goto 201
2060+c- if iseed.dat does not exist then set it to -1.
2061+ 200 iseed=-1
2062+ open(iunit,file='./iseed.dat',status="new")
2063+ write(iunit,fmt='(i10)') iseed-1
2064+ write(*,*) '*****************************************************'
2065+ write(*,*) '* no iseed.dat => iseed=-1 *'
2066+ write(*,*) '* iseed.dat now written *'
2067+ write(*,*) '*****************************************************'
2068+ 201 continue
2069+ close(iunit)
2070+ return
2071+
2072+ return
2073+ 99 write (*,*) 'error'
2074+
2075+ return
2076+ end
2077+
2078+
2079+
2080
2081=== added file 'DECAY/decay.inc'
2082--- DECAY/decay.inc 1970-01-01 00:00:00 +0000
2083+++ DECAY/decay.inc 2011-04-12 19:56:30 +0000
2084@@ -0,0 +1,105 @@
2085+c*****************************************************
2086+c PARAMETERS
2087+c*****************************************************
2088+c
2089+c VEGAS MAX DIMENSIONS
2090+c
2091+ integer mxdim !to be the same as in vegas.f
2092+ parameter (mxdim=10) !rebin.f
2093+c
2094+ integer MaxParticles ! max number of particles in
2095+ parameter (MaxParticles=25)! the event
2096+ integer MaxDecPart ! max particles in the decay
2097+ parameter (MaxDecPart=5) ! 1->2,..,MaxDecPart
2098+ integer MaxiEvent ! max nr of processes
2099+ parameter (MaxiEvent=100) ! in the proc_card
2100+c
2101+ integer MaxPoints ! maxpoints used in the integration
2102+ parameter(MaxPoints=500000)
2103+c
2104+c Numbers
2105+c
2106+ double precision Zero, One, Two, Three, Four, Half,Rt2
2107+ parameter( Zero = 0.0d0, One = 1.0d0, Two = 2.0d0 )
2108+ parameter( Three = 3.0d0, Four = 4.0d0, Half = 0.5d0 )
2109+ parameter( Rt2 = 1.414213562d0 )
2110+ double precision Pi, Fourpi
2111+ parameter( Pi = 3.14159265358979323846d0 )
2112+ parameter( Fourpi = Four * Pi )
2113+c
2114+c Units
2115+c
2116+ integer luni,lunr,lunw,lunp,lunrnd,lunout
2117+ parameter (luni=15,lunr=16,lunw=17,lunp=18,lunrnd=19,lunout=20)
2118+c
2119+c*****************************************************
2120+c GLOBAL
2121+c*****************************************************
2122+c
2123+c IP = PDG CODE FOR THE PARTICLE TO DECAY
2124+c IMODE = DECAY MODE
2125+c ND = NUMBER OF DECAY PRODUCTS
2126+c
2127+ INTEGER IP,IMODE,ND
2128+ COMMON/DEC_ID/IP,IMODE,ND
2129+c
2130+c masses and couplings for the decay routines
2131+c
2132+ REAL*8 M1,M2,M3,M4,M5,MV,GV
2133+ COMMON/m_decays/M1,M2,M3,M4,M5,MV,GV
2134+ DOUBLE COMPLEX GX,GXX(2),GXX1(2)
2135+ COMMON/WEAK_COUPL/ GX,GXX ,GXX1
2136+c
2137+c MC width, analytic width and best branching ratio
2138+c
2139+ real*8 MC_width,calc_width,bratio,calc_br
2140+ common/to_width/MC_width,calc_width,bratio,calc_br
2141+c
2142+c Particle's ID
2143+c
2144+ character*3 id(-100:100)
2145+ real*8 pdgmass(-100:100)
2146+ common/to_id/pdgmass,id
2147+c
2148+c Color label
2149+c
2150+ integer cindex
2151+ common/c_ind/cindex
2152+c
2153+c Vegas
2154+c
2155+ real*4 x(MXDIM)
2156+ COMMON/TO_VEGAS/x
2157+ integer n_wei,n_ove
2158+ real*8 mxwgt,s_wei,s_unw,s_ove
2159+ common/to_event/mxwgt,s_wei,s_unw,s_ove,n_wei,n_ove
2160+c
2161+c HDECAY branching ratios
2162+c
2163+ integer ihiggs, nnlo, ipole
2164+ common /flag/ ihiggs, nnlo, ipole
2165+ integer ionsh, ionwz, iofsusy
2166+ common /onshell/ ionsh, ionwz, iofsusy
2167+ double precision gf, alph, almass, ammuon, amz, amw
2168+ common /param/ gf, alph, almass, ammuon, amz, amw
2169+ double precision ams, amc, amb, amt
2170+ common /masses/ ams, amc, amb, amt
2171+ double precision gamc0, gamt0, gamt1, gamw, gamz
2172+ common /wzwdth/ gamc0, gamt0, gamt1, gamw, gamz
2173+ double precision SMBRB,SMBRL,SMBRM,SMBRS,SMBRC,SMBRT,
2174+ & SMBRG,SMBRGA,SMBRZGA,SMBRW,SMBRZ,SMWDTH
2175+ common /widthsm/ SMBRB,SMBRL,SMBRM,SMBRS,SMBRC,SMBRT,
2176+ & SMBRG,SMBRGA,SMBRZGA,SMBRW,SMBRZ,SMWDTH
2177+c
2178+ double precision hdals, hdmhbeg, hdmhend, tgbet
2179+ common /hdparms/ hdals, hdmhbeg, hdmhend, tgbet
2180+c
2181+c PDG branching ratios
2182+c
2183+ double precision br_ta_lv,br_ta_pi,br_ta_ro
2184+ double precision br_w_lv,br_w_jj
2185+ double precision br_z_ll,br_z_vv,br_z_cc,br_z_bb,br_z_jj
2186+ common/brs/ br_ta_lv,br_ta_pi,br_ta_ro,
2187+ & br_w_lv,br_w_jj,
2188+ & br_z_ll,br_z_vv,br_z_cc,br_z_bb,br_z_jj
2189+
2190
2191=== added file 'DECAY/decay_couplings.f'
2192--- DECAY/decay_couplings.f 1970-01-01 00:00:00 +0000
2193+++ DECAY/decay_couplings.f 2011-04-12 19:56:30 +0000
2194@@ -0,0 +1,725 @@
2195+c----------------------------------------------------------------------
2196+C couplings.f
2197+c----------------------------------------------------------------------
2198+c This files takes the inputs of the standard model from a Les Houches
2199+c file (param_card.dat) and calculates all the couplings that end up
2200+c in the Feynman rules, i.e., in the HELAS routines.
2201+c
2202+c With the convention of the New Web Generation MadEvent in this
2203+c part no non-trivial computation is made. The SM model secondary
2204+c parameters have been all calculated by the SM calculator, SMCalc
2205+c which produced param_card.dat.
2206+c
2207+c The only exception to the above rule is for alpha_S. In the case
2208+c where a pdf is used in the initial state, then the values as(MZ)
2209+c set in the les houches card is superseeded.
2210+c Scales and pdf's are set in the run_card.dat.
2211+c
2212+c This file contains the following routines:
2213+c
2214+c- madgraph original call to set the parameters
2215+c- lh_readin is called from here.
2216+c It talks to the lh_readin through the common block values.
2217+c subroutine setpara
2218+c
2219+c-routine to read the LH parameters in
2220+c subroutine lh_readin
2221+c
2222+c-to set
2223+c subroutine set_it(npara,ivalue,value,name,id,
2224+c subroutine case_trap(string,length)
2225+c subroutine no_spaces(buff,nchars)
2226+c----------------------------------------------------------------------
2227+
2228+
2229+ subroutine setpara
2230+c***********************************************************************
2231+c This subroutine sets up the HELAS couplings of the STANDARD MODEL.
2232+c***********************************************************************
2233+ implicit none
2234+c
2235+c local
2236+c
2237+ integer i
2238+ real*8 dum
2239+c
2240+c common file with the couplings
2241+c
2242+ include 'coupl.inc'
2243+ include 'decay.inc'
2244+ include 'calc_values.inc'
2245+c
2246+c local
2247+c
2248+ double precision v
2249+ double precision ee, ee2, ez, ey, sw, cw, sc2
2250+ double precision gwne, gwud, lambda, lam4, xt, rew, rqcd
2251+ double precision alphas, alfa, alfaw, mfrun
2252+ external alphas, alfa, alfaw, mfrun
2253+c
2254+c Common to lh_readin and printout
2255+c
2256+ double precision alpha, sin2w, gfermi, alfas
2257+ double precision mtMS,mbMS,mcMS,mtaMS!MSbar masses
2258+ double precision Vud,Vus !CKM matrix elements
2259+ common/values/ alpha,sin2w,gfermi,alfas,
2260+ & mtMS,mbMS,mcMS,mtaMS,
2261+ & Vud
2262+c
2263+c constants
2264+c
2265+ double complex ci
2266+ parameter( ci = ( 0.0d0, 1.0d0 ) )
2267+c
2268+c alfas and run
2269+c
2270+ include 'alfas.inc'
2271+ include 'run.inc'
2272+c
2273+c Auxiliary functions
2274+c
2275+ REAL*8 XX,Y,Z
2276+ REAL*8 HFF,BETA,HEAVY
2277+
2278+ BETA(XX) = DSQRT(One-Four*XX)
2279+ HFF(XX,Y) = One/(Two*Four*PI)*XX*(BETA(Y))**3
2280+ HEAVY(XX,Y,Z)= ( One - Half*(y**2+z**2) - Half*(y**2-z**2)**2
2281+ & + Three*y*z*(XX**2 - One)/(XX**2 + One) )
2282+ & * sqrt( (One-y**2-z**2)**2 - Four * y**2 * z**2 )
2283+c
2284+c------------------------------------------
2285+c Start calculating the couplings for HELAS
2286+c------------------------------------------
2287+c
2288+ call lh_readin
2289+c
2290+c Strong coupling
2291+c
2292+c As a rule we first check if a pdf has been chosen in the
2293+c run_card.dat (which has been already read at this stage).
2294+c If there pdfs in the initial state, then the alpha_s(MZ) used
2295+c is set to the corresponding value.
2296+
2297+ if(scale.le.1d0) scale=zmass
2298+
2299+ if(lpp(1).ne.0.or.lpp(2).ne.0) then
2300+ if(asmz .le.0.01d0) asmz =0.118d0
2301+ else
2302+ asmz=alfas !value read from the param_card.dat
2303+c nloop=2
2304+ endif
2305+ if(nloop.eq.0) nloop=1
2306+
2307+ G = DSQRT(4d0*PI*ALPHAS(SCALE)) ! use setting of the param_card.dat @ NLO
2308+ GG(1) = -G
2309+ GG(2) = -G
2310+c
2311+c auxiliary local values
2312+c
2313+ cw = sqrt( One - sin2w )
2314+ ee2 = alpha * Fourpi
2315+ sw = sqrt( sin2w )
2316+ ee = sqrt( ee2 )
2317+ ez = ee/(sw*cw)
2318+ ey = ee*(sw/cw)
2319+ sc2 = sin2w*( One - sin2w )
2320+ v = Two*wmass*sw/ee ! the wmass is used to calculate v
2321+ lambda = hmass**2 / (Two * v**2)
2322+c
2323+c vector boson couplings
2324+c
2325+ gw = ee/sw
2326+ gwwa = ee
2327+ gwwz = ee*cw/sw
2328+c
2329+c gauge & higgs boson coupling constants
2330+c
2331+ gwwh = dcmplx( ee2/sin2w*Half*v, Zero )
2332+ gzzh = dcmplx( ee2/sc2*Half*v, Zero )
2333+ ghhh = dcmplx( -hmass**2/v*Three, Zero )
2334+ gwwhh = dcmplx( ee2/sin2w*Half, Zero )
2335+ gzzhh = dcmplx( ee2/sc2*Half, Zero)
2336+ ghhhh = ghhh/v
2337+c
2338+c fermion-fermion-vector couplings
2339+c
2340+ gal(1) = dcmplx( ee , Zero )
2341+ gal(2) = dcmplx( ee , Zero )
2342+ gau(1) = dcmplx( -ee*Two/Three, Zero )
2343+ gau(2) = dcmplx( -ee*Two/Three, Zero )
2344+ gad(1) = dcmplx( ee/Three , Zero )
2345+ gad(2) = dcmplx( ee/Three , Zero )
2346+
2347+ gwf(1) = dcmplx( -ee/sqrt(Two*sin2w), Zero )
2348+ gwf(2) = dcmplx( Zero , Zero )
2349+
2350+ gzn(1) = dcmplx( -ez*Half , Zero )
2351+ gzn(2) = dcmplx( Zero , Zero )
2352+ gzl(1) = dcmplx( -ez*(-Half + sin2w) , Zero )
2353+ gzl(2) = dcmplx( -ey , Zero )
2354+ gzu(1) = dcmplx( -ez*( Half - sin2w*Two/Three), Zero )
2355+ gzu(2) = dcmplx( ey*Two/Three , Zero )
2356+ gzd(1) = dcmplx( -ez*(-Half + sin2w/Three) , Zero )
2357+ gzd(2) = dcmplx( -ey/Three , Zero )
2358+c
2359+c fermion-fermion-Higgs couplings (complex) hff(2)
2360+c
2361+c NOTE: the running mass is evaluated @ the same order
2362+c nloop of alpha_s set by the PDF choice
2363+c
2364+
2365+ if(mtMS.gt.1d0) then
2366+ ghtop(1) = dcmplx( -mtMS/v, Zero )
2367+ else
2368+ ghtop(1) = dcmplx( Zero,Zero)
2369+ endif
2370+ ghtop(2) = ghtop(1)
2371+
2372+ if(mbMS.gt.1d0) then
2373+ ghbot(1) = dcmplx( -mbMS/v, Zero )
2374+ else
2375+ ghbot(1) = dcmplx( Zero, Zero )
2376+ endif
2377+ ghbot(2) = ghbot(1)
2378+
2379+ if(mcMS.gt.1d0) then
2380+ ghcha(1) = dcmplx( -mcMS/v, Zero )
2381+ else
2382+ ghcha(1) = dcmplx( Zero, Zero )
2383+ endif
2384+ ghcha(2) = ghcha(1)
2385+
2386+ ghtau(1) = dcmplx( -mtaMS/v, Zero )
2387+ ghtau(2) = ghtau(1)
2388+c
2389+c CKM matrix:
2390+c symmetric 3x3 matrix, Vud=Vcs, Vus=Vcd Vcb=Vub=0
2391+c
2392+c >>>>>>>>>>>>>>>***** NOTE****<<<<<<<<<<<<<<<<<<<<<<<<<
2393+c these couplings matter only when interaction_CKM.dat
2394+c is used to generate all the diagrams with off-diagonal
2395+c couplings. The default of MadEvent is a diagonal
2396+c CKM matrix.
2397+
2398+ Vus=DSQRT(1d0-Vud**2)
2399+ do i=1,2
2400+ gwfc(i) = gwf(i)*Vud
2401+ gwfs(i) = gwf(i)*Vus
2402+ gwfm(i) =-gwf(i)*Vus
2403+ enddo
2404+
2405+c---------------------------------------------------------
2406+c Set Photon Width to Zero, used by symmetry optimization
2407+c---------------------------------------------------------
2408+
2409+ awidth = 0d0
2410+c
2411+c Z boson partial widths
2412+c
2413+ decz = zmass / ( 24.0d0 * Pi )
2414+ w_z_nn = decz * ( gzn(1)**2 + gzn(2)**2 )
2415+ w_z_ll = decz * ( gzl(1)**2 + gzl(2)**2 )
2416+ decz = decz * Three
2417+ w_z_uu = decz * ( gzu(1)**2 + gzu(2)**2 )
2418+ w_z_dd = decz * ( gzd(1)**2 + gzd(2)**2 )
2419+ dum = dble( (gzl(2)+gzl(1))/(gzl(2)-gzl(1)) )
2420+ w_z_tau = w_z_ll * heavy( dum, lmass/zmass, lmass/zmass )
2421+ dum = dble( (gzu(2)+gzu(1))/(gzu(2)-gzu(1)) )
2422+ w_z_cc = w_z_uu * heavy( dum, cmass/zmass, cmass/zmass )
2423+ dum = dble( (gzd(2)+gzd(1))/(gzd(2)-gzd(1)) )
2424+ w_z_bb = w_z_dd * heavy( dum, bmass/zmass, bmass/zmass )
2425+
2426+ zwidth = Three*w_z_nn + Two*w_z_ll + w_z_tau
2427+ & + Two*w_z_dd + w_z_uu + w_z_cc + w_z_bb
2428+
2429+c
2430+c W boson partial widths
2431+c
2432+ decw = wmass / ( 24.0d0 * Pi )
2433+ w_w_nl = decw * ( gwf(1)**2 + gwf(2)**2 )
2434+ dum = dble( (gwf(2)+gwf(1))/(gwf(2)-gwf(1)) )
2435+ w_w_tau = w_w_nl * heavy( dum, lmass/wmass, Zero )
2436+ w_w_ud = w_w_nl * Three
2437+ w_w_cs = w_w_ud * heavy( dum, cmass/wmass, Zero )
2438+
2439+ wwidth = Two*w_w_nl + w_w_tau + w_w_ud + w_w_cs
2440+
2441+c
2442+c top quark width
2443+c
2444+ call topwid(tmass,wmass,bmass,wwidth,gw,twidth)
2445+
2446+c
2447+c tau width
2448+c
2449+ lwidth = 2.36d-12 !tau width, PDG value
2450+c
2451+c LO withds of the Higgs into tt~,bb~,tau tau~.
2452+c
2453+ if(hmass.gt.2d0*tmass) then
2454+ w_h_tt =3d0*cdabs(ghtop(1)**2)*hff(hmass,(tmass/hmass)**2)
2455+ else
2456+ w_h_tt =0d0
2457+ endif
2458+
2459+ w_h_bb =3d0*cdabs(ghbot(1)**2)*hff(hmass,(bmass/hmass)**2)
2460+ w_h_tau=cdabs(ghtau(1)**2)*hff(hmass,(lmass/hmass)**2)
2461+ w_h_bb =3d0*cdabs(ghbot(1)**2)*hff(hmass,(bmass/hmass)**2)
2462+ w_h_cc =3d0*cdabs(ghcha(1)**2)*hff(hmass,(cmass/hmass)**2)
2463+ w_h_tau=cdabs(ghtau(1)**2)*hff(hmass,(lmass/hmass)**2)
2464+
2465+
2466+ if(hmass.gt.2d0*wmass) then
2467+ w_h_ww=gfermi/8d0/pi/rt2*hmass**3*
2468+ & dsqrt(1-4d0*(wmass/hmass)**2)*
2469+ & (12d0*(wmass/hmass)**4 -4d0*(wmass/hmass)**2+1d0)
2470+ w_h_WLWL=gw**2/64d0/pi*hmass**3/wmass**2* !longitudinal W's
2471+ & dsqrt(1-4d0*(wmass/hmass)**2)*
2472+ & (1-2d0*(wmass/hmass)**2)**2
2473+ else
2474+ w_h_ww=0d0
2475+ w_h_WLWL=0d0
2476+ endif
2477+
2478+ if(hmass.gt.2d0*zmass) then
2479+ w_h_zz=gfermi/16d0/pi/rt2*hmass**3*
2480+ & dsqrt(1-4d0*(zmass/hmass)**2)*
2481+ & (12d0*(zmass/hmass)**4 -4d0*(zmass/hmass)**2+1d0)
2482+ w_h_ZLZL=gw**2/128d0/pi*hmass**3/wmass**2* !longitudinal Z's
2483+ & dsqrt(1-4d0*(zmass/hmass)**2)*
2484+ & (1-2d0*(zmass/hmass)**2)**2
2485+ else
2486+ w_h_zz=0d0
2487+ w_h_zLzL=0d0
2488+ endif
2489+
2490+c--------------------------
2491+c start interface to HDECAY
2492+c--------------------------
2493+c do not change things here unless you exactly know what you are doing
2494+c
2495+ ihiggs = 0
2496+ nnlo = 0
2497+ ipole = 0
2498+
2499+ ionsh = 0
2500+ ionwz = 0
2501+ iofsusy = 1
2502+
2503+ hdals = asmz
2504+c-- do not set masses to zero here
2505+ ams = 0.190d0 !strange pole mass
2506+
2507+ if(cmass.gt.0d0) then
2508+ amc = cmass
2509+ else
2510+ amc = 1.42d0 !charm pole mass
2511+ endif
2512+
2513+ if(bmass.gt.0d0) then
2514+ amb = bmass
2515+ else
2516+ amb = 4.7d0 !bottom pole mass
2517+ endif
2518+
2519+ if(tmass.gt.0d0) then
2520+ amt = tmass
2521+ else
2522+ amt = 174.3d0 !top pole mass
2523+ endif
2524+
2525+ if(lmass.gt.0d0) then
2526+ almass = lmass
2527+ else
2528+ almass = 1.777d0 !tau mass
2529+ endif
2530+
2531+ ammuon = 0.105658389d0 !muon mass
2532+
2533+ alph = 137.0359895D0 !alpha_EM
2534+ gf = gfermi
2535+
2536+ if(wwidth.gt.0d0) then
2537+ gamw = wwidth
2538+ else
2539+ gamw=2.12d0
2540+ endif
2541+
2542+ if(zwidth.gt.0d0) then
2543+ gamz = zwidth
2544+ else
2545+ gamz=2.495d0
2546+ endif
2547+
2548+ amz = zmass
2549+ amw = wmass
2550+
2551+ hdmhbeg = hmass
2552+ hdmhend = hmass
2553+
2554+c
2555+c this calculates the branching ratios of the Higgs
2556+c at the best of our knowledge
2557+c
2558+ call hdecay
2559+ hwidth = SMWDTH
2560+
2561+c------------------------
2562+c end interface to HDECAY
2563+c------------------------
2564+
2565+
2566+c----------------------------
2567+c end subroutine coupsm
2568+c----------------------------
2569+
2570+
2571+ return
2572+ end
2573+
2574+
2575+ subroutine lh_readin
2576+c----------------------------------------------------------------------
2577+c Read the parameters from the lh file
2578+c
2579+c 1. Input values for the EW sector
2580+c 2. Higgs mass and width
2581+c 3. Fermion masses (pole and MSbar) and widths
2582+c----------------------------------------------------------------------
2583+ implicit none
2584+c
2585+c parameters
2586+c
2587+ integer maxpara
2588+ parameter (maxpara=1000)
2589+c
2590+c local
2591+c
2592+ integer npara,l1,l2
2593+ character*132 buff
2594+ real*8 real_value
2595+ real*8 value(maxpara)
2596+ integer ivalue(maxpara),n
2597+ character*20 name(maxpara),bn,dumstring
2598+ logical block_found,done,fopened
2599+ integer i,name_length,idum
2600+
2601+c
2602+c block info
2603+c
2604+ character*20 block_name
2605+c
2606+c Common
2607+c
2608+ include 'coupl.inc'
2609+ include 'decay.inc'
2610+c
2611+c Common to lh_readin and printout
2612+c
2613+ double precision alpha, sin2w, gfermi, alfas
2614+ double precision mtMS,mbMS,mcMS,mtaMS!MSbar masses
2615+ double precision Vud,Vus !CKM matrix elements
2616+ common/values/ alpha,sin2w,gfermi,alfas,
2617+ & mtMS,mbMS,mcMS,mtaMS,
2618+ & Vud
2619+c
2620+c----------
2621+c start
2622+c----------
2623+c
2624+ n=0
2625+ rewind(lunp)
2626+ done=.false.
2627+
2628+ do while(.not.done)
2629+ block_found=.false.
2630+c
2631+c looks for the blocks or for decay
2632+c
2633+ do while(.not.block_found)
2634+ read(lunp,'(a132)',end=99,err=99) buff
2635+c-- change to lower case
2636+ call case_trap(buff,20)
2637+ if(buff(1:5).eq.'block') then
2638+ if(index(buff,"#").ne.0) l1=index(buff,"#")-1
2639+ block_name=buff(6:min(l1,26))
2640+ call no_spaces(block_name,name_length)
2641+c write(*,*) block_name(1:name_length)
2642+ block_found=.true.
2643+ elseif(buff(1:5).eq.'decay') then
2644+ n=n+1
2645+ l1=30
2646+ if(index(buff,"#").ne.0) l1=index(buff,"#")-1 ! ignore comments
2647+ read(buff(6:l1),*) ivalue(n),value(n)
2648+ name(n)="decay"
2649+ endif
2650+ end do
2651+c
2652+c
2653+
2654+ if(block_found) then
2655+ do while(.true.)
2656+ read(lunp,'(a132)',end=99,err=99) buff
2657+ call case_trap(buff,20)
2658+ if(buff(1:1).eq.'b'.or.buff(1:1).eq.'d') then
2659+ backspace lunp
2660+ exit
2661+ endif
2662+ if(buff(1:1).ne.'#') then !if it not a comment
2663+ n=n+1
2664+ l1=30
2665+ if(index(buff,"#").ne.0) l1=index(buff,"#")-1 ! ignore comments
2666+c
2667+c WARNING:... not all blocks have the same sintax!! You need to change it
2668+c depending on the block you are reading
2669+c
2670+
2671+ if(block_name(1:5).eq."mgckm") then
2672+ read(buff(1:l1),*) ivalue(n),idum,value(n)
2673+ elseif (block_name(1:6).eq."spinfo".or.
2674+ &block_name(1:6).eq."dcinfo") then
2675+ read(buff(1:l1),*) ivalue(n),dumstring
2676+ else
2677+ read(buff(1:l1),*) ivalue(n),value(n)
2678+ endif
2679+ name(n)=block_name(1:name_length)
2680+c write(*,"(1x,i2,2x,e16.8,1x,a)")
2681+c & ivalue(n),value(n),name(n)
2682+ endif
2683+ end do ! do while in the block
2684+ else
2685+ done=.true.
2686+ endif
2687+ end do ! do while the entire file
2688+
2689+
2690+99 continue
2691+
2692+ bn="sminputs"
2693+ call set_it(n,ivalue,value,name,1,bn,alpha,128.9d0)
2694+ alpha=1d0/alpha
2695+ call set_it(n,ivalue,value,name,2,bn,gfermi,0.1166d-4)
2696+ call set_it(n,ivalue,value,name,3,bn,alfas,0.119d0)
2697+ call set_it(n,ivalue,value,name,4,bn,zmass,91.188d0)
2698+ call set_it(n,ivalue,value,name,6,bn,tmass,174.3d0)
2699+ call set_it(n,ivalue,value,name,7,bn,lmass,1.777d0)
2700+ bn="mgsmparam"
2701+ call set_it(n,ivalue,value,name,1,bn,sin2w,0.2312d0)
2702+ call set_it(n,ivalue,value,name,2,bn,wmass,80.419d0)
2703+ bn="mgyukawa"
2704+ call set_it(n,ivalue,value,name,4,bn,mcMS,1.25d0)
2705+ call set_it(n,ivalue,value,name,5,bn,mbMS,4.2d0)
2706+ call set_it(n,ivalue,value,name,6,bn,mtMS,174d0)
2707+ call set_it(n,ivalue,value,name,15,bn,mtaMS,1.777d0)
2708+ bn="mgckm"
2709+ call set_it(n,ivalue,value,name,1,bn,vud,1d0)
2710+ bn="mass"
2711+ call set_it(n,ivalue,value,name,4,bn,cmass,1.4d0)
2712+ call set_it(n,ivalue,value,name,5,bn,bmass,4.7d0)
2713+ call set_it(n,ivalue,value,name,6,bn,tmass,tmass*1d0)
2714+ call set_it(n,ivalue,value,name,15,bn,lmass,lmass*1d0)
2715+ call set_it(n,ivalue,value,name,25,bn,hmass,120d0)
2716+ call set_it(n,ivalue,value,name,23,bn,zmass,zmass*1d0)
2717+ call set_it(n,ivalue,value,name,24,bn,wmass,wmass*1d0)
2718+
2719+c bn="decay"
2720+c call set_it(n,ivalue,value,name,6,bn,twidth,1.5083d0)
2721+c call set_it(n,ivalue,value,name,25,bn,hwidth,0.0037d0)
2722+c call set_it(n,ivalue,value,name,23,bn,zwidth,2.441d0)
2723+c call set_it(n,ivalue,value,name,24,bn,wwidth,2.0476d0)
2724+
2725+ write(*,*)
2726+ write(*,*) ' >>> Widths in param_card.dat are ignored <<<'
2727+ write(*,*)
2728+
2729+ return
2730+ end
2731+
2732+
2733+ subroutine set_it(npara,ivalue,value,name,id,
2734+ & block_name,var,def_value)
2735+c----------------------------------------------------------------------------------
2736+c finds the parameter value in block_name and associate var to it.
2737+c If it is not found a default is given.
2738+c----------------------------------------------------------------------------------
2739+ implicit none
2740+
2741+c
2742+c parameters
2743+c
2744+ integer maxpara
2745+ parameter (maxpara=100)
2746+c
2747+c arguments
2748+c
2749+ integer npara,ivalue(maxpara),id
2750+ character*20 block_name,name(maxpara)
2751+ real*8 var,def_value,value(maxpara)
2752+c
2753+c local
2754+c
2755+ logical found
2756+ integer i
2757+c
2758+c start
2759+c
2760+ found=.false.
2761+ do i=1,npara
2762+ found = (id.eq.ivalue(i)).and.(name(i).eq.block_name)
2763+ if(found) then
2764+ var=value(i)
2765+ exit
2766+ endif
2767+ enddo
2768+
2769+ if (.not.found) then
2770+c write (*,*) "Warning: parameter not found"
2771+c write (*,*) " setting it to default value ",def_value
2772+ var=def_value
2773+ endif
2774+ return
2775+
2776+ end
2777+
2778+
2779+ subroutine case_trap(string,length)
2780+c**********************************************************
2781+c change string to lowercase if the input is not
2782+c**********************************************************
2783+ implicit none
2784+c
2785+c ARGUMENT
2786+c
2787+ character*(*) string
2788+ integer length
2789+c
2790+c LOCAL
2791+c
2792+ integer i,k
2793+
2794+ do i=1,length
2795+ k=ichar(string(i:i))
2796+ if(k.ge.65.and.k.le.90) then !upper case A-Z
2797+ k=ichar(string(i:i))+32
2798+ string(i:i)=char(k)
2799+ endif
2800+ enddo
2801+
2802+ return
2803+ end
2804+
2805+
2806+ subroutine no_spaces(buff,nchars)
2807+c**********************************************************************
2808+c Given buff a buffer of words separated by spaces
2809+c returns it where all space are moved to the right
2810+c returns also the length of the single word.
2811+c maxlength is the length of the buffer
2812+c**********************************************************************
2813+ implicit none
2814+c
2815+c Constants
2816+c
2817+ integer maxline
2818+ parameter (maxline=20)
2819+ character*1 null
2820+ parameter (null=' ')
2821+c
2822+c Arguments
2823+c
2824+ character*(maxline) buff
2825+ integer nchars,maxlength
2826+c
2827+c Local
2828+c
2829+ integer i,j
2830+ character*(maxline) temp
2831+c-----
2832+c Begin Code
2833+c-----
2834+ nchars=0
2835+c write (*,*) "buff=",buff(1:maxlength)
2836+ do i=1,maxline
2837+ if(buff(i:i).ne.null) then
2838+ nchars=nchars+1
2839+ temp(nchars:nchars)=buff(i:i)
2840+ endif
2841+c write(*,*) i,":",buff(1:maxlength),":",temp(1:nchars),":"
2842+ enddo
2843+ buff=temp
2844+ end
2845+
2846+
2847+ SUBROUTINE TOPWID(RMT,RMW,RMB,RGW,GW,RGT)
2848+c*************************************************************************
2849+c THE TOTAL WEAK DECAY WIDTH OF THE TOP QUARK, INCLUDING
2850+c THE EFFECTS OF BOTTOM MASS AND, IF IGW=1, A FINITE W WIDTH.
2851+c From James Stirling 6-10-94
2852+c
2853+c RMT=TOP MASS
2854+c RMW=W MASS
2855+c RMB=B MASS
2856+c RGW=W WIDTH
2857+c GW =WEAK COUPLING
2858+c
2859+c RGT=TOP WIDTH
2860+c
2861+c*************************************************************************
2862+ IMPLICIT COMPLEX*16(A-H,O-Z)
2863+ REAL*8 RMT,RMB,RMW,XW,XB,RGW,RGT,GW
2864+*
2865+ PI=4.*DATAN(1.D0)
2866+ XGW=dcmplx(GW/2d0/dsqrt(2d0))
2867+*
2868+ XB=RMB/RMT
2869+ XW=RMW/RMT
2870+*
2871+ RM=XB**2
2872+ OM=1.+RM-DCMPLX(RMW**2,RMW*RGW)/RMT**2
2873+ Y1=OM+CDSQRT(OM*OM-4.*RM)
2874+ Y0=OM-CDSQRT(OM*OM-4.*RM)
2875+ Z1=2.
2876+ Z0=2.*CDSQRT(RM)
2877+*
2878+ D0=(-Y0**8+3.*Y0**7*RM+3.*Y0**7-8.*Y0**6*RM-12.*Y0**5*RM**
2879+ . 2-12.*Y0**5*RM+96.*Y0**4*RM**2-48.*Y0**3*RM**3-48.*Y0**3*
2880+ . RM**2-128.*Y0**2*RM**3+192.*Y0*RM**4+192.*Y0*RM**3-256.*
2881+ . RM**4)/(24.*Y0**4*(Y1-Y0))
2882+ D1=(-Y1**8+3.*Y1**7*RM+3.*Y1**7-8.*Y1**6*RM-12.*Y1**5*RM**
2883+ . 2-12.*Y1**5*RM+96.*Y1**4*RM**2-48.*Y1**3*RM**3-48.*Y1**3*
2884+ . RM**2-128.*Y1**2*RM**3+192.*Y1*RM**4+192.*Y1*RM**3-256.*
2885+ . RM**4)/(24.*Y1**4*(Y1-Y0))
2886+ A4=(32.*RM**4*(Y1-Y0))/(3.*Y1*Y0*(Y1-Y0))
2887+ A3=(8.*RM**3*(-3.*Y1**2*Y0*RM-3.*Y1**2*Y0+4.*Y1**2*RM+3.*
2888+ . Y1*Y0**2*RM+3.*Y1*Y0**2-4.*Y0**2*RM))/(3.*Y1**2*Y0**2*(Y1
2889+ . -Y0))
2890+ A2=(8.*RM**3*(2.*Y1**3*Y0**2-3.*Y1**3*Y0*RM-3.*Y1**3*Y0+4.
2891+ . *Y1**3*RM-2.*Y1**2*Y0**3+3.*Y1*Y0**3*RM+3.*Y1*Y0**3-4.*Y0
2892+ . **3*RM))/(3.*Y1**3*Y0**3*(Y1-Y0))
2893+ A1=(2.*RM**2*(3.*Y1**4*Y0**3*RM+3.*Y1**4*Y0**3+8.*Y1**4*Y0
2894+ . **2*RM-12.*Y1**4*Y0*RM**2-12.*Y1**4*Y0*RM+16.*Y1**4*RM**2
2895+ . -3.*Y1**3*Y0**4*RM-3.*Y1**3*Y0**4-8.*Y1**2*Y0**4*RM+12.*
2896+ . Y1*Y0**4*RM**2+12.*Y1*Y0**4*RM-16.*Y0**4*RM**2))/(3.*Y1**
2897+ . 4*Y0**4*(Y1-Y0))
2898+ B0=(Y1**3-3.*Y1**2*RM-3.*Y1**2+8.*Y1*RM-Y0**3+3.*Y0**2*RM+
2899+ . 3.*Y0**2-8.*Y0*RM)/(24.*(Y1-Y0))
2900+ B1=(Y1+Y0-3.*RM-3.)/24.
2901+ B2=1./24.
2902+*
2903+ RINT=D0*CDLOG((Z1-Y0)/(Z0-Y0))
2904+ . -D1*CDLOG((Y1-Z1)/(Y1-Z0))
2905+ . -A4/3.*(1./Z1**3-1./Z0**3)
2906+ . -A3/2.*(1./Z1**2-1./Z0**2)
2907+ . -A2 *(1./Z1 -1./Z0 )
2908+ . +A1*CDLOG(Z1/Z0)
2909+ . +B0 *(Z1 -Z0 )
2910+ . +B1/2.*(Z1**2-Z0**2)
2911+ . +B2/3.*(Z1**3-Z0**3)
2912+*
2913+ XGW4=XGW**4
2914+*
2915+* TOTAL WIDTH INCLUDES FLAVOUR & COLOUR FACTORS
2916+ RGT=RMT**3/(RMW*RGW)*XGW4/(8.*PI**3)*DIMAG(RINT)
2917+ RGT=9.*RGT
2918+ RETURN
2919+ END
2920
2921=== added file 'DECAY/decay_event.f'
2922--- DECAY/decay_event.f 1970-01-01 00:00:00 +0000
2923+++ DECAY/decay_event.f 2011-04-12 19:56:30 +0000
2924@@ -0,0 +1,2537 @@
2925+ subroutine decay_event(P5,wgt,ni,ic)
2926+c********************************************************************
2927+c Decay particle(s) in the event
2928+c
2929+c input: P(0,MaxParticles) :four momenta
2930+c wgt :event weight
2931+c ni :number of particle in the event
2932+c before the decay
2933+c ic(6,MaxParticles):particle labels
2934+c
2935+c output:P(0,MaxParticles) :four momenta
2936+c wgt :event weight
2937+c ic(6,MaxParticles):particle labels
2938+c
2939+c which particle has to be decayed is passed through
2940+c a common block DEC_ID in decay.inc
2941+c
2942+c********************************************************************
2943+ implicit none
2944+ include 'decay.inc'
2945+c
2946+c Arguments
2947+c
2948+ integer ni, ic(7,MaxParticles)
2949+ double precision P5(0:4,MaxParticles),wgt
2950+c
2951+c Local
2952+c
2953+ integer i,k,jj, jhel(MaxDecPart), idecay, idec(MaxParticles),j, im
2954+ integer JD(MaxDecPart),ICOL(2,MaxDecPart)
2955+ integer maxcol
2956+ double precision pcms(0:3), pd(0:3,MaxDecPart),pswgt
2957+ double precision p(0:3,MaxParticles)
2958+ double precision totwidth, dwgt, goal_wgt
2959+ double precision weight,r
2960+ logical done
2961+ real wgt_vegas
2962+c
2963+c External
2964+c
2965+ real xran1
2966+ integer iseed
2967+ data iseed/1/ !no effect if already called
2968+c
2969+c Global
2970+c
2971+ data s_unw,s_wei,s_ove/3*0d0/
2972+ data n_wei,n_ove/2*0/
2973+c
2974+ include 'coupl.inc'
2975+ include 'calc_values.inc'
2976+c
2977+c first map the momenta into objects 0:3
2978+c
2979+ do i=1,MaxParticles
2980+ do j=0,3
2981+ p(j,i)=p5(j,i)
2982+ enddo
2983+ enddo
2984+
2985+c
2986+c-- First find out how many particles there are in the
2987+c event to decay
2988+c
2989+ call find_particle(ip,ni,ic,k,idec)
2990+ if (k.eq.0) return !no particle to decay
2991+c
2992+c-- Loop over particles to decay
2993+c
2994+ do jj=1,k
2995+ idecay=idec(jj)
2996+c-- find the largest label present for the color flow
2997+ maxcol=max(ic(4,1),ic(5,1))
2998+ do i=2,ni
2999+ maxcol=max(maxcol,ic(4,i),ic(5,i))
3000+ enddo
3001+ cindex=maxcol+1 !available color index
3002+c-- setup color of the decay particle
3003+ icol(1,1) = ic(4,idecay) ! color of particle
3004+ icol(2,1) = ic(5,idecay) ! anti-color of particle
3005+c-- Boost to the momentum of particle to the CMS frame
3006+ do i=0,3
3007+ pcms(i) = -p(i,1) - p(i,2)
3008+ enddo
3009+ pcms(0)=-pcms(0)
3010+ call boostx(p(0,idecay),pcms,pd(0,1))
3011+ jhel(1) = ic(7,idecay) ! helicity of particle
3012+c-- Unweigthed decay
3013+ done=.false.
3014+ do while (.not. done)
3015+ CALL GET_X(X,WGT_VEGAS)
3016+ CALL EVENT(PD(0,1),JHEL(1),JD(1),ICOL,WEIGHT)
3017+ weight=weight*real(wgt_vegas)
3018+ n_wei=n_wei+1
3019+ s_wei=s_wei+weight
3020+ r = xran1(iseed)
3021+ if(weight / r .gt. mxwgt) then
3022+ done=.true.
3023+ s_unw=s_unw+mxwgt
3024+ if (weight .gt. mxwgt) then
3025+ s_ove = s_ove-mxwgt+weight
3026+ n_ove = n_ove + 1
3027+ endif
3028+ endif
3029+ enddo
3030+c-- Multiply by the branching ratio
3031+ wgt = wgt * bratio
3032+c-- Boost back to lab frame and put momentum into P(0,x)
3033+ do i=1,3
3034+ pcms(i)=-pcms(i)
3035+ enddo
3036+ do i=2,MaxDecPart !loop over decay products
3037+ call boostx(pd(0,i),pcms,p(0,i-1+ni))
3038+ enddo
3039+c-- Set the new particle information
3040+c-- The info on the decayed particles are kept intact but
3041+c-- status changed to decayed
3042+ do i=1,ND
3043+ ic(1,ni+i)=jd(i+1) !particle's IDs
3044+ ic(2,ni+i)=idecay !Mother info
3045+ ic(3,ni+i)=idecay !Mother info
3046+ ic(4,ni+i)=icol(1,i+1) ! color info
3047+ ic(5,ni+i)=icol(2,i+1) !anti-color info
3048+ ic(6,ni+i)=+1 !Final Particle
3049+ ic(7,ni+i)=jhel(1+i) !Helicity info
3050+ enddo
3051+ ni = ni + nd !Keep intermediate state decaying particle
3052+ ic(6,idecay)=+2 !This is decayed particle
3053+c-- end loop over particles to decay
3054+ enddo
3055+c
3056+c finally map the P back to 0:4
3057+c
3058+ do i=1,ni
3059+ do j=0,3
3060+ p5(j,i)=p(j,i)
3061+ enddo
3062+c p5(4,i)=pdgmass(ic(1,i))
3063+ enddo
3064+
3065+ do i=ni-nd,ni
3066+ p5(4,i)=pdgmass(ic(1,i))
3067+ enddo
3068+
3069+ return
3070+ end
3071+
3072+
3073+ SUBROUTINE EVENT(PD,JHEL,JD,ICOL,DWGT)
3074+c**********************************************************
3075+c Calculation of the decay event quantities
3076+c
3077+c input: pd(0:3,1) decay particle momentum
3078+c
3079+c ouput: pd(0:3,MaxDecPart) momenta
3080+c jhel(MaxDecPart) helicities
3081+c jd(MaxDecPart) particle id's
3082+c icol(2,MaxDecPart) color labels
3083+c DWGT pswgt*emmesq*factor
3084+c
3085+c**********************************************************
3086+ implicit none
3087+ include 'decay.inc'
3088+c
3089+c Arguments
3090+c
3091+ real*8 pd(0:3,MaxDecPart)
3092+ integer jhel(MaxDecPart),JD(MaxDecPart),ICOL(2,MaxDecPart)
3093+ real*8 dwgt
3094+c
3095+c Global
3096+c
3097+ include 'coupl.inc'
3098+ include 'calc_values.inc'
3099+c
3100+c local
3101+c
3102+ real*8 pswgt,emmesq,fudge,factor
3103+ real*8 aa,aa1,aa2,aa3
3104+ integer isign,jl,jvl,i,j
3105+ logical hadro_dec
3106+ integer multi_decay
3107+ real*8 xprob1,xprob2
3108+c
3109+c EXTERNAL
3110+c
3111+ integer get_hel
3112+ real xran1
3113+ integer iseed
3114+ data iseed/1/ !no effect if already called
3115+
3116+C------
3117+C START
3118+C------
3119+
3120+ DWGT =0d0
3121+ emmesq =0d0
3122+ isign =ip/abs(ip)
3123+ aa =0d0
3124+ aa1 =0d0
3125+ aa2 =0d0
3126+ do i=2,MaxDecPart
3127+ icol(1,i)=0
3128+ icol(2,i)=0
3129+ enddo
3130+
3131+c write(*,*) 'from event: imode,ip',imode,ip
3132+
3133+ If(abs(ip).eq.6) then
3134+*-----------------------------------------------------
3135+* top decays
3136+*-----------------------------------------------------
3137+
3138+
3139+ If(imode.eq.1) then
3140+*------------------------
3141+* t -> b w+
3142+* t~ -> b~ w-
3143+*------------------------
3144+
3145+c-- masses
3146+ M1=tmass
3147+ M2=bmass
3148+ M3=wmass
3149+c-- id's
3150+ jd(2)=isign*5 !b or b~
3151+ jd(3)=isign*24 !w+ or w-
3152+c-- color
3153+ icol(1,2)=icol(1,1) ! color of the top
3154+ icol(2,2)=icol(2,1) !anti-color of the top
3155+c-- couplings
3156+ GXX(1)=gwf(1)
3157+ GXX(2)=gwf(2)
3158+c-- color*(bose factor)*number of helicities
3159+ factor=1d0*1d0*6d0
3160+c-- helicities
3161+ jhel(2) = get_hel(xran1(iseed),2)
3162+ jhel(3) = get_hel(xran1(iseed),3)
3163+c-- phase space
3164+ call phasespace(pd,pswgt)
3165+ if(pswgt.eq.0d0) return
3166+c-- matrix element
3167+ if(isign.eq. 1) call emme_ffv(pd,jhel,emmesq)
3168+ if(isign.eq.-1) call emme_fxfv(pd,jhel,emmesq)
3169+c-- weight
3170+ dwgt=pswgt*emmesq*factor
3171+c-- check that dwgt is a reasonable number
3172+ call check_nan(dwgt)
3173+
3174+ return
3175+ endif !end imode=1
3176+
3177+ if(imode.ge.2.and.imode.le.8) then
3178+*------------------------
3179+* t -> b vl l+ ,jj
3180+* t~ -> b~ l vl~ ,jj
3181+*------------------------
3182+
3183+c-- masses
3184+ M1=tmass
3185+ M2=bmass
3186+ M3=0d0
3187+ M4=0d0
3188+ MV=WMASS
3189+ GV=WWIDTH
3190+c-- color
3191+ icol(1,2)=icol(1,1) ! color of the top
3192+ icol(2,2)=icol(2,1) !anti-color of the top
3193+c-- id's
3194+ if(isign.eq.1) then !t
3195+ jl=4
3196+ jvl=3
3197+ else !t~
3198+ jl=3
3199+ jvl=4
3200+ endif
3201+ jd(2)=isign*5 !b or b~
3202+c-- rnd number
3203+ if(imode.ge.5) aa =dble(xran1(iseed))
3204+ if(imode.eq.8) aa1=dble(xran1(iseed))
3205+c
3206+c various cases imode=2,3,4,5,6,7,8
3207+c
3208+ if(imode.eq.2) then
3209+*-------------------
3210+* t -> b ve e+
3211+*-------------------
3212+ jd(jvl)=isign*12 !ve or ve~
3213+ jd(jl) =isign*(-11) !e+ or e-
3214+
3215+ elseif(imode.eq.3) then
3216+*--------------------
3217+* t -> b vm mu+
3218+*--------------------
3219+ jd(jvl)=isign*14 !vm or vm~
3220+ jd(jl) =isign*(-13) !mu+ or mu-
3221+
3222+ elseif(imode.eq.4) then
3223+*-------------------
3224+* t -> b vt ta+
3225+*-------------------
3226+ if(isign.eq.1) then !t
3227+ M3=0D0
3228+ M4=lmass
3229+ else !t~
3230+ M3=lmass
3231+ M4=0d0
3232+ endif
3233+ jd(jvl)=isign*16 !vt or vt~
3234+ jd(jl) =isign*(-15) !ta+ or ta-
3235+
3236+ elseif(imode.eq.5) then
3237+*-------------------
3238+* t -> b vl l+ (e+mu)
3239+*-------------------
3240+ if(aa.lt.Half) then
3241+ jd(jvl)=isign*12 !ve or ve~
3242+ jd(jl) =isign*(-11) !e+ or e-
3243+ else
3244+ jd(jvl)=isign*14 !vm or vm~
3245+ jd(jl) =isign*(-13) !mu+ or mu-
3246+ endif
3247+
3248+ elseif(imode.eq.6) then
3249+*-------------------
3250+* t -> b vl l+ (e+mu+ta)
3251+*-------------------
3252+ if(aa.lt.one/Three) then
3253+ jd(jvl)=isign*12 !ve or ve~
3254+ jd(jl) =isign*(-11) !e+ or e-
3255+ elseif(aa.lt.two/three) then
3256+ jd(jvl)=isign*14 !vm or vm~
3257+ jd(jl) =isign*(-13) !mu+ or mu-
3258+ else
3259+ if(isign.eq.1) then !t
3260+ M3=0D0
3261+ M4=lmass
3262+ else !t~
3263+ M3=lmass
3264+ M4=0d0
3265+ endif
3266+ jd(jvl)=isign*16 !vt or vt~
3267+ jd(jl) =isign*(-15) !ta+ or ta-
3268+ endif
3269+
3270+ elseif(imode.eq.7) then
3271+*-------------------
3272+* t -> b j j (ud,cs)
3273+*-------------------
3274+c-- color
3275+ icol(1,3)=cindex !position 3 is always a particle
3276+ icol(2,3)=0
3277+ icol(1,4)=0 !position 4 is always a anti-particle
3278+ icol(2,4)=cindex
3279+
3280+ if(aa.lt..5d0) then
3281+ jd(jvl)=isign*2 !u or u~
3282+ jd(jl) =isign*(-1) !d~ or d
3283+ else
3284+ if(isign.eq.1) then !t
3285+ M3=cmass
3286+ M4=0d0
3287+ else !t~
3288+ M3=0d0
3289+ M4=cmass
3290+ endif
3291+ jd(jvl)=isign*4 !c or c~
3292+ jd(jl) =isign*(-3) !s~ or s
3293+ endif
3294+
3295+ elseif(imode.eq.8) then
3296+*-------------------
3297+* t -> b anything
3298+*-------------------
3299+c
3300+c first decide if W decays leptonically or hadronically
3301+c
3302+ if(aa1.lt.3d0*br_w_lv) then !leptonic decay
3303+ hadro_dec=.false.
3304+ if(aa.lt.one/Three) then
3305+ jd(jvl)=isign*12 !ve or ve~
3306+ jd(jl) =isign*(-11) !e+ or e-
3307+ elseif(aa.lt.two/three) then
3308+ jd(jvl)=isign*14 !vm or vm~
3309+ jd(jl) =isign*(-13) !mu+ or mu-
3310+ else
3311+ if(isign.eq.1) then !t
3312+ M3=0D0
3313+ M4=lmass
3314+ else !t~
3315+ M3=lmass
3316+ M4=0d0
3317+ endif
3318+ jd(jvl)=isign*16 !vt or vt~
3319+ jd(jl) =isign*(-15) !ta+ or ta-
3320+ endif
3321+
3322+ else ! hadronic decay
3323+ hadro_dec=.true.
3324+c-- color
3325+ icol(1,3)=cindex !position 3 is always a particle
3326+ icol(2,3)=0
3327+ icol(1,4)=0 !position 4 is always a anti-particle
3328+ icol(2,4)=cindex
3329+
3330+ if(aa.lt..5d0) then
3331+ jd(jvl)=isign*2 !u or u~
3332+ jd(jl) =isign*(-1) !d~ or d
3333+ else
3334+ if(isign.eq.1) then !t
3335+ M3=cmass
3336+ M4=0d0
3337+ else !t~
3338+ M3=0d0
3339+ M4=cmass
3340+ endif
3341+ jd(jvl)=isign*4 !c or c~
3342+ jd(jl) =isign*(-3) !s~ or s
3343+ endif
3344+ endif
3345+
3346+ endif !imode(from 2 to 8)
3347+ endif !imode
3348+
3349+c-- couplings
3350+ GXX(1)=gwf(1)
3351+ GXX(2)=gwf(2)
3352+c-- color*(bose factor)*number of helicities
3353+ factor=(3d0/3d0)*1d0*4d0
3354+ if(imode.eq.7) factor=factor*3d0 !quark color in jj
3355+ if(imode.eq.8.and.hadro_dec) factor=factor*3d0 !quark color in jj
3356+c-- helicities
3357+ jhel(2) = get_hel(xran1(iseed),2)
3358+ jhel(3) = get_hel(xran1(iseed),2)
3359+ jhel(4) = -jhel(3)
3360+c-- phase space
3361+ if(GV.eq.0d0) call error_trap("GV")
3362+ call phasespace(pd,pswgt)
3363+ if(pswgt.eq.0d0) return
3364+c-- matrix element
3365+ if(isign.eq. 1) call emme_f3f(pd,jhel,emmesq) !t
3366+ if(isign.eq.-1) call emme_fx3f(pd,jhel,emmesq) !t~
3367+c-- weight
3368+ dwgt=pswgt*emmesq*factor
3369+ if(imode.eq.5) dwgt=dwgt*2d0 !l=e,mu
3370+ if(imode.eq.6) dwgt=dwgt*3d0 !l=e,mu,tau
3371+ if(imode.eq.7) dwgt=dwgt*2d0 !jj=ud,cs
3372+ if(imode.eq.8) then
3373+ if(hadro_dec) then
3374+ dwgt=dwgt*2d0/br_w_jj !jj=ud,cs
3375+ else
3376+ dwgt=dwgt*3d0/(3d0*br_w_lv) !l=e,mu,tau
3377+ endif
3378+ endif
3379+c-- check that dwgt is a reasonable number
3380+ call check_nan(dwgt)
3381+ return
3382+ write(*,*) 'non-existing imode for top decays'
3383+ endif ! top decays
3384+
3385+
3386+
3387+ If(abs(ip).eq.15) then
3388+*-----------------------------------------------------
3389+* tau decays
3390+*-----------------------------------------------------
3391+
3392+
3393+ if(imode.le.3) then
3394+*------------------------
3395+* ta -> vt vl l
3396+*------------------------
3397+
3398+c-- masses
3399+ M1=lmass
3400+ M2=0d0
3401+ M3=0d0
3402+ M4=0d0
3403+ MV=WMASS
3404+ GV=WWIDTH
3405+c-- id's
3406+ if(isign.eq.1) then !tau-
3407+ jl=3
3408+ jvl=4
3409+ else !tau+
3410+ jl=4
3411+ jvl=3
3412+ endif
3413+ jd(2)=isign*16 !vt or vt~
3414+c-- couplings
3415+ GXX(1)=gwf(1)
3416+ GXX(2)=gwf(2)
3417+c-- rnd number
3418+ if(imode.eq.3) aa=dble(xran1(iseed))
3419+
3420+ if (imode.eq.1) then
3421+*-------------------
3422+* ta -> vt e ve
3423+*-------------------
3424+ jd(jvl)=isign*(-12) !ve~ or ve
3425+ jd(jl) =isign*(11) !e- or e+
3426+
3427+ elseif(imode.eq.2) then
3428+*-----------------------
3429+* tau -> vt mu vm
3430+*-----------------------
3431+ jd(jvl)=isign*(-14) !vm~ or vm
3432+ jd(jl) =isign*( 13) !mu- or mu+
3433+
3434+ elseif(imode.eq.3) then
3435+*----------------------
3436+* tau -> vt l vl (e+mu)
3437+*----------------------
3438+ if(aa.lt.Half) then
3439+ jd(jvl)=isign*(-12) !ve~ or ve
3440+ jd(jl) =isign*(11) !e- or e+
3441+ else
3442+ jd(jvl)=isign*(-14) !vm~ or vm
3443+ jd(jl) =isign*( 13) !mu- or mu+
3444+ endif
3445+
3446+ endif
3447+
3448+c-- color*(bose factor)*number of helicities
3449+ factor=1d0*1d0*1d0
3450+c-- helicities: by definition of 3rd and 4th particle
3451+ jhel(2) = -isign
3452+ jhel(3) = -1
3453+ jhel(4) = 1
3454+c-- phase space
3455+ call phasespace(pd,pswgt)
3456+ if(pswgt.eq.0d0) return
3457+c-- matrix element
3458+ if(isign.eq. 1) call emme_f3f(pd,jhel,emmesq) !tau-
3459+ if(isign.eq.-1) call emme_fx3f(pd,jhel,emmesq) !tau+
3460+c-- weight
3461+ dwgt=pswgt*emmesq*factor
3462+ if(imode.eq.3) dwgt=dwgt*2d0 !l=e,mu
3463+c-- check that dwgt is a reasonable number
3464+ call check_nan(dwgt)
3465+ return
3466+
3467+
3468+ elseif(imode.eq.4) then
3469+*------------------------
3470+* tau -> vt pi
3471+*------------------------
3472+
3473+c-- masses
3474+ M1=lmass
3475+ M2=0d0
3476+ M3=0.1395d0
3477+c-- id's
3478+ jd(2)=isign*16 !vt or vt~
3479+ jd(3)=isign*(-211) !pi- pi+
3480+c-- couplings
3481+ GXX(1)=gwf(1)
3482+ GXX(2)=gwf(2)
3483+c-- color*(bose factor)*number of helicities
3484+ factor=1d0*1d0*2d0
3485+c-- fudge to normalize
3486+ fudge=lwidth*br_ta_pi/0.00373
3487+ factor=factor*fudge
3488+c-- helicities
3489+ jhel(2) = get_hel(xran1(iseed),2)
3490+ jhel(3) = 0 !not used
3491+c-- phase space
3492+ call phasespace(pd,pswgt)
3493+ if(pswgt.eq.0d0) return
3494+c-- matrix element
3495+ if(isign.eq. 1) call emme_ffs (pd,jhel,emmesq)
3496+ if(isign.eq.-1) call emme_fxfs(pd,jhel,emmesq)
3497+c-- weight
3498+ dwgt=pswgt*emmesq*factor
3499+c-- check that dwgt is a reasonable number
3500+ call check_nan(dwgt)
3501+ return
3502+
3503+ elseIf(imode.eq.5) then
3504+*------------------------
3505+* tau -> vt rho
3506+*------------------------
3507+
3508+c-- masses
3509+ M1=lmass
3510+ M2=0d0
3511+ M3=0.770d0
3512+c-- id's
3513+ jd(2)=isign*16 !vt or vt~
3514+ jd(3)=isign*(-213) !rho- rho +
3515+c-- couplings
3516+ GXX(1)=gwf(1)
3517+ GXX(2)=gwf(2)
3518+c-- color*(bose factor)*number of helicities
3519+ factor=1d0*1d0*6d0
3520+c-- fudge to normalize
3521+ fudge=lwidth*br_ta_ro/0.0182
3522+ factor=factor*fudge
3523+c-- helicities
3524+ jhel(2) = get_hel(xran1(iseed),2)
3525+ jhel(3) = get_hel(xran1(iseed),3)
3526+c-- phase space
3527+ call phasespace(pd,pswgt)
3528+ if(pswgt.eq.0d0) return
3529+c-- matrix element
3530+ if(isign.eq. 1) call emme_ffv (pd,jhel,emmesq)
3531+ if(isign.eq.-1) call emme_fxfv(pd,jhel,emmesq)
3532+c-- weight
3533+ dwgt=pswgt*emmesq*factor
3534+c-- check that dwgt is a reasonable number
3535+ call check_nan(dwgt)
3536+ return
3537+ endif !imodes
3538+ write(*,*) 'non-existing imode for tau decays'
3539+ endif !tau
3540+
3541+
3542+
3543+ If(ip.eq.23) then
3544+*-----------------------------------------------------
3545+* Z decays
3546+*-----------------------------------------------------
3547+
3548+c-- masses
3549+ M1=zmass
3550+ M2=0D0
3551+ M3=0D0
3552+c-- couplings
3553+ GXX(1)=gzl(1)
3554+ GXX(2)=gzl(2)
3555+c-- rnd number for flavour sums
3556+ aa =dble(xran1(iseed))
3557+ aa1=dble(xran1(iseed))
3558+
3559+
3560+ if (imode.eq.1) then
3561+*-------------------
3562+* z->e- e+
3563+*-------------------
3564+ jd(2) = 11
3565+ jd(3) =-11
3566+
3567+ elseif(imode.eq.2) then
3568+*--------------------
3569+* z->mu- mu+
3570+*--------------------
3571+ jd(2) = 13
3572+ jd(3) =-13
3573+
3574+ elseif(imode.eq.3) then
3575+*-------------------
3576+* z->ta- ta+
3577+*-------------------
3578+ M2=lmass
3579+ jd(2) = 15
3580+ jd(3) =-15
3581+
3582+ elseif(imode.eq.4) then
3583+*-------------------
3584+* z->e- e+,mu-mu+
3585+*-------------------
3586+ if(aa.lt.Half) then
3587+ jd(2) = 11
3588+ jd(3) =-11
3589+ else
3590+ jd(2) = 13
3591+ jd(3) =-13
3592+ endif
3593+
3594+ elseif(imode.eq.5) then
3595+*-------------------
3596+* z->e- e+,mu-mu+,ta-ta+
3597+*-------------------
3598+ if(aa.lt.one/Three) then
3599+ jd(2) = 11
3600+ jd(3) =-11
3601+ elseif(aa.lt.two/three) then
3602+ jd(2) = 13
3603+ jd(3) =-13
3604+ else
3605+ M2=lmass
3606+ jd(2) = 15
3607+ jd(3) =-15
3608+ endif
3609+
3610+ elseif(imode.eq.6) then
3611+*------------------------
3612+* z->vl vl~
3613+*------------------------
3614+
3615+c-- couplings
3616+ GXX(1)=gzn(1)
3617+ GXX(2)=gzn(2)
3618+
3619+ if(aa.lt.one/Three) then
3620+ jd(2) = 12
3621+ jd(3) =-12
3622+ elseif(aa.lt.two/three) then
3623+ jd(2) = 14
3624+ jd(3) =-14
3625+ else
3626+ jd(2) = 16
3627+ jd(3) =-16
3628+ endif
3629+
3630+
3631+ elseif(imode.eq.7) then
3632+*------------------------
3633+* z-> b b~
3634+*------------------------
3635+c-- color
3636+ icol(1,2)=cindex !position 2 is always a particle
3637+ icol(2,2)=0
3638+ icol(1,3)=0 !position 3 is always a anti-particle
3639+ icol(2,3)=cindex
3640+
3641+c-- couplings
3642+ GXX(1)=gzd(1)
3643+ GXX(2)=gzd(2)
3644+ M2=bmass
3645+ jd(2) = 5
3646+ jd(3) =-5
3647+
3648+ elseif(imode.eq.8) then
3649+*------------------------
3650+* z-> c c~
3651+*------------------------
3652+c-- color
3653+ icol(1,2)=cindex !position 2 is always a particle
3654+ icol(2,2)=0
3655+ icol(1,3)=0 !position 3 is always a anti-particle
3656+ icol(2,3)=cindex
3657+
3658+c-- couplings
3659+ GXX(1)=gzu(1)
3660+ GXX(2)=gzu(2)
3661+ M2=cmass
3662+ jd(2) = 4
3663+ jd(3) =-4
3664+
3665+
3666+ elseif(imode.eq.9) then
3667+*------------------------
3668+* z-> u,d,c,s
3669+*------------------------
3670+c-- color
3671+ icol(1,2)=cindex !position 2 is always a particle
3672+ icol(2,2)=0
3673+ icol(1,3)=0 !position 3 is always a anti-particle
3674+ icol(2,3)=cindex
3675+
3676+c-- probability of a uc or ds decay
3677+
3678+ xprob1=w_z_uu/(w_z_dd + w_z_uu)
3679+
3680+ if(aa1.lt.xprob1) then ! decay into ups
3681+ multi_decay=1
3682+
3683+ if(aa.lt. .5d0) then !u
3684+ M2=0d0
3685+ jd(2) = 2
3686+ jd(3) =-2
3687+ GXX(1)=gzu(1)
3688+ GXX(2)=gzu(2)
3689+ else !c
3690+ jd(2) = 4
3691+ jd(3) =-4
3692+ M2=cmass
3693+ GXX(1)=gzu(1)
3694+ GXX(2)=gzu(2)
3695+ endif
3696+
3697+ else !decay into downs
3698+ multi_decay=2
3699+ if(aa.lt..5d0) then !d
3700+ M2=0d0
3701+ jd(2) = 1
3702+ jd(3) =-1
3703+ GXX(1)=gzd(1)
3704+ GXX(2)=gzd(2)
3705+ else !s
3706+ jd(2) = 3
3707+ jd(3) =-3
3708+ M2=0d0
3709+ GXX(1)=gzd(1)
3710+ GXX(2)=gzd(2)
3711+ endif
3712+
3713+ endif !which decay: in ups or downs
3714+
3715+ elseif(imode.eq.10) then
3716+*------------------------
3717+* z-> u,d,c,s,b
3718+*------------------------
3719+c-- color
3720+ icol(1,2)=cindex !position 2 is always a particle
3721+ icol(2,2)=0
3722+ icol(1,3)=0 !position 3 is always a anti-particle
3723+ icol(2,3)=cindex
3724+
3725+c-- probability of a uc or ds decay
3726+
3727+ xprob1=2d0*w_z_uu/(2d0*w_z_dd + 2d0*w_z_uu+w_z_bb)
3728+ xprob2=xprob1+2d0*w_z_dd/(2d0*w_z_dd + 2d0*w_z_uu+w_z_bb)
3729+
3730+ if(aa1.lt.xprob1) then ! decay into ups
3731+ multi_decay=1
3732+ if(aa.lt.0.5d0) then !u
3733+ jd(2) = 2
3734+ jd(3) =-2
3735+ M2=0d0
3736+ GXX(1)=gzu(1)
3737+ GXX(2)=gzu(2)
3738+ else !c
3739+ jd(2) = 4
3740+ jd(3) =-4
3741+ M2=cmass
3742+ GXX(1)=gzu(1)
3743+ GXX(2)=gzu(2)
3744+ endif
3745+
3746+ elseif(aa1.lt.xprob2) then ! decay into downs
3747+ multi_decay=2
3748+ if(aa.lt. .5d0) then !d
3749+ M2=0d0
3750+ jd(2) = 1
3751+ jd(3) =-1
3752+ GXX(1)=gzd(1)
3753+ GXX(2)=gzd(2)
3754+ else !s
3755+ jd(2) = 3
3756+ jd(3) =-3
3757+ M2=0d0
3758+ GXX(1)=gzd(1)
3759+ GXX(2)=gzd(2)
3760+ endif
3761+ else ! decay into b's
3762+ multi_decay=3
3763+ jd(2) = 5
3764+ jd(3) =-5
3765+ M2=bmass
3766+ GXX(1)=gzd(1)
3767+ GXX(2)=gzd(2)
3768+ endif
3769+
3770+ else
3771+ write(*,*) 'non-existing imode for Z decays'
3772+ endif ! imode
3773+
3774+ M3=M2
3775+c-- color*(bose factor)*number of helicities
3776+ factor=1d0*1d0*4d0
3777+ if(imode.ge.7) factor=factor*3d0 !quark color in jj
3778+c-- helicities
3779+ jhel(2) = get_hel(xran1(iseed),2)
3780+ jhel(3) = get_hel(xran1(iseed),2)
3781+c-- phase space
3782+ call phasespace(pd,pswgt)
3783+ if(pswgt.eq.0d0) return
3784+c-- matrix element
3785+ call emme_vff(pd,jhel,emmesq)
3786+c-- weight
3787+ dwgt=pswgt*emmesq*factor
3788+ if(imode.eq.4) dwgt=dwgt*2d0 !l=e,mu
3789+ if(imode.eq.5) dwgt=dwgt*3d0 !l=e,mu,tau
3790+ if(imode.eq.6) dwgt=dwgt*3d0 !vl=ve,vm,vt
3791+c
3792+ if(imode.eq.9) then !j=u,d,c,s
3793+ if(multi_decay.eq.1) then
3794+ dwgt=dwgt*2d0/xprob1 !j=u,c
3795+ else
3796+ dwgt=dwgt*2d0/(1.-xprob1) !j=d,s
3797+ endif
3798+ endif
3799+c
3800+ if(imode.eq.10) then !j=u,d,c,s,b
3801+ if(multi_decay.eq.1) then
3802+ dwgt=dwgt*2d0/xprob1 !j=u,c
3803+ elseif(multi_decay.eq.2) then
3804+ dwgt=dwgt*2d0/(xprob2-xprob1) !j=d,s
3805+ elseif(multi_decay.eq.3) then
3806+ dwgt=dwgt/(1.-xprob2) !j=b
3807+ endif
3808+ endif
3809+
3810+ return
3811+c-- check that dwgt is a reasonable number
3812+ call check_nan(dwgt)
3813+ endif ! Z
3814+
3815+
3816+ If(abs(ip).eq.24) then
3817+*-----------------------------------------------------
3818+* W decays
3819+*-----------------------------------------------------
3820+
3821+c-- masses
3822+ M1=wmass
3823+ M2=0d0
3824+ M3=0d0
3825+c-- couplings
3826+ GXX(1)=gwf(1)
3827+ GXX(2)=gwf(2)
3828+c-- id's
3829+ if(isign.eq.1) then !W+
3830+ jl=3
3831+ jvl=2
3832+ else !W-
3833+ jl=2
3834+ jvl=3
3835+ endif
3836+c-- rnd number
3837+ if(imode.ge.4) aa =dble(xran1(iseed))
3838+ if(imode.eq.7) aa1=dble(xran1(iseed))
3839+
3840+
3841+ if(imode.eq.1) then
3842+*------------------------
3843+* w-> e ve
3844+*------------------------
3845+ jd(jvl)=isign*12 !ve or ve~
3846+ jd(jl) =isign*(-11) !e+ or e-
3847+
3848+ elseif(imode.eq.2) then
3849+*--------------------
3850+* w -> mu vm
3851+*--------------------
3852+ jd(jvl)=isign*14 !vm or vm~
3853+ jd(jl) =isign*(-13) !mu+ or mu-
3854+
3855+ elseif(imode.eq.3) then
3856+*-------------------
3857+* w -> ta vt
3858+*-------------------
3859+ if(isign.eq.1) then !t
3860+ M2=0D0
3861+ M3=lmass
3862+ else !t~
3863+ M2=lmass
3864+ M3=0d0
3865+ endif
3866+ jd(jvl)=isign*16 !vt or vt~
3867+ jd(jl) =isign*(-15) !ta+ or ta-
3868+
3869+ elseif(imode.eq.4) then
3870+*-------------------
3871+* w -> vl l+ (e+mu)
3872+*-------------------
3873+ if(aa.lt.Half) then
3874+ jd(jvl)=isign*12 !ve or ve~
3875+ jd(jl) =isign*(-11) !e+ or e-
3876+ else
3877+ jd(jvl)=isign*14 !vm or vm~
3878+ jd(jl) =isign*(-13) !mu+ or mu-
3879+ endif
3880+
3881+ elseif(imode.eq.5) then
3882+*-------------------
3883+* w -> vl l+ (e+mu+ta)
3884+*-------------------
3885+ if(aa.lt.one/Three) then
3886+ jd(jvl)=isign*12 !ve or ve~
3887+ jd(jl) =isign*(-11) !e+ or e-
3888+ elseif(aa.lt.two/three) then
3889+ jd(jvl)=isign*14 !vm or vm~
3890+ jd(jl) =isign*(-13) !mu+ or mu-
3891+ else
3892+ if(isign.eq.1) then !t
3893+ M2=0D0
3894+ M3=lmass
3895+ else !t~
3896+ M2=lmass
3897+ M3=0d0
3898+ endif
3899+ jd(jvl)=isign*16 !vt or vt~
3900+ jd(jl) =isign*(-15) !ta+ or ta-
3901+ endif
3902+
3903+ elseif(imode.eq.6) then
3904+*-------------------
3905+* w -> j j (ud,cs)
3906+*-------------------
3907+c-- color
3908+ icol(1,2)=cindex !position 2 is always a particle
3909+ icol(2,2)=0
3910+ icol(1,3)=0 !position 3 is always a anti-particle
3911+ icol(2,3)=cindex
3912+
3913+ if(aa.lt..5d0) then
3914+ jd(jvl)=isign*2 !u or u~
3915+ jd(jl) =isign*(-1) !d~ or d
3916+ else
3917+ if(isign.eq.1) then !t
3918+ M2=cmass
3919+ M3=0d0
3920+ else !t~
3921+ M2=0d0
3922+ M3=cmass
3923+ endif
3924+ jd(jvl)=isign*4 !c or c~
3925+ jd(jl) =isign*(-3) !s~ or s
3926+ endif
3927+
3928+ elseif(imode.eq.7) then
3929+*-------------------
3930+* w -> anything
3931+*-------------------
3932+c
3933+c first decide if W decays leptonically or hadronically
3934+c
3935+ if(aa1.lt.3d0*br_w_lv) then !leptonic decay
3936+ hadro_dec=.false.
3937+ if(aa.lt.one/Three) then
3938+ jd(jvl)=isign*12 !ve or ve~
3939+ jd(jl) =isign*(-11) !e+ or e-
3940+ elseif(aa.lt.two/three) then
3941+ jd(jvl)=isign*14 !vm or vm~
3942+ jd(jl) =isign*(-13) !mu+ or mu-
3943+ else
3944+ if(isign.eq.1) then !t
3945+ M2=0D0
3946+ M3=lmass
3947+ else !t~
3948+ M2=lmass
3949+ M3=0d0
3950+ endif
3951+ jd(jvl)=isign*16 !vt or vt~
3952+ jd(jl) =isign*(-15) !ta+ or ta-
3953+ endif
3954+ else
3955+ hadro_dec=.true. !hadronic decay
3956+c-- color
3957+ icol(1,2)=cindex !position 2 is always a particle
3958+ icol(2,2)=0
3959+ icol(1,3)=0 !position 3 is always a anti-particle
3960+ icol(2,3)=cindex
3961+
3962+ if(aa.lt..5d0) then
3963+ jd(jvl)=isign*2 !u or u~
3964+ jd(jl) =isign*(-1) !d~ or d
3965+ else
3966+ if(isign.eq.1) then !t
3967+ M2=cmass
3968+ M3=0d0
3969+ else !t~
3970+ M2=0d0
3971+ M3=cmass
3972+ endif
3973+ jd(jvl)=isign*4 !c or c~
3974+ jd(jl) =isign*(-3) !s~ or s
3975+ endif
3976+ endif
3977+ endif
3978+c
3979+c done with the modes: now I start the calculation
3980+c
3981+
3982+c-- color*(bose factor)*number of helicities
3983+ factor=1d0*1d0*2d0
3984+ if(imode.eq.6) factor=factor*3d0 !quark color in jj
3985+ if(imode.eq.7.and.hadro_dec) factor=factor*3d0 !quark color in jj
3986+c-- helicities
3987+ jhel(2) = get_hel(xran1(iseed),2)
3988+ jhel(3) = -jhel(2)
3989+c-- phase space
3990+ call phasespace(pd,pswgt)
3991+ if(pswgt.eq.0d0) return
3992+c-- matrix element
3993+ call emme_vff(pd,jhel,emmesq)
3994+c-- weight
3995+ dwgt=pswgt*emmesq*factor
3996+ if(imode.eq.4) dwgt=dwgt*2d0 !l=e,mu
3997+ if(imode.eq.5) dwgt=dwgt*3d0 !l=e,mu,tau
3998+ if(imode.eq.6) dwgt=dwgt*2d0 !j=ud+cs
3999+ if(imode.eq.7) then
4000+ if(hadro_dec) then
4001+ dwgt=dwgt*2d0/br_w_jj !jj=ud,cs
4002+ else
4003+ dwgt=dwgt*3d0/(3d0*br_w_lv) !l=e,mu,tau
4004+ endif
4005+ endif
4006+
4007+c-- check that dwgt is a reasonable number
4008+ call check_nan(dwgt)
4009+
4010+ return
4011+ endif ! w
4012+
4013+
4014+ If(ip.eq.25) then
4015+*-----------------------------------------------------
4016+* Higgs decays
4017+*-----------------------------------------------------
4018+
4019+ If(imode.eq.1) then
4020+*------------------------
4021+* h->b b~
4022+*------------------------
4023+c-- masses
4024+ M1=hmass
4025+ M2=bmass
4026+ M3=bmass
4027+c-- id's
4028+ jd(2) = 5
4029+ jd(3) =-5
4030+c-- color
4031+ icol(1,2)=cindex !position 2 is always a particle
4032+ icol(2,2)=0
4033+ icol(1,3)=0 !position 3 is always a anti-particle
4034+ icol(2,3)=cindex
4035+c-- couplings
4036+ GXX(1)=ghbot(1)
4037+ GXX(2)=ghbot(2)
4038+c-- color*(bose factor)*number of helicities
4039+ factor=3d0*1d0*2d0
4040+c-- helicities
4041+ jhel(2) = get_hel(xran1(iseed),2)
4042+ jhel(3) = jhel(2)
4043+c-- phase space
4044+ call phasespace(pd,pswgt)
4045+ if(pswgt.eq.0d0) return
4046+c-- matrix element
4047+ call emme_hff(pd,jhel,emmesq)
4048+c-- weight
4049+ dwgt=pswgt*emmesq*factor
4050+c-- check that dwgt is a reasonable number
4051+ call check_nan(dwgt)
4052+ return
4053+
4054+ elseif(imode.eq.2) then
4055+*------------------------
4056+* h->ta- ta+
4057+*------------------------
4058+c-- masses
4059+ M1=hmass
4060+ M2=lmass
4061+ M3=lmass
4062+c-- id's
4063+ jd(2) = 15
4064+ jd(3) =-15
4065+c-- couplings
4066+ GXX(1)=ghtau(1)
4067+ GXX(2)=ghtau(2)
4068+c-- color*(bose factor)*number of helicities
4069+ factor=1d0*1d0*2d0
4070+c-- helicities
4071+ jhel(2) = get_hel(xran1(iseed),2)
4072+ jhel(3) = jhel(2)
4073+c-- phase space
4074+ call phasespace(pd,pswgt)
4075+ if(pswgt.eq.0d0) return
4076+c-- matrix element
4077+ call emme_hff(pd,jhel,emmesq)
4078+c-- weight
4079+ dwgt=pswgt*emmesq*factor
4080+c-- check that dwgt is a reasonable number
4081+ call check_nan(dwgt)
4082+
4083+ return
4084+
4085+ elseif(imode.eq.3) then
4086+*------------------------
4087+* h->mu- mu+
4088+*------------------------
4089+c-- masses
4090+ M1=hmass
4091+ M2=0d0
4092+ M3=0d0
4093+c-- id's
4094+ jd(2) = 13
4095+ jd(3) =-13
4096+c-- couplings
4097+ GXX(1)=ghtau(1)/lmass*0.105658389d0
4098+ GXX(2)=ghtau(2)/lmass*0.105658389d0
4099+c-- color*(bose factor)*number of helicities
4100+ factor=1d0*1d0*2d0
4101+c-- helicities
4102+ jhel(2) = get_hel(xran1(iseed),2)
4103+ jhel(3) = jhel(2)
4104+c-- phase space
4105+ call phasespace(pd,pswgt)
4106+ if(pswgt.eq.0d0) return
4107+c-- matrix element
4108+ call emme_hff(pd,jhel,emmesq)
4109+c-- weight
4110+ dwgt=pswgt*emmesq*factor
4111+c-- check that dwgt is a reasonable number
4112+ call check_nan(dwgt)
4113+ return
4114+
4115+ elseif(imode.eq.4) then
4116+*------------------------
4117+* h-> c c~
4118+*------------------------
4119+c-- masses
4120+ M1=hmass
4121+ M2=cmass
4122+ M3=cmass
4123+c-- id's
4124+ jd(2) = 4
4125+ jd(3) =-4
4126+c-- color
4127+ icol(1,2)=cindex !position 2 is always a particle
4128+ icol(2,2)=0
4129+ icol(1,3)=0 !position 3 is always a anti-particle
4130+ icol(2,3)=cindex
4131+c-- couplings
4132+ GXX(1)=ghcha(1)
4133+ GXX(2)=ghcha(2)
4134+c-- color*(bose factor)*number of helicities
4135+ factor=3d0*1d0*4d0
4136+c-- helicities
4137+ jhel(2) = get_hel(xran1(iseed),2)
4138+ jhel(3) = get_hel(xran1(iseed),2)
4139+c-- phase space
4140+ call phasespace(pd,pswgt)
4141+ if(pswgt.eq.0d0) return
4142+c-- matrix element
4143+ call emme_hff(pd,jhel,emmesq)
4144+c-- weight
4145+ dwgt=pswgt*emmesq*factor
4146+c-- check that dwgt is a reasonable number
4147+ call check_nan(dwgt)
4148+ return
4149+
4150+ elseif(imode.eq.5) then
4151+*------------------------
4152+* h-> t t~
4153+*------------------------
4154+c-- masses
4155+ M1=hmass
4156+ M2=tmass
4157+ M3=tmass
4158+c-- id's
4159+ jd(2) = 6
4160+ jd(3) =-6
4161+c-- couplings
4162+ GXX(1)=ghtop(1)
4163+ GXX(2)=ghtop(2)
4164+c-- color*(bose factor)*number of helicities
4165+ factor=3d0*1d0*4d0
4166+c-- helicities
4167+ jhel(2) = get_hel(xran1(iseed),2)
4168+ jhel(3) = get_hel(xran1(iseed),2)
4169+c-- phase space
4170+ call phasespace(pd,pswgt)
4171+ if(pswgt.eq.0d0) return
4172+c-- matrix element
4173+ call emme_hff(pd,jhel,emmesq)
4174+c-- weight
4175+ dwgt=pswgt*emmesq*factor
4176+c-- check that dwgt is a reasonable number
4177+ call check_nan(dwgt)
4178+ return
4179+
4180+ elseif(imode.eq.6) then
4181+*------------------------
4182+* h-> g g
4183+*------------------------
4184+c-- masses
4185+ M1=hmass
4186+ M2=0d0
4187+ M3=0d0
4188+c-- id's
4189+ jd(2) = 21
4190+ jd(3) = 21
4191+c-- color
4192+ icol(1,2)=cindex
4193+ icol(2,2)=cindex+1
4194+ icol(1,3)=cindex+1
4195+ icol(2,3)=cindex
4196+c-- couplings
4197+ GX=cmplx(1d0)
4198+c-- color*(bose factor)*number of helicities
4199+ factor=8d0*.5d0*4d0
4200+c-- fudge factor for normalization
4201+ factor=factor*hmass*2d0*pi*(SMBRG*SMWDTH)
4202+c-- helicities
4203+ jhel(2) = get_hel(xran1(iseed),2)
4204+ jhel(3) = get_hel(xran1(iseed),2)
4205+c-- phase space
4206+ call phasespace(pd,pswgt)
4207+ if(pswgt.eq.0d0) return
4208+c-- matrix element
4209+ call emme_hvv(pd,jhel,emmesq)
4210+c-- weight
4211+ dwgt=pswgt*emmesq*factor
4212+c-- check that dwgt is a reasonable number
4213+ call check_nan(dwgt)
4214+ return
4215+
4216+ elseif(imode.eq.7) then
4217+*------------------------
4218+* h-> a a
4219+*------------------------
4220+
4221+c-- masses
4222+ M1=hmass
4223+ M2=0d0
4224+ M3=0d0
4225+c-- id's
4226+ jd(2) = 22
4227+ jd(3) = 22
4228+c-- couplings
4229+ GX=cmplx(1d0)
4230+c-- color*(bose factor)*number of helicities
4231+ factor=1d0*.5d0*4d0
4232+c-- fudge factor for normalization
4233+ factor=factor*hmass*16d0*pi*(SMBRGA*SMWDTH)
4234+c-- helicities
4235+ jhel(2) = get_hel(xran1(iseed),2)
4236+ jhel(3) = get_hel(xran1(iseed),2)
4237+c-- phase space
4238+ call phasespace(pd,pswgt)
4239+ if(pswgt.eq.0d0) return
4240+c-- matrix element
4241+ call emme_hvv(pd,jhel,emmesq)
4242+c-- weight
4243+ dwgt=pswgt*emmesq*factor
4244+c-- check that dwgt is a reasonable number
4245+ call check_nan(dwgt)
4246+ return
4247+
4248+ elseif(imode.eq.8) then
4249+*------------------------
4250+* h-> z a
4251+*------------------------
4252+c-- masses
4253+ M1=hmass
4254+ M2=zmass
4255+ M3=0d0
4256+c-- id's
4257+ jd(2) = 23
4258+ jd(3) = 22
4259+c-- couplings
4260+ GX=cmplx(1d0)
4261+c-- color*(bose factor)*number of helicities
4262+ factor=1d0*1d0*6d0
4263+c-- fudge factor for normalization
4264+ factor=factor*SMBRZGA*SMWDTH*
4265+ &8d0*pi*hmass/(1d0-(zmass/hmass)**2)
4266+c-- helicities
4267+ jhel(2) = get_hel(xran1(iseed),3) !-1,0,1
4268+ jhel(3) = get_hel(xran1(iseed),2)
4269+c-- phase space
4270+ call twomom (pd(0,1),pd(0,2),pd(0,3),pswgt)
4271+c-- phase space
4272+ call phasespace(pd,pswgt)
4273+ if(pswgt.eq.0d0) return
4274+c-- matrix element
4275+ call emme_hvv(pd,jhel,emmesq)
4276+c-- weight
4277+ dwgt=pswgt*emmesq*factor
4278+c-- check that dwgt is a reasonable number
4279+ call check_nan(dwgt)
4280+ return
4281+
4282+ elseif(imode.eq.9) then
4283+*------------------------
4284+* h-> w w
4285+*------------------------
4286+c-- masses
4287+ M1=hmass
4288+ M2=wmass
4289+ M3=wmass
4290+c-- id's
4291+ jd(2) = 24
4292+ jd(3) =-24
4293+c-- couplings
4294+ GX=gwwh
4295+c-- color*(bose factor)*number of helicities
4296+ factor=1d0*1d0*9d0
4297+c-- helicities
4298+ jhel(2) = get_hel(xran1(iseed),3)
4299+ jhel(3) = get_hel(xran1(iseed),3)
4300+ jhel(2) = INT(3e0*xran1(iseed)) - 1
4301+ jhel(3) = INT(3e0*xran1(iseed)) - 1
4302+c-- phase space
4303+ call phasespace(pd,pswgt)
4304+ if(pswgt.eq.0d0) return
4305+c-- matrix element
4306+ call emme_hvv(pd,jhel,emmesq)
4307+c-- weight
4308+ dwgt=pswgt*emmesq*factor
4309+c-- check that dwgt is a reasonable number
4310+ call check_nan(dwgt)
4311+ return
4312+
4313+
4314+ elseif(imode.eq.10) then
4315+*--------------------------------
4316+* h -> w* w -> l vl l' vl' (l,l'=e,mu)
4317+*--------------------------------
4318+
4319+c-- masses
4320+ M1=hmass
4321+ M2=0d0
4322+ M3=0d0
4323+ M4=0d0
4324+ M5=0d0
4325+ MV=WMASS
4326+ GV=WWIDTH
4327+c-- id's
4328+ aa1=dble(xran1(iseed))
4329+ aa2=dble(xran1(iseed))
4330+c-- W*-
4331+ if(aa1.lt.half) then
4332+ jd(2) = 11 !e-
4333+ jd(3) = -12 !ve~
4334+ else
4335+ jd(2) = 13 !mu-
4336+ jd(3) = -14 !vm~
4337+ endif
4338+c-- W*+
4339+ if(aa2.lt.half) then
4340+ jd(4) = 12 !ve
4341+ jd(5) = -11 !e+
4342+ else
4343+ jd(4) = 14 !vm
4344+ jd(5) = -13 !mu+
4345+ endif
4346+c-- couplings
4347+ GX =gwwh
4348+ GXX(1) =gwf(1)
4349+ GXX(2) =gwf(2)
4350+ GXX1(1)=gwf(1)
4351+ GXX1(2)=gwf(2)
4352+c-- color*(bose factor)*number of helicities
4353+ factor=1d0*1d0
4354+c-- helicities
4355+ jhel(2)=-1
4356+ jhel(3)=1
4357+ jhel(4)=-1
4358+ jhel(5)=1
4359+c-- phase space
4360+ if(GV.eq.0d0) call error_trap("GV")
4361+ call phasespace(pd,pswgt)
4362+ if(pswgt.eq.0d0) return
4363+c-- matrix element
4364+ call emme_h4f(pd,jhel,emmesq)
4365+c-- weight
4366+ dwgt=pswgt*emmesq*factor
4367+c-- sum of flavours
4368+ dwgt=dwgt*4d0
4369+c-- check that dwgt is a reasonable number
4370+ call check_nan(dwgt)
4371+ return
4372+
4373+ elseif(imode.eq.11) then
4374+*--------------------------------
4375+* h -> w* w -> l vl l' vl' (l,l'=e,mu,ta)
4376+*--------------------------------
4377+
4378+c-- masses
4379+ M1=hmass
4380+ M2=0d0
4381+ M3=0d0
4382+ M4=0d0
4383+ M5=0d0
4384+ MV=WMASS
4385+ GV=WWIDTH
4386+c-- id's
4387+ aa1=dble(xran1(iseed))
4388+ aa2=dble(xran1(iseed))
4389+c-- W*-
4390+ if(aa1.lt.one/three) then
4391+ jd(2) = 11 !e-
4392+ jd(3) = -12 !ve~
4393+ elseif(aa1.lt.two/three) then
4394+ jd(2) = 13 !mu-
4395+ jd(3) = -14 !vm~
4396+ else
4397+ M2 = lmass
4398+ jd(2) = 15 !ta-
4399+ jd(3) = -16 !vt~
4400+ endif
4401+c-- W*+
4402+ if(aa2.lt.one/three) then
4403+ jd(4) = 12 !ve
4404+ jd(5) = -11 !e+
4405+ elseif(aa2.lt.two/three) then
4406+ jd(4) = 14 !vm
4407+ jd(5) = -13 !mu+
4408+ else
4409+ M5 = lmass
4410+ jd(4) = 16 !vt
4411+ jd(5) = -15 !ta+
4412+ endif
4413+
4414+c-- couplings
4415+ GX =gwwh
4416+ GXX(1) =gwf(1)
4417+ GXX(2) =gwf(2)
4418+ GXX1(1)=gwf(1)
4419+ GXX1(2)=gwf(2)
4420+c-- color*(bose factor)*number of helicities
4421+ factor=1d0*1d0
4422+c-- helicities
4423+ jhel(2)=-1
4424+ jhel(3)=1
4425+ jhel(4)=-1
4426+ jhel(5)=1
4427+c-- phase space
4428+ if(GV.eq.0d0) call error_trap("GV")
4429+ call phasespace(pd,pswgt)
4430+ if(pswgt.eq.0d0) return
4431+c-- matrix element
4432+ call emme_h4f(pd,jhel,emmesq)
4433+c-- weight
4434+ dwgt=pswgt*emmesq*factor
4435+c-- sum of flavours
4436+ dwgt=dwgt*9d0
4437+c-- check that dwgt is a reasonable number
4438+ call check_nan(dwgt)
4439+ return
4440+
4441+ elseif(imode.eq.12) then
4442+*--------------------------------
4443+* h -> w* w -> j j l vl (jj=ud,cs;l=e,mu)
4444+*--------------------------------
4445+
4446+c-- masses
4447+ M1=hmass
4448+ M2=0d0
4449+ M3=0d0
4450+ M4=0d0
4451+ M5=0d0
4452+ MV=WMASS
4453+ GV=WWIDTH
4454+c-- color
4455+ icol(1,2)=cindex !position 2 is always a particle
4456+ icol(2,2)=0
4457+ icol(1,3)=0 !position 3 is always a anti-particle
4458+ icol(2,3)=cindex
4459+c-- id's
4460+ aa1=dble(xran1(iseed))
4461+ aa2=dble(xran1(iseed))
4462+ aa3=dble(xran1(iseed))
4463+
4464+ if(aa1.lt.half) then
4465+c-- W*-
4466+ if(aa2.lt.half) then
4467+ jd(2) = 1 !d
4468+ jd(3) = -2 !u~
4469+ else
4470+ M3 = cmass
4471+ jd(2) = 3 !s
4472+ jd(3) = -4 !c~
4473+ endif
4474+c-- W*+
4475+ if(aa3.lt.half) then
4476+ jd(4) = 12 !ve
4477+ jd(5) = -11 !e+
4478+ else
4479+ jd(4) = 14 !vm
4480+ jd(5) = -13 !mu+
4481+ endif
4482+
4483+ else
4484+c-- W*+
4485+ if(aa2.lt.half) then
4486+ jd(2) = 2 !u
4487+ jd(3) = -1 !d~
4488+ else
4489+ M2 = cmass
4490+ jd(2) = 4 !c
4491+ jd(3) = -3 !s~
4492+ endif
4493+c-- W*-
4494+ if(aa3.lt.half) then
4495+ jd(4) = 11 !e-
4496+ jd(5) = -12 !ve~
4497+ else
4498+ jd(4) = 13 !mu-
4499+ jd(5) = -14 !vm~
4500+ endif
4501+ endif
4502+
4503+c-- couplings
4504+ GX =gwwh
4505+ GXX(1) =gwf(1)
4506+ GXX(2) =gwf(2)
4507+ GXX1(1)=gwf(1)
4508+ GXX1(2)=gwf(2)
4509+c-- color*(bose factor)*number of helicities
4510+ factor=3d0*1d0
4511+c-- helicities
4512+ jhel(2)=-1
4513+ jhel(3)=1
4514+ jhel(4)=-1
4515+ jhel(5)=1
4516+c-- phase space
4517+ if(GV.eq.0d0) call error_trap("GV")
4518+ call phasespace(pd,pswgt)
4519+ if(pswgt.eq.0d0) return
4520+c-- matrix element
4521+ call emme_h4f(pd,jhel,emmesq)
4522+c-- weight
4523+ dwgt=pswgt*emmesq*factor
4524+c-- sum of flavours
4525+ dwgt=dwgt*4d0
4526+c-- sum of W+ and W- possibilities
4527+ dwgt=dwgt*2d0
4528+c-- check that dwgt is a reasonable number
4529+ call check_nan(dwgt)
4530+ return
4531+
4532+ elseif(imode.eq.13) then
4533+*--------------------------------
4534+* h -> w* w -> j j l vl (jj=ud,cs;l=e,mu,ta)
4535+*--------------------------------
4536+
4537+c-- masses
4538+ M1=hmass
4539+ M2=0d0
4540+ M3=0d0
4541+ M4=0d0
4542+ M5=0d0
4543+ MV=WMASS
4544+ GV=WWIDTH
4545+c-- color
4546+ icol(1,2)=cindex !position 2 is always a particle
4547+ icol(2,2)=0
4548+ icol(1,3)=0 !position 3 is always a anti-particle
4549+ icol(2,3)=cindex
4550+c-- id's
4551+ aa1=dble(xran1(iseed))
4552+ aa2=dble(xran1(iseed))
4553+ aa3=dble(xran1(iseed))
4554+
4555+ if(aa1.lt.half) then
4556+c-- W*-
4557+ if(aa2.lt.half) then
4558+ jd(2) = 1 !d
4559+ jd(3) = -2 !u~
4560+ else
4561+ M3 = cmass
4562+ jd(2) = 3 !s
4563+ jd(3) = -4 !c~
4564+ endif
4565+c-- W*+
4566+ if(aa3.lt.one/three) then
4567+ jd(4) = 12 !ve
4568+ jd(5) = -11 !e+
4569+ elseif(aa2.lt.two/three) then
4570+ jd(4) = 14 !vm
4571+ jd(5) = -13 !mu+
4572+ else
4573+ M5 = lmass
4574+ jd(4) = 16 !vt
4575+ jd(5) = -15 !ta+
4576+ endif
4577+
4578+ else
4579+c-- W*+
4580+ if(aa2.lt.half) then
4581+ jd(2) = 2 !u
4582+ jd(3) = -1 !d~
4583+ else
4584+ M2 = cmass
4585+ jd(2) = 4 !c
4586+ jd(3) = -3 !s~
4587+ endif
4588+c-- W*-
4589+ if(aa3.lt.one/three) then
4590+ jd(4) = 11 !e-
4591+ jd(5) = -12 !ve~
4592+ elseif(aa3.lt.two/three) then
4593+ jd(4) = 13 !mu-
4594+ jd(5) = -14 !vm~
4595+ else
4596+ M4 = lmass
4597+ jd(4) = 15 !ta-
4598+ jd(5) = -16 !vt~
4599+ endif
4600+ endif
4601+
4602+c-- couplings
4603+ GX =gwwh
4604+ GXX(1) =gwf(1)
4605+ GXX(2) =gwf(2)
4606+ GXX1(1)=gwf(1)
4607+ GXX1(2)=gwf(2)
4608+c-- color*(bose factor)*number of helicities
4609+ factor=3d0*1d0
4610+c-- helicities
4611+ jhel(2)=-1
4612+ jhel(3)=1
4613+ jhel(4)=-1
4614+ jhel(5)=1
4615+c-- phase space
4616+ if(GV.eq.0d0) call error_trap("GV")
4617+ call phasespace(pd,pswgt)
4618+ if(pswgt.eq.0d0) return
4619+c-- matrix element
4620+ call emme_h4f(pd,jhel,emmesq)
4621+c-- weight
4622+ dwgt=pswgt*emmesq*factor
4623+c-- sum of flavours
4624+ dwgt=dwgt*6d0
4625+c-- sum of W+ and W- possibilities
4626+ dwgt=dwgt*2d0
4627+c-- check that dwgt is a reasonable number
4628+ call check_nan(dwgt)
4629+ return
4630+
4631+ elseif(imode.eq.14) then
4632+*------------------------
4633+* h-> z z
4634+*------------------------
4635+c-- masses
4636+ M1=hmass
4637+ M2=zmass
4638+ M3=zmass
4639+c-- id's
4640+ jd(2) = 23
4641+ jd(3) = 23
4642+c-- couplings
4643+ GX=gzzh
4644+c-- color*(bose factor)*number of helicities
4645+ factor=1d0*.5d0*9d0
4646+c-- helicities
4647+ jhel(2) = get_hel(xran1(iseed),3)
4648+ jhel(3) = get_hel(xran1(iseed),3)
4649+c-- phase space
4650+ call phasespace(pd,pswgt)
4651+ if(pswgt.eq.0d0) return
4652+c-- matrix element
4653+ call emme_hvv(pd,jhel,emmesq)
4654+c-- weight
4655+ dwgt=pswgt*emmesq*factor
4656+c-- check that dwgt is a reasonable number
4657+ call check_nan(dwgt)
4658+ return
4659+
4660+ elseif(imode.eq.15) then
4661+*---------------------------------
4662+* h -> z* z -> l- l+ l-' l+'(l,l'=e,mu)
4663+*---------------------------------
4664+
4665+c-- masses
4666+ M1=hmass
4667+ M2=0d0
4668+ M3=0d0
4669+ M4=0d0
4670+ M5=0d0
4671+ MV=ZMASS
4672+ GV=ZWIDTH
4673+c-- id's
4674+ aa1=dble(xran1(iseed))
4675+ aa2=dble(xran1(iseed))
4676+c Z1
4677+ if(aa1.lt.half) then
4678+ jd(2) = 11 !e-
4679+ jd(3) = -11 !e+
4680+ else
4681+ jd(2) = 13 !mu-
4682+ jd(3) = -13 !mu+
4683+ endif
4684+c Z2
4685+ if(aa2.lt.half) then
4686+ jd(4) = 11 !e-
4687+ jd(5) = -11 !e+
4688+ else
4689+ jd(4) = 13 !mu-
4690+ jd(5) = -13 !mu+
4691+ endif
4692+c-- couplings
4693+ GX =gzzh
4694+ GXX(1)=gzl(1)
4695+ GXX(2)=gzl(2)
4696+ GXX1(1)=gzl(1)
4697+ GXX1(2)=gzl(2)
4698+c-- color*(bose factor)*number of helicities
4699+ factor=1d0*1d0*4d0/2d0
4700+c-- helicities
4701+ jhel(2)=+1
4702+ if(xran1(iseed) .gt. .5e0) jhel(2)=-1
4703+ jhel(3)=-jhel(2)
4704+ jhel(4)=+1
4705+ if(xran1(iseed) .gt. .5e0) jhel(4)=-1
4706+ jhel(5)=-jhel(4)
4707+c-- phase space
4708+ if(GV.eq.0d0) call error_trap("GV")
4709+ call phasespace(pd,pswgt)
4710+ if(pswgt.eq.0d0) return
4711+c-- matrix element
4712+ call emme_h4f(pd,jhel,emmesq)
4713+c-- weight
4714+ dwgt=pswgt*emmesq*factor
4715+c-- sum of flavours
4716+ dwgt=dwgt*4d0
4717+c-- check that dwgt is a reasonable number
4718+ call check_nan(dwgt)
4719+ return
4720+
4721+
4722+ elseif(imode.eq.16) then
4723+*---------------------------------
4724+* h -> z* z -> l- l+ l-' l+'(l,l'=e,mu,ta)
4725+*---------------------------------
4726+
4727+c-- masses
4728+ M1=hmass
4729+ M2=0d0
4730+ M3=0d0
4731+ M4=0d0
4732+ M5=0d0
4733+ MV=ZMASS
4734+ GV=ZWIDTH
4735+c-- id's
4736+ aa1=dble(xran1(iseed))
4737+ aa2=dble(xran1(iseed))
4738+c Z
4739+ if(aa1.lt.one/three) then
4740+ jd(2) = 11 !e-
4741+ jd(3) = -11 !e+
4742+ elseif(aa1.lt.two/three) then
4743+ jd(2) = 13 !mu-
4744+ jd(3) = -13 !mu+
4745+ else
4746+ M2 = lmass
4747+ M3 = lmass
4748+ jd(2) = 15 !ta-
4749+ jd(3) = -15 !ta+
4750+ endif
4751+c Z
4752+ if(aa2.lt.one/three) then
4753+ jd(4) = 11 !e-
4754+ jd(5) = -11 !e+
4755+ elseif(aa2.lt.two/three) then
4756+ jd(4) = 13 !mu-
4757+ jd(5) = -13 !mu+
4758+ else
4759+ M4 = lmass
4760+ M5 = lmass
4761+ jd(4) = 15 !ta-
4762+ jd(5) = -15 !ta+
4763+ endif
4764+c-- couplings
4765+ GX =gzzh
4766+ GXX(1)=gzl(1)
4767+ GXX(2)=gzl(2)
4768+ GXX1(1)=gzl(1)
4769+ GXX1(2)=gzl(2)
4770+c-- color*(bose factor)*number of helicities
4771+ factor=1d0*1d0*4d0/2d0
4772+c-- helicities
4773+ jhel(2)=+1
4774+ if(xran1(iseed) .gt. .5e0) jhel(2)=-1
4775+ jhel(3)=-jhel(2)
4776+ jhel(4)=+1
4777+ if(xran1(iseed) .gt. .5e0) jhel(4)=-1
4778+ jhel(5)=-jhel(4)
4779+c-- phase space
4780+ if(GV.eq.0d0) call error_trap("GV")
4781+ call phasespace(pd,pswgt)
4782+ if(pswgt.eq.0d0) return
4783+c-- matrix element
4784+ call emme_h4f(pd,jhel,emmesq)
4785+c-- weight
4786+ dwgt=pswgt*emmesq*factor
4787+c-- sum of flavours
4788+ dwgt=dwgt*9d0
4789+c-- check that dwgt is a reasonable number
4790+ call check_nan(dwgt)
4791+ return
4792+
4793+ elseif(imode.eq.17) then
4794+*---------------------------------
4795+* h -> z* z -> j j~ l- l+ (j=u,d,c,s;l=e,mu )
4796+*---------------------------------
4797+
4798+c-- masses
4799+ M1=hmass
4800+ M2=0d0
4801+ M3=0d0
4802+ M4=0d0
4803+ M5=0d0
4804+ MV=ZMASS
4805+ GV=ZWIDTH
4806+c-- color
4807+ icol(1,2)=cindex !position 2 is always a particle
4808+ icol(2,2)=0
4809+ icol(1,3)=0 !position 3 is always a anti-particle
4810+ icol(2,3)=cindex
4811+c-- couplings
4812+ GX =gzzh
4813+ GXX(1)=gzl(1)
4814+ GXX(2)=gzl(2)
4815+ GXX1(1)=gzl(1)
4816+ GXX1(2)=gzl(2)
4817+c-- id's
4818+ aa =dble(xran1(iseed))
4819+ aa1=dble(xran1(iseed))
4820+ aa2=dble(xran1(iseed))
4821+c Z1
4822+c-- probability of a uc or ds decay
4823+
4824+ xprob1=w_z_uu/(w_z_dd + w_z_uu)
4825+
4826+ if(aa1.lt.xprob1) then ! decay into ups
4827+ multi_decay=1
4828+
4829+ if(aa.lt. .5d0) then !u
4830+ M2=0d0
4831+ jd(2) = 2
4832+ jd(3) =-2
4833+ GXX(1)=gzu(1)
4834+ GXX(2)=gzu(2)
4835+ else !c
4836+ jd(2) = 4
4837+ jd(3) =-4
4838+ M2=cmass
4839+ GXX(1)=gzu(1)
4840+ GXX(2)=gzu(2)
4841+ endif
4842+
4843+ else !decay into downs
4844+ multi_decay=2
4845+ if(aa.lt..5d0) then !d
4846+ M2=0d0
4847+ jd(2) = 1
4848+ jd(3) =-1
4849+ GXX(1)=gzd(1)
4850+ GXX(2)=gzd(2)
4851+ else !s
4852+ jd(2) = 3
4853+ jd(3) =-3
4854+ M2=0d0
4855+ GXX(1)=gzd(1)
4856+ GXX(2)=gzd(2)
4857+ endif
4858+
4859+ endif !which decay: in ups or downs
4860+ M3=M2
4861+c Z2
4862+ if(aa2.lt.half) then
4863+ jd(4) = 11 !e-
4864+ jd(5) = -11 !e+
4865+ else
4866+ jd(4) = 13 !mu-
4867+ jd(5) = -13 !mu+
4868+ endif
4869+
4870+c-- color*(bose factor)*number of helicities
4871+ factor=3d0*1d0*4d0/2d0
4872+c-- helicities
4873+ jhel(2)=+1
4874+ if(xran1(iseed) .gt. .5e0) jhel(2)=-1
4875+ jhel(3)=-jhel(2)
4876+ jhel(4)=+1
4877+ if(xran1(iseed) .gt. .5e0) jhel(4)=-1
4878+ jhel(5)=-jhel(4)
4879+c-- phase space
4880+ if(GV.eq.0d0) call error_trap("GV")
4881+ call phasespace(pd,pswgt)
4882+ if(pswgt.eq.0d0) return
4883+c-- matrix element
4884+ call emme_h4f(pd,jhel,emmesq)
4885+c-- weight
4886+ dwgt=pswgt*emmesq*factor
4887+c-- sum of flavours
4888+ dwgt=dwgt*2d0
4889+ if(multi_decay.eq.1) then
4890+ dwgt=dwgt*2d0/xprob1 !j=u,c
4891+ else
4892+ dwgt=dwgt*2d0/(1.-xprob1) !j=d,s
4893+ endif
4894+c-- sum of two possibilities for the decay of a Z
4895+ dwgt=dwgt*2d0
4896+c-- check that dwgt is a reasonable number
4897+ call check_nan(dwgt)
4898+ return
4899+
4900+ elseif(imode.eq.18) then
4901+*---------------------------------
4902+* h -> z* z -> j j~ l- l+ (j=u,d,c,s;l=e,mu,ta)
4903+*---------------------------------
4904+
4905+c-- masses
4906+ M1=hmass
4907+ M2=0d0
4908+ M3=0d0
4909+ M4=0d0
4910+ M5=0d0
4911+ MV=ZMASS
4912+ GV=ZWIDTH
4913+c-- color
4914+ icol(1,2)=cindex !position 2 is always a particle
4915+ icol(2,2)=0
4916+ icol(1,3)=0 !position 3 is always a anti-particle
4917+ icol(2,3)=cindex
4918+c-- couplings
4919+ GX =gzzh
4920+ GXX(1)=gzl(1)
4921+ GXX(2)=gzl(2)
4922+ GXX1(1)=gzl(1)
4923+ GXX1(2)=gzl(2)
4924+c-- id's
4925+ aa =dble(xran1(iseed))
4926+ aa1=dble(xran1(iseed))
4927+ aa2=dble(xran1(iseed))
4928+c Z1
4929+ xprob1=w_z_uu/(w_z_dd + w_z_uu)
4930+ if(aa1.lt.xprob1) then ! decay into ups
4931+ multi_decay=1
4932+
4933+ if(aa.lt. .5d0) then !u
4934+ M2=0d0
4935+ jd(2) = 2
4936+ jd(3) =-2
4937+ GXX(1)=gzu(1)
4938+ GXX(2)=gzu(2)
4939+ else !c
4940+ jd(2) = 4
4941+ jd(3) =-4
4942+ M2=cmass
4943+ GXX(1)=gzu(1)
4944+ GXX(2)=gzu(2)
4945+ endif
4946+
4947+ else !decay into downs
4948+ multi_decay=2
4949+ if(aa.lt..5d0) then !d
4950+ M2=0d0
4951+ jd(2) = 1
4952+ jd(3) =-1
4953+ GXX(1)=gzd(1)
4954+ GXX(2)=gzd(2)
4955+ else !s
4956+ jd(2) = 3
4957+ jd(3) =-3
4958+ M2=0d0
4959+ GXX(1)=gzd(1)
4960+ GXX(2)=gzd(2)
4961+ endif
4962+
4963+ endif !which decay: in ups or downs
4964+ M3=M2
4965+c Z2
4966+ if(aa2.lt.one/three) then
4967+ jd(4) = 11 !e-
4968+ jd(5) = -11 !e+
4969+ elseif(aa2.lt.two/three) then
4970+ jd(4) = 13 !mu-
4971+ jd(5) = -13 !mu+
4972+ else
4973+ M4 = lmass
4974+ M5 = lmass
4975+ jd(4) = 15 !ta-
4976+ jd(5) = -15 !ta+
4977+ endif
4978+
4979+
4980+c-- color*(bose factor)*number of helicities
4981+ factor=3d0*1d0*4d0/2d0
4982+c-- helicities
4983+ jhel(2)=+1
4984+ if(xran1(iseed) .gt. .5e0) jhel(2)=-1
4985+ jhel(3)=-jhel(2)
4986+ jhel(4)=+1
4987+ if(xran1(iseed) .gt. .5e0) jhel(4)=-1
4988+ jhel(5)=-jhel(4)
4989+c-- phase space
4990+ if(GV.eq.0d0) call error_trap("GV")
4991+ call phasespace(pd,pswgt)
4992+ if(pswgt.eq.0d0) return
4993+c-- matrix element
4994+ call emme_h4f(pd,jhel,emmesq)
4995+c-- weight
4996+ dwgt=pswgt*emmesq*factor
4997+c-- sum of flavours
4998+ dwgt=dwgt*3d0
4999+ if(multi_decay.eq.1) then
5000+ dwgt=dwgt*2d0/xprob1 !j=u,c
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches