Merge lp:~maddevelopers/mg5amcnlo/3.0.2 into lp:mg5amcnlo/3.0

Proposed by Olivier Mattelaer on 2020-03-27
Status: Merged
Merged at revision: 961
Proposed branch: lp:~maddevelopers/mg5amcnlo/3.0.2
Merge into: lp:mg5amcnlo/3.0
Diff against target: 30647 lines (+11169/-5821)
325 files modified
HELAS/v2xxxx.f (+2/-2)
MadSpin/decay.py (+11/-10)
MadSpin/interface_madspin.py (+54/-23)
MadSpin/src/driver.f (+181/-13)
Template/Common/Cards/delphes_card_ATLAS.dat (+1/-2)
Template/Common/Cards/delphes_card_CMS.dat (+1/-1)
Template/Common/Cards/delphes_card_default.dat (+1/-1)
Template/LO/Cards/run_card.dat (+40/-75)
Template/LO/Source/.make_opts (+6/-2)
Template/LO/Source/BIAS/ptj_bias/makefile (+1/-5)
Template/LO/Source/PDF/PhotonFlux.f (+13/-1)
Template/LO/Source/PDF/pdg2pdf.f (+9/-6)
Template/LO/Source/PDF/pdg2pdf_lhapdf.f (+1/-0)
Template/LO/Source/PDF/pdg2pdf_lhapdf6.f (+11/-6)
Template/LO/Source/dsample.f (+24/-4)
Template/LO/Source/genps.inc (+5/-0)
Template/LO/Source/run.inc (+7/-1)
Template/LO/Source/transpole.f (+20/-1)
Template/LO/SubProcesses/cuts.f (+1/-0)
Template/LO/SubProcesses/dummy_fct.f (+10/-0)
Template/LO/SubProcesses/genps.f (+52/-4)
Template/LO/SubProcesses/myamp.f (+43/-116)
Template/LO/SubProcesses/reweight.f (+49/-10)
Template/LO/SubProcesses/setcuts.f (+9/-2)
Template/LO/bin/internal/Gridpack/compile (+1/-1)
Template/NLO/Cards/FKS_params.dat (+10/-6)
Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script (+113/-40)
Template/NLO/MCatNLO/shower_template.sh (+5/-2)
Template/NLO/Source/PDF/pdg2pdf.f (+8/-5)
Template/NLO/Source/PDF/pdg2pdf_lhapdf.f (+8/-5)
Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f (+8/-5)
Template/NLO/Source/kin_functions.f (+1/-1)
Template/NLO/Source/makefile (+1/-0)
Template/NLO/Source/ranmar.f (+0/-15)
Template/NLO/SubProcesses/BinothLHA.f (+16/-5)
Template/NLO/SubProcesses/BinothLHA_OLP.f (+1/-1)
Template/NLO/SubProcesses/FKSParams.f90 (+248/-0)
Template/NLO/SubProcesses/MC_integer.f (+3/-2)
Template/NLO/SubProcesses/check_poles.f (+3/-16)
Template/NLO/SubProcesses/cuts.f (+1/-1)
Template/NLO/SubProcesses/driver_mintFO.f (+65/-122)
Template/NLO/SubProcesses/driver_mintMC.f (+80/-222)
Template/NLO/SubProcesses/fks_singular.f (+221/-179)
Template/NLO/SubProcesses/genps_fks.f (+17/-24)
Template/NLO/SubProcesses/handling_lhe_events.f (+4/-2)
Template/NLO/SubProcesses/madfks_plot.f (+3/-12)
Template/NLO/SubProcesses/makefile_fks_dir (+26/-25)
Template/NLO/SubProcesses/mint_module.f90 (+1705/-0)
Template/NLO/SubProcesses/polfit.f (+720/-0)
Template/NLO/SubProcesses/setcuts.f (+2/-3)
Template/NLO/SubProcesses/symmetry_fks_v3.f (+4/-34)
Template/NLO/SubProcesses/test_soft_col_limits.f (+4/-20)
Template/NLO/SubProcesses/write_event.f (+2/-4)
Template/loop_material/StandAlone/SubProcesses/makefile (+2/-2)
UpdateNotes.txt (+110/-5)
VERSION (+3/-2)
aloha/aloha_object.py (+717/-2)
aloha/aloha_parsers.py (+10/-3)
aloha/aloha_writers.py (+38/-5)
aloha/create_aloha.py (+53/-9)
bin/mg5_aMC (+11/-4)
madgraph/__init__.py (+7/-0)
madgraph/core/base_objects.py (+174/-25)
madgraph/core/diagram_generation.py (+24/-21)
madgraph/core/drawing.py (+18/-2)
madgraph/core/helas_objects.py (+227/-52)
madgraph/fks/fks_common.py (+19/-4)
madgraph/interface/amcatnlo_run_interface.py (+139/-46)
madgraph/interface/common_run_interface.py (+285/-87)
madgraph/interface/extended_cmd.py (+46/-24)
madgraph/interface/loop_interface.py (+8/-10)
madgraph/interface/madevent_interface.py (+113/-105)
madgraph/interface/madgraph_interface.py (+261/-61)
madgraph/interface/master_interface.py (+19/-9)
madgraph/interface/reweight_interface.py (+68/-18)
madgraph/iolibs/drawing_eps.py (+17/-3)
madgraph/iolibs/export_fks.py (+28/-19)
madgraph/iolibs/export_v4.py (+193/-58)
madgraph/iolibs/group_subprocs.py (+13/-3)
madgraph/iolibs/helas_call_writers.py (+35/-12)
madgraph/iolibs/template_files/Makefile_sa_cpp_sp (+1/-1)
madgraph/iolibs/template_files/Makefile_sa_cpp_src (+1/-1)
madgraph/iolibs/template_files/addmothers.f (+5/-1)
madgraph/iolibs/template_files/auto_dsig_v4.inc (+11/-1)
madgraph/iolibs/template_files/b_sf_xxx_splitorders_fks.inc (+14/-1)
madgraph/iolibs/template_files/madevent_makefile_source (+4/-5)
madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc (+1/-0)
madgraph/iolibs/template_files/matrix_madevent_group_v4.inc (+25/-2)
madgraph/iolibs/template_files/matrix_madevent_v4.inc (+22/-4)
madgraph/iolibs/template_files/matrix_madweight_group_v4.inc (+1/-0)
madgraph/iolibs/template_files/pythia8/pythia8_model_parameters_cc.inc (+47/-45)
madgraph/iolibs/template_files/pythia8/pythia8_model_parameters_h.inc (+5/-3)
madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc (+11/-1)
madgraph/loop/loop_base_objects.py (+5/-1)
madgraph/loop/loop_diagram_generation.py (+4/-1)
madgraph/loop/loop_exporters.py (+1/-1)
madgraph/madevent/gen_ximprove.py (+10/-11)
madgraph/madevent/sum_html.py (+14/-1)
madgraph/various/banner.py (+468/-166)
madgraph/various/diagram_symmetry.py (+7/-2)
madgraph/various/histograms.py (+138/-112)
madgraph/various/lhe_parser.py (+77/-32)
madgraph/various/misc.py (+63/-17)
madgraph/various/process_checks.py (+1/-1)
madgraph/various/shower_card.py (+38/-31)
madgraph/various/systematics.py (+109/-47)
models/check_param_card.py (+3/-0)
models/import_ufo.py (+94/-34)
models/template_files/fortran/lha_read.f (+24/-4)
models/template_files/fortran/rw_para.f (+14/-3)
models/write_param_card.py (+6/-3)
tests/acceptance_tests/test_cmd.py (+7/-7)
tests/acceptance_tests/test_cmd_madevent.py (+59/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%CT_interface.f (+0/-280)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f (+1/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%polynomial.f (+0/-36)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%CT_interface.f (+0/-280)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f (+1/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%polynomial.f (+0/-36)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_002.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_003.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_004.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_005.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_006.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_007.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_008.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%CT_interface.f (+0/-313)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%loop_matrix.f (+1/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%polynomial.f (+0/-36)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%CT_interface.f (+0/-313)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%loop_matrix.f (+1/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%polynomial.f (+0/-36)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%b_sf_001.f (+15/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%orders.inc (+8/-7)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/auto_dsig.f (+11/-1)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f (+36/-8)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f (+19/-9)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/auto_dsig.f (+11/-1)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f (+27/-7)
tests/input_files/IOTestsComparison/IOHistogramTest/DJR_histograms/CKKWL_djrs_output.gnuplot (+53/-54)
tests/input_files/IOTestsComparison/IOHistogramTest/DJR_histograms/MLM_djrs_output.gnuplot (+53/-54)
tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot (+53/-54)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+1/-1)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%CT_interface.f (+0/-302)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f (+1/-2)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%polynomial.f (+0/-37)
tests/input_files/IOTestsComparison/TestMadWeight/modification_to_cuts/cuts.f (+1/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%couplings.f (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%input.inc (+2/-8)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%intparam_definition.inc (+25/-56)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%mp_input.inc (+21/-28)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%mp_intparam_definition.inc (+7/-48)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%rw_para.f (+14/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%couplings.f (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%input.inc (+8/-14)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc (+46/-77)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+23/-30)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+7/-48)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%rw_para.f (+14/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%couplings.f (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%input.inc (+2/-8)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%intparam_definition.inc (+25/-56)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%mp_input.inc (+21/-28)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%mp_intparam_definition.inc (+7/-48)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%rw_para.f (+14/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%couplings.f (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%input.inc (+8/-14)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc (+46/-77)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+23/-30)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+7/-48)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%rw_para.f (+14/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%couplings.f (+4/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%input.inc (+6/-12)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%intparam_definition.inc (+3/-36)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_input.inc (+19/-26)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-44)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%rw_para.f (+14/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%couplings.f (+4/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%input.inc (+4/-10)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc (+33/-64)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_input.inc (+19/-27)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+7/-48)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%rw_para.f (+14/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%couplings.f (+4/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%input.inc (+4/-10)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc (+33/-64)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_input.inc (+19/-27)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+7/-48)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%rw_para.f (+14/-3)
tests/parallel_tests/compare_with_old_mg5_version.py (+77/-3)
tests/parallel_tests/madevent_comparator.py (+24/-11)
tests/parallel_tests/test_MG5aMC_distribution.py (+1/-1)
tests/parallel_tests/test_ML5EW.py (+23/-10)
tests/parallel_tests/test_aloha.py (+20/-2)
tests/time_db (+268/-261)
tests/unit_tests/core/test_base_objects.py (+56/-14)
tests/unit_tests/core/test_helas_objects.py (+125/-0)
tests/unit_tests/interface/test_cmd.py (+43/-3)
tests/unit_tests/iolibs/test_export_cpp.py (+50/-46)
tests/unit_tests/iolibs/test_export_v4.py (+7/-0)
tests/unit_tests/iolibs/test_helas_call_writers.py (+2/-2)
tests/unit_tests/iolibs/test_ufo_parsers.py (+0/-1)
tests/unit_tests/madspin/test_madspin.py (+2/-2)
tests/unit_tests/various/test_banner.py (+42/-0)
tests/unit_tests/various/test_shower_card.py (+16/-1)
tests/unit_tests/various/test_write_param.py (+28/-28)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/3.0.2
Reviewer Review Type Date Requested Status
Olivier Mattelaer Approve on 2020-05-21
Review via email: mp+381317@code.launchpad.net

Description of the change

This is mainly to start the discussion about releasing 3.0.2.
Are we waiting for something specific to release this?

To post a comment you must log in.

First question,

Is it normal that the file tests/acceptance_tests/test_export_fks.py was removed?

Cheers,

Olivier

marco zaro (marco-zaro) wrote :

Hi Olivier,
I see that
 tests/unit_tests/iolibs/test_export_fks.py
exists, I don’t remember why and when it has been moved from/to acceptance_tests.

Ciao,

Marco

> On 27 Mar 2020, at 21:54, Olivier Mattelaer <email address hidden> wrote:
>
> First question,
>
> Is it normal that the file tests/acceptance_tests/test_export_fks.py was removed?
>
> Cheers,
>
> Olivier
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.

Ok, so should we release this?

Olivier

marco zaro (marco-zaro) wrote :

Hi,
I am fine with releasing 3.0.2.
One detail: the new polyfit functionality included in the virt_tricks most of the time significantly increases the disk/ram usage, without having a major impact on run time. I tried it for a couple of processes with eternal photons (in the branch for the alpha0 scheme) and in all cases I had to disable this function via FKS_params.dat, specially when many jobs were submitted on the cluster.
So, I’d suggest either to clearly spell that there may be downsides on the memory/disk consumption, or to have the functionality disabled by default (sorry Rik for all your work…).

What does everybody think here?

Cheers,

marco

> On 6 Apr 2020, at 16:54, Olivier Mattelaer <email address hidden> wrote:
>
> Ok, so should we release this?
>
> Olivier
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.

lp:~maddevelopers/mg5amcnlo/3.0.2 updated on 2020-04-08
980. By olivier-mattelaer on 2020-04-08

fixing tests

Download full text (3.2 KiB)

Hi,

I do not know too much about that feature but presented like that this seems indeed that deactivating this by default make sense.

Otherwise, we have issue with the loop in this version:

======================================================================
FAIL: test_short_ML5_sm_vs_stored_ML4 (tests.parallel_tests.test_ML5.ML5Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/omattelaer/Documents/workspace/3.0.2/tests/parallel_tests/test_ML5.py", line 282, in test_short_ML5_sm_vs_stored_ML4
    chosen_runner='ML4')
  File "/Users/omattelaer/Documents/workspace/3.0.2/tests/parallel_tests/test_ML5.py", line 234, in compare_processes
    my_comp.assert_processes(self, tolerance)
  File "/Users/omattelaer/Documents/workspace/3.0.2/tests/parallel_tests/loop_me_comparator.py", line 1526, in assert_processes
    test_object.assertEqual(fail_str, "Failed for processes:")
AssertionError: 'Failed for processes:u u~ > d d~ 4.8307135319e+00 -3.4038975349e+005.7713195566e+00 d g > d g 1.1009861074e+01 2.7752500246e+00 5.9735543592e-01 g g > d d~ 9.9155829338e-01 -7.2430527735e+001.3172228006e+00 g g > t t~ 4.8445035533e+01 4.0080931226e+01 9.4481931273e-02 d~ d > g a -1.2494442497e+00-5.3667497832e+006.2230725293e-01 d~ d > g z -1.1932658581e+00-5.3105713960e+006.3305789752e-01 ' != 'Failed for processes:'

======================================================================
FAIL: test_short_ML5_sm_vs_stored_ML5 (tests.parallel_tests.test_ML5.ML5Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/omattelaer/Documents/workspace/3.0.2/tests/parallel_tests/test_ML5.py", line 274, in test_short_ML5_sm_vs_stored_ML5
    chosen_runner='ML5_opt')
  File "/Users/omattelaer/Documents/workspace/3.0.2/tests/parallel_tests/test_ML5.py", line 234, in compare_processes
    my_comp.assert_processes(self, tolerance)
  File "/Users/omattelaer/Documents/workspace/3.0.2/tests/parallel_tests/loop_me_comparator.py", line 1526, in assert_processes
    test_object.assertEqual(fail_str, "Failed for processes:")
AssertionError: 'Failed for processes:u u~ > d d~ 6.7303698120e+00 -1.5042412548e+001.5756617880e+00 d g > d g 1.9336116755e-01 -8.0412499551e+001.0492772446e+00 d~ u~ > d~ u~ 2.7814963527e+01 1.9580352460e+01 1.7374314097e-01 g u~ > g u~ 1.9336107775e-01 -8.0412499551e+001.0492772211e+00 g g > d d~ -1.2158385476e+00-9.4504496097e+007.7202218247e-01 g g > t t~ 4.6281795703e+01 3.7816621085e+01 1.0065795459e-01 g g > g g -1.0185218190e+01-1.8419829702e+012.8787267000e-01 d~ d > g a -2.0657523817e+00-6.1830579151e+004.9913931649e-01 u~ u > g z -2.1407021072e+00-6.2580076405e+004.9023072078e-01 d u~ > w- g -2.0691553635e+00-6.1864608969e+004.9872782401e-01 ' != 'Failed for processes:'

----------------------------------------------------------------------
Ran 2 tests in 1231.280s

FAILED (failures=2)
test_short_ML5_sm_vs_stored_ML4 test_short_ML5_sm_vs_stored_ML5

only the finite part is not in agreement...
Is this expected? ...

Read more...

On a related note,
The python3 version of 3.0.2 seems to be ready:
lp:~maddevelopers/mg5amcnlo/3.0.2.py3

It obviously has the same issue with the MadLoop issue.
But otherwise it seems working as expected. So we can test it as well and move to a 4 release scheme in parallel.

I do not get any negative feedback on the python3 release (for the 2.x version) so I hope that we can quickly move --in a month or two-- to supporting only those python3 version (and simplify our lives). Remember that those python3 version still supports python2.7.

Cheers,

Olivier

Richard Ruiz (rruiz) wrote :

Hi Olivier,

Any feedback from users on how mg5mc@py3 is functioning? If not, I can ask
a few more people to stress-test.

best

On Thu, Apr 9, 2020 at 10:55 AM Olivier Mattelaer <
<email address hidden>> wrote:

> On a related note,
> The python3 version of 3.0.2 seems to be ready:
> lp:~maddevelopers/mg5amcnlo/3.0.2.py3
>
> It obviously has the same issue with the MadLoop issue.
> But otherwise it seems working as expected. So we can test it as well and
> move to a 4 release scheme in parallel.
>
> I do not get any negative feedback on the python3 release (for the 2.x
> version) so I hope that we can quickly move --in a month or two-- to
> supporting only those python3 version (and simplify our lives). Remember
> that those python3 version still supports python2.7.
>
> Cheers,
>
> Olivier
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Richard Ruiz, PhD
Fonds Speciaux de Recherche (FSR) Fellow,
Centre for Cosmology, Particle Physics and Phenomenology (CP3),
Université catholique de Louvain
Escargot: 2, Chemin du Cyclotron - Box L7.01.05,
B-1348 Louvain-la-Neuve, Belgium, Earth
Web: https://cp3.irmp.ucl.ac.be/Members/rruiz
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

marco zaro (marco-zaro) wrote :

Hi all,
any update on this merge?
Cheers,
Marco

On Thu, Apr 9, 2020 at 1:18 PM Richard Ruiz <email address hidden>
wrote:

> Hi Olivier,
>
> Any feedback from users on how mg5mc@py3 is functioning? If not, I can ask
> a few more people to stress-test.
>
> best
>
>
> On Thu, Apr 9, 2020 at 10:55 AM Olivier Mattelaer <
> <email address hidden>> wrote:
>
> > On a related note,
> > The python3 version of 3.0.2 seems to be ready:
> > lp:~maddevelopers/mg5amcnlo/3.0.2.py3
> >
> > It obviously has the same issue with the MadLoop issue.
> > But otherwise it seems working as expected. So we can test it as well and
> > move to a 4 release scheme in parallel.
> >
> > I do not get any negative feedback on the python3 release (for the 2.x
> > version) so I hope that we can quickly move --in a month or two-- to
> > supporting only those python3 version (and simplify our lives). Remember
> > that those python3 version still supports python2.7.
> >
> > Cheers,
> >
> > Olivier
> > --
> > https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> > Your team MadDevelopers is subscribed to branch
> > lp:~maddevelopers/mg5amcnlo/3.0.2.
> >
>
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Richard Ruiz, PhD
> Fonds Speciaux de Recherche (FSR) Fellow,
> Centre for Cosmology, Particle Physics and Phenomenology (CP3),
> Université catholique de Louvain
> Escargot: 2, Chemin du Cyclotron - Box L7.01.05,
> B-1348 Louvain-la-Neuve, Belgium, Earth
> Web: https://cp3.irmp.ucl.ac.be/Members/rruiz
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadTeam is requested to review the proposed merge of
> lp:~maddevelopers/mg5amcnlo/3.0.2 into lp:mg5amcnlo/3.0.
>

lp:~maddevelopers/mg5amcnlo/3.0.2 updated on 2020-05-11
981. By olivier-mattelaer on 2020-05-11

merge up to 2.7.2

I have a meeting with Valentin to discuss this merging this afternoon.
Otherwise I have tracked the issue to revision 974
which performs the merge with this branch:
lp:~maddevelopers/mg5amcnlo/3.0.2_loopparams

lp:~maddevelopers/mg5amcnlo/3.0.2 updated on 2020-05-11
982. By olivier-mattelaer on 2020-05-11

fix issue with the non update of loop parameter

Hi,

I have pushed a fix to the issue (thanks Valentin for the discussion on this).
Please take a look if you agree with such modification.

I will move forward on releasing this version now.

Cheers,

Olivier

marco zaro (marco-zaro) wrote :

Hi Olivier,
thanks for the fix.
how about the polyfit business?
Cheers,

Marco

On Wed, Apr 8, 2020 at 10:29 AM Marco Zaro <email address hidden> wrote:

> Hi,
> I am fine with releasing 3.0.2.
> One detail: the new polyfit functionality included in the virt_tricks most
> of the time significantly increases the disk/ram usage, without having a
> major impact on run time. I tried it for a couple of processes with eternal
> photons (in the branch for the alpha0 scheme) and in all cases I had to
> disable this function via FKS_params.dat, specially when many jobs were
> submitted on the cluster.
> So, I’d suggest either to clearly spell that there may be downsides on the
> memory/disk consumption, or to have the functionality disabled by default
> (sorry Rik for all your work…).
>
> What does everybody think here?
>
> Cheers,
>
> marco
>
> > On 6 Apr 2020, at 16:54, Olivier Mattelaer <email address hidden>
> wrote:
> >
> > Ok, so should we release this?
> >
> > Olivier
> > --
> > https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> > Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>
>

Should we disable it by default?

Cheers,

Olivier

> On 11 May 2020, at 19:06, marco zaro <email address hidden> wrote:
>
> Hi Olivier,
> thanks for the fix.
> how about the polyfit business?
> Cheers,
>
> Marco
>
>
> On Wed, Apr 8, 2020 at 10:29 AM Marco Zaro <email address hidden> wrote:
>
>> Hi,
>> I am fine with releasing 3.0.2.
>> One detail: the new polyfit functionality included in the virt_tricks most
>> of the time significantly increases the disk/ram usage, without having a
>> major impact on run time. I tried it for a couple of processes with eternal
>> photons (in the branch for the alpha0 scheme) and in all cases I had to
>> disable this function via FKS_params.dat, specially when many jobs were
>> submitted on the cluster.
>> So, I’d suggest either to clearly spell that there may be downsides on the
>> memory/disk consumption, or to have the functionality disabled by default
>> (sorry Rik for all your work…).
>>
>> What does everybody think here?
>>
>> Cheers,
>>
>> marco
>>
>>> On 6 Apr 2020, at 16:54, Olivier Mattelaer <email address hidden>
>> wrote:
>>>
>>> Ok, so should we release this?
>>>
>>> Olivier
>>> --
>>> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
>>> Your team MadDevelopers is subscribed to branch
>> lp:~maddevelopers/mg5amcnlo/3.0.2.
>>
>>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.

marco zaro (marco-zaro) wrote :

This is what I would suggest, ie to set

158 #UsePolyVirtual

159 .False.

inside Template/NLO/Cards/FKS_params.dat

cheers,

Marco Zaro

On Mon, May 11, 2020 at 8:04 PM Olivier Mattelaer <
<email address hidden>> wrote:

> Should we disable it by default?
>
> Cheers,
>
> Olivier
>
> > On 11 May 2020, at 19:06, marco zaro <email address hidden> wrote:
> >
> > Hi Olivier,
> > thanks for the fix.
> > how about the polyfit business?
> > Cheers,
> >
> > Marco
> >
> >
> > On Wed, Apr 8, 2020 at 10:29 AM Marco Zaro <email address hidden> wrote:
> >
> >> Hi,
> >> I am fine with releasing 3.0.2.
> >> One detail: the new polyfit functionality included in the virt_tricks
> most
> >> of the time significantly increases the disk/ram usage, without having a
> >> major impact on run time. I tried it for a couple of processes with
> eternal
> >> photons (in the branch for the alpha0 scheme) and in all cases I had to
> >> disable this function via FKS_params.dat, specially when many jobs were
> >> submitted on the cluster.
> >> So, I’d suggest either to clearly spell that there may be downsides on
> the
> >> memory/disk consumption, or to have the functionality disabled by
> default
> >> (sorry Rik for all your work…).
> >>
> >> What does everybody think here?
> >>
> >> Cheers,
> >>
> >> marco
> >>
> >>> On 6 Apr 2020, at 16:54, Olivier Mattelaer <
> <email address hidden>>
> >> wrote:
> >>>
> >>> Ok, so should we release this?
> >>>
> >>> Olivier
> >>> --
> >>>
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> >>> Your team MadDevelopers is subscribed to branch
> >> lp:~maddevelopers/mg5amcnlo/3.0.2.
> >>
> >>
> >
> > --
> > https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> > Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>

Rikkert can you comment on that?

Olivier

Rikkert Frederix (frederix) wrote :

Hi,

It's kind of a pity that this PolyVirtual doesn't work for you. Let's keep it turned off by default as Marco suggests -- at least for this release.

Best,
Rikkert

marco zaro (marco-zaro) wrote :

Hi Rikkert,
thanks for your work on this. As I told you, I had crashes on the louvain cluster, due to the large memory and space usage. I guess that if you have few jobs that can be run on multicore, then you do get improvements, but i think that on a cluster it can create problems…

cheers,

marco

> On 13 May 2020, at 17:42, Rikkert Frederix <email address hidden> wrote:
>
> Hi,
>
> It's kind of a pity that this PolyVirtual doesn't work for you. Let's keep it turned off by default as Marco suggests -- at least for this release.
>
> Best,
> Rikkert
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.

Valentin Hirschi (valentin-hirschi) wrote :

Very naively I would expect the source of large memory consumption as to be
stemming from either a memory leak of PolyFit unnecessarily keeping all
training sample fed in memory.
Rik, do you know which one it is? If the latter, isn't there any easy way
of truncating the internal "history" of PolyFit so as to effectively cap
its memory footprint?

On Wed, May 13, 2020 at 5:45 PM marco zaro <email address hidden> wrote:

> Hi Rikkert,
> thanks for your work on this. As I told you, I had crashes on the louvain
> cluster, due to the large memory and space usage. I guess that if you have
> few jobs that can be run on multicore, then you do get improvements, but i
> think that on a cluster it can create problems…
>
> cheers,
>
> marco
>
>
> > On 13 May 2020, at 17:42, Rikkert Frederix <email address hidden>
> wrote:
> >
> > Hi,
> >
> > It's kind of a pity that this PolyVirtual doesn't work for you. Let's
> keep it turned off by default as Marco suggests -- at least for this
> release.
> >
> > Best,
> > Rikkert
> >
> > --
> > https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> > Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>

--
Valentin

Rikkert Frederix (frederix) wrote :

Hi Valentin,

PolyVirtual keeps all events (i.e., the random numbers that corresponds to the generated momenta) for which the virtual have been computed in memory to get the best possible polynomial fit for the virtuals. It also writes them all to disk so that they can be re-used in the next integration step.

I had hoped that in practice there are few enough PS points for which the virtuals need to be computed (i.e., well below several million) that this would not become an issue for most processes (in particular since the virt-tricks should work slightly better with the PolyVirtuals than without). Apparently this is not good enough when running on a cluster requiring high accuracy.

Best,
Rikkert

Valentin Hirschi (valentin-hirschi) wrote :

Hi Rik,

Ok and I guess truncating the history to keep only a fixed number of past
events (may not impact the quality of the fit so much if this number is
large enough) would be hard to implement?

On Wed, May 13, 2020 at 6:25 PM Rikkert Frederix <email address hidden>
wrote:

> Hi Valentin,
>
> PolyVirtual keeps all events (i.e., the random numbers that corresponds to
> the generated momenta) for which the virtual have been computed in memory
> to get the best possible polynomial fit for the virtuals. It also writes
> them all to disk so that they can be re-used in the next integration step.
>
> I had hoped that in practice there are few enough PS points for which the
> virtuals need to be computed (i.e., well below several million) that this
> would not become an issue for most processes (in particular since the
> virt-tricks should work slightly better with the PolyVirtuals than
> without). Apparently this is not good enough when running on a cluster
> requiring high accuracy.
>
> Best,
> Rikkert
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>

--
Valentin

This looks like a very painfull version to release:
Looks like we have a new (MadLoop?) issue:

The (parralel) test crashing is the following one:

ERROR: test_short_jet_veto_xsec (tests.parallel_tests.test_cmd_amcatnlo.MECmdShell)
tests the jet-veto cross section at NNLL+NLO

The associated log file points an issue with the poles:
In this case ML returns 0 which likely points to another issue related to not updating the virtual coupling correctly.

 ---- POLES CANCELLED ----
  COEFFICIENT DOUBLE POLE:
        MadFKS: -0.43764352847099569 OLP: 0.0000000000000000
  COEFFICIENT SINGLE POLE:
        MadFKS: 1.1667772655032984 OLP: 0.0000000000000000
 FIX VETOXSEC in FKS_EW
Time in seconds: 1

Eleni Vryonidou (evryonidou) wrote :

Hi Olivier, we noticed this (or a very similar) problem with some EFT tests in 3.0.x. Gauthier reported this by email to Valentin. I can forward the emails to you.

The problem occurred with COLLIER, we had this kind of incoherent output produced:

 ---- POLES CANCELLED ----
  COEFFICIENT DOUBLE POLE:
        MadFKS: -8.8973918441133455E-008 OLP: 0.0000000000000000
  COEFFICIENT SINGLE POLE:
        MadFKS: -4.7574099859731733E-008 OLP: -5.1368048587786267E-008

Rikkert Frederix (frederix) wrote :

Hi Olivier,

The NNLL+NLO jet veto cross sections are not supposed to work yet in the 3.0.2 branch. Hence, it shouldn't be a surprise that this test fails.
However, the factor that the coefficients of the poles are not correct is strange and shouldn't happen.

Best,
Rikkert

lp:~maddevelopers/mg5amcnlo/3.0.2 updated on 2020-05-15
983. By olivier-mattelaer on 2020-05-13

remove polyfit by default

984. By olivier-mattelaer on 2020-05-15

update IOttest

Indeed with ninja we have the correct pole:
 ---- POLES CANCELLED ----
  COEFFICIENT DOUBLE POLE:
 MadFKS: -0.43764352847099569 OLP: -0.43764352847158994
  COEFFICIENT SINGLE POLE:
 MadFKS: 1.1667772655032984 OLP: 1.1667772655048829

Valentin what is your advise on this?
Should we veto the use of Collier for the moment?

Cheers,

Olivier

marco zaro (marco-zaro) wrote :

Can we set ninja as default (as it should be) and use collier only for
recovery?
I would not disable it completely...
cheers,

Marco Zaro

On Wed, May 20, 2020 at 5:01 PM Olivier Mattelaer <
<email address hidden>> wrote:

> Indeed with ninja we have the correct pole:
> ---- POLES CANCELLED ----
> COEFFICIENT DOUBLE POLE:
> MadFKS: -0.43764352847099569 OLP:
> -0.43764352847158994
> COEFFICIENT SINGLE POLE:
> MadFKS: 1.1667772655032984 OLP:
> 1.1667772655048829
>
> Valentin what is your advise on this?
> Should we veto the use of Collier for the moment?
>
> Cheers,
>
> Olivier
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>

I face the issue because ninja crashed at the installation actually.
Then collier became the default...

1) if we allow collier they are no guarantee that this is not the default.
2) Having a backup returning wrong value is not a good idea either...

I would personally veto collier here and check in 2.7.3 if we need to veto collier as well or not.
This as long as Valentin does not clarify the situation obviously. (and I do not want to wait for a fix to be ready to release this version)

Cheers,

Olivier

> On 20 May 2020, at 18:00, marco zaro <email address hidden> wrote:
>
> Can we set ninja as default (as it should be) and use collier only for
> recovery?
> I would not disable it completely...
> cheers,
>
> Marco Zaro
>
>
> On Wed, May 20, 2020 at 5:01 PM Olivier Mattelaer <
> <email address hidden>> wrote:
>
>> Indeed with ninja we have the correct pole:
>> ---- POLES CANCELLED ----
>> COEFFICIENT DOUBLE POLE:
>> MadFKS: -0.43764352847099569 OLP:
>> -0.43764352847158994
>> COEFFICIENT SINGLE POLE:
>> MadFKS: 1.1667772655032984 OLP:
>> 1.1667772655048829
>>
>> Valentin what is your advise on this?
>> Should we veto the use of Collier for the moment?
>>
>> Cheers,
>>
>> Olivier
>> --
>> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
>> Your team MadDevelopers is subscribed to branch
>> lp:~maddevelopers/mg5amcnlo/3.0.2.
>>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.

Valentin Hirschi (valentin-hirschi) wrote :

I think Ninja crashed because Tiziano moved the installation tarball as
part of his migration from bitbucket to github.

We must keep COLLIER as it is crucial for loop-induced efficiency.
I could not reproduce seg-faults in standalone (and neither did Richard I
believe).
So it is either due to an interplay with the MadFKS code or because of some
particular setting of MadLoop when run within MadFKS as opposed to run in
standalone.

On Wed, May 20, 2020 at 6:12 PM Olivier Mattelaer <
<email address hidden>> wrote:

> I face the issue because ninja crashed at the installation actually.
> Then collier became the default...
>
> 1) if we allow collier they are no guarantee that this is not the default.
> 2) Having a backup returning wrong value is not a good idea either...
>
>
> I would personally veto collier here and check in 2.7.3 if we need to veto
> collier as well or not.
> This as long as Valentin does not clarify the situation obviously. (and I
> do not want to wait for a fix to be ready to release this version)
>
> Cheers,
>
> Olivier
>
>
> > On 20 May 2020, at 18:00, marco zaro <email address hidden> wrote:
> >
> > Can we set ninja as default (as it should be) and use collier only for
> > recovery?
> > I would not disable it completely...
> > cheers,
> >
> > Marco Zaro
> >
> >
> > On Wed, May 20, 2020 at 5:01 PM Olivier Mattelaer <
> > <email address hidden>> wrote:
> >
> >> Indeed with ninja we have the correct pole:
> >> ---- POLES CANCELLED ----
> >> COEFFICIENT DOUBLE POLE:
> >> MadFKS: -0.43764352847099569 OLP:
> >> -0.43764352847158994
> >> COEFFICIENT SINGLE POLE:
> >> MadFKS: 1.1667772655032984 OLP:
> >> 1.1667772655048829
> >>
> >> Valentin what is your advise on this?
> >> Should we veto the use of Collier for the moment?
> >>
> >> Cheers,
> >>
> >> Olivier
> >> --
> >> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> >> Your team MadDevelopers is subscribed to branch
> >> lp:~maddevelopers/mg5amcnlo/3.0.2.
> >>
> >
> > --
> > https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> > Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>

--
Valentin

Stefano Frixione (stefano-frixione) wrote :

Sorry if I didn't follow, but if ninja crashes, we must fix ninja,
not promote collier to being the default.
I think we must not release till ninja is fixed.
Cheers, Stefano.

On Wed, 20 May 2020, Olivier Mattelaer wrote:

> I face the issue because ninja crashed at the installation actually.
> Then collier became the default...
>
> 1) if we allow collier they are no guarantee that this is not the default.
> 2) Having a backup returning wrong value is not a good idea either...
>
>
> I would personally veto collier here and check in 2.7.3 if we need to veto collier as well or not.
> This as long as Valentin does not clarify the situation obviously. (and I do not want to wait for a fix to be ready to release this version)
>
> Cheers,
>
> Olivier
>
>
>> On 20 May 2020, at 18:00, marco zaro <email address hidden> wrote:
>>
>> Can we set ninja as default (as it should be) and use collier only for
>> recovery?
>> I would not disable it completely...
>> cheers,
>>
>> Marco Zaro
>>
>>
>> On Wed, May 20, 2020 at 5:01 PM Olivier Mattelaer <
>> <email address hidden>> wrote:
>>
>>> Indeed with ninja we have the correct pole:
>>> ---- POLES CANCELLED ----
>>> COEFFICIENT DOUBLE POLE:
>>> MadFKS: -0.43764352847099569 OLP:
>>> -0.43764352847158994
>>> COEFFICIENT SINGLE POLE:
>>> MadFKS: 1.1667772655032984 OLP:
>>> 1.1667772655048829
>>>
>>> Valentin what is your advise on this?
>>> Should we veto the use of Collier for the moment?
>>>
>>> Cheers,
>>>
>>> Olivier
>>> --
>>> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
>>> Your team MadDevelopers is subscribed to branch
>>> lp:~maddevelopers/mg5amcnlo/3.0.2.
>>>
>>
>> --
>> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
>> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.
>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.
>

Hi,

Let's try to avoid any confusion here:
1) we do not have any issue with ninja.
   - we can still install it
   - when install it works

2) For some unknow reason, my version of 3.0.2 version was configured as if ninja was not installed in my machine, in that case collier is the next OLP provider and is used as default.

3) We have a bug related to collier that does not return the correct pole (I'm therefore worried about the other output like the finite part of the loop). This bug has been spotted by Eleni and Gauthier and independently by me (thanks to point 2 above)

>We must keep COLLIER as it is crucial for loop-induced efficiency.
I could not reproduce seg-faults in standalone (and neither did Richard I
believe).

Being fast is useless if we are wrong. Like this, this sounds like a bad bug.
If you are sure that this is a MadFKS related bug, then we can forbid the usage of COLLIER only in that case. But it would be nice that you take a real look at this. I prefer to be slow and correct than fast and wrong.

Cheers,

Olivier

Eleni Vryonidou (evryonidou) wrote :

Hi Olivier,

when I was looking at this a few weeks ago I realised that in BinothLHA.f there is this line:

 if ((dabs(avgPoleRes(1))+dabs(avgPoleRes(2))).ne.0d0) then
               cpol = .not.((((PoleDiff(1)+PoleDiff(2))/
     $ (dabs(avgPoleRes(1))+dabs(avgPoleRes(2)))) .lt.
     $ tolerance*10d0).or.(mod(ret_code,10).eq.7))

and
               cpol = .not.((PoleDiff(1)+PoleDiff(2).lt.tolerance*10d0)
     $ .or.(mod(ret_code,10).eq.7))

I believe Collier corresponds to .eq.7 and this is why the test seems to pass, even if the numbers are not agreeing. E.g. I see things like:

 ---- POLES CANCELLED ----
  COEFFICIENT DOUBLE POLE:
        MadFKS: -5.1118724822382218E-008 OLP: 0.0000000000000000
  COEFFICIENT SINGLE POLE:
        MadFKS: -5.4796083693610551E-008 OLP: -9.2617064392846240E-008

Maybe someone can confirm why that line was added there. It’s not the source of the zero numbers, but it’s weird that this was set up like that to allow the test to pass.

Cheers,

Eleni

> On 20 May 2020, at 20:38, Olivier Mattelaer <email address hidden> wrote:
>
> Hi,
>
> Let's try to avoid any confusion here:
> 1) we do not have any issue with ninja.
> - we can still install it
> - when install it works
>
> 2) For some unknow reason, my version of 3.0.2 version was configured as if ninja was not installed in my machine, in that case collier is the next OLP provider and is used as default.
>
> 3) We have a bug related to collier that does not return the correct pole (I'm therefore worried about the other output like the finite part of the loop). This bug has been spotted by Eleni and Gauthier and independently by me (thanks to point 2 above)
>
>
>> We must keep COLLIER as it is crucial for loop-induced efficiency.
> I could not reproduce seg-faults in standalone (and neither did Richard I
> believe).
>
> Being fast is useless if we are wrong. Like this, this sounds like a bad bug.
> If you are sure that this is a MadFKS related bug, then we can forbid the usage of COLLIER only in that case. But it would be nice that you take a real look at this. I prefer to be slow and correct than fast and wrong.
>
> Cheers,
>
> Olivier
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.

Those lines were introduced by rikkert here:
https://bazaar.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/revision/841#Template/NLO/SubProcesses/BinothLHA.f

But if you check the previous version [840] you face the exact same issue.

Actually I reproduce this issue up to version 835.
Version before that are crashing in another way preventing me to get more insight on this issue.
This means that both 3.0.0 and 3.0.1 have the exact same issue.

Cheers,

Olivier

Rikkert Frederix (frederix) wrote :

Hi guys,

These lines were NOT introduced by me. If you go back in through the history you find them all the way back to some merge with a 'COLLIER' branch, (which was merged into 2.5.1 (hence, this is also part of public 2.7.X code) and that branch was later merged to the flattened_FKS_EW_clean branch, which was merged into the current 3.0.X branch).

The COLLIER branch is a branch that Valentin worked on some three years ago:

https://bazaar.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/changes/78.355.27

They were introduced in revision 78.355.19. I couldn't find a commit message, so I don't know why this was introduced here. Valentin, do you remember?

Best,
Rikkert

Stefano Frixione (stefano-frixione) wrote :

Hi Olivier,
thanks for the clarification.

> If you are sure that this is a MadFKS related bug, then we can forbid
> the usage of COLLIER only in that case. But it would be nice that you
A bug is a bug, but I find it hard to believe it's in MadFKS, given
that in this case the only information returned by the latter is the
residues of the poles -- these are of course independent of the OLP,
so one might verify if there is a problem in that respect by running
the same thing on a machine where ninja works.

Cheers, Stefano.

> take a real look at this. I prefer to be slow and correct than fast and
> wrong.
>
> Cheers,
>
> Olivier
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.
>

Hi,

Sorry indeed I miss the fact that Rik change the line in that version but only in a cosmetic way.
Consequently to this I have force the printout of the poles in 2.7.3 and found the same printout:

 ---- POLES CANCELLED ----
 POLES ANCELLATION, DIFFERENCE < 1.0000000000000003E-005
  COEFFICIENT DOUBLE POLE:
        MadFKS: -0.48049656339581920 OLP: 0.0000000000000000
  COEFFICIENT SINGLE POLE:
        MadFKS: 1.2727761694678807 OLP: 0.0000000000000000
  FINITE:
           OLP: -0.69598571535491494

  MOMENTA (Exyzm):
           1 39.800372893656203 0.0000000000000000 0.0000000000000000 39.800372893656203 \
  0.0000000000000000
           2 39.800372893656203 -0.0000000000000000 -0.0000000000000000 -39.800372893656203 \
  0.0000000000000000
           3 39.800372893656203 -18.912294290529488 -32.109690658036719 -13.977216210235818 \
  0.0000000000000000
           4 39.800372893656203 18.912294290529488 32.109690658036719 13.977216210235818 \
  0.0000000000000000

Now running in standalone mode on the same PS point we have (with collier):
|| Total(*) Born contribution (GeV^0):
| Born = 6.2823500530737046e+00
|| Total(*) virtual contribution normalized with born*alpha_S/(2*pi):
| Finite = 1.3071069893544380e+00
| Single pole = -4.7247991865699230e+00
| Double pole = -2.6666666666666692e+00
| (*) The results above sum all starred contributions below

Since Valentin does not want to take a look at this and that I'm completely loss on this I have:
1) revert the bypass on the check of the poles for COLLIER
2) set the default for madloop to ninja then cuttools (collier is only on request)
I have done that both in 2.7.3 and 3.0.2
As soon as Valentin found the time to fix this, we can revert this obviously but I have spent too much time on this and want ( and need to focus on something else)

