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

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 961
Proposed branch: lp:~maddevelopers/mg5amcnlo/3.0.2
Merge into: lp:mg5amcnlo
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
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.
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

First question,

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

Cheers,

Olivier

Revision history for this message
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.

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

Ok, so should we release this?

Olivier

Revision history for this message
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
980. By olivier-mattelaer

fixing tests

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :
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...

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) 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

Revision history for this message
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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Revision history for this message
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
981. By olivier-mattelaer

merge up to 2.7.2

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

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
982. By olivier-mattelaer

fix issue with the non update of loop parameter

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

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

Revision history for this message
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.
>
>

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) 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.

Revision history for this message
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.
>

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

Rikkert can you comment on that?

Olivier

Revision history for this message
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

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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

Revision history for this message
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

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

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

Revision history for this message
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

Revision history for this message
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
983. By olivier-mattelaer

remove polyfit by default

984. By olivier-mattelaer

update IOttest

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) 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

Revision history for this message
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.
>

Revision history for this message
Olivier Mattelaer (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.

Revision history for this message
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

Revision history for this message
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.
>

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) 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

Revision history for this message
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.

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

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

Revision history for this message
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

Revision history for this message
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.
>

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

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
985. By olivier-mattelaer

deactivating Collier as long as Valentin did not take a look

Revision history for this message
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

Revision history for this message
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...

Revision history for this message
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
986. By olivier-mattelaer

fixing issuue with the pole check with COLLIER

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) 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

lp:~maddevelopers/mg5amcnlo/3.0.2 updated
987. By olivier-mattelaer

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