So with this, we are ready to release 3.0.2

Cheers,

Olivier

review: Approve
lp:~maddevelopers/mg5amcnlo/3.0.2 updated on 2020-05-21
985. By olivier-mattelaer on 2020-05-21

deactivating Collier as long as Valentin did not take a look

Valentin Hirschi (valentin-hirschi) wrote :

Sorry for my slow reaction, I will have a serious look at this.
I'll check with Olivier what is the exact setup to reproduce the problem.
The fact that the problem cannot be reproduced in standalone (unless I
misunderstood the situation, in which case apologies) made me kind of put
it aside in so far as it did not seem like a genuine MadLoop problem but
more its use within MadFKS.
Hopefully I'll be able to easily spot the offending parameter by simply
comparing MadLoop's run for one particular point within MadFKS and in
standalone (which is what I was hoping would straight-forwardly reveal the
issue).
But it seems that the problem is more involved than I thought so I'll
investigate and let you knw.

On Thu, May 21, 2020 at 3:57 PM Olivier Mattelaer <
<email address hidden>> wrote:

> Review: Approve
>
> Hi,
>
> Sorry indeed I miss the fact that Rik change the line in that version but
> only in a cosmetic way.
> Consequently to this I have force the printout of the poles in 2.7.3 and
> found the same printout:
>
> ---- POLES CANCELLED ----
> POLES ANCELLATION, DIFFERENCE < 1.0000000000000003E-005
> COEFFICIENT DOUBLE POLE:
> MadFKS: -0.48049656339581920 OLP:
> 0.0000000000000000
> COEFFICIENT SINGLE POLE:
> MadFKS: 1.2727761694678807 OLP:
> 0.0000000000000000
> FINITE:
> OLP: -0.69598571535491494
>
> MOMENTA (Exyzm):
> 1 39.800372893656203 0.0000000000000000
> 0.0000000000000000 39.800372893656203 \
> 0.0000000000000000
> 2 39.800372893656203 -0.0000000000000000
> -0.0000000000000000 -39.800372893656203 \
> 0.0000000000000000
> 3 39.800372893656203 -18.912294290529488
> -32.109690658036719 -13.977216210235818 \
> 0.0000000000000000
> 4 39.800372893656203 18.912294290529488
> 32.109690658036719 13.977216210235818 \
> 0.0000000000000000
>
> Now running in standalone mode on the same PS point we have (with collier):
> || Total(*) Born contribution (GeV^0):
> | Born = 6.2823500530737046e+00
> || Total(*) virtual contribution normalized with born*alpha_S/(2*pi):
> | Finite = 1.3071069893544380e+00
> | Single pole = -4.7247991865699230e+00
> | Double pole = -2.6666666666666692e+00
> | (*) The results above sum all starred contributions below
>
>
> Since Valentin does not want to take a look at this and that I'm
> completely loss on this I have:
> 1) revert the bypass on the check of the poles for COLLIER
> 2) set the default for madloop to ninja then cuttools (collier is only on
> request)
> I have done that both in 2.7.3 and 3.0.2
> As soon as Valentin found the time to fix this, we can revert this
> obviously but I have spent too much time on this and want ( and need to
> focus on something else)
>
> So with this, we are ready to release 3.0.2
>
> Cheers,
>
> Olivier
>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/3.0.2.
>

--
Valentin

Valentin Hirschi (valentin-hirschi) wrote :
Download full text (4.3 KiB)

So the problem seem to simply be that these few lines in `Binoth_LHA.f`:

         CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
         CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)

are called *after* the similar ones in `check_poles.f`:

c Make sure that stability checks are always used by MadLoop, even for
c initialization
      CALL FORCE_STABILITY_CHECK(.TRUE.)
      CALL COLLIER_COMPUTE_UV_POLES(.TRUE.)
      CALL COLLIER_COMPUTE_IR_POLES(.TRUE.)

which of course means you'd get zero poles when running with COLLIER only.

The introduction of a common block "flag" of the sort of:

logical IS_DOING_POLE_CHECK
common pole_check/IS_DOING_POLE_CHECK
data IS_DOING_POLE_CHECK/.FALSE./

would allow to solve the problem by using it to make sure that
`Binoth_LHA.f` does not disable pole computations with COLLIER when doing
pole checks.

On Thu, May 21, 2020 at 9:42 PM Valentin Hirschi <email address hidden>
wrote:

> Sorry for my slow reaction, I will have a serious look at this.
> I'll check with Olivier what is the exact setup to reproduce the problem.
> The fact that the problem cannot be reproduced in standalone (unless I
> misunderstood the situation, in which case apologies) made me kind of put
> it aside in so far as it did not seem like a genuine MadLoop problem but
> more its use within MadFKS.
> Hopefully I'll be able to easily spot the offending parameter by simply
> comparing MadLoop's run for one particular point within MadFKS and in
> standalone (which is what I was hoping would straight-forwardly reveal the
> issue).
> But it seems that the problem is more involved than I thought so I'll
> investigate and let you knw.
>
> On Thu, May 21, 2020 at 3:57 PM Olivier Mattelaer <
> <email address hidden>> wrote:
>
> > Review: Approve
> >
> > Hi,
> >
> > Sorry indeed I miss the fact that Rik change the line in that version but
> > only in a cosmetic way.
> > Consequently to this I have force the printout of the poles in 2.7.3 and
> > found the same printout:
> >
> > ---- POLES CANCELLED ----
> > POLES ANCELLATION, DIFFERENCE < 1.0000000000000003E-005
> > COEFFICIENT DOUBLE POLE:
> > MadFKS: -0.48049656339581920 OLP:
> > 0.0000000000000000
> > COEFFICIENT SINGLE POLE:
> > MadFKS: 1.2727761694678807 OLP:
> > 0.0000000000000000
> > FINITE:
> > OLP: -0.69598571535491494
> >
> > MOMENTA (Exyzm):
> > 1 39.800372893656203 0.0000000000000000
> > 0.0000000000000000 39.800372893656203 \
> > 0.0000000000000000
> > 2 39.800372893656203 -0.0000000000000000
> > -0.0000000000000000 -39.800372893656203 \
> > 0.0000000000000000
> > 3 39.800372893656203 -18.912294290529488
> > -32.109690658036719 -13.977216210235818 \
> > 0.0000000000000000
> > 4 39.800372893656203 18.912294290529488
> > 32.109690658036719 13.977216210235818 \
> > 0.0000000000000000
> >
> > Now running in standalone mode on the same PS point we have (with
> collier):
> > || Total(*) Born contribution (GeV^0):
> > | Born = 6.2823500530737046e+00
> > || Total(*) virtual contrib...

Read more...

marco zaro (marco-zaro) wrote :
Download full text (5.1 KiB)

Hi all,
just noticed a possible bug:

inside SubProcesses/cuts.f, line 142 reads

                     if (ipdg(i).eq.-ipdg(j)) then

however, it should be ipdg_reco in both cases and not ipdg, right? (that
is, the pdg's of the particles after the recombination with photons...)
If anybody could confirm, I will push the fix.

Best wishes,

Marco Zaro

On Thu, May 21, 2020 at 11:42 PM Valentin Hirschi <
<email address hidden>> wrote:

> So the problem seem to simply be that these few lines in `Binoth_LHA.f`:
>
> CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
> CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)
>
> are called *after* the similar ones in `check_poles.f`:
>
> c Make sure that stability checks are always used by MadLoop, even for
> c initialization
> CALL FORCE_STABILITY_CHECK(.TRUE.)
> CALL COLLIER_COMPUTE_UV_POLES(.TRUE.)
> CALL COLLIER_COMPUTE_IR_POLES(.TRUE.)
>
> which of course means you'd get zero poles when running with COLLIER only.
>
> The introduction of a common block "flag" of the sort of:
>
> logical IS_DOING_POLE_CHECK
> common pole_check/IS_DOING_POLE_CHECK
> data IS_DOING_POLE_CHECK/.FALSE./
>
> would allow to solve the problem by using it to make sure that
> `Binoth_LHA.f` does not disable pole computations with COLLIER when doing
> pole checks.
>
> On Thu, May 21, 2020 at 9:42 PM Valentin Hirschi <
> <email address hidden>>
> wrote:
>
> > Sorry for my slow reaction, I will have a serious look at this.
> > I'll check with Olivier what is the exact setup to reproduce the problem.
> > The fact that the problem cannot be reproduced in standalone (unless I
> > misunderstood the situation, in which case apologies) made me kind of put
> > it aside in so far as it did not seem like a genuine MadLoop problem but
> > more its use within MadFKS.
> > Hopefully I'll be able to easily spot the offending parameter by simply
> > comparing MadLoop's run for one particular point within MadFKS and in
> > standalone (which is what I was hoping would straight-forwardly reveal
> the
> > issue).
> > But it seems that the problem is more involved than I thought so I'll
> > investigate and let you knw.
> >
> > On Thu, May 21, 2020 at 3:57 PM Olivier Mattelaer <
> > <email address hidden>> wrote:
> >
> > > Review: Approve
> > >
> > > Hi,
> > >
> > > Sorry indeed I miss the fact that Rik change the line in that version
> but
> > > only in a cosmetic way.
> > > Consequently to this I have force the printout of the poles in 2.7.3
> and
> > > found the same printout:
> > >
> > > ---- POLES CANCELLED ----
> > > POLES ANCELLATION, DIFFERENCE < 1.0000000000000003E-005
> > > COEFFICIENT DOUBLE POLE:
> > > MadFKS: -0.48049656339581920 OLP:
> > > 0.0000000000000000
> > > COEFFICIENT SINGLE POLE:
> > > MadFKS: 1.2727761694678807 OLP:
> > > 0.0000000000000000
> > > FINITE:
> > > OLP: -0.69598571535491494
> > >
> > > MOMENTA (Exyzm):
> > > 1 39.800372893656203 0.0000000000000000
> > > 0.0000000000000000 39.800372893656203 \
> > > 0.0000000000000000
> > > 2 39.800372893656203 -0.0000000000000000
>...

Read more...

lp:~maddevelopers/mg5amcnlo/3.0.2 updated on 2020-05-23
986. By olivier-mattelaer on 2020-05-23

fixing issuue with the pole check with COLLIER

Hi Valentin,

Thanks I have pushed such changes, a variable was actually already existing so I used that one.

@Marco, by reading the code, I would agree with you that this is a bug.

Cheers,

Olivier

lp:~maddevelopers/mg5amcnlo/3.0.2 updated on 2020-05-23
987. By olivier-mattelaer on 2020-05-23

fix cuts.f --issue found by marco--

marco zaro (marco-zaro) wrote :

Thanks for the fix.
Cheers,

Marco

> On 23 May 2020, at 21:27, Olivier Mattelaer <email address hidden> wrote:
>
> Hi Valentin,
>
> Thanks I have pushed such changes, a variable was actually already existing so I used that one.
>
> @Marco, by reading the code, I would agree with you that this is a bug.
>
> Cheers,
>
> Olivier
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/3.0.2/+merge/381317
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/3.0.2.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'HELAS/v2xxxx.f'
--- HELAS/v2xxxx.f 2010-10-30 03:26:37 +0000
+++ HELAS/v2xxxx.f 2020-05-23 19:29:41 +0000
@@ -30,11 +30,11 @@
30 vc(2) = p(1)/p(0)30 vc(2) = p(1)/p(0)
31 vc(3) = p(2)/p(0)31 vc(3) = p(2)/p(0)
32 vc(4) = p(3)/p(0)32 vc(4) = p(3)/p(0)
33 else33 else
34 vc(1) = p(0)/vmass34 vc(1) = p(0)/vmass
35 vc(2) = p(1)/vmass35 vc(2) = p(1)/vmass
36 vc(3) = p(2)/vmass36 vc(3) = p(2)/vmass
37 vc(4) = p(3)/vmass37 vc(4) = p(3)/vmass
38 endif38 endif
39 return39 return
40 end40 end
4141
=== modified file 'MadSpin/decay.py'
--- MadSpin/decay.py 2018-09-21 13:46:51 +0000
+++ MadSpin/decay.py 2020-05-23 19:29:41 +0000
@@ -284,12 +284,13 @@
284 line_type = 'none' # support type: init / event / rwgt284 line_type = 'none' # support type: init / event / rwgt
285 self.diese = ''285 self.diese = ''
286 for line in self.inputfile:286 for line in self.inputfile:
287 origline = line
287 line = line.lower()288 line = line.lower()
288 if line=="":289 if line=="":
289 continue 290 continue
290 # Find special tag in the line291 # Find special tag in the line
291 if line[0]=="#":292 if line[0]=="#":
292 self.diese+=line293 self.diese+=origline
293 continue294 continue
294 if '<event' in line:295 if '<event' in line:
295 #start new_event296 #start new_event
@@ -319,7 +320,7 @@
319 if line_type == 'none':320 if line_type == 'none':
320 continue321 continue
321 elif line_type == 'other_block':322 elif line_type == 'other_block':
322 self.diese += line323 self.diese += origline
323 # read the line and assign the date accordingly 324 # read the line and assign the date accordingly
324 elif line_type == 'init':325 elif line_type == 'init':
325 line_type = 'event'326 line_type = 'event'
@@ -2244,7 +2245,7 @@
2244 nb_mc_masses=len(indices_for_mc_masses)2245 nb_mc_masses=len(indices_for_mc_masses)
22452246
2246 p, p_str=self.curr_event.give_momenta(event_map)2247 p, p_str=self.curr_event.give_momenta(event_map)
2247 stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, decay_me['max_weight'])2248 stdin_text=' %s %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, decay_me['max_weight'], self.options['frame_id'])
2248 stdin_text+=p_str2249 stdin_text+=p_str
2249 # here I also need to specify the Monte Carlo Masses2250 # here I also need to specify the Monte Carlo Masses
2250 stdin_text+=" %s \n" % nb_mc_masses2251 stdin_text+=" %s \n" % nb_mc_masses
@@ -2372,7 +2373,7 @@
2372 #no decays for this production mode, run in passthrough mode, only adding the helicities to the events2373 #no decays for this production mode, run in passthrough mode, only adding the helicities to the events
2373 nb_mc_masses=02374 nb_mc_masses=0
2374 p, p_str=self.curr_event.give_momenta(event_map)2375 p, p_str=self.curr_event.give_momenta(event_map)
2375 stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, 1.0)2376 stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, 1.0, self.options['frame_id'])
2376 stdin_text+=p_str2377 stdin_text+=p_str
2377 # here I also need to specify the Monte Carlo Masses2378 # here I also need to specify the Monte Carlo Masses
2378 stdin_text+=" %s \n" % nb_mc_masses2379 stdin_text+=" %s \n" % nb_mc_masses
@@ -3277,8 +3278,7 @@
3277 """return the max. weight associated with me decay['path']"""3278 """return the max. weight associated with me decay['path']"""
32783279
3279 p, p_str=self.curr_event.give_momenta(event_map)3280 p, p_str=self.curr_event.give_momenta(event_map)
32803281 std_in=" %s %s %s %s %s \n" % ("1",BWcut, self.Ecollider, nbpoints, self.options['frame_id'])
3281 std_in=" %s %s %s %s \n" % ("1",BWcut, self.Ecollider, nbpoints)
3282 std_in+=p_str3282 std_in+=p_str
3283 max_weight = self.loadfortran('maxweight',3283 max_weight = self.loadfortran('maxweight',
3284 path, std_in)3284 path, std_in)
@@ -3347,7 +3347,7 @@
3347 if nb < cut:3347 if nb < cut:
3348 if key[0]=='full':3348 if key[0]=='full':
3349 path=key[1]3349 path=key[1]
3350 end_signal="5 0 0 0 \n" # before closing, write down the seed 3350 end_signal="5 0 0 0 0\n" # before closing, write down the seed
3351 external.stdin.write(end_signal)3351 external.stdin.write(end_signal)
3352 ranmar_state=external.stdout.readline()3352 ranmar_state=external.stdout.readline()
3353 ranmar_file=pjoin(path,'ranmar_state.dat')3353 ranmar_file=pjoin(path,'ranmar_state.dat')
@@ -3921,7 +3921,8 @@
3921 3921
3922 self.cross = 03922 self.cross = 0
3923 self.error = 03923 self.error = 0
3924 if 'init' in self.banner and (eff!=1 or not any(v==-1 for v in self.br_per_id.values())):3924 if 'init' in self.banner and (eff!=1 or not any(v==-1 for v in self.br_per_id.values())) \
3925 and not self.options['onlyhelicity']:
3925 new_init =''3926 new_init =''
3926 curr_proc = 03927 curr_proc = 0
3927 has_missing=False3928 has_missing=False
@@ -3961,7 +3962,7 @@
3961 external.terminate()3962 external.terminate()
3962 del external3963 del external
3963 elif mode=='full':3964 elif mode=='full':
3964 stdin_text="5 0 0 0 \n" # before closing, write down the seed 3965 stdin_text="5 0 0 0 0\n" # before closing, write down the seed
3965 external = self.calculator[('full',path)]3966 external = self.calculator[('full',path)]
3966 try:3967 try:
3967 external.stdin.write(stdin_text)3968 external.stdin.write(stdin_text)
@@ -3988,7 +3989,7 @@
3988 except Exception:3989 except Exception:
3989 pass3990 pass
3990 else:3991 else:
3991 stdin_text="5 0 0 0"3992 stdin_text="5 0 0 0 0"
3992 external.stdin.write(stdin_text)3993 external.stdin.write(stdin_text)
3993 external.stdin.close()3994 external.stdin.close()
3994 external.stdout.close()3995 external.stdout.close()
39953996
=== modified file 'MadSpin/interface_madspin.py'
--- MadSpin/interface_madspin.py 2018-10-31 10:07:53 +0000
+++ MadSpin/interface_madspin.py 2020-05-23 19:29:41 +0000
@@ -75,7 +75,7 @@
75 self.add_param('cross_section', {'__type__':0.}, comment="forcing normalization of cross-section after MS (for none/onshell)" )75 self.add_param('cross_section', {'__type__':0.}, comment="forcing normalization of cross-section after MS (for none/onshell)" )
76 self.add_param('new_wgt', 'cross-section' ,allowed=['cross-section', 'BR'], comment="if not consistent number of particles, choose what to do for the weight. (BR: means local according to number of part, cross use the force cross-section")76 self.add_param('new_wgt', 'cross-section' ,allowed=['cross-section', 'BR'], comment="if not consistent number of particles, choose what to do for the weight. (BR: means local according to number of part, cross use the force cross-section")
77 self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner'])77 self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner'])
78 78 self.add_param('frame_id', 6)
79 79
80 ############################################################################80 ############################################################################
81 ## Special post-processing of the options ## 81 ## Special post-processing of the options ##
@@ -211,7 +211,7 @@
211 # Read the banner of the inputfile211 # Read the banner of the inputfile
212 self.events_file = open(os.path.realpath(inputfile))212 self.events_file = open(os.path.realpath(inputfile))
213 self.banner = banner.Banner(self.events_file)213 self.banner = banner.Banner(self.events_file)
214 214
215215
216 # Check the validity of the banner:216 # Check the validity of the banner:
217 if 'slha' not in self.banner:217 if 'slha' not in self.banner:
@@ -226,14 +226,21 @@
226 raise self.InvalidCmd('This event file was already decayed by MS. This is not possible to add to it a second decay')226 raise self.InvalidCmd('This event file was already decayed by MS. This is not possible to add to it a second decay')
227 227
228 if 'mgruncard' in self.banner:228 if 'mgruncard' in self.banner:
229 run_card = self.banner.charge_card('run_card')
229 if not self.options['Nevents_for_max_weigth']:230 if not self.options['Nevents_for_max_weigth']:
230 nevents = int(self.banner.get_detail('run_card', 'nevents'))231 nevents = run_card['nevents']
231 N_weight = max([75, int(3*nevents**(1/3))])232 N_weight = max([75, int(3*nevents**(1/3))])
232 self.options['Nevents_for_max_weigth'] = N_weight233 self.options['Nevents_for_max_weigth'] = N_weight
233 N_sigma = max(4.5, math.log(nevents,7.7))234 N_sigma = max(4.5, math.log(nevents,7.7))
234 self.options['nb_sigma'] = N_sigma235 self.options['nb_sigma'] = N_sigma
235 if self.options['BW_cut'] == -1:236 if self.options['BW_cut'] == -1:
236 self.options['BW_cut'] = float(self.banner.get_detail('run_card', 'bwcutoff'))237 self.options['BW_cut'] = float(self.banner.get_detail('run_card', 'bwcutoff'))
238
239 if isinstance(run_card, banner.RunCardLO):
240 run_card.update_system_parameter_for_include()
241 self.options['frame_id'] = run_card['frame_id']
242 else:
243 self.options['frame_id'] = 6
237 else:244 else:
238 if not self.options['Nevents_for_max_weigth']:245 if not self.options['Nevents_for_max_weigth']:
239 self.options['Nevents_for_max_weigth'] = 75246 self.options['Nevents_for_max_weigth'] = 75
@@ -313,7 +320,6 @@
313 if model_name in line:320 if model_name in line:
314 final_model = True321 final_model = True
315 322
316
317 323
318 def import_model(self, args):324 def import_model(self, args):
319 """syntax: import model NAME CARD_PATH325 """syntax: import model NAME CARD_PATH
@@ -400,6 +406,12 @@
400 #if self.model and not self.model['case_sensitive']:406 #if self.model and not self.model['case_sensitive']:
401 # decaybranch = decaybranch.lower()407 # decaybranch = decaybranch.lower()
402408
409 if self.options['spinmode'] != 'full' and '{' in decaybranch:
410 if self.options['spinmode'] == 'none':
411 logger.warning("polarization option used with spinmode=none. The polarization definition will be done according to the rest-frame of the decaying particles (which is likely not what you expect).")
412 else:
413 logger.warning("polarization option used with spinmode=onshell. This combination is not validated and is by construction using sub-optimal method which can likely lead to bias in some situation. Use at your own risk.")
414
403 decay_process, init_part = self.decay.reorder_branch(decaybranch)415 decay_process, init_part = self.decay.reorder_branch(decaybranch)
404 if not self.list_branches.has_key(init_part):416 if not self.list_branches.has_key(init_part):
405 self.list_branches[init_part] = []417 self.list_branches[init_part] = []
@@ -585,14 +597,16 @@
585 self.check_launch(args)597 self.check_launch(args)
586 for part in self.list_branches.keys():598 for part in self.list_branches.keys():
587 if part in self.mg5cmd._multiparticles:599 if part in self.mg5cmd._multiparticles:
600
588 if any(pid in self.final_state for pid in self.mg5cmd._multiparticles[part]):601 if any(pid in self.final_state for pid in self.mg5cmd._multiparticles[part]):
589 break602 break
590 pid = self.mg5cmd._curr_model.get('name2pdg')[part]603 else:
591 if pid in self.final_state:604 pid = self.mg5cmd._curr_model.get('name2pdg')[part]
592 break605 if pid in self.final_state:
593# else:606 break
594# logger.info("Nothing to decay ...")607 else:
595# return608 logger.info("Nothing to decay ...")
609 return
596 610
597611
598 model_line = self.banner.get('proc_card', 'full_model_line')612 model_line = self.banner.get('proc_card', 'full_model_line')
@@ -801,6 +815,7 @@
801 elif self.options['input_format'] in ['hepmc']:815 elif self.options['input_format'] in ['hepmc']:
802 import madgraph.various.hepmc_parser as hepmc_parser816 import madgraph.various.hepmc_parser as hepmc_parser
803 orig_lhe = hepmc_parser.HEPMC_EventFile(filename)817 orig_lhe = hepmc_parser.HEPMC_EventFile(filename)
818 orig_lhe.allow_empty_event = True
804 logger.info("Parsing input event to know how many decay to generate. This can takes few minuts.")819 logger.info("Parsing input event to know how many decay to generate. This can takes few minuts.")
805 else:820 else:
806 raise Exception821 raise Exception
@@ -1067,8 +1082,13 @@
1067 if len(hepmc_output) == 0:1082 if len(hepmc_output) == 0:
1068 hepmc_output.append(lhe_parser.Particle(event=hepmc_output))1083 hepmc_output.append(lhe_parser.Particle(event=hepmc_output))
1069 hepmc_output[0].color2 = 01084 hepmc_output[0].color2 = 0
1085 hepmc_output[0].status = -1
1086 hepmc_output.nexternal+=1
1070 decayed_particle = lhe_parser.Particle(particle, hepmc_output)1087 decayed_particle = lhe_parser.Particle(particle, hepmc_output)
1088 decayed_particle.mother1 = hepmc_output[0]
1089 decayed_particle.mother2 = hepmc_output[0]
1071 hepmc_output.append(decayed_particle)1090 hepmc_output.append(decayed_particle)
1091 hepmc_output.nexternal+=1
1072 decayed_particle.add_decay(decay)1092 decayed_particle.add_decay(decay)
1073 # change the weight associate to the event1093 # change the weight associate to the event
1074 if self.options['new_wgt'] == 'cross-section':1094 if self.options['new_wgt'] == 'cross-section':
@@ -1086,7 +1106,6 @@
1086 else:1106 else:
1087 hepmc_output.wgt = event.wgt1107 hepmc_output.wgt = event.wgt
1088 hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal1108 hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal
1089 hepmc_output.assign_mother()
1090 output_lhe.write(str(hepmc_output))1109 output_lhe.write(str(hepmc_output))
1091 else:1110 else:
1092 if counter==0:1111 if counter==0:
@@ -1226,7 +1245,11 @@
1226 pass 1245 pass
1227 self.me_int[decay_dir] = me5_cmd1246 self.me_int[decay_dir] = me5_cmd
1228 if self.options["run_card"]:1247 if self.options["run_card"]:
1229 run_card = self.run_card1248 if hasattr(self, 'run_card'):
1249 run_card = self.run_card
1250 else:
1251 self.run_card = banner.RunCard(self.options["run_card"])
1252 run_card = self.run_card
1230 else:1253 else:
1231 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))1254 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))
1232 run_card["nevents"] = int(1.2*nb_event)1255 run_card["nevents"] = int(1.2*nb_event)
@@ -1400,6 +1423,7 @@
1400 if name not in self.list_branches or len(self.list_branches[name]) == 0:1423 if name not in self.list_branches or len(self.list_branches[name]) == 0:
1401 continue1424 continue
1402 raise self.InvalidCmd("The onshell mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed.")1425 raise self.InvalidCmd("The onshell mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed.")
1426
1403 self.branching_ratio = br1427 self.branching_ratio = br
1404 self.efficiency = 11428 self.efficiency = 1
1405 self.cross, self.error = self.banner.get_cross(witherror=True)1429 self.cross, self.error = self.banner.get_cross(witherror=True)
@@ -1417,7 +1441,6 @@
1417 #4. determine the maxwgt1441 #4. determine the maxwgt
1418 maxwgt = self.get_maxwgt_for_onshell(orig_lhe, evt_decayfile)1442 maxwgt = self.get_maxwgt_for_onshell(orig_lhe, evt_decayfile)
1419 1443
1420
1421 #5. generate the decay 1444 #5. generate the decay
1422 orig_lhe.seek(0)1445 orig_lhe.seek(0)
1423 output_lhe = lhe_parser.EventFile(orig_lhe.name.replace('.lhe', '_decayed.lhe'), 'w')1446 output_lhe = lhe_parser.EventFile(orig_lhe.name.replace('.lhe', '_decayed.lhe'), 'w')
@@ -1435,8 +1458,10 @@
1435 for curr_event,production in enumerate(orig_lhe):1458 for curr_event,production in enumerate(orig_lhe):
1436 if self.options['fixed_order']:1459 if self.options['fixed_order']:
1437 production, counterevt= production[0], production[1:]1460 production, counterevt= production[0], production[1:]
1438 if curr_event and curr_event % 1000 == 0 and float(str(curr_event)[1:]) ==0:1461 if curr_event and self.efficiency and curr_event % 10 == 0 and float(str(curr_event)[1:]) ==0:
1439 print "decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start)1462 logger.info("decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start))
1463 else:
1464 logger.info("next event [%s]", time.time()-start)
1440 while 1:1465 while 1:
1441 nb_try +=11466 nb_try +=1
1442 decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event)1467 decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event)
@@ -1531,6 +1556,9 @@
1531 # event_decay is a dict pdg -> list of event file (contain the decay)1556 # event_decay is a dict pdg -> list of event file (contain the decay)
1532 1557
1533 1558
1559 if self.options['ms_dir'] and os.path.exists(pjoin(self.options['ms_dir'], 'max_wgt')):
1560 return float(open(pjoin(self.options['ms_dir'], 'max_wgt'),'r').read())
1561
1534 nevents = self.options['Nevents_for_max_weigth']1562 nevents = self.options['Nevents_for_max_weigth']
1535 if nevents == 0 :1563 if nevents == 0 :
1536 nevents = 751564 nevents = 75
@@ -1540,7 +1568,6 @@
1540 logger.info("*****************************")1568 logger.info("*****************************")
1541 logger.info("Probing the first %s events with %s phase space points" % (nevents, self.options['max_weight_ps_point']))1569 logger.info("Probing the first %s events with %s phase space points" % (nevents, self.options['max_weight_ps_point']))
15421570
1543
1544 self.efficiency = 1. / self.options['max_weight_ps_point']1571 self.efficiency = 1. / self.options['max_weight_ps_point']
1545 start = time.time()1572 start = time.time()
1546 for i in range(nevents):1573 for i in range(nevents):
@@ -1553,7 +1580,7 @@
1553 base_event = base_event[0]1580 base_event = base_event[0]
1554 for j in range(self.options['max_weight_ps_point']):1581 for j in range(self.options['max_weight_ps_point']):
1555 decays = self.get_decay_from_file(base_event, evt_decayfile, nevents-i) 1582 decays = self.get_decay_from_file(base_event, evt_decayfile, nevents-i)
1556 #carefull base_event is modified by the following function 1583 #carefull base_event is modified by the following function
1557 _, wgt = self.get_onshell_evt_and_wgt(base_event, decays)1584 _, wgt = self.get_onshell_evt_and_wgt(base_event, decays)
1558 maxwgt = max(wgt, maxwgt)1585 maxwgt = max(wgt, maxwgt)
1559 all_maxwgt.append(maxwgt)1586 all_maxwgt.append(maxwgt)
@@ -1569,10 +1596,13 @@
1569 if len(all_maxwgt) < i:1596 if len(all_maxwgt) < i:
1570 break1597 break
1571 ave_weight, std_weight = decay_tools.get_mean_sd(all_maxwgt[:i])1598 ave_weight, std_weight = decay_tools.get_mean_sd(all_maxwgt[:i])
1599 #misc.sprint(ave_weight, std_weight)
1572 base_max_weight = max(base_max_weight, 1.05 * (ave_weight+self.options['nb_sigma']*std_weight))1600 base_max_weight = max(base_max_weight, 1.05 * (ave_weight+self.options['nb_sigma']*std_weight))
1573 1601
1574 if all_maxwgt[1] > base_max_weight:1602 if all_maxwgt[1] > base_max_weight:
1575 base_max_weight = 1.05 * all_maxwgt[1]1603 base_max_weight = 1.05 * all_maxwgt[1]
1604 if self.options['ms_dir']:
1605 open(pjoin(self.options['ms_dir'], 'max_wgt'),'w').write(str(base_max_weight))
1576 return base_max_weight1606 return base_max_weight
1577 1607
1578 1608
@@ -1594,13 +1624,11 @@
1594 raise1624 raise
1595 import copy1625 import copy
1596 1626
1597
1598 if hasattr(production, 'me_wgt'):1627 if hasattr(production, 'me_wgt'):
1599 production_me = production.me_wgt1628 production_me = production.me_wgt
1600 else:1629 else:
1601 production_me = self.calculate_matrix_element(production)1630 production_me = self.calculate_matrix_element(production)
1602 production.me_wgt = production_me1631 production.me_wgt = production_me
1603
1604 decay_me = 1.01632 decay_me = 1.0
1605 for pdg in decays:1633 for pdg in decays:
1606 for dec in decays[pdg]:1634 for dec in decays[pdg]:
@@ -1628,7 +1656,6 @@
1628 final = tuple(-i for i in final)1656 final = tuple(-i for i in final)
1629 tag = (init, final)1657 tag = (init, final)
1630 orig_order = self.all_me[tag]['order']1658 orig_order = self.all_me[tag]['order']
1631
1632 pdir = self.all_me[tag]['pdir']1659 pdir = self.all_me[tag]['pdir']
1633 if pdir in self.all_f2py:1660 if pdir in self.all_f2py:
1634 p = event.get_momenta(orig_order)1661 p = event.get_momenta(orig_order)
@@ -1643,11 +1670,15 @@
1643 1670
1644 mymod = __import__("%s.matrix2py" % (pdir))1671 mymod = __import__("%s.matrix2py" % (pdir))
1645 reload(mymod)1672 reload(mymod)
1646 mymod = getattr(mymod, 'matrix2py') 1673 mymod = getattr(mymod, 'matrix2py')
1647 with misc.chdir(pjoin(self.path_me, 'madspin_me', 'SubProcesses', pdir)):1674 with misc.chdir(pjoin(self.path_me, 'madspin_me', 'SubProcesses', pdir)):
1648 with misc.stdchannel_redirected(sys.stdout, os.devnull):1675 with misc.stdchannel_redirected(sys.stdout, os.devnull):
1649 mymod.initialisemodel(pjoin(self.path_me, 'Cards','param_card.dat'))1676 if not os.path.exists(pjoin(self.path_me, 'Cards','param_card.dat')) and \
1650 self.all_f2py[pdir] = mymod.get_value 1677 os.path.exists(pjoin(self.path_me,'param_card.dat')):
1678 mymod.initialisemodel(pjoin(self.path_me,'param_card.dat'))
1679 else:
1680 mymod.initialisemodel(pjoin(self.path_me, 'Cards','param_card.dat'))
1681 self.all_f2py[pdir] = mymod.get_value
1651 return self.calculate_matrix_element(event)1682 return self.calculate_matrix_element(event)
1652 1683
1653 1684
16541685
=== modified file 'MadSpin/src/driver.f'
--- MadSpin/src/driver.f 2018-09-19 09:41:33 +0000
+++ MadSpin/src/driver.f 2020-05-23 19:29:41 +0000
@@ -18,7 +18,7 @@
18 INTEGER I,J,K18 INTEGER I,J,K
19 INTEGER HELSET(NEXTERNAL)19 INTEGER HELSET(NEXTERNAL)
20 REAL*8 P(0:3,NEXTERNAL_PROD) 20 REAL*8 P(0:3,NEXTERNAL_PROD)
21 REAL*8 PFULL(0:3,NEXTERNAL), Ptrial(0:3,NEXTERNAL) 21 REAL*8 PFULL(0:3,NEXTERNAL), Ptrial(0:3,NEXTERNAL), P2(0:3,NEXTERNAL)
22 double precision x(36), Ecollider22 double precision x(36), Ecollider
23 CHARACTER*120 BUFF(NEXTERNAL_PROD)23 CHARACTER*120 BUFF(NEXTERNAL_PROD)
24 integer iforest(2,-nexternal:-1,N_MAX_CG)24 integer iforest(2,-nexternal:-1,N_MAX_CG)
@@ -39,6 +39,7 @@
39 double precision mean, variance, maxweight,weight,std39 double precision mean, variance, maxweight,weight,std
40 double precision temp40 double precision temp
41 double precision Pprod(0:3,nexternal_prod)41 double precision Pprod(0:3,nexternal_prod)
42
42 integer nb_mc_masses, indices_mc_masses(nexternal)43 integer nb_mc_masses, indices_mc_masses(nexternal)
43 double precision values_mc_masses(nexternal)44 double precision values_mc_masses(nexternal)
4445
@@ -54,6 +55,9 @@
54 double precision BWcut, maxBW55 double precision BWcut, maxBW
55 common /to_BWcut/BWcut, maxBW56 common /to_BWcut/BWcut, maxBW
5657
58 integer frame_id
59 common /to_me_frame/frame_id
60
57c Conflicting BW stuff61c Conflicting BW stuff
58 integer cBW_level_max,cBW(-nexternal:-1),cBW_level(-nexternal:-1)62 integer cBW_level_max,cBW(-nexternal:-1),cBW_level(-nexternal:-1)
59 double precision cBW_mass(-nexternal:-1,-1:1),63 double precision cBW_mass(-nexternal:-1,-1:1),
@@ -94,7 +98,6 @@
94 read(56,*) P_seed98 read(56,*) P_seed
95 close(56)99 close(56)
96 iseed = iseed + P_seed100 iseed = iseed + P_seed
97
98cccccccccccccccccccccccccccccccccccccccccccccccccccc101cccccccccccccccccccccccccccccccccccccccccccccccccccc
99c I. read momenta for the production events102c I. read momenta for the production events
100c103c
@@ -112,7 +115,7 @@
112 115
1131 continue1161 continue
114 maxBW=0d0117 maxBW=0d0
115 read(*,*) mode, BWcut, Ecollider, temp118 read(*,*) mode, BWcut, Ecollider, temp, frame_id
116 119
117120
118 if (mode.eq.1) then ! calculate the maximum weight121 if (mode.eq.1) then ! calculate the maximum weight
@@ -255,13 +258,14 @@
255258
256 cycle259 cycle
257 endif260 endif
258 !do j=1,nexternal261
259 ! write (*,*) (pfull(k,j), k=0,3) 262 call boost_to_frame(pfull, frame_id, P2)
260 !enddo263 call SMATRIX(P2,M_full)
261 call SMATRIX(pfull,M_full)264
262 call SMATRIX_PROD(pprod,M_prod)265 call boost_to_frame_prod(pprod, frame_id,nexternal_prod, P2)
263c write(*,*) 'M_full ', M_full266 call SMATRIX_PROD(P2,M_prod)
264c write(*,*) 'jac',jac267
268
265269
266 weight=M_full*jac/M_prod270 weight=M_full*jac/M_prod
267 if (weight.gt.maxweight) then271 if (weight.gt.maxweight) then
@@ -335,7 +339,6 @@
335 do i = 1, 3*(nexternal-nexternal_prod)+1339 do i = 1, 3*(nexternal-nexternal_prod)+1
336 call ntuple(x(i),0d0,1d0,i,1)340 call ntuple(x(i),0d0,1d0,i,1)
337 enddo341 enddo
338
339 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res) 342 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res)
340 if (jac.lt.0d0) then343 if (jac.lt.0d0) then
341 counter2=counter2+1 344 counter2=counter2+1
@@ -366,8 +369,14 @@
366369
367 cycle370 cycle
368 endif371 endif
369 call SMATRIX(pfull,M_full)372
370 call SMATRIX_PROD(pprod,M_prod)373 call boost_to_frame(pfull, frame_id, P2)
374 call SMATRIX(P2,M_full)
375
376
377 call boost_to_frame_prod(pprod, frame_id,nexternal_prod, P2)
378 call SMATRIX_PROD(P2,M_prod)
379
371380
372 weight=M_full*jac/M_prod381 weight=M_full*jac/M_prod
373382
@@ -1892,3 +1901,162 @@
1892 END1901 END
18931902
18941903
1904
1905
1906c======================================================================
1907C Subroutine to return momenta in a dedicated frame
1908C frame_id is the tag of the particle to put at rest
1909C frame_id follow the convention of cluster.f (sum 2**(N-1))
1910C -----------------------------------------
1911
1912 subroutine boost_to_frame(P1, frame_id, P2)
1913
1914 implicit none
1915
1916 include 'nexternal.inc'
1917
1918 DOUBLE PRECISION P1(0:3,NEXTERNAL)
1919 DOUBLE PRECISION P2(0:3,NEXTERNAL)
1920 DOUBLE PRECISION PBOOST(0:3)
1921 integer frame_id
1922
1923 integer ids(nexternal)
1924 integer i,j
1925 Pboost(0)= 0d0
1926 Pboost(1)= 0d0
1927 Pboost(2)= 0d0
1928 Pboost(3)= 0d0
1929
1930c uncompress
1931 call mapid(frame_id, ids)
1932c find the boost momenta --sum of particles--
1933 do i=1,nexternal
1934 if (ids(i).eq.1)then
1935c write (999,*) (Pboost(j), j=0,3)
1936 do j=0,3
1937 Pboost(j) = Pboost(j) + P1(j,i)
1938 enddo
1939 endif
1940 enddo
1941 do j=1,3
1942 Pboost(j) = -1 * Pboost(j)
1943 enddo
1944
1945c write (999,*) (Pboost(j), j=0,3)
1946 do i=1, nexternal
1947 call boostx(p1(0,i), pboost, p2(0,i))
1948 enddo
1949 return
1950 end
1951
1952
1953
1954
1955c========================================================================
1956
1957
1958 subroutine mapid(id,ids)
1959c**************************************************************************
1960c input:
1961c id compressed particle id
1962c ids array of particle ids
1963c**************************************************************************
1964 implicit none
1965 include 'nexternal.inc'
1966 integer i, icd, id, ids(nexternal)
1967
1968 icd=id
1969 do i=1,nexternal
1970 ids(i)=0
1971 if (btest(id,i)) then
1972 ids(i)=1
1973 endif
1974c write(*,*) 'cluster.f: uncompressed code ',i,' is ',ids(i)
1975 enddo
1976
1977 return
1978 end
1979
1980
1981
1982
1983C -----------------------------------------
1984
1985 subroutine boost_to_frame_prod(P1, frame_id, nexternal_prod, P2)
1986
1987 implicit none
1988
1989 include 'nexternal.inc'
1990
1991 DOUBLE PRECISION P1(0:3,*)
1992 DOUBLE PRECISION P2(0:3,*)
1993 DOUBLE PRECISION PBOOST(0:3)
1994 integer frame_id, nexternal_prod
1995
1996 integer ids(nexternal_prod)
1997 integer i,j
1998 Pboost(0)= 0d0
1999 Pboost(1)= 0d0
2000 Pboost(2)= 0d0
2001 Pboost(3)= 0d0
2002
2003c uncompress
2004 call mapid_prod(frame_id, ids,nexternal_prod)
2005c find the boost momenta --sum of particles--
2006 do i=1,nexternal_prod
2007 if (ids(i).eq.1)then
2008c write (999,*) (Pboost(j), j=0,3)
2009 do j=0,3
2010 Pboost(j) = Pboost(j) + P1(j,i)
2011 enddo
2012 endif
2013 enddo
2014 do j=1,3
2015 Pboost(j) = -1 * Pboost(j)
2016 enddo
2017
2018c write (999,*) (Pboost(j), j=0,3)
2019 do i=1, nexternal_prod
2020 call boostx(p1(0,i), pboost, p2(0,i))
2021 enddo
2022 return
2023 end
2024
2025
2026
2027
2028
2029
2030
2031
2032 subroutine mapid_prod(id,ids,nexternal_prod)
2033c**************************************************************************
2034c input:
2035c id compressed particle id
2036c ids array of particle ids
2037c**************************************************************************
2038 implicit none
2039 include 'nexternal.inc'
2040 integer i, icd, id, nexternal_prod, ids(nexternal_prod)
2041
2042 icd=id
2043 do i=1,nexternal_prod
2044 ids(i)=0
2045 if (btest(id,i)) then
2046 ids(i)=1
2047 endif
2048c write(*,*) 'cluster.f: uncompressed code ',i,' is ',ids(i)
2049 enddo
2050
2051 return
2052 end
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
18952063
=== modified file 'Template/Common/Cards/delphes_card_ATLAS.dat'
--- Template/Common/Cards/delphes_card_ATLAS.dat 2017-05-19 20:52:51 +0000
+++ Template/Common/Cards/delphes_card_ATLAS.dat 2020-05-23 19:29:41 +0000
@@ -405,11 +405,10 @@
405# add InputArray InputArray405# add InputArray InputArray
406 add InputArray ECal/ecalTowers406 add InputArray ECal/ecalTowers
407 add InputArray HCal/hcalTowers407 add InputArray HCal/hcalTowers
408 add InputArray MuonMomentumSmearing/muons
408 set OutputArray towers409 set OutputArray towers
409}410}
410411
411
412
413####################412####################
414# Energy flow merger413# Energy flow merger
415####################414####################
416415
=== modified file 'Template/Common/Cards/delphes_card_CMS.dat'
--- Template/Common/Cards/delphes_card_CMS.dat 2017-05-19 20:52:51 +0000
+++ Template/Common/Cards/delphes_card_CMS.dat 2020-05-23 19:29:41 +0000
@@ -168,7 +168,7 @@
168 # set ResolutionFormula {resolution formula as a function of eta and energy}168 # set ResolutionFormula {resolution formula as a function of eta and energy}
169169
170 # resolution formula for electrons170 # resolution formula for electrons
171 # based on arXiv:1405.6569171 # based on arXiv:1502.02701
172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +
173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +
174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}
175175
=== modified file 'Template/Common/Cards/delphes_card_default.dat'
--- Template/Common/Cards/delphes_card_default.dat 2017-05-19 20:52:51 +0000
+++ Template/Common/Cards/delphes_card_default.dat 2020-05-23 19:29:41 +0000
@@ -168,7 +168,7 @@
168 # set ResolutionFormula {resolution formula as a function of eta and energy}168 # set ResolutionFormula {resolution formula as a function of eta and energy}
169169
170 # resolution formula for electrons170 # resolution formula for electrons
171 # based on arXiv:1405.6569171 # based on arXiv:1502.02701
172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +
173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +
174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}
175175
=== modified file 'Template/LO/Cards/run_card.dat'
--- Template/LO/Cards/run_card.dat 2018-05-29 13:11:53 +0000
+++ Template/LO/Cards/run_card.dat 2020-05-23 19:29:41 +0000
@@ -14,10 +14,6 @@
14# To display more options, you can type the command: *14# To display more options, you can type the command: *
15# update full_run_card *15# update full_run_card *
16#*********************************************************************16#*********************************************************************
17#
18#*******************
19# Running parameters
20#*******************
21# 17#
22#*********************************************************************18#*********************************************************************
23# Tag name for the run (one word) *19# Tag name for the run (one word) *
@@ -26,7 +22,6 @@
26#*********************************************************************22#*********************************************************************
27# Number of events and rnd seed *23# Number of events and rnd seed *
28# Warning: Do not generate more than 1M events in a single run *24# Warning: Do not generate more than 1M events in a single run *
29# If you want to run Pythia, avoid more than 50k events in a run. *
30#*********************************************************************25#*********************************************************************
31 %(nevents)s = nevents ! Number of unweighted events requested 26 %(nevents)s = nevents ! Number of unweighted events requested
32 %(iseed)s = iseed ! rnd seed (0=assigned automatically=default))27 %(iseed)s = iseed ! rnd seed (0=assigned automatically=default))
@@ -40,6 +35,7 @@
40 %(ebeam1)s = ebeam1 ! beam 1 total energy in GeV35 %(ebeam1)s = ebeam1 ! beam 1 total energy in GeV
41 %(ebeam2)s = ebeam2 ! beam 2 total energy in GeV36 %(ebeam2)s = ebeam2 ! beam 2 total energy in GeV
42$beam_pol37$beam_pol
38$frame
43#*********************************************************************39#*********************************************************************
44# PDF CHOICE: this automatically fixes also alpha_s and its evol. *40# PDF CHOICE: this automatically fixes also alpha_s and its evol. *
45#*********************************************************************41#*********************************************************************
@@ -61,20 +57,9 @@
61#*********************************************************************57#*********************************************************************
62 %(gridpack)s = gridpack !True = setting up the grid pack58 %(gridpack)s = gridpack !True = setting up the grid pack
63 %(time_of_flight)s = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)59 %(time_of_flight)s = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)
64 %(lhe_version)s = lhe_version ! Change the way clustering information pass to shower.
65 %(clusinfo)s = clusinfo ! include clustering tag in output
66 %(event_norm)s = event_norm ! average/sum. Normalization of the weight in the LHEF60 %(event_norm)s = event_norm ! average/sum. Normalization of the weight in the LHEF
6761$MLM
68#*********************************************************************62$CKKW
69# Matching parameter (MLM only)
70#*********************************************************************
71 %(ickkw)s = ickkw ! 0 no matching, 1 MLM
72 %(alpsfact)s = alpsfact ! scale factor for QCD emission vx
73 %(chcluster)s = chcluster ! cluster only according to channel diag
74 %(asrwgtflavor)s = asrwgtflavor ! highest quark flavor for a_s reweight
75 %(auto_ptj_mjj)s = auto_ptj_mjj ! Automatic setting of ptj and mjj if xqcut >0
76 ! (turn off for VBF and single top processes)
77 %(xqcut)s = xqcut ! minimum kt jet measure between partons
78#*********************************************************************63#*********************************************************************
79#64#
80#*********************************************************************65#*********************************************************************
@@ -99,10 +84,10 @@
99# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$$" and decay 84# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$$" and decay
100#*********************************************************************85#*********************************************************************
101 %(bwcutoff)s = bwcutoff ! (M+/-bwcutoff*Gamma)86 %(bwcutoff)s = bwcutoff ! (M+/-bwcutoff*Gamma)
102#*********************************************************************87#IF(d)# #*********************************************************************
103# Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not88#IF(d)# # Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not
104# (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply)89#IF(d)# # (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply)
105#*********************************************************************90#IF(d)# #*********************************************************************
106 %(cut_decays)s = cut_decays ! Cut decay products 91 %(cut_decays)s = cut_decays ! Cut decay products
107#*********************************************************************92#*********************************************************************
108# Standard Cuts *93# Standard Cuts *
@@ -121,24 +106,12 @@
121 %(missetmax)s = missetmax ! maximum missing Et (sum of neutrino's momenta)106 %(missetmax)s = missetmax ! maximum missing Et (sum of neutrino's momenta)
122 %(pt_min_pdg)s = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle107 %(pt_min_pdg)s = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle
123 %(pt_max_pdg)s = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50}) 108 %(pt_max_pdg)s = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50})
124#*********************************************************************109$ecut
125# Minimum and maximum E's (in the center of mass frame) *
126#*********************************************************************
127 %(ej)s = ej ! minimum E for the jets
128 %(eb)s = eb ! minimum E for the b
129 %(ea)s = ea ! minimum E for the photons
130 %(el)s = el ! minimum E for the charged leptons
131 %(ejmax)s = ejmax ! maximum E for the jets
132 %(ebmax)s = ebmax ! maximum E for the b
133 %(eamax)s = eamax ! maximum E for the photons
134 %(elmax)s = elmax ! maximum E for the charged leptons
135 %(e_min_pdg)s = e_min_pdg ! E cut for other particles (use pdg code). Applied on particle and anti-particle
136 %(e_max_pdg)s = e_max_pdg ! E cut for other particles (syntax e.g. {6: 100, 25: 50})
137#*********************************************************************110#*********************************************************************
138# Maximum and minimum absolute rapidity (for max, -1 means no cut) *111# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
139#*********************************************************************112#*********************************************************************
140 %(etaj)s = etaj ! max rap for the jets 113 %(etaj)s = etaj ! max rap for the jets
141 %(etab)s = etab ! max rap for the b114 %(etab)s = etab ! max rap for the b
142 %(etaa)s = etaa ! max rap for the photons 115 %(etaa)s = etaa ! max rap for the photons
143 %(etal)s = etal ! max rap for the charged leptons 116 %(etal)s = etal ! max rap for the charged leptons
144 %(etajmin)s = etajmin ! min rap for the jets117 %(etajmin)s = etajmin ! min rap for the jets
@@ -172,8 +145,8 @@
172 %(dralmax)s = dralmax ! maxdistance between gamma and lepton145 %(dralmax)s = dralmax ! maxdistance between gamma and lepton
173#*********************************************************************146#*********************************************************************
174# Minimum and maximum invariant mass for pairs *147# Minimum and maximum invariant mass for pairs *
175# WARNING: for four lepton final state mmll cut require to have *148#IF(llll)# # WARNING: for four lepton final state mmll cut require to have *
176# different lepton masses for each flavor! * 149#IF(llll)# # different lepton masses for each flavor! *
177#*********************************************************************150#*********************************************************************
178 %(mmjj)s = mmjj ! min invariant mass of a jet pair 151 %(mmjj)s = mmjj ! min invariant mass of a jet pair
179 %(mmbb)s = mmbb ! min invariant mass of a b pair 152 %(mmbb)s = mmbb ! min invariant mass of a b pair
@@ -186,14 +159,14 @@
186 %(mxx_min_pdg)s = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})159 %(mxx_min_pdg)s = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})
187 %(mxx_only_part_antipart)s = mxx_only_part_antipart ! if True the invariant mass is applied only 160 %(mxx_only_part_antipart)s = mxx_only_part_antipart ! if True the invariant mass is applied only
188 ! to pairs of particle/antiparticle and not to pairs of the same pdg codes. 161 ! to pairs of particle/antiparticle and not to pairs of the same pdg codes.
189#*********************************************************************162#IF(LL)# #*********************************************************************
190# Minimum and maximum invariant mass for all letpons *163#IF(LL)# # Minimum and maximum invariant mass for all letpons *
191#*********************************************************************164#IF(LL)# #*********************************************************************
192 %(mmnl)s = mmnl ! min invariant mass for all letpons (l+- and vl) 165 %(mmnl)s = mmnl ! min invariant mass for all letpons (l+- and vl)
193 %(mmnlmax)s = mmnlmax ! max invariant mass for all letpons (l+- and vl) 166 %(mmnlmax)s = mmnlmax ! max invariant mass for all letpons (l+- and vl)
194#*********************************************************************167#IF(LL)# #*********************************************************************
195# Minimum and maximum pt for 4-momenta sum of leptons *168#IF(LL)# # Minimum and maximum pt for 4-momenta sum of leptons *
196#*********************************************************************169#IF(LL)# #*********************************************************************
197 %(ptllmin)s = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)170 %(ptllmin)s = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)
198 %(ptllmax)s = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)171 %(ptllmax)s = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)
199#*********************************************************************172#*********************************************************************
@@ -204,9 +177,9 @@
204 %(xptb)s = xptb ! minimum pt for at least one b 177 %(xptb)s = xptb ! minimum pt for at least one b
205 %(xpta)s = xpta ! minimum pt for at least one photon 178 %(xpta)s = xpta ! minimum pt for at least one photon
206 %(xptl)s = xptl ! minimum pt for at least one charged lepton 179 %(xptl)s = xptl ! minimum pt for at least one charged lepton
207#*********************************************************************180#IF(jj)# #*********************************************************************
208# Control the pt's of the jets sorted by pt *181#IF(jj)# # Control the pt's of the jets sorted by pt *
209#*********************************************************************182#IF(jj)# #*********************************************************************
210 %(ptj1min)s = ptj1min ! minimum pt for the leading jet in pt183 %(ptj1min)s = ptj1min ! minimum pt for the leading jet in pt
211 %(ptj2min)s = ptj2min ! minimum pt for the second jet in pt184 %(ptj2min)s = ptj2min ! minimum pt for the second jet in pt
212 %(ptj3min)s = ptj3min ! minimum pt for the third jet in pt185 %(ptj3min)s = ptj3min ! minimum pt for the third jet in pt
@@ -216,9 +189,9 @@
216 %(ptj3max)s = ptj3max ! maximum pt for the third jet in pt189 %(ptj3max)s = ptj3max ! maximum pt for the third jet in pt
217 %(ptj4max)s = ptj4max ! maximum pt for the fourth jet in pt190 %(ptj4max)s = ptj4max ! maximum pt for the fourth jet in pt
218 %(cutuse)s = cutuse ! reject event if fails any (0) / all (1) jet pt cuts191 %(cutuse)s = cutuse ! reject event if fails any (0) / all (1) jet pt cuts
219#*********************************************************************192#IF(ll)# #*********************************************************************
220# Control the pt's of leptons sorted by pt *193#IF(ll)# # Control the pt's of leptons sorted by pt *
221#*********************************************************************194#IF(ll)# #*********************************************************************
222 %(ptl1min)s = ptl1min ! minimum pt for the leading lepton in pt195 %(ptl1min)s = ptl1min ! minimum pt for the leading lepton in pt
223 %(ptl2min)s = ptl2min ! minimum pt for the second lepton in pt196 %(ptl2min)s = ptl2min ! minimum pt for the second lepton in pt
224 %(ptl3min)s = ptl3min ! minimum pt for the third lepton in pt197 %(ptl3min)s = ptl3min ! minimum pt for the third lepton in pt
@@ -227,9 +200,9 @@
227 %(ptl2max)s = ptl2max ! maximum pt for the second lepton in pt200 %(ptl2max)s = ptl2max ! maximum pt for the second lepton in pt
228 %(ptl3max)s = ptl3max ! maximum pt for the third lepton in pt201 %(ptl3max)s = ptl3max ! maximum pt for the third lepton in pt
229 %(ptl4max)s = ptl4max ! maximum pt for the fourth lepton in pt202 %(ptl4max)s = ptl4max ! maximum pt for the fourth lepton in pt
230#*********************************************************************203#IF(JJ)# #*********************************************************************
231# Control the Ht(k)=Sum of k leading jets *204#IF(JJ)# # Control the Ht(k)=Sum of k leading jets *
232#*********************************************************************205#IF(JJ)# #*********************************************************************
233 %(htjmin)s = htjmin ! minimum jet HT=Sum(jet pt)206 %(htjmin)s = htjmin ! minimum jet HT=Sum(jet pt)
234 %(htjmax)s = htjmax ! maximum jet HT=Sum(jet pt)207 %(htjmax)s = htjmax ! maximum jet HT=Sum(jet pt)
235 %(ihtmin)s = ihtmin !inclusive Ht for all partons (including b)208 %(ihtmin)s = ihtmin !inclusive Ht for all partons (including b)
@@ -240,29 +213,21 @@
240 %(ht2max)s = ht2max ! maximum Ht for the two leading jets213 %(ht2max)s = ht2max ! maximum Ht for the two leading jets
241 %(ht3max)s = ht3max ! maximum Ht for the three leading jets214 %(ht3max)s = ht3max ! maximum Ht for the three leading jets
242 %(ht4max)s = ht4max ! maximum Ht for the four leading jets215 %(ht4max)s = ht4max ! maximum Ht for the four leading jets
243#***********************************************************************216#IF(aj)# #***********************************************************************
244# Photon-isolation cuts, according to hep-ph/9801442 *217#IF(aj)# # Photon-isolation cuts, according to hep-ph/9801442 *
245# When ptgmin=0, all the other parameters are ignored *218#IF(aj)# # When ptgmin=0, all the other parameters are ignored *
246# When ptgmin>0, pta and draj are not going to be used *219#IF(aj)# # When ptgmin>0, pta and draj are not going to be used *
247#***********************************************************************220#IF(aj)# #***********************************************************************
248 %(ptgmin)s = ptgmin ! Min photon transverse momentum221#IF(aj)# %(ptgmin)s = ptgmin ! Min photon transverse momentum
249 %(r0gamma)s = R0gamma ! Radius of isolation code222#IF(aj)# %(r0gamma)s = R0gamma ! Radius of isolation code
250 %(xn)s = xn ! n parameter of eq.(3.4) in hep-ph/9801442223#IF(aj)# %(xn)s = xn ! n parameter of eq.(3.4) in hep-ph/9801442
251 %(epsgamma)s = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442224#IF(aj)# %(epsgamma)s = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
252 %(isoem)s = isoEM ! isolate photons from EM energy (photons and leptons)225#IF(aj)# %(isoem)s = isoEM ! isolate photons from EM energy (photons and leptons)
253#*********************************************************************226#IF(jj)# #*********************************************************************
254# WBF cuts *227#IF(jj)# # WBF cuts *
255#*********************************************************************228#IF(jj)# #*********************************************************************
256 %(xetamin)s = xetamin ! minimum rapidity for two jets in the WBF case 229 %(xetamin)s = xetamin ! minimum rapidity for two jets in the WBF case
257 %(deltaeta)s = deltaeta ! minimum rapidity for two jets in the WBF case 230 %(deltaeta)s = deltaeta ! minimum rapidity for two jets in the WBF case
258#***********************************************************************
259# Turn on either the ktdurham or ptlund cut to activate *
260# CKKW(L) merging with Pythia8 [arXiv:1410.3012, arXiv:1109.4829] *
261#***********************************************************************
262 %(ktdurham)s = ktdurham
263 %(dparameter)s = dparameter
264 %(ptlund)s = ptlund
265 %(pdgs_for_merging_cut)s = pdgs_for_merging_cut ! PDGs for two cuts above
266#*********************************************************************231#*********************************************************************
267# maximal pdg code for quark to be considered as a light jet *232# maximal pdg code for quark to be considered as a light jet *
268# (otherwise b cuts are applied) *233# (otherwise b cuts are applied) *
269234
=== modified file 'Template/LO/Source/.make_opts'
--- Template/LO/Source/.make_opts 2017-08-14 08:20:30 +0000
+++ Template/LO/Source/.make_opts 2020-05-23 19:29:41 +0000
@@ -49,11 +49,15 @@
49ifeq ($(FC), ftn)49ifeq ($(FC), ftn)
50FFLAGS+= -extend-source # for ifort type of compiler50FFLAGS+= -extend-source # for ifort type of compiler
51else51else
52FFLAGS+= -ffixed-line-length-13252 VERS="$(shell $(FC) --version | grep ifort -i)"
53 ifeq ($(VERS), "")
54 FFLAGS+= -ffixed-line-length-132
55 else
56 FFLAGS+= -extend-source # for ifort type of compiler
57 endif
53endif58endif
5459
5560
56
57UNAME := $(shell uname -s)61UNAME := $(shell uname -s)
58ifeq ($(origin LDFLAGS), undefined)62ifeq ($(origin LDFLAGS), undefined)
59LDFLAGS=$(STDLIB) $(MACFLAG)63LDFLAGS=$(STDLIB) $(MACFLAG)
6064
=== modified file 'Template/LO/Source/BIAS/ptj_bias/makefile'
--- Template/LO/Source/BIAS/ptj_bias/makefile 2016-08-13 05:32:47 +0000
+++ Template/LO/Source/BIAS/ptj_bias/makefile 2020-05-23 19:29:41 +0000
@@ -19,9 +19,5 @@
19# 'VALID' is the keyword that *must* be returned if everything is in order.19# 'VALID' is the keyword that *must* be returned if everything is in order.
20#20#
21requirements: 21requirements:
22ifeq ($(shell $(call CHECK_MG5AMC_VERSION,2.4.2)),True)
23 @echo "VALID"22 @echo "VALID"
24else23
25 @echo "Error:: MG5aMC is not recent enough (found "$(MG5AMC_VERSION)")"
26 @echo "FAIL"
27endif
2824
=== modified file 'Template/LO/Source/PDF/PhotonFlux.f'
--- Template/LO/Source/PDF/PhotonFlux.f 2018-04-20 08:02:12 +0000
+++ Template/LO/Source/PDF/PhotonFlux.f 2020-05-23 19:29:41 +0000
@@ -38,19 +38,31 @@
3838
39 end39 end
4040
41 real*8 function epa_proton(x,q2max)41 real*8 function epa_proton(x,q2max,beamid)
42 integer i42 integer i
43 integer beamid
43 real*8 x,phi_f44 real*8 x,phi_f
44 real*8 xin45 real*8 xin
45 real*8 alpha,qz46 real*8 alpha,qz
46 real*8 f, qmi,qma, q2max47 real*8 f, qmi,qma, q2max
47 real*8 PI48 real*8 PI
49
50 integer nb_proton(2), nb_neutron(2)
51 common/to_heavyion_pdg/ nb_proton, nb_neutron
52 double precision mass_ion(2)
53 common/to_heavyion_mass/mass_ion
54
48 data PI/3.14159265358979323846/55 data PI/3.14159265358979323846/
4956
50 data xin/0.938/ ! proton mass in GeV57 data xin/0.938/ ! proton mass in GeV
5158
52 alpha = .007299270159 alpha = .0072992701
53 qz = 0.7160 qz = 0.71
61
62 if (nb_proton(beamid).ne.1.or.nb_neutron(beamid).ne.0)then
63 xin = mass_ion(beamid)
64 alpha = alpha * nb_proton(beamid)
65 endif
54 66
55C // x = omega/E = (E-E')/E67C // x = omega/E = (E-E')/E
56 if (x.lt.1) then68 if (x.lt.1) then
5769
=== modified file 'Template/LO/Source/PDF/pdg2pdf.f'
--- Template/LO/Source/PDF/pdg2pdf.f 2018-03-07 23:11:46 +0000
+++ Template/LO/Source/PDF/pdg2pdf.f 2020-05-23 19:29:41 +0000
@@ -58,12 +58,14 @@
58 endif58 endif
5959
60 ipart=ipdg60 ipart=ipdg
61 if(iabs(ipart).eq.21) ipart=061 if(iabs(ipart).eq.21) then
62 if(iabs(ipart).eq.22) ipart=762 ipart=0
63 iporg=ipart63 else if(iabs(ipart).eq.22) then
6464 ipart=7
65 else if(iabs(ipart).eq.7) then
66 ipart=7
65c This will be called for any PDG code, but we only support up to 767c This will be called for any PDG code, but we only support up to 7
66 if(iabs(ipart).gt.7)then68 else if(iabs(ipart).gt.7)then
67 write(*,*) 'PDF not supported for pdg ',ipdg69 write(*,*) 'PDF not supported for pdg ',ipdg
68 write(*,*) 'For lepton colliders, please set the lpp* '//70 write(*,*) 'For lepton colliders, please set the lpp* '//
69 $ 'variables to 0 in the run_card' 71 $ 'variables to 0 in the run_card'
@@ -72,6 +74,7 @@
72 stop 174 stop 1
73 endif75 endif
7476
77 iporg=ipart
75 ireuse = 078 ireuse = 0
76 do i=1,279 do i=1,2
77c Check if result can be reused since any of last two calls80c Check if result can be reused since any of last two calls
@@ -131,7 +134,7 @@
131 if(ih.eq.3) then !from the electron134 if(ih.eq.3) then !from the electron
132 pdg2pdf=epa_electron(x,q2max)135 pdg2pdf=epa_electron(x,q2max)
133 elseif(ih .eq. 2) then !from a proton without breaking136 elseif(ih .eq. 2) then !from a proton without breaking
134 pdg2pdf=epa_proton(x,q2max)137 pdg2pdf=epa_proton(x,q2max,beamid)
135 endif 138 endif
136 pdflast(iporg,ireuse)=pdg2pdf139 pdflast(iporg,ireuse)=pdg2pdf
137 return140 return
138141
=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf.f'
--- Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2018-03-07 23:11:46 +0000
+++ Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2020-05-23 19:29:41 +0000
@@ -57,6 +57,7 @@
57 ipart=ipdg57 ipart=ipdg
58 if(ipart.eq.21) ipart=058 if(ipart.eq.21) ipart=0
59 if(iabs(ipart).eq.22) ipart=759 if(iabs(ipart).eq.22) ipart=7
60 if(iabs(ipart).eq.7) ipart=7
60 iporg=ipart61 iporg=ipart
6162
62c This will be called for any PDG code, but we only support up to 763c This will be called for any PDG code, but we only support up to 7
6364
=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf6.f'
--- Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2018-03-07 23:11:46 +0000
+++ Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2020-05-23 19:29:41 +0000
@@ -24,7 +24,7 @@
24 integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem24 integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem
25 & ,i_replace,ii,ipartlast(20)25 & ,i_replace,ii,ipartlast(20)
26 double precision xlast(20),xmulast(20),pdflast(-7:7,20)26 double precision xlast(20),xmulast(20),pdflast(-7:7,20)
27 double precision epa_proton27 double precision epa_proton, epa_electron
28 save ihlast,xlast,xmulast,pdflast,imemlast,ipartlast28 save ihlast,xlast,xmulast,pdflast,imemlast,ipartlast
29 data ihlast/20*-99/29 data ihlast/20*-99/
30 data ipartlast/20*-99/30 data ipartlast/20*-99/
@@ -54,12 +54,14 @@
54 endif54 endif
5555
56 ipart=ipdg56 ipart=ipdg
57 if(iabs(ipart).eq.21) ipart=057 if(iabs(ipart).eq.21) then
58 if(iabs(ipart).eq.22) ipart=758 ipart=0
59 iporg=ipart59 else if(iabs(ipart).eq.22) then
6060 ipart=7
61 else if (iabs(ipart).eq.7) then
62 ipart=7
61c This will be called for any PDG code, but we only support up to 763c This will be called for any PDG code, but we only support up to 7
62 if(iabs(ipart).gt.7)then64 else if(iabs(ipart).gt.7)then
63 write(*,*) 'PDF not supported for pdg ',ipdg65 write(*,*) 'PDF not supported for pdg ',ipdg
64 write(*,*) 'For lepton colliders, please set the lpp* '//66 write(*,*) 'For lepton colliders, please set the lpp* '//
65 $ 'variables to 0 in the run_card' 67 $ 'variables to 0 in the run_card'
@@ -68,6 +70,7 @@
68 stop 170 stop 1
69 endif71 endif
7072
73 iporg=ipart
71c Determine the iset used in lhapdf74c Determine the iset used in lhapdf
72 call getnset(iset)75 call getnset(iset)
73 if (iset.ne.1) then76 if (iset.ne.1) then
@@ -136,6 +139,8 @@
136 pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid))139 pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid))
137 endif140 endif
138 pdg2pdf=pdg2pdf/x141 pdg2pdf=pdg2pdf/x
142 else if(ih.eq.3) then !from the electron
143 pdg2pdf=epa_electron(x,xmu*xmu)
139 else if(ih.eq.2) then ! photon from a proton without breaking144 else if(ih.eq.2) then ! photon from a proton without breaking
140 pdg2pdf = epa_proton(x,xmu*xmu)145 pdg2pdf = epa_proton(x,xmu*xmu)
141 else146 else
142147
=== modified file 'Template/LO/Source/dsample.f'
--- Template/LO/Source/dsample.f 2017-09-24 21:24:55 +0000
+++ Template/LO/Source/dsample.f 2020-05-23 19:29:41 +0000
@@ -316,6 +316,7 @@
316 fx =0d0316 fx =0d0
317 wgt=0d0317 wgt=0d0
318 endif318 endif
319
319 if (nzoom .le. 0) then320 if (nzoom .le. 0) then
320 call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result321 call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result
321 else322 else
@@ -705,6 +706,7 @@
705 tmean = 0d0706 tmean = 0d0
706 trmean = 0d0707 trmean = 0d0
707 tsigma = 0d0708 tsigma = 0d0
709 nb_pass_cuts = 0
708 kn = 0710 kn = 0
709 cur_it = 1711 cur_it = 1
710 do j=1,ng712 do j=1,ng
@@ -1029,7 +1031,7 @@
10291031
1030 integer i,j1032 integer i,j
10311033
1032 open(26, file='ftn26',status='unknown')1034 open(26, file=name, status='unknown')
1033 write(26,fmt='(4f21.17)') ((grid(2,i,j),i=1,ng),j=1,invar)1035 write(26,fmt='(4f21.17)') ((grid(2,i,j),i=1,ng),j=1,invar)
1034 write(26,*) twgt, force_max_wgt1036 write(26,*) twgt, force_max_wgt
1035c write(26,fmt='(4f21.16)') (alpha(i),i=1,maxconfigs)1037c write(26,fmt='(4f21.16)') (alpha(i),i=1,maxconfigs)
@@ -1516,7 +1518,7 @@
1516c1518c
1517 include 'genps.inc'1519 include 'genps.inc'
1518 integer max_events1520 integer max_events
1519 parameter (max_events=500000) !Maximum # events before get non_zero1521 parameter (max_events=5000000) !Maximum # events before get non_zero
1520c1522c
1521c Arguments1523c Arguments
1522c1524c
@@ -1756,6 +1758,11 @@
1756 if (kn .ge. max_events .and. non_zero .le. 5) then1758 if (kn .ge. max_events .and. non_zero .le. 5) then
1757 call none_pass(max_events)1759 call none_pass(max_events)
1758 endif1760 endif
1761 if (iteration.eq.1) then
1762 if (nb_pass_cuts.ge.1000 .and. non_zero.eq.0) then
1763 call none_pass(1000)
1764 endif
1765 endif
1759 if (non_zero .ge. events .or. (kn .gt. 200*events .and.1766 if (non_zero .ge. events .or. (kn .gt. 200*events .and.
1760 $ non_zero .gt. 5)) then1767 $ non_zero .gt. 5)) then
17611768
@@ -2267,8 +2274,20 @@
2267c----2274c----
2268c Begin Code2275c Begin Code
2269c----2276c----
2270 write(*,*) 'No points passed cuts!'2277 if (1000.eq.max_events) then
2271 write(*,*) 'Loosen cuts or increase max_events',max_events2278 write(*,*) nb_pass_cuts,
2279 & ' points passed the cut but all returned zero'
2280 write(*,*) 'therefore considering this contribution as zero'
2281 else if (nb_pass_cuts.gt.0.and.nb_pass_cuts.lt.1000)then
2282 write(*,*) 'only', nb_pass_cuts,
2283 & ' points passed the cut and they all returned zero'
2284 write(*,*) 'therefore considering this contribution as zero'
2285 write(*,*) 'Loosen cuts or increase max_events if you believe this is not zero'
2286 else
2287 write(*,*) 'No points passed cuts!'
2288 write(*,*) 'Loosen cuts or increase max_events',max_events
2289 endif
2290
2272c open(unit=22,file=result_file,status='old',access='append',2291c open(unit=22,file=result_file,status='old',access='append',
2273c & err=23)2292c & err=23)
2274c write(22,222) 'Iteration',0,'Mean: ',0d0,2293c write(22,222) 'Iteration',0,'Mean: ',0d0,
@@ -2540,6 +2559,7 @@
25402559
2541 write(*,*) "RESET CUMULATIVE VARIABLE"2560 write(*,*) "RESET CUMULATIVE VARIABLE"
2542 non_zero = 02561 non_zero = 0
2562 nb_pass_cuts = 0
2543 do j=1,maxinvar2563 do j=1,maxinvar
2544 do i=1,ng -12564 do i=1,ng -1
2545 inon_zero = 02565 inon_zero = 0
25462566
=== modified file 'Template/LO/Source/genps.inc'
--- Template/LO/Source/genps.inc 2016-04-02 14:23:21 +0000
+++ Template/LO/Source/genps.inc 2020-05-23 19:29:41 +0000
@@ -38,3 +38,8 @@
38 double precision hel_jacobian38 double precision hel_jacobian
39 INTEGER HEL_PICKED39 INTEGER HEL_PICKED
40 COMMON/HEL_PICKED/HEL_PICKED,hel_jacobian40 COMMON/HEL_PICKED/HEL_PICKED,hel_jacobian
41c**********************************************************************************
42c parameters to control is zero-cross section is due to PS or matrix-element
43c**********************************************************************************
44 integer nb_pass_cuts
45 common/cut_efficiency/nb_pass_cuts
41\ No newline at end of file46\ No newline at end of file
4247
=== modified file 'Template/LO/Source/run.inc'
--- Template/LO/Source/run.inc 2018-02-01 22:30:56 +0000
+++ Template/LO/Source/run.inc 2020-05-23 19:29:41 +0000
@@ -16,6 +16,9 @@
16 integer lpp(2)16 integer lpp(2)
17 double precision ebeam(2), xbk(2),q2fact(2)17 double precision ebeam(2), xbk(2),q2fact(2)
18 common/to_collider/ ebeam , xbk ,q2fact, lpp18 common/to_collider/ ebeam , xbk ,q2fact, lpp
19
20 integer frame_id
21 common/to_frame_me/frame_id
19c22c
20c Number of events23c Number of events
21c24c
@@ -91,4 +94,7 @@
91 double precision mxxmin4pdg(0:25) 94 double precision mxxmin4pdg(0:25)
92 logical mxxpart_antipart(1:25)95 logical mxxpart_antipart(1:25)
93 common/TO_PDG_SPECIFIC_CUT/pdg_cut, ptmin4pdg,ptmax4pdg, Emin4pdg, Emax4pdg, etamin4pdg,96 common/TO_PDG_SPECIFIC_CUT/pdg_cut, ptmin4pdg,ptmax4pdg, Emin4pdg, Emax4pdg, etamin4pdg,
94 &etamax4pdg, mxxmin4pdg,mxxpart_antipart
95\ No newline at end of file97\ No newline at end of file
98 &etamax4pdg, mxxmin4pdg,mxxpart_antipart
99
100 double precision small_width_treatment
101 common/narrow_width/small_width_treatment
96\ No newline at end of file102\ No newline at end of file
97103
=== modified file 'Template/LO/Source/transpole.f'
--- Template/LO/Source/transpole.f 2016-06-15 22:46:42 +0000
+++ Template/LO/Source/transpole.f 2020-05-23 19:29:41 +0000
@@ -28,13 +28,24 @@
28 double precision z,zmin,zmax,xmin,xmax,ez28 double precision z,zmin,zmax,xmin,xmax,ez
29 double precision pole1,width1,x,xc29 double precision pole1,width1,x,xc
30 double precision a,b30 double precision a,b
31c
32c small width treatment
33c
34 double precision small_width_treatment
35 common/narrow_width/small_width_treatment
31c-----36c-----
32c Begin Code37c Begin Code
33c-----38c-----
34 pole=pole139 pole=pole1
35 width=width140 width=width1
41
36 x = x142 x = x1
37 if (pole .gt. 0d0) then43 if (pole .gt. 0d0) then
44 if (width.lt.pole*small_width_treatment)then
45 width = pole * small_width_treatment
46 jac = jac * width/width1
47 endif
48
38 zmin = atan((-pole)/width)/width49 zmin = atan((-pole)/width)/width
39 zmax = atan((1d0-pole)/width)/width50 zmax = atan((1d0-pole)/width)/width
40 if (x .gt. del .and. x .lt. 1d0-del) then51 if (x .gt. del .and. x .lt. 1d0-del) then
@@ -175,7 +186,11 @@
175c186c
176 double precision pole1,width1,y1,jac187 double precision pole1,width1,y1,jac
177 real*8 x188 real*8 x
178189c
190c small width treatment
191c
192 double precision small_width_treatment
193 common/narrow_width/small_width_treatment
179c194c
180c Local195c Local
181c196c
@@ -191,6 +206,10 @@
191 width=width1206 width=width1
192 y = y1207 y = y1
193 if (pole .gt. 0d0) then !BW 208 if (pole .gt. 0d0) then !BW
209 if (width.lt.pole*small_width_treatment)then
210 width = pole * small_width_treatment
211 jac = jac * width/width1
212 endif
194 zmin = atan((-pole)/width)/width213 zmin = atan((-pole)/width)/width
195 zmax = atan((1d0-pole)/width)/width214 zmax = atan((1d0-pole)/width)/width
196 z = atan((y-pole)/width)/width215 z = atan((y-pole)/width)/width
197216
=== modified file 'Template/LO/SubProcesses/cuts.f'
--- Template/LO/SubProcesses/cuts.f 2018-01-11 16:16:25 +0000
+++ Template/LO/SubProcesses/cuts.f 2020-05-23 19:29:41 +0000
@@ -1592,6 +1592,7 @@
1592 m0d = 0.01592 m0d = 0.0
1593 m0c = 1.51593 m0c = 1.5
1594 m0s = 0.01594 m0s = 0.0
1595 m0b = 4.7
1595 m0t = 172.51596 m0t = 172.5
1596 m0w = 80.41597 m0w = 80.4
1597 m0z = 91.1881598 m0z = 91.188
15981599
=== modified file 'Template/LO/SubProcesses/dummy_fct.f'
--- Template/LO/SubProcesses/dummy_fct.f 2018-01-11 16:16:25 +0000
+++ Template/LO/SubProcesses/dummy_fct.f 2020-05-23 19:29:41 +0000
@@ -86,3 +86,13 @@
86 shat = x(1)*x(2)*ebeam(1)*ebeam(2)86 shat = x(1)*x(2)*ebeam(1)*ebeam(2)
87 return 87 return
88 end88 end
89
90
91 logical function dummy_boostframe()
92 implicit none
93c
94c
95 dummy_boostframe = .false.
96 return
97 end
98
8999
=== modified file 'Template/LO/SubProcesses/genps.f'
--- Template/LO/SubProcesses/genps.f 2018-06-27 09:03:22 +0000
+++ Template/LO/SubProcesses/genps.f 2020-05-23 19:29:41 +0000
@@ -185,7 +185,8 @@
185c External function185c External function
186 double precision SumDot186 double precision SumDot
187 external SumDot187 external SumDot
188188 logical dummy_boostframe
189 external dummy_boostframe
189c190c
190c data191c data
191c192c
@@ -304,8 +305,12 @@
304c First Generate Momentum for initial state particles305c First Generate Momentum for initial state particles
305c306c
306 if (lpp(1).eq.9.or.lpp(2).eq.9)then307 if (lpp(1).eq.9.or.lpp(2).eq.9)then
307 p(:,1) = pi1(:)308 if (dummy_boostframe())then
308 p(:,2) = pi2(:)309 call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))
310 else
311 p(:,1) = pi1(:)
312 p(:,2) = pi2(:)
313 endif
309 else if(nincoming.eq.2) then314 else if(nincoming.eq.2) then
310 call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))315 call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))
311 else316 else
@@ -840,7 +845,7 @@
840 m12 = m(itree(2,ibranch))**2845 m12 = m(itree(2,ibranch))**2
841 mn2 = m(ibranch-1)**2846 mn2 = m(ibranch-1)**2
842c write(*,*) 'Enertering yminmax',sqrt(s1),sqrt(m12),sqrt(mn2)847c write(*,*) 'Enertering yminmax',sqrt(s1),sqrt(m12),sqrt(mn2)
843 call yminmax(s1,t,m12,ma2,mb2,mn2,tmin,tmax)848 call yminmax(s1,0d0,m12,ma2,mb2,mn2,tmin,tmax)
844c849c
845c Call for 0<x<1850c Call for 0<x<1
846c851c
@@ -1114,6 +1119,7 @@
1114C This is the G function from Particle Kinematics by1119C This is the G function from Particle Kinematics by
1115C E. Byckling and K. Kajantie, Chapter 4 p. 91 eqs 5.281120C E. Byckling and K. Kajantie, Chapter 4 p. 91 eqs 5.28
1116C It is used to determine physical limits for Y based on inputs1121C It is used to determine physical limits for Y based on inputs
1122C Y is not used in this formula (called with dummy value)
1117C**************************************************************************1123C**************************************************************************
1118 implicit none1124 implicit none
1119c1125c
@@ -1258,5 +1264,47 @@
1258 END1264 END
1259 1265
12601266
1267C -----------------------------------------
1268C Subroutine to return momenta in a dedicated frame
1269C frame_id is the tag of the particle to put at rest
1270C frame_id follow the convention of cluster.f (sum 2**(N-1))
1271C -----------------------------------------
1272
1273 subroutine boost_to_frame(P1, frame_id, P2)
1274
1275 implicit none
1276
1277 include 'nexternal.inc'
1278
1279 DOUBLE PRECISION P1(0:3,NEXTERNAL)
1280 DOUBLE PRECISION P2(0:3,NEXTERNAL)
1281 DOUBLE PRECISION PBOOST(0:3)
1282 integer frame_id
1283
1284 integer ids(nexternal)
1285 integer i,j
1286
1287c uncompress
1288 call mapid(frame_id, ids)
1289 pboost(:) = 0d0
1290 p2(:,:) = 0d0
1291c find the boost momenta --sum of particles--
1292 do i=1,nexternal
1293 if (ids(i).eq.1)then
1294 do j=0,3
1295 Pboost(j) = Pboost(j) + P1(j,i)
1296 enddo
1297 endif
1298 enddo
1299 do j=1,3
1300 Pboost(j) = -1 * Pboost(j)
1301 enddo
1302 do i=1, nexternal
1303 call boostx(p1(0,i), pboost, p2(0,i))
1304 enddo
1305 return
1306 end
1307
1308
12611309
12621310
12631311
=== modified file 'Template/LO/SubProcesses/myamp.f'
--- Template/LO/SubProcesses/myamp.f 2016-12-17 16:26:56 +0000
+++ Template/LO/SubProcesses/myamp.f 2020-05-23 19:29:41 +0000
@@ -1,91 +1,3 @@
1 double precision function testamp(p)
2c*****************************************************************************
3c Approximates matrix element by propagators
4c*****************************************************************************
5 implicit none
6c
7c Constants
8c
9 include 'genps.inc'
10 include 'maxconfigs.inc'
11 include 'nexternal.inc'
12 double precision zero
13 parameter (zero = 0d0)
14c
15c Arguments
16c
17 double precision p(0:3,nexternal)
18c integer iconfig
19c
20c Local
21c
22 double precision xp(0:3,-nexternal:nexternal)
23 double precision mpole(-nexternal:0),shat,tsgn
24 integer i,j,iconfig
25
26 double precision prmass(-nexternal:0,lmaxconfigs)
27 double precision prwidth(-nexternal:0,lmaxconfigs)
28 integer pow(-nexternal:0,lmaxconfigs)
29 logical first_time
30c
31c Global
32c
33 integer iforest(2,-max_branch:-1,lmaxconfigs)
34 common/to_forest/ iforest
35 integer mapconfig(0:lmaxconfigs), this_config
36 common/to_mconfigs/mapconfig, this_config
37
38 include 'coupl.inc'
39c
40c External
41c
42 double precision dot
43
44 save prmass,prwidth,pow
45 data first_time /.true./
46c-----
47c Begin Code
48c-----
49 iconfig = this_config
50 if (first_time) then
51c include 'props.inc'
52 first_time=.false.
53 endif
54
55 do i=1,nexternal
56 mpole(-i)=0d0
57 do j=0,3
58 xp(j,i)=p(j,i)
59 enddo
60 enddo
61c mpole(-3) = 174**2
62c shat = dot(p(0,1),p(0,2))/(1800)**2
63 shat = dot(p(0,1),p(0,2))/(10)**2
64c shat = 1d0
65 testamp = 1d0
66 tsgn = +1d0
67 do i=-1,-(nexternal-3),-1 !Find all the propagotors
68 if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
69 do j=0,3
70 xp(j,i) = xp(j,iforest(1,i,iconfig))
71 $ +tsgn*xp(j,iforest(2,i,iconfig))
72 enddo
73 if (prwidth(i,iconfig) .ne. 0d0 .and. .false.) then
74 testamp=testamp/((dot(xp(0,i),xp(0,i))
75 $ -prmass(i,iconfig)**2)**2
76 $ -(prmass(i,iconfig)*prwidth(i,iconfig))**2)
77 else
78 testamp = testamp/((dot(xp(0,i),xp(0,i)) -
79 $ prmass(i,iconfig)**2)
80 $ **(pow(i,iconfig)))
81 endif
82 testamp=testamp*shat**(pow(i,iconfig))
83c write(*,*) i,iconfig,pow(i,iconfig),prmass(i,iconfig)
84 enddo
85c testamp = 1d0/dot(xp(0,-1),xp(0,-1))
86 testamp=abs(testamp)
87c testamp = 1d0
88 end
891
90 logical function cut_bw(p)2 logical function cut_bw(p)
91c*****************************************************************************3c*****************************************************************************
@@ -114,6 +26,7 @@
11426
115 double precision prmass(-nexternal:0,lmaxconfigs)27 double precision prmass(-nexternal:0,lmaxconfigs)
116 double precision prwidth(-nexternal:0,lmaxconfigs)28 double precision prwidth(-nexternal:0,lmaxconfigs)
29 double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
117 integer pow(-nexternal:0,lmaxconfigs)30 integer pow(-nexternal:0,lmaxconfigs)
118 logical first_time, onshell31 logical first_time, onshell
119 double precision xmass32 double precision xmass
@@ -152,13 +65,14 @@
152c65c
153 double precision dot66 double precision dot
15467
155 save prmass,prwidth,pow68 save prmass,prwidth,pow,prwidth_tmp
156 data first_time /.true./69 data first_time /.true./
157c-----70c-----
158c Begin Code71c Begin Code
159c----- 72c-----
160 cut_bw = .false. !Default is we passed the cut73 cut_bw = .false. !Default is we passed the cut
161 iconfig = this_config74 iconfig = this_config
75
162 if (first_time) then76 if (first_time) then
163 include 'props.inc'77 include 'props.inc'
164 nbw = 078 nbw = 0
@@ -209,10 +123,12 @@
209c write(*,*) 'xmass',xmass,prmass(i,iconfig)123c write(*,*) 'xmass',xmass,prmass(i,iconfig)
210c124c
211c Here we set if the BW is "on-shell" for LesHouches125c Here we set if the BW is "on-shell" for LesHouches
212c126c
127 prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
128
213 onshell = (abs(xmass - prmass(i,iconfig)) .lt.129 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
214 $ bwcutoff*prwidth(i,iconfig).and.130 $ bwcutoff*prwidth_tmp(i,iconfig).and.
215 $ (prwidth(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.131 $ (prwidth_tmp(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.
216 $ gForceBW(i,iconfig).eq.1))132 $ gForceBW(i,iconfig).eq.1))
217 if(onshell)then133 if(onshell)then
218c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11)134c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11)
@@ -264,10 +180,10 @@
264c For decay-chain syntax use BWcutoff here too (22/12/14)180c For decay-chain syntax use BWcutoff here too (22/12/14)
265 if (gForceBW(i, iconfig).eq.1) then181 if (gForceBW(i, iconfig).eq.1) then
266 onshell = (abs(xmass - prmass(i,iconfig)) .lt.182 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
267 $ bwcutoff*prwidth(i,iconfig))183 $ bwcutoff*prwidth_tmp(i,iconfig))
268 else184 else
269 onshell = (abs(xmass - prmass(i,iconfig)) .lt.185 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
270 $ 5d0*prwidth(i,iconfig))186 $ 5d0*prwidth_tmp(i,iconfig))
271 endif187 endif
272188
273 if (onshell .and. (lbw(nbw).eq. 2) .or.189 if (onshell .and. (lbw(nbw).eq. 2) .or.
@@ -313,6 +229,7 @@
313229
314 double precision prmass(-nexternal:0,lmaxconfigs)230 double precision prmass(-nexternal:0,lmaxconfigs)
315 double precision prwidth(-nexternal:0,lmaxconfigs)231 double precision prwidth(-nexternal:0,lmaxconfigs)
232 double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
316 integer pow(-nexternal:0,lmaxconfigs)233 integer pow(-nexternal:0,lmaxconfigs)
317234
318 integer idup(nexternal,maxproc,maxsproc)235 integer idup(nexternal,maxproc,maxsproc)
@@ -382,11 +299,21 @@
382299
383c-----300c-----
384c Begin Code301c Begin Code
385c----- 302c-----
303 iconfig = this_config
304c needs to be initialise to avoid segfault
305 do i = -nexternal,-1
306 prwidth(i,iconfig) = 0
307 prmass(i,iconfig) =0
308 enddo
386 include 'props.inc'309 include 'props.inc'
387c etmin = 10310c etmin = 10
388 nt = 0311 nt = 0
389 iconfig = this_config312 do i = -nexternal,-1
313 prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
314 enddo
315
316
390 mtot = 0d0317 mtot = 0d0
391 etot = 0d0 !Total energy needed318 etot = 0d0 !Total energy needed
392 spmass = 0d0 !Keep track of BW masses for shat319 spmass = 0d0 !Keep track of BW masses for shat
@@ -423,7 +350,7 @@
423c Look for identical particles to map radiation processes350c Look for identical particles to map radiation processes
424 call idenparts(iden_part, iforest(1,-max_branch,iconfig),351 call idenparts(iden_part, iforest(1,-max_branch,iconfig),
425 $ sprop(1,-max_branch,iconfig), gForceBW(-max_branch,iconfig),352 $ sprop(1,-max_branch,iconfig), gForceBW(-max_branch,iconfig),
426 $ prwidth(-nexternal,iconfig))353 $ prwidth_tmp(-nexternal,iconfig))
427354
428c Start loop over propagators355c Start loop over propagators
429 do i=-1,-(nexternal-3),-1356 do i=-1,-(nexternal-3),-1
@@ -446,15 +373,15 @@
446 xm(i)=max(xm(i),max(xqcutij(l1,l2),0d0))373 xm(i)=max(xm(i),max(xqcutij(l1,l2),0d0))
447 endif374 endif
448c write(*,*) 'iconfig,i',iconfig,i375c write(*,*) 'iconfig,i',iconfig,i
449c write(*,*) prwidth(i,iconfig),prmass(i,iconfig)376c write(*,*) prwidth_tmp(i,iconfig),prmass(i,iconfig)
450 if (prwidth(i,iconfig) .gt. 0 ) then377 if (prwidth_tmp(i,iconfig) .gt. 0 ) then
451 nbw=nbw+1378 nbw=nbw+1
452c JA 6/8/2011 Set xe(i) for resonances379c JA 6/8/2011 Set xe(i) for resonances
453 if (gforcebw(i,iconfig).eq.1) then380 if (gforcebw(i,iconfig).eq.1) then
454 xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth(i,iconfig))381 xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth_tmp(i,iconfig))
455 bwcut_for_PS(i) = bwcutoff382 bwcut_for_PS(i) = bwcutoff
456 else if (lbw(nbw).eq.1) then383 else if (lbw(nbw).eq.1) then
457 xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth(i,iconfig))384 xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth_tmp(i,iconfig))
458 bwcut_for_PS(i) = 5d0385 bwcut_for_PS(i) = 5d0
459 else386 else
460 bwcut_for_PS(i) = 5d0387 bwcut_for_PS(i) = 5d0
@@ -465,19 +392,19 @@
465c Either: required onshell and daughter masses too large392c Either: required onshell and daughter masses too large
466c Or: forced and daughter masses too large393c Or: forced and daughter masses too large
467c Or: required offshell and forced394c Or: required offshell and forced
468 if(prwidth(i,iconfig) .gt. 0.and.395 if(prwidth_tmp(i,iconfig) .gt. 0.and.
469 $ (lbw(nbw).eq.1.and.396 $ (lbw(nbw).eq.1.and.
470 $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig).lt.xm(i)397 $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig).lt.xm(i)
471 $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig).gt.dsqrt(stot))398 $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig).gt.dsqrt(stot))
472 $ .or.gforcebw(i,iconfig).eq.1.and.399 $ .or.gforcebw(i,iconfig).eq.1.and.
473 $ prmass(i,iconfig)+bwcutoff*prwidth(i,iconfig).lt.xm(i)400 $ prmass(i,iconfig)+bwcutoff*prwidth_tmp(i,iconfig).lt.xm(i)
474 $ .or.lbw(nbw).eq.2.and.gforcebw(i,iconfig).eq.1))401 $ .or.lbw(nbw).eq.2.and.gforcebw(i,iconfig).eq.1))
475 $ then402 $ then
476c Write results.dat and quit403c Write results.dat and quit
477 call write_null_results()404 call write_null_results()
478 stop405 stop
479 endif406 endif
480 if (prwidth(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.407 if (prwidth_tmp(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.
481 if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat408 if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat
482 j = 3*(nexternal-2)-4+1 !set i to ndim+1409 j = 3*(nexternal-2)-4+1 !set i to ndim+1
483c-----410c-----
@@ -489,27 +416,27 @@
489 $ .or. lbw(nbw).eq.1) then416 $ .or. lbw(nbw).eq.1) then
490 write(*,*) 'Setting PDF BW',j,nbw,prmass(i,iconfig)417 write(*,*) 'Setting PDF BW',j,nbw,prmass(i,iconfig)
491 spole(j)=prmass(i,iconfig)*prmass(i,iconfig)/stot418 spole(j)=prmass(i,iconfig)*prmass(i,iconfig)/stot
492 swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot419 swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
493 endif420 endif
494 else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig)).ge.xm(i)421 else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig)).ge.xm(i)
495 $ .and. iden_part(i).eq.0 .or. lbw(nbw).eq.1) then422 $ .and. iden_part(i).eq.0 .or. lbw(nbw).eq.1) then
496c JA 02/13 Only allow BW if xm below M+5*Gamma423c JA 02/13 Only allow BW if xm below M+5*Gamma
497 write(*,*) 'Setting BW',i,nbw,prmass(i,iconfig)424 write(*,*) 'Setting BW',i,nbw,prmass(i,iconfig)
498 spole(-i)=prmass(i,iconfig)*prmass(i,iconfig)/stot425 spole(-i)=prmass(i,iconfig)*prmass(i,iconfig)/stot
499 swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot426 swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
500 endif427 endif
501c JA 4/1/2011 Set grid in case there is no BW (radiation process)428c JA 4/1/2011 Set grid in case there is no BW (radiation process)
502 if (swidth(-i) .eq. 0d0 .and.429 if (swidth(-i) .eq. 0d0 .and.
503 $ i.ne.-(nexternal-(nincoming+1)))then430 $ i.ne.-(nexternal-(nincoming+1)))then
504 a=prmass(i,iconfig)**2/stot431 a=prmass(i,iconfig)**2/stot
505 xo = min(xm(i)**2/stot, 1-1d-8)432 xo = min(xm(i)**2/stot, 1-1d-8)
506 if (xo.eq.0d0) xo=1d0/stot433 if (xo.eq.0d0) xo=MIN(10d0/stot, stot/50d0, 0.5)
507 call setgrid(-i,xo,a,1)434 call setgrid(-i,xo,a,1)
508 endif435 endif
509c Set spmass for BWs436c Set spmass for BWs
510 if (swidth(-i) .ne. 0d0)437 if (swidth(-i) .ne. 0d0)
511 $ spmass=spmass-xm(i) +438 $ spmass=spmass-xm(i) +
512 $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig))439 $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig))
513 else !1/x^pow440 else !1/x^pow
514 a=prmass(i,iconfig)**2/stot441 a=prmass(i,iconfig)**2/stot
515c JA 4/1/2011 always set grid442c JA 4/1/2011 always set grid
@@ -529,8 +456,8 @@
529 xo = (MMJJ * 0.8)**2/stot456 xo = (MMJJ * 0.8)**2/stot
530 endif457 endif
531 endif458 endif
532 if (xo.eq.0d0) xo=1d0/stot459 if (xo.eq.0d0) xo=MIN(10d0/stot, stot/50d0, 0.5)
533c if (prwidth(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then 460c if (prwidth_tmp(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then
534 call setgrid(-i,xo,a,1)461 call setgrid(-i,xo,a,1)
535c else 462c else
536c write(*,*) 'Using flat grid for BW',i,nbw,463c write(*,*) 'Using flat grid for BW',i,nbw,
@@ -574,7 +501,7 @@
574c Use 1/10000 of sqrt(s) as minimum, to always get integration501c Use 1/10000 of sqrt(s) as minimum, to always get integration
575 xo = xo*xo/stot502 xo = xo*xo/stot
576 if (xo.eq.0d0)then503 if (xo.eq.0d0)then
577 xo=1d0/stot504 xo=1/10000d0
578 write(*,*) 'Warning: No cutoff for shat integral found'505 write(*,*) 'Warning: No cutoff for shat integral found'
579 write(*,*) ' Minimum set to ', xo506 write(*,*) ' Minimum set to ', xo
580 endif507 endif
@@ -587,7 +514,7 @@
587 endif514 endif
588 enddo515 enddo
589c Perform setting for shat (PDF BW or 1/s)516c Perform setting for shat (PDF BW or 1/s)
590 if (abs(lpp(1)) .eq. 1 .or. abs(lpp(2)) .eq. 1) then517 if (abs(lpp(1)) .ge. 1 .or. abs(lpp(2)) .ge. 1) then
591c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s)518c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s)
592 i = max(1,3*(nexternal-2) - 4 + 1)519 i = max(1,3*(nexternal-2) - 4 + 1)
593 xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot)520 xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot)
@@ -610,7 +537,7 @@
610 spole(i)= -2.0d0 ! 1/s pole537 spole(i)= -2.0d0 ! 1/s pole
611 write(*,*) "Transforming s_hat 1/s ",i,xo, smin, stot538 write(*,*) "Transforming s_hat 1/s ",i,xo, smin, stot
612 else539 else
613 write(*,*) "Transforming s_hat BW ",spole(i),swidth(i)540 write(*,*) "Transforming s_hat BW ",spole(i), max(swidth(i), spole(i)*small_width_treatment)
614 endif541 endif
615 endif542 endif
616543
617544
=== modified file 'Template/LO/SubProcesses/reweight.f'
--- Template/LO/SubProcesses/reweight.f 2018-07-22 11:40:04 +0000
+++ Template/LO/SubProcesses/reweight.f 2020-05-23 19:29:41 +0000
@@ -316,7 +316,7 @@
316 ipart(1,imo)=ipart(1,ida2)316 ipart(1,imo)=ipart(1,ida2)
317 ipart(2,imo)=ipart(2,ida2)317 ipart(2,imo)=ipart(2,ida2)
318 endif318 endif
319 else if(idmo.eq.21 .and. abs(idda1).le.6 .and.319 else if(idmo.eq.21.and. abs(idda1).le.6 .and.
320 $ abs(idda2).le.6) then320 $ abs(idda2).le.6) then
321c gluon -> quark anti-quark: use both, but take hardest as 1321c gluon -> quark anti-quark: use both, but take hardest as 1
322 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.322 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
@@ -327,6 +327,17 @@
327 ipart(1,imo)=ipart(1,ida2)327 ipart(1,imo)=ipart(1,ida2)
328 ipart(2,imo)=ipart(1,ida1)328 ipart(2,imo)=ipart(1,ida1)
329 endif329 endif
330 else if (get_color(idmo).eq.8.and.iabs(get_color(idda1)).eq.3.and.
331 $ iabs(get_color(idda2)).eq.3) then
332c gluon' -> quark' anti-quark': use both, but take hardest as 1
333 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
334 $ p(1,ipart(1,ida2))**2+p(2,ipart(1,ida2))**2) then
335 ipart(1,imo)=ipart(1,ida1)
336 ipart(2,imo)=ipart(1,ida2)
337 else
338 ipart(1,imo)=ipart(1,ida2)
339 ipart(2,imo)=ipart(1,ida1)
340 endif
330 else if(idmo.eq.21.and.(idda1.eq.21.or.idda2.eq.21))then341 else if(idmo.eq.21.and.(idda1.eq.21.or.idda2.eq.21))then
331 if(idda1.eq.21) then342 if(idda1.eq.21) then
332 iddgluon = idda1343 iddgluon = idda1
@@ -380,10 +391,32 @@
380c exotic q > Scalar q'391c exotic q > Scalar q'
381 ipart(1,imo)=ipart(1,ida2)392 ipart(1,imo)=ipart(1,ida2)
382 ipart(2,imo)=0393 ipart(2,imo)=0
383 else if (get_color(idmo).eq.1) then394 else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda2)).eq.8.and.iabs(get_color(idda1)).eq.3) then
395c exotic q > q' gluon
396 ipart(1,imo)=ipart(1,ida2)
397 ipart(2,imo)=0
398 else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda2)).eq.3.and.get_color(idda1).eq.8) then
399c exotic q > gluon q'
400 ipart(1,imo)=ipart(1,ida1)
401 ipart(2,imo)=0
402 else if (get_color(idmo).eq.1.or.get_color(idmo).eq.2.or.get_color(idda1).eq.2.or.get_color(idda2).eq.2) then
384c Color singlet403c Color singlet
385 ipart(1,imo)=ipart(1,ida1)404 ipart(1,imo)=ipart(1,ida1)
386 ipart(2,imo)=ipart(1,ida2)405 ipart(2,imo)=ipart(1,ida2)
406 else if (abs(get_color(idmo)).eq.3.and.abs(get_color(idda1)).eq.3.and.abs(get_color(idda2)).eq.3)then
407c EPSILON^IJK color structure -- handle it as photon emission --
408 ipart(1,imo)=ipart(1,ida1)
409 ipart(2,imo)=0
410 else if (abs(get_color(idmo)).eq.6.and.abs(get_color(idda1)).eq.3.and.abs(get_color(idda2)).eq.3)then
411c sextet -> (anti-)quark (anti-)quark': use both, but take hardest as 1
412 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
413 $ p(1,ipart(1,ida2))**2+p(2,ipart(1,ida2))**2) then
414 ipart(1,imo)=ipart(1,ida1)
415 ipart(2,imo)=ipart(1,ida2)
416 else
417 ipart(1,imo)=ipart(1,ida2)
418 ipart(2,imo)=ipart(1,ida1)
419 endif
387 else420 else
388 write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2)421 write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2)
389 write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale"422 write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale"
@@ -641,12 +674,12 @@
641C If we have fixed factorization scale, for ickkw>0 means central674C If we have fixed factorization scale, for ickkw>0 means central
642C scale, i.e. last two scales (ren. scale for these vertices are675C scale, i.e. last two scales (ren. scale for these vertices are
643C anyway already set by "scale" above)676C anyway already set by "scale" above)
644 if(ickkw.gt.0) then677 if (first) then
645 if(fixed_fac_scale.and.first)then
646 q2bck(1)=q2fact(1)678 q2bck(1)=q2fact(1)
647 q2bck(2)=q2fact(2)679 q2bck(2)=q2fact(2)
648 first=.false.680 first=.false.
649 else if(fixed_fac_scale) then681 else if(ickkw.gt.0) then
682 if(fixed_fac_scale) then
650 q2fact(1)=q2bck(1)683 q2fact(1)=q2bck(1)
651 q2fact(2)=q2bck(2)684 q2fact(2)=q2bck(2)
652 endif685 endif
@@ -775,15 +808,17 @@
775c Check QCD jet, take care so not a decay808c Check QCD jet, take care so not a decay
776 if(.not.isjetvx(imocl(n),idacl(n,1),idacl(n,2),809 if(.not.isjetvx(imocl(n),idacl(n,1),idacl(n,2),
777 $ ipdgcl(1,igraphs(1),iproc),ipart,n.eq.nexternal-2)) then810 $ ipdgcl(1,igraphs(1),iproc),ipart,n.eq.nexternal-2)) then
811 pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
812 pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
813 pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
814 if (isqcd(pdgm).and.isqcd(pdgid1).and.isqcd(pdgid2))then
815 continue
778c Remove non-gluon jets that lead up to non-jet vertices816c Remove non-gluon jets that lead up to non-jet vertices
779 if(ipart(1,imocl(n)).gt.2)then ! ipart(1) set and not IS line817 elseif(ipart(1,imocl(n)).gt.2)then ! ipart(1) set and not IS line
780c The ishft gives the FS particle corresponding to imocl818c The ishft gives the FS particle corresponding to imocl
781 if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then819 if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then
782 ! split case for q a > q and for g > g h (with the gluon splitting into quark)820 ! split case for q a > q and for g > g h (with the gluon splitting into quark)
783 ! also check for case of three scalar interaction (then do nothing)821 ! also check for case of three scalar interaction (then do nothing)
784 pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
785 pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
786 pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
787 if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then822 if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then
788 ! this is to avoid to do weird stuff for w+ w- z (or h h h) 823 ! this is to avoid to do weird stuff for w+ w- z (or h h h)
789 ! this fix an issue for qq_zttxqq G1594.08824 ! this fix an issue for qq_zttxqq G1594.08
@@ -955,7 +990,7 @@
955 $ '. Have jets (>0)',(iqjets(i),i=1,nexternal),990 $ '. Have jets (>0)',(iqjets(i),i=1,nexternal),
956 $ ', should be ',991 $ ', should be ',
957 $ (iqjetstore(i,iconfig),i=1,njetstore(iconfig))992 $ (iqjetstore(i,iconfig),i=1,njetstore(iconfig))
958 stop993 stop 4
959 endif994 endif
960 if (btest(mlevel,3))995 if (btest(mlevel,3))
961 $ write(*,*) 'Bad clustering, jets fail. Reclustering ',996 $ write(*,*) 'Bad clustering, jets fail. Reclustering ',
@@ -1697,6 +1732,10 @@
1697 if (btest(mlevel,3))1732 if (btest(mlevel,3))
1698 $ write(*,*)' set fact scales for PS to ',1733 $ write(*,*)' set fact scales for PS to ',
1699 $ sqrt(q2fact(1)),sqrt(q2fact(2))1734 $ sqrt(q2fact(1)),sqrt(q2fact(2))
1735 else if (abs(lpp(1)).eq.2.or.abs(lpp(1)).eq.3) then
1736 q2fact(1)=q2bck(1)
1737 else if (abs(lpp(2)).eq.2.or.abs(lpp(2)).eq.3) then
1738 q2fact(2)=q2bck(2)
1700 endif1739 endif
17011740
1702 if (btest(mlevel,3)) then1741 if (btest(mlevel,3)) then
17031742
=== modified file 'Template/LO/SubProcesses/setcuts.f'
--- Template/LO/SubProcesses/setcuts.f 2018-03-11 12:10:19 +0000
+++ Template/LO/SubProcesses/setcuts.f 2020-05-23 19:29:41 +0000
@@ -664,14 +664,21 @@
664 endif664 endif
665 enddo665 enddo
666666
667c ensure symmetry of s_min(i,j)667c ensure symmetry of s_min(i,j) + mass effect
668 do i=nincoming+1,nexternal-1668 do i=nincoming+1,nexternal-1
669 do j=nincoming+1,nexternal-1669 do j=nincoming+1,nexternal-1
670 if(j.lt.i)then670 if(j.lt.i)then
671 s_min(i,j) = max(s_min(j,i),s_min(i,j))671 s_min(i,j) = max(s_min(j,i), s_min(i,j), (pmass(i)+pmass(j))**2)
672 endif672 endif
673 enddo673 enddo
674 enddo674 enddo
675
676c ensure that smin is bigger than mass threshold
677 smin_p = 0d0
678 do i=nincoming+1, nexternal
679 smin_p = smin_p + pmass(i)
680 enddo
681 smin = max(smin, smin_p**2)
675 write(*,*) "Define smin to", smin682 write(*,*) "Define smin to", smin
676683
677c Check that results are consistent among all the grouped subprocesses684c Check that results are consistent among all the grouped subprocesses
678685
=== modified file 'Template/LO/bin/internal/Gridpack/compile'
--- Template/LO/bin/internal/Gridpack/compile 2015-09-28 20:34:44 +0000
+++ Template/LO/bin/internal/Gridpack/compile 2020-05-23 19:29:41 +0000
@@ -63,7 +63,7 @@
6363
64if [[ -d Source ]]; then64if [[ -d Source ]]; then
65 cd Source65 cd Source
66 for i in ../bin/internal/gen_ximprove all ../bin/internal/combine_events; do66 for i in ../bin/internal/gen_ximprove all; do
67 make $i -j 1 > /dev/null67 make $i -j 1 > /dev/null
68 if [[ $? -ne 0 ]];then68 if [[ $? -ne 0 ]];then
69 # Make didn't exit successfully69 # Make didn't exit successfully
7070
=== modified file 'Template/NLO/Cards/FKS_params.dat'
--- Template/NLO/Cards/FKS_params.dat 2017-08-04 19:52:15 +0000
+++ Template/NLO/Cards/FKS_params.dat 2020-05-23 19:29:41 +0000
@@ -153,6 +153,16 @@
1530.005d01530.005d0
154! Default :: 0.005d0154! Default :: 0.005d0
155!155!
156! Use a polynomial fit for the virtual corrections. Gets a better accuracy,
157! but uses more memmory and disk space.
158#UsePolyVirtual
159.False.
160! Default :: .True.
161!
162! ==========================================================================
163! Combination of matrix elements
164! ==========================================================================
165!
156! For fixed order calculations only (ignored for (N)LO+PS runs): This166! For fixed order calculations only (ignored for (N)LO+PS runs): This
157! parameter determines if parton flavour configurations with idential167! parameter determines if parton flavour configurations with idential
158! matrix elements should be separated at the level of the analysis or168! matrix elements should be separated at the level of the analysis or
@@ -170,11 +180,5 @@
170! Default :: .false.180! Default :: .false.
171!181!
172! ==========================================================================182! ==========================================================================
173! Arbitrary numerical parameters used in the FKS formalism
174! ==========================================================================
175!
176! To be implemented by the FKS authors
177!
178! ==========================================================================
179! End of FKS_params.dat file183! End of FKS_params.dat file
180! ==========================================================================184! ==========================================================================
181185
=== modified file 'Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script'
--- Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script 2016-10-26 13:53:02 +0000
+++ Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script 2020-05-23 19:29:41 +0000
@@ -149,12 +149,15 @@
149if [ -f $HWPPPATH/bin/Herwig ]; then HWEXE=Herwig ; fi149if [ -f $HWPPPATH/bin/Herwig ]; then HWEXE=Herwig ; fi
150HWVER=`$HWPPPATH/bin/$HWEXE --version`150HWVER=`$HWPPPATH/bin/$HWEXE --version`
151HWVER=($(echo "$HWVER" | sed 's/ / /g'))151HWVER=($(echo "$HWVER" | sed 's/ / /g'))
152HWVER=($(echo ${HWVER[1]} | tr "." "\n"))152HWVER1=($(echo ${HWVER[1]} | tr "." "\n"))
153HWVER=${HWVER[0]}153HWVER2=($(echo ${HWVER1[1]} | tr "." "\n"))
154if [ "$HWVER" -ge 7 ]; then HWNEW=1 ; HWEXE=Herwig ; fi154HWVER=$(echo "$HWVER1$HWVER2" | bc)
155if [ "$HWVER" -le 2 ]; then HWNEW=0 ; HWEXE=Herwig++ ; fi155if [ "$HWVER" -ge 72 ]; then HWNEW=3 ; HWEXE=Herwig ; fi
156if [ "$HWVER" -eq 71 ]; then HWNEW=2 ; HWEXE=Herwig ; fi
157if [ "$HWVER" -eq 70 ]; then HWNEW=1 ; HWEXE=Herwig ; fi
158if [ "$HWVER" -le 69 ]; then HWNEW=0 ; HWEXE=Herwig++ ; fi
156159
157if [[ "$PDFCODE" -ne 0 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -eq 1 ]160if [[ "$PDFCODE" -ne 0 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -ge 1 ]
158then161then
159 HERPDF='EXTPDF'162 HERPDF='EXTPDF'
160 PDFLIBRARY='LHAPDF'163 PDFLIBRARY='LHAPDF'
@@ -166,7 +169,7 @@
166 if [ "$PDFCODE" -gt 1 ]; then PDFSET=$PDFCODE; fi169 if [ "$PDFCODE" -gt 1 ]; then PDFSET=$PDFCODE; fi
167 if [ "$PDFCODE" -lt 0 ]; then LHAOFL=EXTRAPOLATE; fi170 if [ "$PDFCODE" -lt 0 ]; then LHAOFL=EXTRAPOLATE; fi
168 if [ "$PDFCODE" -lt -1 ]; then PDFSET=$((PDFCODE*-1)); fi171 if [ "$PDFCODE" -lt -1 ]; then PDFSET=$((PDFCODE*-1)); fi
169 if [[ "$PDFCODE" -eq 0 && "$HWNEW" -eq 1 ]]; then PDFSET=25000 ; LHAOFL=FREEZE ; fi172 if [[ "$PDFCODE" -eq 0 && "$HWNEW" -ge 1 ]]; then PDFSET=25000 ; LHAOFL=FREEZE ; fi
170 linklhapdf173 linklhapdf
171# convert PDF number to name reading PDFsets.index174# convert PDF number to name reading PDFsets.index
172 ISLHA5=0175 ISLHA5=0
@@ -184,7 +187,7 @@
184 echo 'Unable to understand LHAPDF version!'187 echo 'Unable to understand LHAPDF version!'
185 exit 1188 exit 1
186 fi189 fi
187 if [[ "$ISLHA5" -eq 1 && "$HWNEW" -eq 1 ]]190 if [[ "$ISLHA5" -eq 1 && "$HWNEW" -ge 1 ]]
188 then191 then
189 echo " Please, use LHAPDF6 with HW7 "192 echo " Please, use LHAPDF6 with HW7 "
190 exit 1193 exit 1
@@ -282,7 +285,7 @@
282 HWPPUTIMAKE="HWPPUTI="$HWPPUTI285 HWPPUTIMAKE="HWPPUTI="$HWPPUTI
283 FORFILEMAKE="FORFILE="$HWPPUTI286 FORFILEMAKE="FORFILE="$HWPPUTI
284 HEPMCF=HepMCFortran7.h287 HEPMCF=HepMCFortran7.h
285 if [ "$HWVER" -le 2 ]; then HEPMCF=HepMCFortran2.h; fi288 if [ "$HWVER" -le 69 ]; then HEPMCF=HepMCFortran2.h; fi
286 cp $thisdir/HWPPAnalyzer/$HEPMCF $thisdir/HWPPAnalyzer/HepMCFortran.h289 cp $thisdir/HWPPAnalyzer/$HEPMCF $thisdir/HWPPAnalyzer/HepMCFortran.h
287 HWPPANALYZER=HepMCFortran290 HWPPANALYZER=HepMCFortran
288 if ! make -C $thisdir/HWPPAnalyzer $HWPPUTI $HWPPANALYZER.so $HWPPMAKE "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE" "$FORFILEMAKE"291 if ! make -C $thisdir/HWPPAnalyzer $HWPPUTI $HWPPANALYZER.so $HWPPMAKE "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE" "$FORFILEMAKE"
@@ -385,6 +388,16 @@
385mv $EXEC_NAMEFF $exefile388mv $EXEC_NAMEFF $exefile
386389
387# create input file390# create input file
391if [ "$HWNEW" -le 1 ]
392then
393GENERATOR="LHCGenerator"
394EXTRACTOR="QCDExtractor"
395elif [ "$HWNEW" -ge 2 ]
396then
397GENERATOR="EventGenerator"
398EXTRACTOR="PPExtractor"
399fi
400
388cat <<EOF > ./$ifile401cat <<EOF > ./$ifile
389#402#
390# Create the Les Houches handler for MC@NLO403# Create the Les Houches handler for MC@NLO
@@ -394,35 +407,47 @@
394407
395# --------------------------------------------------------------------- #408# --------------------------------------------------------------------- #
396# 1.) NECESSARY SETTINGS FOR RUNNING WITH MC@NLO EVENTS (DO NOT MODIFY)409# 1.) NECESSARY SETTINGS FOR RUNNING WITH MC@NLO EVENTS (DO NOT MODIFY)
410EOF
397411
412if [ "$HWNEW" -le 1 ]
413then
414cat <<EOF >> ./$ifile
398set /Herwig/Shower/Evolver:HardVetoMode 1415set /Herwig/Shower/Evolver:HardVetoMode 1
399set /Herwig/Shower/Evolver:HardVetoScaleSource 1416set /Herwig/Shower/Evolver:HardVetoScaleSource 1
400set /Herwig/Shower/Evolver:MECorrMode 0417set /Herwig/Shower/Evolver:MECorrMode 0
401418EOF
402419fi
420
421cat <<EOF >> ./$ifile
403# create the Handler & Reader422# create the Handler & Reader
404create ThePEG::LesHouchesFileReader /Herwig/EventHandlers/LHEReader423create ThePEG::LesHouchesFileReader /Herwig/EventHandlers/LHEReader
405create ThePEG::LesHouchesEventHandler /Herwig/EventHandlers/LHEHandler 424create ThePEG::LesHouchesEventHandler /Herwig/EventHandlers/LHEHandler
406insert /Herwig/EventHandlers/LHEHandler:LesHouchesReaders 0 /Herwig/EventHandlers/LHEReader425insert /Herwig/EventHandlers/LHEHandler:LesHouchesReaders 0 /Herwig/EventHandlers/LHEReader
407426EOF
427
428
429cat <<EOF >> ./$ifile
408set /Herwig/EventHandlers/LHEReader:AllowedToReOpen 0430set /Herwig/EventHandlers/LHEReader:AllowedToReOpen 0
409set /Herwig/EventHandlers/LHEReader:MomentumTreatment RescaleEnergy431set /Herwig/EventHandlers/LHEReader:MomentumTreatment RescaleEnergy
410set /Herwig/EventHandlers/LHEReader:WeightWarnings 0432set /Herwig/EventHandlers/LHEReader:WeightWarnings 0
411433EOF
434
435
436cat <<EOF >> ./$ifile
412set /Herwig/EventHandlers/LHEHandler:WeightOption VarNegWeight437set /Herwig/EventHandlers/LHEHandler:WeightOption VarNegWeight
413set /Herwig/EventHandlers/LHEHandler:PartonExtractor /Herwig/Partons/QCDExtractor438set /Herwig/EventHandlers/LHEHandler:PartonExtractor /Herwig/Partons/$EXTRACTOR
414set /Herwig/EventHandlers/LHEHandler:CascadeHandler /Herwig/Shower/ShowerHandler 439set /Herwig/EventHandlers/LHEHandler:CascadeHandler /Herwig/Shower/ShowerHandler
415set /Herwig/EventHandlers/LHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler440set /Herwig/EventHandlers/LHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler
416set /Herwig/EventHandlers/LHEHandler:DecayHandler /Herwig/Decays/DecayHandler441set /Herwig/EventHandlers/LHEHandler:DecayHandler /Herwig/Decays/DecayHandler
417set /Herwig/Generators/LHCGenerator:EventHandler /Herwig/EventHandlers/LHEHandler442set /Herwig/Generators/$GENERATOR:EventHandler /Herwig/EventHandlers/LHEHandler
418set /Herwig/Generators/LHCGenerator:NumberOfEvents $NEVENTS443set /Herwig/Generators/$GENERATOR:NumberOfEvents $NEVENTS
419set /Herwig/Generators/LHCGenerator:RandomNumberGenerator:Seed $RNDEVSEED_HWPP444set /Herwig/Generators/$GENERATOR:RandomNumberGenerator:Seed $RNDEVSEED_HWPP
420set /Herwig/Generators/LHCGenerator:PrintEvent $MAXPR_HWPP445set /Herwig/Generators/$GENERATOR:PrintEvent $MAXPR_HWPP
421set /Herwig/Generators/LHCGenerator:MaxErrors $ERR_NUM_HWPP 446set /Herwig/Generators/$GENERATOR:MaxErrors $ERR_NUM_HWPP
422set /Herwig/Generators/LHCGenerator:DebugLevel 1447set /Herwig/Generators/$GENERATOR:DebugLevel 1
423EOF448EOF
424449
425if [ $HWNEW = 0 ]450if [ "$HWNEW" -eq 0 ]
426then451then
427cat <<EOF >> ./$ifile452cat <<EOF >> ./$ifile
428insert /Herwig/EventHandlers/LHEHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler453insert /Herwig/EventHandlers/LHEHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler
@@ -430,7 +455,7 @@
430fi455fi
431456
432whichherpdf $HERPDF457whichherpdf $HERPDF
433if [[ "$pdftype" -eq 1 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -eq 1 ]458if [[ "$pdftype" -eq 1 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -ge 1 ]
434then459then
435cat <<EOF >> ./$ifile460cat <<EOF >> ./$ifile
436# Define PDF from MCatNLO.inputs PDFSET number461# Define PDF from MCatNLO.inputs PDFSET number
@@ -438,6 +463,16 @@
438create ThePEG::LHAPDF /LHAPDF/MCNLOPDF ThePEGLHAPDF.so463create ThePEG::LHAPDF /LHAPDF/MCNLOPDF ThePEGLHAPDF.so
439set /LHAPDF/MCNLOPDF:PDFName $PDFSETN464set /LHAPDF/MCNLOPDF:PDFName $PDFSETN
440set /LHAPDF/MCNLOPDF:RemnantHandler /Herwig/Partons/HadronRemnants465set /LHAPDF/MCNLOPDF:RemnantHandler /Herwig/Partons/HadronRemnants
466EOF
467
468if [ "$HWNEW" -ge 1 ]
469then
470cat <<EOF >> ./$ifile
471set /Herwig/Partons/RemnantDecayer:AllowTop Yes
472EOF
473fi
474
475cat <<EOF >> ./$ifile
441set /Herwig/EventHandlers/LHEReader:PDFA /LHAPDF/MCNLOPDF476set /Herwig/EventHandlers/LHEReader:PDFA /LHAPDF/MCNLOPDF
442set /Herwig/EventHandlers/LHEReader:PDFB /LHAPDF/MCNLOPDF477set /Herwig/EventHandlers/LHEReader:PDFB /LHAPDF/MCNLOPDF
443set /Herwig/Particles/p+:PDF /LHAPDF/MCNLOPDF478set /Herwig/Particles/p+:PDF /LHAPDF/MCNLOPDF
@@ -494,9 +529,9 @@
494# 3.) ADDITIONAL SETTINGS529# 3.) ADDITIONAL SETTINGS
495530
496# SHOWER SETTINGS531# SHOWER SETTINGS
497set /Herwig/Shower/Evolver:IntrinsicPtGaussian 2.2*GeV
498EOF532EOF
499533
534
500if ((`bc <<< "$LAMBDAHERW >= 0.0"`))535if ((`bc <<< "$LAMBDAHERW >= 0.0"`))
501then536then
502LAMBDAHERW=$(echo "$LAMBDAHERW * 1000" | bc)537LAMBDAHERW=$(echo "$LAMBDAHERW * 1000" | bc)
@@ -512,23 +547,43 @@
512EOF547EOF
513fi548fi
514549
550if [ "$HWNEW" -le 1 ]
551then
552cat <<EOF >> ./$ifile
553set /Herwig/Shower/Evolver:IntrinsicPtGaussian 2.2*GeV
554EOF
555elif [ "$HWNEW" -ge 2 ]
556then
557cat <<EOF >> ./$ifile
558set /Herwig/Shower/ShowerHandler:IntrinsicPtGaussian 1.3*GeV
559EOF
560fi
515561
516if [ $HWNEW = 1 ]562if [ "$HWNEW" -ge 1 ]
517then563then
518cat <<EOF >> ./$ifile564cat <<EOF >> ./$ifile
519set /Herwig/Shower/PartnerFinder:PartnerMethod Random565set /Herwig/Shower/PartnerFinder:PartnerMethod Random
520set /Herwig/Shower/PartnerFinder:ScaleChoice Partner566set /Herwig/Shower/PartnerFinder:ScaleChoice Partner
567EOF
568fi
569
570if [ "$HWNEW" -le 1 ]
571then
572cat <<EOF >> ./$ifile
521set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes573set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes
522574set /Herwig/Shower/GammatoQQbarSplitFn:AngularOrdered Yes
523#set /Herwig/Shower/Evolver:Interactions QCDOnly575#set /Herwig/Shower/ShowerHandler:Interactions QCDOnly
524#set /Herwig/Shower/Evolver:SoftCorrelations No576#set /Herwig/Shower/ShowerHandler:SoftCorrelations No
525#set /Herwig/Shower/Evolver:SpinCorrelations Yes577#set /Herwig/Shower/ShowerHandler:SpinCorrelations Yes
526578EOF
527set /Herwig/Shower/Evolver:SpinCorrelations No579fi
528set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default580
529set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity581if [ "$HWNEW" -ge 2 ]
582then
583cat <<EOF >> ./$ifile
584set /Herwig/Shower/ShowerHandler:SpinCorrelations No
530set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes585set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes
531set /Herwig/Shower/ShowerHandler:RestrictPhasespace On586set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes
532587
533EOF588EOF
534fi589fi
@@ -807,36 +862,53 @@
807# 4.) HW++ SETTINGS THAT ARE NOT ALLOWED TO BE TOUCHED BY THE USER862# 4.) HW++ SETTINGS THAT ARE NOT ALLOWED TO BE TOUCHED BY THE USER
808863
809#Boost and reconstruction stuff864#Boost and reconstruction stuff
865EOF
866
867if [ "$HWNEW" -eq 1 ] || [ "$HWNEW" -eq 2 ]
868then
869cat <<EOF >> ./$ifile
870set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default
871set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
872EOF
873fi
874
875if [ "$HWNEW" -eq 3 ]
876then
877cat <<EOF >> ./$ifile
878set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
879EOF
880fi
881
882cat <<EOF >> ./$ifile
810set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption General883set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption General
811set /Herwig/Shower/KinematicsReconstructor:InitialInitialBoostOption LongTransBoost884set /Herwig/Shower/KinematicsReconstructor:InitialInitialBoostOption LongTransBoost
812885
813# --------------------------------------------------------------------- #886# --------------------------------------------------------------------- #
814# 5.) CREATE THE ANALYZER AND SAVE THE RUN (DO NOT MODIFY)887# 5.) CREATE THE ANALYZER AND SAVE THE RUN (DO NOT MODIFY)
815
816EOF888EOF
817889
818if [ "$HWPPUTI" != "" ]890if [ "$HWPPUTI" != "" ]
819then891then
820cat <<EOF >> ./$ifile892cat <<EOF >> ./$ifile
821create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so893create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so
822insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 $HWPPANALYZER894insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 $HWPPANALYZER
823895
824EOF896EOF
825else897else
826cat <<EOF >> ./$ifile898cat <<EOF >> ./$ifile
827#create MCatNLO::hepfortr hepfortr hepfortr.so899#create MCatNLO::hepfortr hepfortr hepfortr.so
828#insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 hepfortr900#insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 hepfortr
829901
830# Useful analysis handlers for HepMC related output902# Useful analysis handlers for HepMC related output
831##################################################903##################################################
832# Schematic overview of an event (requires --with-hepmc to be set at configure time904# Schematic overview of an event (requires --with-hepmc to be set at configure time
833# and the graphviz program 'dot' to produce a plot)905# and the graphviz program 'dot' to produce a plot)
834#create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so906#create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so
835#insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 $HWPPANALYZER907#insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 $HWPPANALYZER
836# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/Plot908# insert $GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/Plot
837# A HepMC dump file (requires --with-hepmc to be set at configure time)909# A HepMC dump file (requires --with-hepmc to be set at configure time)
838# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile910# insert $GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
839insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile911insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
840set /Herwig/Analysis/HepMCFile:PrintEvent $NEVENTS912set /Herwig/Analysis/HepMCFile:PrintEvent $NEVENTS
841set /Herwig/Analysis/HepMCFile:Format GenEvent913set /Herwig/Analysis/HepMCFile:Format GenEvent
842set /Herwig/Analysis/HepMCFile:Units GeV_mm914set /Herwig/Analysis/HepMCFile:Units GeV_mm
@@ -845,9 +917,10 @@
845fi917fi
846918
847cat <<EOF >> ./$ifile919cat <<EOF >> ./$ifile
848saverun $runfile /Herwig/Generators/LHCGenerator920saverun $runfile /Herwig/Generators/$GENERATOR
849EOF921EOF
850922
923
851( cd . ;\924( cd . ;\
852 $exefile )925 $exefile )
853926
854927
=== modified file 'Template/NLO/MCatNLO/shower_template.sh'
--- Template/NLO/MCatNLO/shower_template.sh 2017-01-16 14:11:24 +0000
+++ Template/NLO/MCatNLO/shower_template.sh 2020-05-23 19:29:41 +0000
@@ -9,8 +9,11 @@
99
10export %(ld_library_path)s=$%(ld_library_path)s:%(extralibs)s10export %(ld_library_path)s=$%(ld_library_path)s:%(extralibs)s
1111
12# this is for py8 runs12if [ $SHOWER == "HERWIGPP" ] ; then
13export PYTHIA8DATA=`pwd`/xmldoc13 export PYTHIA8DATA=""
14else
15 export PYTHIA8DATA=`pwd`/xmldoc
16fi
1417
15# if one is splitting file cd to a new dir and link all files here18# if one is splitting file cd to a new dir and link all files here
16if [[ "$NFILE" != "" ]]; then19if [[ "$NFILE" != "" ]]; then
1720
=== modified file 'Template/NLO/Source/PDF/pdg2pdf.f'
--- Template/NLO/Source/PDF/pdg2pdf.f 2015-11-06 16:54:54 +0000
+++ Template/NLO/Source/PDF/pdg2pdf.f 2020-05-23 19:29:41 +0000
@@ -66,12 +66,14 @@
66 endif66 endif
6767
68 ipart=ipdg68 ipart=ipdg
69 if(iabs(ipart).eq.21) ipart=069 if(iabs(ipart).eq.21) then
70 if(iabs(ipart).eq.22) ipart=770 ipart=0
71 iporg=ipart71 else if(iabs(ipart).eq.22) then
7272 ipart=7
73 else if(iabs(ipart).eq.7) then
74 ipart=7
75 else if(iabs(ipart).gt.7)then
73c This will be called for any PDG code, but we only support up to 776c This will be called for any PDG code, but we only support up to 7
74 if(iabs(ipart).gt.7)then
75C write(*,*) 'PDF not supported for pdg ',ipdg77C write(*,*) 'PDF not supported for pdg ',ipdg
76C write(*,*) 'For lepton colliders, please set the lpp* '//78C write(*,*) 'For lepton colliders, please set the lpp* '//
77C $ 'variables to 0 in the run_card' 79C $ 'variables to 0 in the run_card'
@@ -82,6 +84,7 @@
82 return84 return
83 endif85 endif
8486
87 iporg=ipart
85 ireuse = 088 ireuse = 0
86 ii=i_replace89 ii=i_replace
87 do i=1,2090 do i=1,20
8891
=== modified file 'Template/NLO/Source/PDF/pdg2pdf_lhapdf.f'
--- Template/NLO/Source/PDF/pdg2pdf_lhapdf.f 2016-05-24 12:48:05 +0000
+++ Template/NLO/Source/PDF/pdg2pdf_lhapdf.f 2020-05-23 19:29:41 +0000
@@ -64,12 +64,14 @@
64 endif64 endif
6565
66 ipart=ipdg66 ipart=ipdg
67 if(iabs(ipart).eq.21) ipart=067 if(iabs(ipart).eq.21) then
68 if(iabs(ipart).eq.22) ipart=768 ipart=0
69 iporg=ipart69 else if(iabs(ipart).eq.22) then
7070 ipart=7
71 else if(iabs(ipart).eq.7) then
72 ipart=7
73 else if(iabs(ipart).gt.7)then
71c This will be called for any PDG code, but we only support up to 774c This will be called for any PDG code, but we only support up to 7
72 if(iabs(ipart).gt.7)then
73C write(*,*) 'PDF not supported for pdg ',ipdg75C write(*,*) 'PDF not supported for pdg ',ipdg
74C write(*,*) 'For lepton colliders, please set the lpp* '//76C write(*,*) 'For lepton colliders, please set the lpp* '//
75C $ 'variables to 0 in the run_card' 77C $ 'variables to 0 in the run_card'
@@ -86,6 +88,7 @@
86c Determine the member of the set (function of lhapdf)88c Determine the member of the set (function of lhapdf)
87 call getnmem(iset,imem)89 call getnmem(iset,imem)
8890
91 iporg=ipart
89 ireuse = 092 ireuse = 0
90 ii=i_replace93 ii=i_replace
91 do i=1,2094 do i=1,20
9295
=== modified file 'Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f'
--- Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f 2017-01-10 15:57:32 +0000
+++ Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f 2020-05-23 19:29:41 +0000
@@ -65,12 +65,14 @@
65 endif65 endif
6666
67 ipart=ipdg67 ipart=ipdg
68 if(iabs(ipart).eq.21) ipart=068 if(iabs(ipart).eq.21) then
69 if(iabs(ipart).eq.22) ipart=769 ipart=0
70 iporg=ipart70 else if(iabs(ipart).eq.22) then
7171 ipart=7
72 else if(iabs(ipart).eq.7) then
73 ipart=7
74 else if(iabs(ipart).gt.7)then
72c This will be called for any PDG code, but we only support up to 775c This will be called for any PDG code, but we only support up to 7
73 if(iabs(ipart).gt.7)then
74C write(*,*) 'PDF not supported for pdg ',ipdg76C write(*,*) 'PDF not supported for pdg ',ipdg
75C write(*,*) 'For lepton colliders, please set the lpp* '//77C write(*,*) 'For lepton colliders, please set the lpp* '//
76C $ 'variables to 0 in the run_card' 78C $ 'variables to 0 in the run_card'
@@ -86,6 +88,7 @@
86c Determine the member of the set (function of lhapdf)88c Determine the member of the set (function of lhapdf)
87 call getnmem(iset,imem)89 call getnmem(iset,imem)
8890
91 iporg=ipart
89 ireuse = 092 ireuse = 0
90 ii=i_replace93 ii=i_replace
91 do i=1,2094 do i=1,20
9295
=== modified file 'Template/NLO/Source/kin_functions.f'
--- Template/NLO/Source/kin_functions.f 2017-07-14 08:23:18 +0000
+++ Template/NLO/Source/kin_functions.f 2020-05-23 19:29:41 +0000
@@ -236,7 +236,7 @@
236c-----236c-----
237c Begin Code237c Begin Code
238c-----238c-----
239 if ((lpp(1).eq.0).and.(lpp(2).eq.0)) then239 if ((lpp(1).ne.1).and.(lpp(2).ne.1)) then
240 p1a = dsqrt(p1(1)**2+p1(2)**2+p1(3)**2)240 p1a = dsqrt(p1(1)**2+p1(2)**2+p1(3)**2)
241 p2a = dsqrt(p2(1)**2+p2(2)**2+p2(3)**2)241 p2a = dsqrt(p2(1)**2+p2(2)**2+p2(3)**2)
242 if (p1a*p2a .ne. 0d0) then242 if (p1a*p2a .ne. 0d0) then
243243
=== modified file 'Template/NLO/Source/makefile'
--- Template/NLO/Source/makefile 2017-07-31 08:48:20 +0000
+++ Template/NLO/Source/makefile 2020-05-23 19:29:41 +0000
@@ -13,6 +13,7 @@
13 zerox64_cernlib.o13 zerox64_cernlib.o
1414
15.f.o: ; $(FC) $(FFLAGS) -c $*.f15.f.o: ; $(FC) $(FFLAGS) -c $*.f
16.f90.o: ; $(FC) $(FFLAGS) -c $*.f90
1617
17all: $(LIBDIR)libdhelas.a $(LIBDIR)libgeneric.a $(LIBDIR)libpdf.a \18all: $(LIBDIR)libdhelas.a $(LIBDIR)libgeneric.a $(LIBDIR)libpdf.a \
18 $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc19 $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc
1920
=== modified file 'Template/NLO/Source/ranmar.f'
--- Template/NLO/Source/ranmar.f 2017-01-30 15:18:32 +0000
+++ Template/NLO/Source/ranmar.f 2020-05-23 19:29:41 +0000
@@ -1,18 +1,3 @@
1 function ran2()
2c Wrapper for the random numbers; needed for the NLO stuff
3 implicit none
4 include '../SubProcesses/mint.inc' ! includes iconfig common
5 double precision ran2,x,a,b
6 integer ii,jconfig
7 a=0d0 ! min allowed value for x
8 b=1d0 ! max allowed value for x
9 ii=0 ! dummy argument of ntuple
10 jconfig=iconfig ! integration channel (for off-set)
11 call ntuple(x,a,b,ii,jconfig)
12 ran2=x
13 return
14 end
15
16 subroutine ntuple(x,a,b,ii,jconfig)1 subroutine ntuple(x,a,b,ii,jconfig)
17c-------------------------------------------------------2c-------------------------------------------------------
18c Front to ranmar which allows user to easily3c Front to ranmar which allows user to easily
194
=== modified file 'Template/NLO/SubProcesses/BinothLHA.f'
--- Template/NLO/SubProcesses/BinothLHA.f 2017-06-23 14:14:03 +0000
+++ Template/NLO/SubProcesses/BinothLHA.f 2020-05-23 19:29:41 +0000
@@ -4,12 +4,11 @@
4c that calls the OLP and returns the virtual weights. For convenience4c that calls the OLP and returns the virtual weights. For convenience
5c also the born_wgt is passed to this subroutine.5c also the born_wgt is passed to this subroutine.
6c6c
7 use FKSParams
7 implicit none8 implicit none
8 include "nexternal.inc"9 include "nexternal.inc"
9 include "coupl.inc"10 include "coupl.inc"
10 include 'born_nhel.inc'11 include 'born_nhel.inc'
11c general MadFKS parameters
12 include 'FKSParams.inc'
13 double precision pi, zero,mone12 double precision pi, zero,mone
14 parameter (pi=3.1415926535897932385d0)13 parameter (pi=3.1415926535897932385d0)
15 parameter (zero=0d0)14 parameter (zero=0d0)
@@ -72,6 +71,9 @@
72 integer ret_code_common71 integer ret_code_common
73 common /to_ret_code/ret_code_common72 common /to_ret_code/ret_code_common
74 double precision born_hel_from_virt73 double precision born_hel_from_virt
74
75 logical updateloop
76 common /to_updateloop/updateloop
75c masses77c masses
76 include 'pmass.inc'78 include 'pmass.inc'
77 data nbad / 0 /79 data nbad / 0 /
@@ -80,7 +82,11 @@
80c update the ren_scale for MadLoop and the couplings (should be the82c update the ren_scale for MadLoop and the couplings (should be the
81c Ellis-Sexton scale)83c Ellis-Sexton scale)
82 mu_r = sqrt(QES2)84 mu_r = sqrt(QES2)
85 ! force to update also loop-related parameters
86 updateloop=.true.
83 call update_as_param()87 call update_as_param()
88 updateloop=.false.
89
84 alpha_S=g**2/(4d0*PI)90 alpha_S=g**2/(4d0*PI)
85 ao2pi= alpha_S/(2d0*PI)91 ao2pi= alpha_S/(2d0*PI)
86 virt_wgt= 0d092 virt_wgt= 0d0
@@ -111,8 +117,13 @@
111c itself again to perform stability check to make sure no unstable EPS117c itself again to perform stability check to make sure no unstable EPS
112c splips unnoticed.118c splips unnoticed.
113 CALL FORCE_STABILITY_CHECK(.TRUE.)119 CALL FORCE_STABILITY_CHECK(.TRUE.)
114 CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)120 IF (.not. force_polecheck) THEN ! still have the pole for the pole check
115 CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)121 CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
122 CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)
123 else
124 CALL COLLIER_COMPUTE_UV_POLES(.TRUE.)
125 CALL COLLIER_COMPUTE_IR_POLES(.TRUE.)
126 endif
116 firsttime_run = .false.127 firsttime_run = .false.
117 endif128 endif
118 firsttime=firsttime.or.force_polecheck129 firsttime=firsttime.or.force_polecheck
@@ -290,7 +301,7 @@
290 if ((dabs(avgPoleRes(1))+dabs(avgPoleRes(2))).ne.0d0) then301 if ((dabs(avgPoleRes(1))+dabs(avgPoleRes(2))).ne.0d0) then
291 cpol = .not.((((PoleDiff(1)+PoleDiff(2))/302 cpol = .not.((((PoleDiff(1)+PoleDiff(2))/
292 $ (dabs(avgPoleRes(1))+dabs(avgPoleRes(2)))) .lt.303 $ (dabs(avgPoleRes(1))+dabs(avgPoleRes(2)))) .lt.
293 $ tolerance*10d0).or.(mod(ret_code,10).eq.7))304 $ tolerance*10d0).or.(mod(ret_code,10).eq.7.and..not.force_polecheck))
294 else305 else
295 cpol = .not.((PoleDiff(1)+PoleDiff(2).lt.tolerance*10d0)306 cpol = .not.((PoleDiff(1)+PoleDiff(2).lt.tolerance*10d0)
296 $ .or.(mod(ret_code,10).eq.7))307 $ .or.(mod(ret_code,10).eq.7))
297308
=== modified file 'Template/NLO/SubProcesses/BinothLHA_OLP.f'
--- Template/NLO/SubProcesses/BinothLHA_OLP.f 2015-08-13 09:26:37 +0000
+++ Template/NLO/SubProcesses/BinothLHA_OLP.f 2020-05-23 19:29:41 +0000
@@ -6,11 +6,11 @@
6c6c
7C************************************************************************7C************************************************************************
8c8c
9 use FKSParams
9 implicit none10 implicit none
10 include "nexternal.inc"11 include "nexternal.inc"
11 include "coupl.inc"12 include "coupl.inc"
12 include "Binoth_proc.inc"13 include "Binoth_proc.inc"
13 include "FKSParams.inc"
14 double precision pi14 double precision pi
15 parameter (pi=3.1415926535897932385d0)15 parameter (pi=3.1415926535897932385d0)
16 double precision pin(0:3,nexternal-1),p(0:4,nexternal-1)16 double precision pin(0:3,nexternal-1),p(0:4,nexternal-1)
1717
=== removed file 'Template/NLO/SubProcesses/FKSParamReader.f'
=== added file 'Template/NLO/SubProcesses/FKSParams.f90'
--- Template/NLO/SubProcesses/FKSParams.f90 1970-01-01 00:00:00 +0000
+++ Template/NLO/SubProcesses/FKSParams.f90 2020-05-23 19:29:41 +0000
@@ -0,0 +1,248 @@
1!====================================================================
2!
3! Define common block with all general parameters used by MadFKS
4! See their definitions in the file FKS_params.dat.
5!
6!====================================================================
7module FKSParams
8 character(len=64), parameter :: paramFileName='FKS_params.dat'
9 integer,parameter :: maxContribsSelected=100, &
10 maxCouplingsSelected=100, &
11 maxContribType=15, &
12 maxCouplingTypes=20
13 real*8 :: IRPoleCheckThreshold,Virt_fraction, PrecisionVirtualAtRunTime,Min_virt_fraction
14 integer :: NHelForMCoverHels,VetoedContributionTypes(0:maxContribsSelected), &
15 SelectedContributionTypes(0:maxContribsSelected),QED_squared_selected, &
16 SelectedCouplingOrders(maxCouplingTypes,0:maxCouplingsSelected), &
17 QCD_squared_selected
18 logical :: separate_flavour_configs,IncludeBornContributions,use_poly_virtual
19
20contains
21
22 subroutine FKSParamReader(filename, printParam, force)
23 ! Reads the file 'filename' and sets the parameters found in that file.
24 implicit none
25 logical, save :: HasReadOnce=.False.,paramPrinted=.false.
26 logical :: force,couldRead,printParam
27 character(*) :: filename
28 CHARACTER(len=64) :: buff, buff2, mode
29 include "orders.inc"
30 integer :: i,j
31 couldRead=.False.
32 if (HasReadOnce.and..not.force) then
33 goto 901
34 endif
35! Make sure to have default parameters if not set in the FKSParams.dat card
36! (if it is an old one for instance)
37 call DefaultFKSParam()
38! Overwrite the default parameters from file:
39 open(68, file=fileName, err=676, action='READ')
40 do
41 read(68,*,end=999) buff
42 if(index(buff,'#').eq.1) then
43 if (buff .eq. '#IRPoleCheckThreshold') then
44 read(68,*,end=999) IRPoleCheckThreshold
45 if (IRPoleCheckThreshold .lt. -1.01d0 ) then
46 stop 'IRPoleCheckThreshold must be >= -1.0d0.'
47 endif
48 elseif (buff .eq. '#PrecisionVirtualAtRunTime') then
49 read(68,*,end=999) PrecisionVirtualAtRunTime
50 if (IRPoleCheckThreshold .lt. -1.01d0 ) then
51 stop 'PrecisionVirtualAtRunTime must be >= -1.0d0.'
52 endif
53 else if (buff .eq. '#NHelForMCoverHels') then
54 read(68,*,end=999) NHelForMCoverHels
55 if (NHelForMCoverHels .lt. -1) then
56 stop 'NHelForMCoverHels must be >= -1.'
57 endif
58 else if (buff .eq. '#QCD^2==') then
59 read(68,*,end=999) QCD_squared_selected
60 if (QCD_squared_selected .lt. -1) then
61 stop 'QCD_squared_selected must be >= -1.'
62 endif
63 else if (buff .eq. '#QED^2==') then
64 read(68,*,end=999) QED_squared_selected
65 if (QED_squared_selected .lt. -1) then
66 stop 'QED_squared_selected must be >= -1.'
67 endif
68 else if (buff .eq. '#VirtualFraction') then
69 read(68,*,end=999) Virt_fraction
70 if (Virt_fraction .lt. 0 .or. virt_fraction .gt.1) then
71 stop 'VirtualFraction should be a fraction between 0 and 1'
72 endif
73 else if (buff .eq. '#MinVirtualFraction') then
74 read(68,*,end=999) Min_Virt_fraction
75 if (min_virt_fraction .lt. 0 .or. min_virt_fraction .gt.1) then
76 stop 'VirtualFraction should be a fraction between 0 and 1'
77 endif
78 else if (buff .eq. '#SeparateFlavourConfigurations') then
79 read(68,*,end=999) separate_flavour_configs
80 else if (buff .eq. '#UsePolyVirtual') then
81 read(68,*,end=999) use_poly_virtual
82 else if (buff .eq. '#VetoedContributionTypes') then
83 read(68,*,end=999) VetoedContributionTypes(0)
84 if (VetoedContributionTypes(0) .lt. 0.or. &
85 VetoedContributionTypes(0) .gt. maxContribsSelected) then
86 write(*,*) 'VetoedContributionTypes length should be >= 0 and <=', &
87 maxContribsSelected
88 stop 'Format error in FKS_params.dat.'
89 endif
90 read(68,*,end=999) (VetoedContributionTypes(I),I=1,VetoedContributionTypes(0))
91 do I=1,VetoedContributionTypes(0)
92 if (VetoedContributionTypes(I).lt.1.or. &
93 VetoedContributionTypes(I).gt.maxContribType) then
94 write(*,*) 'VetoedContributionTypes must be >=1 and <=',maxContribType
95 stop 'Format error in FKS_params.dat.'
96 endif
97 enddo
98 do I=VetoedContributionTypes(0)+1,maxContribsSelected
99 VetoedContributionTypes(I)=-1
100 enddo
101
102 else if (buff .eq. '#SelectedContributionTypes') then
103 read(68,*,end=999) SelectedContributionTypes(0)
104 if (SelectedContributionTypes(0) .lt. 0 .or. &
105 SelectedContributionTypes(0) .gt. maxContribsSelected) then
106 write(*,*) 'SelectedContributionTypes length should be >= 0 and <=', &
107 maxContribsSelected
108 stop 'Format error in FKS_params.dat.'
109 endif
110 read(68,*,end=999) (SelectedContributionTypes(I),I=1,SelectedContributionTypes(0))
111 do I=1,SelectedContributionTypes(0)
112 if (SelectedContributionTypes(I).lt.1.or. &
113 SelectedContributionTypes(I).gt.maxContribType) then
114 write(*,*) 'SelectedContributionTypes must be >=1 and <=',maxContribType
115 stop 'Format error in FKS_params.dat.'
116 endif
117 enddo
118 do I=SelectedContributionTypes(0)+1,maxContribsSelected
119 SelectedContributionTypes(I)=-1
120 enddo
121 else if (buff .eq. '#SelectedCouplingOrders') then
122 read(68,*,end=999) SelectedCouplingOrders(1,0)
123 if (SelectedCouplingOrders(1,0) .lt. 0 .or. &
124 SelectedCouplingOrders(1,0) .gt. maxCouplingsSelected) then
125 write(*,*) 'SelectedCouplingOrders length should be >= 0 and <=', &
126 maxCouplingsSelected
127 stop 'Format error in FKS_params.dat.'
128 endif
129 do j = 2, maxCouplingTypes
130 SelectedCouplingOrders(j,0) = SelectedCouplingOrders(1,0)
131 enddo
132 do j = 1, SelectedCouplingOrders(1,0)
133 read(68,*,end=999) (SelectedCouplingOrders(i,j),i=1,nsplitorders)
134 do i=nsplitorders+1,maxCouplingTypes
135 SelectedCouplingOrders(i,j)=-1
136 enddo
137 enddo
138 else
139 write(*,*) 'The parameter name ',buff(2:),'is not reckognized.'
140 stop 'Format error in FKS_params.dat.'
141 endif
142 endif
143 enddo
144999 continue
145 couldRead=.True.
146 goto 998
147
148676 continue
149 write(*,*) 'ERROR :: MadFKS parameter file ',fileName, &
150 ' could not be found or is malformed. Please specify it.'
151 stop
152 ! Below is the code if one desires to let the code continue with
153 ! a non existing or malformed parameter file
154 write(*,*) 'WARNING :: The file ',fileName,' could not be ', &
155 ' open or did not contain the necessary information. The ', &
156 ' default MadFKS parameters will be used.'
157 call DefaultFKSParam()
158 goto 998
159998 continue
160
161 if(printParam.and..not.paramPrinted) then
162 write(*,*) &
163 '==============================================================='
164 if (couldRead) then
165 write(*,*) 'INFO: MadFKS read these parameters from ',filename
166 else
167 write(*,*) 'INFO: MadFKS used the default parameters.'
168 endif
169 write(*,*) &
170 '==============================================================='
171 write(*,*) ' > IRPoleCheckThreshold = ',IRPoleCheckThreshold
172 write(*,*) ' > PrecisionVirtualAtRunTime = ',PrecisionVirtualAtRunTime
173 if (SelectedContributionTypes(0).gt.0) then
174 write(*,*) ' > SelectedContributionTypes = ', &
175 (SelectedContributionTypes(I),I=1,SelectedContributionTypes(0))
176 else
177 write(*,*) ' > SelectedContributionTypes = All'
178 endif
179 if (VetoedContributionTypes(0).gt.0) then
180 write(*,*) ' > VetoedContributionTypes = ', &
181 (VetoedContributionTypes(I),I=1,VetoedContributionTypes(0))
182 else
183 write(*,*) ' > VetoedContributionTypes = None'
184 endif
185 if (QCD_squared_selected.eq.-1) then
186 write(*,*) ' > QCD_squared_selected = All'
187 else
188 write(*,*) ' > QCD_squared_selected = ',QCD_squared_selected
189 endif
190 if (QED_squared_selected.eq.-1) then
191 write(*,*) ' > QED_squared_selected = All'
192 else
193 write(*,*) ' > QED_squared_selected = ',QED_squared_selected
194 endif
195 if (SelectedCouplingOrders(1,0).gt.0) then
196 do j=1,SelectedCouplingOrders(1,0)
197 write(*,*) ' > SelectedCouplingOrders(',j,') = ', &
198 (SelectedCouplingOrders(i,j),i=1,nsplitorders)
199 enddo
200 else
201 write(*,*) ' > SelectedCouplingOrders = All'
202 endif
203 write(*,*) ' > NHelForMCoverHels = ',NHelForMCoverHels
204 write(*,*) ' > VirtualFraction = ',Virt_fraction
205 write(*,*) ' > MinVirtualFraction = ',Min_virt_fraction
206 write(*,*) ' > SeparateFlavourConfigs = ',separate_flavour_configs
207 write(*,*) ' > UsePolyVirtual = ',use_poly_virtual
208 write(*,*) &
209 '==============================================================='
210 paramPrinted=.TRUE.
211 endif
212
213 close(68)
214 HasReadOnce=.TRUE.
215901 continue
216 end subroutine FKSParamReader
217
218 subroutine DefaultFKSParam()
219 ! Sets the default parameters
220 implicit none
221 integer i,j
222 IRPoleCheckThreshold=1.0d-5
223 NHelForMCoverHels=5
224 PrecisionVirtualAtRunTime=1d-3
225 Virt_fraction=1d0
226 QED_squared_selected=-1
227 QCD_squared_selected=-1
228 Min_virt_fraction=0.005d0
229 separate_flavour_configs=.false.
230 use_poly_virtual=.true.
231 IncludeBornContributions=.true.
232 SelectedContributionTypes(0)=0
233 VetoedContributionTypes(0)=0
234 do i=1, maxContribsSelected
235 SelectedContributionTypes(I)=-1
236 VetoedContributionTypes(I)=-1
237 enddo
238 do j=1,maxCouplingTypes
239 SelectedCouplingOrders(j,0) = 0
240 enddo
241 do j=1,maxCouplingsSelected
242 do i=1,maxCouplingTypes
243 SelectedCouplingOrders(i,j) = -1
244 enddo
245 enddo
246 end subroutine DefaultFKSParam
247
248end module FKSParams
0249
=== removed file 'Template/NLO/SubProcesses/FKSParams.inc'
=== modified file 'Template/NLO/SubProcesses/MC_integer.f'
--- Template/NLO/SubProcesses/MC_integer.f 2018-06-04 07:36:30 +0000
+++ Template/NLO/SubProcesses/MC_integer.f 2020-05-23 19:29:41 +0000
@@ -58,6 +58,7 @@
58 data firsttime/maxdim*.true./58 data firsttime/maxdim*.true./
59 data realfirsttime/.true./59 data realfirsttime/.true./
60 character*1 cdum60 character*1 cdum
61 character*3 action
61 integer nintervals(maxdim),maxintervals,niint_thisd62 integer nintervals(maxdim),maxintervals,niint_thisd
62 parameter (maxintervals=200)63 parameter (maxintervals=200)
63 integer ncall(0:maxintervals,maxdim)64 integer ncall(0:maxintervals,maxdim)
@@ -95,7 +96,7 @@
95 do i=1,this_dim-1 ! skip the lines not needed for 'this_dim'96 do i=1,this_dim-1 ! skip the lines not needed for 'this_dim'
96 read(52,*,end=999,err=999) cdum97 read(52,*,end=999,err=999) cdum
97 enddo98 enddo
98 read(52,*,end=999,err=999)99 read(52,*,end=999,err=999) action,
99 & (grid(i,this_dim),i=0,nintervals(this_dim)) ! here is what we want100 & (grid(i,this_dim),i=0,nintervals(this_dim)) ! here is what we want
100 do i=this_dim+1,maxdim ! make sure that there are enough lines in this file101 do i=this_dim+1,maxdim ! make sure that there are enough lines in this file
101 read(52,*,end=999,err=999) cdum102 read(52,*,end=999,err=999) cdum
@@ -266,7 +267,7 @@
266 enddo267 enddo
267 open(unit=52,file='grid.MC_integer',status='unknown',err=999)268 open(unit=52,file='grid.MC_integer',status='unknown',err=999)
268 do this_dim=1,maxdim269 do this_dim=1,maxdim
269 write(52,*) (grid(i,this_dim),i=0,nintervals(this_dim))270 write(52,*) 'AVE',(grid(i,this_dim),i=0,nintervals(this_dim))
270 enddo271 enddo
271 close(52)272 close(52)
272c273c
273274
=== modified file 'Template/NLO/SubProcesses/check_poles.f'
--- Template/NLO/SubProcesses/check_poles.f 2018-09-21 13:46:51 +0000
+++ Template/NLO/SubProcesses/check_poles.f 2020-05-23 19:29:41 +0000
@@ -2,6 +2,8 @@
2c**************************************************************************2c**************************************************************************
3c This is the driver for the whole calulation3c This is the driver for the whole calulation
4c**************************************************************************4c**************************************************************************
5 use mint_module
6 use FKSParams
5 implicit none7 implicit none
6C8C
7C CONSTANTS9C CONSTANTS
@@ -9,7 +11,7 @@
9 double precision pi, zero11 double precision pi, zero
10 parameter (pi=3.1415926535897932385d0)12 parameter (pi=3.1415926535897932385d0)
11 parameter (zero = 0d0)13 parameter (zero = 0d0)
12 integer npoints, npointsChecked14 integer npointsChecked
13 integer i, j, k15 integer i, j, k
14 integer return_code16 integer return_code
15 double precision tolerance, tolerance_default17 double precision tolerance, tolerance_default
@@ -63,8 +65,6 @@
63 common /to_polecheck/force_polecheck, polecheck_passed65 common /to_polecheck/force_polecheck, polecheck_passed
64 integer ret_code_ml66 integer ret_code_ml
65 common /to_ret_code/ret_code_ml67 common /to_ret_code/ret_code_ml
66 include 'FKSParams.inc'
67 include 'mint.inc'
68 68
69C-----69C-----
70C BEGIN CODE70C BEGIN CODE
@@ -462,16 +462,3 @@
462 return 462 return
463 end463 end
464464
465 subroutine outfun(p, a, b, i)
466c just a dummy subroutine
467 implicit none
468 include 'nexternal.inc'
469 double precision p(0:3, nexternal), a, b
470 integer i
471 write(*,*) 'THIS FUNCTION SHOULD NEVER BE CALLED'
472 return
473 end
474
475
476 subroutine initplot
477 end
478465
=== modified file 'Template/NLO/SubProcesses/cuts.f'
--- Template/NLO/SubProcesses/cuts.f 2018-04-16 14:08:47 +0000
+++ Template/NLO/SubProcesses/cuts.f 2020-05-23 19:29:41 +0000
@@ -139,7 +139,7 @@
139 return139 return
140 endif140 endif
141 endif141 endif
142 if (ipdg(i).eq.-ipdg(j)) then142 if (ipdg_reco(i).eq.-ipdg_reco(j)) then
143 if (drll_sf.gt.0d0) then143 if (drll_sf.gt.0d0) then
144 if (R2_04(p_reco(0,i),p_reco(0,j)).lt.drll_sf**2) then144 if (R2_04(p_reco(0,i),p_reco(0,j)).lt.drll_sf**2) then
145 passcuts_user=.false.145 passcuts_user=.false.
146146
=== modified file 'Template/NLO/SubProcesses/driver_mintFO.f'
--- Template/NLO/SubProcesses/driver_mintFO.f 2018-09-21 13:46:51 +0000
+++ Template/NLO/SubProcesses/driver_mintFO.f 2020-05-23 19:29:41 +0000
@@ -3,6 +3,8 @@
3c This is the driver for the whole calculation3c This is the driver for the whole calculation
4c**************************************************************************4c**************************************************************************
5 use extra_weights5 use extra_weights
6 use mint_module
7 use FKSParams
6 implicit none8 implicit none
7C9C
8C CONSTANTS10C CONSTANTS
@@ -11,13 +13,10 @@
11 parameter (ZERO = 0d0)13 parameter (ZERO = 0d0)
12 include 'nexternal.inc'14 include 'nexternal.inc'
13 include 'genps.inc'15 include 'genps.inc'
14 INTEGER ITMAX, NCALL
15
16 common/citmax/itmax,ncall
17C16C
18C LOCAL17C LOCAL
19C18C
20 integer i,j,k,l,l1,l219 integer i,j,k,l,l1,l2,kchan
21 character*130 buf20 character*130 buf
22c21c
23c Global22c Global
@@ -27,8 +26,8 @@
27 include 'coupl.inc'26 include 'coupl.inc'
28 27
29c Vegas stuff28c Vegas stuff
30 integer ndim29 integer nndim
31 common/tosigint/ndim30 common/tosigint/nndim
3231
33 real*8 sigint32 real*8 sigint
34 external sigint33 external sigint
@@ -43,21 +42,11 @@
43 double precision xratmax42 double precision xratmax
44 common/ccheckcnt/i_momcmp_count,xratmax43 common/ccheckcnt/i_momcmp_count,xratmax
4544
45 character*4 abrv
46 common /to_abrv/ abrv
46 integer n_mp, n_disc47 integer n_mp, n_disc
47c For MINT:
48 include "mint.inc"
49 integer nhits_in_grids(maxchannels)
50 real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals
51 $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals
52 $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals
53 $ ,0:maxchannels),x(ndimmax),itmax_fl
54 integer ixi_i,iphi_i,iy_ij,vn48 integer ixi_i,iphi_i,iy_ij,vn
55 integer ifold(ndimmax)
56 common /cifold/ifold
57 integer ifold_energy,ifold_phi,ifold_yij
58 common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
59 logical putonshell49 logical putonshell
60 integer imode,dummy
61 logical unwgt50 logical unwgt
62 double precision evtsgn51 double precision evtsgn
63 common /c_unwgt/evtsgn,unwgt52 common /c_unwgt/evtsgn,unwgt
@@ -72,20 +61,12 @@
7261
73 double precision virtual_over_born62 double precision virtual_over_born
74 common/c_vob/virtual_over_born63 common/c_vob/virtual_over_born
75 double precision average_virtual(0:n_ave_virt,maxchannels)
76 $ ,virtual_fraction(maxchannels)
77 common/c_avg_virt/average_virtual,virtual_fraction
78 include 'orders.inc'64 include 'orders.inc'
79 integer n_ord_virt
80 common /c_n_ord_virt/n_ord_virt
8165
82c timing statistics66c timing statistics
83 include "timing_variables.inc"67 include "timing_variables.inc"
84 real*4 tOther, tTot68 real*4 tOther, tTot
8569
86c general MadFKS parameters
87 include "FKSParams.inc"
88
89c applgrid70c applgrid
90 integer iappl71 integer iappl
91 common /for_applgrid/ iappl72 common /for_applgrid/ iappl
@@ -95,13 +76,17 @@
95 integer ntot_granny,derntot,ncase(0:6)76 integer ntot_granny,derntot,ncase(0:6)
96 common /c_granny_counters/ ntot_granny,ncase,derntot,deravg,derstd77 common /c_granny_counters/ ntot_granny,ncase,derntot,deravg,derstd
97 & ,dermax,xi_i_fks_ev_der_max,y_ij_fks_ev_der_max78 & ,dermax,xi_i_fks_ev_der_max,y_ij_fks_ev_der_max
98 logical fixed_order,nlo_ps
99 common /c_fnlo_nlops/fixed_order,nlo_ps
10079
80 logical useitmax
81 common/cuseitmax/useitmax
10182
102C-----83C-----
103C BEGIN CODE84C BEGIN CODE
104C----- 85C-----
86c Write the process PID in the log.txt files (i.e., to the screen)
87 write (*,*) getpid()
88
89 useitmax=.false. ! to be overwritten in open_output_files.f if need be
105c90c
106c Setup the timing variable91c Setup the timing variable
107c92c
@@ -112,6 +97,7 @@
112c Read general MadFKS parameters97c Read general MadFKS parameters
113c98c
114 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)99 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)
100 min_virt_fraction_mint=min_virt_fraction
115 do kchan=1,maxchannels101 do kchan=1,maxchannels
116 do i=0,n_ave_virt102 do i=0,n_ave_virt
117 average_virtual(i,kchan)=0d0103 average_virtual(i,kchan)=0d0
@@ -153,7 +139,7 @@
153c Get user input139c Get user input
154c140c
155 write(*,*) "getting user params"141 write(*,*) "getting user params"
156 call get_user_params(ncall,itmax,imode)142 call get_user_params(ncalls0,itmax,imode)
157 if(imode.eq.0)then143 if(imode.eq.0)then
158 flat_grid=.true.144 flat_grid=.true.
159 else145 else
@@ -162,6 +148,7 @@
162 ndim = 3*(nexternal-nincoming)-4148 ndim = 3*(nexternal-nincoming)-4
163 if (abs(lpp(1)) .ge. 1) ndim=ndim+1149 if (abs(lpp(1)) .ge. 1) ndim=ndim+1
164 if (abs(lpp(2)) .ge. 1) ndim=ndim+1150 if (abs(lpp(2)) .ge. 1) ndim=ndim+1
151 nndim=ndim
165c Don't proceed if muF1#muF2 (we need to work out the relevant formulae152c Don't proceed if muF1#muF2 (we need to work out the relevant formulae
166c at the NLO)153c at the NLO)
167 if( ( fixed_fac_scale .and.154 if( ( fixed_fac_scale .and.
@@ -172,7 +159,7 @@
172 write(*,*)'NLO computations require muF1=muF2'159 write(*,*)'NLO computations require muF1=muF2'
173 stop160 stop
174 endif161 endif
175 write(*,*) "about to integrate ", ndim,ncall,itmax162 write(*,*) "about to integrate ", ndim,ncalls0,itmax
176c APPLgrid163c APPLgrid
177 if (imode.eq.0) iappl=0 ! overwrite when starting completely fresh164 if (imode.eq.0) iappl=0 ! overwrite when starting completely fresh
178 if(iappl.ne.0) then165 if(iappl.ne.0) then
@@ -184,6 +171,23 @@
184 call find_iproc_map171 call find_iproc_map
185 write(6,*) " ... done."172 write(6,*) " ... done."
186 endif173 endif
174 if (abrv(1:4).eq.'virt') then
175 only_virt=.true.
176 else
177 only_virt=.false.
178 endif
179c Prepare the MINT folding
180 do j=1,ndimmax
181 if (j.le.ndim) then
182 ifold(j)=1
183 else
184 ifold(j)=0
185 endif
186 enddo
187 ifold_energy=ndim-2
188 ifold_yij=ndim-1
189 ifold_phi=ndim
190c
187 i_momcmp_count=0191 i_momcmp_count=0
188 xratmax=0.d0192 xratmax=0.d0
189 unwgt=.false.193 unwgt=.false.
@@ -194,38 +198,8 @@
194 doreweight=.false.198 doreweight=.false.
195 do_rwgt_scale=.false.199 do_rwgt_scale=.false.
196 do_rwgt_pdf=.false.200 do_rwgt_pdf=.false.
197 do kchan=1,nchans
198 do i=1,ndimmax
199 do j=0,nintervals
200 xgrid(j,i,kchan)=0.d0
201 enddo
202 enddo
203 enddo
204 else201 else
205 doreweight=do_rwgt_scale.or.do_rwgt_pdf202 doreweight=do_rwgt_scale.or.do_rwgt_pdf.or.store_rwgt_info
206c to restore grids:
207 open (unit=12, file='mint_grids',status='old')
208 ans(1,0)=0d0
209 unc(1,0)=0d0
210 do kchan=1,nchans
211 do j=0,nintervals
212 read (12,*) (xgrid(j,i,kchan),i=1,ndim)
213 enddo
214 do j=1,nintervals_virt
215 do k=0,n_ord_virt
216 read (12,*) (ave_virt(j,i,k,kchan),i=1,ndim)
217 enddo
218 enddo
219 read(12,*) ans(1,kchan),unc(1,kchan),dummy,dummy
220 $ ,nhits_in_grids(kchan)
221 read(12,*) virtual_fraction(kchan),average_virtual(0
222 $ ,kchan)
223 ans(1,0)=ans(1,0)+ans(1,kchan)
224 unc(1,0)=unc(1,0)+unc(1,kchan)**2
225 enddo
226 unc(1,0)=sqrt(unc(1,0))
227 close (12)
228 write (*,*) "Update iterations and points to",itmax,ncall
229 endif203 endif
230c204c
231 write (*,*) 'imode is ',imode205 write (*,*) 'imode is ',imode
@@ -236,44 +210,10 @@
236 virtual_fraction(kchan)=1d0210 virtual_fraction(kchan)=1d0
237 enddo211 enddo
238 endif212 endif
239C check for zero cross-section213 call mint(sigint)
240C if restoring grids corresponding to sigma=0, just terminate the run
241 if (imode.ne.0.and.ans(1,0).eq.0d0.and.unc(1,0).eq.0d0) then
242 call initplot()
243 call close_run_zero_res(ncall, itmax, ndim)
244 stop
245 endif
246 call mint(sigint,ndim,ncall,itmax,imode,xgrid,ymax
247 $ ,ymax_virt,ans,unc,chi2,nhits_in_grids)
248 call topout214 call topout
249 call deallocate_weight_lines215 call deallocate_weight_lines
250 write(*,*)'Final result [ABS]:',ans(1,0),' +/-',unc(1,0)
251 write(*,*)'Final result:',ans(2,0),' +/-',unc(2,0)
252 write(*,*)'chi**2 per D.o.F.:',chi2(1,0)
253 open(unit=58,file='results.dat',status='unknown')
254 do kchan=0,nchans
255 write(58,*) ans(1,kchan),unc(2,kchan),0d0,0,0,0,0,0d0,0d0
256 $ ,ans(2,kchan)
257 enddo
258 close(58)
259c216c
260c to save grids:
261 open (unit=12, file='mint_grids',status='unknown')
262 do kchan=1,nchans
263 do j=0,nintervals
264 write (12,*) (xgrid(j,i,kchan),i=1,ndim)
265 enddo
266 do j=1,nintervals_virt
267 do k=0,n_ord_virt
268 write (12,*) (ave_virt(j,i,k,kchan),i=1,ndim)
269 enddo
270 enddo
271 write (12,*) ans(1,kchan),unc(1,kchan),ncall,itmax
272 $ ,nhits_in_grids(kchan)
273 write (12,*) virtual_fraction(kchan),average_virtual(0
274 $ ,kchan)
275 enddo
276 close (12)
277 else217 else
278 write (*,*) 'Unknown imode',imode218 write (*,*) 'Unknown imode',imode
279 stop219 stop
@@ -351,7 +291,7 @@
351 open (unit=12, file='res.dat',status='unknown')291 open (unit=12, file='res.dat',status='unknown')
352 do kchan=0,nchans292 do kchan=0,nchans
353 write (12,*)ans(1,kchan),unc(1,kchan),ans(2,kchan),unc(2,kchan)293 write (12,*)ans(1,kchan),unc(1,kchan),ans(2,kchan),unc(2,kchan)
354 $ ,itmax,ncall,tTot294 $ ,itmax,ncalls0,tTot
355 enddo295 enddo
356 close(12)296 close(12)
357297
@@ -392,9 +332,9 @@
392 double precision function sigint(xx,vegas_wgt,ifl,f)332 double precision function sigint(xx,vegas_wgt,ifl,f)
393 use weight_lines333 use weight_lines
394 use extra_weights334 use extra_weights
335 use mint_module
395 implicit none336 implicit none
396 include 'nexternal.inc'337 include 'nexternal.inc'
397 include 'mint.inc'
398 include 'nFKSconfigs.inc'338 include 'nFKSconfigs.inc'
399 include 'run.inc'339 include 'run.inc'
400 include 'orders.inc'340 include 'orders.inc'
@@ -410,8 +350,8 @@
410 integer ini_fin_fks(maxchannels)350 integer ini_fin_fks(maxchannels)
411 common/fks_channels/ini_fin_fks351 common/fks_channels/ini_fin_fks
412 data sum /.false./352 data sum /.false./
413 integer ndim353 integer nndim
414 common/tosigint/ndim354 common/tosigint/nndim
415 logical nbody355 logical nbody
416 common/cnbody/nbody356 common/cnbody/nbody
417 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)357 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
@@ -419,9 +359,6 @@
419 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt359 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
420 double precision p_born(0:3,nexternal-1)360 double precision p_born(0:3,nexternal-1)
421 common /pborn/ p_born361 common /pborn/ p_born
422 double precision virt_wgt_mint(0:n_ave_virt),
423 & born_wgt_mint(0:n_ave_virt)
424 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
425 double precision virtual_over_born362 double precision virtual_over_born
426 common/c_vob/virtual_over_born363 common/c_vob/virtual_over_born
427 logical calculatedBorn364 logical calculatedBorn
@@ -434,6 +371,9 @@
434 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real371 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real
435 integer ini_fin_fks_map(0:2,0:fks_configs)372 integer ini_fin_fks_map(0:2,0:fks_configs)
436 save ini_fin_fks_map373 save ini_fin_fks_map
374 if (new_point .and. ifl.ne.2) then
375 pass_cuts_check=.false.
376 endif
437 if (firsttime) then377 if (firsttime) then
438 firsttime=.false.378 firsttime=.false.
439 call setup_ini_fin_fks_map(ini_fin_fks_map)379 call setup_ini_fin_fks_map(ini_fin_fks_map)
@@ -479,14 +419,16 @@
479 else419 else
480 jac=0.5d0420 jac=0.5d0
481 endif421 endif
482 call generate_momenta(ndim,iconfig,jac,x,p)422 call generate_momenta(nndim,iconfig,jac,x,p)
483 if (p_born(0,1).lt.0d0) goto 12423 if (p_born(0,1).lt.0d0) goto 12
484 call compute_prefactors_nbody(vegas_wgt)424 call compute_prefactors_nbody(vegas_wgt)
485 call set_cms_stuff(izero)425 call set_cms_stuff(izero)
486 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)426 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)
487 if (passcuts_nbody) then427 if (passcuts_nbody) then
428 pass_cuts_check=.true.
488 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))429 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))
489 call set_alphaS(p1_cnt(0,1,0))430 call set_alphaS(p1_cnt(0,1,0))
431 call include_multichannel_enhance(1)
490 if (abrv(1:2).ne.'vi') then432 if (abrv(1:2).ne.'vi') then
491 call compute_born433 call compute_born
492 endif434 endif
@@ -520,7 +462,7 @@
520 wgt_me_real=0d0462 wgt_me_real=0d0
521 jac=MC_int_wgt463 jac=MC_int_wgt
522 call update_fks_dir(iFKS)464 call update_fks_dir(iFKS)
523 call generate_momenta(ndim,iconfig,jac,x,p)465 call generate_momenta(nndim,iconfig,jac,x,p)
524 if (p_born(0,1).lt.0d0) cycle466 if (p_born(0,1).lt.0d0) cycle
525 call compute_prefactors_n1body(vegas_wgt,jac)467 call compute_prefactors_n1body(vegas_wgt,jac)
526 call set_cms_stuff(izero)468 call set_cms_stuff(izero)
@@ -528,9 +470,11 @@
528 call set_cms_stuff(mohdr)470 call set_cms_stuff(mohdr)
529 passcuts_n1body=passcuts(p,rwgt)471 passcuts_n1body=passcuts(p,rwgt)
530 if (passcuts_nbody .and. abrv.ne.'real') then472 if (passcuts_nbody .and. abrv.ne.'real') then
473 pass_cuts_check=.true.
531 call set_cms_stuff(izero)474 call set_cms_stuff(izero)
532 if (ickkw.eq.3) call set_FxFx_scale(2,p1_cnt(0,1,0))475 if (ickkw.eq.3) call set_FxFx_scale(2,p1_cnt(0,1,0))
533 call set_alphaS(p1_cnt(0,1,0))476 call set_alphaS(p1_cnt(0,1,0))
477 call include_multichannel_enhance(3)
534 call compute_soft_counter_term(0d0)478 call compute_soft_counter_term(0d0)
535 call set_cms_stuff(ione)479 call set_cms_stuff(ione)
536 call compute_collinear_counter_term(0d0)480 call compute_collinear_counter_term(0d0)
@@ -538,9 +482,11 @@
538 call compute_soft_collinear_counter_term(0d0)482 call compute_soft_collinear_counter_term(0d0)
539 endif483 endif
540 if (passcuts_n1body) then484 if (passcuts_n1body) then
485 pass_cuts_check=.true.
541 call set_cms_stuff(mohdr)486 call set_cms_stuff(mohdr)
542 if (ickkw.eq.3) call set_FxFx_scale(3,p)487 if (ickkw.eq.3) call set_FxFx_scale(3,p)
543 call set_alphaS(p)488 call set_alphaS(p)
489 call include_multichannel_enhance(2)
544 call compute_real_emission(p,1d0)490 call compute_real_emission(p,1d0)
545 endif491 endif
546 enddo492 enddo
@@ -703,26 +649,26 @@
703 end649 end
704650
705 subroutine update_vegas_x(xx,x)651 subroutine update_vegas_x(xx,x)
652 use mint_module
706 implicit none653 implicit none
707 include 'mint.inc'
708 integer i654 integer i
709 double precision xx(ndimmax),x(99),ran2655 double precision xx(ndimmax),x(99),ran2
710 external ran2656 external ran2
711 integer ndim657 integer nndim
712 common/tosigint/ndim658 common/tosigint/nndim
713 character*4 abrv659 character*4 abrv
714 common /to_abrv/ abrv660 common /to_abrv/ abrv
715 do i=1,99661 do i=1,99
716 if (abrv.eq.'born'.or.abrv(1:2).eq.'vi') then662 if (abrv.eq.'born'.or.abrv(1:2).eq.'vi') then
717 if(i.le.ndim-3)then663 if(i.le.nndim-3)then
718 x(i)=xx(i)664 x(i)=xx(i)
719 elseif(i.le.ndim) then665 elseif(i.le.nndim) then
720 x(i)=ran2() ! Choose them flat when not including real-emision666 x(i)=ran2() ! Choose them flat when not including real-emision
721 else667 else
722 x(i)=0.d0668 x(i)=0.d0
723 endif669 endif
724 else670 else
725 if(i.le.ndim)then671 if(i.le.nndim)then
726 x(i)=xx(i)672 x(i)=xx(i)
727 else673 else
728 x(i)=0.d0674 x(i)=0.d0
@@ -733,10 +679,11 @@
733 end679 end
734680
735c681c
736 subroutine get_user_params(ncall,itmax,irestart)682 subroutine get_user_params(ncall,nitmax,irestart)
737c**********************************************************************683c**********************************************************************
738c Routine to get user specified parameters for run684c Routine to get user specified parameters for run
739c**********************************************************************685c**********************************************************************
686 use mint_module
740 implicit none687 implicit none
741c688c
742c Constants689c Constants
@@ -746,16 +693,15 @@
746 include 'nFKSconfigs.inc'693 include 'nFKSconfigs.inc'
747 include 'fks_info.inc'694 include 'fks_info.inc'
748 include 'run.inc'695 include 'run.inc'
749 include 'mint.inc'
750 include 'orders.inc'696 include 'orders.inc'
751c697c
752c Arguments698c Arguments
753c699c
754 integer ncall,itmax700 integer ncall,nitmax
755c701c
756c Local702c Local
757c703c
758 integer i, j704 integer i, j, kchan
759 double precision dconfig(maxchannels)705 double precision dconfig(maxchannels)
760c706c
761c Global707c Global
@@ -789,8 +735,6 @@
789 character * 70 idstring735 character * 70 idstring
790 logical savegrid736 logical savegrid
791737
792 logical usexinteg,mint
793 common/cusexinteg/usexinteg,mint
794 logical unwgt738 logical unwgt
795 double precision evtsgn739 double precision evtsgn
796 common /c_unwgt/evtsgn,unwgt740 common /c_unwgt/evtsgn,unwgt
@@ -805,7 +749,6 @@
805c-----749c-----
806c Begin Code750c Begin Code
807c-----751c-----
808 mint=.true.
809 unwgt=.false.752 unwgt=.false.
810 open (unit=83,file='input_app.txt',status='old')753 open (unit=83,file='input_app.txt',status='old')
811 done=.false.754 done=.false.
@@ -817,8 +760,8 @@
817 read(buffer,*) ncall760 read(buffer,*) ncall
818 write (*,*) 'Number of phase-space points per iteration:',ncall761 write (*,*) 'Number of phase-space points per iteration:',ncall
819 elseif(buffer(1:11).eq.'NITERATIONS') then762 elseif(buffer(1:11).eq.'NITERATIONS') then
820 read(buffer(14:),*) itmax763 read(buffer(14:),*) nitmax
821 write (*,*) 'Maximum number of iterations is:',itmax764 write (*,*) 'Maximum number of iterations is:',nitmax
822 elseif(buffer(1:8).eq.'ACCURACY') then765 elseif(buffer(1:8).eq.'ACCURACY') then
823 read(buffer(11:),*) accuracy766 read(buffer(11:),*) accuracy
824 write (*,*) 'Desired accuracy is:',accuracy767 write (*,*) 'Desired accuracy is:',accuracy
825768
=== modified file 'Template/NLO/SubProcesses/driver_mintMC.f'
--- Template/NLO/SubProcesses/driver_mintMC.f 2018-09-21 13:46:51 +0000
+++ Template/NLO/SubProcesses/driver_mintMC.f 2020-05-23 19:29:41 +0000
@@ -3,6 +3,8 @@
3c This is the driver for the whole calculation3c This is the driver for the whole calculation
4c**************************************************************************4c**************************************************************************
5 use extra_weights5 use extra_weights
6 use mint_module
7 use FKSParams
6 implicit none8 implicit none
7C9C
8C CONSTANTS10C CONSTANTS
@@ -11,16 +13,13 @@
11 parameter (ZERO = 0d0)13 parameter (ZERO = 0d0)
12 include 'nexternal.inc'14 include 'nexternal.inc'
13 include 'genps.inc'15 include 'genps.inc'
14 INTEGER ITMAX, NCALL
15
16 common/citmax/itmax,ncall
17 integer ncall_virt,ncall_novi16 integer ncall_virt,ncall_novi
18 character*4 abrv17 character*4 abrv
19 common /to_abrv/ abrv18 common /to_abrv/ abrv
20C19C
21C LOCAL20C LOCAL
22C21C
23 integer i,j,k,l,l1,l2,ndim,nevts22 integer i,j,k,l,l1,l2,nndim,nevts
2423
25 integer lunlhe24 integer lunlhe
26 parameter (lunlhe=98)25 parameter (lunlhe=98)
@@ -30,10 +29,9 @@
30cc29cc
31 include 'run.inc'30 include 'run.inc'
32 include 'coupl.inc'31 include 'coupl.inc'
33 include "mint.inc"
34 32
35c Vegas stuff33c Vegas stuff
36 common/tosigint/ndim34 common/tosigint/nndim
3735
38 real*8 sigintF36 real*8 sigintF
39 external sigintF37 external sigintF
@@ -47,34 +45,17 @@
4745
48 double precision virtual_over_born46 double precision virtual_over_born
49 common/c_vob/virtual_over_born47 common/c_vob/virtual_over_born
50 double precision average_virtual(0:n_ave_virt,maxchannels)
51 $ ,virtual_fraction(maxchannels)
52 common/c_avg_virt/average_virtual,virtual_fraction
53 include 'orders.inc'48 include 'orders.inc'
54 integer n_ord_virt
55 common /c_n_ord_virt/n_ord_virt
5649
57 double precision weight,event_weight,inv_bias50 double precision weight,event_weight,inv_bias
58 character*7 event_norm51 character*7 event_norm
59 common /event_normalisation/event_norm52 common /event_normalisation/event_norm
60c For MINT:53 integer ixi_i,iphi_i,iy_ij,vn
61 real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals
62 $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals
63 $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals
64 $ ,0:maxchannels),x(ndimmax)
65 integer ixi_i,iphi_i,iy_ij,vn,nhits_in_grids(maxchannels)
66 integer ifold(ndimmax)
67 common /cifold/ifold
68 integer ifold_energy,ifold_phi,ifold_yij
69 common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
70 logical putonshell54 logical putonshell
71 logical only_virt
72 integer imode
73 common /c_imode/imode,only_virt
74 logical unwgt55 logical unwgt
75 double precision evtsgn56 double precision evtsgn
76 common /c_unwgt/evtsgn,unwgt57 common /c_unwgt/evtsgn,unwgt
77 double precision ran258 double precision ran2,x(ndimmax)
78 external ran259 external ran2
79 60
80 integer ifile,ievents61 integer ifile,ievents
@@ -94,11 +75,6 @@
94 include "timing_variables.inc"75 include "timing_variables.inc"
95 real*4 tOther, tTot76 real*4 tOther, tTot
9677
97c general MadFKS parameters
98 include "FKSParams.inc"
99 logical fixed_order,nlo_ps
100 common /c_fnlo_nlops/fixed_order,nlo_ps
101
102 double precision deravg,derstd,dermax,xi_i_fks_ev_der_max78 double precision deravg,derstd,dermax,xi_i_fks_ev_der_max
103 & ,y_ij_fks_ev_der_max79 & ,y_ij_fks_ev_der_max
104 integer ntot_granny,derntot,ncase(0:6)80 integer ntot_granny,derntot,ncase(0:6)
@@ -110,6 +86,9 @@
110C-----86C-----
111C BEGIN CODE87C BEGIN CODE
112C----- 88C-----
89c Write the process PID in the log.txt files (i.e., to the screen)
90 write (*,*) getpid()
91
113 call cpu_time(tBefore)92 call cpu_time(tBefore)
114 fixed_order=.false.93 fixed_order=.false.
115 nlo_ps=.true.94 nlo_ps=.true.
@@ -122,6 +101,7 @@
122c Read general MadFKS parameters101c Read general MadFKS parameters
123c102c
124 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)103 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)
104 min_virt_fraction_mint=min_virt_fraction
125 do i=0,n_ave_virt105 do i=0,n_ave_virt
126 average_virtual(i,1)=0d0106 average_virtual(i,1)=0d0
127 enddo107 enddo
@@ -158,11 +138,11 @@
158c Get user input138c Get user input
159c139c
160 write(*,*) "getting user params"140 write(*,*) "getting user params"
161 call get_user_params(ncall,itmax,imode,141 call get_user_params(ncalls0,itmax,
162 & ixi_i,iphi_i,iy_ij,SHsep)142 & ixi_i,iphi_i,iy_ij,SHsep)
163c Only do the reweighting when actually generating the events143c Only do the reweighting when actually generating the events
164 if (imode.eq.2) then144 if (imode.eq.2) then
165 doreweight=do_rwgt_scale.or.do_rwgt_pdf145 doreweight=do_rwgt_scale.or.do_rwgt_pdf.or.store_rwgt_info
166 else146 else
167 doreweight=.false.147 doreweight=.false.
168 do_rwgt_scale=.false.148 do_rwgt_scale=.false.
@@ -182,6 +162,7 @@
182 ndim = 3*(nexternal-nincoming)-4162 ndim = 3*(nexternal-nincoming)-4
183 if (abs(lpp(1)) .ge. 1) ndim=ndim+1163 if (abs(lpp(1)) .ge. 1) ndim=ndim+1
184 if (abs(lpp(2)) .ge. 1) ndim=ndim+1164 if (abs(lpp(2)) .ge. 1) ndim=ndim+1
165 nndim=ndim
185c Don''t proceed if muF1#muF2 (we need to work out the relevant formulae166c Don''t proceed if muF1#muF2 (we need to work out the relevant formulae
186c at the NLO)167c at the NLO)
187 if( ( fixed_fac_scale .and.168 if( ( fixed_fac_scale .and.
@@ -192,146 +173,46 @@
192 write(*,*)'NLO computations require muF1=muF2'173 write(*,*)'NLO computations require muF1=muF2'
193 stop174 stop
194 endif175 endif
195 write(*,*) "about to integrate ", ndim,ncall,itmax,iconfig176 write(*,*) "about to integrate ", ndim,ncalls0,itmax,iconfig
196 i_momcmp_count=0177 i_momcmp_count=0
197 xratmax=0.d0178 xratmax=0.d0
198 unwgt=.false.179 unwgt=.false.
180c Prepare the MINT folding
181 do j=1,ndimmax
182 if (j.le.ndim) then
183 ifold(j)=1
184 else
185 ifold(j)=0
186 endif
187 enddo
188 ifold_energy=ndim-2
189 ifold_yij=ndim-1
190 ifold_phi=ndim
191 ifold(ifold_energy)=ixi_i
192 ifold(ifold_phi)=iphi_i
193 ifold(ifold_yij)=iy_ij
199194
200c*************************************************************195c*************************************************************
201c setting of the grids196c setting of the grids
202c*************************************************************197c*************************************************************
203 if (imode.eq.-1.or.imode.eq.0) then198 if (imode.eq.-1.or.imode.eq.0) then
204 if(imode.eq.0)then
205c initialize grids
206 do j=0,nintervals
207 do i=1,ndimmax
208 xgrid(j,i,1)=0.d0
209 enddo
210 enddo
211 else
212c to restore grids:
213 open (unit=12, file='mint_grids',status='old')
214 do j=0,nintervals
215 read (12,*) (xgrid(j,i,1),i=1,ndim)
216 enddo
217 do j=1,nintervals_virt
218 do k=0,n_ord_virt
219 read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
220 enddo
221 enddo
222 read (12,*) (ans(i,1),i=1,nintegrals)
223 read (12,*) ifold_energy,ifold_phi,ifold_yij
224 read (12,*) virtual_fraction(1),average_virtual(0,1)
225 close (12)
226 endif
227c
228 write (*,*) 'imode is ',imode199 write (*,*) 'imode is ',imode
229 call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt200 call mint(sigintF)
230 $ ,ans,unc,chi2,nhits_in_grids)
231 call deallocate_weight_lines201 call deallocate_weight_lines
232 open(unit=58,file='res_0',status='unknown')
233 write(58,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1)
234 write(58,*)'Final result:',ans(2,1),' +/-',unc(2,1)
235 close(58)
236 write(*,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1)
237 write(*,*)'Final result:',ans(2,1),' +/-',unc(2,1)
238 write(*,*)'chi**2 per D.o.F.:',chi2(1,1)
239 open(unit=58,file='results.dat',status='unknown')202 open(unit=58,file='results.dat',status='unknown')
240 write(58,*) ans(1,1),unc(2,1),0d0,0,0,0,0,0d0,0d0,ans(2,1)203 write(58,*) ans(1,1),unc(2,1),0d0,0,0,0,0,0d0,0d0,ans(2,1)
241 close(58)204 close(58)
242c
243c to save grids:
244 open (unit=12, file='mint_grids',status='unknown')
245 do j=0,nintervals
246 write (12,*) (xgrid(j,i,1),i=1,ndim)
247 enddo
248 do j=1,nintervals_virt
249 do k=0,n_ord_virt
250 write (12,*) (ave_virt(j,i,k,1),i=1,ndim)
251 enddo
252 enddo
253 write (12,*) (ans(i,1),i=1,nintegrals)
254 write (12,*) ifold_energy,ifold_phi,ifold_yij
255 write (12,*) virtual_fraction(1),average_virtual(0,1)
256 close (12)
257
258c*************************************************************205c*************************************************************
259c computation of upper bounding envelope206c computation of upper bounding envelope
260c*************************************************************207c*************************************************************
261 elseif(imode.eq.1) then208 elseif(imode.eq.1) then
262c to restore grids:
263 open (unit=12, file='mint_grids',status='old')
264 do j=0,nintervals
265 read (12,*) (xgrid(j,i,1),i=1,ndim)
266 enddo
267 do j=1,nintervals_virt
268 do k=0,n_ord_virt
269 read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
270 enddo
271 enddo
272 read (12,*) (ans(i,1),i=1,nintegrals)
273 read (12,*) ifold_energy,ifold_phi,ifold_yij
274 read (12,*) virtual_fraction(1),average_virtual(0,1)
275 close (12)
276
277c Prepare the MINT folding
278 do j=1,ndimmax
279 if (j.le.ndim) then
280 ifold(j)=1
281 else
282 ifold(j)=0
283 endif