Revision history for this message
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
1=== modified file 'HELAS/v2xxxx.f'
2--- HELAS/v2xxxx.f 2010-10-30 03:26:37 +0000
3+++ HELAS/v2xxxx.f 2020-05-23 19:29:41 +0000
4@@ -30,11 +30,11 @@
5 vc(2) = p(1)/p(0)
6 vc(3) = p(2)/p(0)
7 vc(4) = p(3)/p(0)
8- else
9+ else
10 vc(1) = p(0)/vmass
11 vc(2) = p(1)/vmass
12 vc(3) = p(2)/vmass
13 vc(4) = p(3)/vmass
14- endif
15+ endif
16 return
17 end
18
19=== modified file 'MadSpin/decay.py'
20--- MadSpin/decay.py 2018-09-21 13:46:51 +0000
21+++ MadSpin/decay.py 2020-05-23 19:29:41 +0000
22@@ -284,12 +284,13 @@
23 line_type = 'none' # support type: init / event / rwgt
24 self.diese = ''
25 for line in self.inputfile:
26+ origline = line
27 line = line.lower()
28 if line=="":
29 continue
30 # Find special tag in the line
31 if line[0]=="#":
32- self.diese+=line
33+ self.diese+=origline
34 continue
35 if '<event' in line:
36 #start new_event
37@@ -319,7 +320,7 @@
38 if line_type == 'none':
39 continue
40 elif line_type == 'other_block':
41- self.diese += line
42+ self.diese += origline
43 # read the line and assign the date accordingly
44 elif line_type == 'init':
45 line_type = 'event'
46@@ -2244,7 +2245,7 @@
47 nb_mc_masses=len(indices_for_mc_masses)
48
49 p, p_str=self.curr_event.give_momenta(event_map)
50- stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, decay_me['max_weight'])
51+ stdin_text=' %s %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, decay_me['max_weight'], self.options['frame_id'])
52 stdin_text+=p_str
53 # here I also need to specify the Monte Carlo Masses
54 stdin_text+=" %s \n" % nb_mc_masses
55@@ -2372,7 +2373,7 @@
56 #no decays for this production mode, run in passthrough mode, only adding the helicities to the events
57 nb_mc_masses=0
58 p, p_str=self.curr_event.give_momenta(event_map)
59- stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, 1.0)
60+ stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, 1.0, self.options['frame_id'])
61 stdin_text+=p_str
62 # here I also need to specify the Monte Carlo Masses
63 stdin_text+=" %s \n" % nb_mc_masses
64@@ -3277,8 +3278,7 @@
65 """return the max. weight associated with me decay['path']"""
66
67 p, p_str=self.curr_event.give_momenta(event_map)
68-
69- std_in=" %s %s %s %s \n" % ("1",BWcut, self.Ecollider, nbpoints)
70+ std_in=" %s %s %s %s %s \n" % ("1",BWcut, self.Ecollider, nbpoints, self.options['frame_id'])
71 std_in+=p_str
72 max_weight = self.loadfortran('maxweight',
73 path, std_in)
74@@ -3347,7 +3347,7 @@
75 if nb < cut:
76 if key[0]=='full':
77 path=key[1]
78- end_signal="5 0 0 0 \n" # before closing, write down the seed
79+ end_signal="5 0 0 0 0\n" # before closing, write down the seed
80 external.stdin.write(end_signal)
81 ranmar_state=external.stdout.readline()
82 ranmar_file=pjoin(path,'ranmar_state.dat')
83@@ -3921,7 +3921,8 @@
84
85 self.cross = 0
86 self.error = 0
87- if 'init' in self.banner and (eff!=1 or not any(v==-1 for v in self.br_per_id.values())):
88+ if 'init' in self.banner and (eff!=1 or not any(v==-1 for v in self.br_per_id.values())) \
89+ and not self.options['onlyhelicity']:
90 new_init =''
91 curr_proc = 0
92 has_missing=False
93@@ -3961,7 +3962,7 @@
94 external.terminate()
95 del external
96 elif mode=='full':
97- stdin_text="5 0 0 0 \n" # before closing, write down the seed
98+ stdin_text="5 0 0 0 0\n" # before closing, write down the seed
99 external = self.calculator[('full',path)]
100 try:
101 external.stdin.write(stdin_text)
102@@ -3988,7 +3989,7 @@
103 except Exception:
104 pass
105 else:
106- stdin_text="5 0 0 0"
107+ stdin_text="5 0 0 0 0"
108 external.stdin.write(stdin_text)
109 external.stdin.close()
110 external.stdout.close()
111
112=== modified file 'MadSpin/interface_madspin.py'
113--- MadSpin/interface_madspin.py 2018-10-31 10:07:53 +0000
114+++ MadSpin/interface_madspin.py 2020-05-23 19:29:41 +0000
115@@ -75,7 +75,7 @@
116 self.add_param('cross_section', {'__type__':0.}, comment="forcing normalization of cross-section after MS (for none/onshell)" )
117 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")
118 self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner'])
119-
120+ self.add_param('frame_id', 6)
121
122 ############################################################################
123 ## Special post-processing of the options ##
124@@ -211,7 +211,7 @@
125 # Read the banner of the inputfile
126 self.events_file = open(os.path.realpath(inputfile))
127 self.banner = banner.Banner(self.events_file)
128-
129+
130
131 # Check the validity of the banner:
132 if 'slha' not in self.banner:
133@@ -226,14 +226,21 @@
134 raise self.InvalidCmd('This event file was already decayed by MS. This is not possible to add to it a second decay')
135
136 if 'mgruncard' in self.banner:
137+ run_card = self.banner.charge_card('run_card')
138 if not self.options['Nevents_for_max_weigth']:
139- nevents = int(self.banner.get_detail('run_card', 'nevents'))
140+ nevents = run_card['nevents']
141 N_weight = max([75, int(3*nevents**(1/3))])
142 self.options['Nevents_for_max_weigth'] = N_weight
143 N_sigma = max(4.5, math.log(nevents,7.7))
144 self.options['nb_sigma'] = N_sigma
145 if self.options['BW_cut'] == -1:
146 self.options['BW_cut'] = float(self.banner.get_detail('run_card', 'bwcutoff'))
147+
148+ if isinstance(run_card, banner.RunCardLO):
149+ run_card.update_system_parameter_for_include()
150+ self.options['frame_id'] = run_card['frame_id']
151+ else:
152+ self.options['frame_id'] = 6
153 else:
154 if not self.options['Nevents_for_max_weigth']:
155 self.options['Nevents_for_max_weigth'] = 75
156@@ -313,7 +320,6 @@
157 if model_name in line:
158 final_model = True
159
160-
161
162 def import_model(self, args):
163 """syntax: import model NAME CARD_PATH
164@@ -400,6 +406,12 @@
165 #if self.model and not self.model['case_sensitive']:
166 # decaybranch = decaybranch.lower()
167
168+ if self.options['spinmode'] != 'full' and '{' in decaybranch:
169+ if self.options['spinmode'] == 'none':
170+ 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).")
171+ else:
172+ 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.")
173+
174 decay_process, init_part = self.decay.reorder_branch(decaybranch)
175 if not self.list_branches.has_key(init_part):
176 self.list_branches[init_part] = []
177@@ -585,14 +597,16 @@
178 self.check_launch(args)
179 for part in self.list_branches.keys():
180 if part in self.mg5cmd._multiparticles:
181+
182 if any(pid in self.final_state for pid in self.mg5cmd._multiparticles[part]):
183 break
184- pid = self.mg5cmd._curr_model.get('name2pdg')[part]
185- if pid in self.final_state:
186- break
187-# else:
188-# logger.info("Nothing to decay ...")
189-# return
190+ else:
191+ pid = self.mg5cmd._curr_model.get('name2pdg')[part]
192+ if pid in self.final_state:
193+ break
194+ else:
195+ logger.info("Nothing to decay ...")
196+ return
197
198
199 model_line = self.banner.get('proc_card', 'full_model_line')
200@@ -801,6 +815,7 @@
201 elif self.options['input_format'] in ['hepmc']:
202 import madgraph.various.hepmc_parser as hepmc_parser
203 orig_lhe = hepmc_parser.HEPMC_EventFile(filename)
204+ orig_lhe.allow_empty_event = True
205 logger.info("Parsing input event to know how many decay to generate. This can takes few minuts.")
206 else:
207 raise Exception
208@@ -1067,8 +1082,13 @@
209 if len(hepmc_output) == 0:
210 hepmc_output.append(lhe_parser.Particle(event=hepmc_output))
211 hepmc_output[0].color2 = 0
212+ hepmc_output[0].status = -1
213+ hepmc_output.nexternal+=1
214 decayed_particle = lhe_parser.Particle(particle, hepmc_output)
215+ decayed_particle.mother1 = hepmc_output[0]
216+ decayed_particle.mother2 = hepmc_output[0]
217 hepmc_output.append(decayed_particle)
218+ hepmc_output.nexternal+=1
219 decayed_particle.add_decay(decay)
220 # change the weight associate to the event
221 if self.options['new_wgt'] == 'cross-section':
222@@ -1086,7 +1106,6 @@
223 else:
224 hepmc_output.wgt = event.wgt
225 hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal
226- hepmc_output.assign_mother()
227 output_lhe.write(str(hepmc_output))
228 else:
229 if counter==0:
230@@ -1226,7 +1245,11 @@
231 pass
232 self.me_int[decay_dir] = me5_cmd
233 if self.options["run_card"]:
234- run_card = self.run_card
235+ if hasattr(self, 'run_card'):
236+ run_card = self.run_card
237+ else:
238+ self.run_card = banner.RunCard(self.options["run_card"])
239+ run_card = self.run_card
240 else:
241 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))
242 run_card["nevents"] = int(1.2*nb_event)
243@@ -1400,6 +1423,7 @@
244 if name not in self.list_branches or len(self.list_branches[name]) == 0:
245 continue
246 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.")
247+
248 self.branching_ratio = br
249 self.efficiency = 1
250 self.cross, self.error = self.banner.get_cross(witherror=True)
251@@ -1417,7 +1441,6 @@
252 #4. determine the maxwgt
253 maxwgt = self.get_maxwgt_for_onshell(orig_lhe, evt_decayfile)
254
255-
256 #5. generate the decay
257 orig_lhe.seek(0)
258 output_lhe = lhe_parser.EventFile(orig_lhe.name.replace('.lhe', '_decayed.lhe'), 'w')
259@@ -1435,8 +1458,10 @@
260 for curr_event,production in enumerate(orig_lhe):
261 if self.options['fixed_order']:
262 production, counterevt= production[0], production[1:]
263- if curr_event and curr_event % 1000 == 0 and float(str(curr_event)[1:]) ==0:
264- print "decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start)
265+ if curr_event and self.efficiency and curr_event % 10 == 0 and float(str(curr_event)[1:]) ==0:
266+ logger.info("decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start))
267+ else:
268+ logger.info("next event [%s]", time.time()-start)
269 while 1:
270 nb_try +=1
271 decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event)
272@@ -1531,6 +1556,9 @@
273 # event_decay is a dict pdg -> list of event file (contain the decay)
274
275
276+ if self.options['ms_dir'] and os.path.exists(pjoin(self.options['ms_dir'], 'max_wgt')):
277+ return float(open(pjoin(self.options['ms_dir'], 'max_wgt'),'r').read())
278+
279 nevents = self.options['Nevents_for_max_weigth']
280 if nevents == 0 :
281 nevents = 75
282@@ -1540,7 +1568,6 @@
283 logger.info("*****************************")
284 logger.info("Probing the first %s events with %s phase space points" % (nevents, self.options['max_weight_ps_point']))
285
286-
287 self.efficiency = 1. / self.options['max_weight_ps_point']
288 start = time.time()
289 for i in range(nevents):
290@@ -1553,7 +1580,7 @@
291 base_event = base_event[0]
292 for j in range(self.options['max_weight_ps_point']):
293 decays = self.get_decay_from_file(base_event, evt_decayfile, nevents-i)
294- #carefull base_event is modified by the following function
295+ #carefull base_event is modified by the following function
296 _, wgt = self.get_onshell_evt_and_wgt(base_event, decays)
297 maxwgt = max(wgt, maxwgt)
298 all_maxwgt.append(maxwgt)
299@@ -1569,10 +1596,13 @@
300 if len(all_maxwgt) < i:
301 break
302 ave_weight, std_weight = decay_tools.get_mean_sd(all_maxwgt[:i])
303+ #misc.sprint(ave_weight, std_weight)
304 base_max_weight = max(base_max_weight, 1.05 * (ave_weight+self.options['nb_sigma']*std_weight))
305
306 if all_maxwgt[1] > base_max_weight:
307 base_max_weight = 1.05 * all_maxwgt[1]
308+ if self.options['ms_dir']:
309+ open(pjoin(self.options['ms_dir'], 'max_wgt'),'w').write(str(base_max_weight))
310 return base_max_weight
311
312
313@@ -1594,13 +1624,11 @@
314 raise
315 import copy
316
317-
318 if hasattr(production, 'me_wgt'):
319 production_me = production.me_wgt
320 else:
321 production_me = self.calculate_matrix_element(production)
322 production.me_wgt = production_me
323-
324 decay_me = 1.0
325 for pdg in decays:
326 for dec in decays[pdg]:
327@@ -1628,7 +1656,6 @@
328 final = tuple(-i for i in final)
329 tag = (init, final)
330 orig_order = self.all_me[tag]['order']
331-
332 pdir = self.all_me[tag]['pdir']
333 if pdir in self.all_f2py:
334 p = event.get_momenta(orig_order)
335@@ -1643,11 +1670,15 @@
336
337 mymod = __import__("%s.matrix2py" % (pdir))
338 reload(mymod)
339- mymod = getattr(mymod, 'matrix2py')
340+ mymod = getattr(mymod, 'matrix2py')
341 with misc.chdir(pjoin(self.path_me, 'madspin_me', 'SubProcesses', pdir)):
342 with misc.stdchannel_redirected(sys.stdout, os.devnull):
343- mymod.initialisemodel(pjoin(self.path_me, 'Cards','param_card.dat'))
344- self.all_f2py[pdir] = mymod.get_value
345+ if not os.path.exists(pjoin(self.path_me, 'Cards','param_card.dat')) and \
346+ os.path.exists(pjoin(self.path_me,'param_card.dat')):
347+ mymod.initialisemodel(pjoin(self.path_me,'param_card.dat'))
348+ else:
349+ mymod.initialisemodel(pjoin(self.path_me, 'Cards','param_card.dat'))
350+ self.all_f2py[pdir] = mymod.get_value
351 return self.calculate_matrix_element(event)
352
353
354
355=== modified file 'MadSpin/src/driver.f'
356--- MadSpin/src/driver.f 2018-09-19 09:41:33 +0000
357+++ MadSpin/src/driver.f 2020-05-23 19:29:41 +0000
358@@ -18,7 +18,7 @@
359 INTEGER I,J,K
360 INTEGER HELSET(NEXTERNAL)
361 REAL*8 P(0:3,NEXTERNAL_PROD)
362- REAL*8 PFULL(0:3,NEXTERNAL), Ptrial(0:3,NEXTERNAL)
363+ REAL*8 PFULL(0:3,NEXTERNAL), Ptrial(0:3,NEXTERNAL), P2(0:3,NEXTERNAL)
364 double precision x(36), Ecollider
365 CHARACTER*120 BUFF(NEXTERNAL_PROD)
366 integer iforest(2,-nexternal:-1,N_MAX_CG)
367@@ -39,6 +39,7 @@
368 double precision mean, variance, maxweight,weight,std
369 double precision temp
370 double precision Pprod(0:3,nexternal_prod)
371+
372 integer nb_mc_masses, indices_mc_masses(nexternal)
373 double precision values_mc_masses(nexternal)
374
375@@ -54,6 +55,9 @@
376 double precision BWcut, maxBW
377 common /to_BWcut/BWcut, maxBW
378
379+ integer frame_id
380+ common /to_me_frame/frame_id
381+
382 c Conflicting BW stuff
383 integer cBW_level_max,cBW(-nexternal:-1),cBW_level(-nexternal:-1)
384 double precision cBW_mass(-nexternal:-1,-1:1),
385@@ -94,7 +98,6 @@
386 read(56,*) P_seed
387 close(56)
388 iseed = iseed + P_seed
389-
390 cccccccccccccccccccccccccccccccccccccccccccccccccccc
391 c I. read momenta for the production events
392 c
393@@ -112,7 +115,7 @@
394
395 1 continue
396 maxBW=0d0
397- read(*,*) mode, BWcut, Ecollider, temp
398+ read(*,*) mode, BWcut, Ecollider, temp, frame_id
399
400
401 if (mode.eq.1) then ! calculate the maximum weight
402@@ -255,13 +258,14 @@
403
404 cycle
405 endif
406- !do j=1,nexternal
407- ! write (*,*) (pfull(k,j), k=0,3)
408- !enddo
409- call SMATRIX(pfull,M_full)
410- call SMATRIX_PROD(pprod,M_prod)
411-c write(*,*) 'M_full ', M_full
412-c write(*,*) 'jac',jac
413+
414+ call boost_to_frame(pfull, frame_id, P2)
415+ call SMATRIX(P2,M_full)
416+
417+ call boost_to_frame_prod(pprod, frame_id,nexternal_prod, P2)
418+ call SMATRIX_PROD(P2,M_prod)
419+
420+
421
422 weight=M_full*jac/M_prod
423 if (weight.gt.maxweight) then
424@@ -335,7 +339,6 @@
425 do i = 1, 3*(nexternal-nexternal_prod)+1
426 call ntuple(x(i),0d0,1d0,i,1)
427 enddo
428-
429 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res)
430 if (jac.lt.0d0) then
431 counter2=counter2+1
432@@ -366,8 +369,14 @@
433
434 cycle
435 endif
436- call SMATRIX(pfull,M_full)
437- call SMATRIX_PROD(pprod,M_prod)
438+
439+ call boost_to_frame(pfull, frame_id, P2)
440+ call SMATRIX(P2,M_full)
441+
442+
443+ call boost_to_frame_prod(pprod, frame_id,nexternal_prod, P2)
444+ call SMATRIX_PROD(P2,M_prod)
445+
446
447 weight=M_full*jac/M_prod
448
449@@ -1892,3 +1901,162 @@
450 END
451
452
453+
454+
455+c======================================================================
456+C Subroutine to return momenta in a dedicated frame
457+C frame_id is the tag of the particle to put at rest
458+C frame_id follow the convention of cluster.f (sum 2**(N-1))
459+C -----------------------------------------
460+
461+ subroutine boost_to_frame(P1, frame_id, P2)
462+
463+ implicit none
464+
465+ include 'nexternal.inc'
466+
467+ DOUBLE PRECISION P1(0:3,NEXTERNAL)
468+ DOUBLE PRECISION P2(0:3,NEXTERNAL)
469+ DOUBLE PRECISION PBOOST(0:3)
470+ integer frame_id
471+
472+ integer ids(nexternal)
473+ integer i,j
474+ Pboost(0)= 0d0
475+ Pboost(1)= 0d0
476+ Pboost(2)= 0d0
477+ Pboost(3)= 0d0
478+
479+c uncompress
480+ call mapid(frame_id, ids)
481+c find the boost momenta --sum of particles--
482+ do i=1,nexternal
483+ if (ids(i).eq.1)then
484+c write (999,*) (Pboost(j), j=0,3)
485+ do j=0,3
486+ Pboost(j) = Pboost(j) + P1(j,i)
487+ enddo
488+ endif
489+ enddo
490+ do j=1,3
491+ Pboost(j) = -1 * Pboost(j)
492+ enddo
493+
494+c write (999,*) (Pboost(j), j=0,3)
495+ do i=1, nexternal
496+ call boostx(p1(0,i), pboost, p2(0,i))
497+ enddo
498+ return
499+ end
500+
501+
502+
503+
504+c========================================================================
505+
506+
507+ subroutine mapid(id,ids)
508+c**************************************************************************
509+c input:
510+c id compressed particle id
511+c ids array of particle ids
512+c**************************************************************************
513+ implicit none
514+ include 'nexternal.inc'
515+ integer i, icd, id, ids(nexternal)
516+
517+ icd=id
518+ do i=1,nexternal
519+ ids(i)=0
520+ if (btest(id,i)) then
521+ ids(i)=1
522+ endif
523+c write(*,*) 'cluster.f: uncompressed code ',i,' is ',ids(i)
524+ enddo
525+
526+ return
527+ end
528+
529+
530+
531+
532+C -----------------------------------------
533+
534+ subroutine boost_to_frame_prod(P1, frame_id, nexternal_prod, P2)
535+
536+ implicit none
537+
538+ include 'nexternal.inc'
539+
540+ DOUBLE PRECISION P1(0:3,*)
541+ DOUBLE PRECISION P2(0:3,*)
542+ DOUBLE PRECISION PBOOST(0:3)
543+ integer frame_id, nexternal_prod
544+
545+ integer ids(nexternal_prod)
546+ integer i,j
547+ Pboost(0)= 0d0
548+ Pboost(1)= 0d0
549+ Pboost(2)= 0d0
550+ Pboost(3)= 0d0
551+
552+c uncompress
553+ call mapid_prod(frame_id, ids,nexternal_prod)
554+c find the boost momenta --sum of particles--
555+ do i=1,nexternal_prod
556+ if (ids(i).eq.1)then
557+c write (999,*) (Pboost(j), j=0,3)
558+ do j=0,3
559+ Pboost(j) = Pboost(j) + P1(j,i)
560+ enddo
561+ endif
562+ enddo
563+ do j=1,3
564+ Pboost(j) = -1 * Pboost(j)
565+ enddo
566+
567+c write (999,*) (Pboost(j), j=0,3)
568+ do i=1, nexternal_prod
569+ call boostx(p1(0,i), pboost, p2(0,i))
570+ enddo
571+ return
572+ end
573+
574+
575+
576+
577+
578+
579+
580+
581+ subroutine mapid_prod(id,ids,nexternal_prod)
582+c**************************************************************************
583+c input:
584+c id compressed particle id
585+c ids array of particle ids
586+c**************************************************************************
587+ implicit none
588+ include 'nexternal.inc'
589+ integer i, icd, id, nexternal_prod, ids(nexternal_prod)
590+
591+ icd=id
592+ do i=1,nexternal_prod
593+ ids(i)=0
594+ if (btest(id,i)) then
595+ ids(i)=1
596+ endif
597+c write(*,*) 'cluster.f: uncompressed code ',i,' is ',ids(i)
598+ enddo
599+
600+ return
601+ end
602+
603+
604+
605+
606+
607+
608+
609+
610+
611+
612
613=== modified file 'Template/Common/Cards/delphes_card_ATLAS.dat'
614--- Template/Common/Cards/delphes_card_ATLAS.dat 2017-05-19 20:52:51 +0000
615+++ Template/Common/Cards/delphes_card_ATLAS.dat 2020-05-23 19:29:41 +0000
616@@ -405,11 +405,10 @@
617 # add InputArray InputArray
618 add InputArray ECal/ecalTowers
619 add InputArray HCal/hcalTowers
620+ add InputArray MuonMomentumSmearing/muons
621 set OutputArray towers
622 }
623
624-
625-
626 ####################
627 # Energy flow merger
628 ####################
629
630=== modified file 'Template/Common/Cards/delphes_card_CMS.dat'
631--- Template/Common/Cards/delphes_card_CMS.dat 2017-05-19 20:52:51 +0000
632+++ Template/Common/Cards/delphes_card_CMS.dat 2020-05-23 19:29:41 +0000
633@@ -168,7 +168,7 @@
634 # set ResolutionFormula {resolution formula as a function of eta and energy}
635
636 # resolution formula for electrons
637- # based on arXiv:1405.6569
638+ # based on arXiv:1502.02701
639 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +
640 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +
641 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}
642
643=== modified file 'Template/Common/Cards/delphes_card_default.dat'
644--- Template/Common/Cards/delphes_card_default.dat 2017-05-19 20:52:51 +0000
645+++ Template/Common/Cards/delphes_card_default.dat 2020-05-23 19:29:41 +0000
646@@ -168,7 +168,7 @@
647 # set ResolutionFormula {resolution formula as a function of eta and energy}
648
649 # resolution formula for electrons
650- # based on arXiv:1405.6569
651+ # based on arXiv:1502.02701
652 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +
653 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +
654 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}
655
656=== modified file 'Template/LO/Cards/run_card.dat'
657--- Template/LO/Cards/run_card.dat 2018-05-29 13:11:53 +0000
658+++ Template/LO/Cards/run_card.dat 2020-05-23 19:29:41 +0000
659@@ -14,10 +14,6 @@
660 # To display more options, you can type the command: *
661 # update full_run_card *
662 #*********************************************************************
663-#
664-#*******************
665-# Running parameters
666-#*******************
667 #
668 #*********************************************************************
669 # Tag name for the run (one word) *
670@@ -26,7 +22,6 @@
671 #*********************************************************************
672 # Number of events and rnd seed *
673 # Warning: Do not generate more than 1M events in a single run *
674-# If you want to run Pythia, avoid more than 50k events in a run. *
675 #*********************************************************************
676 %(nevents)s = nevents ! Number of unweighted events requested
677 %(iseed)s = iseed ! rnd seed (0=assigned automatically=default))
678@@ -40,6 +35,7 @@
679 %(ebeam1)s = ebeam1 ! beam 1 total energy in GeV
680 %(ebeam2)s = ebeam2 ! beam 2 total energy in GeV
681 $beam_pol
682+$frame
683 #*********************************************************************
684 # PDF CHOICE: this automatically fixes also alpha_s and its evol. *
685 #*********************************************************************
686@@ -61,20 +57,9 @@
687 #*********************************************************************
688 %(gridpack)s = gridpack !True = setting up the grid pack
689 %(time_of_flight)s = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)
690- %(lhe_version)s = lhe_version ! Change the way clustering information pass to shower.
691- %(clusinfo)s = clusinfo ! include clustering tag in output
692 %(event_norm)s = event_norm ! average/sum. Normalization of the weight in the LHEF
693-
694-#*********************************************************************
695-# Matching parameter (MLM only)
696-#*********************************************************************
697- %(ickkw)s = ickkw ! 0 no matching, 1 MLM
698- %(alpsfact)s = alpsfact ! scale factor for QCD emission vx
699- %(chcluster)s = chcluster ! cluster only according to channel diag
700- %(asrwgtflavor)s = asrwgtflavor ! highest quark flavor for a_s reweight
701- %(auto_ptj_mjj)s = auto_ptj_mjj ! Automatic setting of ptj and mjj if xqcut >0
702- ! (turn off for VBF and single top processes)
703- %(xqcut)s = xqcut ! minimum kt jet measure between partons
704+$MLM
705+$CKKW
706 #*********************************************************************
707 #
708 #*********************************************************************
709@@ -99,10 +84,10 @@
710 # BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$$" and decay
711 #*********************************************************************
712 %(bwcutoff)s = bwcutoff ! (M+/-bwcutoff*Gamma)
713-#*********************************************************************
714-# Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not
715-# (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply)
716-#*********************************************************************
717+#IF(d)# #*********************************************************************
718+#IF(d)# # Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not
719+#IF(d)# # (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply)
720+#IF(d)# #*********************************************************************
721 %(cut_decays)s = cut_decays ! Cut decay products
722 #*********************************************************************
723 # Standard Cuts *
724@@ -121,24 +106,12 @@
725 %(missetmax)s = missetmax ! maximum missing Et (sum of neutrino's momenta)
726 %(pt_min_pdg)s = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle
727 %(pt_max_pdg)s = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50})
728-#*********************************************************************
729-# Minimum and maximum E's (in the center of mass frame) *
730-#*********************************************************************
731- %(ej)s = ej ! minimum E for the jets
732- %(eb)s = eb ! minimum E for the b
733- %(ea)s = ea ! minimum E for the photons
734- %(el)s = el ! minimum E for the charged leptons
735- %(ejmax)s = ejmax ! maximum E for the jets
736- %(ebmax)s = ebmax ! maximum E for the b
737- %(eamax)s = eamax ! maximum E for the photons
738- %(elmax)s = elmax ! maximum E for the charged leptons
739- %(e_min_pdg)s = e_min_pdg ! E cut for other particles (use pdg code). Applied on particle and anti-particle
740- %(e_max_pdg)s = e_max_pdg ! E cut for other particles (syntax e.g. {6: 100, 25: 50})
741+$ecut
742 #*********************************************************************
743 # Maximum and minimum absolute rapidity (for max, -1 means no cut) *
744 #*********************************************************************
745- %(etaj)s = etaj ! max rap for the jets
746- %(etab)s = etab ! max rap for the b
747+ %(etaj)s = etaj ! max rap for the jets
748+ %(etab)s = etab ! max rap for the b
749 %(etaa)s = etaa ! max rap for the photons
750 %(etal)s = etal ! max rap for the charged leptons
751 %(etajmin)s = etajmin ! min rap for the jets
752@@ -172,8 +145,8 @@
753 %(dralmax)s = dralmax ! maxdistance between gamma and lepton
754 #*********************************************************************
755 # Minimum and maximum invariant mass for pairs *
756-# WARNING: for four lepton final state mmll cut require to have *
757-# different lepton masses for each flavor! *
758+#IF(llll)# # WARNING: for four lepton final state mmll cut require to have *
759+#IF(llll)# # different lepton masses for each flavor! *
760 #*********************************************************************
761 %(mmjj)s = mmjj ! min invariant mass of a jet pair
762 %(mmbb)s = mmbb ! min invariant mass of a b pair
763@@ -186,14 +159,14 @@
764 %(mxx_min_pdg)s = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})
765 %(mxx_only_part_antipart)s = mxx_only_part_antipart ! if True the invariant mass is applied only
766 ! to pairs of particle/antiparticle and not to pairs of the same pdg codes.
767-#*********************************************************************
768-# Minimum and maximum invariant mass for all letpons *
769-#*********************************************************************
770+#IF(LL)# #*********************************************************************
771+#IF(LL)# # Minimum and maximum invariant mass for all letpons *
772+#IF(LL)# #*********************************************************************
773 %(mmnl)s = mmnl ! min invariant mass for all letpons (l+- and vl)
774 %(mmnlmax)s = mmnlmax ! max invariant mass for all letpons (l+- and vl)
775-#*********************************************************************
776-# Minimum and maximum pt for 4-momenta sum of leptons *
777-#*********************************************************************
778+#IF(LL)# #*********************************************************************
779+#IF(LL)# # Minimum and maximum pt for 4-momenta sum of leptons *
780+#IF(LL)# #*********************************************************************
781 %(ptllmin)s = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)
782 %(ptllmax)s = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)
783 #*********************************************************************
784@@ -204,9 +177,9 @@
785 %(xptb)s = xptb ! minimum pt for at least one b
786 %(xpta)s = xpta ! minimum pt for at least one photon
787 %(xptl)s = xptl ! minimum pt for at least one charged lepton
788-#*********************************************************************
789-# Control the pt's of the jets sorted by pt *
790-#*********************************************************************
791+#IF(jj)# #*********************************************************************
792+#IF(jj)# # Control the pt's of the jets sorted by pt *
793+#IF(jj)# #*********************************************************************
794 %(ptj1min)s = ptj1min ! minimum pt for the leading jet in pt
795 %(ptj2min)s = ptj2min ! minimum pt for the second jet in pt
796 %(ptj3min)s = ptj3min ! minimum pt for the third jet in pt
797@@ -216,9 +189,9 @@
798 %(ptj3max)s = ptj3max ! maximum pt for the third jet in pt
799 %(ptj4max)s = ptj4max ! maximum pt for the fourth jet in pt
800 %(cutuse)s = cutuse ! reject event if fails any (0) / all (1) jet pt cuts
801-#*********************************************************************
802-# Control the pt's of leptons sorted by pt *
803-#*********************************************************************
804+#IF(ll)# #*********************************************************************
805+#IF(ll)# # Control the pt's of leptons sorted by pt *
806+#IF(ll)# #*********************************************************************
807 %(ptl1min)s = ptl1min ! minimum pt for the leading lepton in pt
808 %(ptl2min)s = ptl2min ! minimum pt for the second lepton in pt
809 %(ptl3min)s = ptl3min ! minimum pt for the third lepton in pt
810@@ -227,9 +200,9 @@
811 %(ptl2max)s = ptl2max ! maximum pt for the second lepton in pt
812 %(ptl3max)s = ptl3max ! maximum pt for the third lepton in pt
813 %(ptl4max)s = ptl4max ! maximum pt for the fourth lepton in pt
814-#*********************************************************************
815-# Control the Ht(k)=Sum of k leading jets *
816-#*********************************************************************
817+#IF(JJ)# #*********************************************************************
818+#IF(JJ)# # Control the Ht(k)=Sum of k leading jets *
819+#IF(JJ)# #*********************************************************************
820 %(htjmin)s = htjmin ! minimum jet HT=Sum(jet pt)
821 %(htjmax)s = htjmax ! maximum jet HT=Sum(jet pt)
822 %(ihtmin)s = ihtmin !inclusive Ht for all partons (including b)
823@@ -240,29 +213,21 @@
824 %(ht2max)s = ht2max ! maximum Ht for the two leading jets
825 %(ht3max)s = ht3max ! maximum Ht for the three leading jets
826 %(ht4max)s = ht4max ! maximum Ht for the four leading jets
827-#***********************************************************************
828-# Photon-isolation cuts, according to hep-ph/9801442 *
829-# When ptgmin=0, all the other parameters are ignored *
830-# When ptgmin>0, pta and draj are not going to be used *
831-#***********************************************************************
832- %(ptgmin)s = ptgmin ! Min photon transverse momentum
833- %(r0gamma)s = R0gamma ! Radius of isolation code
834- %(xn)s = xn ! n parameter of eq.(3.4) in hep-ph/9801442
835- %(epsgamma)s = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
836- %(isoem)s = isoEM ! isolate photons from EM energy (photons and leptons)
837-#*********************************************************************
838-# WBF cuts *
839-#*********************************************************************
840+#IF(aj)# #***********************************************************************
841+#IF(aj)# # Photon-isolation cuts, according to hep-ph/9801442 *
842+#IF(aj)# # When ptgmin=0, all the other parameters are ignored *
843+#IF(aj)# # When ptgmin>0, pta and draj are not going to be used *
844+#IF(aj)# #***********************************************************************
845+#IF(aj)# %(ptgmin)s = ptgmin ! Min photon transverse momentum
846+#IF(aj)# %(r0gamma)s = R0gamma ! Radius of isolation code
847+#IF(aj)# %(xn)s = xn ! n parameter of eq.(3.4) in hep-ph/9801442
848+#IF(aj)# %(epsgamma)s = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
849+#IF(aj)# %(isoem)s = isoEM ! isolate photons from EM energy (photons and leptons)
850+#IF(jj)# #*********************************************************************
851+#IF(jj)# # WBF cuts *
852+#IF(jj)# #*********************************************************************
853 %(xetamin)s = xetamin ! minimum rapidity for two jets in the WBF case
854 %(deltaeta)s = deltaeta ! minimum rapidity for two jets in the WBF case
855-#***********************************************************************
856-# Turn on either the ktdurham or ptlund cut to activate *
857-# CKKW(L) merging with Pythia8 [arXiv:1410.3012, arXiv:1109.4829] *
858-#***********************************************************************
859- %(ktdurham)s = ktdurham
860- %(dparameter)s = dparameter
861- %(ptlund)s = ptlund
862- %(pdgs_for_merging_cut)s = pdgs_for_merging_cut ! PDGs for two cuts above
863 #*********************************************************************
864 # maximal pdg code for quark to be considered as a light jet *
865 # (otherwise b cuts are applied) *
866
867=== modified file 'Template/LO/Source/.make_opts'
868--- Template/LO/Source/.make_opts 2017-08-14 08:20:30 +0000
869+++ Template/LO/Source/.make_opts 2020-05-23 19:29:41 +0000
870@@ -49,11 +49,15 @@
871 ifeq ($(FC), ftn)
872 FFLAGS+= -extend-source # for ifort type of compiler
873 else
874-FFLAGS+= -ffixed-line-length-132
875+ VERS="$(shell $(FC) --version | grep ifort -i)"
876+ ifeq ($(VERS), "")
877+ FFLAGS+= -ffixed-line-length-132
878+ else
879+ FFLAGS+= -extend-source # for ifort type of compiler
880+ endif
881 endif
882
883
884-
885 UNAME := $(shell uname -s)
886 ifeq ($(origin LDFLAGS), undefined)
887 LDFLAGS=$(STDLIB) $(MACFLAG)
888
889=== modified file 'Template/LO/Source/BIAS/ptj_bias/makefile'
890--- Template/LO/Source/BIAS/ptj_bias/makefile 2016-08-13 05:32:47 +0000
891+++ Template/LO/Source/BIAS/ptj_bias/makefile 2020-05-23 19:29:41 +0000
892@@ -19,9 +19,5 @@
893 # 'VALID' is the keyword that *must* be returned if everything is in order.
894 #
895 requirements:
896-ifeq ($(shell $(call CHECK_MG5AMC_VERSION,2.4.2)),True)
897 @echo "VALID"
898-else
899- @echo "Error:: MG5aMC is not recent enough (found "$(MG5AMC_VERSION)")"
900- @echo "FAIL"
901-endif
902+
903
904=== modified file 'Template/LO/Source/PDF/PhotonFlux.f'
905--- Template/LO/Source/PDF/PhotonFlux.f 2018-04-20 08:02:12 +0000
906+++ Template/LO/Source/PDF/PhotonFlux.f 2020-05-23 19:29:41 +0000
907@@ -38,19 +38,31 @@
908
909 end
910
911- real*8 function epa_proton(x,q2max)
912+ real*8 function epa_proton(x,q2max,beamid)
913 integer i
914+ integer beamid
915 real*8 x,phi_f
916 real*8 xin
917 real*8 alpha,qz
918 real*8 f, qmi,qma, q2max
919 real*8 PI
920+
921+ integer nb_proton(2), nb_neutron(2)
922+ common/to_heavyion_pdg/ nb_proton, nb_neutron
923+ double precision mass_ion(2)
924+ common/to_heavyion_mass/mass_ion
925+
926 data PI/3.14159265358979323846/
927
928 data xin/0.938/ ! proton mass in GeV
929
930 alpha = .0072992701
931 qz = 0.71
932+
933+ if (nb_proton(beamid).ne.1.or.nb_neutron(beamid).ne.0)then
934+ xin = mass_ion(beamid)
935+ alpha = alpha * nb_proton(beamid)
936+ endif
937
938 C // x = omega/E = (E-E')/E
939 if (x.lt.1) then
940
941=== modified file 'Template/LO/Source/PDF/pdg2pdf.f'
942--- Template/LO/Source/PDF/pdg2pdf.f 2018-03-07 23:11:46 +0000
943+++ Template/LO/Source/PDF/pdg2pdf.f 2020-05-23 19:29:41 +0000
944@@ -58,12 +58,14 @@
945 endif
946
947 ipart=ipdg
948- if(iabs(ipart).eq.21) ipart=0
949- if(iabs(ipart).eq.22) ipart=7
950- iporg=ipart
951-
952+ if(iabs(ipart).eq.21) then
953+ ipart=0
954+ else if(iabs(ipart).eq.22) then
955+ ipart=7
956+ else if(iabs(ipart).eq.7) then
957+ ipart=7
958 c This will be called for any PDG code, but we only support up to 7
959- if(iabs(ipart).gt.7)then
960+ else if(iabs(ipart).gt.7)then
961 write(*,*) 'PDF not supported for pdg ',ipdg
962 write(*,*) 'For lepton colliders, please set the lpp* '//
963 $ 'variables to 0 in the run_card'
964@@ -72,6 +74,7 @@
965 stop 1
966 endif
967
968+ iporg=ipart
969 ireuse = 0
970 do i=1,2
971 c Check if result can be reused since any of last two calls
972@@ -131,7 +134,7 @@
973 if(ih.eq.3) then !from the electron
974 pdg2pdf=epa_electron(x,q2max)
975 elseif(ih .eq. 2) then !from a proton without breaking
976- pdg2pdf=epa_proton(x,q2max)
977+ pdg2pdf=epa_proton(x,q2max,beamid)
978 endif
979 pdflast(iporg,ireuse)=pdg2pdf
980 return
981
982=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf.f'
983--- Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2018-03-07 23:11:46 +0000
984+++ Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2020-05-23 19:29:41 +0000
985@@ -57,6 +57,7 @@
986 ipart=ipdg
987 if(ipart.eq.21) ipart=0
988 if(iabs(ipart).eq.22) ipart=7
989+ if(iabs(ipart).eq.7) ipart=7
990 iporg=ipart
991
992 c This will be called for any PDG code, but we only support up to 7
993
994=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf6.f'
995--- Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2018-03-07 23:11:46 +0000
996+++ Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2020-05-23 19:29:41 +0000
997@@ -24,7 +24,7 @@
998 integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem
999 & ,i_replace,ii,ipartlast(20)
1000 double precision xlast(20),xmulast(20),pdflast(-7:7,20)
1001- double precision epa_proton
1002+ double precision epa_proton, epa_electron
1003 save ihlast,xlast,xmulast,pdflast,imemlast,ipartlast
1004 data ihlast/20*-99/
1005 data ipartlast/20*-99/
1006@@ -54,12 +54,14 @@
1007 endif
1008
1009 ipart=ipdg
1010- if(iabs(ipart).eq.21) ipart=0
1011- if(iabs(ipart).eq.22) ipart=7
1012- iporg=ipart
1013-
1014+ if(iabs(ipart).eq.21) then
1015+ ipart=0
1016+ else if(iabs(ipart).eq.22) then
1017+ ipart=7
1018+ else if (iabs(ipart).eq.7) then
1019+ ipart=7
1020 c This will be called for any PDG code, but we only support up to 7
1021- if(iabs(ipart).gt.7)then
1022+ else if(iabs(ipart).gt.7)then
1023 write(*,*) 'PDF not supported for pdg ',ipdg
1024 write(*,*) 'For lepton colliders, please set the lpp* '//
1025 $ 'variables to 0 in the run_card'
1026@@ -68,6 +70,7 @@
1027 stop 1
1028 endif
1029
1030+ iporg=ipart
1031 c Determine the iset used in lhapdf
1032 call getnset(iset)
1033 if (iset.ne.1) then
1034@@ -136,6 +139,8 @@
1035 pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid))
1036 endif
1037 pdg2pdf=pdg2pdf/x
1038+ else if(ih.eq.3) then !from the electron
1039+ pdg2pdf=epa_electron(x,xmu*xmu)
1040 else if(ih.eq.2) then ! photon from a proton without breaking
1041 pdg2pdf = epa_proton(x,xmu*xmu)
1042 else
1043
1044=== modified file 'Template/LO/Source/dsample.f'
1045--- Template/LO/Source/dsample.f 2017-09-24 21:24:55 +0000
1046+++ Template/LO/Source/dsample.f 2020-05-23 19:29:41 +0000
1047@@ -316,6 +316,7 @@
1048 fx =0d0
1049 wgt=0d0
1050 endif
1051+
1052 if (nzoom .le. 0) then
1053 call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result
1054 else
1055@@ -705,6 +706,7 @@
1056 tmean = 0d0
1057 trmean = 0d0
1058 tsigma = 0d0
1059+ nb_pass_cuts = 0
1060 kn = 0
1061 cur_it = 1
1062 do j=1,ng
1063@@ -1029,7 +1031,7 @@
1064
1065 integer i,j
1066
1067- open(26, file='ftn26',status='unknown')
1068+ open(26, file=name, status='unknown')
1069 write(26,fmt='(4f21.17)') ((grid(2,i,j),i=1,ng),j=1,invar)
1070 write(26,*) twgt, force_max_wgt
1071 c write(26,fmt='(4f21.16)') (alpha(i),i=1,maxconfigs)
1072@@ -1516,7 +1518,7 @@
1073 c
1074 include 'genps.inc'
1075 integer max_events
1076- parameter (max_events=500000) !Maximum # events before get non_zero
1077+ parameter (max_events=5000000) !Maximum # events before get non_zero
1078 c
1079 c Arguments
1080 c
1081@@ -1756,6 +1758,11 @@
1082 if (kn .ge. max_events .and. non_zero .le. 5) then
1083 call none_pass(max_events)
1084 endif
1085+ if (iteration.eq.1) then
1086+ if (nb_pass_cuts.ge.1000 .and. non_zero.eq.0) then
1087+ call none_pass(1000)
1088+ endif
1089+ endif
1090 if (non_zero .ge. events .or. (kn .gt. 200*events .and.
1091 $ non_zero .gt. 5)) then
1092
1093@@ -2267,8 +2274,20 @@
1094 c----
1095 c Begin Code
1096 c----
1097- write(*,*) 'No points passed cuts!'
1098- write(*,*) 'Loosen cuts or increase max_events',max_events
1099+ if (1000.eq.max_events) then
1100+ write(*,*) nb_pass_cuts,
1101+ & ' points passed the cut but all returned zero'
1102+ write(*,*) 'therefore considering this contribution as zero'
1103+ else if (nb_pass_cuts.gt.0.and.nb_pass_cuts.lt.1000)then
1104+ write(*,*) 'only', nb_pass_cuts,
1105+ & ' points passed the cut and they all returned zero'
1106+ write(*,*) 'therefore considering this contribution as zero'
1107+ write(*,*) 'Loosen cuts or increase max_events if you believe this is not zero'
1108+ else
1109+ write(*,*) 'No points passed cuts!'
1110+ write(*,*) 'Loosen cuts or increase max_events',max_events
1111+ endif
1112+
1113 c open(unit=22,file=result_file,status='old',access='append',
1114 c & err=23)
1115 c write(22,222) 'Iteration',0,'Mean: ',0d0,
1116@@ -2540,6 +2559,7 @@
1117
1118 write(*,*) "RESET CUMULATIVE VARIABLE"
1119 non_zero = 0
1120+ nb_pass_cuts = 0
1121 do j=1,maxinvar
1122 do i=1,ng -1
1123 inon_zero = 0
1124
1125=== modified file 'Template/LO/Source/genps.inc'
1126--- Template/LO/Source/genps.inc 2016-04-02 14:23:21 +0000
1127+++ Template/LO/Source/genps.inc 2020-05-23 19:29:41 +0000
1128@@ -38,3 +38,8 @@
1129 double precision hel_jacobian
1130 INTEGER HEL_PICKED
1131 COMMON/HEL_PICKED/HEL_PICKED,hel_jacobian
1132+c**********************************************************************************
1133+c parameters to control is zero-cross section is due to PS or matrix-element
1134+c**********************************************************************************
1135+ integer nb_pass_cuts
1136+ common/cut_efficiency/nb_pass_cuts
1137\ No newline at end of file
1138
1139=== modified file 'Template/LO/Source/run.inc'
1140--- Template/LO/Source/run.inc 2018-02-01 22:30:56 +0000
1141+++ Template/LO/Source/run.inc 2020-05-23 19:29:41 +0000
1142@@ -16,6 +16,9 @@
1143 integer lpp(2)
1144 double precision ebeam(2), xbk(2),q2fact(2)
1145 common/to_collider/ ebeam , xbk ,q2fact, lpp
1146+
1147+ integer frame_id
1148+ common/to_frame_me/frame_id
1149 c
1150 c Number of events
1151 c
1152@@ -91,4 +94,7 @@
1153 double precision mxxmin4pdg(0:25)
1154 logical mxxpart_antipart(1:25)
1155 common/TO_PDG_SPECIFIC_CUT/pdg_cut, ptmin4pdg,ptmax4pdg, Emin4pdg, Emax4pdg, etamin4pdg,
1156- &etamax4pdg, mxxmin4pdg,mxxpart_antipart
1157\ No newline at end of file
1158+ &etamax4pdg, mxxmin4pdg,mxxpart_antipart
1159+
1160+ double precision small_width_treatment
1161+ common/narrow_width/small_width_treatment
1162\ No newline at end of file
1163
1164=== modified file 'Template/LO/Source/transpole.f'
1165--- Template/LO/Source/transpole.f 2016-06-15 22:46:42 +0000
1166+++ Template/LO/Source/transpole.f 2020-05-23 19:29:41 +0000
1167@@ -28,13 +28,24 @@
1168 double precision z,zmin,zmax,xmin,xmax,ez
1169 double precision pole1,width1,x,xc
1170 double precision a,b
1171+c
1172+c small width treatment
1173+c
1174+ double precision small_width_treatment
1175+ common/narrow_width/small_width_treatment
1176 c-----
1177 c Begin Code
1178 c-----
1179 pole=pole1
1180 width=width1
1181+
1182 x = x1
1183 if (pole .gt. 0d0) then
1184+ if (width.lt.pole*small_width_treatment)then
1185+ width = pole * small_width_treatment
1186+ jac = jac * width/width1
1187+ endif
1188+
1189 zmin = atan((-pole)/width)/width
1190 zmax = atan((1d0-pole)/width)/width
1191 if (x .gt. del .and. x .lt. 1d0-del) then
1192@@ -175,7 +186,11 @@
1193 c
1194 double precision pole1,width1,y1,jac
1195 real*8 x
1196-
1197+c
1198+c small width treatment
1199+c
1200+ double precision small_width_treatment
1201+ common/narrow_width/small_width_treatment
1202 c
1203 c Local
1204 c
1205@@ -191,6 +206,10 @@
1206 width=width1
1207 y = y1
1208 if (pole .gt. 0d0) then !BW
1209+ if (width.lt.pole*small_width_treatment)then
1210+ width = pole * small_width_treatment
1211+ jac = jac * width/width1
1212+ endif
1213 zmin = atan((-pole)/width)/width
1214 zmax = atan((1d0-pole)/width)/width
1215 z = atan((y-pole)/width)/width
1216
1217=== modified file 'Template/LO/SubProcesses/cuts.f'
1218--- Template/LO/SubProcesses/cuts.f 2018-01-11 16:16:25 +0000
1219+++ Template/LO/SubProcesses/cuts.f 2020-05-23 19:29:41 +0000
1220@@ -1592,6 +1592,7 @@
1221 m0d = 0.0
1222 m0c = 1.5
1223 m0s = 0.0
1224+ m0b = 4.7
1225 m0t = 172.5
1226 m0w = 80.4
1227 m0z = 91.188
1228
1229=== modified file 'Template/LO/SubProcesses/dummy_fct.f'
1230--- Template/LO/SubProcesses/dummy_fct.f 2018-01-11 16:16:25 +0000
1231+++ Template/LO/SubProcesses/dummy_fct.f 2020-05-23 19:29:41 +0000
1232@@ -86,3 +86,13 @@
1233 shat = x(1)*x(2)*ebeam(1)*ebeam(2)
1234 return
1235 end
1236+
1237+
1238+ logical function dummy_boostframe()
1239+ implicit none
1240+c
1241+c
1242+ dummy_boostframe = .false.
1243+ return
1244+ end
1245+
1246
1247=== modified file 'Template/LO/SubProcesses/genps.f'
1248--- Template/LO/SubProcesses/genps.f 2018-06-27 09:03:22 +0000
1249+++ Template/LO/SubProcesses/genps.f 2020-05-23 19:29:41 +0000
1250@@ -185,7 +185,8 @@
1251 c External function
1252 double precision SumDot
1253 external SumDot
1254-
1255+ logical dummy_boostframe
1256+ external dummy_boostframe
1257 c
1258 c data
1259 c
1260@@ -304,8 +305,12 @@
1261 c First Generate Momentum for initial state particles
1262 c
1263 if (lpp(1).eq.9.or.lpp(2).eq.9)then
1264- p(:,1) = pi1(:)
1265- p(:,2) = pi2(:)
1266+ if (dummy_boostframe())then
1267+ call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))
1268+ else
1269+ p(:,1) = pi1(:)
1270+ p(:,2) = pi2(:)
1271+ endif
1272 else if(nincoming.eq.2) then
1273 call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))
1274 else
1275@@ -840,7 +845,7 @@
1276 m12 = m(itree(2,ibranch))**2
1277 mn2 = m(ibranch-1)**2
1278 c write(*,*) 'Enertering yminmax',sqrt(s1),sqrt(m12),sqrt(mn2)
1279- call yminmax(s1,t,m12,ma2,mb2,mn2,tmin,tmax)
1280+ call yminmax(s1,0d0,m12,ma2,mb2,mn2,tmin,tmax)
1281 c
1282 c Call for 0<x<1
1283 c
1284@@ -1114,6 +1119,7 @@
1285 C This is the G function from Particle Kinematics by
1286 C E. Byckling and K. Kajantie, Chapter 4 p. 91 eqs 5.28
1287 C It is used to determine physical limits for Y based on inputs
1288+C Y is not used in this formula (called with dummy value)
1289 C**************************************************************************
1290 implicit none
1291 c
1292@@ -1258,5 +1264,47 @@
1293 END
1294
1295
1296+C -----------------------------------------
1297+C Subroutine to return momenta in a dedicated frame
1298+C frame_id is the tag of the particle to put at rest
1299+C frame_id follow the convention of cluster.f (sum 2**(N-1))
1300+C -----------------------------------------
1301+
1302+ subroutine boost_to_frame(P1, frame_id, P2)
1303+
1304+ implicit none
1305+
1306+ include 'nexternal.inc'
1307+
1308+ DOUBLE PRECISION P1(0:3,NEXTERNAL)
1309+ DOUBLE PRECISION P2(0:3,NEXTERNAL)
1310+ DOUBLE PRECISION PBOOST(0:3)
1311+ integer frame_id
1312+
1313+ integer ids(nexternal)
1314+ integer i,j
1315+
1316+c uncompress
1317+ call mapid(frame_id, ids)
1318+ pboost(:) = 0d0
1319+ p2(:,:) = 0d0
1320+c find the boost momenta --sum of particles--
1321+ do i=1,nexternal
1322+ if (ids(i).eq.1)then
1323+ do j=0,3
1324+ Pboost(j) = Pboost(j) + P1(j,i)
1325+ enddo
1326+ endif
1327+ enddo
1328+ do j=1,3
1329+ Pboost(j) = -1 * Pboost(j)
1330+ enddo
1331+ do i=1, nexternal
1332+ call boostx(p1(0,i), pboost, p2(0,i))
1333+ enddo
1334+ return
1335+ end
1336+
1337+
1338
1339
1340
1341=== modified file 'Template/LO/SubProcesses/myamp.f'
1342--- Template/LO/SubProcesses/myamp.f 2016-12-17 16:26:56 +0000
1343+++ Template/LO/SubProcesses/myamp.f 2020-05-23 19:29:41 +0000
1344@@ -1,91 +1,3 @@
1345- double precision function testamp(p)
1346-c*****************************************************************************
1347-c Approximates matrix element by propagators
1348-c*****************************************************************************
1349- implicit none
1350-c
1351-c Constants
1352-c
1353- include 'genps.inc'
1354- include 'maxconfigs.inc'
1355- include 'nexternal.inc'
1356- double precision zero
1357- parameter (zero = 0d0)
1358-c
1359-c Arguments
1360-c
1361- double precision p(0:3,nexternal)
1362-c integer iconfig
1363-c
1364-c Local
1365-c
1366- double precision xp(0:3,-nexternal:nexternal)
1367- double precision mpole(-nexternal:0),shat,tsgn
1368- integer i,j,iconfig
1369-
1370- double precision prmass(-nexternal:0,lmaxconfigs)
1371- double precision prwidth(-nexternal:0,lmaxconfigs)
1372- integer pow(-nexternal:0,lmaxconfigs)
1373- logical first_time
1374-c
1375-c Global
1376-c
1377- integer iforest(2,-max_branch:-1,lmaxconfigs)
1378- common/to_forest/ iforest
1379- integer mapconfig(0:lmaxconfigs), this_config
1380- common/to_mconfigs/mapconfig, this_config
1381-
1382- include 'coupl.inc'
1383-c
1384-c External
1385-c
1386- double precision dot
1387-
1388- save prmass,prwidth,pow
1389- data first_time /.true./
1390-c-----
1391-c Begin Code
1392-c-----
1393- iconfig = this_config
1394- if (first_time) then
1395-c include 'props.inc'
1396- first_time=.false.
1397- endif
1398-
1399- do i=1,nexternal
1400- mpole(-i)=0d0
1401- do j=0,3
1402- xp(j,i)=p(j,i)
1403- enddo
1404- enddo
1405-c mpole(-3) = 174**2
1406-c shat = dot(p(0,1),p(0,2))/(1800)**2
1407- shat = dot(p(0,1),p(0,2))/(10)**2
1408-c shat = 1d0
1409- testamp = 1d0
1410- tsgn = +1d0
1411- do i=-1,-(nexternal-3),-1 !Find all the propagotors
1412- if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
1413- do j=0,3
1414- xp(j,i) = xp(j,iforest(1,i,iconfig))
1415- $ +tsgn*xp(j,iforest(2,i,iconfig))
1416- enddo
1417- if (prwidth(i,iconfig) .ne. 0d0 .and. .false.) then
1418- testamp=testamp/((dot(xp(0,i),xp(0,i))
1419- $ -prmass(i,iconfig)**2)**2
1420- $ -(prmass(i,iconfig)*prwidth(i,iconfig))**2)
1421- else
1422- testamp = testamp/((dot(xp(0,i),xp(0,i)) -
1423- $ prmass(i,iconfig)**2)
1424- $ **(pow(i,iconfig)))
1425- endif
1426- testamp=testamp*shat**(pow(i,iconfig))
1427-c write(*,*) i,iconfig,pow(i,iconfig),prmass(i,iconfig)
1428- enddo
1429-c testamp = 1d0/dot(xp(0,-1),xp(0,-1))
1430- testamp=abs(testamp)
1431-c testamp = 1d0
1432- end
1433
1434 logical function cut_bw(p)
1435 c*****************************************************************************
1436@@ -114,6 +26,7 @@
1437
1438 double precision prmass(-nexternal:0,lmaxconfigs)
1439 double precision prwidth(-nexternal:0,lmaxconfigs)
1440+ double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
1441 integer pow(-nexternal:0,lmaxconfigs)
1442 logical first_time, onshell
1443 double precision xmass
1444@@ -152,13 +65,14 @@
1445 c
1446 double precision dot
1447
1448- save prmass,prwidth,pow
1449+ save prmass,prwidth,pow,prwidth_tmp
1450 data first_time /.true./
1451 c-----
1452 c Begin Code
1453 c-----
1454 cut_bw = .false. !Default is we passed the cut
1455 iconfig = this_config
1456+
1457 if (first_time) then
1458 include 'props.inc'
1459 nbw = 0
1460@@ -209,10 +123,12 @@
1461 c write(*,*) 'xmass',xmass,prmass(i,iconfig)
1462 c
1463 c Here we set if the BW is "on-shell" for LesHouches
1464-c
1465+c
1466+ prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
1467+
1468 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
1469- $ bwcutoff*prwidth(i,iconfig).and.
1470- $ (prwidth(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.
1471+ $ bwcutoff*prwidth_tmp(i,iconfig).and.
1472+ $ (prwidth_tmp(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.
1473 $ gForceBW(i,iconfig).eq.1))
1474 if(onshell)then
1475 c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11)
1476@@ -264,10 +180,10 @@
1477 c For decay-chain syntax use BWcutoff here too (22/12/14)
1478 if (gForceBW(i, iconfig).eq.1) then
1479 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
1480- $ bwcutoff*prwidth(i,iconfig))
1481+ $ bwcutoff*prwidth_tmp(i,iconfig))
1482 else
1483 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
1484- $ 5d0*prwidth(i,iconfig))
1485+ $ 5d0*prwidth_tmp(i,iconfig))
1486 endif
1487
1488 if (onshell .and. (lbw(nbw).eq. 2) .or.
1489@@ -313,6 +229,7 @@
1490
1491 double precision prmass(-nexternal:0,lmaxconfigs)
1492 double precision prwidth(-nexternal:0,lmaxconfigs)
1493+ double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
1494 integer pow(-nexternal:0,lmaxconfigs)
1495
1496 integer idup(nexternal,maxproc,maxsproc)
1497@@ -382,11 +299,21 @@
1498
1499 c-----
1500 c Begin Code
1501-c-----
1502+c-----
1503+ iconfig = this_config
1504+c needs to be initialise to avoid segfault
1505+ do i = -nexternal,-1
1506+ prwidth(i,iconfig) = 0
1507+ prmass(i,iconfig) =0
1508+ enddo
1509 include 'props.inc'
1510 c etmin = 10
1511 nt = 0
1512- iconfig = this_config
1513+ do i = -nexternal,-1
1514+ prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
1515+ enddo
1516+
1517+
1518 mtot = 0d0
1519 etot = 0d0 !Total energy needed
1520 spmass = 0d0 !Keep track of BW masses for shat
1521@@ -423,7 +350,7 @@
1522 c Look for identical particles to map radiation processes
1523 call idenparts(iden_part, iforest(1,-max_branch,iconfig),
1524 $ sprop(1,-max_branch,iconfig), gForceBW(-max_branch,iconfig),
1525- $ prwidth(-nexternal,iconfig))
1526+ $ prwidth_tmp(-nexternal,iconfig))
1527
1528 c Start loop over propagators
1529 do i=-1,-(nexternal-3),-1
1530@@ -446,15 +373,15 @@
1531 xm(i)=max(xm(i),max(xqcutij(l1,l2),0d0))
1532 endif
1533 c write(*,*) 'iconfig,i',iconfig,i
1534-c write(*,*) prwidth(i,iconfig),prmass(i,iconfig)
1535- if (prwidth(i,iconfig) .gt. 0 ) then
1536+c write(*,*) prwidth_tmp(i,iconfig),prmass(i,iconfig)
1537+ if (prwidth_tmp(i,iconfig) .gt. 0 ) then
1538 nbw=nbw+1
1539 c JA 6/8/2011 Set xe(i) for resonances
1540 if (gforcebw(i,iconfig).eq.1) then
1541- xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth(i,iconfig))
1542+ xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth_tmp(i,iconfig))
1543 bwcut_for_PS(i) = bwcutoff
1544 else if (lbw(nbw).eq.1) then
1545- xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth(i,iconfig))
1546+ xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth_tmp(i,iconfig))
1547 bwcut_for_PS(i) = 5d0
1548 else
1549 bwcut_for_PS(i) = 5d0
1550@@ -465,19 +392,19 @@
1551 c Either: required onshell and daughter masses too large
1552 c Or: forced and daughter masses too large
1553 c Or: required offshell and forced
1554- if(prwidth(i,iconfig) .gt. 0.and.
1555+ if(prwidth_tmp(i,iconfig) .gt. 0.and.
1556 $ (lbw(nbw).eq.1.and.
1557- $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig).lt.xm(i)
1558- $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig).gt.dsqrt(stot))
1559+ $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig).lt.xm(i)
1560+ $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig).gt.dsqrt(stot))
1561 $ .or.gforcebw(i,iconfig).eq.1.and.
1562- $ prmass(i,iconfig)+bwcutoff*prwidth(i,iconfig).lt.xm(i)
1563+ $ prmass(i,iconfig)+bwcutoff*prwidth_tmp(i,iconfig).lt.xm(i)
1564 $ .or.lbw(nbw).eq.2.and.gforcebw(i,iconfig).eq.1))
1565 $ then
1566 c Write results.dat and quit
1567 call write_null_results()
1568 stop
1569 endif
1570- if (prwidth(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.
1571+ if (prwidth_tmp(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.
1572 if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat
1573 j = 3*(nexternal-2)-4+1 !set i to ndim+1
1574 c-----
1575@@ -489,27 +416,27 @@
1576 $ .or. lbw(nbw).eq.1) then
1577 write(*,*) 'Setting PDF BW',j,nbw,prmass(i,iconfig)
1578 spole(j)=prmass(i,iconfig)*prmass(i,iconfig)/stot
1579- swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot
1580+ swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
1581 endif
1582- else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig)).ge.xm(i)
1583+ else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig)).ge.xm(i)
1584 $ .and. iden_part(i).eq.0 .or. lbw(nbw).eq.1) then
1585 c JA 02/13 Only allow BW if xm below M+5*Gamma
1586 write(*,*) 'Setting BW',i,nbw,prmass(i,iconfig)
1587 spole(-i)=prmass(i,iconfig)*prmass(i,iconfig)/stot
1588- swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot
1589+ swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
1590 endif
1591 c JA 4/1/2011 Set grid in case there is no BW (radiation process)
1592 if (swidth(-i) .eq. 0d0 .and.
1593 $ i.ne.-(nexternal-(nincoming+1)))then
1594 a=prmass(i,iconfig)**2/stot
1595 xo = min(xm(i)**2/stot, 1-1d-8)
1596- if (xo.eq.0d0) xo=1d0/stot
1597+ if (xo.eq.0d0) xo=MIN(10d0/stot, stot/50d0, 0.5)
1598 call setgrid(-i,xo,a,1)
1599 endif
1600 c Set spmass for BWs
1601 if (swidth(-i) .ne. 0d0)
1602 $ spmass=spmass-xm(i) +
1603- $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig))
1604+ $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig))
1605 else !1/x^pow
1606 a=prmass(i,iconfig)**2/stot
1607 c JA 4/1/2011 always set grid
1608@@ -529,8 +456,8 @@
1609 xo = (MMJJ * 0.8)**2/stot
1610 endif
1611 endif
1612- if (xo.eq.0d0) xo=1d0/stot
1613-c if (prwidth(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then
1614+ if (xo.eq.0d0) xo=MIN(10d0/stot, stot/50d0, 0.5)
1615+c if (prwidth_tmp(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then
1616 call setgrid(-i,xo,a,1)
1617 c else
1618 c write(*,*) 'Using flat grid for BW',i,nbw,
1619@@ -574,7 +501,7 @@
1620 c Use 1/10000 of sqrt(s) as minimum, to always get integration
1621 xo = xo*xo/stot
1622 if (xo.eq.0d0)then
1623- xo=1d0/stot
1624+ xo=1/10000d0
1625 write(*,*) 'Warning: No cutoff for shat integral found'
1626 write(*,*) ' Minimum set to ', xo
1627 endif
1628@@ -587,7 +514,7 @@
1629 endif
1630 enddo
1631 c Perform setting for shat (PDF BW or 1/s)
1632- if (abs(lpp(1)) .eq. 1 .or. abs(lpp(2)) .eq. 1) then
1633+ if (abs(lpp(1)) .ge. 1 .or. abs(lpp(2)) .ge. 1) then
1634 c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s)
1635 i = max(1,3*(nexternal-2) - 4 + 1)
1636 xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot)
1637@@ -610,7 +537,7 @@
1638 spole(i)= -2.0d0 ! 1/s pole
1639 write(*,*) "Transforming s_hat 1/s ",i,xo, smin, stot
1640 else
1641- write(*,*) "Transforming s_hat BW ",spole(i),swidth(i)
1642+ write(*,*) "Transforming s_hat BW ",spole(i), max(swidth(i), spole(i)*small_width_treatment)
1643 endif
1644 endif
1645
1646
1647=== modified file 'Template/LO/SubProcesses/reweight.f'
1648--- Template/LO/SubProcesses/reweight.f 2018-07-22 11:40:04 +0000
1649+++ Template/LO/SubProcesses/reweight.f 2020-05-23 19:29:41 +0000
1650@@ -316,7 +316,7 @@
1651 ipart(1,imo)=ipart(1,ida2)
1652 ipart(2,imo)=ipart(2,ida2)
1653 endif
1654- else if(idmo.eq.21 .and. abs(idda1).le.6 .and.
1655+ else if(idmo.eq.21.and. abs(idda1).le.6 .and.
1656 $ abs(idda2).le.6) then
1657 c gluon -> quark anti-quark: use both, but take hardest as 1
1658 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
1659@@ -327,6 +327,17 @@
1660 ipart(1,imo)=ipart(1,ida2)
1661 ipart(2,imo)=ipart(1,ida1)
1662 endif
1663+ else if (get_color(idmo).eq.8.and.iabs(get_color(idda1)).eq.3.and.
1664+ $ iabs(get_color(idda2)).eq.3) then
1665+c gluon' -> quark' anti-quark': use both, but take hardest as 1
1666+ if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
1667+ $ p(1,ipart(1,ida2))**2+p(2,ipart(1,ida2))**2) then
1668+ ipart(1,imo)=ipart(1,ida1)
1669+ ipart(2,imo)=ipart(1,ida2)
1670+ else
1671+ ipart(1,imo)=ipart(1,ida2)
1672+ ipart(2,imo)=ipart(1,ida1)
1673+ endif
1674 else if(idmo.eq.21.and.(idda1.eq.21.or.idda2.eq.21))then
1675 if(idda1.eq.21) then
1676 iddgluon = idda1
1677@@ -380,10 +391,32 @@
1678 c exotic q > Scalar q'
1679 ipart(1,imo)=ipart(1,ida2)
1680 ipart(2,imo)=0
1681- else if (get_color(idmo).eq.1) then
1682+ else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda2)).eq.8.and.iabs(get_color(idda1)).eq.3) then
1683+c exotic q > q' gluon
1684+ ipart(1,imo)=ipart(1,ida2)
1685+ ipart(2,imo)=0
1686+ else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda2)).eq.3.and.get_color(idda1).eq.8) then
1687+c exotic q > gluon q'
1688+ ipart(1,imo)=ipart(1,ida1)
1689+ ipart(2,imo)=0
1690+ 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
1691 c Color singlet
1692 ipart(1,imo)=ipart(1,ida1)
1693 ipart(2,imo)=ipart(1,ida2)
1694+ else if (abs(get_color(idmo)).eq.3.and.abs(get_color(idda1)).eq.3.and.abs(get_color(idda2)).eq.3)then
1695+c EPSILON^IJK color structure -- handle it as photon emission --
1696+ ipart(1,imo)=ipart(1,ida1)
1697+ ipart(2,imo)=0
1698+ else if (abs(get_color(idmo)).eq.6.and.abs(get_color(idda1)).eq.3.and.abs(get_color(idda2)).eq.3)then
1699+c sextet -> (anti-)quark (anti-)quark': use both, but take hardest as 1
1700+ if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
1701+ $ p(1,ipart(1,ida2))**2+p(2,ipart(1,ida2))**2) then
1702+ ipart(1,imo)=ipart(1,ida1)
1703+ ipart(2,imo)=ipart(1,ida2)
1704+ else
1705+ ipart(1,imo)=ipart(1,ida2)
1706+ ipart(2,imo)=ipart(1,ida1)
1707+ endif
1708 else
1709 write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2)
1710 write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale"
1711@@ -641,12 +674,12 @@
1712 C If we have fixed factorization scale, for ickkw>0 means central
1713 C scale, i.e. last two scales (ren. scale for these vertices are
1714 C anyway already set by "scale" above)
1715- if(ickkw.gt.0) then
1716- if(fixed_fac_scale.and.first)then
1717+ if (first) then
1718 q2bck(1)=q2fact(1)
1719 q2bck(2)=q2fact(2)
1720 first=.false.
1721- else if(fixed_fac_scale) then
1722+ else if(ickkw.gt.0) then
1723+ if(fixed_fac_scale) then
1724 q2fact(1)=q2bck(1)
1725 q2fact(2)=q2bck(2)
1726 endif
1727@@ -775,15 +808,17 @@
1728 c Check QCD jet, take care so not a decay
1729 if(.not.isjetvx(imocl(n),idacl(n,1),idacl(n,2),
1730 $ ipdgcl(1,igraphs(1),iproc),ipart,n.eq.nexternal-2)) then
1731+ pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
1732+ pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
1733+ pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
1734+ if (isqcd(pdgm).and.isqcd(pdgid1).and.isqcd(pdgid2))then
1735+ continue
1736 c Remove non-gluon jets that lead up to non-jet vertices
1737- if(ipart(1,imocl(n)).gt.2)then ! ipart(1) set and not IS line
1738+ elseif(ipart(1,imocl(n)).gt.2)then ! ipart(1) set and not IS line
1739 c The ishft gives the FS particle corresponding to imocl
1740 if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then
1741 ! split case for q a > q and for g > g h (with the gluon splitting into quark)
1742 ! also check for case of three scalar interaction (then do nothing)
1743- pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
1744- pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
1745- pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
1746 if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then
1747 ! this is to avoid to do weird stuff for w+ w- z (or h h h)
1748 ! this fix an issue for qq_zttxqq G1594.08
1749@@ -955,7 +990,7 @@
1750 $ '. Have jets (>0)',(iqjets(i),i=1,nexternal),
1751 $ ', should be ',
1752 $ (iqjetstore(i,iconfig),i=1,njetstore(iconfig))
1753- stop
1754+ stop 4
1755 endif
1756 if (btest(mlevel,3))
1757 $ write(*,*) 'Bad clustering, jets fail. Reclustering ',
1758@@ -1697,6 +1732,10 @@
1759 if (btest(mlevel,3))
1760 $ write(*,*)' set fact scales for PS to ',
1761 $ sqrt(q2fact(1)),sqrt(q2fact(2))
1762+ else if (abs(lpp(1)).eq.2.or.abs(lpp(1)).eq.3) then
1763+ q2fact(1)=q2bck(1)
1764+ else if (abs(lpp(2)).eq.2.or.abs(lpp(2)).eq.3) then
1765+ q2fact(2)=q2bck(2)
1766 endif
1767
1768 if (btest(mlevel,3)) then
1769
1770=== modified file 'Template/LO/SubProcesses/setcuts.f'
1771--- Template/LO/SubProcesses/setcuts.f 2018-03-11 12:10:19 +0000
1772+++ Template/LO/SubProcesses/setcuts.f 2020-05-23 19:29:41 +0000
1773@@ -664,14 +664,21 @@
1774 endif
1775 enddo
1776
1777-c ensure symmetry of s_min(i,j)
1778+c ensure symmetry of s_min(i,j) + mass effect
1779 do i=nincoming+1,nexternal-1
1780 do j=nincoming+1,nexternal-1
1781 if(j.lt.i)then
1782- s_min(i,j) = max(s_min(j,i),s_min(i,j))
1783+ s_min(i,j) = max(s_min(j,i), s_min(i,j), (pmass(i)+pmass(j))**2)
1784 endif
1785 enddo
1786 enddo
1787+
1788+c ensure that smin is bigger than mass threshold
1789+ smin_p = 0d0
1790+ do i=nincoming+1, nexternal
1791+ smin_p = smin_p + pmass(i)
1792+ enddo
1793+ smin = max(smin, smin_p**2)
1794 write(*,*) "Define smin to", smin
1795
1796 c Check that results are consistent among all the grouped subprocesses
1797
1798=== modified file 'Template/LO/bin/internal/Gridpack/compile'
1799--- Template/LO/bin/internal/Gridpack/compile 2015-09-28 20:34:44 +0000
1800+++ Template/LO/bin/internal/Gridpack/compile 2020-05-23 19:29:41 +0000
1801@@ -63,7 +63,7 @@
1802
1803 if [[ -d Source ]]; then
1804 cd Source
1805- for i in ../bin/internal/gen_ximprove all ../bin/internal/combine_events; do
1806+ for i in ../bin/internal/gen_ximprove all; do
1807 make $i -j 1 > /dev/null
1808 if [[ $? -ne 0 ]];then
1809 # Make didn't exit successfully
1810
1811=== modified file 'Template/NLO/Cards/FKS_params.dat'
1812--- Template/NLO/Cards/FKS_params.dat 2017-08-04 19:52:15 +0000
1813+++ Template/NLO/Cards/FKS_params.dat 2020-05-23 19:29:41 +0000
1814@@ -153,6 +153,16 @@
1815 0.005d0
1816 ! Default :: 0.005d0
1817 !
1818+! Use a polynomial fit for the virtual corrections. Gets a better accuracy,
1819+! but uses more memmory and disk space.
1820+#UsePolyVirtual
1821+.False.
1822+! Default :: .True.
1823+!
1824+! ==========================================================================
1825+! Combination of matrix elements
1826+! ==========================================================================
1827+!
1828 ! For fixed order calculations only (ignored for (N)LO+PS runs): This
1829 ! parameter determines if parton flavour configurations with idential
1830 ! matrix elements should be separated at the level of the analysis or
1831@@ -170,11 +180,5 @@
1832 ! Default :: .false.
1833 !
1834 ! ==========================================================================
1835-! Arbitrary numerical parameters used in the FKS formalism
1836-! ==========================================================================
1837-!
1838-! To be implemented by the FKS authors
1839-!
1840-! ==========================================================================
1841 ! End of FKS_params.dat file
1842 ! ==========================================================================
1843
1844=== modified file 'Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script'
1845--- Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script 2016-10-26 13:53:02 +0000
1846+++ Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script 2020-05-23 19:29:41 +0000
1847@@ -149,12 +149,15 @@
1848 if [ -f $HWPPPATH/bin/Herwig ]; then HWEXE=Herwig ; fi
1849 HWVER=`$HWPPPATH/bin/$HWEXE --version`
1850 HWVER=($(echo "$HWVER" | sed 's/ / /g'))
1851-HWVER=($(echo ${HWVER[1]} | tr "." "\n"))
1852-HWVER=${HWVER[0]}
1853-if [ "$HWVER" -ge 7 ]; then HWNEW=1 ; HWEXE=Herwig ; fi
1854-if [ "$HWVER" -le 2 ]; then HWNEW=0 ; HWEXE=Herwig++ ; fi
1855+HWVER1=($(echo ${HWVER[1]} | tr "." "\n"))
1856+HWVER2=($(echo ${HWVER1[1]} | tr "." "\n"))
1857+HWVER=$(echo "$HWVER1$HWVER2" | bc)
1858+if [ "$HWVER" -ge 72 ]; then HWNEW=3 ; HWEXE=Herwig ; fi
1859+if [ "$HWVER" -eq 71 ]; then HWNEW=2 ; HWEXE=Herwig ; fi
1860+if [ "$HWVER" -eq 70 ]; then HWNEW=1 ; HWEXE=Herwig ; fi
1861+if [ "$HWVER" -le 69 ]; then HWNEW=0 ; HWEXE=Herwig++ ; fi
1862
1863-if [[ "$PDFCODE" -ne 0 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -eq 1 ]
1864+if [[ "$PDFCODE" -ne 0 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -ge 1 ]
1865 then
1866 HERPDF='EXTPDF'
1867 PDFLIBRARY='LHAPDF'
1868@@ -166,7 +169,7 @@
1869 if [ "$PDFCODE" -gt 1 ]; then PDFSET=$PDFCODE; fi
1870 if [ "$PDFCODE" -lt 0 ]; then LHAOFL=EXTRAPOLATE; fi
1871 if [ "$PDFCODE" -lt -1 ]; then PDFSET=$((PDFCODE*-1)); fi
1872- if [[ "$PDFCODE" -eq 0 && "$HWNEW" -eq 1 ]]; then PDFSET=25000 ; LHAOFL=FREEZE ; fi
1873+ if [[ "$PDFCODE" -eq 0 && "$HWNEW" -ge 1 ]]; then PDFSET=25000 ; LHAOFL=FREEZE ; fi
1874 linklhapdf
1875 # convert PDF number to name reading PDFsets.index
1876 ISLHA5=0
1877@@ -184,7 +187,7 @@
1878 echo 'Unable to understand LHAPDF version!'
1879 exit 1
1880 fi
1881- if [[ "$ISLHA5" -eq 1 && "$HWNEW" -eq 1 ]]
1882+ if [[ "$ISLHA5" -eq 1 && "$HWNEW" -ge 1 ]]
1883 then
1884 echo " Please, use LHAPDF6 with HW7 "
1885 exit 1
1886@@ -282,7 +285,7 @@
1887 HWPPUTIMAKE="HWPPUTI="$HWPPUTI
1888 FORFILEMAKE="FORFILE="$HWPPUTI
1889 HEPMCF=HepMCFortran7.h
1890- if [ "$HWVER" -le 2 ]; then HEPMCF=HepMCFortran2.h; fi
1891+ if [ "$HWVER" -le 69 ]; then HEPMCF=HepMCFortran2.h; fi
1892 cp $thisdir/HWPPAnalyzer/$HEPMCF $thisdir/HWPPAnalyzer/HepMCFortran.h
1893 HWPPANALYZER=HepMCFortran
1894 if ! make -C $thisdir/HWPPAnalyzer $HWPPUTI $HWPPANALYZER.so $HWPPMAKE "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE" "$FORFILEMAKE"
1895@@ -385,6 +388,16 @@
1896 mv $EXEC_NAMEFF $exefile
1897
1898 # create input file
1899+if [ "$HWNEW" -le 1 ]
1900+then
1901+GENERATOR="LHCGenerator"
1902+EXTRACTOR="QCDExtractor"
1903+elif [ "$HWNEW" -ge 2 ]
1904+then
1905+GENERATOR="EventGenerator"
1906+EXTRACTOR="PPExtractor"
1907+fi
1908+
1909 cat <<EOF > ./$ifile
1910 #
1911 # Create the Les Houches handler for MC@NLO
1912@@ -394,35 +407,47 @@
1913
1914 # --------------------------------------------------------------------- #
1915 # 1.) NECESSARY SETTINGS FOR RUNNING WITH MC@NLO EVENTS (DO NOT MODIFY)
1916+EOF
1917
1918+if [ "$HWNEW" -le 1 ]
1919+then
1920+cat <<EOF >> ./$ifile
1921 set /Herwig/Shower/Evolver:HardVetoMode 1
1922 set /Herwig/Shower/Evolver:HardVetoScaleSource 1
1923 set /Herwig/Shower/Evolver:MECorrMode 0
1924-
1925-
1926+EOF
1927+fi
1928+
1929+cat <<EOF >> ./$ifile
1930 # create the Handler & Reader
1931 create ThePEG::LesHouchesFileReader /Herwig/EventHandlers/LHEReader
1932 create ThePEG::LesHouchesEventHandler /Herwig/EventHandlers/LHEHandler
1933 insert /Herwig/EventHandlers/LHEHandler:LesHouchesReaders 0 /Herwig/EventHandlers/LHEReader
1934-
1935+EOF
1936+
1937+
1938+cat <<EOF >> ./$ifile
1939 set /Herwig/EventHandlers/LHEReader:AllowedToReOpen 0
1940 set /Herwig/EventHandlers/LHEReader:MomentumTreatment RescaleEnergy
1941 set /Herwig/EventHandlers/LHEReader:WeightWarnings 0
1942-
1943+EOF
1944+
1945+
1946+cat <<EOF >> ./$ifile
1947 set /Herwig/EventHandlers/LHEHandler:WeightOption VarNegWeight
1948-set /Herwig/EventHandlers/LHEHandler:PartonExtractor /Herwig/Partons/QCDExtractor
1949+set /Herwig/EventHandlers/LHEHandler:PartonExtractor /Herwig/Partons/$EXTRACTOR
1950 set /Herwig/EventHandlers/LHEHandler:CascadeHandler /Herwig/Shower/ShowerHandler
1951 set /Herwig/EventHandlers/LHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler
1952 set /Herwig/EventHandlers/LHEHandler:DecayHandler /Herwig/Decays/DecayHandler
1953-set /Herwig/Generators/LHCGenerator:EventHandler /Herwig/EventHandlers/LHEHandler
1954-set /Herwig/Generators/LHCGenerator:NumberOfEvents $NEVENTS
1955-set /Herwig/Generators/LHCGenerator:RandomNumberGenerator:Seed $RNDEVSEED_HWPP
1956-set /Herwig/Generators/LHCGenerator:PrintEvent $MAXPR_HWPP
1957-set /Herwig/Generators/LHCGenerator:MaxErrors $ERR_NUM_HWPP
1958-set /Herwig/Generators/LHCGenerator:DebugLevel 1
1959+set /Herwig/Generators/$GENERATOR:EventHandler /Herwig/EventHandlers/LHEHandler
1960+set /Herwig/Generators/$GENERATOR:NumberOfEvents $NEVENTS
1961+set /Herwig/Generators/$GENERATOR:RandomNumberGenerator:Seed $RNDEVSEED_HWPP
1962+set /Herwig/Generators/$GENERATOR:PrintEvent $MAXPR_HWPP
1963+set /Herwig/Generators/$GENERATOR:MaxErrors $ERR_NUM_HWPP
1964+set /Herwig/Generators/$GENERATOR:DebugLevel 1
1965 EOF
1966
1967-if [ $HWNEW = 0 ]
1968+if [ "$HWNEW" -eq 0 ]
1969 then
1970 cat <<EOF >> ./$ifile
1971 insert /Herwig/EventHandlers/LHEHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler
1972@@ -430,7 +455,7 @@
1973 fi
1974
1975 whichherpdf $HERPDF
1976-if [[ "$pdftype" -eq 1 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -eq 1 ]
1977+if [[ "$pdftype" -eq 1 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -ge 1 ]
1978 then
1979 cat <<EOF >> ./$ifile
1980 # Define PDF from MCatNLO.inputs PDFSET number
1981@@ -438,6 +463,16 @@
1982 create ThePEG::LHAPDF /LHAPDF/MCNLOPDF ThePEGLHAPDF.so
1983 set /LHAPDF/MCNLOPDF:PDFName $PDFSETN
1984 set /LHAPDF/MCNLOPDF:RemnantHandler /Herwig/Partons/HadronRemnants
1985+EOF
1986+
1987+if [ "$HWNEW" -ge 1 ]
1988+then
1989+cat <<EOF >> ./$ifile
1990+set /Herwig/Partons/RemnantDecayer:AllowTop Yes
1991+EOF
1992+fi
1993+
1994+cat <<EOF >> ./$ifile
1995 set /Herwig/EventHandlers/LHEReader:PDFA /LHAPDF/MCNLOPDF
1996 set /Herwig/EventHandlers/LHEReader:PDFB /LHAPDF/MCNLOPDF
1997 set /Herwig/Particles/p+:PDF /LHAPDF/MCNLOPDF
1998@@ -494,9 +529,9 @@
1999 # 3.) ADDITIONAL SETTINGS
2000
2001 # SHOWER SETTINGS
2002-set /Herwig/Shower/Evolver:IntrinsicPtGaussian 2.2*GeV
2003 EOF
2004
2005+
2006 if ((`bc <<< "$LAMBDAHERW >= 0.0"`))
2007 then
2008 LAMBDAHERW=$(echo "$LAMBDAHERW * 1000" | bc)
2009@@ -512,23 +547,43 @@
2010 EOF
2011 fi
2012
2013+if [ "$HWNEW" -le 1 ]
2014+then
2015+cat <<EOF >> ./$ifile
2016+set /Herwig/Shower/Evolver:IntrinsicPtGaussian 2.2*GeV
2017+EOF
2018+elif [ "$HWNEW" -ge 2 ]
2019+then
2020+cat <<EOF >> ./$ifile
2021+set /Herwig/Shower/ShowerHandler:IntrinsicPtGaussian 1.3*GeV
2022+EOF
2023+fi
2024
2025-if [ $HWNEW = 1 ]
2026+if [ "$HWNEW" -ge 1 ]
2027 then
2028 cat <<EOF >> ./$ifile
2029 set /Herwig/Shower/PartnerFinder:PartnerMethod Random
2030 set /Herwig/Shower/PartnerFinder:ScaleChoice Partner
2031+EOF
2032+fi
2033+
2034+if [ "$HWNEW" -le 1 ]
2035+then
2036+cat <<EOF >> ./$ifile
2037 set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes
2038-
2039-#set /Herwig/Shower/Evolver:Interactions QCDOnly
2040-#set /Herwig/Shower/Evolver:SoftCorrelations No
2041-#set /Herwig/Shower/Evolver:SpinCorrelations Yes
2042-
2043-set /Herwig/Shower/Evolver:SpinCorrelations No
2044-set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default
2045-set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
2046+set /Herwig/Shower/GammatoQQbarSplitFn:AngularOrdered Yes
2047+#set /Herwig/Shower/ShowerHandler:Interactions QCDOnly
2048+#set /Herwig/Shower/ShowerHandler:SoftCorrelations No
2049+#set /Herwig/Shower/ShowerHandler:SpinCorrelations Yes
2050+EOF
2051+fi
2052+
2053+if [ "$HWNEW" -ge 2 ]
2054+then
2055+cat <<EOF >> ./$ifile
2056+set /Herwig/Shower/ShowerHandler:SpinCorrelations No
2057 set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes
2058-set /Herwig/Shower/ShowerHandler:RestrictPhasespace On
2059+set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes
2060
2061 EOF
2062 fi
2063@@ -807,36 +862,53 @@
2064 # 4.) HW++ SETTINGS THAT ARE NOT ALLOWED TO BE TOUCHED BY THE USER
2065
2066 #Boost and reconstruction stuff
2067+EOF
2068+
2069+if [ "$HWNEW" -eq 1 ] || [ "$HWNEW" -eq 2 ]
2070+then
2071+cat <<EOF >> ./$ifile
2072+set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default
2073+set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
2074+EOF
2075+fi
2076+
2077+if [ "$HWNEW" -eq 3 ]
2078+then
2079+cat <<EOF >> ./$ifile
2080+set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
2081+EOF
2082+fi
2083+
2084+cat <<EOF >> ./$ifile
2085 set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption General
2086 set /Herwig/Shower/KinematicsReconstructor:InitialInitialBoostOption LongTransBoost
2087
2088 # --------------------------------------------------------------------- #
2089 # 5.) CREATE THE ANALYZER AND SAVE THE RUN (DO NOT MODIFY)
2090-
2091 EOF
2092
2093 if [ "$HWPPUTI" != "" ]
2094 then
2095 cat <<EOF >> ./$ifile
2096 create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so
2097-insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 $HWPPANALYZER
2098+insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 $HWPPANALYZER
2099
2100 EOF
2101 else
2102 cat <<EOF >> ./$ifile
2103 #create MCatNLO::hepfortr hepfortr hepfortr.so
2104-#insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 hepfortr
2105+#insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 hepfortr
2106
2107 # Useful analysis handlers for HepMC related output
2108 ##################################################
2109 # Schematic overview of an event (requires --with-hepmc to be set at configure time
2110 # and the graphviz program 'dot' to produce a plot)
2111 #create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so
2112-#insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 $HWPPANALYZER
2113-# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/Plot
2114+#insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 $HWPPANALYZER
2115+# insert $GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/Plot
2116 # A HepMC dump file (requires --with-hepmc to be set at configure time)
2117-# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
2118-insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
2119+# insert $GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
2120+insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
2121 set /Herwig/Analysis/HepMCFile:PrintEvent $NEVENTS
2122 set /Herwig/Analysis/HepMCFile:Format GenEvent
2123 set /Herwig/Analysis/HepMCFile:Units GeV_mm
2124@@ -845,9 +917,10 @@
2125 fi
2126
2127 cat <<EOF >> ./$ifile
2128-saverun $runfile /Herwig/Generators/LHCGenerator
2129+saverun $runfile /Herwig/Generators/$GENERATOR
2130 EOF
2131
2132+
2133 ( cd . ;\
2134 $exefile )
2135
2136
2137=== modified file 'Template/NLO/MCatNLO/shower_template.sh'
2138--- Template/NLO/MCatNLO/shower_template.sh 2017-01-16 14:11:24 +0000
2139+++ Template/NLO/MCatNLO/shower_template.sh 2020-05-23 19:29:41 +0000
2140@@ -9,8 +9,11 @@
2141
2142 export %(ld_library_path)s=$%(ld_library_path)s:%(extralibs)s
2143
2144-# this is for py8 runs
2145-export PYTHIA8DATA=`pwd`/xmldoc
2146+if [ $SHOWER == "HERWIGPP" ] ; then
2147+ export PYTHIA8DATA=""
2148+else
2149+ export PYTHIA8DATA=`pwd`/xmldoc
2150+fi
2151
2152 # if one is splitting file cd to a new dir and link all files here
2153 if [[ "$NFILE" != "" ]]; then
2154
2155=== modified file 'Template/NLO/Source/PDF/pdg2pdf.f'
2156--- Template/NLO/Source/PDF/pdg2pdf.f 2015-11-06 16:54:54 +0000
2157+++ Template/NLO/Source/PDF/pdg2pdf.f 2020-05-23 19:29:41 +0000
2158@@ -66,12 +66,14 @@
2159 endif
2160
2161 ipart=ipdg
2162- if(iabs(ipart).eq.21) ipart=0
2163- if(iabs(ipart).eq.22) ipart=7
2164- iporg=ipart
2165-
2166+ if(iabs(ipart).eq.21) then
2167+ ipart=0
2168+ else if(iabs(ipart).eq.22) then
2169+ ipart=7
2170+ else if(iabs(ipart).eq.7) then
2171+ ipart=7
2172+ else if(iabs(ipart).gt.7)then
2173 c This will be called for any PDG code, but we only support up to 7
2174- if(iabs(ipart).gt.7)then
2175 C write(*,*) 'PDF not supported for pdg ',ipdg
2176 C write(*,*) 'For lepton colliders, please set the lpp* '//
2177 C $ 'variables to 0 in the run_card'
2178@@ -82,6 +84,7 @@
2179 return
2180 endif
2181
2182+ iporg=ipart
2183 ireuse = 0
2184 ii=i_replace
2185 do i=1,20
2186
2187=== modified file 'Template/NLO/Source/PDF/pdg2pdf_lhapdf.f'
2188--- Template/NLO/Source/PDF/pdg2pdf_lhapdf.f 2016-05-24 12:48:05 +0000
2189+++ Template/NLO/Source/PDF/pdg2pdf_lhapdf.f 2020-05-23 19:29:41 +0000
2190@@ -64,12 +64,14 @@
2191 endif
2192
2193 ipart=ipdg
2194- if(iabs(ipart).eq.21) ipart=0
2195- if(iabs(ipart).eq.22) ipart=7
2196- iporg=ipart
2197-
2198+ if(iabs(ipart).eq.21) then
2199+ ipart=0
2200+ else if(iabs(ipart).eq.22) then
2201+ ipart=7
2202+ else if(iabs(ipart).eq.7) then
2203+ ipart=7
2204+ else if(iabs(ipart).gt.7)then
2205 c This will be called for any PDG code, but we only support up to 7
2206- if(iabs(ipart).gt.7)then
2207 C write(*,*) 'PDF not supported for pdg ',ipdg
2208 C write(*,*) 'For lepton colliders, please set the lpp* '//
2209 C $ 'variables to 0 in the run_card'
2210@@ -86,6 +88,7 @@
2211 c Determine the member of the set (function of lhapdf)
2212 call getnmem(iset,imem)
2213
2214+ iporg=ipart
2215 ireuse = 0
2216 ii=i_replace
2217 do i=1,20
2218
2219=== modified file 'Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f'
2220--- Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f 2017-01-10 15:57:32 +0000
2221+++ Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f 2020-05-23 19:29:41 +0000
2222@@ -65,12 +65,14 @@
2223 endif
2224
2225 ipart=ipdg
2226- if(iabs(ipart).eq.21) ipart=0
2227- if(iabs(ipart).eq.22) ipart=7
2228- iporg=ipart
2229-
2230+ if(iabs(ipart).eq.21) then
2231+ ipart=0
2232+ else if(iabs(ipart).eq.22) then
2233+ ipart=7
2234+ else if(iabs(ipart).eq.7) then
2235+ ipart=7
2236+ else if(iabs(ipart).gt.7)then
2237 c This will be called for any PDG code, but we only support up to 7
2238- if(iabs(ipart).gt.7)then
2239 C write(*,*) 'PDF not supported for pdg ',ipdg
2240 C write(*,*) 'For lepton colliders, please set the lpp* '//
2241 C $ 'variables to 0 in the run_card'
2242@@ -86,6 +88,7 @@
2243 c Determine the member of the set (function of lhapdf)
2244 call getnmem(iset,imem)
2245
2246+ iporg=ipart
2247 ireuse = 0
2248 ii=i_replace
2249 do i=1,20
2250
2251=== modified file 'Template/NLO/Source/kin_functions.f'
2252--- Template/NLO/Source/kin_functions.f 2017-07-14 08:23:18 +0000
2253+++ Template/NLO/Source/kin_functions.f 2020-05-23 19:29:41 +0000
2254@@ -236,7 +236,7 @@
2255 c-----
2256 c Begin Code
2257 c-----
2258- if ((lpp(1).eq.0).and.(lpp(2).eq.0)) then
2259+ if ((lpp(1).ne.1).and.(lpp(2).ne.1)) then
2260 p1a = dsqrt(p1(1)**2+p1(2)**2+p1(3)**2)
2261 p2a = dsqrt(p2(1)**2+p2(2)**2+p2(3)**2)
2262 if (p1a*p2a .ne. 0d0) then
2263
2264=== modified file 'Template/NLO/Source/makefile'
2265--- Template/NLO/Source/makefile 2017-07-31 08:48:20 +0000
2266+++ Template/NLO/Source/makefile 2020-05-23 19:29:41 +0000
2267@@ -13,6 +13,7 @@
2268 zerox64_cernlib.o
2269
2270 .f.o: ; $(FC) $(FFLAGS) -c $*.f
2271+.f90.o: ; $(FC) $(FFLAGS) -c $*.f90
2272
2273 all: $(LIBDIR)libdhelas.a $(LIBDIR)libgeneric.a $(LIBDIR)libpdf.a \
2274 $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc
2275
2276=== modified file 'Template/NLO/Source/ranmar.f'
2277--- Template/NLO/Source/ranmar.f 2017-01-30 15:18:32 +0000
2278+++ Template/NLO/Source/ranmar.f 2020-05-23 19:29:41 +0000
2279@@ -1,18 +1,3 @@
2280- function ran2()
2281-c Wrapper for the random numbers; needed for the NLO stuff
2282- implicit none
2283- include '../SubProcesses/mint.inc' ! includes iconfig common
2284- double precision ran2,x,a,b
2285- integer ii,jconfig
2286- a=0d0 ! min allowed value for x
2287- b=1d0 ! max allowed value for x
2288- ii=0 ! dummy argument of ntuple
2289- jconfig=iconfig ! integration channel (for off-set)
2290- call ntuple(x,a,b,ii,jconfig)
2291- ran2=x
2292- return
2293- end
2294-
2295 subroutine ntuple(x,a,b,ii,jconfig)
2296 c-------------------------------------------------------
2297 c Front to ranmar which allows user to easily
2298
2299=== modified file 'Template/NLO/SubProcesses/BinothLHA.f'
2300--- Template/NLO/SubProcesses/BinothLHA.f 2017-06-23 14:14:03 +0000
2301+++ Template/NLO/SubProcesses/BinothLHA.f 2020-05-23 19:29:41 +0000
2302@@ -4,12 +4,11 @@
2303 c that calls the OLP and returns the virtual weights. For convenience
2304 c also the born_wgt is passed to this subroutine.
2305 c
2306+ use FKSParams
2307 implicit none
2308 include "nexternal.inc"
2309 include "coupl.inc"
2310 include 'born_nhel.inc'
2311-c general MadFKS parameters
2312- include 'FKSParams.inc'
2313 double precision pi, zero,mone
2314 parameter (pi=3.1415926535897932385d0)
2315 parameter (zero=0d0)
2316@@ -72,6 +71,9 @@
2317 integer ret_code_common
2318 common /to_ret_code/ret_code_common
2319 double precision born_hel_from_virt
2320+
2321+ logical updateloop
2322+ common /to_updateloop/updateloop
2323 c masses
2324 include 'pmass.inc'
2325 data nbad / 0 /
2326@@ -80,7 +82,11 @@
2327 c update the ren_scale for MadLoop and the couplings (should be the
2328 c Ellis-Sexton scale)
2329 mu_r = sqrt(QES2)
2330+ ! force to update also loop-related parameters
2331+ updateloop=.true.
2332 call update_as_param()
2333+ updateloop=.false.
2334+
2335 alpha_S=g**2/(4d0*PI)
2336 ao2pi= alpha_S/(2d0*PI)
2337 virt_wgt= 0d0
2338@@ -111,8 +117,13 @@
2339 c itself again to perform stability check to make sure no unstable EPS
2340 c splips unnoticed.
2341 CALL FORCE_STABILITY_CHECK(.TRUE.)
2342- CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
2343- CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)
2344+ IF (.not. force_polecheck) THEN ! still have the pole for the pole check
2345+ CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
2346+ CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)
2347+ else
2348+ CALL COLLIER_COMPUTE_UV_POLES(.TRUE.)
2349+ CALL COLLIER_COMPUTE_IR_POLES(.TRUE.)
2350+ endif
2351 firsttime_run = .false.
2352 endif
2353 firsttime=firsttime.or.force_polecheck
2354@@ -290,7 +301,7 @@
2355 if ((dabs(avgPoleRes(1))+dabs(avgPoleRes(2))).ne.0d0) then
2356 cpol = .not.((((PoleDiff(1)+PoleDiff(2))/
2357 $ (dabs(avgPoleRes(1))+dabs(avgPoleRes(2)))) .lt.
2358- $ tolerance*10d0).or.(mod(ret_code,10).eq.7))
2359+ $ tolerance*10d0).or.(mod(ret_code,10).eq.7.and..not.force_polecheck))
2360 else
2361 cpol = .not.((PoleDiff(1)+PoleDiff(2).lt.tolerance*10d0)
2362 $ .or.(mod(ret_code,10).eq.7))
2363
2364=== modified file 'Template/NLO/SubProcesses/BinothLHA_OLP.f'
2365--- Template/NLO/SubProcesses/BinothLHA_OLP.f 2015-08-13 09:26:37 +0000
2366+++ Template/NLO/SubProcesses/BinothLHA_OLP.f 2020-05-23 19:29:41 +0000
2367@@ -6,11 +6,11 @@
2368 c
2369 C************************************************************************
2370 c
2371+ use FKSParams
2372 implicit none
2373 include "nexternal.inc"
2374 include "coupl.inc"
2375 include "Binoth_proc.inc"
2376- include "FKSParams.inc"
2377 double precision pi
2378 parameter (pi=3.1415926535897932385d0)
2379 double precision pin(0:3,nexternal-1),p(0:4,nexternal-1)
2380
2381=== removed file 'Template/NLO/SubProcesses/FKSParamReader.f'
2382=== added file 'Template/NLO/SubProcesses/FKSParams.f90'
2383--- Template/NLO/SubProcesses/FKSParams.f90 1970-01-01 00:00:00 +0000
2384+++ Template/NLO/SubProcesses/FKSParams.f90 2020-05-23 19:29:41 +0000
2385@@ -0,0 +1,248 @@
2386+!====================================================================
2387+!
2388+! Define common block with all general parameters used by MadFKS
2389+! See their definitions in the file FKS_params.dat.
2390+!
2391+!====================================================================
2392+module FKSParams
2393+ character(len=64), parameter :: paramFileName='FKS_params.dat'
2394+ integer,parameter :: maxContribsSelected=100, &
2395+ maxCouplingsSelected=100, &
2396+ maxContribType=15, &
2397+ maxCouplingTypes=20
2398+ real*8 :: IRPoleCheckThreshold,Virt_fraction, PrecisionVirtualAtRunTime,Min_virt_fraction
2399+ integer :: NHelForMCoverHels,VetoedContributionTypes(0:maxContribsSelected), &
2400+ SelectedContributionTypes(0:maxContribsSelected),QED_squared_selected, &
2401+ SelectedCouplingOrders(maxCouplingTypes,0:maxCouplingsSelected), &
2402+ QCD_squared_selected
2403+ logical :: separate_flavour_configs,IncludeBornContributions,use_poly_virtual
2404+
2405+contains
2406+
2407+ subroutine FKSParamReader(filename, printParam, force)
2408+ ! Reads the file 'filename' and sets the parameters found in that file.
2409+ implicit none
2410+ logical, save :: HasReadOnce=.False.,paramPrinted=.false.
2411+ logical :: force,couldRead,printParam
2412+ character(*) :: filename
2413+ CHARACTER(len=64) :: buff, buff2, mode
2414+ include "orders.inc"
2415+ integer :: i,j
2416+ couldRead=.False.
2417+ if (HasReadOnce.and..not.force) then
2418+ goto 901
2419+ endif
2420+! Make sure to have default parameters if not set in the FKSParams.dat card
2421+! (if it is an old one for instance)
2422+ call DefaultFKSParam()
2423+! Overwrite the default parameters from file:
2424+ open(68, file=fileName, err=676, action='READ')
2425+ do
2426+ read(68,*,end=999) buff
2427+ if(index(buff,'#').eq.1) then
2428+ if (buff .eq. '#IRPoleCheckThreshold') then
2429+ read(68,*,end=999) IRPoleCheckThreshold
2430+ if (IRPoleCheckThreshold .lt. -1.01d0 ) then
2431+ stop 'IRPoleCheckThreshold must be >= -1.0d0.'
2432+ endif
2433+ elseif (buff .eq. '#PrecisionVirtualAtRunTime') then
2434+ read(68,*,end=999) PrecisionVirtualAtRunTime
2435+ if (IRPoleCheckThreshold .lt. -1.01d0 ) then
2436+ stop 'PrecisionVirtualAtRunTime must be >= -1.0d0.'
2437+ endif
2438+ else if (buff .eq. '#NHelForMCoverHels') then
2439+ read(68,*,end=999) NHelForMCoverHels
2440+ if (NHelForMCoverHels .lt. -1) then
2441+ stop 'NHelForMCoverHels must be >= -1.'
2442+ endif
2443+ else if (buff .eq. '#QCD^2==') then
2444+ read(68,*,end=999) QCD_squared_selected
2445+ if (QCD_squared_selected .lt. -1) then
2446+ stop 'QCD_squared_selected must be >= -1.'
2447+ endif
2448+ else if (buff .eq. '#QED^2==') then
2449+ read(68,*,end=999) QED_squared_selected
2450+ if (QED_squared_selected .lt. -1) then
2451+ stop 'QED_squared_selected must be >= -1.'
2452+ endif
2453+ else if (buff .eq. '#VirtualFraction') then
2454+ read(68,*,end=999) Virt_fraction
2455+ if (Virt_fraction .lt. 0 .or. virt_fraction .gt.1) then
2456+ stop 'VirtualFraction should be a fraction between 0 and 1'
2457+ endif
2458+ else if (buff .eq. '#MinVirtualFraction') then
2459+ read(68,*,end=999) Min_Virt_fraction
2460+ if (min_virt_fraction .lt. 0 .or. min_virt_fraction .gt.1) then
2461+ stop 'VirtualFraction should be a fraction between 0 and 1'
2462+ endif
2463+ else if (buff .eq. '#SeparateFlavourConfigurations') then
2464+ read(68,*,end=999) separate_flavour_configs
2465+ else if (buff .eq. '#UsePolyVirtual') then
2466+ read(68,*,end=999) use_poly_virtual
2467+ else if (buff .eq. '#VetoedContributionTypes') then
2468+ read(68,*,end=999) VetoedContributionTypes(0)
2469+ if (VetoedContributionTypes(0) .lt. 0.or. &
2470+ VetoedContributionTypes(0) .gt. maxContribsSelected) then
2471+ write(*,*) 'VetoedContributionTypes length should be >= 0 and <=', &
2472+ maxContribsSelected
2473+ stop 'Format error in FKS_params.dat.'
2474+ endif
2475+ read(68,*,end=999) (VetoedContributionTypes(I),I=1,VetoedContributionTypes(0))
2476+ do I=1,VetoedContributionTypes(0)
2477+ if (VetoedContributionTypes(I).lt.1.or. &
2478+ VetoedContributionTypes(I).gt.maxContribType) then
2479+ write(*,*) 'VetoedContributionTypes must be >=1 and <=',maxContribType
2480+ stop 'Format error in FKS_params.dat.'
2481+ endif
2482+ enddo
2483+ do I=VetoedContributionTypes(0)+1,maxContribsSelected
2484+ VetoedContributionTypes(I)=-1
2485+ enddo
2486+
2487+ else if (buff .eq. '#SelectedContributionTypes') then
2488+ read(68,*,end=999) SelectedContributionTypes(0)
2489+ if (SelectedContributionTypes(0) .lt. 0 .or. &
2490+ SelectedContributionTypes(0) .gt. maxContribsSelected) then
2491+ write(*,*) 'SelectedContributionTypes length should be >= 0 and <=', &
2492+ maxContribsSelected
2493+ stop 'Format error in FKS_params.dat.'
2494+ endif
2495+ read(68,*,end=999) (SelectedContributionTypes(I),I=1,SelectedContributionTypes(0))
2496+ do I=1,SelectedContributionTypes(0)
2497+ if (SelectedContributionTypes(I).lt.1.or. &
2498+ SelectedContributionTypes(I).gt.maxContribType) then
2499+ write(*,*) 'SelectedContributionTypes must be >=1 and <=',maxContribType
2500+ stop 'Format error in FKS_params.dat.'
2501+ endif
2502+ enddo
2503+ do I=SelectedContributionTypes(0)+1,maxContribsSelected
2504+ SelectedContributionTypes(I)=-1
2505+ enddo
2506+ else if (buff .eq. '#SelectedCouplingOrders') then
2507+ read(68,*,end=999) SelectedCouplingOrders(1,0)
2508+ if (SelectedCouplingOrders(1,0) .lt. 0 .or. &
2509+ SelectedCouplingOrders(1,0) .gt. maxCouplingsSelected) then
2510+ write(*,*) 'SelectedCouplingOrders length should be >= 0 and <=', &
2511+ maxCouplingsSelected
2512+ stop 'Format error in FKS_params.dat.'
2513+ endif
2514+ do j = 2, maxCouplingTypes
2515+ SelectedCouplingOrders(j,0) = SelectedCouplingOrders(1,0)
2516+ enddo
2517+ do j = 1, SelectedCouplingOrders(1,0)
2518+ read(68,*,end=999) (SelectedCouplingOrders(i,j),i=1,nsplitorders)
2519+ do i=nsplitorders+1,maxCouplingTypes
2520+ SelectedCouplingOrders(i,j)=-1
2521+ enddo
2522+ enddo
2523+ else
2524+ write(*,*) 'The parameter name ',buff(2:),'is not reckognized.'
2525+ stop 'Format error in FKS_params.dat.'
2526+ endif
2527+ endif
2528+ enddo
2529+999 continue
2530+ couldRead=.True.
2531+ goto 998
2532+
2533+676 continue
2534+ write(*,*) 'ERROR :: MadFKS parameter file ',fileName, &
2535+ ' could not be found or is malformed. Please specify it.'
2536+ stop
2537+ ! Below is the code if one desires to let the code continue with
2538+ ! a non existing or malformed parameter file
2539+ write(*,*) 'WARNING :: The file ',fileName,' could not be ', &
2540+ ' open or did not contain the necessary information. The ', &
2541+ ' default MadFKS parameters will be used.'
2542+ call DefaultFKSParam()
2543+ goto 998
2544+998 continue
2545+
2546+ if(printParam.and..not.paramPrinted) then
2547+ write(*,*) &
2548+ '==============================================================='
2549+ if (couldRead) then
2550+ write(*,*) 'INFO: MadFKS read these parameters from ',filename
2551+ else
2552+ write(*,*) 'INFO: MadFKS used the default parameters.'
2553+ endif
2554+ write(*,*) &
2555+ '==============================================================='
2556+ write(*,*) ' > IRPoleCheckThreshold = ',IRPoleCheckThreshold
2557+ write(*,*) ' > PrecisionVirtualAtRunTime = ',PrecisionVirtualAtRunTime
2558+ if (SelectedContributionTypes(0).gt.0) then
2559+ write(*,*) ' > SelectedContributionTypes = ', &
2560+ (SelectedContributionTypes(I),I=1,SelectedContributionTypes(0))
2561+ else
2562+ write(*,*) ' > SelectedContributionTypes = All'
2563+ endif
2564+ if (VetoedContributionTypes(0).gt.0) then
2565+ write(*,*) ' > VetoedContributionTypes = ', &
2566+ (VetoedContributionTypes(I),I=1,VetoedContributionTypes(0))
2567+ else
2568+ write(*,*) ' > VetoedContributionTypes = None'
2569+ endif
2570+ if (QCD_squared_selected.eq.-1) then
2571+ write(*,*) ' > QCD_squared_selected = All'
2572+ else
2573+ write(*,*) ' > QCD_squared_selected = ',QCD_squared_selected
2574+ endif
2575+ if (QED_squared_selected.eq.-1) then
2576+ write(*,*) ' > QED_squared_selected = All'
2577+ else
2578+ write(*,*) ' > QED_squared_selected = ',QED_squared_selected
2579+ endif
2580+ if (SelectedCouplingOrders(1,0).gt.0) then
2581+ do j=1,SelectedCouplingOrders(1,0)
2582+ write(*,*) ' > SelectedCouplingOrders(',j,') = ', &
2583+ (SelectedCouplingOrders(i,j),i=1,nsplitorders)
2584+ enddo
2585+ else
2586+ write(*,*) ' > SelectedCouplingOrders = All'
2587+ endif
2588+ write(*,*) ' > NHelForMCoverHels = ',NHelForMCoverHels
2589+ write(*,*) ' > VirtualFraction = ',Virt_fraction
2590+ write(*,*) ' > MinVirtualFraction = ',Min_virt_fraction
2591+ write(*,*) ' > SeparateFlavourConfigs = ',separate_flavour_configs
2592+ write(*,*) ' > UsePolyVirtual = ',use_poly_virtual
2593+ write(*,*) &
2594+ '==============================================================='
2595+ paramPrinted=.TRUE.
2596+ endif
2597+
2598+ close(68)
2599+ HasReadOnce=.TRUE.
2600+901 continue
2601+ end subroutine FKSParamReader
2602+
2603+ subroutine DefaultFKSParam()
2604+ ! Sets the default parameters
2605+ implicit none
2606+ integer i,j
2607+ IRPoleCheckThreshold=1.0d-5
2608+ NHelForMCoverHels=5
2609+ PrecisionVirtualAtRunTime=1d-3
2610+ Virt_fraction=1d0
2611+ QED_squared_selected=-1
2612+ QCD_squared_selected=-1
2613+ Min_virt_fraction=0.005d0
2614+ separate_flavour_configs=.false.
2615+ use_poly_virtual=.true.
2616+ IncludeBornContributions=.true.
2617+ SelectedContributionTypes(0)=0
2618+ VetoedContributionTypes(0)=0
2619+ do i=1, maxContribsSelected
2620+ SelectedContributionTypes(I)=-1
2621+ VetoedContributionTypes(I)=-1
2622+ enddo
2623+ do j=1,maxCouplingTypes
2624+ SelectedCouplingOrders(j,0) = 0
2625+ enddo
2626+ do j=1,maxCouplingsSelected
2627+ do i=1,maxCouplingTypes
2628+ SelectedCouplingOrders(i,j) = -1
2629+ enddo
2630+ enddo
2631+ end subroutine DefaultFKSParam
2632+
2633+end module FKSParams
2634
2635=== removed file 'Template/NLO/SubProcesses/FKSParams.inc'
2636=== modified file 'Template/NLO/SubProcesses/MC_integer.f'
2637--- Template/NLO/SubProcesses/MC_integer.f 2018-06-04 07:36:30 +0000
2638+++ Template/NLO/SubProcesses/MC_integer.f 2020-05-23 19:29:41 +0000
2639@@ -58,6 +58,7 @@
2640 data firsttime/maxdim*.true./
2641 data realfirsttime/.true./
2642 character*1 cdum
2643+ character*3 action
2644 integer nintervals(maxdim),maxintervals,niint_thisd
2645 parameter (maxintervals=200)
2646 integer ncall(0:maxintervals,maxdim)
2647@@ -95,7 +96,7 @@
2648 do i=1,this_dim-1 ! skip the lines not needed for 'this_dim'
2649 read(52,*,end=999,err=999) cdum
2650 enddo
2651- read(52,*,end=999,err=999)
2652+ read(52,*,end=999,err=999) action,
2653 & (grid(i,this_dim),i=0,nintervals(this_dim)) ! here is what we want
2654 do i=this_dim+1,maxdim ! make sure that there are enough lines in this file
2655 read(52,*,end=999,err=999) cdum
2656@@ -266,7 +267,7 @@
2657 enddo
2658 open(unit=52,file='grid.MC_integer',status='unknown',err=999)
2659 do this_dim=1,maxdim
2660- write(52,*) (grid(i,this_dim),i=0,nintervals(this_dim))
2661+ write(52,*) 'AVE',(grid(i,this_dim),i=0,nintervals(this_dim))
2662 enddo
2663 close(52)
2664 c
2665
2666=== modified file 'Template/NLO/SubProcesses/check_poles.f'
2667--- Template/NLO/SubProcesses/check_poles.f 2018-09-21 13:46:51 +0000
2668+++ Template/NLO/SubProcesses/check_poles.f 2020-05-23 19:29:41 +0000
2669@@ -2,6 +2,8 @@
2670 c**************************************************************************
2671 c This is the driver for the whole calulation
2672 c**************************************************************************
2673+ use mint_module
2674+ use FKSParams
2675 implicit none
2676 C
2677 C CONSTANTS
2678@@ -9,7 +11,7 @@
2679 double precision pi, zero
2680 parameter (pi=3.1415926535897932385d0)
2681 parameter (zero = 0d0)
2682- integer npoints, npointsChecked
2683+ integer npointsChecked
2684 integer i, j, k
2685 integer return_code
2686 double precision tolerance, tolerance_default
2687@@ -63,8 +65,6 @@
2688 common /to_polecheck/force_polecheck, polecheck_passed
2689 integer ret_code_ml
2690 common /to_ret_code/ret_code_ml
2691- include 'FKSParams.inc'
2692- include 'mint.inc'
2693
2694 C-----
2695 C BEGIN CODE
2696@@ -462,16 +462,3 @@
2697 return
2698 end
2699
2700- subroutine outfun(p, a, b, i)
2701-c just a dummy subroutine
2702- implicit none
2703- include 'nexternal.inc'
2704- double precision p(0:3, nexternal), a, b
2705- integer i
2706- write(*,*) 'THIS FUNCTION SHOULD NEVER BE CALLED'
2707- return
2708- end
2709-
2710-
2711- subroutine initplot
2712- end
2713
2714=== modified file 'Template/NLO/SubProcesses/cuts.f'
2715--- Template/NLO/SubProcesses/cuts.f 2018-04-16 14:08:47 +0000
2716+++ Template/NLO/SubProcesses/cuts.f 2020-05-23 19:29:41 +0000
2717@@ -139,7 +139,7 @@
2718 return
2719 endif
2720 endif
2721- if (ipdg(i).eq.-ipdg(j)) then
2722+ if (ipdg_reco(i).eq.-ipdg_reco(j)) then
2723 if (drll_sf.gt.0d0) then
2724 if (R2_04(p_reco(0,i),p_reco(0,j)).lt.drll_sf**2) then
2725 passcuts_user=.false.
2726
2727=== modified file 'Template/NLO/SubProcesses/driver_mintFO.f'
2728--- Template/NLO/SubProcesses/driver_mintFO.f 2018-09-21 13:46:51 +0000
2729+++ Template/NLO/SubProcesses/driver_mintFO.f 2020-05-23 19:29:41 +0000
2730@@ -3,6 +3,8 @@
2731 c This is the driver for the whole calculation
2732 c**************************************************************************
2733 use extra_weights
2734+ use mint_module
2735+ use FKSParams
2736 implicit none
2737 C
2738 C CONSTANTS
2739@@ -11,13 +13,10 @@
2740 parameter (ZERO = 0d0)
2741 include 'nexternal.inc'
2742 include 'genps.inc'
2743- INTEGER ITMAX, NCALL
2744-
2745- common/citmax/itmax,ncall
2746 C
2747 C LOCAL
2748 C
2749- integer i,j,k,l,l1,l2
2750+ integer i,j,k,l,l1,l2,kchan
2751 character*130 buf
2752 c
2753 c Global
2754@@ -27,8 +26,8 @@
2755 include 'coupl.inc'
2756
2757 c Vegas stuff
2758- integer ndim
2759- common/tosigint/ndim
2760+ integer nndim
2761+ common/tosigint/nndim
2762
2763 real*8 sigint
2764 external sigint
2765@@ -43,21 +42,11 @@
2766 double precision xratmax
2767 common/ccheckcnt/i_momcmp_count,xratmax
2768
2769+ character*4 abrv
2770+ common /to_abrv/ abrv
2771 integer n_mp, n_disc
2772-c For MINT:
2773- include "mint.inc"
2774- integer nhits_in_grids(maxchannels)
2775- real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals
2776- $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals
2777- $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals
2778- $ ,0:maxchannels),x(ndimmax),itmax_fl
2779 integer ixi_i,iphi_i,iy_ij,vn
2780- integer ifold(ndimmax)
2781- common /cifold/ifold
2782- integer ifold_energy,ifold_phi,ifold_yij
2783- common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
2784 logical putonshell
2785- integer imode,dummy
2786 logical unwgt
2787 double precision evtsgn
2788 common /c_unwgt/evtsgn,unwgt
2789@@ -72,20 +61,12 @@
2790
2791 double precision virtual_over_born
2792 common/c_vob/virtual_over_born
2793- double precision average_virtual(0:n_ave_virt,maxchannels)
2794- $ ,virtual_fraction(maxchannels)
2795- common/c_avg_virt/average_virtual,virtual_fraction
2796 include 'orders.inc'
2797- integer n_ord_virt
2798- common /c_n_ord_virt/n_ord_virt
2799
2800 c timing statistics
2801 include "timing_variables.inc"
2802 real*4 tOther, tTot
2803
2804-c general MadFKS parameters
2805- include "FKSParams.inc"
2806-
2807 c applgrid
2808 integer iappl
2809 common /for_applgrid/ iappl
2810@@ -95,13 +76,17 @@
2811 integer ntot_granny,derntot,ncase(0:6)
2812 common /c_granny_counters/ ntot_granny,ncase,derntot,deravg,derstd
2813 & ,dermax,xi_i_fks_ev_der_max,y_ij_fks_ev_der_max
2814- logical fixed_order,nlo_ps
2815- common /c_fnlo_nlops/fixed_order,nlo_ps
2816
2817+ logical useitmax
2818+ common/cuseitmax/useitmax
2819
2820 C-----
2821 C BEGIN CODE
2822-C-----
2823+C-----
2824+c Write the process PID in the log.txt files (i.e., to the screen)
2825+ write (*,*) getpid()
2826+
2827+ useitmax=.false. ! to be overwritten in open_output_files.f if need be
2828 c
2829 c Setup the timing variable
2830 c
2831@@ -112,6 +97,7 @@
2832 c Read general MadFKS parameters
2833 c
2834 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)
2835+ min_virt_fraction_mint=min_virt_fraction
2836 do kchan=1,maxchannels
2837 do i=0,n_ave_virt
2838 average_virtual(i,kchan)=0d0
2839@@ -153,7 +139,7 @@
2840 c Get user input
2841 c
2842 write(*,*) "getting user params"
2843- call get_user_params(ncall,itmax,imode)
2844+ call get_user_params(ncalls0,itmax,imode)
2845 if(imode.eq.0)then
2846 flat_grid=.true.
2847 else
2848@@ -162,6 +148,7 @@
2849 ndim = 3*(nexternal-nincoming)-4
2850 if (abs(lpp(1)) .ge. 1) ndim=ndim+1
2851 if (abs(lpp(2)) .ge. 1) ndim=ndim+1
2852+ nndim=ndim
2853 c Don't proceed if muF1#muF2 (we need to work out the relevant formulae
2854 c at the NLO)
2855 if( ( fixed_fac_scale .and.
2856@@ -172,7 +159,7 @@
2857 write(*,*)'NLO computations require muF1=muF2'
2858 stop
2859 endif
2860- write(*,*) "about to integrate ", ndim,ncall,itmax
2861+ write(*,*) "about to integrate ", ndim,ncalls0,itmax
2862 c APPLgrid
2863 if (imode.eq.0) iappl=0 ! overwrite when starting completely fresh
2864 if(iappl.ne.0) then
2865@@ -184,6 +171,23 @@
2866 call find_iproc_map
2867 write(6,*) " ... done."
2868 endif
2869+ if (abrv(1:4).eq.'virt') then
2870+ only_virt=.true.
2871+ else
2872+ only_virt=.false.
2873+ endif
2874+c Prepare the MINT folding
2875+ do j=1,ndimmax
2876+ if (j.le.ndim) then
2877+ ifold(j)=1
2878+ else
2879+ ifold(j)=0
2880+ endif
2881+ enddo
2882+ ifold_energy=ndim-2
2883+ ifold_yij=ndim-1
2884+ ifold_phi=ndim
2885+c
2886 i_momcmp_count=0
2887 xratmax=0.d0
2888 unwgt=.false.
2889@@ -194,38 +198,8 @@
2890 doreweight=.false.
2891 do_rwgt_scale=.false.
2892 do_rwgt_pdf=.false.
2893- do kchan=1,nchans
2894- do i=1,ndimmax
2895- do j=0,nintervals
2896- xgrid(j,i,kchan)=0.d0
2897- enddo
2898- enddo
2899- enddo
2900 else
2901- doreweight=do_rwgt_scale.or.do_rwgt_pdf
2902-c to restore grids:
2903- open (unit=12, file='mint_grids',status='old')
2904- ans(1,0)=0d0
2905- unc(1,0)=0d0
2906- do kchan=1,nchans
2907- do j=0,nintervals
2908- read (12,*) (xgrid(j,i,kchan),i=1,ndim)
2909- enddo
2910- do j=1,nintervals_virt
2911- do k=0,n_ord_virt
2912- read (12,*) (ave_virt(j,i,k,kchan),i=1,ndim)
2913- enddo
2914- enddo
2915- read(12,*) ans(1,kchan),unc(1,kchan),dummy,dummy
2916- $ ,nhits_in_grids(kchan)
2917- read(12,*) virtual_fraction(kchan),average_virtual(0
2918- $ ,kchan)
2919- ans(1,0)=ans(1,0)+ans(1,kchan)
2920- unc(1,0)=unc(1,0)+unc(1,kchan)**2
2921- enddo
2922- unc(1,0)=sqrt(unc(1,0))
2923- close (12)
2924- write (*,*) "Update iterations and points to",itmax,ncall
2925+ doreweight=do_rwgt_scale.or.do_rwgt_pdf.or.store_rwgt_info
2926 endif
2927 c
2928 write (*,*) 'imode is ',imode
2929@@ -236,44 +210,10 @@
2930 virtual_fraction(kchan)=1d0
2931 enddo
2932 endif
2933-C check for zero cross-section
2934-C if restoring grids corresponding to sigma=0, just terminate the run
2935- if (imode.ne.0.and.ans(1,0).eq.0d0.and.unc(1,0).eq.0d0) then
2936- call initplot()
2937- call close_run_zero_res(ncall, itmax, ndim)
2938- stop
2939- endif
2940- call mint(sigint,ndim,ncall,itmax,imode,xgrid,ymax
2941- $ ,ymax_virt,ans,unc,chi2,nhits_in_grids)
2942+ call mint(sigint)
2943 call topout
2944 call deallocate_weight_lines
2945- write(*,*)'Final result [ABS]:',ans(1,0),' +/-',unc(1,0)
2946- write(*,*)'Final result:',ans(2,0),' +/-',unc(2,0)
2947- write(*,*)'chi**2 per D.o.F.:',chi2(1,0)
2948- open(unit=58,file='results.dat',status='unknown')
2949- do kchan=0,nchans
2950- write(58,*) ans(1,kchan),unc(2,kchan),0d0,0,0,0,0,0d0,0d0
2951- $ ,ans(2,kchan)
2952- enddo
2953- close(58)
2954 c
2955-c to save grids:
2956- open (unit=12, file='mint_grids',status='unknown')
2957- do kchan=1,nchans
2958- do j=0,nintervals
2959- write (12,*) (xgrid(j,i,kchan),i=1,ndim)
2960- enddo
2961- do j=1,nintervals_virt
2962- do k=0,n_ord_virt
2963- write (12,*) (ave_virt(j,i,k,kchan),i=1,ndim)
2964- enddo
2965- enddo
2966- write (12,*) ans(1,kchan),unc(1,kchan),ncall,itmax
2967- $ ,nhits_in_grids(kchan)
2968- write (12,*) virtual_fraction(kchan),average_virtual(0
2969- $ ,kchan)
2970- enddo
2971- close (12)
2972 else
2973 write (*,*) 'Unknown imode',imode
2974 stop
2975@@ -351,7 +291,7 @@
2976 open (unit=12, file='res.dat',status='unknown')
2977 do kchan=0,nchans
2978 write (12,*)ans(1,kchan),unc(1,kchan),ans(2,kchan),unc(2,kchan)
2979- $ ,itmax,ncall,tTot
2980+ $ ,itmax,ncalls0,tTot
2981 enddo
2982 close(12)
2983
2984@@ -392,9 +332,9 @@
2985 double precision function sigint(xx,vegas_wgt,ifl,f)
2986 use weight_lines
2987 use extra_weights
2988+ use mint_module
2989 implicit none
2990 include 'nexternal.inc'
2991- include 'mint.inc'
2992 include 'nFKSconfigs.inc'
2993 include 'run.inc'
2994 include 'orders.inc'
2995@@ -410,8 +350,8 @@
2996 integer ini_fin_fks(maxchannels)
2997 common/fks_channels/ini_fin_fks
2998 data sum /.false./
2999- integer ndim
3000- common/tosigint/ndim
3001+ integer nndim
3002+ common/tosigint/nndim
3003 logical nbody
3004 common/cnbody/nbody
3005 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
3006@@ -419,9 +359,6 @@
3007 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
3008 double precision p_born(0:3,nexternal-1)
3009 common /pborn/ p_born
3010- double precision virt_wgt_mint(0:n_ave_virt),
3011- & born_wgt_mint(0:n_ave_virt)
3012- common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
3013 double precision virtual_over_born
3014 common/c_vob/virtual_over_born
3015 logical calculatedBorn
3016@@ -434,6 +371,9 @@
3017 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real
3018 integer ini_fin_fks_map(0:2,0:fks_configs)
3019 save ini_fin_fks_map
3020+ if (new_point .and. ifl.ne.2) then
3021+ pass_cuts_check=.false.
3022+ endif
3023 if (firsttime) then
3024 firsttime=.false.
3025 call setup_ini_fin_fks_map(ini_fin_fks_map)
3026@@ -479,14 +419,16 @@
3027 else
3028 jac=0.5d0
3029 endif
3030- call generate_momenta(ndim,iconfig,jac,x,p)
3031+ call generate_momenta(nndim,iconfig,jac,x,p)
3032 if (p_born(0,1).lt.0d0) goto 12
3033 call compute_prefactors_nbody(vegas_wgt)
3034 call set_cms_stuff(izero)
3035 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)
3036 if (passcuts_nbody) then
3037+ pass_cuts_check=.true.
3038 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))
3039 call set_alphaS(p1_cnt(0,1,0))
3040+ call include_multichannel_enhance(1)
3041 if (abrv(1:2).ne.'vi') then
3042 call compute_born
3043 endif
3044@@ -520,7 +462,7 @@
3045 wgt_me_real=0d0
3046 jac=MC_int_wgt
3047 call update_fks_dir(iFKS)
3048- call generate_momenta(ndim,iconfig,jac,x,p)
3049+ call generate_momenta(nndim,iconfig,jac,x,p)
3050 if (p_born(0,1).lt.0d0) cycle
3051 call compute_prefactors_n1body(vegas_wgt,jac)
3052 call set_cms_stuff(izero)
3053@@ -528,9 +470,11 @@
3054 call set_cms_stuff(mohdr)
3055 passcuts_n1body=passcuts(p,rwgt)
3056 if (passcuts_nbody .and. abrv.ne.'real') then
3057+ pass_cuts_check=.true.
3058 call set_cms_stuff(izero)
3059 if (ickkw.eq.3) call set_FxFx_scale(2,p1_cnt(0,1,0))
3060 call set_alphaS(p1_cnt(0,1,0))
3061+ call include_multichannel_enhance(3)
3062 call compute_soft_counter_term(0d0)
3063 call set_cms_stuff(ione)
3064 call compute_collinear_counter_term(0d0)
3065@@ -538,9 +482,11 @@
3066 call compute_soft_collinear_counter_term(0d0)
3067 endif
3068 if (passcuts_n1body) then
3069+ pass_cuts_check=.true.
3070 call set_cms_stuff(mohdr)
3071 if (ickkw.eq.3) call set_FxFx_scale(3,p)
3072 call set_alphaS(p)
3073+ call include_multichannel_enhance(2)
3074 call compute_real_emission(p,1d0)
3075 endif
3076 enddo
3077@@ -703,26 +649,26 @@
3078 end
3079
3080 subroutine update_vegas_x(xx,x)
3081+ use mint_module
3082 implicit none
3083- include 'mint.inc'
3084 integer i
3085 double precision xx(ndimmax),x(99),ran2
3086 external ran2
3087- integer ndim
3088- common/tosigint/ndim
3089- character*4 abrv
3090+ integer nndim
3091+ common/tosigint/nndim
3092+ character*4 abrv
3093 common /to_abrv/ abrv
3094 do i=1,99
3095 if (abrv.eq.'born'.or.abrv(1:2).eq.'vi') then
3096- if(i.le.ndim-3)then
3097+ if(i.le.nndim-3)then
3098 x(i)=xx(i)
3099- elseif(i.le.ndim) then
3100+ elseif(i.le.nndim) then
3101 x(i)=ran2() ! Choose them flat when not including real-emision
3102 else
3103 x(i)=0.d0
3104 endif
3105 else
3106- if(i.le.ndim)then
3107+ if(i.le.nndim)then
3108 x(i)=xx(i)
3109 else
3110 x(i)=0.d0
3111@@ -733,10 +679,11 @@
3112 end
3113
3114 c
3115- subroutine get_user_params(ncall,itmax,irestart)
3116+ subroutine get_user_params(ncall,nitmax,irestart)
3117 c**********************************************************************
3118 c Routine to get user specified parameters for run
3119 c**********************************************************************
3120+ use mint_module
3121 implicit none
3122 c
3123 c Constants
3124@@ -746,16 +693,15 @@
3125 include 'nFKSconfigs.inc'
3126 include 'fks_info.inc'
3127 include 'run.inc'
3128- include 'mint.inc'
3129 include 'orders.inc'
3130 c
3131 c Arguments
3132 c
3133- integer ncall,itmax
3134+ integer ncall,nitmax
3135 c
3136 c Local
3137 c
3138- integer i, j
3139+ integer i, j, kchan
3140 double precision dconfig(maxchannels)
3141 c
3142 c Global
3143@@ -789,8 +735,6 @@
3144 character * 70 idstring
3145 logical savegrid
3146
3147- logical usexinteg,mint
3148- common/cusexinteg/usexinteg,mint
3149 logical unwgt
3150 double precision evtsgn
3151 common /c_unwgt/evtsgn,unwgt
3152@@ -805,7 +749,6 @@
3153 c-----
3154 c Begin Code
3155 c-----
3156- mint=.true.
3157 unwgt=.false.
3158 open (unit=83,file='input_app.txt',status='old')
3159 done=.false.
3160@@ -817,8 +760,8 @@
3161 read(buffer,*) ncall
3162 write (*,*) 'Number of phase-space points per iteration:',ncall
3163 elseif(buffer(1:11).eq.'NITERATIONS') then
3164- read(buffer(14:),*) itmax
3165- write (*,*) 'Maximum number of iterations is:',itmax
3166+ read(buffer(14:),*) nitmax
3167+ write (*,*) 'Maximum number of iterations is:',nitmax
3168 elseif(buffer(1:8).eq.'ACCURACY') then
3169 read(buffer(11:),*) accuracy
3170 write (*,*) 'Desired accuracy is:',accuracy
3171
3172=== modified file 'Template/NLO/SubProcesses/driver_mintMC.f'
3173--- Template/NLO/SubProcesses/driver_mintMC.f 2018-09-21 13:46:51 +0000
3174+++ Template/NLO/SubProcesses/driver_mintMC.f 2020-05-23 19:29:41 +0000
3175@@ -3,6 +3,8 @@
3176 c This is the driver for the whole calculation
3177 c**************************************************************************
3178 use extra_weights
3179+ use mint_module
3180+ use FKSParams
3181 implicit none
3182 C
3183 C CONSTANTS
3184@@ -11,16 +13,13 @@
3185 parameter (ZERO = 0d0)
3186 include 'nexternal.inc'
3187 include 'genps.inc'
3188- INTEGER ITMAX, NCALL
3189-
3190- common/citmax/itmax,ncall
3191 integer ncall_virt,ncall_novi
3192 character*4 abrv
3193 common /to_abrv/ abrv
3194 C
3195 C LOCAL
3196 C
3197- integer i,j,k,l,l1,l2,ndim,nevts
3198+ integer i,j,k,l,l1,l2,nndim,nevts
3199
3200 integer lunlhe
3201 parameter (lunlhe=98)
3202@@ -30,10 +29,9 @@
3203 cc
3204 include 'run.inc'
3205 include 'coupl.inc'
3206- include "mint.inc"
3207
3208 c Vegas stuff
3209- common/tosigint/ndim
3210+ common/tosigint/nndim
3211
3212 real*8 sigintF
3213 external sigintF
3214@@ -47,34 +45,17 @@
3215
3216 double precision virtual_over_born
3217 common/c_vob/virtual_over_born
3218- double precision average_virtual(0:n_ave_virt,maxchannels)
3219- $ ,virtual_fraction(maxchannels)
3220- common/c_avg_virt/average_virtual,virtual_fraction
3221 include 'orders.inc'
3222- integer n_ord_virt
3223- common /c_n_ord_virt/n_ord_virt
3224
3225 double precision weight,event_weight,inv_bias
3226 character*7 event_norm
3227 common /event_normalisation/event_norm
3228-c For MINT:
3229- real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals
3230- $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals
3231- $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals
3232- $ ,0:maxchannels),x(ndimmax)
3233- integer ixi_i,iphi_i,iy_ij,vn,nhits_in_grids(maxchannels)
3234- integer ifold(ndimmax)
3235- common /cifold/ifold
3236- integer ifold_energy,ifold_phi,ifold_yij
3237- common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
3238+ integer ixi_i,iphi_i,iy_ij,vn
3239 logical putonshell
3240- logical only_virt
3241- integer imode
3242- common /c_imode/imode,only_virt
3243 logical unwgt
3244 double precision evtsgn
3245 common /c_unwgt/evtsgn,unwgt
3246- double precision ran2
3247+ double precision ran2,x(ndimmax)
3248 external ran2
3249
3250 integer ifile,ievents
3251@@ -94,11 +75,6 @@
3252 include "timing_variables.inc"
3253 real*4 tOther, tTot
3254
3255-c general MadFKS parameters
3256- include "FKSParams.inc"
3257- logical fixed_order,nlo_ps
3258- common /c_fnlo_nlops/fixed_order,nlo_ps
3259-
3260 double precision deravg,derstd,dermax,xi_i_fks_ev_der_max
3261 & ,y_ij_fks_ev_der_max
3262 integer ntot_granny,derntot,ncase(0:6)
3263@@ -110,6 +86,9 @@
3264 C-----
3265 C BEGIN CODE
3266 C-----
3267+c Write the process PID in the log.txt files (i.e., to the screen)
3268+ write (*,*) getpid()
3269+
3270 call cpu_time(tBefore)
3271 fixed_order=.false.
3272 nlo_ps=.true.
3273@@ -122,6 +101,7 @@
3274 c Read general MadFKS parameters
3275 c
3276 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)
3277+ min_virt_fraction_mint=min_virt_fraction
3278 do i=0,n_ave_virt
3279 average_virtual(i,1)=0d0
3280 enddo
3281@@ -158,11 +138,11 @@
3282 c Get user input
3283 c
3284 write(*,*) "getting user params"
3285- call get_user_params(ncall,itmax,imode,
3286+ call get_user_params(ncalls0,itmax,
3287 & ixi_i,iphi_i,iy_ij,SHsep)
3288 c Only do the reweighting when actually generating the events
3289 if (imode.eq.2) then
3290- doreweight=do_rwgt_scale.or.do_rwgt_pdf
3291+ doreweight=do_rwgt_scale.or.do_rwgt_pdf.or.store_rwgt_info
3292 else
3293 doreweight=.false.
3294 do_rwgt_scale=.false.
3295@@ -182,6 +162,7 @@
3296 ndim = 3*(nexternal-nincoming)-4
3297 if (abs(lpp(1)) .ge. 1) ndim=ndim+1
3298 if (abs(lpp(2)) .ge. 1) ndim=ndim+1
3299+ nndim=ndim
3300 c Don''t proceed if muF1#muF2 (we need to work out the relevant formulae
3301 c at the NLO)
3302 if( ( fixed_fac_scale .and.
3303@@ -192,146 +173,46 @@
3304 write(*,*)'NLO computations require muF1=muF2'
3305 stop
3306 endif
3307- write(*,*) "about to integrate ", ndim,ncall,itmax,iconfig
3308+ write(*,*) "about to integrate ", ndim,ncalls0,itmax,iconfig
3309 i_momcmp_count=0
3310 xratmax=0.d0
3311 unwgt=.false.
3312+c Prepare the MINT folding
3313+ do j=1,ndimmax
3314+ if (j.le.ndim) then
3315+ ifold(j)=1
3316+ else
3317+ ifold(j)=0
3318+ endif
3319+ enddo
3320+ ifold_energy=ndim-2
3321+ ifold_yij=ndim-1
3322+ ifold_phi=ndim
3323+ ifold(ifold_energy)=ixi_i
3324+ ifold(ifold_phi)=iphi_i
3325+ ifold(ifold_yij)=iy_ij
3326
3327 c*************************************************************
3328 c setting of the grids
3329 c*************************************************************
3330 if (imode.eq.-1.or.imode.eq.0) then
3331- if(imode.eq.0)then
3332-c initialize grids
3333- do j=0,nintervals
3334- do i=1,ndimmax
3335- xgrid(j,i,1)=0.d0
3336- enddo
3337- enddo
3338- else
3339-c to restore grids:
3340- open (unit=12, file='mint_grids',status='old')
3341- do j=0,nintervals
3342- read (12,*) (xgrid(j,i,1),i=1,ndim)
3343- enddo
3344- do j=1,nintervals_virt
3345- do k=0,n_ord_virt
3346- read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
3347- enddo
3348- enddo
3349- read (12,*) (ans(i,1),i=1,nintegrals)
3350- read (12,*) ifold_energy,ifold_phi,ifold_yij
3351- read (12,*) virtual_fraction(1),average_virtual(0,1)
3352- close (12)
3353- endif
3354-c
3355 write (*,*) 'imode is ',imode
3356- call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt
3357- $ ,ans,unc,chi2,nhits_in_grids)
3358+ call mint(sigintF)
3359 call deallocate_weight_lines
3360- open(unit=58,file='res_0',status='unknown')
3361- write(58,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1)
3362- write(58,*)'Final result:',ans(2,1),' +/-',unc(2,1)
3363- close(58)
3364- write(*,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1)
3365- write(*,*)'Final result:',ans(2,1),' +/-',unc(2,1)
3366- write(*,*)'chi**2 per D.o.F.:',chi2(1,1)
3367 open(unit=58,file='results.dat',status='unknown')
3368 write(58,*) ans(1,1),unc(2,1),0d0,0,0,0,0,0d0,0d0,ans(2,1)
3369 close(58)
3370-c
3371-c to save grids:
3372- open (unit=12, file='mint_grids',status='unknown')
3373- do j=0,nintervals
3374- write (12,*) (xgrid(j,i,1),i=1,ndim)
3375- enddo
3376- do j=1,nintervals_virt
3377- do k=0,n_ord_virt
3378- write (12,*) (ave_virt(j,i,k,1),i=1,ndim)
3379- enddo
3380- enddo
3381- write (12,*) (ans(i,1),i=1,nintegrals)
3382- write (12,*) ifold_energy,ifold_phi,ifold_yij
3383- write (12,*) virtual_fraction(1),average_virtual(0,1)
3384- close (12)
3385-
3386 c*************************************************************
3387 c computation of upper bounding envelope
3388 c*************************************************************
3389 elseif(imode.eq.1) then
3390-c to restore grids:
3391- open (unit=12, file='mint_grids',status='old')
3392- do j=0,nintervals
3393- read (12,*) (xgrid(j,i,1),i=1,ndim)
3394- enddo
3395- do j=1,nintervals_virt
3396- do k=0,n_ord_virt
3397- read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
3398- enddo
3399- enddo
3400- read (12,*) (ans(i,1),i=1,nintegrals)
3401- read (12,*) ifold_energy,ifold_phi,ifold_yij
3402- read (12,*) virtual_fraction(1),average_virtual(0,1)
3403- close (12)
3404-
3405-c Prepare the MINT folding
3406- do j=1,ndimmax
3407- if (j.le.ndim) then
3408- ifold(j)=1
3409- else
3410- ifold(j)=0
3411- endif
3412- enddo
3413- ifold(ifold_energy)=ixi_i
3414- ifold(ifold_phi)=iphi_i
3415- ifold(ifold_yij)=iy_ij
3416-
3417 write (*,*) 'imode is ',imode
3418- call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt
3419- $ ,ans,unc,chi2,nhits_in_grids)
3420+ call mint(sigintF)
3421 call deallocate_weight_lines
3422-
3423-c If integrating the virtuals alone, we include the virtuals in
3424-c ans(1). Therefore, no need to have them in ans(5) and we have to set
3425-c them to zero.
3426- if (only_virt) then
3427- ans(3,1)=0d0 ! virtual Xsec
3428- ans(5,1)=0d0 ! ABS virtual Xsec
3429- endif
3430-
3431- open(unit=58,file='res_1',status='unknown')
3432- write(58,*)'Final result [ABS]:',ans(1,1)+ans(5,1),' +/-'
3433- $ ,sqrt(unc(1,1)**2+unc(5,1)**2)
3434- write(58,*)'Final result:',ans(2,1),' +/-',unc(2,1)
3435- close(58)
3436- write(*,*)'Final result [ABS]:',ans(1,1)+ans(5,1),' +/-'
3437- $ ,sqrt(unc(1,1)**2+unc(5,1)**2)
3438- write(*,*)'Final result:',ans(2,1),' +/-',unc(2,1)
3439- write(*,*)'chi**2 per D.o.F.:',chi2(1,1)
3440-c write the results.dat file
3441 open(unit=58,file='results.dat',status='unknown')
3442- write(58,*)ans(1,1)+ans(5,1), unc(2,1), 0d0, 0, 0, 0, 0, 0d0 ,0d0, ans(2,1)
3443+ write(58,*) ans(1,1)+ans(5,1),unc(2,1),0d0,0,0,0,0,0d0,0d0
3444+ $ ,ans(2,1)
3445 close(58)
3446-
3447-c to save grids:
3448- open (unit=12, file='mint_grids',status='unknown')
3449- write (12,*) (xgrid(0,i,1),i=1,ndim)
3450- do j=1,nintervals
3451- write (12,*) (xgrid(j,i,1),i=1,ndim)
3452- write (12,*) (ymax(j,i,1),i=1,ndim)
3453- enddo
3454- do j=1,nintervals_virt
3455- do k=0,n_ord_virt
3456- write (12,*) (ave_virt(j,i,k,1),i=1,ndim)
3457- enddo
3458- enddo
3459- write (12,*) ymax_virt(1)
3460- write (12,*) (ifold(i),i=1,ndim)
3461- write (12,*) (ans(i,1),i=1,nintegrals)
3462- write (12,*) (unc(i,1),i=1,nintegrals)
3463- write (12,*) virtual_fraction(1),average_virtual(0,1)
3464- close (12)
3465-
3466 c*************************************************************
3467 c event generation
3468 c*************************************************************
3469@@ -354,30 +235,15 @@
3470 & 'No events needed for this channel...skipping it'
3471 stop
3472 endif
3473- ncall=nevts ! Update ncall with the number found in 'nevts'
3474-
3475-c to restore grids:
3476- open (unit=12, file='mint_grids',status='unknown')
3477- read (12,*) (xgrid(0,i,1),i=1,ndim)
3478- do j=1,nintervals
3479- read (12,*) (xgrid(j,i,1),i=1,ndim)
3480- read (12,*) (ymax(j,i,1),i=1,ndim)
3481- enddo
3482- do j=1,nintervals_virt
3483- do k=0,n_ord_virt
3484- read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
3485- enddo
3486- enddo
3487- read (12,*) ymax_virt(1)
3488- read (12,*) (ifold(i),i=1,ndim)
3489- read (12,*) (ans(i,1),i=1,nintegrals)
3490- read (12,*) (unc(i,1),i=1,nintegrals)
3491- read (12,*) virtual_fraction(1),average_virtual(0,1)
3492- close (12)
3493+ ncalls0=nevts ! Update ncall with the number found in 'nevts'
3494+
3495+c to restore grids:
3496+
3497+ call read_grids_from_file
3498
3499 c determine how many events for the virtual and how many for the no-virt
3500- ncall_virt=int(ans(5,1)/(ans(1,1)+ans(5,1)) * ncall)
3501- ncall_novi=ncall-ncall_virt
3502+ ncall_virt=int(ans(5,1)/(ans(1,1)+ans(5,1)) * ncalls0)
3503+ ncall_novi=ncalls0-ncall_virt
3504
3505 write (*,*) "Generating virt :: novi approx.",ncall_virt
3506 $ ,ncall_novi
3507@@ -386,13 +252,13 @@
3508
3509 c fill the information for the write_header_init common block
3510 ifile=lunlhe
3511- ievents=ncall
3512+ ievents=ncalls0
3513 inter=ans(2,1)
3514 absint=ans(1,1)+ans(5,1)
3515 uncer=unc(2,1)
3516
3517 if (event_norm(1:4).ne.'bias') then
3518- weight=(ans(1,1)+ans(5,1))/ncall
3519+ weight=(ans(1,1)+ans(5,1))/ncalls0
3520 else
3521 weight=event_weight
3522 endif
3523@@ -405,25 +271,25 @@
3524
3525 write (*,*) 'imode is ',imode
3526 vn=-1
3527- call gen(sigintF,ndim,xgrid,ymax,ymax_virt,0,x,vn)
3528- do j=1,ncall
3529+ call gen(sigintF,0,vn,x)
3530+ do j=1,ncalls0
3531 if (abrv(1:4).eq.'born') then
3532 vn=3
3533- call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)
3534+ call gen(sigintF,1,vn,x)
3535 else
3536 if (ran2().lt.ans(5,1)/(ans(1,1)+ans(5,1)) .or. only_virt) then
3537 abrv='virt'
3538 if (only_virt) then
3539 vn=2
3540- call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)
3541+ call gen(sigintF,1,vn,x)
3542 else
3543 vn=1
3544- call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)
3545+ call gen(sigintF,1,vn,x)
3546 endif
3547 else
3548 abrv='novi'
3549 vn=2
3550- call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)
3551+ call gen(sigintF,1,vn,x)
3552 endif
3553 endif
3554 c Randomly pick the contribution that will be written in the event file
3555@@ -438,14 +304,7 @@
3556 enddo
3557 call deallocate_weight_lines
3558 vn=-1
3559- call gen(sigintF,ndim,xgrid,ymax,ymax_virt,3,x,vn)
3560- write (*,*) 'Generation efficiencies:',x(1),x(4)
3561-c Uncomment the next to lines to print the integral from the PS points
3562-c trown during event generation. This corresponds only to the cross
3563-c section if these points are thrown flat, so not using the xmmm() stuff
3564-c in mint.
3565-c write (*,*) 'Integral from novi points computed',x(2),x(3)
3566-c write (*,*) 'Integral from virt points computed',x(5),x(6)
3567+ call gen(sigintF,3,vn,x) ! print counters generation efficiencies
3568 write (lunlhe,'(a)') "</LesHouchesEvents>"
3569 close(lunlhe)
3570 endif
3571@@ -528,10 +387,10 @@
3572
3573 open (unit=12, file='res.dat',status='unknown')
3574 if (imode.eq.0) then
3575- write (12,*)ans(1,1),unc(1,1),ans(2,1),unc(2,1),itmax,ncall,tTot
3576+ write (12,*)ans(1,1),unc(1,1),ans(2,1),unc(2,1),itmax,ncalls0,tTot
3577 else
3578 write (12,*)ans(1,1)+ans(5,1),sqrt(unc(1,1)**2+unc(5,1)**2),ans(2,1)
3579- $ ,unc(2,1),itmax,ncall,tTot
3580+ $ ,unc(2,1),itmax,ncalls0,tTot
3581 endif
3582 close(12)
3583
3584@@ -565,25 +424,25 @@
3585 end
3586
3587
3588- subroutine get_user_params(ncall,itmax,
3589- & imode,ixi_i,iphi_i,iy_ij,SHsep)
3590+ subroutine get_user_params(ncall,nitmax,
3591+ & ixi_i,iphi_i,iy_ij,SHsep)
3592 c**********************************************************************
3593 c Routine to get user specified parameters for run
3594 c**********************************************************************
3595+ use mint_module
3596 implicit none
3597 c
3598 c Constants
3599 c
3600 include 'nexternal.inc'
3601 include 'genps.inc'
3602- include 'mint.inc'
3603 include 'nFKSconfigs.inc'
3604 include 'fks_info.inc'
3605 include 'run.inc'
3606 c
3607 c Arguments
3608 c
3609- integer ncall,itmax,jconfig
3610+ integer ncall,nitmax
3611 c
3612 c Local
3613 c
3614@@ -633,19 +492,14 @@
3615 c
3616 c MINT stuff
3617 c
3618- integer imode,ixi_i,iphi_i,iy_ij
3619-
3620- logical usexinteg,mint
3621- common/cusexinteg/usexinteg,mint
3622+ integer ixi_i,iphi_i,iy_ij
3623
3624 c-----
3625 c Begin Code
3626 c-----
3627- mint=.true.
3628- usexinteg=.false.
3629 write(*,'(a)') 'Enter number of events and iterations: '
3630- read(*,*) ncall,itmax
3631- write(*,*) 'Number of events and iterations ',ncall,itmax
3632+ read(*,*) ncall,nitmax
3633+ write(*,*) 'Number of events and iterations ',ncall,nitmax
3634
3635 write(*,'(a)') 'Enter desired fractional accuracy: '
3636 read(*,*) accuracy
3637@@ -736,7 +590,7 @@
3638 write (*,*) 'MINT running mode:',imode
3639 if (imode.eq.2)then
3640 write (*,*) 'Generating events, doing only one iteration'
3641- itmax=1
3642+ nitmax=1
3643 endif
3644
3645 write (*,'(a)') 'Set the three folding parameters for MINT'
3646@@ -790,8 +644,8 @@
3647
3648 function sigintF(xx,vegas_wgt,ifl,f)
3649 use weight_lines
3650+ use mint_module
3651 implicit none
3652- include 'mint.inc'
3653 include 'nexternal.inc'
3654 include 'nFKSconfigs.inc'
3655 include 'run.inc'
3656@@ -817,25 +671,22 @@
3657 common/ccalculatedBorn/calculatedBorn
3658 logical MCcntcalled
3659 common/c_MCcntcalled/MCcntcalled
3660- double precision virt_wgt_mint(0:n_ave_virt),
3661- & born_wgt_mint(0:n_ave_virt)
3662- common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
3663 double precision virtual_over_born
3664 common /c_vob/ virtual_over_born
3665 logical nbody
3666 common/cnbody/nbody
3667- integer ndim
3668- common/tosigint/ndim
3669+ integer nndim
3670+ common/tosigint/nndim
3671 character*4 abrv
3672 common /to_abrv/ abrv
3673 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
3674 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
3675 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
3676- logical only_virt
3677- integer imode
3678- common /c_imode/imode,only_virt
3679 double precision wgt_ME_born,wgt_ME_real
3680 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real
3681+ if (new_point .and. ifl.ne.2) then
3682+ pass_cuts_check=.false.
3683+ endif
3684 sigintF=0d0
3685 c Find the nFKSprocess for which we compute the Born-like contributions
3686 if (firsttime) then
3687@@ -887,15 +738,17 @@
3688 else
3689 jac=0.5d0
3690 endif
3691- call generate_momenta(ndim,iconfig,jac,x,p)
3692+ call generate_momenta(nndim,iconfig,jac,x,p)
3693 if (p_born(0,1).lt.0d0) goto 12
3694 call compute_prefactors_nbody(vegas_wgt)
3695 call set_cms_stuff(izero)
3696 call set_shower_scale_noshape(p,nFKS_picked_nbody*2-1)
3697 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)
3698 if (passcuts_nbody) then
3699+ pass_cuts_check=.true.
3700 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))
3701 call set_alphaS(p1_cnt(0,1,0))
3702+ call include_multichannel_enhance(1)
3703 if (abrv(1:2).ne.'vi') then
3704 call compute_born
3705 endif
3706@@ -926,7 +779,7 @@
3707 gfactsf=1.d0
3708 gfactcl=1.d0
3709 MCcntcalled=.false.
3710- call generate_momenta(ndim,iconfig,jac,x,p)
3711+ call generate_momenta(nndim,iconfig,jac,x,p)
3712 c Every contribution has to have a viable set of Born momenta (even if
3713 c counter-event momenta do not exist).
3714 if (p_born(0,1).lt.0d0) cycle
3715@@ -970,11 +823,13 @@
3716 endif
3717 endif
3718 if (passcuts_nbody .and. abrv.ne.'real') then
3719+ pass_cuts_check=.true.
3720 c Include the MonteCarlo subtraction terms
3721 if (ickkw.ne.4) then
3722 call set_cms_stuff(mohdr)
3723 if (ickkw.eq.3) call set_FxFx_scale(-3,p)
3724 call set_alphaS(p)
3725+ call include_multichannel_enhance(4)
3726 call compute_MC_subt_term(p,gfactsf,gfactcl,probne)
3727 else
3728 c For UNLOPS all real-emission contributions need to be added to the
3729@@ -989,6 +844,7 @@
3730 call set_cms_stuff(izero)
3731 if (ickkw.eq.3) call set_FxFx_scale(-2,p1_cnt(0,1,0))
3732 call set_alphaS(p1_cnt(0,1,0))
3733+ call include_multichannel_enhance(3)
3734 replace_MC_subt=(1d0-gfactsf)*probne
3735 call compute_soft_counter_term(replace_MC_subt)
3736 call set_cms_stuff(ione)
3737@@ -1000,9 +856,11 @@
3738 endif
3739 c Include the real-emission contribution.
3740 if (passcuts_n1body) then
3741+ pass_cuts_check=.true.
3742 call set_cms_stuff(mohdr)
3743 if (ickkw.eq.3) call set_FxFx_scale(-3,p)
3744 call set_alphaS(p)
3745+ call include_multichannel_enhance(2)
3746 sudakov_damp=probne
3747 call compute_real_emission(p,sudakov_damp)
3748 endif
3749@@ -1280,26 +1138,26 @@
3750 end
3751
3752 subroutine update_vegas_x(xx,x)
3753+ use mint_module
3754 implicit none
3755- include 'mint.inc'
3756 integer i
3757 double precision xx(ndimmax),x(99),ran2
3758 external ran2
3759- integer ndim
3760- common/tosigint/ndim
3761- character*4 abrv
3762+ integer nndim
3763+ common/tosigint/nndim
3764+ character*4 abrv
3765 common /to_abrv/ abrv
3766 do i=1,99
3767 if (abrv.eq.'born') then
3768- if(i.le.ndim-3)then
3769+ if(i.le.nndim-3)then
3770 x(i)=xx(i)
3771- elseif(i.le.ndim) then
3772+ elseif(i.le.nndim) then
3773 x(i)=ran2() ! Choose them flat when not including real-emision
3774 else
3775 x(i)=0.d0
3776 endif
3777 else
3778- if(i.le.ndim)then
3779+ if(i.le.nndim)then
3780 x(i)=xx(i)
3781 else
3782 x(i)=0.d0
3783
3784=== modified file 'Template/NLO/SubProcesses/fks_singular.f'
3785--- Template/NLO/SubProcesses/fks_singular.f 2018-11-21 15:25:36 +0000
3786+++ Template/NLO/SubProcesses/fks_singular.f 2020-05-23 19:29:41 +0000
3787@@ -176,13 +176,13 @@
3788 c This subroutine computes the soft-virtual matrix elements and adds its
3789 c value to the list of weights using the add_wgt subroutine
3790 use extra_weights
3791+ use mint_module
3792 implicit none
3793 include 'nexternal.inc'
3794 include 'coupl.inc'
3795 include 'run.inc'
3796 include 'timing_variables.inc'
3797 include 'orders.inc'
3798- include 'mint.inc'
3799 integer orders(nsplitorders)
3800 integer iamp, i
3801 double precision amp_split_virt(amp_split_size),
3802@@ -203,9 +203,6 @@
3803 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
3804 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
3805 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
3806- double precision virt_wgt_mint(0:n_ave_virt),
3807- & born_wgt_mint(0:n_ave_virt)
3808- common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
3809 double precision xiimax_cnt(-2:2)
3810 common /cxiimaxcnt/xiimax_cnt
3811 double precision xi_i_hat_ev,xi_i_hat_cnt(-2:2)
3812@@ -976,23 +973,17 @@
3813 c i.e. all the nbody contributions. Also initialises the plots and
3814 c bpower.
3815 use extra_weights
3816+ use mint_module
3817 implicit none
3818 include 'nexternal.inc'
3819 include 'run.inc'
3820 include 'genps.inc'
3821 include 'timing_variables.inc'
3822- double precision pi,vegas_wgt,enhance,xnoborn_cnt,xtot
3823- $ ,bpower,cpower,tiny
3824- data xnoborn_cnt /0d0/
3825- integer inoborn_cnt,i
3826- data inoborn_cnt /0/
3827- double precision wgt_c
3828+ double precision pi,vegas_wgt
3829+ integer i
3830 logical firsttime
3831 data firsttime /.true./
3832 parameter (pi=3.1415926535897932385d0)
3833- parameter (tiny=1d-6)
3834- double precision p_born(0:3,nexternal-1)
3835- common/pborn/ p_born
3836 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
3837 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
3838 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
3839@@ -1009,12 +1000,6 @@
3840 integer ngluons,nquarks(-6:6),nphotons
3841 common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
3842 & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
3843- integer mapconfig(0:lmaxconfigs), iconfig
3844- common/to_mconfigs/mapconfig, iconfig
3845- Double Precision amp2(ngraphs), jamp2(0:ncolor)
3846- common/to_amps/ amp2, jamp2
3847- double precision diagramsymmetryfactor
3848- common /dsymfactor/diagramsymmetryfactor
3849 double precision f_b,f_nb
3850 common /factor_nbody/ f_b,f_nb
3851 integer iappl
3852@@ -1025,8 +1010,6 @@
3853 external ran2
3854 real*8 rndec(10)
3855 common/crndec/rndec
3856- logical fixed_order,nlo_ps
3857- common /c_fnlo_nlops/fixed_order,nlo_ps
3858 include "appl_common.inc"
3859 !!!include "orders.inc"
3860 call cpu_time(tBefore)
3861@@ -1043,138 +1026,70 @@
3862 if (fixed_order) call initplot
3863 firsttime=.false.
3864 endif
3865-c Compute the multi-channel enhancement factor 'enhance'.
3866- enhance=1.d0
3867- if (p_born(0,1).gt.0d0) then
3868- call sborn(p_born,wgt_c)
3869- elseif(p_born(0,1).lt.0d0)then
3870- enhance=0d0
3871- endif
3872- if (enhance.eq.0d0)then
3873- xnoborn_cnt=xnoborn_cnt+1.d0
3874- if(log10(xnoborn_cnt).gt.inoborn_cnt)then
3875- write (*,*) 'WARNING: no Born momenta more than 10**',
3876- $ inoborn_cnt,'times'
3877- inoborn_cnt=inoborn_cnt+1
3878- endif
3879- else
3880- xtot=0d0
3881- if (mapconfig(0).eq.0) then
3882- write (*,*) 'Fatal error in compute_prefactor_nbody:'/
3883- & /' no Born diagrams ',mapconfig,
3884- & '. Check bornfromreal.inc'
3885- write (*,*) 'Is fks_singular compiled correctly?'
3886- stop 1
3887- endif
3888- do i=1, mapconfig(0)
3889- xtot=xtot+amp2(mapconfig(i))
3890- enddo
3891- if (xtot.ne.0d0) then
3892- enhance=amp2(mapconfig(iconfig))/xtot
3893- enhance=enhance*diagramsymmetryfactor
3894- else
3895- enhance=0d0
3896- endif
3897- endif
3898 call set_cms_stuff(0)
3899 c f_* multiplication factors for Born and nbody
3900 f_b=jac_cnt(0)*xinorm_ev/(min(xiimax_ev,xiBSVcut_used)*shat/(16
3901- $ *pi**2))*enhance*fkssymmetryfactorBorn*vegas_wgt
3902+ $ *pi**2))*fkssymmetryfactorBorn*vegas_wgt
3903 f_nb=f_b
3904 call cpu_time(tAfter)
3905 tf_nb=tf_nb+(tAfter-tBefore)
3906 return
3907 end
3908
3909- subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
3910-c Compute all relevant prefactors for the real emission and counter
3911-c terms.
3912+
3913+ subroutine include_multichannel_enhance(imode)
3914 implicit none
3915 include 'nexternal.inc'
3916 include 'run.inc'
3917 include 'genps.inc'
3918- include 'fks_powers.inc'
3919- include 'coupl.inc'
3920 include 'timing_variables.inc'
3921- double precision vegas_wgt,enhance,xnoborn_cnt,xtot
3922- & ,prefact,prefact_cnt_ssc,prefact_deg,prefact_c,prefact_coll
3923- & ,jac_ev,pi,prefact_cnt_ssc_c,prefact_coll_c,prefact_deg_slxi
3924- & ,prefact_deg_sxi,zero,enhance_real
3925- parameter (pi=3.1415926535897932385d0, zero=0d0)
3926+ double precision xnoborn_cnt,xtot,wgt_c,enhance,enhance_real
3927+ $ ,pas(0:3,nexternal)
3928 data xnoborn_cnt /0d0/
3929- integer inoborn_cnt,i
3930+ integer inoborn_cnt,i,imode
3931 data inoborn_cnt /0/
3932- double precision wgt_c
3933 double precision p_born(0:3,nexternal-1)
3934 common/pborn/ p_born
3935 double precision p_born_ev(0:3,nexternal-1)
3936- common/pborn_ev/p_born_ev
3937+ common/pborn_ev/ p_born_ev
3938+ double precision p_ev(0:3,nexternal)
3939+ common/pev/ p_ev
3940 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
3941 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
3942 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
3943- double precision xi_i_fks_ev,y_ij_fks_ev
3944- double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
3945- common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
3946- integer i_fks,j_fks
3947- common/fks_indices/i_fks,j_fks
3948- double precision xi_i_fks_cnt(-2:2)
3949- common /cxiifkscnt/xi_i_fks_cnt
3950- double precision xinorm_ev
3951- common /cxinormev/xinorm_ev
3952- double precision xiimax_ev
3953- common /cxiimaxev/xiimax_ev
3954- double precision xiimax_cnt(-2:2)
3955- common /cxiimaxcnt/xiimax_cnt
3956- double precision xinorm_cnt(-2:2)
3957- common /cxinormcnt/xinorm_cnt
3958- double precision delta_used
3959- common /cdelta_used/delta_used
3960- double precision xicut_used
3961- common /cxicut_used/xicut_used
3962- double precision xiScut_used,xiBSVcut_used
3963- common /cxiScut_used/xiScut_used,xiBSVcut_used
3964- double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
3965- common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
3966- double precision fkssymmetryfactor,fkssymmetryfactorBorn,
3967- & fkssymmetryfactorDeg
3968- integer ngluons,nquarks(-6:6),nphotons
3969- common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
3970- & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
3971 integer mapconfig(0:lmaxconfigs), iconfig
3972 common/to_mconfigs/mapconfig, iconfig
3973 Double Precision amp2(ngraphs), jamp2(0:ncolor)
3974 common/to_amps/ amp2, jamp2
3975 double precision diagramsymmetryfactor
3976 common /dsymfactor/diagramsymmetryfactor
3977- logical nocntevents
3978- common/cnocntevents/nocntevents
3979+ double precision f_b,f_nb
3980+ common /factor_nbody/ f_b,f_nb
3981+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
3982+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
3983+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
3984+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
3985+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
3986+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
3987+ double precision f_dis_d,f_dis_p,f_dis_l
3988+ common/factor_dis/f_dis_d,f_dis_p,f_dis_l
3989 integer igranny,iaunt
3990 logical granny_chain(-nexternal:nexternal),granny_is_res
3991 & ,granny_chain_real_final(-nexternal:nexternal)
3992 common /c_granny_res/igranny,iaunt,granny_is_res,granny_chain
3993 & ,granny_chain_real_final
3994- double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
3995- common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
3996- double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
3997- $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
3998- common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
3999- $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
4000- ! prefactors for the DIS scheme
4001- double precision prefact_dis_d,prefact_dis_p,prefact_dis_l
4002- double precision f_dis_d,f_dis_p,f_dis_l
4003- common/factor_dis/f_dis_d,f_dis_p,f_dis_l
4004 logical calculatedBorn
4005 common/ccalculatedBorn/calculatedBorn
4006- double precision pmass(nexternal)
4007- include 'pmass.inc'
4008+
4009 call cpu_time(tBefore)
4010+
4011+c Compute the multi-channel enhancement factor 'enhance'.
4012 enhance=1.d0
4013 if (p_born(0,1).gt.0d0) then
4014 call sborn(p_born,wgt_c)
4015 elseif(p_born(0,1).lt.0d0)then
4016 enhance=0d0
4017 endif
4018-c Compute the multi-channel enhancement factor 'enhance'.
4019 if (enhance.eq.0d0)then
4020 xnoborn_cnt=xnoborn_cnt+1.d0
4021 if(log10(xnoborn_cnt).gt.inoborn_cnt)then
4022@@ -1185,9 +1100,9 @@
4023 else
4024 xtot=0d0
4025 if (mapconfig(0).eq.0) then
4026- write (*,*) 'Fatal error in compute_prefactor_n1body,'/
4027- & /' no Born diagrams ',mapconfig
4028- & ,'. Check bornfromreal.inc'
4029+ write (*,*) 'Fatal error in compute_prefactor_nbody:'/
4030+ & /' no Born diagrams ',mapconfig,
4031+ & '. Check bornfromreal.inc'
4032 write (*,*) 'Is fks_singular compiled correctly?'
4033 stop 1
4034 endif
4035@@ -1202,11 +1117,17 @@
4036 endif
4037 endif
4038
4039+c In the case there is the special phase-space mapping for resonances,
4040+c use the Born computed with those as the mapping.
4041 enhance_real=1.d0
4042- if (granny_is_res) then
4043+ if (granny_is_res .and. imode.eq.2) then
4044 if (p_born_ev(0,1).gt.0d0) then
4045 calculatedBorn=.false.
4046+ pas(0:3,nexternal)=0d0
4047+ pas(0:3,1:nexternal-1)=p_born_ev(0:3,1:nexternal-1)
4048+ call set_alphas(pas)
4049 call sborn(p_born_ev,wgt_c)
4050+ call set_alphas(p_ev)
4051 calculatedBorn=.false.
4052 elseif(p_born_ev(0,1).lt.0d0)then
4053 if (enhance.ne.0d0) then
4054@@ -1246,18 +1167,114 @@
4055 enhance_real=enhance
4056 endif
4057
4058+ if (imode.eq.1) then
4059+ f_b= f_b *enhance
4060+ f_nb= f_nb *enhance
4061+ elseif(imode.eq.2) then
4062+ f_r= f_r *enhance_real
4063+ elseif(imode.eq.4) then
4064+ f_MC_S= f_MC_S *enhance
4065+ f_MC_H= f_MC_H *enhance
4066+ elseif(imode.eq.3) then
4067+ f_s= f_s *enhance
4068+ f_s_MC_S= f_s_MC_S *enhance
4069+ f_S_MC_H= f_S_MC_H *enhance
4070+ f_c= f_c *enhance
4071+ f_c_MC_S= f_c_MC_S *enhance
4072+ f_c_MC_H= f_c_MC_H *enhance
4073+ f_dc= f_dc *enhance
4074+ f_sc= f_sc *enhance
4075+ f_sc_MC_S=f_sc_MC_S*enhance
4076+ f_sc_MC_H=f_sc_MC_H*enhance
4077+ f_dsc(1)= f_dsc(1) *enhance
4078+ f_dsc(2)= f_dsc(2) *enhance
4079+ f_dsc(3)= f_dsc(3) *enhance
4080+ f_dsc(4)= f_dsc(4) *enhance
4081+ f_dis_d= f_dis_d *enhance
4082+ f_dis_p= f_dis_p *enhance
4083+ f_dis_l= f_dis_l *enhance
4084+ endif
4085+ call cpu_time(tAfter)
4086+ tf_nb=tf_nb+(tAfter-tBefore)
4087+
4088+ return
4089+ end
4090+
4091+
4092+ subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
4093+c Compute all relevant prefactors for the real emission and counter
4094+c terms.
4095+ implicit none
4096+ include 'nexternal.inc'
4097+ include 'run.inc'
4098+ include 'genps.inc'
4099+ include 'fks_powers.inc'
4100+ include 'coupl.inc'
4101+ include 'timing_variables.inc'
4102+ double precision vegas_wgt,prefact,prefact_cnt_ssc,prefact_deg
4103+ $ ,prefact_c,prefact_coll,jac_ev,pi,prefact_cnt_ssc_c
4104+ $ ,prefact_coll_c,prefact_deg_slxi,prefact_deg_sxi,zero
4105+ integer i
4106+ parameter (pi=3.1415926535897932385d0, ZERO=0d0)
4107+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
4108+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
4109+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
4110+ double precision xi_i_fks_ev,y_ij_fks_ev
4111+ double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
4112+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
4113+ integer i_fks,j_fks
4114+ common/fks_indices/i_fks,j_fks
4115+ double precision xi_i_fks_cnt(-2:2)
4116+ common /cxiifkscnt/xi_i_fks_cnt
4117+ double precision xinorm_ev
4118+ common /cxinormev/xinorm_ev
4119+ double precision xiimax_ev
4120+ common /cxiimaxev/xiimax_ev
4121+ double precision xiimax_cnt(-2:2)
4122+ common /cxiimaxcnt/xiimax_cnt
4123+ double precision xinorm_cnt(-2:2)
4124+ common /cxinormcnt/xinorm_cnt
4125+ double precision delta_used
4126+ common /cdelta_used/delta_used
4127+ double precision xicut_used
4128+ common /cxicut_used/xicut_used
4129+ double precision xiScut_used,xiBSVcut_used
4130+ common /cxiScut_used/xiScut_used,xiBSVcut_used
4131+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
4132+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
4133+ double precision fkssymmetryfactor,fkssymmetryfactorBorn,
4134+ & fkssymmetryfactorDeg
4135+ integer ngluons,nquarks(-6:6),nphotons
4136+ common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
4137+ & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
4138+ logical nocntevents
4139+ common/cnocntevents/nocntevents
4140+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
4141+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
4142+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
4143+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
4144+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
4145+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
4146+ ! prefactors for the DIS scheme
4147+ double precision prefact_dis_d,prefact_dis_p,prefact_dis_l
4148+ double precision f_dis_d,f_dis_p,f_dis_l
4149+ common/factor_dis/f_dis_d,f_dis_p,f_dis_l
4150+ double precision pmass(nexternal)
4151+ include 'pmass.inc'
4152+ call cpu_time(tBefore)
4153+
4154 c f_* multiplication factors for real-emission, soft counter, ... etc.
4155 prefact=xinorm_ev/xi_i_fks_ev/(1-y_ij_fks_ev)
4156- f_r=prefact*jac_ev*enhance_real*fkssymmetryfactor*vegas_wgt
4157+ f_r=prefact*jac_ev*fkssymmetryfactor*vegas_wgt
4158 f_MC_S=f_r
4159 f_MC_H=f_r
4160 if (.not.nocntevents) then
4161 prefact_cnt_ssc=xinorm_ev/min(xiimax_ev,xiScut_used)*
4162 $ log(xicut_used/min(xiimax_ev,xiScut_used))/(1
4163 $ -y_ij_fks_ev)
4164- f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)*enhance
4165+ f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)
4166 $ *fkssymmetryfactor*vegas_wgt
4167- f_s_MC_S=prefact*jac_cnt(0)*enhance
4168+ f_s_MC_S=prefact*jac_cnt(0)
4169 $ *fkssymmetryfactor*vegas_wgt
4170 f_s_MC_H=f_s_MC_S
4171
4172@@ -1268,9 +1285,9 @@
4173 prefact_coll=xinorm_cnt(1)/xi_i_fks_cnt(1)*log(delta_used
4174 $ /deltaS)/deltaS
4175 f_c=(prefact_c+prefact_coll)*jac_cnt(1)
4176- $ *enhance*fkssymmetryfactor*vegas_wgt
4177+ $ *fkssymmetryfactor*vegas_wgt
4178 f_c_MC_S=prefact_c*jac_cnt(1)
4179- $ *enhance*fkssymmetryfactor*vegas_wgt
4180+ $ *fkssymmetryfactor*vegas_wgt
4181 f_c_MC_H=f_c_MC_S
4182
4183 call set_cms_stuff(1)
4184@@ -1281,13 +1298,13 @@
4185 prefact_coll_c=xinorm_cnt(1)/min(xiimax_cnt(1),xiScut_used)
4186 $ *log(xicut_used/min(xiimax_cnt(1),xiScut_used))
4187 $ *log(delta_used/deltaS)/deltaS
4188- f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))*enhance
4189+ f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))
4190 $ *fkssymmetryfactorDeg*vegas_wgt
4191 f_sc=(prefact_c+prefact_coll+prefact_cnt_ssc_c
4192- & +prefact_coll_c)*jac_cnt(2)*enhance
4193+ & +prefact_coll_c)*jac_cnt(2)
4194 & *fkssymmetryfactorDeg*vegas_wgt
4195 f_sc_MC_S=prefact_c*jac_cnt(2)
4196- $ *enhance*fkssymmetryfactor*vegas_wgt
4197+ $ *fkssymmetryfactor*vegas_wgt
4198 f_sc_MC_H=f_sc_MC_S
4199
4200 call set_cms_stuff(2)
4201@@ -1298,24 +1315,24 @@
4202 & ,xiScut_used)*( log(xicut_used)**2
4203 & -log(min(xiimax_cnt(1),xiScut_used))**2 )*1/(2.d0
4204 & *deltaS)
4205- f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))*enhance
4206+ f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))
4207 & *fkssymmetryfactorDeg*vegas_wgt
4208 f_dsc(2)=prefact_deg_sxi*jac_cnt(2)/(shat/(32*pi**2))
4209- & *enhance*fkssymmetryfactorDeg*vegas_wgt
4210+ & *fkssymmetryfactorDeg*vegas_wgt
4211 f_dsc(3)=prefact_deg_slxi*jac_cnt(2)/(shat/(32*pi**2))
4212- & *enhance*fkssymmetryfactorDeg*vegas_wgt
4213+ & *fkssymmetryfactorDeg*vegas_wgt
4214 f_dsc(4)=( prefact_deg+prefact_deg_sxi )*jac_cnt(2)/(shat
4215- & /(32*pi**2))*enhance*fkssymmetryfactorDeg
4216+ & /(32*pi**2))*fkssymmetryfactorDeg
4217 & *vegas_wgt
4218 ! prefactor for the DIS scheme
4219 prefact_dis_d=xinorm_cnt(1)/xiScut_used/deltaS
4220- f_dis_d=prefact_dis_d*jac_cnt(2)/(shat/(32*pi**2))*enhance
4221+ f_dis_d=prefact_dis_d*jac_cnt(2)/(shat/(32*pi**2))
4222 & *fkssymmetryfactorDeg*vegas_wgt
4223 prefact_dis_p=xinorm_cnt(1)*dlog(xiScut_used)/xiScut_used/deltaS
4224- f_dis_p=prefact_dis_p*jac_cnt(2)/(shat/(32*pi**2))*enhance
4225+ f_dis_p=prefact_dis_p*jac_cnt(2)/(shat/(32*pi**2))
4226 & *fkssymmetryfactorDeg*vegas_wgt
4227 prefact_dis_l=xinorm_cnt(1)*dlog(xiScut_used)**2/2d0/xiScut_used/deltaS
4228- f_dis_l=prefact_dis_l*jac_cnt(2)/(shat/(32*pi**2))*enhance
4229+ f_dis_l=prefact_dis_l*jac_cnt(2)/(shat/(32*pi**2))
4230 & *fkssymmetryfactorDeg*vegas_wgt
4231 else
4232 f_c=0d0
4233@@ -1439,6 +1456,7 @@
4234 c contribution
4235 use weight_lines
4236 use extra_weights
4237+ use FKSParams
4238 implicit none
4239 include 'nexternal.inc'
4240 include 'run.inc'
4241@@ -1446,7 +1464,6 @@
4242 include 'coupl.inc'
4243 include 'fks_info.inc'
4244 include 'q_es.inc'
4245- include 'FKSParams.inc'
4246 include 'orders.inc'
4247 integer type,i,j
4248 logical foundIt,foundOrders
4249@@ -1633,6 +1650,8 @@
4250 c or to fill histograms.
4251 use weight_lines
4252 use extra_weights
4253+ use mint_module
4254+ use FKSParams
4255 implicit none
4256 include 'nexternal.inc'
4257 include 'run.inc'
4258@@ -1640,10 +1659,8 @@
4259 include 'timing_variables.inc'
4260 include 'genps.inc'
4261 include 'orders.inc'
4262- include 'mint.inc'
4263- include 'FKSParams.inc'
4264 integer orders(nsplitorders)
4265- integer i,j,k,iamp
4266+ integer i,j,k,iamp,icontr_orig
4267 logical virt_found
4268 double precision xlum,dlum,pi,mu2_r,mu2_f,mu2_q,rwgt_muR_dep_fac
4269 $ ,wgt_wo_pdf,conv
4270@@ -1652,9 +1669,6 @@
4271 external dlum
4272 integer nFKSprocess
4273 common/c_nFKSprocess/nFKSprocess
4274- double precision virt_wgt_mint(0:n_ave_virt),
4275- & born_wgt_mint(0:n_ave_virt)
4276- common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
4277 INTEGER IPROC
4278 DOUBLE PRECISION PD(0:MAXPROC)
4279 COMMON /SUBPROC/ PD, IPROC
4280@@ -1662,6 +1676,9 @@
4281 call cpu_time(tBefore)
4282 if (icontr.eq.0) return
4283 virt_found=.false.
4284+c number of contributions before they are (possibly) increased through a
4285+c call to separate_flavour_config().
4286+ icontr_orig=icontr
4287 i=0
4288 do while (i.lt.icontr)
4289 i=i+1
4290@@ -1678,8 +1695,12 @@
4291 c iwgt=1 is the central value (i.e. no scale/PDF reweighting).
4292 iwgt=1
4293 call weight_lines_allocated(nexternal,max_contr,iwgt,iproc)
4294-c set_pdg_codes fills the niproc, parton_iproc, parton_pdg and parton_pdg_uborn
4295- call set_pdg_codes(iproc,pd,nFKSprocess,i)
4296+c set_pdg_codes fills the niproc, parton_iproc, parton_pdg and
4297+c parton_pdg_uborn [Do only for the contributions that were already
4298+c available as part of the input -- NOT the ones that are created
4299+c through the call to separate_flavour_config(), since that will
4300+c overwrite the relevant information.]
4301+ if (i.le.icontr_orig) call set_pdg_codes(iproc,pd,nFKSprocess,i)
4302 if (separate_flavour_configs .and. ipr(i).eq.0) then
4303 call separate_flavour_config(i) ! this increases icontr
4304 endif
4305@@ -1733,18 +1754,15 @@
4306 c include the weight also in the 'wgt' array that contain the
4307 c coefficients for PDF and scale computations.
4308 use weight_lines
4309+ use mint_module
4310 implicit none
4311 include 'orders.inc'
4312- include 'mint.inc'
4313 integer orders(nsplitorders)
4314 integer i,j,iamp
4315 logical virt_found
4316 double precision bias
4317 character*7 event_norm
4318 common /event_normalisation/event_norm
4319- double precision virt_wgt_mint(0:n_ave_virt),
4320- & born_wgt_mint(0:n_ave_virt)
4321- common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
4322 c Set the bias_wgt to 1 in case we do not have to do any biassing
4323 if (event_norm(1:4).ne.'bias') then
4324 do i=1,icontr
4325@@ -1993,11 +2011,11 @@
4326 c wgts() array to include the weights.
4327 use weight_lines
4328 use extra_weights
4329+ use FKSParams
4330 implicit none
4331 include 'nexternal.inc'
4332 include 'run.inc'
4333 include 'timing_variables.inc'
4334- include 'FKSParams.inc'
4335 include 'genps.inc'
4336 integer i,kr,kf,iwgt_save,dd
4337 double precision xlum(maxscales),dlum,pi,mu2_r(maxscales),c_mu2_r
4338@@ -2076,11 +2094,11 @@
4339 c computations (ickkw.eq.-1).
4340 use weight_lines
4341 use extra_weights
4342+ use FKSParams
4343 implicit none
4344 include 'nexternal.inc'
4345 include 'run.inc'
4346 include 'timing_variables.inc'
4347- include 'FKSParams.inc'
4348 include 'genps.inc'
4349 integer i,ks,kh,iwgt_save
4350 double precision xlum(maxscales),dlum,pi,mu2_r(maxscales)
4351@@ -2182,11 +2200,11 @@
4352 c wgts() array to include the weights.
4353 use weight_lines
4354 use extra_weights
4355+ use FKSParams
4356 implicit none
4357 include 'nexternal.inc'
4358 include 'run.inc'
4359 include 'timing_variables.inc'
4360- include 'FKSParams.inc'
4361 include 'genps.inc'
4362 integer n,izero,i,nn
4363 parameter (izero=0)
4364@@ -2569,15 +2587,12 @@
4365 subroutine fill_mint_function(f)
4366 c Fills the function that is returned to the MINT integrator
4367 use weight_lines
4368+ use mint_module
4369 implicit none
4370 include 'nexternal.inc'
4371- include 'mint.inc'
4372 include 'orders.inc'
4373 integer i,iamp,ithree,isix
4374 double precision f(nintegrals),sigint
4375- double precision virt_wgt_mint(0:n_ave_virt),
4376- & born_wgt_mint(0:n_ave_virt)
4377- common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
4378 double precision virtual_over_born
4379 common /c_vob/ virtual_over_born
4380 sigint=0d0
4381@@ -2674,6 +2689,7 @@
4382 c configuration, while for the S-events also contributions from the
4383 c various FKS configurations can be summed together.
4384 use weight_lines
4385+ use mint_module
4386 implicit none
4387 include 'nexternal.inc'
4388 include 'genps.inc'
4389@@ -2686,9 +2702,6 @@
4390 integer iproc_save(fks_configs),eto(maxproc,fks_configs),
4391 & etoi(maxproc,fks_configs),maxproc_found
4392 common/cproc_combination/iproc_save,eto,etoi,maxproc_found
4393- logical only_virt
4394- integer imode
4395- common /c_imode/imode,only_virt
4396 call cpu_time(tBefore)
4397 if (icontr.eq.0) return
4398 c Find the contribution to sum all the S-event ones. This should be one
4399@@ -2835,21 +2848,15 @@
4400 c Fills the function that is returned to the MINT integrator. Depending
4401 c on the imode we should or should not include the virtual corrections.
4402 use weight_lines
4403+ use mint_module
4404 implicit none
4405 include 'nexternal.inc'
4406- include 'mint.inc'
4407 include 'orders.inc'
4408 integer i,j,ict,iamp,ithree,isix
4409 double precision f(nintegrals),sigint,sigint1,sigint_ABS
4410 $ ,n1body_wgt,tmp_wgt,max_weight
4411- double precision virt_wgt_mint(0:n_ave_virt),
4412- & born_wgt_mint(0:n_ave_virt)
4413- common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
4414 double precision virtual_over_born
4415 common /c_vob/ virtual_over_born
4416- logical only_virt
4417- integer imode
4418- common /c_imode/imode,only_virt
4419 sigint=0d0
4420 sigint1=0d0
4421 sigint_ABS=0d0
4422@@ -3621,10 +3628,12 @@
4423 & pjet,njet,jet)
4424 do i=1,NN
4425 di(i)=sqrt(amcatnlo_fastjetdmergemax(i-1))
4426- if (i.gt.1.and.di(i).gt.di(i-1))then
4427- write(*,*)'Error in set_shower_scale_noshape'
4428- write(*,*)NN,i,di(i),di(i-1)
4429- stop
4430+ if (i.gt.1)then
4431+ if(di(i).gt.di(i-1))then
4432+ write(*,*)'Error in set_shower_scale_noshape'
4433+ write(*,*)NN,i,di(i),di(i-1)
4434+ stop
4435+ endif
4436 endif
4437 enddo
4438 if(iSH.eq.1)shower_S_scale(iFKS)=di(NN)
4439@@ -5470,6 +5479,7 @@
4440
4441 subroutine bornsoftvirtual(p,bsv_wgt,virt_wgt,born_wgt)
4442 use extra_weights
4443+ use mint_module
4444 implicit none
4445 include "genps.inc"
4446 include 'nexternal.inc'
4447@@ -5483,7 +5493,6 @@
4448 common /c_charges/particle_charge
4449 include "run.inc"
4450 include "fks_powers.inc"
4451- include "mint.inc"
4452 double precision p(0:3,nexternal),bsv_wgt,born_wgt,avv_wgt
4453 double precision pp(0:3,nexternal)
4454
4455@@ -5542,9 +5551,6 @@
4456 integer iminmax
4457 common/cExceptPSpoint/iminmax,ExceptPSpoint
4458
4459- double precision average_virtual(0:n_ave_virt,maxchannels)
4460- $ ,virtual_fraction(maxchannels)
4461- common/c_avg_virt/average_virtual,virtual_fraction
4462 double precision virtual_over_born
4463 common/c_vob/virtual_over_born
4464
4465@@ -5871,12 +5877,22 @@
4466 tOLP=tOLP+(tAfter-tBefore)
4467 virtual_over_born=virt_wgt/born_wgt
4468 if (ickkw.ne.-1) then
4469- virt_wgt=virt_wgt-average_virtual(0,ichan)*born_wgt
4470+ if (use_poly_virtual) then
4471+ virt_wgt=virt_wgt-polyfit(0)*born_wgt
4472+ else
4473+ virt_wgt=virt_wgt-average_virtual(0,ichan)*born_wgt
4474+ endif
4475 do iamp=1,amp_split_size
4476 if (amp_split_virt(iamp).eq.0d0) cycle
4477+ if (use_poly_virtual) then
4478+ amp_split_virt(iamp)=amp_split_virt(iamp)-
4479+ $ polyfit(iamp)
4480+ $ *amp_split_born_for_virt(iamp)
4481+ else
4482 amp_split_virt(iamp)=amp_split_virt(iamp)-
4483 $ average_virtual(iamp,ichan)
4484 $ *amp_split_born_for_virt(iamp)
4485+ endif
4486 enddo
4487 endif
4488 if (abrv.ne.'virt') then
4489@@ -5896,12 +5912,21 @@
4490 $ amp_split_virt_save(1:amp_split_size)
4491 endif
4492 if (abrv(1:4).ne.'virt' .and. ickkw.ne.-1) then
4493- avv_wgt=average_virtual(0,ichan)*born_wgt
4494- do iamp=1, amp_split_size
4495- if (amp_split_born_for_virt(iamp).eq.0d0) cycle
4496- amp_split_avv(iamp)= average_virtual(iamp,ichan)
4497- $ *amp_split_born_for_virt(iamp)
4498- enddo
4499+ if (use_poly_virtual) then
4500+ avv_wgt=polyfit(0)*born_wgt
4501+ do iamp=1, amp_split_size
4502+ if (amp_split_born_for_virt(iamp).eq.0d0) cycle
4503+ amp_split_avv(iamp)= polyfit(iamp)
4504+ $ *amp_split_born_for_virt(iamp)
4505+ enddo
4506+ else
4507+ avv_wgt=average_virtual(0,ichan)*born_wgt
4508+ do iamp=1, amp_split_size
4509+ if (amp_split_born_for_virt(iamp).eq.0d0) cycle
4510+ amp_split_avv(iamp)= average_virtual(iamp,ichan)
4511+ $ *amp_split_born_for_virt(iamp)
4512+ enddo
4513+ endif
4514 endif
4515
4516 c eq.(MadFKS.C.13)
4517@@ -6512,9 +6537,8 @@
4518 subroutine setfksfactor(match_to_shower)
4519 use weight_lines
4520 use extra_weights
4521+ use mint_module
4522 implicit none
4523-
4524- include 'mint.inc'
4525
4526 double precision CA,CF, PI
4527 parameter (CA=3d0,CF=4d0/3d0)
4528@@ -6529,7 +6553,7 @@
4529 logical softtest,colltest
4530 common/sctests/softtest,colltest
4531
4532- integer config_fks,i,j,fac1,fac2
4533+ integer config_fks,i,j,fac1,fac2,kchan
4534 logical match_to_shower
4535
4536 double precision fkssymmetryfactor,fkssymmetryfactorBorn,
4537@@ -6917,11 +6941,11 @@
4538 c the grandmother corresponds (igranny) as well as the aunt (iaunt).
4539 c This information can be used to improve the phase-space
4540 c parametrisation.
4541+ use mint_module
4542 implicit none
4543 include 'genps.inc'
4544 include 'nexternal.inc'
4545 include 'nFKSconfigs.inc'
4546- include 'mint.inc'
4547 c arguments
4548 integer nFKSprocess,iconf
4549 double precision mass_min(-nexternal:nexternal)
4550@@ -7110,3 +7134,21 @@
4551 endif
4552 return
4553 end
4554+
4555+
4556+ function ran2()
4557+! Wrapper for the random numbers; needed for the NLO stuff
4558+ use mint_module
4559+ implicit none
4560+ double precision ran2,x,a,b
4561+ integer ii,jconfig
4562+ a=0d0 ! min allowed value for x
4563+ b=1d0 ! max allowed value for x
4564+ ii=0 ! dummy argument of ntuple
4565+ jconfig=iconfig ! integration channel (for off-set)
4566+ call ntuple(x,a,b,ii,jconfig)
4567+ ran2=x
4568+ return
4569+ end
4570+
4571+
4572
4573=== removed file 'Template/NLO/SubProcesses/fks_singular_paolo.f'
4574=== modified file 'Template/NLO/SubProcesses/genps_fks.f'
4575--- Template/NLO/SubProcesses/genps_fks.f 2018-07-13 10:16:34 +0000
4576+++ Template/NLO/SubProcesses/genps_fks.f 2020-05-23 19:29:41 +0000
4577@@ -95,8 +95,8 @@
4578 double precision p(0:3,nexternal)
4579 integer itree(2,-max_branch:-1),iconf
4580 common /to_itree/itree,iconf
4581- integer ndim
4582- common/tosigint/ndim
4583+ integer nndim
4584+ common/tosigint/nndim
4585 double precision qmass_common(-nexternal:0),qwidth_common(
4586 & -nexternal:0)
4587 common /c_qmass_qwidth/qmass_common,qwidth_common
4588@@ -110,7 +110,7 @@
4589 virtgranny=0d0
4590 return
4591 endif
4592- call generate_momenta_conf(.true.,ndim,jac,xvar,granny_m2_red
4593+ call generate_momenta_conf(.true.,nndim,jac,xvar,granny_m2_red
4594 & ,rat_xi_orig,itree,qmass_common,qwidth_common,p)
4595 if (jac.gt.0d0) then
4596 do j=0,3
4597@@ -152,8 +152,8 @@
4598 double precision p(0:3,nexternal)
4599 integer itree(2,-max_branch:-1),iconf
4600 common /to_itree/itree,iconf
4601- integer ndim
4602- common/tosigint/ndim
4603+ integer nndim
4604+ common/tosigint/nndim
4605 double precision qmass_common(-nexternal:0),qwidth_common(
4606 & -nexternal:0)
4607 common /c_qmass_qwidth/qmass_common,qwidth_common
4608@@ -177,7 +177,7 @@
4609 virtgranny_red=0d0
4610 return
4611 endif
4612- call generate_momenta_conf(.true.,ndim,jac,xvar,granny_m2_red
4613+ call generate_momenta_conf(.true.,nndim,jac,xvar,granny_m2_red
4614 & ,rat_xi_orig,itree,qmass_common,qwidth_common,p)
4615 if (jac.gt.0d0) then
4616 do j=1,3
4617@@ -282,13 +282,14 @@
4618
4619
4620
4621- subroutine generate_momenta_conf_wrapper(ndim,jac,x,itree,qmass
4622+ subroutine generate_momenta_conf_wrapper(nndim,jac,x,itree,qmass
4623 $ ,qwidth,p)
4624+ use mint_module
4625 implicit none
4626 include 'nexternal.inc'
4627 include 'genps.inc'
4628 include 'nFKSconfigs.inc'
4629- integer ndim
4630+ integer nndim
4631 double precision jac,x(99),p(0:3,nexternal)
4632 integer itree(2,-max_branch:-1),i,j
4633 double precision qmass(-nexternal:0),qwidth(-nexternal:0),del1
4634@@ -367,8 +368,6 @@
4635 common /to_abrv/ abrv
4636 character*10 shower_mc
4637 common /cMonteCarloType/shower_mc
4638- logical fixed_order,nlo_ps
4639- common /c_fnlo_nlops/fixed_order,nlo_ps
4640 c
4641 write_granny(nFKSprocess)=.true.
4642 which_is_granny(nFKSprocess)=0
4643@@ -405,7 +404,7 @@
4644 only_event_phsp=.true.
4645 skip_event_phsp=.false.
4646 input_granny_m2=.false.
4647- call generate_momenta_conf(input_granny_m2,ndim,jac,x
4648+ call generate_momenta_conf(input_granny_m2,nndim,jac,x
4649 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
4650 if (nint(jac).eq.-222) return ! numerical inaccuracy: not
4651 ! even Born momenta generated.
4652@@ -540,7 +539,7 @@
4653 c a shower scale. The kinematics won't be used, because below jac=-222
4654 c and p(0,1)=-99d0.
4655 skip_event_phsp=.false.
4656- call generate_momenta_conf(input_granny_m2,ndim,jac,x
4657+ call generate_momenta_conf(input_granny_m2,nndim,jac,x
4658 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
4659 jac=-222
4660 p(0,1)=-99d0
4661@@ -554,7 +553,7 @@
4662 do i=-1,1
4663 granny_m2_red(i)=-99d99
4664 enddo
4665- call generate_momenta_conf(input_granny_m2,ndim,jac,x
4666+ call generate_momenta_conf(input_granny_m2,nndim,jac,x
4667 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
4668 c In this case, we should not write the grandmother in the event file,
4669 c because the shower should not keep its inv. mass fixed.
4670@@ -592,7 +591,7 @@
4671 skip_event_phsp=.false.
4672 only_event_phsp=.true.
4673 granny_m2_red(0)=xmbe2inv
4674- call generate_momenta_conf(input_granny_m2,ndim,jac,x
4675+ call generate_momenta_conf(input_granny_m2,nndim,jac,x
4676 $ ,granny_m2_red,rat_xi_orig,itree,qmass,qwidth,p)
4677 c multiply event jacobian by the numerically computed jacobian for the
4678 c derivative
4679@@ -602,7 +601,7 @@
4680 input_granny_m2=.false.
4681 only_event_phsp=.false.
4682 skip_event_phsp=.true.
4683- call generate_momenta_conf(input_granny_m2,ndim,jac,x
4684+ call generate_momenta_conf(input_granny_m2,nndim,jac,x
4685 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
4686 endif
4687 jac=jac*MC_sum_factor
4688@@ -610,7 +609,7 @@
4689 skip_event_phsp=.false.
4690 only_event_phsp =.false.
4691 input_granny_m2=.false.
4692- call generate_momenta_conf(input_granny_m2,ndim,jac,x
4693+ call generate_momenta_conf(input_granny_m2,nndim,jac,x
4694 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
4695 endif
4696 end
4697@@ -701,9 +700,6 @@
4698 c Masses of particles. Should be filled in setcuts.f
4699 double precision pmass(nexternal)
4700 common /to_mass/pmass
4701-c For MINT:
4702- integer ifold_energy,ifold_phi,ifold_yij
4703- common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
4704 c local
4705 integer i,j,nbranch,ns_channel,nt_channel,ionebody
4706 & ,fksconfiguration,icountevts,imother,ixEi,ixyij,ixpi,isolsign
4707@@ -1000,14 +996,10 @@
4708 if (.not.only_event_phsp) xij_aor=(0.d0,0.d0)
4709 c
4710 c These will correspond to the vegas x's for the FKS variables xi_i,
4711-c y_ij and phi_i
4712+c y_ij and phi_i (changing this also requires changing folding parameters)
4713 ixEi=ndim-2
4714 ixyij=ndim-1
4715 ixpi=ndim
4716-c Set up the MINT folding:
4717- ifold_energy=ixEi
4718- ifold_phi=ixpi
4719- ifold_yij=ixyij
4720 c
4721 imother=min(j_fks,i_fks)
4722 m_j_fks=pmass(j_fks)
4723@@ -2147,6 +2139,7 @@
4724 xp(3,2)=-xp(0,2)
4725 c
4726 xp(0,i_fks)=E_i_fks*(chy_lbst-shy_lbst*yijdir)
4727+ p_i_fks(0)=p_i_fks(0)*(chy_lbst-shy_lbst*yijdir)
4728 xpifksred(1)=sinth_i_fks*cosphi_i_fks
4729 xpifksred(2)=sinth_i_fks*sinphi_i_fks
4730 xpifksred(3)=chy_lbst*yijdir-shy_lbst
4731
4732=== modified file 'Template/NLO/SubProcesses/handling_lhe_events.f'
4733--- Template/NLO/SubProcesses/handling_lhe_events.f 2017-06-15 19:31:40 +0000
4734+++ Template/NLO/SubProcesses/handling_lhe_events.f 2020-05-23 19:29:41 +0000
4735@@ -602,7 +602,7 @@
4736 endif
4737 write(ifile,'(a)')
4738 # ' </init>'
4739- 501 format(2(1x,i6),2(1x,e14.8),2(1x,i2),2(1x,i6),1x,i2,1x,i3)
4740+ 501 format(2(1x,i6),2(1x,e14.8),2(1x,i2),2(1x,i8),1x,i2,1x,i3)
4741 502 format(3(1x,e14.8),1x,i6)
4742 c
4743 return
4744@@ -665,8 +665,10 @@
4745 c if event_id is zero or positive (that means that there was a call
4746 c to write_lhef_header_banner) update it and write it
4747 c RF: don't use the event_id:
4748+ logical do_rwgt
4749 event_id = -99
4750 c
4751+ do_rwgt = do_rwgt_scale .or. do_rwgt_pdf .or. store_rwgt_info
4752 if (event_id.ge.0) then
4753 event_id=event_id+1
4754 if (event_id.le.9) then
4755@@ -720,7 +722,7 @@
4756 # PUP(1,I),PUP(2,I),PUP(3,I),PUP(4,I),PUP(5,I),
4757 # VTIMUP(I),SPINUP(I)
4758 enddo
4759- if(buff(1:1).eq.'#' .and. (do_rwgt_scale .or. do_rwgt_pdf .or.
4760+ if(buff(1:1).eq.'#' .and. (do_rwgt .or.
4761 & jwgtinfo.lt.0)) then
4762 write(ifile,'(a)') buff(1:len_trim(buff))
4763 read(buff,*)ch1,iSorH_lhe,ifks_lhe,jfks_lhe,
4764
4765=== modified file 'Template/NLO/SubProcesses/madfks_plot.f'
4766--- Template/NLO/SubProcesses/madfks_plot.f 2017-07-31 08:48:20 +0000
4767+++ Template/NLO/SubProcesses/madfks_plot.f 2020-05-23 19:29:41 +0000
4768@@ -148,14 +148,11 @@
4769
4770 subroutine topout
4771 use extra_weights
4772+ use mint_module
4773 implicit none
4774 include "nexternal.inc"
4775 include 'run.inc'
4776 integer ii,jj,n,kk,nn
4777- logical usexinteg,mint
4778- common/cusexinteg/usexinteg,mint
4779- integer itmax,ncall
4780- common/citmax/itmax,ncall
4781 logical useitmax
4782 common/cuseitmax/useitmax
4783 real*8 xnorm
4784@@ -166,16 +163,10 @@
4785 common /for_applgrid/ iappl
4786 include "appl_common.inc"
4787 c
4788- if(usexinteg.and..not.mint) then
4789- xnorm=1.d0/float(itmax)
4790- elseif(mint) then
4791- xnorm=1.d0/float(ncall)
4792- else
4793- xnorm=1d0
4794- endif
4795+ xnorm=1.d0/float(ncalls0)
4796 if(useitmax)xnorm=xnorm/float(itmax)
4797 c Normalization factor for the APPLgrid grids
4798- if(iappl.ne.0) appl_norm_histo = 1d0 / dble(ncall*itmax)
4799+ if(iappl.ne.0) appl_norm_histo = 1d0 / dble(ncalls0*itmax)
4800 call analysis_end(xnorm)
4801 c Write the accumulated results to a file
4802 open (unit=34,file='scale_pdf_dependence.dat',status='unknown')
4803
4804=== modified file 'Template/NLO/SubProcesses/makefile_fks_dir'
4805--- Template/NLO/SubProcesses/makefile_fks_dir 2017-09-28 15:13:09 +0000
4806+++ Template/NLO/SubProcesses/makefile_fks_dir 2020-05-23 19:29:41 +0000
4807@@ -25,42 +25,37 @@
4808 $(LIBDIR)libpdf.a $(LIBDIR)libcernlib.a
4809
4810 # Files for all executables
4811-FILES= $(patsubst %.f,%.o,$(wildcard parton_lum_*.f)) \
4812- $(patsubst %.f,%.o,$(wildcard matrix_*.f)) \
4813- real_me_chooser.o chooser_functions.o \
4814- genps_fks.o setcuts.o setscales.o veto_xsec.o \
4815- $(patsubst %.f,%.o,$(wildcard b_sf_???.f)) \
4816- born.o sborn_sf.o extra_cnt_wrapper.o \
4817- $(patsubst %.f,%.o,$(wildcard born_cnt_*.f)) \
4818- fks_Sij.o $(fastjetfortran_madfks) fks_singular.o \
4819- montecarlocounter.o reweight_xsec.o boostwdir2.o \
4820- initcluster.o cluster.o splitorders_stuff.o \
4821- reweight.o get_color.o FKSParamReader.o iproc_map.o \
4822- MC_integer.o $(reweight_xsec_events_pdf_dummy) \
4823- $(applgrid_interface) weight_lines.o
4824+FILES= $(patsubst %.f,%.o,$(wildcard parton_lum_*.f)) $(patsubst \
4825+ %.f,%.o,$(wildcard matrix_*.f)) FKSParams.o real_me_chooser.o \
4826+ chooser_functions.o genps_fks.o setcuts.o setscales.o \
4827+ veto_xsec.o $(patsubst %.f,%.o,$(wildcard b_sf_???.f)) \
4828+ born.o sborn_sf.o extra_cnt_wrapper.o $(patsubst \
4829+ %.f,%.o,$(wildcard born_cnt_*.f)) fks_Sij.o \
4830+ $(fastjetfortran_madfks) fks_singular.o montecarlocounter.o \
4831+ reweight_xsec.o boostwdir2.o initcluster.o cluster.o \
4832+ splitorders_stuff.o reweight.o get_color.o \
4833+ iproc_map.o MC_integer.o $(reweight_xsec_events_pdf_dummy) \
4834+ $(applgrid_interface) weight_lines.o mint_module.o polfit.o
4835
4836 # Files needed for mintFO & mintMC
4837 RUN= $(FO_ANALYSE) $(FILES) cuts.o pythia_unlops.o recluster.o \
4838 fill_MC_mshell.o born_hel.o open_output_files.o \
4839- add_write_info.o BinothLHA.o madfks_plot.o
4840+ add_write_info.o madfks_plot.o
4841
4842 # Files for mintFO
4843-MINTFO= $(RUN) driver_mintFO.o mint-integrator2.o handling_lhe_events.o
4844+MINTFO= $(RUN) driver_mintFO.o handling_lhe_events.o BinothLHA.o
4845
4846 # Files for mintMC
4847-MINTMC= $(RUN) mint-integrator2.o driver_mintMC.o write_event.o \
4848- handling_lhe_events.o
4849+MINTMC= $(RUN) driver_mintMC.o handling_lhe_events.o write_event.o BinothLHA.o
4850
4851 # Files for check_poles
4852-POLES= $(FILES) cuts.o pythia_unlops.o recluster.o check_poles.o \
4853- BinothLHA.o born_hel.o
4854+POLES= $(RUN) check_poles.o BinothLHA.o
4855
4856 # Files for tests
4857-TEST= $(FILES) test_soft_col_limits.o BinothLHADummy.o cuts.o \
4858- pythia_unlops.o recluster.o
4859+TEST= $(RUN) test_soft_col_limits.o BinothLHADummy.o
4860
4861 # Files for gensym
4862-SYM= $(FILES) BinothLHADummy.o symmetry_fks_v3.o write_ajob.o
4863+SYM= $(RUN) BinothLHADummy.o symmetry_fks_v3.o write_ajob.o
4864
4865 # Files for event reweighting to get e.g. scale and PDF uncertainties
4866 RWGFILES=reweight_xsec_events.o handling_lhe_events.o \
4867@@ -73,6 +68,8 @@
4868
4869 %.o: %.f
4870 $(FC) $(FFLAGS) -c -I. -I$(LIBDIR) $<
4871+%.o: %.f90
4872+ $(FC) $(FFLAGS) -c -I. -I$(LIBDIR) $<
4873 %.o: $(ANADIR)/%.f
4874 $(FC) $(FFLAGS) -c -I. -I$(ANADIR) $(FO_INCLUDEPATHS) $<
4875 %.o: %.for
4876@@ -121,9 +118,13 @@
4877 for dir in `ls -d V*`; do cd $$dir; make; cd ../; done
4878
4879 reweight_xsec_events.o: weight_lines.o
4880-fks_singular.o: weight_lines.o
4881-driver_mintMC.o: weight_lines.o
4882-driver_mintFO.o: weight_lines.o
4883+fks_singular.o: weight_lines.o mint_module.o
4884+driver_mintMC.o: weight_lines.o mint_module.o
4885+driver_mintFO.o: weight_lines.o mint_module.o
4886+setcuts.o: mint_module.o
4887+genps_fks.o: mint_module.o
4888+symmetry_fks_v3.o: mint_module.o
4889+test_soft_col_limits.o: mint_module.o
4890
4891 clean:
4892 @rm -f *.o write_ajob_basic reweight_xsec_events madevent_* check_poles\
4893
4894=== removed file 'Template/NLO/SubProcesses/mint-integrator2.f'
4895=== removed file 'Template/NLO/SubProcesses/mint.inc'
4896=== added file 'Template/NLO/SubProcesses/mint_module.f90'
4897--- Template/NLO/SubProcesses/mint_module.f90 1970-01-01 00:00:00 +0000
4898+++ Template/NLO/SubProcesses/mint_module.f90 2020-05-23 19:29:41 +0000
4899@@ -0,0 +1,1705 @@
4900+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4901+! MINT Integrator Package
4902+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4903+! Original version by Paolo Nason (for POWHEG (BOX))
4904+! Modified by Rikkert Frederix (for MadGraph5_aMC@NLO)
4905+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4906+! subroutine mint(fun,ndim,ncalls0,itmax,imode,
4907+! ndim=number of dimensions
4908+! ncalls0=# of calls per iteration
4909+! itmax =# of iterations
4910+! fun(xx,www,ifirst): returns the function to be integrated multiplied by www;
4911+! xx(1:ndim) are the variables of integration
4912+! ifirst=0: normal behaviour
4913+! imode: integer flag
4914+!
4915+! imode=-1:
4916+! same as imode=0 as far as this routine is concerned, except for the
4917+! fact that a grid is read at the beginning (rather than initialized).
4918+! The return value of imode will be zero.
4919+!
4920+! imode=0:
4921+! When called with imode=0 the routine integrates the absolute value of
4922+! the function and sets up a grid xgrid(0:50,ndim) such that in each
4923+! ndim-1 dimensional slice (i.e. xgrid(m-1,n)<xx(n)<xgrid(m,n)) the
4924+! contribution of the integral is the same the array xgrid is setup at
4925+! this stage; ans and err are the integral and its error
4926+!
4927+! imode=1 (in fact #0)
4928+! When called with imode=1, the routine performs the integral of the
4929+! function fun using the grid xgrid. If some number in the array ifold,
4930+! (say, ifold(n)) is different from 1, it must be a divisor of 50, and
4931+! the 50 intervals xgrid(0:50,n) are grouped into ifold(n) groups, each
4932+! group containing 50/ifold(n) nearby intervals. For example, if
4933+! ifold(1)=5, the 50 intervals for the first dimension are divided in 5
4934+! groups of 10. The integral is then performed by folding on top of each
4935+! other these 5 groups. Suppose, for example, that we choose a random
4936+! point in xx(1) = xgrid(2,1)+x*(xgrid(3,1)-xgrid(2,1)), in the group of
4937+! the first 5 interval. we sum the contribution of this point to the
4938+! contributions of points
4939+! xgrid(2+m*10,1)+x*(xgrid(3+m*10,1)-xgrid(2+m*10,1)), with m=1,...,4.
4940+! In the sequence of calls to the function fun, the call for the first
4941+! point is performed with ifirst=0, and that for all subsequent points
4942+! with ifirst=1, so that the function can avoid to compute quantities
4943+! that only depend upon dimensions that have ifold=1, and do not change
4944+! in each group of folded call. The values returned by fun in a sequence
4945+! of folded calls with ifirst=0 and ifirst=1 are not used. The function
4946+! itself must accumulate the values, and must return them when called
4947+! with ifirst=2.
4948+!
4949+! Added the posibility to keep track of more than one integral:
4950+!
4951+! nintegrals=1 : the function that is used to update the grids. This is
4952+! the ABS cross section. If imode.eq.1, this does not contain the
4953+! virtual corrections because for them a separate maximum is kept using (5).
4954+! nintegrals=2 : the actual cross section. This includes virtual corrections.
4955+! nintegrals=3 : the cross section from the M_Virt/M_Born ratio alone:
4956+! this defines the average virtual that is added to each phase-space
4957+! point
4958+! nintegrals=4 : the cross section of the actual virtual minus the
4959+! average virtual. This is used to determine the fraction of phase-space
4960+! points for which we include the virtual.
4961+! nintegrals=5 : abs of 3
4962+! nintegrals=6 : born
4963+! nintegrals>6 : virtual and born order by order
4964+!
4965+
4966+module mint_module
4967+ use FKSParams ! contains use_poly_virtual
4968+ implicit none
4969+ integer, parameter, private :: nintervals=32 ! max number of intervals in the integration grids
4970+ integer, parameter, public :: ndimmax=60 ! max number of dimensions of the integral
4971+ integer, parameter, public :: n_ave_virt=10 ! max number of grids to set up to approx virtual
4972+ integer, parameter, public :: nintegrals=26 ! number of integrals to keep track of
4973+ integer, parameter, private :: nintervals_virt=8! max number of intervals in the grids for the approx virtual
4974+ integer, parameter, private :: min_inter=4 ! minimal number of intervals
4975+ integer, parameter, private :: min_it0=4 ! minimal number of iterations in the mint step 0 phase
4976+ integer, parameter, private :: min_it1=5 ! minimal number of iterations in the mint step 1 phase
4977+ integer, parameter, private :: max_points=100000! maximum number of points to trow per iteration if not enough non-zero points can be found.
4978+ integer, parameter, public :: maxchannels=20 ! set as least as large as in amcatnlo_run_interface
4979+ ! Note that the number of intervals in the integration grids, 'nintervals', cannot be arbitrarily large.
4980+ ! It should be equal to
4981+ ! nintervals = min_inter * 2^n,
4982+ ! where 'n' is an integer smaller than or equal to min(min_it0,min_it1).
4983+ !
4984+ ! The number of intergrals should be equal to
4985+ ! nintegrals=6+2*n_ave_virt
4986+ !
4987+
4988+! public variables
4989+ integer, public :: ncalls0,ndim,itmax,imode,n_ord_virt,nchans,iconfig,ichan,ifold_energy,ifold_yij,ifold_phi
4990+ integer, dimension(ndimmax), public :: ifold
4991+ integer, dimension(maxchannels), public :: iconfigs
4992+ double precision, public :: accuracy,min_virt_fraction_mint,wgt_mult
4993+ double precision, dimension(0:n_ave_virt,maxchannels), public :: average_virtual
4994+ double precision, dimension(0:n_ave_virt), public :: virt_wgt_mint,born_wgt_mint,polyfit
4995+ double precision, dimension(maxchannels), public :: virtual_fraction
4996+ double precision, dimension(nintegrals,0:maxchannels), public :: ans,unc
4997+ logical :: only_virt,new_point,pass_cuts_check
4998+
4999+! private variables
5000+ character(len=13), parameter, dimension(nintegrals), private :: title=(/ &
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: