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
=== modified file 'HELAS/v2xxxx.f'
--- HELAS/v2xxxx.f 2010-10-30 03:26:37 +0000
+++ HELAS/v2xxxx.f 2020-05-23 19:29:41 +0000
@@ -30,11 +30,11 @@
30 vc(2) = p(1)/p(0)30 vc(2) = p(1)/p(0)
31 vc(3) = p(2)/p(0)31 vc(3) = p(2)/p(0)
32 vc(4) = p(3)/p(0)32 vc(4) = p(3)/p(0)
33 else33 else
34 vc(1) = p(0)/vmass34 vc(1) = p(0)/vmass
35 vc(2) = p(1)/vmass35 vc(2) = p(1)/vmass
36 vc(3) = p(2)/vmass36 vc(3) = p(2)/vmass
37 vc(4) = p(3)/vmass37 vc(4) = p(3)/vmass
38 endif38 endif
39 return39 return
40 end40 end
4141
=== modified file 'MadSpin/decay.py'
--- MadSpin/decay.py 2018-09-21 13:46:51 +0000
+++ MadSpin/decay.py 2020-05-23 19:29:41 +0000
@@ -284,12 +284,13 @@
284 line_type = 'none' # support type: init / event / rwgt284 line_type = 'none' # support type: init / event / rwgt
285 self.diese = ''285 self.diese = ''
286 for line in self.inputfile:286 for line in self.inputfile:
287 origline = line
287 line = line.lower()288 line = line.lower()
288 if line=="":289 if line=="":
289 continue 290 continue
290 # Find special tag in the line291 # Find special tag in the line
291 if line[0]=="#":292 if line[0]=="#":
292 self.diese+=line293 self.diese+=origline
293 continue294 continue
294 if '<event' in line:295 if '<event' in line:
295 #start new_event296 #start new_event
@@ -319,7 +320,7 @@
319 if line_type == 'none':320 if line_type == 'none':
320 continue321 continue
321 elif line_type == 'other_block':322 elif line_type == 'other_block':
322 self.diese += line323 self.diese += origline
323 # read the line and assign the date accordingly 324 # read the line and assign the date accordingly
324 elif line_type == 'init':325 elif line_type == 'init':
325 line_type = 'event'326 line_type = 'event'
@@ -2244,7 +2245,7 @@
2244 nb_mc_masses=len(indices_for_mc_masses)2245 nb_mc_masses=len(indices_for_mc_masses)
22452246
2246 p, p_str=self.curr_event.give_momenta(event_map)2247 p, p_str=self.curr_event.give_momenta(event_map)
2247 stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, decay_me['max_weight'])2248 stdin_text=' %s %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, decay_me['max_weight'], self.options['frame_id'])
2248 stdin_text+=p_str2249 stdin_text+=p_str
2249 # here I also need to specify the Monte Carlo Masses2250 # here I also need to specify the Monte Carlo Masses
2250 stdin_text+=" %s \n" % nb_mc_masses2251 stdin_text+=" %s \n" % nb_mc_masses
@@ -2372,7 +2373,7 @@
2372 #no decays for this production mode, run in passthrough mode, only adding the helicities to the events2373 #no decays for this production mode, run in passthrough mode, only adding the helicities to the events
2373 nb_mc_masses=02374 nb_mc_masses=0
2374 p, p_str=self.curr_event.give_momenta(event_map)2375 p, p_str=self.curr_event.give_momenta(event_map)
2375 stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, 1.0)2376 stdin_text=' %s %s %s %s \n' % ('2', self.options['BW_cut'], self.Ecollider, 1.0, self.options['frame_id'])
2376 stdin_text+=p_str2377 stdin_text+=p_str
2377 # here I also need to specify the Monte Carlo Masses2378 # here I also need to specify the Monte Carlo Masses
2378 stdin_text+=" %s \n" % nb_mc_masses2379 stdin_text+=" %s \n" % nb_mc_masses
@@ -3277,8 +3278,7 @@
3277 """return the max. weight associated with me decay['path']"""3278 """return the max. weight associated with me decay['path']"""
32783279
3279 p, p_str=self.curr_event.give_momenta(event_map)3280 p, p_str=self.curr_event.give_momenta(event_map)
32803281 std_in=" %s %s %s %s %s \n" % ("1",BWcut, self.Ecollider, nbpoints, self.options['frame_id'])
3281 std_in=" %s %s %s %s \n" % ("1",BWcut, self.Ecollider, nbpoints)
3282 std_in+=p_str3282 std_in+=p_str
3283 max_weight = self.loadfortran('maxweight',3283 max_weight = self.loadfortran('maxweight',
3284 path, std_in)3284 path, std_in)
@@ -3347,7 +3347,7 @@
3347 if nb < cut:3347 if nb < cut:
3348 if key[0]=='full':3348 if key[0]=='full':
3349 path=key[1]3349 path=key[1]
3350 end_signal="5 0 0 0 \n" # before closing, write down the seed 3350 end_signal="5 0 0 0 0\n" # before closing, write down the seed
3351 external.stdin.write(end_signal)3351 external.stdin.write(end_signal)
3352 ranmar_state=external.stdout.readline()3352 ranmar_state=external.stdout.readline()
3353 ranmar_file=pjoin(path,'ranmar_state.dat')3353 ranmar_file=pjoin(path,'ranmar_state.dat')
@@ -3921,7 +3921,8 @@
3921 3921
3922 self.cross = 03922 self.cross = 0
3923 self.error = 03923 self.error = 0
3924 if 'init' in self.banner and (eff!=1 or not any(v==-1 for v in self.br_per_id.values())):3924 if 'init' in self.banner and (eff!=1 or not any(v==-1 for v in self.br_per_id.values())) \
3925 and not self.options['onlyhelicity']:
3925 new_init =''3926 new_init =''
3926 curr_proc = 03927 curr_proc = 0
3927 has_missing=False3928 has_missing=False
@@ -3961,7 +3962,7 @@
3961 external.terminate()3962 external.terminate()
3962 del external3963 del external
3963 elif mode=='full':3964 elif mode=='full':
3964 stdin_text="5 0 0 0 \n" # before closing, write down the seed 3965 stdin_text="5 0 0 0 0\n" # before closing, write down the seed
3965 external = self.calculator[('full',path)]3966 external = self.calculator[('full',path)]
3966 try:3967 try:
3967 external.stdin.write(stdin_text)3968 external.stdin.write(stdin_text)
@@ -3988,7 +3989,7 @@
3988 except Exception:3989 except Exception:
3989 pass3990 pass
3990 else:3991 else:
3991 stdin_text="5 0 0 0"3992 stdin_text="5 0 0 0 0"
3992 external.stdin.write(stdin_text)3993 external.stdin.write(stdin_text)
3993 external.stdin.close()3994 external.stdin.close()
3994 external.stdout.close()3995 external.stdout.close()
39953996
=== modified file 'MadSpin/interface_madspin.py'
--- MadSpin/interface_madspin.py 2018-10-31 10:07:53 +0000
+++ MadSpin/interface_madspin.py 2020-05-23 19:29:41 +0000
@@ -75,7 +75,7 @@
75 self.add_param('cross_section', {'__type__':0.}, comment="forcing normalization of cross-section after MS (for none/onshell)" )75 self.add_param('cross_section', {'__type__':0.}, comment="forcing normalization of cross-section after MS (for none/onshell)" )
76 self.add_param('new_wgt', 'cross-section' ,allowed=['cross-section', 'BR'], comment="if not consistent number of particles, choose what to do for the weight. (BR: means local according to number of part, cross use the force cross-section")76 self.add_param('new_wgt', 'cross-section' ,allowed=['cross-section', 'BR'], comment="if not consistent number of particles, choose what to do for the weight. (BR: means local according to number of part, cross use the force cross-section")
77 self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner'])77 self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner'])
78 78 self.add_param('frame_id', 6)
79 79
80 ############################################################################80 ############################################################################
81 ## Special post-processing of the options ## 81 ## Special post-processing of the options ##
@@ -211,7 +211,7 @@
211 # Read the banner of the inputfile211 # Read the banner of the inputfile
212 self.events_file = open(os.path.realpath(inputfile))212 self.events_file = open(os.path.realpath(inputfile))
213 self.banner = banner.Banner(self.events_file)213 self.banner = banner.Banner(self.events_file)
214 214
215215
216 # Check the validity of the banner:216 # Check the validity of the banner:
217 if 'slha' not in self.banner:217 if 'slha' not in self.banner:
@@ -226,14 +226,21 @@
226 raise self.InvalidCmd('This event file was already decayed by MS. This is not possible to add to it a second decay')226 raise self.InvalidCmd('This event file was already decayed by MS. This is not possible to add to it a second decay')
227 227
228 if 'mgruncard' in self.banner:228 if 'mgruncard' in self.banner:
229 run_card = self.banner.charge_card('run_card')
229 if not self.options['Nevents_for_max_weigth']:230 if not self.options['Nevents_for_max_weigth']:
230 nevents = int(self.banner.get_detail('run_card', 'nevents'))231 nevents = run_card['nevents']
231 N_weight = max([75, int(3*nevents**(1/3))])232 N_weight = max([75, int(3*nevents**(1/3))])
232 self.options['Nevents_for_max_weigth'] = N_weight233 self.options['Nevents_for_max_weigth'] = N_weight
233 N_sigma = max(4.5, math.log(nevents,7.7))234 N_sigma = max(4.5, math.log(nevents,7.7))
234 self.options['nb_sigma'] = N_sigma235 self.options['nb_sigma'] = N_sigma
235 if self.options['BW_cut'] == -1:236 if self.options['BW_cut'] == -1:
236 self.options['BW_cut'] = float(self.banner.get_detail('run_card', 'bwcutoff'))237 self.options['BW_cut'] = float(self.banner.get_detail('run_card', 'bwcutoff'))
238
239 if isinstance(run_card, banner.RunCardLO):
240 run_card.update_system_parameter_for_include()
241 self.options['frame_id'] = run_card['frame_id']
242 else:
243 self.options['frame_id'] = 6
237 else:244 else:
238 if not self.options['Nevents_for_max_weigth']:245 if not self.options['Nevents_for_max_weigth']:
239 self.options['Nevents_for_max_weigth'] = 75246 self.options['Nevents_for_max_weigth'] = 75
@@ -313,7 +320,6 @@
313 if model_name in line:320 if model_name in line:
314 final_model = True321 final_model = True
315 322
316
317 323
318 def import_model(self, args):324 def import_model(self, args):
319 """syntax: import model NAME CARD_PATH325 """syntax: import model NAME CARD_PATH
@@ -400,6 +406,12 @@
400 #if self.model and not self.model['case_sensitive']:406 #if self.model and not self.model['case_sensitive']:
401 # decaybranch = decaybranch.lower()407 # decaybranch = decaybranch.lower()
402408
409 if self.options['spinmode'] != 'full' and '{' in decaybranch:
410 if self.options['spinmode'] == 'none':
411 logger.warning("polarization option used with spinmode=none. The polarization definition will be done according to the rest-frame of the decaying particles (which is likely not what you expect).")
412 else:
413 logger.warning("polarization option used with spinmode=onshell. This combination is not validated and is by construction using sub-optimal method which can likely lead to bias in some situation. Use at your own risk.")
414
403 decay_process, init_part = self.decay.reorder_branch(decaybranch)415 decay_process, init_part = self.decay.reorder_branch(decaybranch)
404 if not self.list_branches.has_key(init_part):416 if not self.list_branches.has_key(init_part):
405 self.list_branches[init_part] = []417 self.list_branches[init_part] = []
@@ -585,14 +597,16 @@
585 self.check_launch(args)597 self.check_launch(args)
586 for part in self.list_branches.keys():598 for part in self.list_branches.keys():
587 if part in self.mg5cmd._multiparticles:599 if part in self.mg5cmd._multiparticles:
600
588 if any(pid in self.final_state for pid in self.mg5cmd._multiparticles[part]):601 if any(pid in self.final_state for pid in self.mg5cmd._multiparticles[part]):
589 break602 break
590 pid = self.mg5cmd._curr_model.get('name2pdg')[part]603 else:
591 if pid in self.final_state:604 pid = self.mg5cmd._curr_model.get('name2pdg')[part]
592 break605 if pid in self.final_state:
593# else:606 break
594# logger.info("Nothing to decay ...")607 else:
595# return608 logger.info("Nothing to decay ...")
609 return
596 610
597611
598 model_line = self.banner.get('proc_card', 'full_model_line')612 model_line = self.banner.get('proc_card', 'full_model_line')
@@ -801,6 +815,7 @@
801 elif self.options['input_format'] in ['hepmc']:815 elif self.options['input_format'] in ['hepmc']:
802 import madgraph.various.hepmc_parser as hepmc_parser816 import madgraph.various.hepmc_parser as hepmc_parser
803 orig_lhe = hepmc_parser.HEPMC_EventFile(filename)817 orig_lhe = hepmc_parser.HEPMC_EventFile(filename)
818 orig_lhe.allow_empty_event = True
804 logger.info("Parsing input event to know how many decay to generate. This can takes few minuts.")819 logger.info("Parsing input event to know how many decay to generate. This can takes few minuts.")
805 else:820 else:
806 raise Exception821 raise Exception
@@ -1067,8 +1082,13 @@
1067 if len(hepmc_output) == 0:1082 if len(hepmc_output) == 0:
1068 hepmc_output.append(lhe_parser.Particle(event=hepmc_output))1083 hepmc_output.append(lhe_parser.Particle(event=hepmc_output))
1069 hepmc_output[0].color2 = 01084 hepmc_output[0].color2 = 0
1085 hepmc_output[0].status = -1
1086 hepmc_output.nexternal+=1
1070 decayed_particle = lhe_parser.Particle(particle, hepmc_output)1087 decayed_particle = lhe_parser.Particle(particle, hepmc_output)
1088 decayed_particle.mother1 = hepmc_output[0]
1089 decayed_particle.mother2 = hepmc_output[0]
1071 hepmc_output.append(decayed_particle)1090 hepmc_output.append(decayed_particle)
1091 hepmc_output.nexternal+=1
1072 decayed_particle.add_decay(decay)1092 decayed_particle.add_decay(decay)
1073 # change the weight associate to the event1093 # change the weight associate to the event
1074 if self.options['new_wgt'] == 'cross-section':1094 if self.options['new_wgt'] == 'cross-section':
@@ -1086,7 +1106,6 @@
1086 else:1106 else:
1087 hepmc_output.wgt = event.wgt1107 hepmc_output.wgt = event.wgt
1088 hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal1108 hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal
1089 hepmc_output.assign_mother()
1090 output_lhe.write(str(hepmc_output))1109 output_lhe.write(str(hepmc_output))
1091 else:1110 else:
1092 if counter==0:1111 if counter==0:
@@ -1226,7 +1245,11 @@
1226 pass 1245 pass
1227 self.me_int[decay_dir] = me5_cmd1246 self.me_int[decay_dir] = me5_cmd
1228 if self.options["run_card"]:1247 if self.options["run_card"]:
1229 run_card = self.run_card1248 if hasattr(self, 'run_card'):
1249 run_card = self.run_card
1250 else:
1251 self.run_card = banner.RunCard(self.options["run_card"])
1252 run_card = self.run_card
1230 else:1253 else:
1231 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))1254 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))
1232 run_card["nevents"] = int(1.2*nb_event)1255 run_card["nevents"] = int(1.2*nb_event)
@@ -1400,6 +1423,7 @@
1400 if name not in self.list_branches or len(self.list_branches[name]) == 0:1423 if name not in self.list_branches or len(self.list_branches[name]) == 0:
1401 continue1424 continue
1402 raise self.InvalidCmd("The onshell mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed.")1425 raise self.InvalidCmd("The onshell mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed.")
1426
1403 self.branching_ratio = br1427 self.branching_ratio = br
1404 self.efficiency = 11428 self.efficiency = 1
1405 self.cross, self.error = self.banner.get_cross(witherror=True)1429 self.cross, self.error = self.banner.get_cross(witherror=True)
@@ -1417,7 +1441,6 @@
1417 #4. determine the maxwgt1441 #4. determine the maxwgt
1418 maxwgt = self.get_maxwgt_for_onshell(orig_lhe, evt_decayfile)1442 maxwgt = self.get_maxwgt_for_onshell(orig_lhe, evt_decayfile)
1419 1443
1420
1421 #5. generate the decay 1444 #5. generate the decay
1422 orig_lhe.seek(0)1445 orig_lhe.seek(0)
1423 output_lhe = lhe_parser.EventFile(orig_lhe.name.replace('.lhe', '_decayed.lhe'), 'w')1446 output_lhe = lhe_parser.EventFile(orig_lhe.name.replace('.lhe', '_decayed.lhe'), 'w')
@@ -1435,8 +1458,10 @@
1435 for curr_event,production in enumerate(orig_lhe):1458 for curr_event,production in enumerate(orig_lhe):
1436 if self.options['fixed_order']:1459 if self.options['fixed_order']:
1437 production, counterevt= production[0], production[1:]1460 production, counterevt= production[0], production[1:]
1438 if curr_event and curr_event % 1000 == 0 and float(str(curr_event)[1:]) ==0:1461 if curr_event and self.efficiency and curr_event % 10 == 0 and float(str(curr_event)[1:]) ==0:
1439 print "decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start)1462 logger.info("decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start))
1463 else:
1464 logger.info("next event [%s]", time.time()-start)
1440 while 1:1465 while 1:
1441 nb_try +=11466 nb_try +=1
1442 decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event)1467 decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event)
@@ -1531,6 +1556,9 @@
1531 # event_decay is a dict pdg -> list of event file (contain the decay)1556 # event_decay is a dict pdg -> list of event file (contain the decay)
1532 1557
1533 1558
1559 if self.options['ms_dir'] and os.path.exists(pjoin(self.options['ms_dir'], 'max_wgt')):
1560 return float(open(pjoin(self.options['ms_dir'], 'max_wgt'),'r').read())
1561
1534 nevents = self.options['Nevents_for_max_weigth']1562 nevents = self.options['Nevents_for_max_weigth']
1535 if nevents == 0 :1563 if nevents == 0 :
1536 nevents = 751564 nevents = 75
@@ -1540,7 +1568,6 @@
1540 logger.info("*****************************")1568 logger.info("*****************************")
1541 logger.info("Probing the first %s events with %s phase space points" % (nevents, self.options['max_weight_ps_point']))1569 logger.info("Probing the first %s events with %s phase space points" % (nevents, self.options['max_weight_ps_point']))
15421570
1543
1544 self.efficiency = 1. / self.options['max_weight_ps_point']1571 self.efficiency = 1. / self.options['max_weight_ps_point']
1545 start = time.time()1572 start = time.time()
1546 for i in range(nevents):1573 for i in range(nevents):
@@ -1553,7 +1580,7 @@
1553 base_event = base_event[0]1580 base_event = base_event[0]
1554 for j in range(self.options['max_weight_ps_point']):1581 for j in range(self.options['max_weight_ps_point']):
1555 decays = self.get_decay_from_file(base_event, evt_decayfile, nevents-i) 1582 decays = self.get_decay_from_file(base_event, evt_decayfile, nevents-i)
1556 #carefull base_event is modified by the following function 1583 #carefull base_event is modified by the following function
1557 _, wgt = self.get_onshell_evt_and_wgt(base_event, decays)1584 _, wgt = self.get_onshell_evt_and_wgt(base_event, decays)
1558 maxwgt = max(wgt, maxwgt)1585 maxwgt = max(wgt, maxwgt)
1559 all_maxwgt.append(maxwgt)1586 all_maxwgt.append(maxwgt)
@@ -1569,10 +1596,13 @@
1569 if len(all_maxwgt) < i:1596 if len(all_maxwgt) < i:
1570 break1597 break
1571 ave_weight, std_weight = decay_tools.get_mean_sd(all_maxwgt[:i])1598 ave_weight, std_weight = decay_tools.get_mean_sd(all_maxwgt[:i])
1599 #misc.sprint(ave_weight, std_weight)
1572 base_max_weight = max(base_max_weight, 1.05 * (ave_weight+self.options['nb_sigma']*std_weight))1600 base_max_weight = max(base_max_weight, 1.05 * (ave_weight+self.options['nb_sigma']*std_weight))
1573 1601
1574 if all_maxwgt[1] > base_max_weight:1602 if all_maxwgt[1] > base_max_weight:
1575 base_max_weight = 1.05 * all_maxwgt[1]1603 base_max_weight = 1.05 * all_maxwgt[1]
1604 if self.options['ms_dir']:
1605 open(pjoin(self.options['ms_dir'], 'max_wgt'),'w').write(str(base_max_weight))
1576 return base_max_weight1606 return base_max_weight
1577 1607
1578 1608
@@ -1594,13 +1624,11 @@
1594 raise1624 raise
1595 import copy1625 import copy
1596 1626
1597
1598 if hasattr(production, 'me_wgt'):1627 if hasattr(production, 'me_wgt'):
1599 production_me = production.me_wgt1628 production_me = production.me_wgt
1600 else:1629 else:
1601 production_me = self.calculate_matrix_element(production)1630 production_me = self.calculate_matrix_element(production)
1602 production.me_wgt = production_me1631 production.me_wgt = production_me
1603
1604 decay_me = 1.01632 decay_me = 1.0
1605 for pdg in decays:1633 for pdg in decays:
1606 for dec in decays[pdg]:1634 for dec in decays[pdg]:
@@ -1628,7 +1656,6 @@
1628 final = tuple(-i for i in final)1656 final = tuple(-i for i in final)
1629 tag = (init, final)1657 tag = (init, final)
1630 orig_order = self.all_me[tag]['order']1658 orig_order = self.all_me[tag]['order']
1631
1632 pdir = self.all_me[tag]['pdir']1659 pdir = self.all_me[tag]['pdir']
1633 if pdir in self.all_f2py:1660 if pdir in self.all_f2py:
1634 p = event.get_momenta(orig_order)1661 p = event.get_momenta(orig_order)
@@ -1643,11 +1670,15 @@
1643 1670
1644 mymod = __import__("%s.matrix2py" % (pdir))1671 mymod = __import__("%s.matrix2py" % (pdir))
1645 reload(mymod)1672 reload(mymod)
1646 mymod = getattr(mymod, 'matrix2py') 1673 mymod = getattr(mymod, 'matrix2py')
1647 with misc.chdir(pjoin(self.path_me, 'madspin_me', 'SubProcesses', pdir)):1674 with misc.chdir(pjoin(self.path_me, 'madspin_me', 'SubProcesses', pdir)):
1648 with misc.stdchannel_redirected(sys.stdout, os.devnull):1675 with misc.stdchannel_redirected(sys.stdout, os.devnull):
1649 mymod.initialisemodel(pjoin(self.path_me, 'Cards','param_card.dat'))1676 if not os.path.exists(pjoin(self.path_me, 'Cards','param_card.dat')) and \
1650 self.all_f2py[pdir] = mymod.get_value 1677 os.path.exists(pjoin(self.path_me,'param_card.dat')):
1678 mymod.initialisemodel(pjoin(self.path_me,'param_card.dat'))
1679 else:
1680 mymod.initialisemodel(pjoin(self.path_me, 'Cards','param_card.dat'))
1681 self.all_f2py[pdir] = mymod.get_value
1651 return self.calculate_matrix_element(event)1682 return self.calculate_matrix_element(event)
1652 1683
1653 1684
16541685
=== modified file 'MadSpin/src/driver.f'
--- MadSpin/src/driver.f 2018-09-19 09:41:33 +0000
+++ MadSpin/src/driver.f 2020-05-23 19:29:41 +0000
@@ -18,7 +18,7 @@
18 INTEGER I,J,K18 INTEGER I,J,K
19 INTEGER HELSET(NEXTERNAL)19 INTEGER HELSET(NEXTERNAL)
20 REAL*8 P(0:3,NEXTERNAL_PROD) 20 REAL*8 P(0:3,NEXTERNAL_PROD)
21 REAL*8 PFULL(0:3,NEXTERNAL), Ptrial(0:3,NEXTERNAL) 21 REAL*8 PFULL(0:3,NEXTERNAL), Ptrial(0:3,NEXTERNAL), P2(0:3,NEXTERNAL)
22 double precision x(36), Ecollider22 double precision x(36), Ecollider
23 CHARACTER*120 BUFF(NEXTERNAL_PROD)23 CHARACTER*120 BUFF(NEXTERNAL_PROD)
24 integer iforest(2,-nexternal:-1,N_MAX_CG)24 integer iforest(2,-nexternal:-1,N_MAX_CG)
@@ -39,6 +39,7 @@
39 double precision mean, variance, maxweight,weight,std39 double precision mean, variance, maxweight,weight,std
40 double precision temp40 double precision temp
41 double precision Pprod(0:3,nexternal_prod)41 double precision Pprod(0:3,nexternal_prod)
42
42 integer nb_mc_masses, indices_mc_masses(nexternal)43 integer nb_mc_masses, indices_mc_masses(nexternal)
43 double precision values_mc_masses(nexternal)44 double precision values_mc_masses(nexternal)
4445
@@ -54,6 +55,9 @@
54 double precision BWcut, maxBW55 double precision BWcut, maxBW
55 common /to_BWcut/BWcut, maxBW56 common /to_BWcut/BWcut, maxBW
5657
58 integer frame_id
59 common /to_me_frame/frame_id
60
57c Conflicting BW stuff61c Conflicting BW stuff
58 integer cBW_level_max,cBW(-nexternal:-1),cBW_level(-nexternal:-1)62 integer cBW_level_max,cBW(-nexternal:-1),cBW_level(-nexternal:-1)
59 double precision cBW_mass(-nexternal:-1,-1:1),63 double precision cBW_mass(-nexternal:-1,-1:1),
@@ -94,7 +98,6 @@
94 read(56,*) P_seed98 read(56,*) P_seed
95 close(56)99 close(56)
96 iseed = iseed + P_seed100 iseed = iseed + P_seed
97
98cccccccccccccccccccccccccccccccccccccccccccccccccccc101cccccccccccccccccccccccccccccccccccccccccccccccccccc
99c I. read momenta for the production events102c I. read momenta for the production events
100c103c
@@ -112,7 +115,7 @@
112 115
1131 continue1161 continue
114 maxBW=0d0117 maxBW=0d0
115 read(*,*) mode, BWcut, Ecollider, temp118 read(*,*) mode, BWcut, Ecollider, temp, frame_id
116 119
117120
118 if (mode.eq.1) then ! calculate the maximum weight121 if (mode.eq.1) then ! calculate the maximum weight
@@ -255,13 +258,14 @@
255258
256 cycle259 cycle
257 endif260 endif
258 !do j=1,nexternal261
259 ! write (*,*) (pfull(k,j), k=0,3) 262 call boost_to_frame(pfull, frame_id, P2)
260 !enddo263 call SMATRIX(P2,M_full)
261 call SMATRIX(pfull,M_full)264
262 call SMATRIX_PROD(pprod,M_prod)265 call boost_to_frame_prod(pprod, frame_id,nexternal_prod, P2)
263c write(*,*) 'M_full ', M_full266 call SMATRIX_PROD(P2,M_prod)
264c write(*,*) 'jac',jac267
268
265269
266 weight=M_full*jac/M_prod270 weight=M_full*jac/M_prod
267 if (weight.gt.maxweight) then271 if (weight.gt.maxweight) then
@@ -335,7 +339,6 @@
335 do i = 1, 3*(nexternal-nexternal_prod)+1339 do i = 1, 3*(nexternal-nexternal_prod)+1
336 call ntuple(x(i),0d0,1d0,i,1)340 call ntuple(x(i),0d0,1d0,i,1)
337 enddo341 enddo
338
339 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res) 342 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res)
340 if (jac.lt.0d0) then343 if (jac.lt.0d0) then
341 counter2=counter2+1 344 counter2=counter2+1
@@ -366,8 +369,14 @@
366369
367 cycle370 cycle
368 endif371 endif
369 call SMATRIX(pfull,M_full)372
370 call SMATRIX_PROD(pprod,M_prod)373 call boost_to_frame(pfull, frame_id, P2)
374 call SMATRIX(P2,M_full)
375
376
377 call boost_to_frame_prod(pprod, frame_id,nexternal_prod, P2)
378 call SMATRIX_PROD(P2,M_prod)
379
371380
372 weight=M_full*jac/M_prod381 weight=M_full*jac/M_prod
373382
@@ -1892,3 +1901,162 @@
1892 END1901 END
18931902
18941903
1904
1905
1906c======================================================================
1907C Subroutine to return momenta in a dedicated frame
1908C frame_id is the tag of the particle to put at rest
1909C frame_id follow the convention of cluster.f (sum 2**(N-1))
1910C -----------------------------------------
1911
1912 subroutine boost_to_frame(P1, frame_id, P2)
1913
1914 implicit none
1915
1916 include 'nexternal.inc'
1917
1918 DOUBLE PRECISION P1(0:3,NEXTERNAL)
1919 DOUBLE PRECISION P2(0:3,NEXTERNAL)
1920 DOUBLE PRECISION PBOOST(0:3)
1921 integer frame_id
1922
1923 integer ids(nexternal)
1924 integer i,j
1925 Pboost(0)= 0d0
1926 Pboost(1)= 0d0
1927 Pboost(2)= 0d0
1928 Pboost(3)= 0d0
1929
1930c uncompress
1931 call mapid(frame_id, ids)
1932c find the boost momenta --sum of particles--
1933 do i=1,nexternal
1934 if (ids(i).eq.1)then
1935c write (999,*) (Pboost(j), j=0,3)
1936 do j=0,3
1937 Pboost(j) = Pboost(j) + P1(j,i)
1938 enddo
1939 endif
1940 enddo
1941 do j=1,3
1942 Pboost(j) = -1 * Pboost(j)
1943 enddo
1944
1945c write (999,*) (Pboost(j), j=0,3)
1946 do i=1, nexternal
1947 call boostx(p1(0,i), pboost, p2(0,i))
1948 enddo
1949 return
1950 end
1951
1952
1953
1954
1955c========================================================================
1956
1957
1958 subroutine mapid(id,ids)
1959c**************************************************************************
1960c input:
1961c id compressed particle id
1962c ids array of particle ids
1963c**************************************************************************
1964 implicit none
1965 include 'nexternal.inc'
1966 integer i, icd, id, ids(nexternal)
1967
1968 icd=id
1969 do i=1,nexternal
1970 ids(i)=0
1971 if (btest(id,i)) then
1972 ids(i)=1
1973 endif
1974c write(*,*) 'cluster.f: uncompressed code ',i,' is ',ids(i)
1975 enddo
1976
1977 return
1978 end
1979
1980
1981
1982
1983C -----------------------------------------
1984
1985 subroutine boost_to_frame_prod(P1, frame_id, nexternal_prod, P2)
1986
1987 implicit none
1988
1989 include 'nexternal.inc'
1990
1991 DOUBLE PRECISION P1(0:3,*)
1992 DOUBLE PRECISION P2(0:3,*)
1993 DOUBLE PRECISION PBOOST(0:3)
1994 integer frame_id, nexternal_prod
1995
1996 integer ids(nexternal_prod)
1997 integer i,j
1998 Pboost(0)= 0d0
1999 Pboost(1)= 0d0
2000 Pboost(2)= 0d0
2001 Pboost(3)= 0d0
2002
2003c uncompress
2004 call mapid_prod(frame_id, ids,nexternal_prod)
2005c find the boost momenta --sum of particles--
2006 do i=1,nexternal_prod
2007 if (ids(i).eq.1)then
2008c write (999,*) (Pboost(j), j=0,3)
2009 do j=0,3
2010 Pboost(j) = Pboost(j) + P1(j,i)
2011 enddo
2012 endif
2013 enddo
2014 do j=1,3
2015 Pboost(j) = -1 * Pboost(j)
2016 enddo
2017
2018c write (999,*) (Pboost(j), j=0,3)
2019 do i=1, nexternal_prod
2020 call boostx(p1(0,i), pboost, p2(0,i))
2021 enddo
2022 return
2023 end
2024
2025
2026
2027
2028
2029
2030
2031
2032 subroutine mapid_prod(id,ids,nexternal_prod)
2033c**************************************************************************
2034c input:
2035c id compressed particle id
2036c ids array of particle ids
2037c**************************************************************************
2038 implicit none
2039 include 'nexternal.inc'
2040 integer i, icd, id, nexternal_prod, ids(nexternal_prod)
2041
2042 icd=id
2043 do i=1,nexternal_prod
2044 ids(i)=0
2045 if (btest(id,i)) then
2046 ids(i)=1
2047 endif
2048c write(*,*) 'cluster.f: uncompressed code ',i,' is ',ids(i)
2049 enddo
2050
2051 return
2052 end
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
18952063
=== modified file 'Template/Common/Cards/delphes_card_ATLAS.dat'
--- Template/Common/Cards/delphes_card_ATLAS.dat 2017-05-19 20:52:51 +0000
+++ Template/Common/Cards/delphes_card_ATLAS.dat 2020-05-23 19:29:41 +0000
@@ -405,11 +405,10 @@
405# add InputArray InputArray405# add InputArray InputArray
406 add InputArray ECal/ecalTowers406 add InputArray ECal/ecalTowers
407 add InputArray HCal/hcalTowers407 add InputArray HCal/hcalTowers
408 add InputArray MuonMomentumSmearing/muons
408 set OutputArray towers409 set OutputArray towers
409}410}
410411
411
412
413####################412####################
414# Energy flow merger413# Energy flow merger
415####################414####################
416415
=== modified file 'Template/Common/Cards/delphes_card_CMS.dat'
--- Template/Common/Cards/delphes_card_CMS.dat 2017-05-19 20:52:51 +0000
+++ Template/Common/Cards/delphes_card_CMS.dat 2020-05-23 19:29:41 +0000
@@ -168,7 +168,7 @@
168 # set ResolutionFormula {resolution formula as a function of eta and energy}168 # set ResolutionFormula {resolution formula as a function of eta and energy}
169169
170 # resolution formula for electrons170 # resolution formula for electrons
171 # based on arXiv:1405.6569171 # based on arXiv:1502.02701
172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +
173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +
174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}
175175
=== modified file 'Template/Common/Cards/delphes_card_default.dat'
--- Template/Common/Cards/delphes_card_default.dat 2017-05-19 20:52:51 +0000
+++ Template/Common/Cards/delphes_card_default.dat 2020-05-23 19:29:41 +0000
@@ -168,7 +168,7 @@
168 # set ResolutionFormula {resolution formula as a function of eta and energy}168 # set ResolutionFormula {resolution formula as a function of eta and energy}
169169
170 # resolution formula for electrons170 # resolution formula for electrons
171 # based on arXiv:1405.6569171 # based on arXiv:1502.02701
172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +172 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +
173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +173 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +
174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}174 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}
175175
=== modified file 'Template/LO/Cards/run_card.dat'
--- Template/LO/Cards/run_card.dat 2018-05-29 13:11:53 +0000
+++ Template/LO/Cards/run_card.dat 2020-05-23 19:29:41 +0000
@@ -14,10 +14,6 @@
14# To display more options, you can type the command: *14# To display more options, you can type the command: *
15# update full_run_card *15# update full_run_card *
16#*********************************************************************16#*********************************************************************
17#
18#*******************
19# Running parameters
20#*******************
21# 17#
22#*********************************************************************18#*********************************************************************
23# Tag name for the run (one word) *19# Tag name for the run (one word) *
@@ -26,7 +22,6 @@
26#*********************************************************************22#*********************************************************************
27# Number of events and rnd seed *23# Number of events and rnd seed *
28# Warning: Do not generate more than 1M events in a single run *24# Warning: Do not generate more than 1M events in a single run *
29# If you want to run Pythia, avoid more than 50k events in a run. *
30#*********************************************************************25#*********************************************************************
31 %(nevents)s = nevents ! Number of unweighted events requested 26 %(nevents)s = nevents ! Number of unweighted events requested
32 %(iseed)s = iseed ! rnd seed (0=assigned automatically=default))27 %(iseed)s = iseed ! rnd seed (0=assigned automatically=default))
@@ -40,6 +35,7 @@
40 %(ebeam1)s = ebeam1 ! beam 1 total energy in GeV35 %(ebeam1)s = ebeam1 ! beam 1 total energy in GeV
41 %(ebeam2)s = ebeam2 ! beam 2 total energy in GeV36 %(ebeam2)s = ebeam2 ! beam 2 total energy in GeV
42$beam_pol37$beam_pol
38$frame
43#*********************************************************************39#*********************************************************************
44# PDF CHOICE: this automatically fixes also alpha_s and its evol. *40# PDF CHOICE: this automatically fixes also alpha_s and its evol. *
45#*********************************************************************41#*********************************************************************
@@ -61,20 +57,9 @@
61#*********************************************************************57#*********************************************************************
62 %(gridpack)s = gridpack !True = setting up the grid pack58 %(gridpack)s = gridpack !True = setting up the grid pack
63 %(time_of_flight)s = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)59 %(time_of_flight)s = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)
64 %(lhe_version)s = lhe_version ! Change the way clustering information pass to shower.
65 %(clusinfo)s = clusinfo ! include clustering tag in output
66 %(event_norm)s = event_norm ! average/sum. Normalization of the weight in the LHEF60 %(event_norm)s = event_norm ! average/sum. Normalization of the weight in the LHEF
6761$MLM
68#*********************************************************************62$CKKW
69# Matching parameter (MLM only)
70#*********************************************************************
71 %(ickkw)s = ickkw ! 0 no matching, 1 MLM
72 %(alpsfact)s = alpsfact ! scale factor for QCD emission vx
73 %(chcluster)s = chcluster ! cluster only according to channel diag
74 %(asrwgtflavor)s = asrwgtflavor ! highest quark flavor for a_s reweight
75 %(auto_ptj_mjj)s = auto_ptj_mjj ! Automatic setting of ptj and mjj if xqcut >0
76 ! (turn off for VBF and single top processes)
77 %(xqcut)s = xqcut ! minimum kt jet measure between partons
78#*********************************************************************63#*********************************************************************
79#64#
80#*********************************************************************65#*********************************************************************
@@ -99,10 +84,10 @@
99# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$$" and decay 84# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$$" and decay
100#*********************************************************************85#*********************************************************************
101 %(bwcutoff)s = bwcutoff ! (M+/-bwcutoff*Gamma)86 %(bwcutoff)s = bwcutoff ! (M+/-bwcutoff*Gamma)
102#*********************************************************************87#IF(d)# #*********************************************************************
103# Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not88#IF(d)# # Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not
104# (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply)89#IF(d)# # (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply)
105#*********************************************************************90#IF(d)# #*********************************************************************
106 %(cut_decays)s = cut_decays ! Cut decay products 91 %(cut_decays)s = cut_decays ! Cut decay products
107#*********************************************************************92#*********************************************************************
108# Standard Cuts *93# Standard Cuts *
@@ -121,24 +106,12 @@
121 %(missetmax)s = missetmax ! maximum missing Et (sum of neutrino's momenta)106 %(missetmax)s = missetmax ! maximum missing Et (sum of neutrino's momenta)
122 %(pt_min_pdg)s = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle107 %(pt_min_pdg)s = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle
123 %(pt_max_pdg)s = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50}) 108 %(pt_max_pdg)s = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50})
124#*********************************************************************109$ecut
125# Minimum and maximum E's (in the center of mass frame) *
126#*********************************************************************
127 %(ej)s = ej ! minimum E for the jets
128 %(eb)s = eb ! minimum E for the b
129 %(ea)s = ea ! minimum E for the photons
130 %(el)s = el ! minimum E for the charged leptons
131 %(ejmax)s = ejmax ! maximum E for the jets
132 %(ebmax)s = ebmax ! maximum E for the b
133 %(eamax)s = eamax ! maximum E for the photons
134 %(elmax)s = elmax ! maximum E for the charged leptons
135 %(e_min_pdg)s = e_min_pdg ! E cut for other particles (use pdg code). Applied on particle and anti-particle
136 %(e_max_pdg)s = e_max_pdg ! E cut for other particles (syntax e.g. {6: 100, 25: 50})
137#*********************************************************************110#*********************************************************************
138# Maximum and minimum absolute rapidity (for max, -1 means no cut) *111# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
139#*********************************************************************112#*********************************************************************
140 %(etaj)s = etaj ! max rap for the jets 113 %(etaj)s = etaj ! max rap for the jets
141 %(etab)s = etab ! max rap for the b114 %(etab)s = etab ! max rap for the b
142 %(etaa)s = etaa ! max rap for the photons 115 %(etaa)s = etaa ! max rap for the photons
143 %(etal)s = etal ! max rap for the charged leptons 116 %(etal)s = etal ! max rap for the charged leptons
144 %(etajmin)s = etajmin ! min rap for the jets117 %(etajmin)s = etajmin ! min rap for the jets
@@ -172,8 +145,8 @@
172 %(dralmax)s = dralmax ! maxdistance between gamma and lepton145 %(dralmax)s = dralmax ! maxdistance between gamma and lepton
173#*********************************************************************146#*********************************************************************
174# Minimum and maximum invariant mass for pairs *147# Minimum and maximum invariant mass for pairs *
175# WARNING: for four lepton final state mmll cut require to have *148#IF(llll)# # WARNING: for four lepton final state mmll cut require to have *
176# different lepton masses for each flavor! * 149#IF(llll)# # different lepton masses for each flavor! *
177#*********************************************************************150#*********************************************************************
178 %(mmjj)s = mmjj ! min invariant mass of a jet pair 151 %(mmjj)s = mmjj ! min invariant mass of a jet pair
179 %(mmbb)s = mmbb ! min invariant mass of a b pair 152 %(mmbb)s = mmbb ! min invariant mass of a b pair
@@ -186,14 +159,14 @@
186 %(mxx_min_pdg)s = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})159 %(mxx_min_pdg)s = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})
187 %(mxx_only_part_antipart)s = mxx_only_part_antipart ! if True the invariant mass is applied only 160 %(mxx_only_part_antipart)s = mxx_only_part_antipart ! if True the invariant mass is applied only
188 ! to pairs of particle/antiparticle and not to pairs of the same pdg codes. 161 ! to pairs of particle/antiparticle and not to pairs of the same pdg codes.
189#*********************************************************************162#IF(LL)# #*********************************************************************
190# Minimum and maximum invariant mass for all letpons *163#IF(LL)# # Minimum and maximum invariant mass for all letpons *
191#*********************************************************************164#IF(LL)# #*********************************************************************
192 %(mmnl)s = mmnl ! min invariant mass for all letpons (l+- and vl) 165 %(mmnl)s = mmnl ! min invariant mass for all letpons (l+- and vl)
193 %(mmnlmax)s = mmnlmax ! max invariant mass for all letpons (l+- and vl) 166 %(mmnlmax)s = mmnlmax ! max invariant mass for all letpons (l+- and vl)
194#*********************************************************************167#IF(LL)# #*********************************************************************
195# Minimum and maximum pt for 4-momenta sum of leptons *168#IF(LL)# # Minimum and maximum pt for 4-momenta sum of leptons *
196#*********************************************************************169#IF(LL)# #*********************************************************************
197 %(ptllmin)s = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)170 %(ptllmin)s = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)
198 %(ptllmax)s = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)171 %(ptllmax)s = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)
199#*********************************************************************172#*********************************************************************
@@ -204,9 +177,9 @@
204 %(xptb)s = xptb ! minimum pt for at least one b 177 %(xptb)s = xptb ! minimum pt for at least one b
205 %(xpta)s = xpta ! minimum pt for at least one photon 178 %(xpta)s = xpta ! minimum pt for at least one photon
206 %(xptl)s = xptl ! minimum pt for at least one charged lepton 179 %(xptl)s = xptl ! minimum pt for at least one charged lepton
207#*********************************************************************180#IF(jj)# #*********************************************************************
208# Control the pt's of the jets sorted by pt *181#IF(jj)# # Control the pt's of the jets sorted by pt *
209#*********************************************************************182#IF(jj)# #*********************************************************************
210 %(ptj1min)s = ptj1min ! minimum pt for the leading jet in pt183 %(ptj1min)s = ptj1min ! minimum pt for the leading jet in pt
211 %(ptj2min)s = ptj2min ! minimum pt for the second jet in pt184 %(ptj2min)s = ptj2min ! minimum pt for the second jet in pt
212 %(ptj3min)s = ptj3min ! minimum pt for the third jet in pt185 %(ptj3min)s = ptj3min ! minimum pt for the third jet in pt
@@ -216,9 +189,9 @@
216 %(ptj3max)s = ptj3max ! maximum pt for the third jet in pt189 %(ptj3max)s = ptj3max ! maximum pt for the third jet in pt
217 %(ptj4max)s = ptj4max ! maximum pt for the fourth jet in pt190 %(ptj4max)s = ptj4max ! maximum pt for the fourth jet in pt
218 %(cutuse)s = cutuse ! reject event if fails any (0) / all (1) jet pt cuts191 %(cutuse)s = cutuse ! reject event if fails any (0) / all (1) jet pt cuts
219#*********************************************************************192#IF(ll)# #*********************************************************************
220# Control the pt's of leptons sorted by pt *193#IF(ll)# # Control the pt's of leptons sorted by pt *
221#*********************************************************************194#IF(ll)# #*********************************************************************
222 %(ptl1min)s = ptl1min ! minimum pt for the leading lepton in pt195 %(ptl1min)s = ptl1min ! minimum pt for the leading lepton in pt
223 %(ptl2min)s = ptl2min ! minimum pt for the second lepton in pt196 %(ptl2min)s = ptl2min ! minimum pt for the second lepton in pt
224 %(ptl3min)s = ptl3min ! minimum pt for the third lepton in pt197 %(ptl3min)s = ptl3min ! minimum pt for the third lepton in pt
@@ -227,9 +200,9 @@
227 %(ptl2max)s = ptl2max ! maximum pt for the second lepton in pt200 %(ptl2max)s = ptl2max ! maximum pt for the second lepton in pt
228 %(ptl3max)s = ptl3max ! maximum pt for the third lepton in pt201 %(ptl3max)s = ptl3max ! maximum pt for the third lepton in pt
229 %(ptl4max)s = ptl4max ! maximum pt for the fourth lepton in pt202 %(ptl4max)s = ptl4max ! maximum pt for the fourth lepton in pt
230#*********************************************************************203#IF(JJ)# #*********************************************************************
231# Control the Ht(k)=Sum of k leading jets *204#IF(JJ)# # Control the Ht(k)=Sum of k leading jets *
232#*********************************************************************205#IF(JJ)# #*********************************************************************
233 %(htjmin)s = htjmin ! minimum jet HT=Sum(jet pt)206 %(htjmin)s = htjmin ! minimum jet HT=Sum(jet pt)
234 %(htjmax)s = htjmax ! maximum jet HT=Sum(jet pt)207 %(htjmax)s = htjmax ! maximum jet HT=Sum(jet pt)
235 %(ihtmin)s = ihtmin !inclusive Ht for all partons (including b)208 %(ihtmin)s = ihtmin !inclusive Ht for all partons (including b)
@@ -240,29 +213,21 @@
240 %(ht2max)s = ht2max ! maximum Ht for the two leading jets213 %(ht2max)s = ht2max ! maximum Ht for the two leading jets
241 %(ht3max)s = ht3max ! maximum Ht for the three leading jets214 %(ht3max)s = ht3max ! maximum Ht for the three leading jets
242 %(ht4max)s = ht4max ! maximum Ht for the four leading jets215 %(ht4max)s = ht4max ! maximum Ht for the four leading jets
243#***********************************************************************216#IF(aj)# #***********************************************************************
244# Photon-isolation cuts, according to hep-ph/9801442 *217#IF(aj)# # Photon-isolation cuts, according to hep-ph/9801442 *
245# When ptgmin=0, all the other parameters are ignored *218#IF(aj)# # When ptgmin=0, all the other parameters are ignored *
246# When ptgmin>0, pta and draj are not going to be used *219#IF(aj)# # When ptgmin>0, pta and draj are not going to be used *
247#***********************************************************************220#IF(aj)# #***********************************************************************
248 %(ptgmin)s = ptgmin ! Min photon transverse momentum221#IF(aj)# %(ptgmin)s = ptgmin ! Min photon transverse momentum
249 %(r0gamma)s = R0gamma ! Radius of isolation code222#IF(aj)# %(r0gamma)s = R0gamma ! Radius of isolation code
250 %(xn)s = xn ! n parameter of eq.(3.4) in hep-ph/9801442223#IF(aj)# %(xn)s = xn ! n parameter of eq.(3.4) in hep-ph/9801442
251 %(epsgamma)s = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442224#IF(aj)# %(epsgamma)s = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
252 %(isoem)s = isoEM ! isolate photons from EM energy (photons and leptons)225#IF(aj)# %(isoem)s = isoEM ! isolate photons from EM energy (photons and leptons)
253#*********************************************************************226#IF(jj)# #*********************************************************************
254# WBF cuts *227#IF(jj)# # WBF cuts *
255#*********************************************************************228#IF(jj)# #*********************************************************************
256 %(xetamin)s = xetamin ! minimum rapidity for two jets in the WBF case 229 %(xetamin)s = xetamin ! minimum rapidity for two jets in the WBF case
257 %(deltaeta)s = deltaeta ! minimum rapidity for two jets in the WBF case 230 %(deltaeta)s = deltaeta ! minimum rapidity for two jets in the WBF case
258#***********************************************************************
259# Turn on either the ktdurham or ptlund cut to activate *
260# CKKW(L) merging with Pythia8 [arXiv:1410.3012, arXiv:1109.4829] *
261#***********************************************************************
262 %(ktdurham)s = ktdurham
263 %(dparameter)s = dparameter
264 %(ptlund)s = ptlund
265 %(pdgs_for_merging_cut)s = pdgs_for_merging_cut ! PDGs for two cuts above
266#*********************************************************************231#*********************************************************************
267# maximal pdg code for quark to be considered as a light jet *232# maximal pdg code for quark to be considered as a light jet *
268# (otherwise b cuts are applied) *233# (otherwise b cuts are applied) *
269234
=== modified file 'Template/LO/Source/.make_opts'
--- Template/LO/Source/.make_opts 2017-08-14 08:20:30 +0000
+++ Template/LO/Source/.make_opts 2020-05-23 19:29:41 +0000
@@ -49,11 +49,15 @@
49ifeq ($(FC), ftn)49ifeq ($(FC), ftn)
50FFLAGS+= -extend-source # for ifort type of compiler50FFLAGS+= -extend-source # for ifort type of compiler
51else51else
52FFLAGS+= -ffixed-line-length-13252 VERS="$(shell $(FC) --version | grep ifort -i)"
53 ifeq ($(VERS), "")
54 FFLAGS+= -ffixed-line-length-132
55 else
56 FFLAGS+= -extend-source # for ifort type of compiler
57 endif
53endif58endif
5459
5560
56
57UNAME := $(shell uname -s)61UNAME := $(shell uname -s)
58ifeq ($(origin LDFLAGS), undefined)62ifeq ($(origin LDFLAGS), undefined)
59LDFLAGS=$(STDLIB) $(MACFLAG)63LDFLAGS=$(STDLIB) $(MACFLAG)
6064
=== modified file 'Template/LO/Source/BIAS/ptj_bias/makefile'
--- Template/LO/Source/BIAS/ptj_bias/makefile 2016-08-13 05:32:47 +0000
+++ Template/LO/Source/BIAS/ptj_bias/makefile 2020-05-23 19:29:41 +0000
@@ -19,9 +19,5 @@
19# 'VALID' is the keyword that *must* be returned if everything is in order.19# 'VALID' is the keyword that *must* be returned if everything is in order.
20#20#
21requirements: 21requirements:
22ifeq ($(shell $(call CHECK_MG5AMC_VERSION,2.4.2)),True)
23 @echo "VALID"22 @echo "VALID"
24else23
25 @echo "Error:: MG5aMC is not recent enough (found "$(MG5AMC_VERSION)")"
26 @echo "FAIL"
27endif
2824
=== modified file 'Template/LO/Source/PDF/PhotonFlux.f'
--- Template/LO/Source/PDF/PhotonFlux.f 2018-04-20 08:02:12 +0000
+++ Template/LO/Source/PDF/PhotonFlux.f 2020-05-23 19:29:41 +0000
@@ -38,19 +38,31 @@
3838
39 end39 end
4040
41 real*8 function epa_proton(x,q2max)41 real*8 function epa_proton(x,q2max,beamid)
42 integer i42 integer i
43 integer beamid
43 real*8 x,phi_f44 real*8 x,phi_f
44 real*8 xin45 real*8 xin
45 real*8 alpha,qz46 real*8 alpha,qz
46 real*8 f, qmi,qma, q2max47 real*8 f, qmi,qma, q2max
47 real*8 PI48 real*8 PI
49
50 integer nb_proton(2), nb_neutron(2)
51 common/to_heavyion_pdg/ nb_proton, nb_neutron
52 double precision mass_ion(2)
53 common/to_heavyion_mass/mass_ion
54
48 data PI/3.14159265358979323846/55 data PI/3.14159265358979323846/
4956
50 data xin/0.938/ ! proton mass in GeV57 data xin/0.938/ ! proton mass in GeV
5158
52 alpha = .007299270159 alpha = .0072992701
53 qz = 0.7160 qz = 0.71
61
62 if (nb_proton(beamid).ne.1.or.nb_neutron(beamid).ne.0)then
63 xin = mass_ion(beamid)
64 alpha = alpha * nb_proton(beamid)
65 endif
54 66
55C // x = omega/E = (E-E')/E67C // x = omega/E = (E-E')/E
56 if (x.lt.1) then68 if (x.lt.1) then
5769
=== modified file 'Template/LO/Source/PDF/pdg2pdf.f'
--- Template/LO/Source/PDF/pdg2pdf.f 2018-03-07 23:11:46 +0000
+++ Template/LO/Source/PDF/pdg2pdf.f 2020-05-23 19:29:41 +0000
@@ -58,12 +58,14 @@
58 endif58 endif
5959
60 ipart=ipdg60 ipart=ipdg
61 if(iabs(ipart).eq.21) ipart=061 if(iabs(ipart).eq.21) then
62 if(iabs(ipart).eq.22) ipart=762 ipart=0
63 iporg=ipart63 else if(iabs(ipart).eq.22) then
6464 ipart=7
65 else if(iabs(ipart).eq.7) then
66 ipart=7
65c This will be called for any PDG code, but we only support up to 767c This will be called for any PDG code, but we only support up to 7
66 if(iabs(ipart).gt.7)then68 else if(iabs(ipart).gt.7)then
67 write(*,*) 'PDF not supported for pdg ',ipdg69 write(*,*) 'PDF not supported for pdg ',ipdg
68 write(*,*) 'For lepton colliders, please set the lpp* '//70 write(*,*) 'For lepton colliders, please set the lpp* '//
69 $ 'variables to 0 in the run_card' 71 $ 'variables to 0 in the run_card'
@@ -72,6 +74,7 @@
72 stop 174 stop 1
73 endif75 endif
7476
77 iporg=ipart
75 ireuse = 078 ireuse = 0
76 do i=1,279 do i=1,2
77c Check if result can be reused since any of last two calls80c Check if result can be reused since any of last two calls
@@ -131,7 +134,7 @@
131 if(ih.eq.3) then !from the electron134 if(ih.eq.3) then !from the electron
132 pdg2pdf=epa_electron(x,q2max)135 pdg2pdf=epa_electron(x,q2max)
133 elseif(ih .eq. 2) then !from a proton without breaking136 elseif(ih .eq. 2) then !from a proton without breaking
134 pdg2pdf=epa_proton(x,q2max)137 pdg2pdf=epa_proton(x,q2max,beamid)
135 endif 138 endif
136 pdflast(iporg,ireuse)=pdg2pdf139 pdflast(iporg,ireuse)=pdg2pdf
137 return140 return
138141
=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf.f'
--- Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2018-03-07 23:11:46 +0000
+++ Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2020-05-23 19:29:41 +0000
@@ -57,6 +57,7 @@
57 ipart=ipdg57 ipart=ipdg
58 if(ipart.eq.21) ipart=058 if(ipart.eq.21) ipart=0
59 if(iabs(ipart).eq.22) ipart=759 if(iabs(ipart).eq.22) ipart=7
60 if(iabs(ipart).eq.7) ipart=7
60 iporg=ipart61 iporg=ipart
6162
62c This will be called for any PDG code, but we only support up to 763c This will be called for any PDG code, but we only support up to 7
6364
=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf6.f'
--- Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2018-03-07 23:11:46 +0000
+++ Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2020-05-23 19:29:41 +0000
@@ -24,7 +24,7 @@
24 integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem24 integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem
25 & ,i_replace,ii,ipartlast(20)25 & ,i_replace,ii,ipartlast(20)
26 double precision xlast(20),xmulast(20),pdflast(-7:7,20)26 double precision xlast(20),xmulast(20),pdflast(-7:7,20)
27 double precision epa_proton27 double precision epa_proton, epa_electron
28 save ihlast,xlast,xmulast,pdflast,imemlast,ipartlast28 save ihlast,xlast,xmulast,pdflast,imemlast,ipartlast
29 data ihlast/20*-99/29 data ihlast/20*-99/
30 data ipartlast/20*-99/30 data ipartlast/20*-99/
@@ -54,12 +54,14 @@
54 endif54 endif
5555
56 ipart=ipdg56 ipart=ipdg
57 if(iabs(ipart).eq.21) ipart=057 if(iabs(ipart).eq.21) then
58 if(iabs(ipart).eq.22) ipart=758 ipart=0
59 iporg=ipart59 else if(iabs(ipart).eq.22) then
6060 ipart=7
61 else if (iabs(ipart).eq.7) then
62 ipart=7
61c This will be called for any PDG code, but we only support up to 763c This will be called for any PDG code, but we only support up to 7
62 if(iabs(ipart).gt.7)then64 else if(iabs(ipart).gt.7)then
63 write(*,*) 'PDF not supported for pdg ',ipdg65 write(*,*) 'PDF not supported for pdg ',ipdg
64 write(*,*) 'For lepton colliders, please set the lpp* '//66 write(*,*) 'For lepton colliders, please set the lpp* '//
65 $ 'variables to 0 in the run_card' 67 $ 'variables to 0 in the run_card'
@@ -68,6 +70,7 @@
68 stop 170 stop 1
69 endif71 endif
7072
73 iporg=ipart
71c Determine the iset used in lhapdf74c Determine the iset used in lhapdf
72 call getnset(iset)75 call getnset(iset)
73 if (iset.ne.1) then76 if (iset.ne.1) then
@@ -136,6 +139,8 @@
136 pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid))139 pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid))
137 endif140 endif
138 pdg2pdf=pdg2pdf/x141 pdg2pdf=pdg2pdf/x
142 else if(ih.eq.3) then !from the electron
143 pdg2pdf=epa_electron(x,xmu*xmu)
139 else if(ih.eq.2) then ! photon from a proton without breaking144 else if(ih.eq.2) then ! photon from a proton without breaking
140 pdg2pdf = epa_proton(x,xmu*xmu)145 pdg2pdf = epa_proton(x,xmu*xmu)
141 else146 else
142147
=== modified file 'Template/LO/Source/dsample.f'
--- Template/LO/Source/dsample.f 2017-09-24 21:24:55 +0000
+++ Template/LO/Source/dsample.f 2020-05-23 19:29:41 +0000
@@ -316,6 +316,7 @@
316 fx =0d0316 fx =0d0
317 wgt=0d0317 wgt=0d0
318 endif318 endif
319
319 if (nzoom .le. 0) then320 if (nzoom .le. 0) then
320 call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result321 call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result
321 else322 else
@@ -705,6 +706,7 @@
705 tmean = 0d0706 tmean = 0d0
706 trmean = 0d0707 trmean = 0d0
707 tsigma = 0d0708 tsigma = 0d0
709 nb_pass_cuts = 0
708 kn = 0710 kn = 0
709 cur_it = 1711 cur_it = 1
710 do j=1,ng712 do j=1,ng
@@ -1029,7 +1031,7 @@
10291031
1030 integer i,j1032 integer i,j
10311033
1032 open(26, file='ftn26',status='unknown')1034 open(26, file=name, status='unknown')
1033 write(26,fmt='(4f21.17)') ((grid(2,i,j),i=1,ng),j=1,invar)1035 write(26,fmt='(4f21.17)') ((grid(2,i,j),i=1,ng),j=1,invar)
1034 write(26,*) twgt, force_max_wgt1036 write(26,*) twgt, force_max_wgt
1035c write(26,fmt='(4f21.16)') (alpha(i),i=1,maxconfigs)1037c write(26,fmt='(4f21.16)') (alpha(i),i=1,maxconfigs)
@@ -1516,7 +1518,7 @@
1516c1518c
1517 include 'genps.inc'1519 include 'genps.inc'
1518 integer max_events1520 integer max_events
1519 parameter (max_events=500000) !Maximum # events before get non_zero1521 parameter (max_events=5000000) !Maximum # events before get non_zero
1520c1522c
1521c Arguments1523c Arguments
1522c1524c
@@ -1756,6 +1758,11 @@
1756 if (kn .ge. max_events .and. non_zero .le. 5) then1758 if (kn .ge. max_events .and. non_zero .le. 5) then
1757 call none_pass(max_events)1759 call none_pass(max_events)
1758 endif1760 endif
1761 if (iteration.eq.1) then
1762 if (nb_pass_cuts.ge.1000 .and. non_zero.eq.0) then
1763 call none_pass(1000)
1764 endif
1765 endif
1759 if (non_zero .ge. events .or. (kn .gt. 200*events .and.1766 if (non_zero .ge. events .or. (kn .gt. 200*events .and.
1760 $ non_zero .gt. 5)) then1767 $ non_zero .gt. 5)) then
17611768
@@ -2267,8 +2274,20 @@
2267c----2274c----
2268c Begin Code2275c Begin Code
2269c----2276c----
2270 write(*,*) 'No points passed cuts!'2277 if (1000.eq.max_events) then
2271 write(*,*) 'Loosen cuts or increase max_events',max_events2278 write(*,*) nb_pass_cuts,
2279 & ' points passed the cut but all returned zero'
2280 write(*,*) 'therefore considering this contribution as zero'
2281 else if (nb_pass_cuts.gt.0.and.nb_pass_cuts.lt.1000)then
2282 write(*,*) 'only', nb_pass_cuts,
2283 & ' points passed the cut and they all returned zero'
2284 write(*,*) 'therefore considering this contribution as zero'
2285 write(*,*) 'Loosen cuts or increase max_events if you believe this is not zero'
2286 else
2287 write(*,*) 'No points passed cuts!'
2288 write(*,*) 'Loosen cuts or increase max_events',max_events
2289 endif
2290
2272c open(unit=22,file=result_file,status='old',access='append',2291c open(unit=22,file=result_file,status='old',access='append',
2273c & err=23)2292c & err=23)
2274c write(22,222) 'Iteration',0,'Mean: ',0d0,2293c write(22,222) 'Iteration',0,'Mean: ',0d0,
@@ -2540,6 +2559,7 @@
25402559
2541 write(*,*) "RESET CUMULATIVE VARIABLE"2560 write(*,*) "RESET CUMULATIVE VARIABLE"
2542 non_zero = 02561 non_zero = 0
2562 nb_pass_cuts = 0
2543 do j=1,maxinvar2563 do j=1,maxinvar
2544 do i=1,ng -12564 do i=1,ng -1
2545 inon_zero = 02565 inon_zero = 0
25462566
=== modified file 'Template/LO/Source/genps.inc'
--- Template/LO/Source/genps.inc 2016-04-02 14:23:21 +0000
+++ Template/LO/Source/genps.inc 2020-05-23 19:29:41 +0000
@@ -38,3 +38,8 @@
38 double precision hel_jacobian38 double precision hel_jacobian
39 INTEGER HEL_PICKED39 INTEGER HEL_PICKED
40 COMMON/HEL_PICKED/HEL_PICKED,hel_jacobian40 COMMON/HEL_PICKED/HEL_PICKED,hel_jacobian
41c**********************************************************************************
42c parameters to control is zero-cross section is due to PS or matrix-element
43c**********************************************************************************
44 integer nb_pass_cuts
45 common/cut_efficiency/nb_pass_cuts
41\ No newline at end of file46\ No newline at end of file
4247
=== modified file 'Template/LO/Source/run.inc'
--- Template/LO/Source/run.inc 2018-02-01 22:30:56 +0000
+++ Template/LO/Source/run.inc 2020-05-23 19:29:41 +0000
@@ -16,6 +16,9 @@
16 integer lpp(2)16 integer lpp(2)
17 double precision ebeam(2), xbk(2),q2fact(2)17 double precision ebeam(2), xbk(2),q2fact(2)
18 common/to_collider/ ebeam , xbk ,q2fact, lpp18 common/to_collider/ ebeam , xbk ,q2fact, lpp
19
20 integer frame_id
21 common/to_frame_me/frame_id
19c22c
20c Number of events23c Number of events
21c24c
@@ -91,4 +94,7 @@
91 double precision mxxmin4pdg(0:25) 94 double precision mxxmin4pdg(0:25)
92 logical mxxpart_antipart(1:25)95 logical mxxpart_antipart(1:25)
93 common/TO_PDG_SPECIFIC_CUT/pdg_cut, ptmin4pdg,ptmax4pdg, Emin4pdg, Emax4pdg, etamin4pdg,96 common/TO_PDG_SPECIFIC_CUT/pdg_cut, ptmin4pdg,ptmax4pdg, Emin4pdg, Emax4pdg, etamin4pdg,
94 &etamax4pdg, mxxmin4pdg,mxxpart_antipart
95\ No newline at end of file97\ No newline at end of file
98 &etamax4pdg, mxxmin4pdg,mxxpart_antipart
99
100 double precision small_width_treatment
101 common/narrow_width/small_width_treatment
96\ No newline at end of file102\ No newline at end of file
97103
=== modified file 'Template/LO/Source/transpole.f'
--- Template/LO/Source/transpole.f 2016-06-15 22:46:42 +0000
+++ Template/LO/Source/transpole.f 2020-05-23 19:29:41 +0000
@@ -28,13 +28,24 @@
28 double precision z,zmin,zmax,xmin,xmax,ez28 double precision z,zmin,zmax,xmin,xmax,ez
29 double precision pole1,width1,x,xc29 double precision pole1,width1,x,xc
30 double precision a,b30 double precision a,b
31c
32c small width treatment
33c
34 double precision small_width_treatment
35 common/narrow_width/small_width_treatment
31c-----36c-----
32c Begin Code37c Begin Code
33c-----38c-----
34 pole=pole139 pole=pole1
35 width=width140 width=width1
41
36 x = x142 x = x1
37 if (pole .gt. 0d0) then43 if (pole .gt. 0d0) then
44 if (width.lt.pole*small_width_treatment)then
45 width = pole * small_width_treatment
46 jac = jac * width/width1
47 endif
48
38 zmin = atan((-pole)/width)/width49 zmin = atan((-pole)/width)/width
39 zmax = atan((1d0-pole)/width)/width50 zmax = atan((1d0-pole)/width)/width
40 if (x .gt. del .and. x .lt. 1d0-del) then51 if (x .gt. del .and. x .lt. 1d0-del) then
@@ -175,7 +186,11 @@
175c186c
176 double precision pole1,width1,y1,jac187 double precision pole1,width1,y1,jac
177 real*8 x188 real*8 x
178189c
190c small width treatment
191c
192 double precision small_width_treatment
193 common/narrow_width/small_width_treatment
179c194c
180c Local195c Local
181c196c
@@ -191,6 +206,10 @@
191 width=width1206 width=width1
192 y = y1207 y = y1
193 if (pole .gt. 0d0) then !BW 208 if (pole .gt. 0d0) then !BW
209 if (width.lt.pole*small_width_treatment)then
210 width = pole * small_width_treatment
211 jac = jac * width/width1
212 endif
194 zmin = atan((-pole)/width)/width213 zmin = atan((-pole)/width)/width
195 zmax = atan((1d0-pole)/width)/width214 zmax = atan((1d0-pole)/width)/width
196 z = atan((y-pole)/width)/width215 z = atan((y-pole)/width)/width
197216
=== modified file 'Template/LO/SubProcesses/cuts.f'
--- Template/LO/SubProcesses/cuts.f 2018-01-11 16:16:25 +0000
+++ Template/LO/SubProcesses/cuts.f 2020-05-23 19:29:41 +0000
@@ -1592,6 +1592,7 @@
1592 m0d = 0.01592 m0d = 0.0
1593 m0c = 1.51593 m0c = 1.5
1594 m0s = 0.01594 m0s = 0.0
1595 m0b = 4.7
1595 m0t = 172.51596 m0t = 172.5
1596 m0w = 80.41597 m0w = 80.4
1597 m0z = 91.1881598 m0z = 91.188
15981599
=== modified file 'Template/LO/SubProcesses/dummy_fct.f'
--- Template/LO/SubProcesses/dummy_fct.f 2018-01-11 16:16:25 +0000
+++ Template/LO/SubProcesses/dummy_fct.f 2020-05-23 19:29:41 +0000
@@ -86,3 +86,13 @@
86 shat = x(1)*x(2)*ebeam(1)*ebeam(2)86 shat = x(1)*x(2)*ebeam(1)*ebeam(2)
87 return 87 return
88 end88 end
89
90
91 logical function dummy_boostframe()
92 implicit none
93c
94c
95 dummy_boostframe = .false.
96 return
97 end
98
8999
=== modified file 'Template/LO/SubProcesses/genps.f'
--- Template/LO/SubProcesses/genps.f 2018-06-27 09:03:22 +0000
+++ Template/LO/SubProcesses/genps.f 2020-05-23 19:29:41 +0000
@@ -185,7 +185,8 @@
185c External function185c External function
186 double precision SumDot186 double precision SumDot
187 external SumDot187 external SumDot
188188 logical dummy_boostframe
189 external dummy_boostframe
189c190c
190c data191c data
191c192c
@@ -304,8 +305,12 @@
304c First Generate Momentum for initial state particles305c First Generate Momentum for initial state particles
305c306c
306 if (lpp(1).eq.9.or.lpp(2).eq.9)then307 if (lpp(1).eq.9.or.lpp(2).eq.9)then
307 p(:,1) = pi1(:)308 if (dummy_boostframe())then
308 p(:,2) = pi2(:)309 call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))
310 else
311 p(:,1) = pi1(:)
312 p(:,2) = pi2(:)
313 endif
309 else if(nincoming.eq.2) then314 else if(nincoming.eq.2) then
310 call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))315 call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2))
311 else316 else
@@ -840,7 +845,7 @@
840 m12 = m(itree(2,ibranch))**2845 m12 = m(itree(2,ibranch))**2
841 mn2 = m(ibranch-1)**2846 mn2 = m(ibranch-1)**2
842c write(*,*) 'Enertering yminmax',sqrt(s1),sqrt(m12),sqrt(mn2)847c write(*,*) 'Enertering yminmax',sqrt(s1),sqrt(m12),sqrt(mn2)
843 call yminmax(s1,t,m12,ma2,mb2,mn2,tmin,tmax)848 call yminmax(s1,0d0,m12,ma2,mb2,mn2,tmin,tmax)
844c849c
845c Call for 0<x<1850c Call for 0<x<1
846c851c
@@ -1114,6 +1119,7 @@
1114C This is the G function from Particle Kinematics by1119C This is the G function from Particle Kinematics by
1115C E. Byckling and K. Kajantie, Chapter 4 p. 91 eqs 5.281120C E. Byckling and K. Kajantie, Chapter 4 p. 91 eqs 5.28
1116C It is used to determine physical limits for Y based on inputs1121C It is used to determine physical limits for Y based on inputs
1122C Y is not used in this formula (called with dummy value)
1117C**************************************************************************1123C**************************************************************************
1118 implicit none1124 implicit none
1119c1125c
@@ -1258,5 +1264,47 @@
1258 END1264 END
1259 1265
12601266
1267C -----------------------------------------
1268C Subroutine to return momenta in a dedicated frame
1269C frame_id is the tag of the particle to put at rest
1270C frame_id follow the convention of cluster.f (sum 2**(N-1))
1271C -----------------------------------------
1272
1273 subroutine boost_to_frame(P1, frame_id, P2)
1274
1275 implicit none
1276
1277 include 'nexternal.inc'
1278
1279 DOUBLE PRECISION P1(0:3,NEXTERNAL)
1280 DOUBLE PRECISION P2(0:3,NEXTERNAL)
1281 DOUBLE PRECISION PBOOST(0:3)
1282 integer frame_id
1283
1284 integer ids(nexternal)
1285 integer i,j
1286
1287c uncompress
1288 call mapid(frame_id, ids)
1289 pboost(:) = 0d0
1290 p2(:,:) = 0d0
1291c find the boost momenta --sum of particles--
1292 do i=1,nexternal
1293 if (ids(i).eq.1)then
1294 do j=0,3
1295 Pboost(j) = Pboost(j) + P1(j,i)
1296 enddo
1297 endif
1298 enddo
1299 do j=1,3
1300 Pboost(j) = -1 * Pboost(j)
1301 enddo
1302 do i=1, nexternal
1303 call boostx(p1(0,i), pboost, p2(0,i))
1304 enddo
1305 return
1306 end
1307
1308
12611309
12621310
12631311
=== modified file 'Template/LO/SubProcesses/myamp.f'
--- Template/LO/SubProcesses/myamp.f 2016-12-17 16:26:56 +0000
+++ Template/LO/SubProcesses/myamp.f 2020-05-23 19:29:41 +0000
@@ -1,91 +1,3 @@
1 double precision function testamp(p)
2c*****************************************************************************
3c Approximates matrix element by propagators
4c*****************************************************************************
5 implicit none
6c
7c Constants
8c
9 include 'genps.inc'
10 include 'maxconfigs.inc'
11 include 'nexternal.inc'
12 double precision zero
13 parameter (zero = 0d0)
14c
15c Arguments
16c
17 double precision p(0:3,nexternal)
18c integer iconfig
19c
20c Local
21c
22 double precision xp(0:3,-nexternal:nexternal)
23 double precision mpole(-nexternal:0),shat,tsgn
24 integer i,j,iconfig
25
26 double precision prmass(-nexternal:0,lmaxconfigs)
27 double precision prwidth(-nexternal:0,lmaxconfigs)
28 integer pow(-nexternal:0,lmaxconfigs)
29 logical first_time
30c
31c Global
32c
33 integer iforest(2,-max_branch:-1,lmaxconfigs)
34 common/to_forest/ iforest
35 integer mapconfig(0:lmaxconfigs), this_config
36 common/to_mconfigs/mapconfig, this_config
37
38 include 'coupl.inc'
39c
40c External
41c
42 double precision dot
43
44 save prmass,prwidth,pow
45 data first_time /.true./
46c-----
47c Begin Code
48c-----
49 iconfig = this_config
50 if (first_time) then
51c include 'props.inc'
52 first_time=.false.
53 endif
54
55 do i=1,nexternal
56 mpole(-i)=0d0
57 do j=0,3
58 xp(j,i)=p(j,i)
59 enddo
60 enddo
61c mpole(-3) = 174**2
62c shat = dot(p(0,1),p(0,2))/(1800)**2
63 shat = dot(p(0,1),p(0,2))/(10)**2
64c shat = 1d0
65 testamp = 1d0
66 tsgn = +1d0
67 do i=-1,-(nexternal-3),-1 !Find all the propagotors
68 if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
69 do j=0,3
70 xp(j,i) = xp(j,iforest(1,i,iconfig))
71 $ +tsgn*xp(j,iforest(2,i,iconfig))
72 enddo
73 if (prwidth(i,iconfig) .ne. 0d0 .and. .false.) then
74 testamp=testamp/((dot(xp(0,i),xp(0,i))
75 $ -prmass(i,iconfig)**2)**2
76 $ -(prmass(i,iconfig)*prwidth(i,iconfig))**2)
77 else
78 testamp = testamp/((dot(xp(0,i),xp(0,i)) -
79 $ prmass(i,iconfig)**2)
80 $ **(pow(i,iconfig)))
81 endif
82 testamp=testamp*shat**(pow(i,iconfig))
83c write(*,*) i,iconfig,pow(i,iconfig),prmass(i,iconfig)
84 enddo
85c testamp = 1d0/dot(xp(0,-1),xp(0,-1))
86 testamp=abs(testamp)
87c testamp = 1d0
88 end
891
90 logical function cut_bw(p)2 logical function cut_bw(p)
91c*****************************************************************************3c*****************************************************************************
@@ -114,6 +26,7 @@
11426
115 double precision prmass(-nexternal:0,lmaxconfigs)27 double precision prmass(-nexternal:0,lmaxconfigs)
116 double precision prwidth(-nexternal:0,lmaxconfigs)28 double precision prwidth(-nexternal:0,lmaxconfigs)
29 double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
117 integer pow(-nexternal:0,lmaxconfigs)30 integer pow(-nexternal:0,lmaxconfigs)
118 logical first_time, onshell31 logical first_time, onshell
119 double precision xmass32 double precision xmass
@@ -152,13 +65,14 @@
152c65c
153 double precision dot66 double precision dot
15467
155 save prmass,prwidth,pow68 save prmass,prwidth,pow,prwidth_tmp
156 data first_time /.true./69 data first_time /.true./
157c-----70c-----
158c Begin Code71c Begin Code
159c----- 72c-----
160 cut_bw = .false. !Default is we passed the cut73 cut_bw = .false. !Default is we passed the cut
161 iconfig = this_config74 iconfig = this_config
75
162 if (first_time) then76 if (first_time) then
163 include 'props.inc'77 include 'props.inc'
164 nbw = 078 nbw = 0
@@ -209,10 +123,12 @@
209c write(*,*) 'xmass',xmass,prmass(i,iconfig)123c write(*,*) 'xmass',xmass,prmass(i,iconfig)
210c124c
211c Here we set if the BW is "on-shell" for LesHouches125c Here we set if the BW is "on-shell" for LesHouches
212c126c
127 prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
128
213 onshell = (abs(xmass - prmass(i,iconfig)) .lt.129 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
214 $ bwcutoff*prwidth(i,iconfig).and.130 $ bwcutoff*prwidth_tmp(i,iconfig).and.
215 $ (prwidth(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.131 $ (prwidth_tmp(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.
216 $ gForceBW(i,iconfig).eq.1))132 $ gForceBW(i,iconfig).eq.1))
217 if(onshell)then133 if(onshell)then
218c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11)134c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11)
@@ -264,10 +180,10 @@
264c For decay-chain syntax use BWcutoff here too (22/12/14)180c For decay-chain syntax use BWcutoff here too (22/12/14)
265 if (gForceBW(i, iconfig).eq.1) then181 if (gForceBW(i, iconfig).eq.1) then
266 onshell = (abs(xmass - prmass(i,iconfig)) .lt.182 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
267 $ bwcutoff*prwidth(i,iconfig))183 $ bwcutoff*prwidth_tmp(i,iconfig))
268 else184 else
269 onshell = (abs(xmass - prmass(i,iconfig)) .lt.185 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
270 $ 5d0*prwidth(i,iconfig))186 $ 5d0*prwidth_tmp(i,iconfig))
271 endif187 endif
272188
273 if (onshell .and. (lbw(nbw).eq. 2) .or.189 if (onshell .and. (lbw(nbw).eq. 2) .or.
@@ -313,6 +229,7 @@
313229
314 double precision prmass(-nexternal:0,lmaxconfigs)230 double precision prmass(-nexternal:0,lmaxconfigs)
315 double precision prwidth(-nexternal:0,lmaxconfigs)231 double precision prwidth(-nexternal:0,lmaxconfigs)
232 double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
316 integer pow(-nexternal:0,lmaxconfigs)233 integer pow(-nexternal:0,lmaxconfigs)
317234
318 integer idup(nexternal,maxproc,maxsproc)235 integer idup(nexternal,maxproc,maxsproc)
@@ -382,11 +299,21 @@
382299
383c-----300c-----
384c Begin Code301c Begin Code
385c----- 302c-----
303 iconfig = this_config
304c needs to be initialise to avoid segfault
305 do i = -nexternal,-1
306 prwidth(i,iconfig) = 0
307 prmass(i,iconfig) =0
308 enddo
386 include 'props.inc'309 include 'props.inc'
387c etmin = 10310c etmin = 10
388 nt = 0311 nt = 0
389 iconfig = this_config312 do i = -nexternal,-1
313 prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
314 enddo
315
316
390 mtot = 0d0317 mtot = 0d0
391 etot = 0d0 !Total energy needed318 etot = 0d0 !Total energy needed
392 spmass = 0d0 !Keep track of BW masses for shat319 spmass = 0d0 !Keep track of BW masses for shat
@@ -423,7 +350,7 @@
423c Look for identical particles to map radiation processes350c Look for identical particles to map radiation processes
424 call idenparts(iden_part, iforest(1,-max_branch,iconfig),351 call idenparts(iden_part, iforest(1,-max_branch,iconfig),
425 $ sprop(1,-max_branch,iconfig), gForceBW(-max_branch,iconfig),352 $ sprop(1,-max_branch,iconfig), gForceBW(-max_branch,iconfig),
426 $ prwidth(-nexternal,iconfig))353 $ prwidth_tmp(-nexternal,iconfig))
427354
428c Start loop over propagators355c Start loop over propagators
429 do i=-1,-(nexternal-3),-1356 do i=-1,-(nexternal-3),-1
@@ -446,15 +373,15 @@
446 xm(i)=max(xm(i),max(xqcutij(l1,l2),0d0))373 xm(i)=max(xm(i),max(xqcutij(l1,l2),0d0))
447 endif374 endif
448c write(*,*) 'iconfig,i',iconfig,i375c write(*,*) 'iconfig,i',iconfig,i
449c write(*,*) prwidth(i,iconfig),prmass(i,iconfig)376c write(*,*) prwidth_tmp(i,iconfig),prmass(i,iconfig)
450 if (prwidth(i,iconfig) .gt. 0 ) then377 if (prwidth_tmp(i,iconfig) .gt. 0 ) then
451 nbw=nbw+1378 nbw=nbw+1
452c JA 6/8/2011 Set xe(i) for resonances379c JA 6/8/2011 Set xe(i) for resonances
453 if (gforcebw(i,iconfig).eq.1) then380 if (gforcebw(i,iconfig).eq.1) then
454 xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth(i,iconfig))381 xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth_tmp(i,iconfig))
455 bwcut_for_PS(i) = bwcutoff382 bwcut_for_PS(i) = bwcutoff
456 else if (lbw(nbw).eq.1) then383 else if (lbw(nbw).eq.1) then
457 xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth(i,iconfig))384 xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth_tmp(i,iconfig))
458 bwcut_for_PS(i) = 5d0385 bwcut_for_PS(i) = 5d0
459 else386 else
460 bwcut_for_PS(i) = 5d0387 bwcut_for_PS(i) = 5d0
@@ -465,19 +392,19 @@
465c Either: required onshell and daughter masses too large392c Either: required onshell and daughter masses too large
466c Or: forced and daughter masses too large393c Or: forced and daughter masses too large
467c Or: required offshell and forced394c Or: required offshell and forced
468 if(prwidth(i,iconfig) .gt. 0.and.395 if(prwidth_tmp(i,iconfig) .gt. 0.and.
469 $ (lbw(nbw).eq.1.and.396 $ (lbw(nbw).eq.1.and.
470 $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig).lt.xm(i)397 $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig).lt.xm(i)
471 $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig).gt.dsqrt(stot))398 $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig).gt.dsqrt(stot))
472 $ .or.gforcebw(i,iconfig).eq.1.and.399 $ .or.gforcebw(i,iconfig).eq.1.and.
473 $ prmass(i,iconfig)+bwcutoff*prwidth(i,iconfig).lt.xm(i)400 $ prmass(i,iconfig)+bwcutoff*prwidth_tmp(i,iconfig).lt.xm(i)
474 $ .or.lbw(nbw).eq.2.and.gforcebw(i,iconfig).eq.1))401 $ .or.lbw(nbw).eq.2.and.gforcebw(i,iconfig).eq.1))
475 $ then402 $ then
476c Write results.dat and quit403c Write results.dat and quit
477 call write_null_results()404 call write_null_results()
478 stop405 stop
479 endif406 endif
480 if (prwidth(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.407 if (prwidth_tmp(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.
481 if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat408 if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat
482 j = 3*(nexternal-2)-4+1 !set i to ndim+1409 j = 3*(nexternal-2)-4+1 !set i to ndim+1
483c-----410c-----
@@ -489,27 +416,27 @@
489 $ .or. lbw(nbw).eq.1) then416 $ .or. lbw(nbw).eq.1) then
490 write(*,*) 'Setting PDF BW',j,nbw,prmass(i,iconfig)417 write(*,*) 'Setting PDF BW',j,nbw,prmass(i,iconfig)
491 spole(j)=prmass(i,iconfig)*prmass(i,iconfig)/stot418 spole(j)=prmass(i,iconfig)*prmass(i,iconfig)/stot
492 swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot419 swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
493 endif420 endif
494 else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig)).ge.xm(i)421 else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig)).ge.xm(i)
495 $ .and. iden_part(i).eq.0 .or. lbw(nbw).eq.1) then422 $ .and. iden_part(i).eq.0 .or. lbw(nbw).eq.1) then
496c JA 02/13 Only allow BW if xm below M+5*Gamma423c JA 02/13 Only allow BW if xm below M+5*Gamma
497 write(*,*) 'Setting BW',i,nbw,prmass(i,iconfig)424 write(*,*) 'Setting BW',i,nbw,prmass(i,iconfig)
498 spole(-i)=prmass(i,iconfig)*prmass(i,iconfig)/stot425 spole(-i)=prmass(i,iconfig)*prmass(i,iconfig)/stot
499 swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot426 swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
500 endif427 endif
501c JA 4/1/2011 Set grid in case there is no BW (radiation process)428c JA 4/1/2011 Set grid in case there is no BW (radiation process)
502 if (swidth(-i) .eq. 0d0 .and.429 if (swidth(-i) .eq. 0d0 .and.
503 $ i.ne.-(nexternal-(nincoming+1)))then430 $ i.ne.-(nexternal-(nincoming+1)))then
504 a=prmass(i,iconfig)**2/stot431 a=prmass(i,iconfig)**2/stot
505 xo = min(xm(i)**2/stot, 1-1d-8)432 xo = min(xm(i)**2/stot, 1-1d-8)
506 if (xo.eq.0d0) xo=1d0/stot433 if (xo.eq.0d0) xo=MIN(10d0/stot, stot/50d0, 0.5)
507 call setgrid(-i,xo,a,1)434 call setgrid(-i,xo,a,1)
508 endif435 endif
509c Set spmass for BWs436c Set spmass for BWs
510 if (swidth(-i) .ne. 0d0)437 if (swidth(-i) .ne. 0d0)
511 $ spmass=spmass-xm(i) +438 $ spmass=spmass-xm(i) +
512 $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig))439 $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig))
513 else !1/x^pow440 else !1/x^pow
514 a=prmass(i,iconfig)**2/stot441 a=prmass(i,iconfig)**2/stot
515c JA 4/1/2011 always set grid442c JA 4/1/2011 always set grid
@@ -529,8 +456,8 @@
529 xo = (MMJJ * 0.8)**2/stot456 xo = (MMJJ * 0.8)**2/stot
530 endif457 endif
531 endif458 endif
532 if (xo.eq.0d0) xo=1d0/stot459 if (xo.eq.0d0) xo=MIN(10d0/stot, stot/50d0, 0.5)
533c if (prwidth(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then 460c if (prwidth_tmp(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then
534 call setgrid(-i,xo,a,1)461 call setgrid(-i,xo,a,1)
535c else 462c else
536c write(*,*) 'Using flat grid for BW',i,nbw,463c write(*,*) 'Using flat grid for BW',i,nbw,
@@ -574,7 +501,7 @@
574c Use 1/10000 of sqrt(s) as minimum, to always get integration501c Use 1/10000 of sqrt(s) as minimum, to always get integration
575 xo = xo*xo/stot502 xo = xo*xo/stot
576 if (xo.eq.0d0)then503 if (xo.eq.0d0)then
577 xo=1d0/stot504 xo=1/10000d0
578 write(*,*) 'Warning: No cutoff for shat integral found'505 write(*,*) 'Warning: No cutoff for shat integral found'
579 write(*,*) ' Minimum set to ', xo506 write(*,*) ' Minimum set to ', xo
580 endif507 endif
@@ -587,7 +514,7 @@
587 endif514 endif
588 enddo515 enddo
589c Perform setting for shat (PDF BW or 1/s)516c Perform setting for shat (PDF BW or 1/s)
590 if (abs(lpp(1)) .eq. 1 .or. abs(lpp(2)) .eq. 1) then517 if (abs(lpp(1)) .ge. 1 .or. abs(lpp(2)) .ge. 1) then
591c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s)518c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s)
592 i = max(1,3*(nexternal-2) - 4 + 1)519 i = max(1,3*(nexternal-2) - 4 + 1)
593 xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot)520 xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot)
@@ -610,7 +537,7 @@
610 spole(i)= -2.0d0 ! 1/s pole537 spole(i)= -2.0d0 ! 1/s pole
611 write(*,*) "Transforming s_hat 1/s ",i,xo, smin, stot538 write(*,*) "Transforming s_hat 1/s ",i,xo, smin, stot
612 else539 else
613 write(*,*) "Transforming s_hat BW ",spole(i),swidth(i)540 write(*,*) "Transforming s_hat BW ",spole(i), max(swidth(i), spole(i)*small_width_treatment)
614 endif541 endif
615 endif542 endif
616543
617544
=== modified file 'Template/LO/SubProcesses/reweight.f'
--- Template/LO/SubProcesses/reweight.f 2018-07-22 11:40:04 +0000
+++ Template/LO/SubProcesses/reweight.f 2020-05-23 19:29:41 +0000
@@ -316,7 +316,7 @@
316 ipart(1,imo)=ipart(1,ida2)316 ipart(1,imo)=ipart(1,ida2)
317 ipart(2,imo)=ipart(2,ida2)317 ipart(2,imo)=ipart(2,ida2)
318 endif318 endif
319 else if(idmo.eq.21 .and. abs(idda1).le.6 .and.319 else if(idmo.eq.21.and. abs(idda1).le.6 .and.
320 $ abs(idda2).le.6) then320 $ abs(idda2).le.6) then
321c gluon -> quark anti-quark: use both, but take hardest as 1321c gluon -> quark anti-quark: use both, but take hardest as 1
322 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.322 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
@@ -327,6 +327,17 @@
327 ipart(1,imo)=ipart(1,ida2)327 ipart(1,imo)=ipart(1,ida2)
328 ipart(2,imo)=ipart(1,ida1)328 ipart(2,imo)=ipart(1,ida1)
329 endif329 endif
330 else if (get_color(idmo).eq.8.and.iabs(get_color(idda1)).eq.3.and.
331 $ iabs(get_color(idda2)).eq.3) then
332c gluon' -> quark' anti-quark': use both, but take hardest as 1
333 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
334 $ p(1,ipart(1,ida2))**2+p(2,ipart(1,ida2))**2) then
335 ipart(1,imo)=ipart(1,ida1)
336 ipart(2,imo)=ipart(1,ida2)
337 else
338 ipart(1,imo)=ipart(1,ida2)
339 ipart(2,imo)=ipart(1,ida1)
340 endif
330 else if(idmo.eq.21.and.(idda1.eq.21.or.idda2.eq.21))then341 else if(idmo.eq.21.and.(idda1.eq.21.or.idda2.eq.21))then
331 if(idda1.eq.21) then342 if(idda1.eq.21) then
332 iddgluon = idda1343 iddgluon = idda1
@@ -380,10 +391,32 @@
380c exotic q > Scalar q'391c exotic q > Scalar q'
381 ipart(1,imo)=ipart(1,ida2)392 ipart(1,imo)=ipart(1,ida2)
382 ipart(2,imo)=0393 ipart(2,imo)=0
383 else if (get_color(idmo).eq.1) then394 else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda2)).eq.8.and.iabs(get_color(idda1)).eq.3) then
395c exotic q > q' gluon
396 ipart(1,imo)=ipart(1,ida2)
397 ipart(2,imo)=0
398 else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda2)).eq.3.and.get_color(idda1).eq.8) then
399c exotic q > gluon q'
400 ipart(1,imo)=ipart(1,ida1)
401 ipart(2,imo)=0
402 else if (get_color(idmo).eq.1.or.get_color(idmo).eq.2.or.get_color(idda1).eq.2.or.get_color(idda2).eq.2) then
384c Color singlet403c Color singlet
385 ipart(1,imo)=ipart(1,ida1)404 ipart(1,imo)=ipart(1,ida1)
386 ipart(2,imo)=ipart(1,ida2)405 ipart(2,imo)=ipart(1,ida2)
406 else if (abs(get_color(idmo)).eq.3.and.abs(get_color(idda1)).eq.3.and.abs(get_color(idda2)).eq.3)then
407c EPSILON^IJK color structure -- handle it as photon emission --
408 ipart(1,imo)=ipart(1,ida1)
409 ipart(2,imo)=0
410 else if (abs(get_color(idmo)).eq.6.and.abs(get_color(idda1)).eq.3.and.abs(get_color(idda2)).eq.3)then
411c sextet -> (anti-)quark (anti-)quark': use both, but take hardest as 1
412 if(p(1,ipart(1,ida1))**2+p(2,ipart(1,ida1))**2.gt.
413 $ p(1,ipart(1,ida2))**2+p(2,ipart(1,ida2))**2) then
414 ipart(1,imo)=ipart(1,ida1)
415 ipart(2,imo)=ipart(1,ida2)
416 else
417 ipart(1,imo)=ipart(1,ida2)
418 ipart(2,imo)=ipart(1,ida1)
419 endif
387 else420 else
388 write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2)421 write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2)
389 write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale"422 write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale"
@@ -641,12 +674,12 @@
641C If we have fixed factorization scale, for ickkw>0 means central674C If we have fixed factorization scale, for ickkw>0 means central
642C scale, i.e. last two scales (ren. scale for these vertices are675C scale, i.e. last two scales (ren. scale for these vertices are
643C anyway already set by "scale" above)676C anyway already set by "scale" above)
644 if(ickkw.gt.0) then677 if (first) then
645 if(fixed_fac_scale.and.first)then
646 q2bck(1)=q2fact(1)678 q2bck(1)=q2fact(1)
647 q2bck(2)=q2fact(2)679 q2bck(2)=q2fact(2)
648 first=.false.680 first=.false.
649 else if(fixed_fac_scale) then681 else if(ickkw.gt.0) then
682 if(fixed_fac_scale) then
650 q2fact(1)=q2bck(1)683 q2fact(1)=q2bck(1)
651 q2fact(2)=q2bck(2)684 q2fact(2)=q2bck(2)
652 endif685 endif
@@ -775,15 +808,17 @@
775c Check QCD jet, take care so not a decay808c Check QCD jet, take care so not a decay
776 if(.not.isjetvx(imocl(n),idacl(n,1),idacl(n,2),809 if(.not.isjetvx(imocl(n),idacl(n,1),idacl(n,2),
777 $ ipdgcl(1,igraphs(1),iproc),ipart,n.eq.nexternal-2)) then810 $ ipdgcl(1,igraphs(1),iproc),ipart,n.eq.nexternal-2)) then
811 pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
812 pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
813 pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
814 if (isqcd(pdgm).and.isqcd(pdgid1).and.isqcd(pdgid2))then
815 continue
778c Remove non-gluon jets that lead up to non-jet vertices816c Remove non-gluon jets that lead up to non-jet vertices
779 if(ipart(1,imocl(n)).gt.2)then ! ipart(1) set and not IS line817 elseif(ipart(1,imocl(n)).gt.2)then ! ipart(1) set and not IS line
780c The ishft gives the FS particle corresponding to imocl818c The ishft gives the FS particle corresponding to imocl
781 if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then819 if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then
782 ! split case for q a > q and for g > g h (with the gluon splitting into quark)820 ! split case for q a > q and for g > g h (with the gluon splitting into quark)
783 ! also check for case of three scalar interaction (then do nothing)821 ! also check for case of three scalar interaction (then do nothing)
784 pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
785 pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
786 pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
787 if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then822 if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then
788 ! this is to avoid to do weird stuff for w+ w- z (or h h h) 823 ! this is to avoid to do weird stuff for w+ w- z (or h h h)
789 ! this fix an issue for qq_zttxqq G1594.08824 ! this fix an issue for qq_zttxqq G1594.08
@@ -955,7 +990,7 @@
955 $ '. Have jets (>0)',(iqjets(i),i=1,nexternal),990 $ '. Have jets (>0)',(iqjets(i),i=1,nexternal),
956 $ ', should be ',991 $ ', should be ',
957 $ (iqjetstore(i,iconfig),i=1,njetstore(iconfig))992 $ (iqjetstore(i,iconfig),i=1,njetstore(iconfig))
958 stop993 stop 4
959 endif994 endif
960 if (btest(mlevel,3))995 if (btest(mlevel,3))
961 $ write(*,*) 'Bad clustering, jets fail. Reclustering ',996 $ write(*,*) 'Bad clustering, jets fail. Reclustering ',
@@ -1697,6 +1732,10 @@
1697 if (btest(mlevel,3))1732 if (btest(mlevel,3))
1698 $ write(*,*)' set fact scales for PS to ',1733 $ write(*,*)' set fact scales for PS to ',
1699 $ sqrt(q2fact(1)),sqrt(q2fact(2))1734 $ sqrt(q2fact(1)),sqrt(q2fact(2))
1735 else if (abs(lpp(1)).eq.2.or.abs(lpp(1)).eq.3) then
1736 q2fact(1)=q2bck(1)
1737 else if (abs(lpp(2)).eq.2.or.abs(lpp(2)).eq.3) then
1738 q2fact(2)=q2bck(2)
1700 endif1739 endif
17011740
1702 if (btest(mlevel,3)) then1741 if (btest(mlevel,3)) then
17031742
=== modified file 'Template/LO/SubProcesses/setcuts.f'
--- Template/LO/SubProcesses/setcuts.f 2018-03-11 12:10:19 +0000
+++ Template/LO/SubProcesses/setcuts.f 2020-05-23 19:29:41 +0000
@@ -664,14 +664,21 @@
664 endif664 endif
665 enddo665 enddo
666666
667c ensure symmetry of s_min(i,j)667c ensure symmetry of s_min(i,j) + mass effect
668 do i=nincoming+1,nexternal-1668 do i=nincoming+1,nexternal-1
669 do j=nincoming+1,nexternal-1669 do j=nincoming+1,nexternal-1
670 if(j.lt.i)then670 if(j.lt.i)then
671 s_min(i,j) = max(s_min(j,i),s_min(i,j))671 s_min(i,j) = max(s_min(j,i), s_min(i,j), (pmass(i)+pmass(j))**2)
672 endif672 endif
673 enddo673 enddo
674 enddo674 enddo
675
676c ensure that smin is bigger than mass threshold
677 smin_p = 0d0
678 do i=nincoming+1, nexternal
679 smin_p = smin_p + pmass(i)
680 enddo
681 smin = max(smin, smin_p**2)
675 write(*,*) "Define smin to", smin682 write(*,*) "Define smin to", smin
676683
677c Check that results are consistent among all the grouped subprocesses684c Check that results are consistent among all the grouped subprocesses
678685
=== modified file 'Template/LO/bin/internal/Gridpack/compile'
--- Template/LO/bin/internal/Gridpack/compile 2015-09-28 20:34:44 +0000
+++ Template/LO/bin/internal/Gridpack/compile 2020-05-23 19:29:41 +0000
@@ -63,7 +63,7 @@
6363
64if [[ -d Source ]]; then64if [[ -d Source ]]; then
65 cd Source65 cd Source
66 for i in ../bin/internal/gen_ximprove all ../bin/internal/combine_events; do66 for i in ../bin/internal/gen_ximprove all; do
67 make $i -j 1 > /dev/null67 make $i -j 1 > /dev/null
68 if [[ $? -ne 0 ]];then68 if [[ $? -ne 0 ]];then
69 # Make didn't exit successfully69 # Make didn't exit successfully
7070
=== modified file 'Template/NLO/Cards/FKS_params.dat'
--- Template/NLO/Cards/FKS_params.dat 2017-08-04 19:52:15 +0000
+++ Template/NLO/Cards/FKS_params.dat 2020-05-23 19:29:41 +0000
@@ -153,6 +153,16 @@
1530.005d01530.005d0
154! Default :: 0.005d0154! Default :: 0.005d0
155!155!
156! Use a polynomial fit for the virtual corrections. Gets a better accuracy,
157! but uses more memmory and disk space.
158#UsePolyVirtual
159.False.
160! Default :: .True.
161!
162! ==========================================================================
163! Combination of matrix elements
164! ==========================================================================
165!
156! For fixed order calculations only (ignored for (N)LO+PS runs): This166! For fixed order calculations only (ignored for (N)LO+PS runs): This
157! parameter determines if parton flavour configurations with idential167! parameter determines if parton flavour configurations with idential
158! matrix elements should be separated at the level of the analysis or168! matrix elements should be separated at the level of the analysis or
@@ -170,11 +180,5 @@
170! Default :: .false.180! Default :: .false.
171!181!
172! ==========================================================================182! ==========================================================================
173! Arbitrary numerical parameters used in the FKS formalism
174! ==========================================================================
175!
176! To be implemented by the FKS authors
177!
178! ==========================================================================
179! End of FKS_params.dat file183! End of FKS_params.dat file
180! ==========================================================================184! ==========================================================================
181185
=== modified file 'Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script'
--- Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script 2016-10-26 13:53:02 +0000
+++ Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_HERWIGPP.Script 2020-05-23 19:29:41 +0000
@@ -149,12 +149,15 @@
149if [ -f $HWPPPATH/bin/Herwig ]; then HWEXE=Herwig ; fi149if [ -f $HWPPPATH/bin/Herwig ]; then HWEXE=Herwig ; fi
150HWVER=`$HWPPPATH/bin/$HWEXE --version`150HWVER=`$HWPPPATH/bin/$HWEXE --version`
151HWVER=($(echo "$HWVER" | sed 's/ / /g'))151HWVER=($(echo "$HWVER" | sed 's/ / /g'))
152HWVER=($(echo ${HWVER[1]} | tr "." "\n"))152HWVER1=($(echo ${HWVER[1]} | tr "." "\n"))
153HWVER=${HWVER[0]}153HWVER2=($(echo ${HWVER1[1]} | tr "." "\n"))
154if [ "$HWVER" -ge 7 ]; then HWNEW=1 ; HWEXE=Herwig ; fi154HWVER=$(echo "$HWVER1$HWVER2" | bc)
155if [ "$HWVER" -le 2 ]; then HWNEW=0 ; HWEXE=Herwig++ ; fi155if [ "$HWVER" -ge 72 ]; then HWNEW=3 ; HWEXE=Herwig ; fi
156if [ "$HWVER" -eq 71 ]; then HWNEW=2 ; HWEXE=Herwig ; fi
157if [ "$HWVER" -eq 70 ]; then HWNEW=1 ; HWEXE=Herwig ; fi
158if [ "$HWVER" -le 69 ]; then HWNEW=0 ; HWEXE=Herwig++ ; fi
156159
157if [[ "$PDFCODE" -ne 0 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -eq 1 ]160if [[ "$PDFCODE" -ne 0 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -ge 1 ]
158then161then
159 HERPDF='EXTPDF'162 HERPDF='EXTPDF'
160 PDFLIBRARY='LHAPDF'163 PDFLIBRARY='LHAPDF'
@@ -166,7 +169,7 @@
166 if [ "$PDFCODE" -gt 1 ]; then PDFSET=$PDFCODE; fi169 if [ "$PDFCODE" -gt 1 ]; then PDFSET=$PDFCODE; fi
167 if [ "$PDFCODE" -lt 0 ]; then LHAOFL=EXTRAPOLATE; fi170 if [ "$PDFCODE" -lt 0 ]; then LHAOFL=EXTRAPOLATE; fi
168 if [ "$PDFCODE" -lt -1 ]; then PDFSET=$((PDFCODE*-1)); fi171 if [ "$PDFCODE" -lt -1 ]; then PDFSET=$((PDFCODE*-1)); fi
169 if [[ "$PDFCODE" -eq 0 && "$HWNEW" -eq 1 ]]; then PDFSET=25000 ; LHAOFL=FREEZE ; fi172 if [[ "$PDFCODE" -eq 0 && "$HWNEW" -ge 1 ]]; then PDFSET=25000 ; LHAOFL=FREEZE ; fi
170 linklhapdf173 linklhapdf
171# convert PDF number to name reading PDFsets.index174# convert PDF number to name reading PDFsets.index
172 ISLHA5=0175 ISLHA5=0
@@ -184,7 +187,7 @@
184 echo 'Unable to understand LHAPDF version!'187 echo 'Unable to understand LHAPDF version!'
185 exit 1188 exit 1
186 fi189 fi
187 if [[ "$ISLHA5" -eq 1 && "$HWNEW" -eq 1 ]]190 if [[ "$ISLHA5" -eq 1 && "$HWNEW" -ge 1 ]]
188 then191 then
189 echo " Please, use LHAPDF6 with HW7 "192 echo " Please, use LHAPDF6 with HW7 "
190 exit 1193 exit 1
@@ -282,7 +285,7 @@
282 HWPPUTIMAKE="HWPPUTI="$HWPPUTI285 HWPPUTIMAKE="HWPPUTI="$HWPPUTI
283 FORFILEMAKE="FORFILE="$HWPPUTI286 FORFILEMAKE="FORFILE="$HWPPUTI
284 HEPMCF=HepMCFortran7.h287 HEPMCF=HepMCFortran7.h
285 if [ "$HWVER" -le 2 ]; then HEPMCF=HepMCFortran2.h; fi288 if [ "$HWVER" -le 69 ]; then HEPMCF=HepMCFortran2.h; fi
286 cp $thisdir/HWPPAnalyzer/$HEPMCF $thisdir/HWPPAnalyzer/HepMCFortran.h289 cp $thisdir/HWPPAnalyzer/$HEPMCF $thisdir/HWPPAnalyzer/HepMCFortran.h
287 HWPPANALYZER=HepMCFortran290 HWPPANALYZER=HepMCFortran
288 if ! make -C $thisdir/HWPPAnalyzer $HWPPUTI $HWPPANALYZER.so $HWPPMAKE "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE" "$FORFILEMAKE"291 if ! make -C $thisdir/HWPPAnalyzer $HWPPUTI $HWPPANALYZER.so $HWPPMAKE "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE" "$FORFILEMAKE"
@@ -385,6 +388,16 @@
385mv $EXEC_NAMEFF $exefile388mv $EXEC_NAMEFF $exefile
386389
387# create input file390# create input file
391if [ "$HWNEW" -le 1 ]
392then
393GENERATOR="LHCGenerator"
394EXTRACTOR="QCDExtractor"
395elif [ "$HWNEW" -ge 2 ]
396then
397GENERATOR="EventGenerator"
398EXTRACTOR="PPExtractor"
399fi
400
388cat <<EOF > ./$ifile401cat <<EOF > ./$ifile
389#402#
390# Create the Les Houches handler for MC@NLO403# Create the Les Houches handler for MC@NLO
@@ -394,35 +407,47 @@
394407
395# --------------------------------------------------------------------- #408# --------------------------------------------------------------------- #
396# 1.) NECESSARY SETTINGS FOR RUNNING WITH MC@NLO EVENTS (DO NOT MODIFY)409# 1.) NECESSARY SETTINGS FOR RUNNING WITH MC@NLO EVENTS (DO NOT MODIFY)
410EOF
397411
412if [ "$HWNEW" -le 1 ]
413then
414cat <<EOF >> ./$ifile
398set /Herwig/Shower/Evolver:HardVetoMode 1415set /Herwig/Shower/Evolver:HardVetoMode 1
399set /Herwig/Shower/Evolver:HardVetoScaleSource 1416set /Herwig/Shower/Evolver:HardVetoScaleSource 1
400set /Herwig/Shower/Evolver:MECorrMode 0417set /Herwig/Shower/Evolver:MECorrMode 0
401418EOF
402419fi
420
421cat <<EOF >> ./$ifile
403# create the Handler & Reader422# create the Handler & Reader
404create ThePEG::LesHouchesFileReader /Herwig/EventHandlers/LHEReader423create ThePEG::LesHouchesFileReader /Herwig/EventHandlers/LHEReader
405create ThePEG::LesHouchesEventHandler /Herwig/EventHandlers/LHEHandler 424create ThePEG::LesHouchesEventHandler /Herwig/EventHandlers/LHEHandler
406insert /Herwig/EventHandlers/LHEHandler:LesHouchesReaders 0 /Herwig/EventHandlers/LHEReader425insert /Herwig/EventHandlers/LHEHandler:LesHouchesReaders 0 /Herwig/EventHandlers/LHEReader
407426EOF
427
428
429cat <<EOF >> ./$ifile
408set /Herwig/EventHandlers/LHEReader:AllowedToReOpen 0430set /Herwig/EventHandlers/LHEReader:AllowedToReOpen 0
409set /Herwig/EventHandlers/LHEReader:MomentumTreatment RescaleEnergy431set /Herwig/EventHandlers/LHEReader:MomentumTreatment RescaleEnergy
410set /Herwig/EventHandlers/LHEReader:WeightWarnings 0432set /Herwig/EventHandlers/LHEReader:WeightWarnings 0
411433EOF
434
435
436cat <<EOF >> ./$ifile
412set /Herwig/EventHandlers/LHEHandler:WeightOption VarNegWeight437set /Herwig/EventHandlers/LHEHandler:WeightOption VarNegWeight
413set /Herwig/EventHandlers/LHEHandler:PartonExtractor /Herwig/Partons/QCDExtractor438set /Herwig/EventHandlers/LHEHandler:PartonExtractor /Herwig/Partons/$EXTRACTOR
414set /Herwig/EventHandlers/LHEHandler:CascadeHandler /Herwig/Shower/ShowerHandler 439set /Herwig/EventHandlers/LHEHandler:CascadeHandler /Herwig/Shower/ShowerHandler
415set /Herwig/EventHandlers/LHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler440set /Herwig/EventHandlers/LHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler
416set /Herwig/EventHandlers/LHEHandler:DecayHandler /Herwig/Decays/DecayHandler441set /Herwig/EventHandlers/LHEHandler:DecayHandler /Herwig/Decays/DecayHandler
417set /Herwig/Generators/LHCGenerator:EventHandler /Herwig/EventHandlers/LHEHandler442set /Herwig/Generators/$GENERATOR:EventHandler /Herwig/EventHandlers/LHEHandler
418set /Herwig/Generators/LHCGenerator:NumberOfEvents $NEVENTS443set /Herwig/Generators/$GENERATOR:NumberOfEvents $NEVENTS
419set /Herwig/Generators/LHCGenerator:RandomNumberGenerator:Seed $RNDEVSEED_HWPP444set /Herwig/Generators/$GENERATOR:RandomNumberGenerator:Seed $RNDEVSEED_HWPP
420set /Herwig/Generators/LHCGenerator:PrintEvent $MAXPR_HWPP445set /Herwig/Generators/$GENERATOR:PrintEvent $MAXPR_HWPP
421set /Herwig/Generators/LHCGenerator:MaxErrors $ERR_NUM_HWPP 446set /Herwig/Generators/$GENERATOR:MaxErrors $ERR_NUM_HWPP
422set /Herwig/Generators/LHCGenerator:DebugLevel 1447set /Herwig/Generators/$GENERATOR:DebugLevel 1
423EOF448EOF
424449
425if [ $HWNEW = 0 ]450if [ "$HWNEW" -eq 0 ]
426then451then
427cat <<EOF >> ./$ifile452cat <<EOF >> ./$ifile
428insert /Herwig/EventHandlers/LHEHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler453insert /Herwig/EventHandlers/LHEHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler
@@ -430,7 +455,7 @@
430fi455fi
431456
432whichherpdf $HERPDF457whichherpdf $HERPDF
433if [[ "$pdftype" -eq 1 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -eq 1 ]458if [[ "$pdftype" -eq 1 && "$HWNEW" -eq 0 ]] || [ "$HWNEW" -ge 1 ]
434then459then
435cat <<EOF >> ./$ifile460cat <<EOF >> ./$ifile
436# Define PDF from MCatNLO.inputs PDFSET number461# Define PDF from MCatNLO.inputs PDFSET number
@@ -438,6 +463,16 @@
438create ThePEG::LHAPDF /LHAPDF/MCNLOPDF ThePEGLHAPDF.so463create ThePEG::LHAPDF /LHAPDF/MCNLOPDF ThePEGLHAPDF.so
439set /LHAPDF/MCNLOPDF:PDFName $PDFSETN464set /LHAPDF/MCNLOPDF:PDFName $PDFSETN
440set /LHAPDF/MCNLOPDF:RemnantHandler /Herwig/Partons/HadronRemnants465set /LHAPDF/MCNLOPDF:RemnantHandler /Herwig/Partons/HadronRemnants
466EOF
467
468if [ "$HWNEW" -ge 1 ]
469then
470cat <<EOF >> ./$ifile
471set /Herwig/Partons/RemnantDecayer:AllowTop Yes
472EOF
473fi
474
475cat <<EOF >> ./$ifile
441set /Herwig/EventHandlers/LHEReader:PDFA /LHAPDF/MCNLOPDF476set /Herwig/EventHandlers/LHEReader:PDFA /LHAPDF/MCNLOPDF
442set /Herwig/EventHandlers/LHEReader:PDFB /LHAPDF/MCNLOPDF477set /Herwig/EventHandlers/LHEReader:PDFB /LHAPDF/MCNLOPDF
443set /Herwig/Particles/p+:PDF /LHAPDF/MCNLOPDF478set /Herwig/Particles/p+:PDF /LHAPDF/MCNLOPDF
@@ -494,9 +529,9 @@
494# 3.) ADDITIONAL SETTINGS529# 3.) ADDITIONAL SETTINGS
495530
496# SHOWER SETTINGS531# SHOWER SETTINGS
497set /Herwig/Shower/Evolver:IntrinsicPtGaussian 2.2*GeV
498EOF532EOF
499533
534
500if ((`bc <<< "$LAMBDAHERW >= 0.0"`))535if ((`bc <<< "$LAMBDAHERW >= 0.0"`))
501then536then
502LAMBDAHERW=$(echo "$LAMBDAHERW * 1000" | bc)537LAMBDAHERW=$(echo "$LAMBDAHERW * 1000" | bc)
@@ -512,23 +547,43 @@
512EOF547EOF
513fi548fi
514549
550if [ "$HWNEW" -le 1 ]
551then
552cat <<EOF >> ./$ifile
553set /Herwig/Shower/Evolver:IntrinsicPtGaussian 2.2*GeV
554EOF
555elif [ "$HWNEW" -ge 2 ]
556then
557cat <<EOF >> ./$ifile
558set /Herwig/Shower/ShowerHandler:IntrinsicPtGaussian 1.3*GeV
559EOF
560fi
515561
516if [ $HWNEW = 1 ]562if [ "$HWNEW" -ge 1 ]
517then563then
518cat <<EOF >> ./$ifile564cat <<EOF >> ./$ifile
519set /Herwig/Shower/PartnerFinder:PartnerMethod Random565set /Herwig/Shower/PartnerFinder:PartnerMethod Random
520set /Herwig/Shower/PartnerFinder:ScaleChoice Partner566set /Herwig/Shower/PartnerFinder:ScaleChoice Partner
567EOF
568fi
569
570if [ "$HWNEW" -le 1 ]
571then
572cat <<EOF >> ./$ifile
521set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes573set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes
522574set /Herwig/Shower/GammatoQQbarSplitFn:AngularOrdered Yes
523#set /Herwig/Shower/Evolver:Interactions QCDOnly575#set /Herwig/Shower/ShowerHandler:Interactions QCDOnly
524#set /Herwig/Shower/Evolver:SoftCorrelations No576#set /Herwig/Shower/ShowerHandler:SoftCorrelations No
525#set /Herwig/Shower/Evolver:SpinCorrelations Yes577#set /Herwig/Shower/ShowerHandler:SpinCorrelations Yes
526578EOF
527set /Herwig/Shower/Evolver:SpinCorrelations No579fi
528set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default580
529set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity581if [ "$HWNEW" -ge 2 ]
582then
583cat <<EOF >> ./$ifile
584set /Herwig/Shower/ShowerHandler:SpinCorrelations No
530set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes585set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes
531set /Herwig/Shower/ShowerHandler:RestrictPhasespace On586set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes
532587
533EOF588EOF
534fi589fi
@@ -807,36 +862,53 @@
807# 4.) HW++ SETTINGS THAT ARE NOT ALLOWED TO BE TOUCHED BY THE USER862# 4.) HW++ SETTINGS THAT ARE NOT ALLOWED TO BE TOUCHED BY THE USER
808863
809#Boost and reconstruction stuff864#Boost and reconstruction stuff
865EOF
866
867if [ "$HWNEW" -eq 1 ] || [ "$HWNEW" -eq 2 ]
868then
869cat <<EOF >> ./$ifile
870set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default
871set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
872EOF
873fi
874
875if [ "$HWNEW" -eq 3 ]
876then
877cat <<EOF >> ./$ifile
878set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
879EOF
880fi
881
882cat <<EOF >> ./$ifile
810set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption General883set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption General
811set /Herwig/Shower/KinematicsReconstructor:InitialInitialBoostOption LongTransBoost884set /Herwig/Shower/KinematicsReconstructor:InitialInitialBoostOption LongTransBoost
812885
813# --------------------------------------------------------------------- #886# --------------------------------------------------------------------- #
814# 5.) CREATE THE ANALYZER AND SAVE THE RUN (DO NOT MODIFY)887# 5.) CREATE THE ANALYZER AND SAVE THE RUN (DO NOT MODIFY)
815
816EOF888EOF
817889
818if [ "$HWPPUTI" != "" ]890if [ "$HWPPUTI" != "" ]
819then891then
820cat <<EOF >> ./$ifile892cat <<EOF >> ./$ifile
821create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so893create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so
822insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 $HWPPANALYZER894insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 $HWPPANALYZER
823895
824EOF896EOF
825else897else
826cat <<EOF >> ./$ifile898cat <<EOF >> ./$ifile
827#create MCatNLO::hepfortr hepfortr hepfortr.so899#create MCatNLO::hepfortr hepfortr hepfortr.so
828#insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 hepfortr900#insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 hepfortr
829901
830# Useful analysis handlers for HepMC related output902# Useful analysis handlers for HepMC related output
831##################################################903##################################################
832# Schematic overview of an event (requires --with-hepmc to be set at configure time904# Schematic overview of an event (requires --with-hepmc to be set at configure time
833# and the graphviz program 'dot' to produce a plot)905# and the graphviz program 'dot' to produce a plot)
834#create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so906#create MCatNLO::$HWPPANALYZER $HWPPANALYZER $HWPPANALYZER.so
835#insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 $HWPPANALYZER907#insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 $HWPPANALYZER
836# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/Plot908# insert $GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/Plot
837# A HepMC dump file (requires --with-hepmc to be set at configure time)909# A HepMC dump file (requires --with-hepmc to be set at configure time)
838# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile910# insert $GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
839insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile911insert /Herwig/Generators/$GENERATOR:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
840set /Herwig/Analysis/HepMCFile:PrintEvent $NEVENTS912set /Herwig/Analysis/HepMCFile:PrintEvent $NEVENTS
841set /Herwig/Analysis/HepMCFile:Format GenEvent913set /Herwig/Analysis/HepMCFile:Format GenEvent
842set /Herwig/Analysis/HepMCFile:Units GeV_mm914set /Herwig/Analysis/HepMCFile:Units GeV_mm
@@ -845,9 +917,10 @@
845fi917fi
846918
847cat <<EOF >> ./$ifile919cat <<EOF >> ./$ifile
848saverun $runfile /Herwig/Generators/LHCGenerator920saverun $runfile /Herwig/Generators/$GENERATOR
849EOF921EOF
850922
923
851( cd . ;\924( cd . ;\
852 $exefile )925 $exefile )
853926
854927
=== modified file 'Template/NLO/MCatNLO/shower_template.sh'
--- Template/NLO/MCatNLO/shower_template.sh 2017-01-16 14:11:24 +0000
+++ Template/NLO/MCatNLO/shower_template.sh 2020-05-23 19:29:41 +0000
@@ -9,8 +9,11 @@
99
10export %(ld_library_path)s=$%(ld_library_path)s:%(extralibs)s10export %(ld_library_path)s=$%(ld_library_path)s:%(extralibs)s
1111
12# this is for py8 runs12if [ $SHOWER == "HERWIGPP" ] ; then
13export PYTHIA8DATA=`pwd`/xmldoc13 export PYTHIA8DATA=""
14else
15 export PYTHIA8DATA=`pwd`/xmldoc
16fi
1417
15# if one is splitting file cd to a new dir and link all files here18# if one is splitting file cd to a new dir and link all files here
16if [[ "$NFILE" != "" ]]; then19if [[ "$NFILE" != "" ]]; then
1720
=== modified file 'Template/NLO/Source/PDF/pdg2pdf.f'
--- Template/NLO/Source/PDF/pdg2pdf.f 2015-11-06 16:54:54 +0000
+++ Template/NLO/Source/PDF/pdg2pdf.f 2020-05-23 19:29:41 +0000
@@ -66,12 +66,14 @@
66 endif66 endif
6767
68 ipart=ipdg68 ipart=ipdg
69 if(iabs(ipart).eq.21) ipart=069 if(iabs(ipart).eq.21) then
70 if(iabs(ipart).eq.22) ipart=770 ipart=0
71 iporg=ipart71 else if(iabs(ipart).eq.22) then
7272 ipart=7
73 else if(iabs(ipart).eq.7) then
74 ipart=7
75 else if(iabs(ipart).gt.7)then
73c This will be called for any PDG code, but we only support up to 776c This will be called for any PDG code, but we only support up to 7
74 if(iabs(ipart).gt.7)then
75C write(*,*) 'PDF not supported for pdg ',ipdg77C write(*,*) 'PDF not supported for pdg ',ipdg
76C write(*,*) 'For lepton colliders, please set the lpp* '//78C write(*,*) 'For lepton colliders, please set the lpp* '//
77C $ 'variables to 0 in the run_card' 79C $ 'variables to 0 in the run_card'
@@ -82,6 +84,7 @@
82 return84 return
83 endif85 endif
8486
87 iporg=ipart
85 ireuse = 088 ireuse = 0
86 ii=i_replace89 ii=i_replace
87 do i=1,2090 do i=1,20
8891
=== modified file 'Template/NLO/Source/PDF/pdg2pdf_lhapdf.f'
--- Template/NLO/Source/PDF/pdg2pdf_lhapdf.f 2016-05-24 12:48:05 +0000
+++ Template/NLO/Source/PDF/pdg2pdf_lhapdf.f 2020-05-23 19:29:41 +0000
@@ -64,12 +64,14 @@
64 endif64 endif
6565
66 ipart=ipdg66 ipart=ipdg
67 if(iabs(ipart).eq.21) ipart=067 if(iabs(ipart).eq.21) then
68 if(iabs(ipart).eq.22) ipart=768 ipart=0
69 iporg=ipart69 else if(iabs(ipart).eq.22) then
7070 ipart=7
71 else if(iabs(ipart).eq.7) then
72 ipart=7
73 else if(iabs(ipart).gt.7)then
71c This will be called for any PDG code, but we only support up to 774c This will be called for any PDG code, but we only support up to 7
72 if(iabs(ipart).gt.7)then
73C write(*,*) 'PDF not supported for pdg ',ipdg75C write(*,*) 'PDF not supported for pdg ',ipdg
74C write(*,*) 'For lepton colliders, please set the lpp* '//76C write(*,*) 'For lepton colliders, please set the lpp* '//
75C $ 'variables to 0 in the run_card' 77C $ 'variables to 0 in the run_card'
@@ -86,6 +88,7 @@
86c Determine the member of the set (function of lhapdf)88c Determine the member of the set (function of lhapdf)
87 call getnmem(iset,imem)89 call getnmem(iset,imem)
8890
91 iporg=ipart
89 ireuse = 092 ireuse = 0
90 ii=i_replace93 ii=i_replace
91 do i=1,2094 do i=1,20
9295
=== modified file 'Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f'
--- Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f 2017-01-10 15:57:32 +0000
+++ Template/NLO/Source/PDF/pdg2pdf_lhapdf6.f 2020-05-23 19:29:41 +0000
@@ -65,12 +65,14 @@
65 endif65 endif
6666
67 ipart=ipdg67 ipart=ipdg
68 if(iabs(ipart).eq.21) ipart=068 if(iabs(ipart).eq.21) then
69 if(iabs(ipart).eq.22) ipart=769 ipart=0
70 iporg=ipart70 else if(iabs(ipart).eq.22) then
7171 ipart=7
72 else if(iabs(ipart).eq.7) then
73 ipart=7
74 else if(iabs(ipart).gt.7)then
72c This will be called for any PDG code, but we only support up to 775c This will be called for any PDG code, but we only support up to 7
73 if(iabs(ipart).gt.7)then
74C write(*,*) 'PDF not supported for pdg ',ipdg76C write(*,*) 'PDF not supported for pdg ',ipdg
75C write(*,*) 'For lepton colliders, please set the lpp* '//77C write(*,*) 'For lepton colliders, please set the lpp* '//
76C $ 'variables to 0 in the run_card' 78C $ 'variables to 0 in the run_card'
@@ -86,6 +88,7 @@
86c Determine the member of the set (function of lhapdf)88c Determine the member of the set (function of lhapdf)
87 call getnmem(iset,imem)89 call getnmem(iset,imem)
8890
91 iporg=ipart
89 ireuse = 092 ireuse = 0
90 ii=i_replace93 ii=i_replace
91 do i=1,2094 do i=1,20
9295
=== modified file 'Template/NLO/Source/kin_functions.f'
--- Template/NLO/Source/kin_functions.f 2017-07-14 08:23:18 +0000
+++ Template/NLO/Source/kin_functions.f 2020-05-23 19:29:41 +0000
@@ -236,7 +236,7 @@
236c-----236c-----
237c Begin Code237c Begin Code
238c-----238c-----
239 if ((lpp(1).eq.0).and.(lpp(2).eq.0)) then239 if ((lpp(1).ne.1).and.(lpp(2).ne.1)) then
240 p1a = dsqrt(p1(1)**2+p1(2)**2+p1(3)**2)240 p1a = dsqrt(p1(1)**2+p1(2)**2+p1(3)**2)
241 p2a = dsqrt(p2(1)**2+p2(2)**2+p2(3)**2)241 p2a = dsqrt(p2(1)**2+p2(2)**2+p2(3)**2)
242 if (p1a*p2a .ne. 0d0) then242 if (p1a*p2a .ne. 0d0) then
243243
=== modified file 'Template/NLO/Source/makefile'
--- Template/NLO/Source/makefile 2017-07-31 08:48:20 +0000
+++ Template/NLO/Source/makefile 2020-05-23 19:29:41 +0000
@@ -13,6 +13,7 @@
13 zerox64_cernlib.o13 zerox64_cernlib.o
1414
15.f.o: ; $(FC) $(FFLAGS) -c $*.f15.f.o: ; $(FC) $(FFLAGS) -c $*.f
16.f90.o: ; $(FC) $(FFLAGS) -c $*.f90
1617
17all: $(LIBDIR)libdhelas.a $(LIBDIR)libgeneric.a $(LIBDIR)libpdf.a \18all: $(LIBDIR)libdhelas.a $(LIBDIR)libgeneric.a $(LIBDIR)libpdf.a \
18 $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc19 $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc
1920
=== modified file 'Template/NLO/Source/ranmar.f'
--- Template/NLO/Source/ranmar.f 2017-01-30 15:18:32 +0000
+++ Template/NLO/Source/ranmar.f 2020-05-23 19:29:41 +0000
@@ -1,18 +1,3 @@
1 function ran2()
2c Wrapper for the random numbers; needed for the NLO stuff
3 implicit none
4 include '../SubProcesses/mint.inc' ! includes iconfig common
5 double precision ran2,x,a,b
6 integer ii,jconfig
7 a=0d0 ! min allowed value for x
8 b=1d0 ! max allowed value for x
9 ii=0 ! dummy argument of ntuple
10 jconfig=iconfig ! integration channel (for off-set)
11 call ntuple(x,a,b,ii,jconfig)
12 ran2=x
13 return
14 end
15
16 subroutine ntuple(x,a,b,ii,jconfig)1 subroutine ntuple(x,a,b,ii,jconfig)
17c-------------------------------------------------------2c-------------------------------------------------------
18c Front to ranmar which allows user to easily3c Front to ranmar which allows user to easily
194
=== modified file 'Template/NLO/SubProcesses/BinothLHA.f'
--- Template/NLO/SubProcesses/BinothLHA.f 2017-06-23 14:14:03 +0000
+++ Template/NLO/SubProcesses/BinothLHA.f 2020-05-23 19:29:41 +0000
@@ -4,12 +4,11 @@
4c that calls the OLP and returns the virtual weights. For convenience4c that calls the OLP and returns the virtual weights. For convenience
5c also the born_wgt is passed to this subroutine.5c also the born_wgt is passed to this subroutine.
6c6c
7 use FKSParams
7 implicit none8 implicit none
8 include "nexternal.inc"9 include "nexternal.inc"
9 include "coupl.inc"10 include "coupl.inc"
10 include 'born_nhel.inc'11 include 'born_nhel.inc'
11c general MadFKS parameters
12 include 'FKSParams.inc'
13 double precision pi, zero,mone12 double precision pi, zero,mone
14 parameter (pi=3.1415926535897932385d0)13 parameter (pi=3.1415926535897932385d0)
15 parameter (zero=0d0)14 parameter (zero=0d0)
@@ -72,6 +71,9 @@
72 integer ret_code_common71 integer ret_code_common
73 common /to_ret_code/ret_code_common72 common /to_ret_code/ret_code_common
74 double precision born_hel_from_virt73 double precision born_hel_from_virt
74
75 logical updateloop
76 common /to_updateloop/updateloop
75c masses77c masses
76 include 'pmass.inc'78 include 'pmass.inc'
77 data nbad / 0 /79 data nbad / 0 /
@@ -80,7 +82,11 @@
80c update the ren_scale for MadLoop and the couplings (should be the82c update the ren_scale for MadLoop and the couplings (should be the
81c Ellis-Sexton scale)83c Ellis-Sexton scale)
82 mu_r = sqrt(QES2)84 mu_r = sqrt(QES2)
85 ! force to update also loop-related parameters
86 updateloop=.true.
83 call update_as_param()87 call update_as_param()
88 updateloop=.false.
89
84 alpha_S=g**2/(4d0*PI)90 alpha_S=g**2/(4d0*PI)
85 ao2pi= alpha_S/(2d0*PI)91 ao2pi= alpha_S/(2d0*PI)
86 virt_wgt= 0d092 virt_wgt= 0d0
@@ -111,8 +117,13 @@
111c itself again to perform stability check to make sure no unstable EPS117c itself again to perform stability check to make sure no unstable EPS
112c splips unnoticed.118c splips unnoticed.
113 CALL FORCE_STABILITY_CHECK(.TRUE.)119 CALL FORCE_STABILITY_CHECK(.TRUE.)
114 CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)120 IF (.not. force_polecheck) THEN ! still have the pole for the pole check
115 CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)121 CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
122 CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)
123 else
124 CALL COLLIER_COMPUTE_UV_POLES(.TRUE.)
125 CALL COLLIER_COMPUTE_IR_POLES(.TRUE.)
126 endif
116 firsttime_run = .false.127 firsttime_run = .false.
117 endif128 endif
118 firsttime=firsttime.or.force_polecheck129 firsttime=firsttime.or.force_polecheck
@@ -290,7 +301,7 @@
290 if ((dabs(avgPoleRes(1))+dabs(avgPoleRes(2))).ne.0d0) then301 if ((dabs(avgPoleRes(1))+dabs(avgPoleRes(2))).ne.0d0) then
291 cpol = .not.((((PoleDiff(1)+PoleDiff(2))/302 cpol = .not.((((PoleDiff(1)+PoleDiff(2))/
292 $ (dabs(avgPoleRes(1))+dabs(avgPoleRes(2)))) .lt.303 $ (dabs(avgPoleRes(1))+dabs(avgPoleRes(2)))) .lt.
293 $ tolerance*10d0).or.(mod(ret_code,10).eq.7))304 $ tolerance*10d0).or.(mod(ret_code,10).eq.7.and..not.force_polecheck))
294 else305 else
295 cpol = .not.((PoleDiff(1)+PoleDiff(2).lt.tolerance*10d0)306 cpol = .not.((PoleDiff(1)+PoleDiff(2).lt.tolerance*10d0)
296 $ .or.(mod(ret_code,10).eq.7))307 $ .or.(mod(ret_code,10).eq.7))
297308
=== modified file 'Template/NLO/SubProcesses/BinothLHA_OLP.f'
--- Template/NLO/SubProcesses/BinothLHA_OLP.f 2015-08-13 09:26:37 +0000
+++ Template/NLO/SubProcesses/BinothLHA_OLP.f 2020-05-23 19:29:41 +0000
@@ -6,11 +6,11 @@
6c6c
7C************************************************************************7C************************************************************************
8c8c
9 use FKSParams
9 implicit none10 implicit none
10 include "nexternal.inc"11 include "nexternal.inc"
11 include "coupl.inc"12 include "coupl.inc"
12 include "Binoth_proc.inc"13 include "Binoth_proc.inc"
13 include "FKSParams.inc"
14 double precision pi14 double precision pi
15 parameter (pi=3.1415926535897932385d0)15 parameter (pi=3.1415926535897932385d0)
16 double precision pin(0:3,nexternal-1),p(0:4,nexternal-1)16 double precision pin(0:3,nexternal-1),p(0:4,nexternal-1)
1717
=== removed file 'Template/NLO/SubProcesses/FKSParamReader.f'
=== added file 'Template/NLO/SubProcesses/FKSParams.f90'
--- Template/NLO/SubProcesses/FKSParams.f90 1970-01-01 00:00:00 +0000
+++ Template/NLO/SubProcesses/FKSParams.f90 2020-05-23 19:29:41 +0000
@@ -0,0 +1,248 @@
1!====================================================================
2!
3! Define common block with all general parameters used by MadFKS
4! See their definitions in the file FKS_params.dat.
5!
6!====================================================================
7module FKSParams
8 character(len=64), parameter :: paramFileName='FKS_params.dat'
9 integer,parameter :: maxContribsSelected=100, &
10 maxCouplingsSelected=100, &
11 maxContribType=15, &
12 maxCouplingTypes=20
13 real*8 :: IRPoleCheckThreshold,Virt_fraction, PrecisionVirtualAtRunTime,Min_virt_fraction
14 integer :: NHelForMCoverHels,VetoedContributionTypes(0:maxContribsSelected), &
15 SelectedContributionTypes(0:maxContribsSelected),QED_squared_selected, &
16 SelectedCouplingOrders(maxCouplingTypes,0:maxCouplingsSelected), &
17 QCD_squared_selected
18 logical :: separate_flavour_configs,IncludeBornContributions,use_poly_virtual
19
20contains
21
22 subroutine FKSParamReader(filename, printParam, force)
23 ! Reads the file 'filename' and sets the parameters found in that file.
24 implicit none
25 logical, save :: HasReadOnce=.False.,paramPrinted=.false.
26 logical :: force,couldRead,printParam
27 character(*) :: filename
28 CHARACTER(len=64) :: buff, buff2, mode
29 include "orders.inc"
30 integer :: i,j
31 couldRead=.False.
32 if (HasReadOnce.and..not.force) then
33 goto 901
34 endif
35! Make sure to have default parameters if not set in the FKSParams.dat card
36! (if it is an old one for instance)
37 call DefaultFKSParam()
38! Overwrite the default parameters from file:
39 open(68, file=fileName, err=676, action='READ')
40 do
41 read(68,*,end=999) buff
42 if(index(buff,'#').eq.1) then
43 if (buff .eq. '#IRPoleCheckThreshold') then
44 read(68,*,end=999) IRPoleCheckThreshold
45 if (IRPoleCheckThreshold .lt. -1.01d0 ) then
46 stop 'IRPoleCheckThreshold must be >= -1.0d0.'
47 endif
48 elseif (buff .eq. '#PrecisionVirtualAtRunTime') then
49 read(68,*,end=999) PrecisionVirtualAtRunTime
50 if (IRPoleCheckThreshold .lt. -1.01d0 ) then
51 stop 'PrecisionVirtualAtRunTime must be >= -1.0d0.'
52 endif
53 else if (buff .eq. '#NHelForMCoverHels') then
54 read(68,*,end=999) NHelForMCoverHels
55 if (NHelForMCoverHels .lt. -1) then
56 stop 'NHelForMCoverHels must be >= -1.'
57 endif
58 else if (buff .eq. '#QCD^2==') then
59 read(68,*,end=999) QCD_squared_selected
60 if (QCD_squared_selected .lt. -1) then
61 stop 'QCD_squared_selected must be >= -1.'
62 endif
63 else if (buff .eq. '#QED^2==') then
64 read(68,*,end=999) QED_squared_selected
65 if (QED_squared_selected .lt. -1) then
66 stop 'QED_squared_selected must be >= -1.'
67 endif
68 else if (buff .eq. '#VirtualFraction') then
69 read(68,*,end=999) Virt_fraction
70 if (Virt_fraction .lt. 0 .or. virt_fraction .gt.1) then
71 stop 'VirtualFraction should be a fraction between 0 and 1'
72 endif
73 else if (buff .eq. '#MinVirtualFraction') then
74 read(68,*,end=999) Min_Virt_fraction
75 if (min_virt_fraction .lt. 0 .or. min_virt_fraction .gt.1) then
76 stop 'VirtualFraction should be a fraction between 0 and 1'
77 endif
78 else if (buff .eq. '#SeparateFlavourConfigurations') then
79 read(68,*,end=999) separate_flavour_configs
80 else if (buff .eq. '#UsePolyVirtual') then
81 read(68,*,end=999) use_poly_virtual
82 else if (buff .eq. '#VetoedContributionTypes') then
83 read(68,*,end=999) VetoedContributionTypes(0)
84 if (VetoedContributionTypes(0) .lt. 0.or. &
85 VetoedContributionTypes(0) .gt. maxContribsSelected) then
86 write(*,*) 'VetoedContributionTypes length should be >= 0 and <=', &
87 maxContribsSelected
88 stop 'Format error in FKS_params.dat.'
89 endif
90 read(68,*,end=999) (VetoedContributionTypes(I),I=1,VetoedContributionTypes(0))
91 do I=1,VetoedContributionTypes(0)
92 if (VetoedContributionTypes(I).lt.1.or. &
93 VetoedContributionTypes(I).gt.maxContribType) then
94 write(*,*) 'VetoedContributionTypes must be >=1 and <=',maxContribType
95 stop 'Format error in FKS_params.dat.'
96 endif
97 enddo
98 do I=VetoedContributionTypes(0)+1,maxContribsSelected
99 VetoedContributionTypes(I)=-1
100 enddo
101
102 else if (buff .eq. '#SelectedContributionTypes') then
103 read(68,*,end=999) SelectedContributionTypes(0)
104 if (SelectedContributionTypes(0) .lt. 0 .or. &
105 SelectedContributionTypes(0) .gt. maxContribsSelected) then
106 write(*,*) 'SelectedContributionTypes length should be >= 0 and <=', &
107 maxContribsSelected
108 stop 'Format error in FKS_params.dat.'
109 endif
110 read(68,*,end=999) (SelectedContributionTypes(I),I=1,SelectedContributionTypes(0))
111 do I=1,SelectedContributionTypes(0)
112 if (SelectedContributionTypes(I).lt.1.or. &
113 SelectedContributionTypes(I).gt.maxContribType) then
114 write(*,*) 'SelectedContributionTypes must be >=1 and <=',maxContribType
115 stop 'Format error in FKS_params.dat.'
116 endif
117 enddo
118 do I=SelectedContributionTypes(0)+1,maxContribsSelected
119 SelectedContributionTypes(I)=-1
120 enddo
121 else if (buff .eq. '#SelectedCouplingOrders') then
122 read(68,*,end=999) SelectedCouplingOrders(1,0)
123 if (SelectedCouplingOrders(1,0) .lt. 0 .or. &
124 SelectedCouplingOrders(1,0) .gt. maxCouplingsSelected) then
125 write(*,*) 'SelectedCouplingOrders length should be >= 0 and <=', &
126 maxCouplingsSelected
127 stop 'Format error in FKS_params.dat.'
128 endif
129 do j = 2, maxCouplingTypes
130 SelectedCouplingOrders(j,0) = SelectedCouplingOrders(1,0)
131 enddo
132 do j = 1, SelectedCouplingOrders(1,0)
133 read(68,*,end=999) (SelectedCouplingOrders(i,j),i=1,nsplitorders)
134 do i=nsplitorders+1,maxCouplingTypes
135 SelectedCouplingOrders(i,j)=-1
136 enddo
137 enddo
138 else
139 write(*,*) 'The parameter name ',buff(2:),'is not reckognized.'
140 stop 'Format error in FKS_params.dat.'
141 endif
142 endif
143 enddo
144999 continue
145 couldRead=.True.
146 goto 998
147
148676 continue
149 write(*,*) 'ERROR :: MadFKS parameter file ',fileName, &
150 ' could not be found or is malformed. Please specify it.'
151 stop
152 ! Below is the code if one desires to let the code continue with
153 ! a non existing or malformed parameter file
154 write(*,*) 'WARNING :: The file ',fileName,' could not be ', &
155 ' open or did not contain the necessary information. The ', &
156 ' default MadFKS parameters will be used.'
157 call DefaultFKSParam()
158 goto 998
159998 continue
160
161 if(printParam.and..not.paramPrinted) then
162 write(*,*) &
163 '==============================================================='
164 if (couldRead) then
165 write(*,*) 'INFO: MadFKS read these parameters from ',filename
166 else
167 write(*,*) 'INFO: MadFKS used the default parameters.'
168 endif
169 write(*,*) &
170 '==============================================================='
171 write(*,*) ' > IRPoleCheckThreshold = ',IRPoleCheckThreshold
172 write(*,*) ' > PrecisionVirtualAtRunTime = ',PrecisionVirtualAtRunTime
173 if (SelectedContributionTypes(0).gt.0) then
174 write(*,*) ' > SelectedContributionTypes = ', &
175 (SelectedContributionTypes(I),I=1,SelectedContributionTypes(0))
176 else
177 write(*,*) ' > SelectedContributionTypes = All'
178 endif
179 if (VetoedContributionTypes(0).gt.0) then
180 write(*,*) ' > VetoedContributionTypes = ', &
181 (VetoedContributionTypes(I),I=1,VetoedContributionTypes(0))
182 else
183 write(*,*) ' > VetoedContributionTypes = None'
184 endif
185 if (QCD_squared_selected.eq.-1) then
186 write(*,*) ' > QCD_squared_selected = All'
187 else
188 write(*,*) ' > QCD_squared_selected = ',QCD_squared_selected
189 endif
190 if (QED_squared_selected.eq.-1) then
191 write(*,*) ' > QED_squared_selected = All'
192 else
193 write(*,*) ' > QED_squared_selected = ',QED_squared_selected
194 endif
195 if (SelectedCouplingOrders(1,0).gt.0) then
196 do j=1,SelectedCouplingOrders(1,0)
197 write(*,*) ' > SelectedCouplingOrders(',j,') = ', &
198 (SelectedCouplingOrders(i,j),i=1,nsplitorders)
199 enddo
200 else
201 write(*,*) ' > SelectedCouplingOrders = All'
202 endif
203 write(*,*) ' > NHelForMCoverHels = ',NHelForMCoverHels
204 write(*,*) ' > VirtualFraction = ',Virt_fraction
205 write(*,*) ' > MinVirtualFraction = ',Min_virt_fraction
206 write(*,*) ' > SeparateFlavourConfigs = ',separate_flavour_configs
207 write(*,*) ' > UsePolyVirtual = ',use_poly_virtual
208 write(*,*) &
209 '==============================================================='
210 paramPrinted=.TRUE.
211 endif
212
213 close(68)
214 HasReadOnce=.TRUE.
215901 continue
216 end subroutine FKSParamReader
217
218 subroutine DefaultFKSParam()
219 ! Sets the default parameters
220 implicit none
221 integer i,j
222 IRPoleCheckThreshold=1.0d-5
223 NHelForMCoverHels=5
224 PrecisionVirtualAtRunTime=1d-3
225 Virt_fraction=1d0
226 QED_squared_selected=-1
227 QCD_squared_selected=-1
228 Min_virt_fraction=0.005d0
229 separate_flavour_configs=.false.
230 use_poly_virtual=.true.
231 IncludeBornContributions=.true.
232 SelectedContributionTypes(0)=0
233 VetoedContributionTypes(0)=0
234 do i=1, maxContribsSelected
235 SelectedContributionTypes(I)=-1
236 VetoedContributionTypes(I)=-1
237 enddo
238 do j=1,maxCouplingTypes
239 SelectedCouplingOrders(j,0) = 0
240 enddo
241 do j=1,maxCouplingsSelected
242 do i=1,maxCouplingTypes
243 SelectedCouplingOrders(i,j) = -1
244 enddo
245 enddo
246 end subroutine DefaultFKSParam
247
248end module FKSParams
0249
=== removed file 'Template/NLO/SubProcesses/FKSParams.inc'
=== modified file 'Template/NLO/SubProcesses/MC_integer.f'
--- Template/NLO/SubProcesses/MC_integer.f 2018-06-04 07:36:30 +0000
+++ Template/NLO/SubProcesses/MC_integer.f 2020-05-23 19:29:41 +0000
@@ -58,6 +58,7 @@
58 data firsttime/maxdim*.true./58 data firsttime/maxdim*.true./
59 data realfirsttime/.true./59 data realfirsttime/.true./
60 character*1 cdum60 character*1 cdum
61 character*3 action
61 integer nintervals(maxdim),maxintervals,niint_thisd62 integer nintervals(maxdim),maxintervals,niint_thisd
62 parameter (maxintervals=200)63 parameter (maxintervals=200)
63 integer ncall(0:maxintervals,maxdim)64 integer ncall(0:maxintervals,maxdim)
@@ -95,7 +96,7 @@
95 do i=1,this_dim-1 ! skip the lines not needed for 'this_dim'96 do i=1,this_dim-1 ! skip the lines not needed for 'this_dim'
96 read(52,*,end=999,err=999) cdum97 read(52,*,end=999,err=999) cdum
97 enddo98 enddo
98 read(52,*,end=999,err=999)99 read(52,*,end=999,err=999) action,
99 & (grid(i,this_dim),i=0,nintervals(this_dim)) ! here is what we want100 & (grid(i,this_dim),i=0,nintervals(this_dim)) ! here is what we want
100 do i=this_dim+1,maxdim ! make sure that there are enough lines in this file101 do i=this_dim+1,maxdim ! make sure that there are enough lines in this file
101 read(52,*,end=999,err=999) cdum102 read(52,*,end=999,err=999) cdum
@@ -266,7 +267,7 @@
266 enddo267 enddo
267 open(unit=52,file='grid.MC_integer',status='unknown',err=999)268 open(unit=52,file='grid.MC_integer',status='unknown',err=999)
268 do this_dim=1,maxdim269 do this_dim=1,maxdim
269 write(52,*) (grid(i,this_dim),i=0,nintervals(this_dim))270 write(52,*) 'AVE',(grid(i,this_dim),i=0,nintervals(this_dim))
270 enddo271 enddo
271 close(52)272 close(52)
272c273c
273274
=== modified file 'Template/NLO/SubProcesses/check_poles.f'
--- Template/NLO/SubProcesses/check_poles.f 2018-09-21 13:46:51 +0000
+++ Template/NLO/SubProcesses/check_poles.f 2020-05-23 19:29:41 +0000
@@ -2,6 +2,8 @@
2c**************************************************************************2c**************************************************************************
3c This is the driver for the whole calulation3c This is the driver for the whole calulation
4c**************************************************************************4c**************************************************************************
5 use mint_module
6 use FKSParams
5 implicit none7 implicit none
6C8C
7C CONSTANTS9C CONSTANTS
@@ -9,7 +11,7 @@
9 double precision pi, zero11 double precision pi, zero
10 parameter (pi=3.1415926535897932385d0)12 parameter (pi=3.1415926535897932385d0)
11 parameter (zero = 0d0)13 parameter (zero = 0d0)
12 integer npoints, npointsChecked14 integer npointsChecked
13 integer i, j, k15 integer i, j, k
14 integer return_code16 integer return_code
15 double precision tolerance, tolerance_default17 double precision tolerance, tolerance_default
@@ -63,8 +65,6 @@
63 common /to_polecheck/force_polecheck, polecheck_passed65 common /to_polecheck/force_polecheck, polecheck_passed
64 integer ret_code_ml66 integer ret_code_ml
65 common /to_ret_code/ret_code_ml67 common /to_ret_code/ret_code_ml
66 include 'FKSParams.inc'
67 include 'mint.inc'
68 68
69C-----69C-----
70C BEGIN CODE70C BEGIN CODE
@@ -462,16 +462,3 @@
462 return 462 return
463 end463 end
464464
465 subroutine outfun(p, a, b, i)
466c just a dummy subroutine
467 implicit none
468 include 'nexternal.inc'
469 double precision p(0:3, nexternal), a, b
470 integer i
471 write(*,*) 'THIS FUNCTION SHOULD NEVER BE CALLED'
472 return
473 end
474
475
476 subroutine initplot
477 end
478465
=== modified file 'Template/NLO/SubProcesses/cuts.f'
--- Template/NLO/SubProcesses/cuts.f 2018-04-16 14:08:47 +0000
+++ Template/NLO/SubProcesses/cuts.f 2020-05-23 19:29:41 +0000
@@ -139,7 +139,7 @@
139 return139 return
140 endif140 endif
141 endif141 endif
142 if (ipdg(i).eq.-ipdg(j)) then142 if (ipdg_reco(i).eq.-ipdg_reco(j)) then
143 if (drll_sf.gt.0d0) then143 if (drll_sf.gt.0d0) then
144 if (R2_04(p_reco(0,i),p_reco(0,j)).lt.drll_sf**2) then144 if (R2_04(p_reco(0,i),p_reco(0,j)).lt.drll_sf**2) then
145 passcuts_user=.false.145 passcuts_user=.false.
146146
=== modified file 'Template/NLO/SubProcesses/driver_mintFO.f'
--- Template/NLO/SubProcesses/driver_mintFO.f 2018-09-21 13:46:51 +0000
+++ Template/NLO/SubProcesses/driver_mintFO.f 2020-05-23 19:29:41 +0000
@@ -3,6 +3,8 @@
3c This is the driver for the whole calculation3c This is the driver for the whole calculation
4c**************************************************************************4c**************************************************************************
5 use extra_weights5 use extra_weights
6 use mint_module
7 use FKSParams
6 implicit none8 implicit none
7C9C
8C CONSTANTS10C CONSTANTS
@@ -11,13 +13,10 @@
11 parameter (ZERO = 0d0)13 parameter (ZERO = 0d0)
12 include 'nexternal.inc'14 include 'nexternal.inc'
13 include 'genps.inc'15 include 'genps.inc'
14 INTEGER ITMAX, NCALL
15
16 common/citmax/itmax,ncall
17C16C
18C LOCAL17C LOCAL
19C18C
20 integer i,j,k,l,l1,l219 integer i,j,k,l,l1,l2,kchan
21 character*130 buf20 character*130 buf
22c21c
23c Global22c Global
@@ -27,8 +26,8 @@
27 include 'coupl.inc'26 include 'coupl.inc'
28 27
29c Vegas stuff28c Vegas stuff
30 integer ndim29 integer nndim
31 common/tosigint/ndim30 common/tosigint/nndim
3231
33 real*8 sigint32 real*8 sigint
34 external sigint33 external sigint
@@ -43,21 +42,11 @@
43 double precision xratmax42 double precision xratmax
44 common/ccheckcnt/i_momcmp_count,xratmax43 common/ccheckcnt/i_momcmp_count,xratmax
4544
45 character*4 abrv
46 common /to_abrv/ abrv
46 integer n_mp, n_disc47 integer n_mp, n_disc
47c For MINT:
48 include "mint.inc"
49 integer nhits_in_grids(maxchannels)
50 real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals
51 $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals
52 $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals
53 $ ,0:maxchannels),x(ndimmax),itmax_fl
54 integer ixi_i,iphi_i,iy_ij,vn48 integer ixi_i,iphi_i,iy_ij,vn
55 integer ifold(ndimmax)
56 common /cifold/ifold
57 integer ifold_energy,ifold_phi,ifold_yij
58 common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
59 logical putonshell49 logical putonshell
60 integer imode,dummy
61 logical unwgt50 logical unwgt
62 double precision evtsgn51 double precision evtsgn
63 common /c_unwgt/evtsgn,unwgt52 common /c_unwgt/evtsgn,unwgt
@@ -72,20 +61,12 @@
7261
73 double precision virtual_over_born62 double precision virtual_over_born
74 common/c_vob/virtual_over_born63 common/c_vob/virtual_over_born
75 double precision average_virtual(0:n_ave_virt,maxchannels)
76 $ ,virtual_fraction(maxchannels)
77 common/c_avg_virt/average_virtual,virtual_fraction
78 include 'orders.inc'64 include 'orders.inc'
79 integer n_ord_virt
80 common /c_n_ord_virt/n_ord_virt
8165
82c timing statistics66c timing statistics
83 include "timing_variables.inc"67 include "timing_variables.inc"
84 real*4 tOther, tTot68 real*4 tOther, tTot
8569
86c general MadFKS parameters
87 include "FKSParams.inc"
88
89c applgrid70c applgrid
90 integer iappl71 integer iappl
91 common /for_applgrid/ iappl72 common /for_applgrid/ iappl
@@ -95,13 +76,17 @@
95 integer ntot_granny,derntot,ncase(0:6)76 integer ntot_granny,derntot,ncase(0:6)
96 common /c_granny_counters/ ntot_granny,ncase,derntot,deravg,derstd77 common /c_granny_counters/ ntot_granny,ncase,derntot,deravg,derstd
97 & ,dermax,xi_i_fks_ev_der_max,y_ij_fks_ev_der_max78 & ,dermax,xi_i_fks_ev_der_max,y_ij_fks_ev_der_max
98 logical fixed_order,nlo_ps
99 common /c_fnlo_nlops/fixed_order,nlo_ps
10079
80 logical useitmax
81 common/cuseitmax/useitmax
10182
102C-----83C-----
103C BEGIN CODE84C BEGIN CODE
104C----- 85C-----
86c Write the process PID in the log.txt files (i.e., to the screen)
87 write (*,*) getpid()
88
89 useitmax=.false. ! to be overwritten in open_output_files.f if need be
105c90c
106c Setup the timing variable91c Setup the timing variable
107c92c
@@ -112,6 +97,7 @@
112c Read general MadFKS parameters97c Read general MadFKS parameters
113c98c
114 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)99 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)
100 min_virt_fraction_mint=min_virt_fraction
115 do kchan=1,maxchannels101 do kchan=1,maxchannels
116 do i=0,n_ave_virt102 do i=0,n_ave_virt
117 average_virtual(i,kchan)=0d0103 average_virtual(i,kchan)=0d0
@@ -153,7 +139,7 @@
153c Get user input139c Get user input
154c140c
155 write(*,*) "getting user params"141 write(*,*) "getting user params"
156 call get_user_params(ncall,itmax,imode)142 call get_user_params(ncalls0,itmax,imode)
157 if(imode.eq.0)then143 if(imode.eq.0)then
158 flat_grid=.true.144 flat_grid=.true.
159 else145 else
@@ -162,6 +148,7 @@
162 ndim = 3*(nexternal-nincoming)-4148 ndim = 3*(nexternal-nincoming)-4
163 if (abs(lpp(1)) .ge. 1) ndim=ndim+1149 if (abs(lpp(1)) .ge. 1) ndim=ndim+1
164 if (abs(lpp(2)) .ge. 1) ndim=ndim+1150 if (abs(lpp(2)) .ge. 1) ndim=ndim+1
151 nndim=ndim
165c Don't proceed if muF1#muF2 (we need to work out the relevant formulae152c Don't proceed if muF1#muF2 (we need to work out the relevant formulae
166c at the NLO)153c at the NLO)
167 if( ( fixed_fac_scale .and.154 if( ( fixed_fac_scale .and.
@@ -172,7 +159,7 @@
172 write(*,*)'NLO computations require muF1=muF2'159 write(*,*)'NLO computations require muF1=muF2'
173 stop160 stop
174 endif161 endif
175 write(*,*) "about to integrate ", ndim,ncall,itmax162 write(*,*) "about to integrate ", ndim,ncalls0,itmax
176c APPLgrid163c APPLgrid
177 if (imode.eq.0) iappl=0 ! overwrite when starting completely fresh164 if (imode.eq.0) iappl=0 ! overwrite when starting completely fresh
178 if(iappl.ne.0) then165 if(iappl.ne.0) then
@@ -184,6 +171,23 @@
184 call find_iproc_map171 call find_iproc_map
185 write(6,*) " ... done."172 write(6,*) " ... done."
186 endif173 endif
174 if (abrv(1:4).eq.'virt') then
175 only_virt=.true.
176 else
177 only_virt=.false.
178 endif
179c Prepare the MINT folding
180 do j=1,ndimmax
181 if (j.le.ndim) then
182 ifold(j)=1
183 else
184 ifold(j)=0
185 endif
186 enddo
187 ifold_energy=ndim-2
188 ifold_yij=ndim-1
189 ifold_phi=ndim
190c
187 i_momcmp_count=0191 i_momcmp_count=0
188 xratmax=0.d0192 xratmax=0.d0
189 unwgt=.false.193 unwgt=.false.
@@ -194,38 +198,8 @@
194 doreweight=.false.198 doreweight=.false.
195 do_rwgt_scale=.false.199 do_rwgt_scale=.false.
196 do_rwgt_pdf=.false.200 do_rwgt_pdf=.false.
197 do kchan=1,nchans
198 do i=1,ndimmax
199 do j=0,nintervals
200 xgrid(j,i,kchan)=0.d0
201 enddo
202 enddo
203 enddo
204 else201 else
205 doreweight=do_rwgt_scale.or.do_rwgt_pdf202 doreweight=do_rwgt_scale.or.do_rwgt_pdf.or.store_rwgt_info
206c to restore grids:
207 open (unit=12, file='mint_grids',status='old')
208 ans(1,0)=0d0
209 unc(1,0)=0d0
210 do kchan=1,nchans
211 do j=0,nintervals
212 read (12,*) (xgrid(j,i,kchan),i=1,ndim)
213 enddo
214 do j=1,nintervals_virt
215 do k=0,n_ord_virt
216 read (12,*) (ave_virt(j,i,k,kchan),i=1,ndim)
217 enddo
218 enddo
219 read(12,*) ans(1,kchan),unc(1,kchan),dummy,dummy
220 $ ,nhits_in_grids(kchan)
221 read(12,*) virtual_fraction(kchan),average_virtual(0
222 $ ,kchan)
223 ans(1,0)=ans(1,0)+ans(1,kchan)
224 unc(1,0)=unc(1,0)+unc(1,kchan)**2
225 enddo
226 unc(1,0)=sqrt(unc(1,0))
227 close (12)
228 write (*,*) "Update iterations and points to",itmax,ncall
229 endif203 endif
230c204c
231 write (*,*) 'imode is ',imode205 write (*,*) 'imode is ',imode
@@ -236,44 +210,10 @@
236 virtual_fraction(kchan)=1d0210 virtual_fraction(kchan)=1d0
237 enddo211 enddo
238 endif212 endif
239C check for zero cross-section213 call mint(sigint)
240C if restoring grids corresponding to sigma=0, just terminate the run
241 if (imode.ne.0.and.ans(1,0).eq.0d0.and.unc(1,0).eq.0d0) then
242 call initplot()
243 call close_run_zero_res(ncall, itmax, ndim)
244 stop
245 endif
246 call mint(sigint,ndim,ncall,itmax,imode,xgrid,ymax
247 $ ,ymax_virt,ans,unc,chi2,nhits_in_grids)
248 call topout214 call topout
249 call deallocate_weight_lines215 call deallocate_weight_lines
250 write(*,*)'Final result [ABS]:',ans(1,0),' +/-',unc(1,0)
251 write(*,*)'Final result:',ans(2,0),' +/-',unc(2,0)
252 write(*,*)'chi**2 per D.o.F.:',chi2(1,0)
253 open(unit=58,file='results.dat',status='unknown')
254 do kchan=0,nchans
255 write(58,*) ans(1,kchan),unc(2,kchan),0d0,0,0,0,0,0d0,0d0
256 $ ,ans(2,kchan)
257 enddo
258 close(58)
259c216c
260c to save grids:
261 open (unit=12, file='mint_grids',status='unknown')
262 do kchan=1,nchans
263 do j=0,nintervals
264 write (12,*) (xgrid(j,i,kchan),i=1,ndim)
265 enddo
266 do j=1,nintervals_virt
267 do k=0,n_ord_virt
268 write (12,*) (ave_virt(j,i,k,kchan),i=1,ndim)
269 enddo
270 enddo
271 write (12,*) ans(1,kchan),unc(1,kchan),ncall,itmax
272 $ ,nhits_in_grids(kchan)
273 write (12,*) virtual_fraction(kchan),average_virtual(0
274 $ ,kchan)
275 enddo
276 close (12)
277 else217 else
278 write (*,*) 'Unknown imode',imode218 write (*,*) 'Unknown imode',imode
279 stop219 stop
@@ -351,7 +291,7 @@
351 open (unit=12, file='res.dat',status='unknown')291 open (unit=12, file='res.dat',status='unknown')
352 do kchan=0,nchans292 do kchan=0,nchans
353 write (12,*)ans(1,kchan),unc(1,kchan),ans(2,kchan),unc(2,kchan)293 write (12,*)ans(1,kchan),unc(1,kchan),ans(2,kchan),unc(2,kchan)
354 $ ,itmax,ncall,tTot294 $ ,itmax,ncalls0,tTot
355 enddo295 enddo
356 close(12)296 close(12)
357297
@@ -392,9 +332,9 @@
392 double precision function sigint(xx,vegas_wgt,ifl,f)332 double precision function sigint(xx,vegas_wgt,ifl,f)
393 use weight_lines333 use weight_lines
394 use extra_weights334 use extra_weights
335 use mint_module
395 implicit none336 implicit none
396 include 'nexternal.inc'337 include 'nexternal.inc'
397 include 'mint.inc'
398 include 'nFKSconfigs.inc'338 include 'nFKSconfigs.inc'
399 include 'run.inc'339 include 'run.inc'
400 include 'orders.inc'340 include 'orders.inc'
@@ -410,8 +350,8 @@
410 integer ini_fin_fks(maxchannels)350 integer ini_fin_fks(maxchannels)
411 common/fks_channels/ini_fin_fks351 common/fks_channels/ini_fin_fks
412 data sum /.false./352 data sum /.false./
413 integer ndim353 integer nndim
414 common/tosigint/ndim354 common/tosigint/nndim
415 logical nbody355 logical nbody
416 common/cnbody/nbody356 common/cnbody/nbody
417 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)357 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
@@ -419,9 +359,6 @@
419 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt359 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
420 double precision p_born(0:3,nexternal-1)360 double precision p_born(0:3,nexternal-1)
421 common /pborn/ p_born361 common /pborn/ p_born
422 double precision virt_wgt_mint(0:n_ave_virt),
423 & born_wgt_mint(0:n_ave_virt)
424 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
425 double precision virtual_over_born362 double precision virtual_over_born
426 common/c_vob/virtual_over_born363 common/c_vob/virtual_over_born
427 logical calculatedBorn364 logical calculatedBorn
@@ -434,6 +371,9 @@
434 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real371 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real
435 integer ini_fin_fks_map(0:2,0:fks_configs)372 integer ini_fin_fks_map(0:2,0:fks_configs)
436 save ini_fin_fks_map373 save ini_fin_fks_map
374 if (new_point .and. ifl.ne.2) then
375 pass_cuts_check=.false.
376 endif
437 if (firsttime) then377 if (firsttime) then
438 firsttime=.false.378 firsttime=.false.
439 call setup_ini_fin_fks_map(ini_fin_fks_map)379 call setup_ini_fin_fks_map(ini_fin_fks_map)
@@ -479,14 +419,16 @@
479 else419 else
480 jac=0.5d0420 jac=0.5d0
481 endif421 endif
482 call generate_momenta(ndim,iconfig,jac,x,p)422 call generate_momenta(nndim,iconfig,jac,x,p)
483 if (p_born(0,1).lt.0d0) goto 12423 if (p_born(0,1).lt.0d0) goto 12
484 call compute_prefactors_nbody(vegas_wgt)424 call compute_prefactors_nbody(vegas_wgt)
485 call set_cms_stuff(izero)425 call set_cms_stuff(izero)
486 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)426 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)
487 if (passcuts_nbody) then427 if (passcuts_nbody) then
428 pass_cuts_check=.true.
488 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))429 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))
489 call set_alphaS(p1_cnt(0,1,0))430 call set_alphaS(p1_cnt(0,1,0))
431 call include_multichannel_enhance(1)
490 if (abrv(1:2).ne.'vi') then432 if (abrv(1:2).ne.'vi') then
491 call compute_born433 call compute_born
492 endif434 endif
@@ -520,7 +462,7 @@
520 wgt_me_real=0d0462 wgt_me_real=0d0
521 jac=MC_int_wgt463 jac=MC_int_wgt
522 call update_fks_dir(iFKS)464 call update_fks_dir(iFKS)
523 call generate_momenta(ndim,iconfig,jac,x,p)465 call generate_momenta(nndim,iconfig,jac,x,p)
524 if (p_born(0,1).lt.0d0) cycle466 if (p_born(0,1).lt.0d0) cycle
525 call compute_prefactors_n1body(vegas_wgt,jac)467 call compute_prefactors_n1body(vegas_wgt,jac)
526 call set_cms_stuff(izero)468 call set_cms_stuff(izero)
@@ -528,9 +470,11 @@
528 call set_cms_stuff(mohdr)470 call set_cms_stuff(mohdr)
529 passcuts_n1body=passcuts(p,rwgt)471 passcuts_n1body=passcuts(p,rwgt)
530 if (passcuts_nbody .and. abrv.ne.'real') then472 if (passcuts_nbody .and. abrv.ne.'real') then
473 pass_cuts_check=.true.
531 call set_cms_stuff(izero)474 call set_cms_stuff(izero)
532 if (ickkw.eq.3) call set_FxFx_scale(2,p1_cnt(0,1,0))475 if (ickkw.eq.3) call set_FxFx_scale(2,p1_cnt(0,1,0))
533 call set_alphaS(p1_cnt(0,1,0))476 call set_alphaS(p1_cnt(0,1,0))
477 call include_multichannel_enhance(3)
534 call compute_soft_counter_term(0d0)478 call compute_soft_counter_term(0d0)
535 call set_cms_stuff(ione)479 call set_cms_stuff(ione)
536 call compute_collinear_counter_term(0d0)480 call compute_collinear_counter_term(0d0)
@@ -538,9 +482,11 @@
538 call compute_soft_collinear_counter_term(0d0)482 call compute_soft_collinear_counter_term(0d0)
539 endif483 endif
540 if (passcuts_n1body) then484 if (passcuts_n1body) then
485 pass_cuts_check=.true.
541 call set_cms_stuff(mohdr)486 call set_cms_stuff(mohdr)
542 if (ickkw.eq.3) call set_FxFx_scale(3,p)487 if (ickkw.eq.3) call set_FxFx_scale(3,p)
543 call set_alphaS(p)488 call set_alphaS(p)
489 call include_multichannel_enhance(2)
544 call compute_real_emission(p,1d0)490 call compute_real_emission(p,1d0)
545 endif491 endif
546 enddo492 enddo
@@ -703,26 +649,26 @@
703 end649 end
704650
705 subroutine update_vegas_x(xx,x)651 subroutine update_vegas_x(xx,x)
652 use mint_module
706 implicit none653 implicit none
707 include 'mint.inc'
708 integer i654 integer i
709 double precision xx(ndimmax),x(99),ran2655 double precision xx(ndimmax),x(99),ran2
710 external ran2656 external ran2
711 integer ndim657 integer nndim
712 common/tosigint/ndim658 common/tosigint/nndim
713 character*4 abrv659 character*4 abrv
714 common /to_abrv/ abrv660 common /to_abrv/ abrv
715 do i=1,99661 do i=1,99
716 if (abrv.eq.'born'.or.abrv(1:2).eq.'vi') then662 if (abrv.eq.'born'.or.abrv(1:2).eq.'vi') then
717 if(i.le.ndim-3)then663 if(i.le.nndim-3)then
718 x(i)=xx(i)664 x(i)=xx(i)
719 elseif(i.le.ndim) then665 elseif(i.le.nndim) then
720 x(i)=ran2() ! Choose them flat when not including real-emision666 x(i)=ran2() ! Choose them flat when not including real-emision
721 else667 else
722 x(i)=0.d0668 x(i)=0.d0
723 endif669 endif
724 else670 else
725 if(i.le.ndim)then671 if(i.le.nndim)then
726 x(i)=xx(i)672 x(i)=xx(i)
727 else673 else
728 x(i)=0.d0674 x(i)=0.d0
@@ -733,10 +679,11 @@
733 end679 end
734680
735c681c
736 subroutine get_user_params(ncall,itmax,irestart)682 subroutine get_user_params(ncall,nitmax,irestart)
737c**********************************************************************683c**********************************************************************
738c Routine to get user specified parameters for run684c Routine to get user specified parameters for run
739c**********************************************************************685c**********************************************************************
686 use mint_module
740 implicit none687 implicit none
741c688c
742c Constants689c Constants
@@ -746,16 +693,15 @@
746 include 'nFKSconfigs.inc'693 include 'nFKSconfigs.inc'
747 include 'fks_info.inc'694 include 'fks_info.inc'
748 include 'run.inc'695 include 'run.inc'
749 include 'mint.inc'
750 include 'orders.inc'696 include 'orders.inc'
751c697c
752c Arguments698c Arguments
753c699c
754 integer ncall,itmax700 integer ncall,nitmax
755c701c
756c Local702c Local
757c703c
758 integer i, j704 integer i, j, kchan
759 double precision dconfig(maxchannels)705 double precision dconfig(maxchannels)
760c706c
761c Global707c Global
@@ -789,8 +735,6 @@
789 character * 70 idstring735 character * 70 idstring
790 logical savegrid736 logical savegrid
791737
792 logical usexinteg,mint
793 common/cusexinteg/usexinteg,mint
794 logical unwgt738 logical unwgt
795 double precision evtsgn739 double precision evtsgn
796 common /c_unwgt/evtsgn,unwgt740 common /c_unwgt/evtsgn,unwgt
@@ -805,7 +749,6 @@
805c-----749c-----
806c Begin Code750c Begin Code
807c-----751c-----
808 mint=.true.
809 unwgt=.false.752 unwgt=.false.
810 open (unit=83,file='input_app.txt',status='old')753 open (unit=83,file='input_app.txt',status='old')
811 done=.false.754 done=.false.
@@ -817,8 +760,8 @@
817 read(buffer,*) ncall760 read(buffer,*) ncall
818 write (*,*) 'Number of phase-space points per iteration:',ncall761 write (*,*) 'Number of phase-space points per iteration:',ncall
819 elseif(buffer(1:11).eq.'NITERATIONS') then762 elseif(buffer(1:11).eq.'NITERATIONS') then
820 read(buffer(14:),*) itmax763 read(buffer(14:),*) nitmax
821 write (*,*) 'Maximum number of iterations is:',itmax764 write (*,*) 'Maximum number of iterations is:',nitmax
822 elseif(buffer(1:8).eq.'ACCURACY') then765 elseif(buffer(1:8).eq.'ACCURACY') then
823 read(buffer(11:),*) accuracy766 read(buffer(11:),*) accuracy
824 write (*,*) 'Desired accuracy is:',accuracy767 write (*,*) 'Desired accuracy is:',accuracy
825768
=== modified file 'Template/NLO/SubProcesses/driver_mintMC.f'
--- Template/NLO/SubProcesses/driver_mintMC.f 2018-09-21 13:46:51 +0000
+++ Template/NLO/SubProcesses/driver_mintMC.f 2020-05-23 19:29:41 +0000
@@ -3,6 +3,8 @@
3c This is the driver for the whole calculation3c This is the driver for the whole calculation
4c**************************************************************************4c**************************************************************************
5 use extra_weights5 use extra_weights
6 use mint_module
7 use FKSParams
6 implicit none8 implicit none
7C9C
8C CONSTANTS10C CONSTANTS
@@ -11,16 +13,13 @@
11 parameter (ZERO = 0d0)13 parameter (ZERO = 0d0)
12 include 'nexternal.inc'14 include 'nexternal.inc'
13 include 'genps.inc'15 include 'genps.inc'
14 INTEGER ITMAX, NCALL
15
16 common/citmax/itmax,ncall
17 integer ncall_virt,ncall_novi16 integer ncall_virt,ncall_novi
18 character*4 abrv17 character*4 abrv
19 common /to_abrv/ abrv18 common /to_abrv/ abrv
20C19C
21C LOCAL20C LOCAL
22C21C
23 integer i,j,k,l,l1,l2,ndim,nevts22 integer i,j,k,l,l1,l2,nndim,nevts
2423
25 integer lunlhe24 integer lunlhe
26 parameter (lunlhe=98)25 parameter (lunlhe=98)
@@ -30,10 +29,9 @@
30cc29cc
31 include 'run.inc'30 include 'run.inc'
32 include 'coupl.inc'31 include 'coupl.inc'
33 include "mint.inc"
34 32
35c Vegas stuff33c Vegas stuff
36 common/tosigint/ndim34 common/tosigint/nndim
3735
38 real*8 sigintF36 real*8 sigintF
39 external sigintF37 external sigintF
@@ -47,34 +45,17 @@
4745
48 double precision virtual_over_born46 double precision virtual_over_born
49 common/c_vob/virtual_over_born47 common/c_vob/virtual_over_born
50 double precision average_virtual(0:n_ave_virt,maxchannels)
51 $ ,virtual_fraction(maxchannels)
52 common/c_avg_virt/average_virtual,virtual_fraction
53 include 'orders.inc'48 include 'orders.inc'
54 integer n_ord_virt
55 common /c_n_ord_virt/n_ord_virt
5649
57 double precision weight,event_weight,inv_bias50 double precision weight,event_weight,inv_bias
58 character*7 event_norm51 character*7 event_norm
59 common /event_normalisation/event_norm52 common /event_normalisation/event_norm
60c For MINT:53 integer ixi_i,iphi_i,iy_ij,vn
61 real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals
62 $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals
63 $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals
64 $ ,0:maxchannels),x(ndimmax)
65 integer ixi_i,iphi_i,iy_ij,vn,nhits_in_grids(maxchannels)
66 integer ifold(ndimmax)
67 common /cifold/ifold
68 integer ifold_energy,ifold_phi,ifold_yij
69 common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
70 logical putonshell54 logical putonshell
71 logical only_virt
72 integer imode
73 common /c_imode/imode,only_virt
74 logical unwgt55 logical unwgt
75 double precision evtsgn56 double precision evtsgn
76 common /c_unwgt/evtsgn,unwgt57 common /c_unwgt/evtsgn,unwgt
77 double precision ran258 double precision ran2,x(ndimmax)
78 external ran259 external ran2
79 60
80 integer ifile,ievents61 integer ifile,ievents
@@ -94,11 +75,6 @@
94 include "timing_variables.inc"75 include "timing_variables.inc"
95 real*4 tOther, tTot76 real*4 tOther, tTot
9677
97c general MadFKS parameters
98 include "FKSParams.inc"
99 logical fixed_order,nlo_ps
100 common /c_fnlo_nlops/fixed_order,nlo_ps
101
102 double precision deravg,derstd,dermax,xi_i_fks_ev_der_max78 double precision deravg,derstd,dermax,xi_i_fks_ev_der_max
103 & ,y_ij_fks_ev_der_max79 & ,y_ij_fks_ev_der_max
104 integer ntot_granny,derntot,ncase(0:6)80 integer ntot_granny,derntot,ncase(0:6)
@@ -110,6 +86,9 @@
110C-----86C-----
111C BEGIN CODE87C BEGIN CODE
112C----- 88C-----
89c Write the process PID in the log.txt files (i.e., to the screen)
90 write (*,*) getpid()
91
113 call cpu_time(tBefore)92 call cpu_time(tBefore)
114 fixed_order=.false.93 fixed_order=.false.
115 nlo_ps=.true.94 nlo_ps=.true.
@@ -122,6 +101,7 @@
122c Read general MadFKS parameters101c Read general MadFKS parameters
123c102c
124 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)103 call FKSParamReader(paramFileName,.TRUE.,.FALSE.)
104 min_virt_fraction_mint=min_virt_fraction
125 do i=0,n_ave_virt105 do i=0,n_ave_virt
126 average_virtual(i,1)=0d0106 average_virtual(i,1)=0d0
127 enddo107 enddo
@@ -158,11 +138,11 @@
158c Get user input138c Get user input
159c139c
160 write(*,*) "getting user params"140 write(*,*) "getting user params"
161 call get_user_params(ncall,itmax,imode,141 call get_user_params(ncalls0,itmax,
162 & ixi_i,iphi_i,iy_ij,SHsep)142 & ixi_i,iphi_i,iy_ij,SHsep)
163c Only do the reweighting when actually generating the events143c Only do the reweighting when actually generating the events
164 if (imode.eq.2) then144 if (imode.eq.2) then
165 doreweight=do_rwgt_scale.or.do_rwgt_pdf145 doreweight=do_rwgt_scale.or.do_rwgt_pdf.or.store_rwgt_info
166 else146 else
167 doreweight=.false.147 doreweight=.false.
168 do_rwgt_scale=.false.148 do_rwgt_scale=.false.
@@ -182,6 +162,7 @@
182 ndim = 3*(nexternal-nincoming)-4162 ndim = 3*(nexternal-nincoming)-4
183 if (abs(lpp(1)) .ge. 1) ndim=ndim+1163 if (abs(lpp(1)) .ge. 1) ndim=ndim+1
184 if (abs(lpp(2)) .ge. 1) ndim=ndim+1164 if (abs(lpp(2)) .ge. 1) ndim=ndim+1
165 nndim=ndim
185c Don''t proceed if muF1#muF2 (we need to work out the relevant formulae166c Don''t proceed if muF1#muF2 (we need to work out the relevant formulae
186c at the NLO)167c at the NLO)
187 if( ( fixed_fac_scale .and.168 if( ( fixed_fac_scale .and.
@@ -192,146 +173,46 @@
192 write(*,*)'NLO computations require muF1=muF2'173 write(*,*)'NLO computations require muF1=muF2'
193 stop174 stop
194 endif175 endif
195 write(*,*) "about to integrate ", ndim,ncall,itmax,iconfig176 write(*,*) "about to integrate ", ndim,ncalls0,itmax,iconfig
196 i_momcmp_count=0177 i_momcmp_count=0
197 xratmax=0.d0178 xratmax=0.d0
198 unwgt=.false.179 unwgt=.false.
180c Prepare the MINT folding
181 do j=1,ndimmax
182 if (j.le.ndim) then
183 ifold(j)=1
184 else
185 ifold(j)=0
186 endif
187 enddo
188 ifold_energy=ndim-2
189 ifold_yij=ndim-1
190 ifold_phi=ndim
191 ifold(ifold_energy)=ixi_i
192 ifold(ifold_phi)=iphi_i
193 ifold(ifold_yij)=iy_ij
199194
200c*************************************************************195c*************************************************************
201c setting of the grids196c setting of the grids
202c*************************************************************197c*************************************************************
203 if (imode.eq.-1.or.imode.eq.0) then198 if (imode.eq.-1.or.imode.eq.0) then
204 if(imode.eq.0)then
205c initialize grids
206 do j=0,nintervals
207 do i=1,ndimmax
208 xgrid(j,i,1)=0.d0
209 enddo
210 enddo
211 else
212c to restore grids:
213 open (unit=12, file='mint_grids',status='old')
214 do j=0,nintervals
215 read (12,*) (xgrid(j,i,1),i=1,ndim)
216 enddo
217 do j=1,nintervals_virt
218 do k=0,n_ord_virt
219 read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
220 enddo
221 enddo
222 read (12,*) (ans(i,1),i=1,nintegrals)
223 read (12,*) ifold_energy,ifold_phi,ifold_yij
224 read (12,*) virtual_fraction(1),average_virtual(0,1)
225 close (12)
226 endif
227c
228 write (*,*) 'imode is ',imode199 write (*,*) 'imode is ',imode
229 call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt200 call mint(sigintF)
230 $ ,ans,unc,chi2,nhits_in_grids)
231 call deallocate_weight_lines201 call deallocate_weight_lines
232 open(unit=58,file='res_0',status='unknown')
233 write(58,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1)
234 write(58,*)'Final result:',ans(2,1),' +/-',unc(2,1)
235 close(58)
236 write(*,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1)
237 write(*,*)'Final result:',ans(2,1),' +/-',unc(2,1)
238 write(*,*)'chi**2 per D.o.F.:',chi2(1,1)
239 open(unit=58,file='results.dat',status='unknown')202 open(unit=58,file='results.dat',status='unknown')
240 write(58,*) ans(1,1),unc(2,1),0d0,0,0,0,0,0d0,0d0,ans(2,1)203 write(58,*) ans(1,1),unc(2,1),0d0,0,0,0,0,0d0,0d0,ans(2,1)
241 close(58)204 close(58)
242c
243c to save grids:
244 open (unit=12, file='mint_grids',status='unknown')
245 do j=0,nintervals
246 write (12,*) (xgrid(j,i,1),i=1,ndim)
247 enddo
248 do j=1,nintervals_virt
249 do k=0,n_ord_virt
250 write (12,*) (ave_virt(j,i,k,1),i=1,ndim)
251 enddo
252 enddo
253 write (12,*) (ans(i,1),i=1,nintegrals)
254 write (12,*) ifold_energy,ifold_phi,ifold_yij
255 write (12,*) virtual_fraction(1),average_virtual(0,1)
256 close (12)
257
258c*************************************************************205c*************************************************************
259c computation of upper bounding envelope206c computation of upper bounding envelope
260c*************************************************************207c*************************************************************
261 elseif(imode.eq.1) then208 elseif(imode.eq.1) then
262c to restore grids:
263 open (unit=12, file='mint_grids',status='old')
264 do j=0,nintervals
265 read (12,*) (xgrid(j,i,1),i=1,ndim)
266 enddo
267 do j=1,nintervals_virt
268 do k=0,n_ord_virt
269 read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
270 enddo
271 enddo
272 read (12,*) (ans(i,1),i=1,nintegrals)
273 read (12,*) ifold_energy,ifold_phi,ifold_yij
274 read (12,*) virtual_fraction(1),average_virtual(0,1)
275 close (12)
276
277c Prepare the MINT folding
278 do j=1,ndimmax
279 if (j.le.ndim) then
280 ifold(j)=1
281 else
282 ifold(j)=0
283 endif
284 enddo
285 ifold(ifold_energy)=ixi_i
286 ifold(ifold_phi)=iphi_i
287 ifold(ifold_yij)=iy_ij
288
289 write (*,*) 'imode is ',imode209 write (*,*) 'imode is ',imode
290 call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt210 call mint(sigintF)
291 $ ,ans,unc,chi2,nhits_in_grids)
292 call deallocate_weight_lines211 call deallocate_weight_lines
293
294c If integrating the virtuals alone, we include the virtuals in
295c ans(1). Therefore, no need to have them in ans(5) and we have to set
296c them to zero.
297 if (only_virt) then
298 ans(3,1)=0d0 ! virtual Xsec
299 ans(5,1)=0d0 ! ABS virtual Xsec
300 endif
301
302 open(unit=58,file='res_1',status='unknown')
303 write(58,*)'Final result [ABS]:',ans(1,1)+ans(5,1),' +/-'
304 $ ,sqrt(unc(1,1)**2+unc(5,1)**2)
305 write(58,*)'Final result:',ans(2,1),' +/-',unc(2,1)
306 close(58)
307 write(*,*)'Final result [ABS]:',ans(1,1)+ans(5,1),' +/-'
308 $ ,sqrt(unc(1,1)**2+unc(5,1)**2)
309 write(*,*)'Final result:',ans(2,1),' +/-',unc(2,1)
310 write(*,*)'chi**2 per D.o.F.:',chi2(1,1)
311c write the results.dat file
312 open(unit=58,file='results.dat',status='unknown')212 open(unit=58,file='results.dat',status='unknown')
313 write(58,*)ans(1,1)+ans(5,1), unc(2,1), 0d0, 0, 0, 0, 0, 0d0 ,0d0, ans(2,1) 213 write(58,*) ans(1,1)+ans(5,1),unc(2,1),0d0,0,0,0,0,0d0,0d0
214 $ ,ans(2,1)
314 close(58)215 close(58)
315
316c to save grids:
317 open (unit=12, file='mint_grids',status='unknown')
318 write (12,*) (xgrid(0,i,1),i=1,ndim)
319 do j=1,nintervals
320 write (12,*) (xgrid(j,i,1),i=1,ndim)
321 write (12,*) (ymax(j,i,1),i=1,ndim)
322 enddo
323 do j=1,nintervals_virt
324 do k=0,n_ord_virt
325 write (12,*) (ave_virt(j,i,k,1),i=1,ndim)
326 enddo
327 enddo
328 write (12,*) ymax_virt(1)
329 write (12,*) (ifold(i),i=1,ndim)
330 write (12,*) (ans(i,1),i=1,nintegrals)
331 write (12,*) (unc(i,1),i=1,nintegrals)
332 write (12,*) virtual_fraction(1),average_virtual(0,1)
333 close (12)
334
335c*************************************************************216c*************************************************************
336c event generation217c event generation
337c*************************************************************218c*************************************************************
@@ -354,30 +235,15 @@
354 & 'No events needed for this channel...skipping it'235 & 'No events needed for this channel...skipping it'
355 stop236 stop
356 endif237 endif
357 ncall=nevts ! Update ncall with the number found in 'nevts'238 ncalls0=nevts ! Update ncall with the number found in 'nevts'
358239
359c to restore grids:240c to restore grids:
360 open (unit=12, file='mint_grids',status='unknown')241
361 read (12,*) (xgrid(0,i,1),i=1,ndim)242 call read_grids_from_file
362 do j=1,nintervals
363 read (12,*) (xgrid(j,i,1),i=1,ndim)
364 read (12,*) (ymax(j,i,1),i=1,ndim)
365 enddo
366 do j=1,nintervals_virt
367 do k=0,n_ord_virt
368 read (12,*) (ave_virt(j,i,k,1),i=1,ndim)
369 enddo
370 enddo
371 read (12,*) ymax_virt(1)
372 read (12,*) (ifold(i),i=1,ndim)
373 read (12,*) (ans(i,1),i=1,nintegrals)
374 read (12,*) (unc(i,1),i=1,nintegrals)
375 read (12,*) virtual_fraction(1),average_virtual(0,1)
376 close (12)
377243
378c determine how many events for the virtual and how many for the no-virt244c determine how many events for the virtual and how many for the no-virt
379 ncall_virt=int(ans(5,1)/(ans(1,1)+ans(5,1)) * ncall)245 ncall_virt=int(ans(5,1)/(ans(1,1)+ans(5,1)) * ncalls0)
380 ncall_novi=ncall-ncall_virt246 ncall_novi=ncalls0-ncall_virt
381247
382 write (*,*) "Generating virt :: novi approx.",ncall_virt248 write (*,*) "Generating virt :: novi approx.",ncall_virt
383 $ ,ncall_novi249 $ ,ncall_novi
@@ -386,13 +252,13 @@
386252
387c fill the information for the write_header_init common block253c fill the information for the write_header_init common block
388 ifile=lunlhe254 ifile=lunlhe
389 ievents=ncall255 ievents=ncalls0
390 inter=ans(2,1)256 inter=ans(2,1)
391 absint=ans(1,1)+ans(5,1)257 absint=ans(1,1)+ans(5,1)
392 uncer=unc(2,1)258 uncer=unc(2,1)
393259
394 if (event_norm(1:4).ne.'bias') then260 if (event_norm(1:4).ne.'bias') then
395 weight=(ans(1,1)+ans(5,1))/ncall261 weight=(ans(1,1)+ans(5,1))/ncalls0
396 else262 else
397 weight=event_weight263 weight=event_weight
398 endif264 endif
@@ -405,25 +271,25 @@
405271
406 write (*,*) 'imode is ',imode272 write (*,*) 'imode is ',imode
407 vn=-1273 vn=-1
408 call gen(sigintF,ndim,xgrid,ymax,ymax_virt,0,x,vn)274 call gen(sigintF,0,vn,x)
409 do j=1,ncall275 do j=1,ncalls0
410 if (abrv(1:4).eq.'born') then276 if (abrv(1:4).eq.'born') then
411 vn=3277 vn=3
412 call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)278 call gen(sigintF,1,vn,x)
413 else279 else
414 if (ran2().lt.ans(5,1)/(ans(1,1)+ans(5,1)) .or. only_virt) then280 if (ran2().lt.ans(5,1)/(ans(1,1)+ans(5,1)) .or. only_virt) then
415 abrv='virt'281 abrv='virt'
416 if (only_virt) then282 if (only_virt) then
417 vn=2283 vn=2
418 call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)284 call gen(sigintF,1,vn,x)
419 else285 else
420 vn=1286 vn=1
421 call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)287 call gen(sigintF,1,vn,x)
422 endif288 endif
423 else289 else
424 abrv='novi'290 abrv='novi'
425 vn=2291 vn=2
426 call gen(sigintF,ndim,xgrid,ymax,ymax_virt,1,x,vn)292 call gen(sigintF,1,vn,x)
427 endif293 endif
428 endif294 endif
429c Randomly pick the contribution that will be written in the event file295c Randomly pick the contribution that will be written in the event file
@@ -438,14 +304,7 @@
438 enddo304 enddo
439 call deallocate_weight_lines305 call deallocate_weight_lines
440 vn=-1306 vn=-1
441 call gen(sigintF,ndim,xgrid,ymax,ymax_virt,3,x,vn)307 call gen(sigintF,3,vn,x) ! print counters generation efficiencies
442 write (*,*) 'Generation efficiencies:',x(1),x(4)
443c Uncomment the next to lines to print the integral from the PS points
444c trown during event generation. This corresponds only to the cross
445c section if these points are thrown flat, so not using the xmmm() stuff
446c in mint.
447c write (*,*) 'Integral from novi points computed',x(2),x(3)
448c write (*,*) 'Integral from virt points computed',x(5),x(6)
449 write (lunlhe,'(a)') "</LesHouchesEvents>"308 write (lunlhe,'(a)') "</LesHouchesEvents>"
450 close(lunlhe)309 close(lunlhe)
451 endif310 endif
@@ -528,10 +387,10 @@
528387
529 open (unit=12, file='res.dat',status='unknown')388 open (unit=12, file='res.dat',status='unknown')
530 if (imode.eq.0) then389 if (imode.eq.0) then
531 write (12,*)ans(1,1),unc(1,1),ans(2,1),unc(2,1),itmax,ncall,tTot390 write (12,*)ans(1,1),unc(1,1),ans(2,1),unc(2,1),itmax,ncalls0,tTot
532 else391 else
533 write (12,*)ans(1,1)+ans(5,1),sqrt(unc(1,1)**2+unc(5,1)**2),ans(2,1)392 write (12,*)ans(1,1)+ans(5,1),sqrt(unc(1,1)**2+unc(5,1)**2),ans(2,1)
534 $ ,unc(2,1),itmax,ncall,tTot393 $ ,unc(2,1),itmax,ncalls0,tTot
535 endif394 endif
536 close(12)395 close(12)
537396
@@ -565,25 +424,25 @@
565 end424 end
566425
567426
568 subroutine get_user_params(ncall,itmax,427 subroutine get_user_params(ncall,nitmax,
569 & imode,ixi_i,iphi_i,iy_ij,SHsep)428 & ixi_i,iphi_i,iy_ij,SHsep)
570c**********************************************************************429c**********************************************************************
571c Routine to get user specified parameters for run430c Routine to get user specified parameters for run
572c**********************************************************************431c**********************************************************************
432 use mint_module
573 implicit none433 implicit none
574c434c
575c Constants435c Constants
576c436c
577 include 'nexternal.inc'437 include 'nexternal.inc'
578 include 'genps.inc'438 include 'genps.inc'
579 include 'mint.inc'
580 include 'nFKSconfigs.inc'439 include 'nFKSconfigs.inc'
581 include 'fks_info.inc'440 include 'fks_info.inc'
582 include 'run.inc'441 include 'run.inc'
583c442c
584c Arguments443c Arguments
585c444c
586 integer ncall,itmax,jconfig445 integer ncall,nitmax
587c446c
588c Local447c Local
589c448c
@@ -633,19 +492,14 @@
633c492c
634c MINT stuff493c MINT stuff
635c494c
636 integer imode,ixi_i,iphi_i,iy_ij495 integer ixi_i,iphi_i,iy_ij
637
638 logical usexinteg,mint
639 common/cusexinteg/usexinteg,mint
640496
641c-----497c-----
642c Begin Code498c Begin Code
643c-----499c-----
644 mint=.true.
645 usexinteg=.false.
646 write(*,'(a)') 'Enter number of events and iterations: '500 write(*,'(a)') 'Enter number of events and iterations: '
647 read(*,*) ncall,itmax501 read(*,*) ncall,nitmax
648 write(*,*) 'Number of events and iterations ',ncall,itmax502 write(*,*) 'Number of events and iterations ',ncall,nitmax
649503
650 write(*,'(a)') 'Enter desired fractional accuracy: '504 write(*,'(a)') 'Enter desired fractional accuracy: '
651 read(*,*) accuracy505 read(*,*) accuracy
@@ -736,7 +590,7 @@
736 write (*,*) 'MINT running mode:',imode590 write (*,*) 'MINT running mode:',imode
737 if (imode.eq.2)then591 if (imode.eq.2)then
738 write (*,*) 'Generating events, doing only one iteration'592 write (*,*) 'Generating events, doing only one iteration'
739 itmax=1593 nitmax=1
740 endif594 endif
741595
742 write (*,'(a)') 'Set the three folding parameters for MINT'596 write (*,'(a)') 'Set the three folding parameters for MINT'
@@ -790,8 +644,8 @@
790644
791 function sigintF(xx,vegas_wgt,ifl,f)645 function sigintF(xx,vegas_wgt,ifl,f)
792 use weight_lines646 use weight_lines
647 use mint_module
793 implicit none648 implicit none
794 include 'mint.inc'
795 include 'nexternal.inc'649 include 'nexternal.inc'
796 include 'nFKSconfigs.inc'650 include 'nFKSconfigs.inc'
797 include 'run.inc'651 include 'run.inc'
@@ -817,25 +671,22 @@
817 common/ccalculatedBorn/calculatedBorn671 common/ccalculatedBorn/calculatedBorn
818 logical MCcntcalled672 logical MCcntcalled
819 common/c_MCcntcalled/MCcntcalled673 common/c_MCcntcalled/MCcntcalled
820 double precision virt_wgt_mint(0:n_ave_virt),
821 & born_wgt_mint(0:n_ave_virt)
822 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
823 double precision virtual_over_born674 double precision virtual_over_born
824 common /c_vob/ virtual_over_born675 common /c_vob/ virtual_over_born
825 logical nbody676 logical nbody
826 common/cnbody/nbody677 common/cnbody/nbody
827 integer ndim678 integer nndim
828 common/tosigint/ndim679 common/tosigint/nndim
829 character*4 abrv680 character*4 abrv
830 common /to_abrv/ abrv681 common /to_abrv/ abrv
831 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)682 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
832 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)683 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
833 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt684 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
834 logical only_virt
835 integer imode
836 common /c_imode/imode,only_virt
837 double precision wgt_ME_born,wgt_ME_real685 double precision wgt_ME_born,wgt_ME_real
838 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real686 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real
687 if (new_point .and. ifl.ne.2) then
688 pass_cuts_check=.false.
689 endif
839 sigintF=0d0690 sigintF=0d0
840c Find the nFKSprocess for which we compute the Born-like contributions691c Find the nFKSprocess for which we compute the Born-like contributions
841 if (firsttime) then692 if (firsttime) then
@@ -887,15 +738,17 @@
887 else738 else
888 jac=0.5d0739 jac=0.5d0
889 endif740 endif
890 call generate_momenta(ndim,iconfig,jac,x,p)741 call generate_momenta(nndim,iconfig,jac,x,p)
891 if (p_born(0,1).lt.0d0) goto 12742 if (p_born(0,1).lt.0d0) goto 12
892 call compute_prefactors_nbody(vegas_wgt)743 call compute_prefactors_nbody(vegas_wgt)
893 call set_cms_stuff(izero)744 call set_cms_stuff(izero)
894 call set_shower_scale_noshape(p,nFKS_picked_nbody*2-1)745 call set_shower_scale_noshape(p,nFKS_picked_nbody*2-1)
895 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)746 passcuts_nbody=passcuts(p1_cnt(0,1,0),rwgt)
896 if (passcuts_nbody) then747 if (passcuts_nbody) then
748 pass_cuts_check=.true.
897 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))749 if (ickkw.eq.3) call set_FxFx_scale(1,p1_cnt(0,1,0))
898 call set_alphaS(p1_cnt(0,1,0))750 call set_alphaS(p1_cnt(0,1,0))
751 call include_multichannel_enhance(1)
899 if (abrv(1:2).ne.'vi') then752 if (abrv(1:2).ne.'vi') then
900 call compute_born753 call compute_born
901 endif754 endif
@@ -926,7 +779,7 @@
926 gfactsf=1.d0779 gfactsf=1.d0
927 gfactcl=1.d0780 gfactcl=1.d0
928 MCcntcalled=.false.781 MCcntcalled=.false.
929 call generate_momenta(ndim,iconfig,jac,x,p)782 call generate_momenta(nndim,iconfig,jac,x,p)
930c Every contribution has to have a viable set of Born momenta (even if783c Every contribution has to have a viable set of Born momenta (even if
931c counter-event momenta do not exist).784c counter-event momenta do not exist).
932 if (p_born(0,1).lt.0d0) cycle785 if (p_born(0,1).lt.0d0) cycle
@@ -970,11 +823,13 @@
970 endif823 endif
971 endif 824 endif
972 if (passcuts_nbody .and. abrv.ne.'real') then825 if (passcuts_nbody .and. abrv.ne.'real') then
826 pass_cuts_check=.true.
973c Include the MonteCarlo subtraction terms827c Include the MonteCarlo subtraction terms
974 if (ickkw.ne.4) then828 if (ickkw.ne.4) then
975 call set_cms_stuff(mohdr)829 call set_cms_stuff(mohdr)
976 if (ickkw.eq.3) call set_FxFx_scale(-3,p)830 if (ickkw.eq.3) call set_FxFx_scale(-3,p)
977 call set_alphaS(p)831 call set_alphaS(p)
832 call include_multichannel_enhance(4)
978 call compute_MC_subt_term(p,gfactsf,gfactcl,probne)833 call compute_MC_subt_term(p,gfactsf,gfactcl,probne)
979 else834 else
980c For UNLOPS all real-emission contributions need to be added to the835c For UNLOPS all real-emission contributions need to be added to the
@@ -989,6 +844,7 @@
989 call set_cms_stuff(izero)844 call set_cms_stuff(izero)
990 if (ickkw.eq.3) call set_FxFx_scale(-2,p1_cnt(0,1,0))845 if (ickkw.eq.3) call set_FxFx_scale(-2,p1_cnt(0,1,0))
991 call set_alphaS(p1_cnt(0,1,0))846 call set_alphaS(p1_cnt(0,1,0))
847 call include_multichannel_enhance(3)
992 replace_MC_subt=(1d0-gfactsf)*probne848 replace_MC_subt=(1d0-gfactsf)*probne
993 call compute_soft_counter_term(replace_MC_subt)849 call compute_soft_counter_term(replace_MC_subt)
994 call set_cms_stuff(ione)850 call set_cms_stuff(ione)
@@ -1000,9 +856,11 @@
1000 endif856 endif
1001c Include the real-emission contribution.857c Include the real-emission contribution.
1002 if (passcuts_n1body) then858 if (passcuts_n1body) then
859 pass_cuts_check=.true.
1003 call set_cms_stuff(mohdr)860 call set_cms_stuff(mohdr)
1004 if (ickkw.eq.3) call set_FxFx_scale(-3,p)861 if (ickkw.eq.3) call set_FxFx_scale(-3,p)
1005 call set_alphaS(p)862 call set_alphaS(p)
863 call include_multichannel_enhance(2)
1006 sudakov_damp=probne864 sudakov_damp=probne
1007 call compute_real_emission(p,sudakov_damp)865 call compute_real_emission(p,sudakov_damp)
1008 endif866 endif
@@ -1280,26 +1138,26 @@
1280 end1138 end
12811139
1282 subroutine update_vegas_x(xx,x)1140 subroutine update_vegas_x(xx,x)
1141 use mint_module
1283 implicit none1142 implicit none
1284 include 'mint.inc'
1285 integer i1143 integer i
1286 double precision xx(ndimmax),x(99),ran21144 double precision xx(ndimmax),x(99),ran2
1287 external ran21145 external ran2
1288 integer ndim1146 integer nndim
1289 common/tosigint/ndim1147 common/tosigint/nndim
1290 character*4 abrv1148 character*4 abrv
1291 common /to_abrv/ abrv1149 common /to_abrv/ abrv
1292 do i=1,991150 do i=1,99
1293 if (abrv.eq.'born') then1151 if (abrv.eq.'born') then
1294 if(i.le.ndim-3)then1152 if(i.le.nndim-3)then
1295 x(i)=xx(i)1153 x(i)=xx(i)
1296 elseif(i.le.ndim) then1154 elseif(i.le.nndim) then
1297 x(i)=ran2() ! Choose them flat when not including real-emision1155 x(i)=ran2() ! Choose them flat when not including real-emision
1298 else1156 else
1299 x(i)=0.d01157 x(i)=0.d0
1300 endif1158 endif
1301 else1159 else
1302 if(i.le.ndim)then1160 if(i.le.nndim)then
1303 x(i)=xx(i)1161 x(i)=xx(i)
1304 else1162 else
1305 x(i)=0.d01163 x(i)=0.d0
13061164
=== modified file 'Template/NLO/SubProcesses/fks_singular.f'
--- Template/NLO/SubProcesses/fks_singular.f 2018-11-21 15:25:36 +0000
+++ Template/NLO/SubProcesses/fks_singular.f 2020-05-23 19:29:41 +0000
@@ -176,13 +176,13 @@
176c This subroutine computes the soft-virtual matrix elements and adds its176c This subroutine computes the soft-virtual matrix elements and adds its
177c value to the list of weights using the add_wgt subroutine177c value to the list of weights using the add_wgt subroutine
178 use extra_weights178 use extra_weights
179 use mint_module
179 implicit none180 implicit none
180 include 'nexternal.inc'181 include 'nexternal.inc'
181 include 'coupl.inc'182 include 'coupl.inc'
182 include 'run.inc'183 include 'run.inc'
183 include 'timing_variables.inc'184 include 'timing_variables.inc'
184 include 'orders.inc'185 include 'orders.inc'
185 include 'mint.inc'
186 integer orders(nsplitorders)186 integer orders(nsplitorders)
187 integer iamp, i187 integer iamp, i
188 double precision amp_split_virt(amp_split_size),188 double precision amp_split_virt(amp_split_size),
@@ -203,9 +203,6 @@
203 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)203 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
204 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)204 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
205 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt205 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
206 double precision virt_wgt_mint(0:n_ave_virt),
207 & born_wgt_mint(0:n_ave_virt)
208 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
209 double precision xiimax_cnt(-2:2)206 double precision xiimax_cnt(-2:2)
210 common /cxiimaxcnt/xiimax_cnt207 common /cxiimaxcnt/xiimax_cnt
211 double precision xi_i_hat_ev,xi_i_hat_cnt(-2:2)208 double precision xi_i_hat_ev,xi_i_hat_cnt(-2:2)
@@ -976,23 +973,17 @@
976c i.e. all the nbody contributions. Also initialises the plots and973c i.e. all the nbody contributions. Also initialises the plots and
977c bpower.974c bpower.
978 use extra_weights975 use extra_weights
976 use mint_module
979 implicit none977 implicit none
980 include 'nexternal.inc'978 include 'nexternal.inc'
981 include 'run.inc'979 include 'run.inc'
982 include 'genps.inc'980 include 'genps.inc'
983 include 'timing_variables.inc'981 include 'timing_variables.inc'
984 double precision pi,vegas_wgt,enhance,xnoborn_cnt,xtot982 double precision pi,vegas_wgt
985 $ ,bpower,cpower,tiny983 integer i
986 data xnoborn_cnt /0d0/
987 integer inoborn_cnt,i
988 data inoborn_cnt /0/
989 double precision wgt_c
990 logical firsttime984 logical firsttime
991 data firsttime /.true./985 data firsttime /.true./
992 parameter (pi=3.1415926535897932385d0)986 parameter (pi=3.1415926535897932385d0)
993 parameter (tiny=1d-6)
994 double precision p_born(0:3,nexternal-1)
995 common/pborn/ p_born
996 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)987 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
997 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)988 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
998 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt989 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
@@ -1009,12 +1000,6 @@
1009 integer ngluons,nquarks(-6:6),nphotons1000 integer ngluons,nquarks(-6:6),nphotons
1010 common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,1001 common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
1011 & fkssymmetryfactorDeg,ngluons,nquarks,nphotons1002 & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
1012 integer mapconfig(0:lmaxconfigs), iconfig
1013 common/to_mconfigs/mapconfig, iconfig
1014 Double Precision amp2(ngraphs), jamp2(0:ncolor)
1015 common/to_amps/ amp2, jamp2
1016 double precision diagramsymmetryfactor
1017 common /dsymfactor/diagramsymmetryfactor
1018 double precision f_b,f_nb1003 double precision f_b,f_nb
1019 common /factor_nbody/ f_b,f_nb1004 common /factor_nbody/ f_b,f_nb
1020 integer iappl1005 integer iappl
@@ -1025,8 +1010,6 @@
1025 external ran21010 external ran2
1026 real*8 rndec(10)1011 real*8 rndec(10)
1027 common/crndec/rndec1012 common/crndec/rndec
1028 logical fixed_order,nlo_ps
1029 common /c_fnlo_nlops/fixed_order,nlo_ps
1030 include "appl_common.inc" 1013 include "appl_common.inc"
1031 !!!include "orders.inc"1014 !!!include "orders.inc"
1032 call cpu_time(tBefore)1015 call cpu_time(tBefore)
@@ -1043,138 +1026,70 @@
1043 if (fixed_order) call initplot1026 if (fixed_order) call initplot
1044 firsttime=.false.1027 firsttime=.false.
1045 endif1028 endif
1046c Compute the multi-channel enhancement factor 'enhance'.
1047 enhance=1.d0
1048 if (p_born(0,1).gt.0d0) then
1049 call sborn(p_born,wgt_c)
1050 elseif(p_born(0,1).lt.0d0)then
1051 enhance=0d0
1052 endif
1053 if (enhance.eq.0d0)then
1054 xnoborn_cnt=xnoborn_cnt+1.d0
1055 if(log10(xnoborn_cnt).gt.inoborn_cnt)then
1056 write (*,*) 'WARNING: no Born momenta more than 10**',
1057 $ inoborn_cnt,'times'
1058 inoborn_cnt=inoborn_cnt+1
1059 endif
1060 else
1061 xtot=0d0
1062 if (mapconfig(0).eq.0) then
1063 write (*,*) 'Fatal error in compute_prefactor_nbody:'/
1064 & /' no Born diagrams ',mapconfig,
1065 & '. Check bornfromreal.inc'
1066 write (*,*) 'Is fks_singular compiled correctly?'
1067 stop 1
1068 endif
1069 do i=1, mapconfig(0)
1070 xtot=xtot+amp2(mapconfig(i))
1071 enddo
1072 if (xtot.ne.0d0) then
1073 enhance=amp2(mapconfig(iconfig))/xtot
1074 enhance=enhance*diagramsymmetryfactor
1075 else
1076 enhance=0d0
1077 endif
1078 endif
1079 call set_cms_stuff(0)1029 call set_cms_stuff(0)
1080c f_* multiplication factors for Born and nbody1030c f_* multiplication factors for Born and nbody
1081 f_b=jac_cnt(0)*xinorm_ev/(min(xiimax_ev,xiBSVcut_used)*shat/(161031 f_b=jac_cnt(0)*xinorm_ev/(min(xiimax_ev,xiBSVcut_used)*shat/(16
1082 $ *pi**2))*enhance*fkssymmetryfactorBorn*vegas_wgt1032 $ *pi**2))*fkssymmetryfactorBorn*vegas_wgt
1083 f_nb=f_b1033 f_nb=f_b
1084 call cpu_time(tAfter)1034 call cpu_time(tAfter)
1085 tf_nb=tf_nb+(tAfter-tBefore)1035 tf_nb=tf_nb+(tAfter-tBefore)
1086 return1036 return
1087 end1037 end
10881038
1089 subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)1039
1090c Compute all relevant prefactors for the real emission and counter1040 subroutine include_multichannel_enhance(imode)
1091c terms.
1092 implicit none1041 implicit none
1093 include 'nexternal.inc'1042 include 'nexternal.inc'
1094 include 'run.inc'1043 include 'run.inc'
1095 include 'genps.inc'1044 include 'genps.inc'
1096 include 'fks_powers.inc'
1097 include 'coupl.inc'
1098 include 'timing_variables.inc'1045 include 'timing_variables.inc'
1099 double precision vegas_wgt,enhance,xnoborn_cnt,xtot1046 double precision xnoborn_cnt,xtot,wgt_c,enhance,enhance_real
1100 & ,prefact,prefact_cnt_ssc,prefact_deg,prefact_c,prefact_coll1047 $ ,pas(0:3,nexternal)
1101 & ,jac_ev,pi,prefact_cnt_ssc_c,prefact_coll_c,prefact_deg_slxi
1102 & ,prefact_deg_sxi,zero,enhance_real
1103 parameter (pi=3.1415926535897932385d0, zero=0d0)
1104 data xnoborn_cnt /0d0/1048 data xnoborn_cnt /0d0/
1105 integer inoborn_cnt,i1049 integer inoborn_cnt,i,imode
1106 data inoborn_cnt /0/1050 data inoborn_cnt /0/
1107 double precision wgt_c
1108 double precision p_born(0:3,nexternal-1)1051 double precision p_born(0:3,nexternal-1)
1109 common/pborn/ p_born1052 common/pborn/ p_born
1110 double precision p_born_ev(0:3,nexternal-1)1053 double precision p_born_ev(0:3,nexternal-1)
1111 common/pborn_ev/p_born_ev1054 common/pborn_ev/ p_born_ev
1055 double precision p_ev(0:3,nexternal)
1056 common/pev/ p_ev
1112 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)1057 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
1113 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)1058 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
1114 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt1059 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
1115 double precision xi_i_fks_ev,y_ij_fks_ev
1116 double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
1117 common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
1118 integer i_fks,j_fks
1119 common/fks_indices/i_fks,j_fks
1120 double precision xi_i_fks_cnt(-2:2)
1121 common /cxiifkscnt/xi_i_fks_cnt
1122 double precision xinorm_ev
1123 common /cxinormev/xinorm_ev
1124 double precision xiimax_ev
1125 common /cxiimaxev/xiimax_ev
1126 double precision xiimax_cnt(-2:2)
1127 common /cxiimaxcnt/xiimax_cnt
1128 double precision xinorm_cnt(-2:2)
1129 common /cxinormcnt/xinorm_cnt
1130 double precision delta_used
1131 common /cdelta_used/delta_used
1132 double precision xicut_used
1133 common /cxicut_used/xicut_used
1134 double precision xiScut_used,xiBSVcut_used
1135 common /cxiScut_used/xiScut_used,xiBSVcut_used
1136 double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1137 common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1138 double precision fkssymmetryfactor,fkssymmetryfactorBorn,
1139 & fkssymmetryfactorDeg
1140 integer ngluons,nquarks(-6:6),nphotons
1141 common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
1142 & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
1143 integer mapconfig(0:lmaxconfigs), iconfig1060 integer mapconfig(0:lmaxconfigs), iconfig
1144 common/to_mconfigs/mapconfig, iconfig1061 common/to_mconfigs/mapconfig, iconfig
1145 Double Precision amp2(ngraphs), jamp2(0:ncolor)1062 Double Precision amp2(ngraphs), jamp2(0:ncolor)
1146 common/to_amps/ amp2, jamp21063 common/to_amps/ amp2, jamp2
1147 double precision diagramsymmetryfactor1064 double precision diagramsymmetryfactor
1148 common /dsymfactor/diagramsymmetryfactor1065 common /dsymfactor/diagramsymmetryfactor
1149 logical nocntevents1066 double precision f_b,f_nb
1150 common/cnocntevents/nocntevents1067 common /factor_nbody/ f_b,f_nb
1068 double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
1069 common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
1070 double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1071 $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1072 common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1073 $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1074 double precision f_dis_d,f_dis_p,f_dis_l
1075 common/factor_dis/f_dis_d,f_dis_p,f_dis_l
1151 integer igranny,iaunt1076 integer igranny,iaunt
1152 logical granny_chain(-nexternal:nexternal),granny_is_res1077 logical granny_chain(-nexternal:nexternal),granny_is_res
1153 & ,granny_chain_real_final(-nexternal:nexternal)1078 & ,granny_chain_real_final(-nexternal:nexternal)
1154 common /c_granny_res/igranny,iaunt,granny_is_res,granny_chain1079 common /c_granny_res/igranny,iaunt,granny_is_res,granny_chain
1155 & ,granny_chain_real_final1080 & ,granny_chain_real_final
1156 double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
1157 common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
1158 double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1159 $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1160 common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1161 $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1162 ! prefactors for the DIS scheme
1163 double precision prefact_dis_d,prefact_dis_p,prefact_dis_l
1164 double precision f_dis_d,f_dis_p,f_dis_l
1165 common/factor_dis/f_dis_d,f_dis_p,f_dis_l
1166 logical calculatedBorn1081 logical calculatedBorn
1167 common/ccalculatedBorn/calculatedBorn1082 common/ccalculatedBorn/calculatedBorn
1168 double precision pmass(nexternal)1083
1169 include 'pmass.inc'
1170 call cpu_time(tBefore)1084 call cpu_time(tBefore)
1085
1086c Compute the multi-channel enhancement factor 'enhance'.
1171 enhance=1.d01087 enhance=1.d0
1172 if (p_born(0,1).gt.0d0) then1088 if (p_born(0,1).gt.0d0) then
1173 call sborn(p_born,wgt_c)1089 call sborn(p_born,wgt_c)
1174 elseif(p_born(0,1).lt.0d0)then1090 elseif(p_born(0,1).lt.0d0)then
1175 enhance=0d01091 enhance=0d0
1176 endif1092 endif
1177c Compute the multi-channel enhancement factor 'enhance'.
1178 if (enhance.eq.0d0)then1093 if (enhance.eq.0d0)then
1179 xnoborn_cnt=xnoborn_cnt+1.d01094 xnoborn_cnt=xnoborn_cnt+1.d0
1180 if(log10(xnoborn_cnt).gt.inoborn_cnt)then1095 if(log10(xnoborn_cnt).gt.inoborn_cnt)then
@@ -1185,9 +1100,9 @@
1185 else1100 else
1186 xtot=0d01101 xtot=0d0
1187 if (mapconfig(0).eq.0) then1102 if (mapconfig(0).eq.0) then
1188 write (*,*) 'Fatal error in compute_prefactor_n1body,'/1103 write (*,*) 'Fatal error in compute_prefactor_nbody:'/
1189 & /' no Born diagrams ',mapconfig1104 & /' no Born diagrams ',mapconfig,
1190 & ,'. Check bornfromreal.inc'1105 & '. Check bornfromreal.inc'
1191 write (*,*) 'Is fks_singular compiled correctly?'1106 write (*,*) 'Is fks_singular compiled correctly?'
1192 stop 11107 stop 1
1193 endif1108 endif
@@ -1202,11 +1117,17 @@
1202 endif1117 endif
1203 endif1118 endif
12041119
1120c In the case there is the special phase-space mapping for resonances,
1121c use the Born computed with those as the mapping.
1205 enhance_real=1.d01122 enhance_real=1.d0
1206 if (granny_is_res) then1123 if (granny_is_res .and. imode.eq.2) then
1207 if (p_born_ev(0,1).gt.0d0) then1124 if (p_born_ev(0,1).gt.0d0) then
1208 calculatedBorn=.false.1125 calculatedBorn=.false.
1126 pas(0:3,nexternal)=0d0
1127 pas(0:3,1:nexternal-1)=p_born_ev(0:3,1:nexternal-1)
1128 call set_alphas(pas)
1209 call sborn(p_born_ev,wgt_c)1129 call sborn(p_born_ev,wgt_c)
1130 call set_alphas(p_ev)
1210 calculatedBorn=.false.1131 calculatedBorn=.false.
1211 elseif(p_born_ev(0,1).lt.0d0)then1132 elseif(p_born_ev(0,1).lt.0d0)then
1212 if (enhance.ne.0d0) then 1133 if (enhance.ne.0d0) then
@@ -1246,18 +1167,114 @@
1246 enhance_real=enhance1167 enhance_real=enhance
1247 endif1168 endif
12481169
1170 if (imode.eq.1) then
1171 f_b= f_b *enhance
1172 f_nb= f_nb *enhance
1173 elseif(imode.eq.2) then
1174 f_r= f_r *enhance_real
1175 elseif(imode.eq.4) then
1176 f_MC_S= f_MC_S *enhance
1177 f_MC_H= f_MC_H *enhance
1178 elseif(imode.eq.3) then
1179 f_s= f_s *enhance
1180 f_s_MC_S= f_s_MC_S *enhance
1181 f_S_MC_H= f_S_MC_H *enhance
1182 f_c= f_c *enhance
1183 f_c_MC_S= f_c_MC_S *enhance
1184 f_c_MC_H= f_c_MC_H *enhance
1185 f_dc= f_dc *enhance
1186 f_sc= f_sc *enhance
1187 f_sc_MC_S=f_sc_MC_S*enhance
1188 f_sc_MC_H=f_sc_MC_H*enhance
1189 f_dsc(1)= f_dsc(1) *enhance
1190 f_dsc(2)= f_dsc(2) *enhance
1191 f_dsc(3)= f_dsc(3) *enhance
1192 f_dsc(4)= f_dsc(4) *enhance
1193 f_dis_d= f_dis_d *enhance
1194 f_dis_p= f_dis_p *enhance
1195 f_dis_l= f_dis_l *enhance
1196 endif
1197 call cpu_time(tAfter)
1198 tf_nb=tf_nb+(tAfter-tBefore)
1199
1200 return
1201 end
1202
1203
1204 subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
1205c Compute all relevant prefactors for the real emission and counter
1206c terms.
1207 implicit none
1208 include 'nexternal.inc'
1209 include 'run.inc'
1210 include 'genps.inc'
1211 include 'fks_powers.inc'
1212 include 'coupl.inc'
1213 include 'timing_variables.inc'
1214 double precision vegas_wgt,prefact,prefact_cnt_ssc,prefact_deg
1215 $ ,prefact_c,prefact_coll,jac_ev,pi,prefact_cnt_ssc_c
1216 $ ,prefact_coll_c,prefact_deg_slxi,prefact_deg_sxi,zero
1217 integer i
1218 parameter (pi=3.1415926535897932385d0, ZERO=0d0)
1219 double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
1220 $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
1221 common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
1222 double precision xi_i_fks_ev,y_ij_fks_ev
1223 double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
1224 common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
1225 integer i_fks,j_fks
1226 common/fks_indices/i_fks,j_fks
1227 double precision xi_i_fks_cnt(-2:2)
1228 common /cxiifkscnt/xi_i_fks_cnt
1229 double precision xinorm_ev
1230 common /cxinormev/xinorm_ev
1231 double precision xiimax_ev
1232 common /cxiimaxev/xiimax_ev
1233 double precision xiimax_cnt(-2:2)
1234 common /cxiimaxcnt/xiimax_cnt
1235 double precision xinorm_cnt(-2:2)
1236 common /cxinormcnt/xinorm_cnt
1237 double precision delta_used
1238 common /cdelta_used/delta_used
1239 double precision xicut_used
1240 common /cxicut_used/xicut_used
1241 double precision xiScut_used,xiBSVcut_used
1242 common /cxiScut_used/xiScut_used,xiBSVcut_used
1243 double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1244 common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1245 double precision fkssymmetryfactor,fkssymmetryfactorBorn,
1246 & fkssymmetryfactorDeg
1247 integer ngluons,nquarks(-6:6),nphotons
1248 common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
1249 & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
1250 logical nocntevents
1251 common/cnocntevents/nocntevents
1252 double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
1253 common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
1254 double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1255 $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1256 common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1257 $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1258 ! prefactors for the DIS scheme
1259 double precision prefact_dis_d,prefact_dis_p,prefact_dis_l
1260 double precision f_dis_d,f_dis_p,f_dis_l
1261 common/factor_dis/f_dis_d,f_dis_p,f_dis_l
1262 double precision pmass(nexternal)
1263 include 'pmass.inc'
1264 call cpu_time(tBefore)
1265
1249c f_* multiplication factors for real-emission, soft counter, ... etc. 1266c f_* multiplication factors for real-emission, soft counter, ... etc.
1250 prefact=xinorm_ev/xi_i_fks_ev/(1-y_ij_fks_ev)1267 prefact=xinorm_ev/xi_i_fks_ev/(1-y_ij_fks_ev)
1251 f_r=prefact*jac_ev*enhance_real*fkssymmetryfactor*vegas_wgt1268 f_r=prefact*jac_ev*fkssymmetryfactor*vegas_wgt
1252 f_MC_S=f_r1269 f_MC_S=f_r
1253 f_MC_H=f_r1270 f_MC_H=f_r
1254 if (.not.nocntevents) then1271 if (.not.nocntevents) then
1255 prefact_cnt_ssc=xinorm_ev/min(xiimax_ev,xiScut_used)*1272 prefact_cnt_ssc=xinorm_ev/min(xiimax_ev,xiScut_used)*
1256 $ log(xicut_used/min(xiimax_ev,xiScut_used))/(11273 $ log(xicut_used/min(xiimax_ev,xiScut_used))/(1
1257 $ -y_ij_fks_ev)1274 $ -y_ij_fks_ev)
1258 f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)*enhance1275 f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)
1259 $ *fkssymmetryfactor*vegas_wgt1276 $ *fkssymmetryfactor*vegas_wgt
1260 f_s_MC_S=prefact*jac_cnt(0)*enhance1277 f_s_MC_S=prefact*jac_cnt(0)
1261 $ *fkssymmetryfactor*vegas_wgt1278 $ *fkssymmetryfactor*vegas_wgt
1262 f_s_MC_H=f_s_MC_S1279 f_s_MC_H=f_s_MC_S
12631280
@@ -1268,9 +1285,9 @@
1268 prefact_coll=xinorm_cnt(1)/xi_i_fks_cnt(1)*log(delta_used1285 prefact_coll=xinorm_cnt(1)/xi_i_fks_cnt(1)*log(delta_used
1269 $ /deltaS)/deltaS1286 $ /deltaS)/deltaS
1270 f_c=(prefact_c+prefact_coll)*jac_cnt(1)1287 f_c=(prefact_c+prefact_coll)*jac_cnt(1)
1271 $ *enhance*fkssymmetryfactor*vegas_wgt1288 $ *fkssymmetryfactor*vegas_wgt
1272 f_c_MC_S=prefact_c*jac_cnt(1)1289 f_c_MC_S=prefact_c*jac_cnt(1)
1273 $ *enhance*fkssymmetryfactor*vegas_wgt1290 $ *fkssymmetryfactor*vegas_wgt
1274 f_c_MC_H=f_c_MC_S1291 f_c_MC_H=f_c_MC_S
12751292
1276 call set_cms_stuff(1)1293 call set_cms_stuff(1)
@@ -1281,13 +1298,13 @@
1281 prefact_coll_c=xinorm_cnt(1)/min(xiimax_cnt(1),xiScut_used)1298 prefact_coll_c=xinorm_cnt(1)/min(xiimax_cnt(1),xiScut_used)
1282 $ *log(xicut_used/min(xiimax_cnt(1),xiScut_used))1299 $ *log(xicut_used/min(xiimax_cnt(1),xiScut_used))
1283 $ *log(delta_used/deltaS)/deltaS1300 $ *log(delta_used/deltaS)/deltaS
1284 f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))*enhance1301 f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))
1285 $ *fkssymmetryfactorDeg*vegas_wgt1302 $ *fkssymmetryfactorDeg*vegas_wgt
1286 f_sc=(prefact_c+prefact_coll+prefact_cnt_ssc_c1303 f_sc=(prefact_c+prefact_coll+prefact_cnt_ssc_c
1287 & +prefact_coll_c)*jac_cnt(2)*enhance1304 & +prefact_coll_c)*jac_cnt(2)
1288 & *fkssymmetryfactorDeg*vegas_wgt1305 & *fkssymmetryfactorDeg*vegas_wgt
1289 f_sc_MC_S=prefact_c*jac_cnt(2)1306 f_sc_MC_S=prefact_c*jac_cnt(2)
1290 $ *enhance*fkssymmetryfactor*vegas_wgt1307 $ *fkssymmetryfactor*vegas_wgt
1291 f_sc_MC_H=f_sc_MC_S1308 f_sc_MC_H=f_sc_MC_S
12921309
1293 call set_cms_stuff(2)1310 call set_cms_stuff(2)
@@ -1298,24 +1315,24 @@
1298 & ,xiScut_used)*( log(xicut_used)**21315 & ,xiScut_used)*( log(xicut_used)**2
1299 & -log(min(xiimax_cnt(1),xiScut_used))**2 )*1/(2.d01316 & -log(min(xiimax_cnt(1),xiScut_used))**2 )*1/(2.d0
1300 & *deltaS)1317 & *deltaS)
1301 f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))*enhance1318 f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))
1302 & *fkssymmetryfactorDeg*vegas_wgt1319 & *fkssymmetryfactorDeg*vegas_wgt
1303 f_dsc(2)=prefact_deg_sxi*jac_cnt(2)/(shat/(32*pi**2))1320 f_dsc(2)=prefact_deg_sxi*jac_cnt(2)/(shat/(32*pi**2))
1304 & *enhance*fkssymmetryfactorDeg*vegas_wgt1321 & *fkssymmetryfactorDeg*vegas_wgt
1305 f_dsc(3)=prefact_deg_slxi*jac_cnt(2)/(shat/(32*pi**2))1322 f_dsc(3)=prefact_deg_slxi*jac_cnt(2)/(shat/(32*pi**2))
1306 & *enhance*fkssymmetryfactorDeg*vegas_wgt1323 & *fkssymmetryfactorDeg*vegas_wgt
1307 f_dsc(4)=( prefact_deg+prefact_deg_sxi )*jac_cnt(2)/(shat1324 f_dsc(4)=( prefact_deg+prefact_deg_sxi )*jac_cnt(2)/(shat
1308 & /(32*pi**2))*enhance*fkssymmetryfactorDeg1325 & /(32*pi**2))*fkssymmetryfactorDeg
1309 & *vegas_wgt1326 & *vegas_wgt
1310 ! prefactor for the DIS scheme1327 ! prefactor for the DIS scheme
1311 prefact_dis_d=xinorm_cnt(1)/xiScut_used/deltaS1328 prefact_dis_d=xinorm_cnt(1)/xiScut_used/deltaS
1312 f_dis_d=prefact_dis_d*jac_cnt(2)/(shat/(32*pi**2))*enhance1329 f_dis_d=prefact_dis_d*jac_cnt(2)/(shat/(32*pi**2))
1313 & *fkssymmetryfactorDeg*vegas_wgt1330 & *fkssymmetryfactorDeg*vegas_wgt
1314 prefact_dis_p=xinorm_cnt(1)*dlog(xiScut_used)/xiScut_used/deltaS1331 prefact_dis_p=xinorm_cnt(1)*dlog(xiScut_used)/xiScut_used/deltaS
1315 f_dis_p=prefact_dis_p*jac_cnt(2)/(shat/(32*pi**2))*enhance1332 f_dis_p=prefact_dis_p*jac_cnt(2)/(shat/(32*pi**2))
1316 & *fkssymmetryfactorDeg*vegas_wgt1333 & *fkssymmetryfactorDeg*vegas_wgt
1317 prefact_dis_l=xinorm_cnt(1)*dlog(xiScut_used)**2/2d0/xiScut_used/deltaS1334 prefact_dis_l=xinorm_cnt(1)*dlog(xiScut_used)**2/2d0/xiScut_used/deltaS
1318 f_dis_l=prefact_dis_l*jac_cnt(2)/(shat/(32*pi**2))*enhance1335 f_dis_l=prefact_dis_l*jac_cnt(2)/(shat/(32*pi**2))
1319 & *fkssymmetryfactorDeg*vegas_wgt1336 & *fkssymmetryfactorDeg*vegas_wgt
1320 else1337 else
1321 f_c=0d01338 f_c=0d0
@@ -1439,6 +1456,7 @@
1439c contribution1456c contribution
1440 use weight_lines1457 use weight_lines
1441 use extra_weights1458 use extra_weights
1459 use FKSParams
1442 implicit none1460 implicit none
1443 include 'nexternal.inc'1461 include 'nexternal.inc'
1444 include 'run.inc'1462 include 'run.inc'
@@ -1446,7 +1464,6 @@
1446 include 'coupl.inc'1464 include 'coupl.inc'
1447 include 'fks_info.inc'1465 include 'fks_info.inc'
1448 include 'q_es.inc'1466 include 'q_es.inc'
1449 include 'FKSParams.inc'
1450 include 'orders.inc'1467 include 'orders.inc'
1451 integer type,i,j1468 integer type,i,j
1452 logical foundIt,foundOrders1469 logical foundIt,foundOrders
@@ -1633,6 +1650,8 @@
1633c or to fill histograms.1650c or to fill histograms.
1634 use weight_lines1651 use weight_lines
1635 use extra_weights1652 use extra_weights
1653 use mint_module
1654 use FKSParams
1636 implicit none1655 implicit none
1637 include 'nexternal.inc'1656 include 'nexternal.inc'
1638 include 'run.inc'1657 include 'run.inc'
@@ -1640,10 +1659,8 @@
1640 include 'timing_variables.inc'1659 include 'timing_variables.inc'
1641 include 'genps.inc'1660 include 'genps.inc'
1642 include 'orders.inc'1661 include 'orders.inc'
1643 include 'mint.inc'
1644 include 'FKSParams.inc'
1645 integer orders(nsplitorders)1662 integer orders(nsplitorders)
1646 integer i,j,k,iamp1663 integer i,j,k,iamp,icontr_orig
1647 logical virt_found1664 logical virt_found
1648 double precision xlum,dlum,pi,mu2_r,mu2_f,mu2_q,rwgt_muR_dep_fac1665 double precision xlum,dlum,pi,mu2_r,mu2_f,mu2_q,rwgt_muR_dep_fac
1649 $ ,wgt_wo_pdf,conv1666 $ ,wgt_wo_pdf,conv
@@ -1652,9 +1669,6 @@
1652 external dlum1669 external dlum
1653 integer nFKSprocess1670 integer nFKSprocess
1654 common/c_nFKSprocess/nFKSprocess1671 common/c_nFKSprocess/nFKSprocess
1655 double precision virt_wgt_mint(0:n_ave_virt),
1656 & born_wgt_mint(0:n_ave_virt)
1657 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
1658 INTEGER IPROC1672 INTEGER IPROC
1659 DOUBLE PRECISION PD(0:MAXPROC)1673 DOUBLE PRECISION PD(0:MAXPROC)
1660 COMMON /SUBPROC/ PD, IPROC1674 COMMON /SUBPROC/ PD, IPROC
@@ -1662,6 +1676,9 @@
1662 call cpu_time(tBefore)1676 call cpu_time(tBefore)
1663 if (icontr.eq.0) return1677 if (icontr.eq.0) return
1664 virt_found=.false.1678 virt_found=.false.
1679c number of contributions before they are (possibly) increased through a
1680c call to separate_flavour_config().
1681 icontr_orig=icontr
1665 i=01682 i=0
1666 do while (i.lt.icontr)1683 do while (i.lt.icontr)
1667 i=i+11684 i=i+1
@@ -1678,8 +1695,12 @@
1678c iwgt=1 is the central value (i.e. no scale/PDF reweighting).1695c iwgt=1 is the central value (i.e. no scale/PDF reweighting).
1679 iwgt=11696 iwgt=1
1680 call weight_lines_allocated(nexternal,max_contr,iwgt,iproc)1697 call weight_lines_allocated(nexternal,max_contr,iwgt,iproc)
1681c set_pdg_codes fills the niproc, parton_iproc, parton_pdg and parton_pdg_uborn1698c set_pdg_codes fills the niproc, parton_iproc, parton_pdg and
1682 call set_pdg_codes(iproc,pd,nFKSprocess,i)1699c parton_pdg_uborn [Do only for the contributions that were already
1700c available as part of the input -- NOT the ones that are created
1701c through the call to separate_flavour_config(), since that will
1702c overwrite the relevant information.]
1703 if (i.le.icontr_orig) call set_pdg_codes(iproc,pd,nFKSprocess,i)
1683 if (separate_flavour_configs .and. ipr(i).eq.0) then1704 if (separate_flavour_configs .and. ipr(i).eq.0) then
1684 call separate_flavour_config(i) ! this increases icontr1705 call separate_flavour_config(i) ! this increases icontr
1685 endif1706 endif
@@ -1733,18 +1754,15 @@
1733c include the weight also in the 'wgt' array that contain the1754c include the weight also in the 'wgt' array that contain the
1734c coefficients for PDF and scale computations. 1755c coefficients for PDF and scale computations.
1735 use weight_lines1756 use weight_lines
1757 use mint_module
1736 implicit none1758 implicit none
1737 include 'orders.inc'1759 include 'orders.inc'
1738 include 'mint.inc'
1739 integer orders(nsplitorders)1760 integer orders(nsplitorders)
1740 integer i,j,iamp1761 integer i,j,iamp
1741 logical virt_found1762 logical virt_found
1742 double precision bias1763 double precision bias
1743 character*7 event_norm1764 character*7 event_norm
1744 common /event_normalisation/event_norm1765 common /event_normalisation/event_norm
1745 double precision virt_wgt_mint(0:n_ave_virt),
1746 & born_wgt_mint(0:n_ave_virt)
1747 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
1748c Set the bias_wgt to 1 in case we do not have to do any biassing1766c Set the bias_wgt to 1 in case we do not have to do any biassing
1749 if (event_norm(1:4).ne.'bias') then1767 if (event_norm(1:4).ne.'bias') then
1750 do i=1,icontr1768 do i=1,icontr
@@ -1993,11 +2011,11 @@
1993c wgts() array to include the weights.2011c wgts() array to include the weights.
1994 use weight_lines2012 use weight_lines
1995 use extra_weights2013 use extra_weights
2014 use FKSParams
1996 implicit none2015 implicit none
1997 include 'nexternal.inc'2016 include 'nexternal.inc'
1998 include 'run.inc'2017 include 'run.inc'
1999 include 'timing_variables.inc'2018 include 'timing_variables.inc'
2000 include 'FKSParams.inc'
2001 include 'genps.inc'2019 include 'genps.inc'
2002 integer i,kr,kf,iwgt_save,dd2020 integer i,kr,kf,iwgt_save,dd
2003 double precision xlum(maxscales),dlum,pi,mu2_r(maxscales),c_mu2_r2021 double precision xlum(maxscales),dlum,pi,mu2_r(maxscales),c_mu2_r
@@ -2076,11 +2094,11 @@
2076c computations (ickkw.eq.-1).2094c computations (ickkw.eq.-1).
2077 use weight_lines2095 use weight_lines
2078 use extra_weights2096 use extra_weights
2097 use FKSParams
2079 implicit none2098 implicit none
2080 include 'nexternal.inc'2099 include 'nexternal.inc'
2081 include 'run.inc'2100 include 'run.inc'
2082 include 'timing_variables.inc'2101 include 'timing_variables.inc'
2083 include 'FKSParams.inc'
2084 include 'genps.inc'2102 include 'genps.inc'
2085 integer i,ks,kh,iwgt_save2103 integer i,ks,kh,iwgt_save
2086 double precision xlum(maxscales),dlum,pi,mu2_r(maxscales)2104 double precision xlum(maxscales),dlum,pi,mu2_r(maxscales)
@@ -2182,11 +2200,11 @@
2182c wgts() array to include the weights.2200c wgts() array to include the weights.
2183 use weight_lines2201 use weight_lines
2184 use extra_weights2202 use extra_weights
2203 use FKSParams
2185 implicit none2204 implicit none
2186 include 'nexternal.inc'2205 include 'nexternal.inc'
2187 include 'run.inc'2206 include 'run.inc'
2188 include 'timing_variables.inc'2207 include 'timing_variables.inc'
2189 include 'FKSParams.inc'
2190 include 'genps.inc'2208 include 'genps.inc'
2191 integer n,izero,i,nn2209 integer n,izero,i,nn
2192 parameter (izero=0)2210 parameter (izero=0)
@@ -2569,15 +2587,12 @@
2569 subroutine fill_mint_function(f)2587 subroutine fill_mint_function(f)
2570c Fills the function that is returned to the MINT integrator2588c Fills the function that is returned to the MINT integrator
2571 use weight_lines2589 use weight_lines
2590 use mint_module
2572 implicit none2591 implicit none
2573 include 'nexternal.inc'2592 include 'nexternal.inc'
2574 include 'mint.inc'
2575 include 'orders.inc'2593 include 'orders.inc'
2576 integer i,iamp,ithree,isix2594 integer i,iamp,ithree,isix
2577 double precision f(nintegrals),sigint2595 double precision f(nintegrals),sigint
2578 double precision virt_wgt_mint(0:n_ave_virt),
2579 & born_wgt_mint(0:n_ave_virt)
2580 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
2581 double precision virtual_over_born2596 double precision virtual_over_born
2582 common /c_vob/ virtual_over_born2597 common /c_vob/ virtual_over_born
2583 sigint=0d02598 sigint=0d0
@@ -2674,6 +2689,7 @@
2674c configuration, while for the S-events also contributions from the2689c configuration, while for the S-events also contributions from the
2675c various FKS configurations can be summed together.2690c various FKS configurations can be summed together.
2676 use weight_lines2691 use weight_lines
2692 use mint_module
2677 implicit none2693 implicit none
2678 include 'nexternal.inc'2694 include 'nexternal.inc'
2679 include 'genps.inc'2695 include 'genps.inc'
@@ -2686,9 +2702,6 @@
2686 integer iproc_save(fks_configs),eto(maxproc,fks_configs),2702 integer iproc_save(fks_configs),eto(maxproc,fks_configs),
2687 & etoi(maxproc,fks_configs),maxproc_found2703 & etoi(maxproc,fks_configs),maxproc_found
2688 common/cproc_combination/iproc_save,eto,etoi,maxproc_found2704 common/cproc_combination/iproc_save,eto,etoi,maxproc_found
2689 logical only_virt
2690 integer imode
2691 common /c_imode/imode,only_virt
2692 call cpu_time(tBefore)2705 call cpu_time(tBefore)
2693 if (icontr.eq.0) return2706 if (icontr.eq.0) return
2694c Find the contribution to sum all the S-event ones. This should be one2707c Find the contribution to sum all the S-event ones. This should be one
@@ -2835,21 +2848,15 @@
2835c Fills the function that is returned to the MINT integrator. Depending2848c Fills the function that is returned to the MINT integrator. Depending
2836c on the imode we should or should not include the virtual corrections.2849c on the imode we should or should not include the virtual corrections.
2837 use weight_lines2850 use weight_lines
2851 use mint_module
2838 implicit none2852 implicit none
2839 include 'nexternal.inc'2853 include 'nexternal.inc'
2840 include 'mint.inc'
2841 include 'orders.inc'2854 include 'orders.inc'
2842 integer i,j,ict,iamp,ithree,isix2855 integer i,j,ict,iamp,ithree,isix
2843 double precision f(nintegrals),sigint,sigint1,sigint_ABS2856 double precision f(nintegrals),sigint,sigint1,sigint_ABS
2844 $ ,n1body_wgt,tmp_wgt,max_weight2857 $ ,n1body_wgt,tmp_wgt,max_weight
2845 double precision virt_wgt_mint(0:n_ave_virt),
2846 & born_wgt_mint(0:n_ave_virt)
2847 common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint
2848 double precision virtual_over_born2858 double precision virtual_over_born
2849 common /c_vob/ virtual_over_born2859 common /c_vob/ virtual_over_born
2850 logical only_virt
2851 integer imode
2852 common /c_imode/imode,only_virt
2853 sigint=0d02860 sigint=0d0
2854 sigint1=0d02861 sigint1=0d0
2855 sigint_ABS=0d02862 sigint_ABS=0d0
@@ -3621,10 +3628,12 @@
3621 & pjet,njet,jet)3628 & pjet,njet,jet)
3622 do i=1,NN3629 do i=1,NN
3623 di(i)=sqrt(amcatnlo_fastjetdmergemax(i-1))3630 di(i)=sqrt(amcatnlo_fastjetdmergemax(i-1))
3624 if (i.gt.1.and.di(i).gt.di(i-1))then3631 if (i.gt.1)then
3625 write(*,*)'Error in set_shower_scale_noshape'3632 if(di(i).gt.di(i-1))then
3626 write(*,*)NN,i,di(i),di(i-1)3633 write(*,*)'Error in set_shower_scale_noshape'
3627 stop3634 write(*,*)NN,i,di(i),di(i-1)
3635 stop
3636 endif
3628 endif3637 endif
3629 enddo3638 enddo
3630 if(iSH.eq.1)shower_S_scale(iFKS)=di(NN)3639 if(iSH.eq.1)shower_S_scale(iFKS)=di(NN)
@@ -5470,6 +5479,7 @@
54705479
5471 subroutine bornsoftvirtual(p,bsv_wgt,virt_wgt,born_wgt)5480 subroutine bornsoftvirtual(p,bsv_wgt,virt_wgt,born_wgt)
5472 use extra_weights5481 use extra_weights
5482 use mint_module
5473 implicit none5483 implicit none
5474 include "genps.inc"5484 include "genps.inc"
5475 include 'nexternal.inc'5485 include 'nexternal.inc'
@@ -5483,7 +5493,6 @@
5483 common /c_charges/particle_charge5493 common /c_charges/particle_charge
5484 include "run.inc"5494 include "run.inc"
5485 include "fks_powers.inc"5495 include "fks_powers.inc"
5486 include "mint.inc"
5487 double precision p(0:3,nexternal),bsv_wgt,born_wgt,avv_wgt5496 double precision p(0:3,nexternal),bsv_wgt,born_wgt,avv_wgt
5488 double precision pp(0:3,nexternal)5497 double precision pp(0:3,nexternal)
5489 5498
@@ -5542,9 +5551,6 @@
5542 integer iminmax5551 integer iminmax
5543 common/cExceptPSpoint/iminmax,ExceptPSpoint5552 common/cExceptPSpoint/iminmax,ExceptPSpoint
55445553
5545 double precision average_virtual(0:n_ave_virt,maxchannels)
5546 $ ,virtual_fraction(maxchannels)
5547 common/c_avg_virt/average_virtual,virtual_fraction
5548 double precision virtual_over_born5554 double precision virtual_over_born
5549 common/c_vob/virtual_over_born5555 common/c_vob/virtual_over_born
55505556
@@ -5871,12 +5877,22 @@
5871 tOLP=tOLP+(tAfter-tBefore)5877 tOLP=tOLP+(tAfter-tBefore)
5872 virtual_over_born=virt_wgt/born_wgt5878 virtual_over_born=virt_wgt/born_wgt
5873 if (ickkw.ne.-1) then5879 if (ickkw.ne.-1) then
5874 virt_wgt=virt_wgt-average_virtual(0,ichan)*born_wgt5880 if (use_poly_virtual) then
5881 virt_wgt=virt_wgt-polyfit(0)*born_wgt
5882 else
5883 virt_wgt=virt_wgt-average_virtual(0,ichan)*born_wgt
5884 endif
5875 do iamp=1,amp_split_size5885 do iamp=1,amp_split_size
5876 if (amp_split_virt(iamp).eq.0d0) cycle5886 if (amp_split_virt(iamp).eq.0d0) cycle
5887 if (use_poly_virtual) then
5888 amp_split_virt(iamp)=amp_split_virt(iamp)-
5889 $ polyfit(iamp)
5890 $ *amp_split_born_for_virt(iamp)
5891 else
5877 amp_split_virt(iamp)=amp_split_virt(iamp)-5892 amp_split_virt(iamp)=amp_split_virt(iamp)-
5878 $ average_virtual(iamp,ichan)5893 $ average_virtual(iamp,ichan)
5879 $ *amp_split_born_for_virt(iamp)5894 $ *amp_split_born_for_virt(iamp)
5895 endif
5880 enddo5896 enddo
5881 endif5897 endif
5882 if (abrv.ne.'virt') then5898 if (abrv.ne.'virt') then
@@ -5896,12 +5912,21 @@
5896 $ amp_split_virt_save(1:amp_split_size)5912 $ amp_split_virt_save(1:amp_split_size)
5897 endif5913 endif
5898 if (abrv(1:4).ne.'virt' .and. ickkw.ne.-1) then5914 if (abrv(1:4).ne.'virt' .and. ickkw.ne.-1) then
5899 avv_wgt=average_virtual(0,ichan)*born_wgt5915 if (use_poly_virtual) then
5900 do iamp=1, amp_split_size5916 avv_wgt=polyfit(0)*born_wgt
5901 if (amp_split_born_for_virt(iamp).eq.0d0) cycle5917 do iamp=1, amp_split_size
5902 amp_split_avv(iamp)= average_virtual(iamp,ichan)5918 if (amp_split_born_for_virt(iamp).eq.0d0) cycle
5903 $ *amp_split_born_for_virt(iamp)5919 amp_split_avv(iamp)= polyfit(iamp)
5904 enddo5920 $ *amp_split_born_for_virt(iamp)
5921 enddo
5922 else
5923 avv_wgt=average_virtual(0,ichan)*born_wgt
5924 do iamp=1, amp_split_size
5925 if (amp_split_born_for_virt(iamp).eq.0d0) cycle
5926 amp_split_avv(iamp)= average_virtual(iamp,ichan)
5927 $ *amp_split_born_for_virt(iamp)
5928 enddo
5929 endif
5905 endif5930 endif
59065931
5907c eq.(MadFKS.C.13)5932c eq.(MadFKS.C.13)
@@ -6512,9 +6537,8 @@
6512 subroutine setfksfactor(match_to_shower)6537 subroutine setfksfactor(match_to_shower)
6513 use weight_lines6538 use weight_lines
6514 use extra_weights6539 use extra_weights
6540 use mint_module
6515 implicit none6541 implicit none
6516
6517 include 'mint.inc'
6518 6542
6519 double precision CA,CF, PI6543 double precision CA,CF, PI
6520 parameter (CA=3d0,CF=4d0/3d0)6544 parameter (CA=3d0,CF=4d0/3d0)
@@ -6529,7 +6553,7 @@
6529 logical softtest,colltest6553 logical softtest,colltest
6530 common/sctests/softtest,colltest6554 common/sctests/softtest,colltest
65316555
6532 integer config_fks,i,j,fac1,fac26556 integer config_fks,i,j,fac1,fac2,kchan
6533 logical match_to_shower6557 logical match_to_shower
65346558
6535 double precision fkssymmetryfactor,fkssymmetryfactorBorn,6559 double precision fkssymmetryfactor,fkssymmetryfactorBorn,
@@ -6917,11 +6941,11 @@
6917c the grandmother corresponds (igranny) as well as the aunt (iaunt).6941c the grandmother corresponds (igranny) as well as the aunt (iaunt).
6918c This information can be used to improve the phase-space6942c This information can be used to improve the phase-space
6919c parametrisation.6943c parametrisation.
6944 use mint_module
6920 implicit none6945 implicit none
6921 include 'genps.inc'6946 include 'genps.inc'
6922 include 'nexternal.inc'6947 include 'nexternal.inc'
6923 include 'nFKSconfigs.inc'6948 include 'nFKSconfigs.inc'
6924 include 'mint.inc'
6925c arguments6949c arguments
6926 integer nFKSprocess,iconf6950 integer nFKSprocess,iconf
6927 double precision mass_min(-nexternal:nexternal)6951 double precision mass_min(-nexternal:nexternal)
@@ -7110,3 +7134,21 @@
7110 endif7134 endif
7111 return7135 return
7112 end7136 end
7137
7138
7139 function ran2()
7140! Wrapper for the random numbers; needed for the NLO stuff
7141 use mint_module
7142 implicit none
7143 double precision ran2,x,a,b
7144 integer ii,jconfig
7145 a=0d0 ! min allowed value for x
7146 b=1d0 ! max allowed value for x
7147 ii=0 ! dummy argument of ntuple
7148 jconfig=iconfig ! integration channel (for off-set)
7149 call ntuple(x,a,b,ii,jconfig)
7150 ran2=x
7151 return
7152 end
7153
7154
71137155
=== removed file 'Template/NLO/SubProcesses/fks_singular_paolo.f'
=== modified file 'Template/NLO/SubProcesses/genps_fks.f'
--- Template/NLO/SubProcesses/genps_fks.f 2018-07-13 10:16:34 +0000
+++ Template/NLO/SubProcesses/genps_fks.f 2020-05-23 19:29:41 +0000
@@ -95,8 +95,8 @@
95 double precision p(0:3,nexternal)95 double precision p(0:3,nexternal)
96 integer itree(2,-max_branch:-1),iconf96 integer itree(2,-max_branch:-1),iconf
97 common /to_itree/itree,iconf97 common /to_itree/itree,iconf
98 integer ndim98 integer nndim
99 common/tosigint/ndim99 common/tosigint/nndim
100 double precision qmass_common(-nexternal:0),qwidth_common(100 double precision qmass_common(-nexternal:0),qwidth_common(
101 & -nexternal:0)101 & -nexternal:0)
102 common /c_qmass_qwidth/qmass_common,qwidth_common102 common /c_qmass_qwidth/qmass_common,qwidth_common
@@ -110,7 +110,7 @@
110 virtgranny=0d0110 virtgranny=0d0
111 return111 return
112 endif112 endif
113 call generate_momenta_conf(.true.,ndim,jac,xvar,granny_m2_red113 call generate_momenta_conf(.true.,nndim,jac,xvar,granny_m2_red
114 & ,rat_xi_orig,itree,qmass_common,qwidth_common,p)114 & ,rat_xi_orig,itree,qmass_common,qwidth_common,p)
115 if (jac.gt.0d0) then115 if (jac.gt.0d0) then
116 do j=0,3116 do j=0,3
@@ -152,8 +152,8 @@
152 double precision p(0:3,nexternal)152 double precision p(0:3,nexternal)
153 integer itree(2,-max_branch:-1),iconf153 integer itree(2,-max_branch:-1),iconf
154 common /to_itree/itree,iconf154 common /to_itree/itree,iconf
155 integer ndim155 integer nndim
156 common/tosigint/ndim156 common/tosigint/nndim
157 double precision qmass_common(-nexternal:0),qwidth_common(157 double precision qmass_common(-nexternal:0),qwidth_common(
158 & -nexternal:0)158 & -nexternal:0)
159 common /c_qmass_qwidth/qmass_common,qwidth_common159 common /c_qmass_qwidth/qmass_common,qwidth_common
@@ -177,7 +177,7 @@
177 virtgranny_red=0d0177 virtgranny_red=0d0
178 return178 return
179 endif179 endif
180 call generate_momenta_conf(.true.,ndim,jac,xvar,granny_m2_red180 call generate_momenta_conf(.true.,nndim,jac,xvar,granny_m2_red
181 & ,rat_xi_orig,itree,qmass_common,qwidth_common,p)181 & ,rat_xi_orig,itree,qmass_common,qwidth_common,p)
182 if (jac.gt.0d0) then182 if (jac.gt.0d0) then
183 do j=1,3183 do j=1,3
@@ -282,13 +282,14 @@
282282
283283
284 284
285 subroutine generate_momenta_conf_wrapper(ndim,jac,x,itree,qmass285 subroutine generate_momenta_conf_wrapper(nndim,jac,x,itree,qmass
286 $ ,qwidth,p)286 $ ,qwidth,p)
287 use mint_module
287 implicit none288 implicit none
288 include 'nexternal.inc'289 include 'nexternal.inc'
289 include 'genps.inc'290 include 'genps.inc'
290 include 'nFKSconfigs.inc'291 include 'nFKSconfigs.inc'
291 integer ndim292 integer nndim
292 double precision jac,x(99),p(0:3,nexternal)293 double precision jac,x(99),p(0:3,nexternal)
293 integer itree(2,-max_branch:-1),i,j294 integer itree(2,-max_branch:-1),i,j
294 double precision qmass(-nexternal:0),qwidth(-nexternal:0),del1295 double precision qmass(-nexternal:0),qwidth(-nexternal:0),del1
@@ -367,8 +368,6 @@
367 common /to_abrv/ abrv368 common /to_abrv/ abrv
368 character*10 shower_mc369 character*10 shower_mc
369 common /cMonteCarloType/shower_mc370 common /cMonteCarloType/shower_mc
370 logical fixed_order,nlo_ps
371 common /c_fnlo_nlops/fixed_order,nlo_ps
372c371c
373 write_granny(nFKSprocess)=.true.372 write_granny(nFKSprocess)=.true.
374 which_is_granny(nFKSprocess)=0373 which_is_granny(nFKSprocess)=0
@@ -405,7 +404,7 @@
405 only_event_phsp=.true.404 only_event_phsp=.true.
406 skip_event_phsp=.false.405 skip_event_phsp=.false.
407 input_granny_m2=.false.406 input_granny_m2=.false.
408 call generate_momenta_conf(input_granny_m2,ndim,jac,x407 call generate_momenta_conf(input_granny_m2,nndim,jac,x
409 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)408 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
410 if (nint(jac).eq.-222) return ! numerical inaccuracy: not409 if (nint(jac).eq.-222) return ! numerical inaccuracy: not
411 ! even Born momenta generated.410 ! even Born momenta generated.
@@ -540,7 +539,7 @@
540c a shower scale. The kinematics won't be used, because below jac=-222539c a shower scale. The kinematics won't be used, because below jac=-222
541c and p(0,1)=-99d0.540c and p(0,1)=-99d0.
542 skip_event_phsp=.false. 541 skip_event_phsp=.false.
543 call generate_momenta_conf(input_granny_m2,ndim,jac,x542 call generate_momenta_conf(input_granny_m2,nndim,jac,x
544 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)543 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
545 jac=-222544 jac=-222
546 p(0,1)=-99d0545 p(0,1)=-99d0
@@ -554,7 +553,7 @@
554 do i=-1,1553 do i=-1,1
555 granny_m2_red(i)=-99d99554 granny_m2_red(i)=-99d99
556 enddo555 enddo
557 call generate_momenta_conf(input_granny_m2,ndim,jac,x556 call generate_momenta_conf(input_granny_m2,nndim,jac,x
558 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)557 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
559c In this case, we should not write the grandmother in the event file,558c In this case, we should not write the grandmother in the event file,
560c because the shower should not keep its inv. mass fixed.559c because the shower should not keep its inv. mass fixed.
@@ -592,7 +591,7 @@
592 skip_event_phsp=.false.591 skip_event_phsp=.false.
593 only_event_phsp=.true.592 only_event_phsp=.true.
594 granny_m2_red(0)=xmbe2inv593 granny_m2_red(0)=xmbe2inv
595 call generate_momenta_conf(input_granny_m2,ndim,jac,x594 call generate_momenta_conf(input_granny_m2,nndim,jac,x
596 $ ,granny_m2_red,rat_xi_orig,itree,qmass,qwidth,p)595 $ ,granny_m2_red,rat_xi_orig,itree,qmass,qwidth,p)
597c multiply event jacobian by the numerically computed jacobian for the596c multiply event jacobian by the numerically computed jacobian for the
598c derivative597c derivative
@@ -602,7 +601,7 @@
602 input_granny_m2=.false.601 input_granny_m2=.false.
603 only_event_phsp=.false.602 only_event_phsp=.false.
604 skip_event_phsp=.true.603 skip_event_phsp=.true.
605 call generate_momenta_conf(input_granny_m2,ndim,jac,x604 call generate_momenta_conf(input_granny_m2,nndim,jac,x
606 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)605 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
607 endif606 endif
608 jac=jac*MC_sum_factor607 jac=jac*MC_sum_factor
@@ -610,7 +609,7 @@
610 skip_event_phsp=.false.609 skip_event_phsp=.false.
611 only_event_phsp =.false.610 only_event_phsp =.false.
612 input_granny_m2=.false.611 input_granny_m2=.false.
613 call generate_momenta_conf(input_granny_m2,ndim,jac,x612 call generate_momenta_conf(input_granny_m2,nndim,jac,x
614 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)613 $ ,granny_m2_red,rat_xi,itree,qmass,qwidth,p)
615 endif614 endif
616 end615 end
@@ -701,9 +700,6 @@
701c Masses of particles. Should be filled in setcuts.f700c Masses of particles. Should be filled in setcuts.f
702 double precision pmass(nexternal)701 double precision pmass(nexternal)
703 common /to_mass/pmass702 common /to_mass/pmass
704c For MINT:
705 integer ifold_energy,ifold_phi,ifold_yij
706 common /cifoldnumbers/ifold_energy,ifold_phi,ifold_yij
707c local703c local
708 integer i,j,nbranch,ns_channel,nt_channel,ionebody704 integer i,j,nbranch,ns_channel,nt_channel,ionebody
709 & ,fksconfiguration,icountevts,imother,ixEi,ixyij,ixpi,isolsign705 & ,fksconfiguration,icountevts,imother,ixEi,ixyij,ixpi,isolsign
@@ -1000,14 +996,10 @@
1000 if (.not.only_event_phsp) xij_aor=(0.d0,0.d0)996 if (.not.only_event_phsp) xij_aor=(0.d0,0.d0)
1001c997c
1002c These will correspond to the vegas x's for the FKS variables xi_i,998c These will correspond to the vegas x's for the FKS variables xi_i,
1003c y_ij and phi_i999c y_ij and phi_i (changing this also requires changing folding parameters)
1004 ixEi=ndim-21000 ixEi=ndim-2
1005 ixyij=ndim-11001 ixyij=ndim-1
1006 ixpi=ndim1002 ixpi=ndim
1007c Set up the MINT folding:
1008 ifold_energy=ixEi
1009 ifold_phi=ixpi
1010 ifold_yij=ixyij
1011c1003c
1012 imother=min(j_fks,i_fks)1004 imother=min(j_fks,i_fks)
1013 m_j_fks=pmass(j_fks)1005 m_j_fks=pmass(j_fks)
@@ -2147,6 +2139,7 @@
2147 xp(3,2)=-xp(0,2)2139 xp(3,2)=-xp(0,2)
2148c2140c
2149 xp(0,i_fks)=E_i_fks*(chy_lbst-shy_lbst*yijdir)2141 xp(0,i_fks)=E_i_fks*(chy_lbst-shy_lbst*yijdir)
2142 p_i_fks(0)=p_i_fks(0)*(chy_lbst-shy_lbst*yijdir)
2150 xpifksred(1)=sinth_i_fks*cosphi_i_fks 2143 xpifksred(1)=sinth_i_fks*cosphi_i_fks
2151 xpifksred(2)=sinth_i_fks*sinphi_i_fks 2144 xpifksred(2)=sinth_i_fks*sinphi_i_fks
2152 xpifksred(3)=chy_lbst*yijdir-shy_lbst2145 xpifksred(3)=chy_lbst*yijdir-shy_lbst
21532146
=== modified file 'Template/NLO/SubProcesses/handling_lhe_events.f'
--- Template/NLO/SubProcesses/handling_lhe_events.f 2017-06-15 19:31:40 +0000
+++ Template/NLO/SubProcesses/handling_lhe_events.f 2020-05-23 19:29:41 +0000
@@ -602,7 +602,7 @@
602 endif602 endif
603 write(ifile,'(a)')603 write(ifile,'(a)')
604 # ' </init>'604 # ' </init>'
605 501 format(2(1x,i6),2(1x,e14.8),2(1x,i2),2(1x,i6),1x,i2,1x,i3)605 501 format(2(1x,i6),2(1x,e14.8),2(1x,i2),2(1x,i8),1x,i2,1x,i3)
606 502 format(3(1x,e14.8),1x,i6)606 502 format(3(1x,e14.8),1x,i6)
607c607c
608 return608 return
@@ -665,8 +665,10 @@
665c if event_id is zero or positive (that means that there was a call665c if event_id is zero or positive (that means that there was a call
666c to write_lhef_header_banner) update it and write it666c to write_lhef_header_banner) update it and write it
667c RF: don't use the event_id:667c RF: don't use the event_id:
668 logical do_rwgt
668 event_id = -99669 event_id = -99
669c670c
671 do_rwgt = do_rwgt_scale .or. do_rwgt_pdf .or. store_rwgt_info
670 if (event_id.ge.0) then672 if (event_id.ge.0) then
671 event_id=event_id+1673 event_id=event_id+1
672 if (event_id.le.9) then674 if (event_id.le.9) then
@@ -720,7 +722,7 @@
720 # PUP(1,I),PUP(2,I),PUP(3,I),PUP(4,I),PUP(5,I),722 # PUP(1,I),PUP(2,I),PUP(3,I),PUP(4,I),PUP(5,I),
721 # VTIMUP(I),SPINUP(I)723 # VTIMUP(I),SPINUP(I)
722 enddo724 enddo
723 if(buff(1:1).eq.'#' .and. (do_rwgt_scale .or. do_rwgt_pdf .or.725 if(buff(1:1).eq.'#' .and. (do_rwgt .or.
724 & jwgtinfo.lt.0)) then726 & jwgtinfo.lt.0)) then
725 write(ifile,'(a)') buff(1:len_trim(buff))727 write(ifile,'(a)') buff(1:len_trim(buff))
726 read(buff,*)ch1,iSorH_lhe,ifks_lhe,jfks_lhe,728 read(buff,*)ch1,iSorH_lhe,ifks_lhe,jfks_lhe,
727729
=== modified file 'Template/NLO/SubProcesses/madfks_plot.f'
--- Template/NLO/SubProcesses/madfks_plot.f 2017-07-31 08:48:20 +0000
+++ Template/NLO/SubProcesses/madfks_plot.f 2020-05-23 19:29:41 +0000
@@ -148,14 +148,11 @@
148148
149 subroutine topout149 subroutine topout
150 use extra_weights150 use extra_weights
151 use mint_module
151 implicit none152 implicit none
152 include "nexternal.inc"153 include "nexternal.inc"
153 include 'run.inc'154 include 'run.inc'
154 integer ii,jj,n,kk,nn155 integer ii,jj,n,kk,nn
155 logical usexinteg,mint
156 common/cusexinteg/usexinteg,mint
157 integer itmax,ncall
158 common/citmax/itmax,ncall
159 logical useitmax156 logical useitmax
160 common/cuseitmax/useitmax157 common/cuseitmax/useitmax
161 real*8 xnorm158 real*8 xnorm
@@ -166,16 +163,10 @@
166 common /for_applgrid/ iappl163 common /for_applgrid/ iappl
167 include "appl_common.inc"164 include "appl_common.inc"
168c165c
169 if(usexinteg.and..not.mint) then166 xnorm=1.d0/float(ncalls0)
170 xnorm=1.d0/float(itmax)
171 elseif(mint) then
172 xnorm=1.d0/float(ncall)
173 else
174 xnorm=1d0
175 endif
176 if(useitmax)xnorm=xnorm/float(itmax)167 if(useitmax)xnorm=xnorm/float(itmax)
177c Normalization factor for the APPLgrid grids168c Normalization factor for the APPLgrid grids
178 if(iappl.ne.0) appl_norm_histo = 1d0 / dble(ncall*itmax)169 if(iappl.ne.0) appl_norm_histo = 1d0 / dble(ncalls0*itmax)
179 call analysis_end(xnorm)170 call analysis_end(xnorm)
180c Write the accumulated results to a file171c Write the accumulated results to a file
181 open (unit=34,file='scale_pdf_dependence.dat',status='unknown')172 open (unit=34,file='scale_pdf_dependence.dat',status='unknown')
182173
=== modified file 'Template/NLO/SubProcesses/makefile_fks_dir'
--- Template/NLO/SubProcesses/makefile_fks_dir 2017-09-28 15:13:09 +0000
+++ Template/NLO/SubProcesses/makefile_fks_dir 2020-05-23 19:29:41 +0000
@@ -25,42 +25,37 @@
25$(LIBDIR)libpdf.a $(LIBDIR)libcernlib.a25$(LIBDIR)libpdf.a $(LIBDIR)libcernlib.a
2626
27# Files for all executables27# Files for all executables
28FILES= $(patsubst %.f,%.o,$(wildcard parton_lum_*.f)) \28FILES= $(patsubst %.f,%.o,$(wildcard parton_lum_*.f)) $(patsubst \
29 $(patsubst %.f,%.o,$(wildcard matrix_*.f)) \29 %.f,%.o,$(wildcard matrix_*.f)) FKSParams.o real_me_chooser.o \
30 real_me_chooser.o chooser_functions.o \30 chooser_functions.o genps_fks.o setcuts.o setscales.o \
31 genps_fks.o setcuts.o setscales.o veto_xsec.o \31 veto_xsec.o $(patsubst %.f,%.o,$(wildcard b_sf_???.f)) \
32 $(patsubst %.f,%.o,$(wildcard b_sf_???.f)) \32 born.o sborn_sf.o extra_cnt_wrapper.o $(patsubst \
33 born.o sborn_sf.o extra_cnt_wrapper.o \33 %.f,%.o,$(wildcard born_cnt_*.f)) fks_Sij.o \
34 $(patsubst %.f,%.o,$(wildcard born_cnt_*.f)) \34 $(fastjetfortran_madfks) fks_singular.o montecarlocounter.o \
35 fks_Sij.o $(fastjetfortran_madfks) fks_singular.o \35 reweight_xsec.o boostwdir2.o initcluster.o cluster.o \
36 montecarlocounter.o reweight_xsec.o boostwdir2.o \36 splitorders_stuff.o reweight.o get_color.o \
37 initcluster.o cluster.o splitorders_stuff.o \37 iproc_map.o MC_integer.o $(reweight_xsec_events_pdf_dummy) \
38 reweight.o get_color.o FKSParamReader.o iproc_map.o \38 $(applgrid_interface) weight_lines.o mint_module.o polfit.o
39 MC_integer.o $(reweight_xsec_events_pdf_dummy) \
40 $(applgrid_interface) weight_lines.o
4139
42# Files needed for mintFO & mintMC40# Files needed for mintFO & mintMC
43RUN= $(FO_ANALYSE) $(FILES) cuts.o pythia_unlops.o recluster.o \41RUN= $(FO_ANALYSE) $(FILES) cuts.o pythia_unlops.o recluster.o \
44 fill_MC_mshell.o born_hel.o open_output_files.o \42 fill_MC_mshell.o born_hel.o open_output_files.o \
45 add_write_info.o BinothLHA.o madfks_plot.o43 add_write_info.o madfks_plot.o
4644
47# Files for mintFO45# Files for mintFO
48MINTFO= $(RUN) driver_mintFO.o mint-integrator2.o handling_lhe_events.o46MINTFO= $(RUN) driver_mintFO.o handling_lhe_events.o BinothLHA.o
4947
50# Files for mintMC48# Files for mintMC
51MINTMC= $(RUN) mint-integrator2.o driver_mintMC.o write_event.o \49MINTMC= $(RUN) driver_mintMC.o handling_lhe_events.o write_event.o BinothLHA.o
52 handling_lhe_events.o
5350
54# Files for check_poles51# Files for check_poles
55POLES= $(FILES) cuts.o pythia_unlops.o recluster.o check_poles.o \52POLES= $(RUN) check_poles.o BinothLHA.o
56 BinothLHA.o born_hel.o
5753
58# Files for tests54# Files for tests
59TEST= $(FILES) test_soft_col_limits.o BinothLHADummy.o cuts.o \55TEST= $(RUN) test_soft_col_limits.o BinothLHADummy.o
60 pythia_unlops.o recluster.o
6156
62# Files for gensym57# Files for gensym
63SYM= $(FILES) BinothLHADummy.o symmetry_fks_v3.o write_ajob.o58SYM= $(RUN) BinothLHADummy.o symmetry_fks_v3.o write_ajob.o
6459
65# Files for event reweighting to get e.g. scale and PDF uncertainties60# Files for event reweighting to get e.g. scale and PDF uncertainties
66RWGFILES=reweight_xsec_events.o handling_lhe_events.o \61RWGFILES=reweight_xsec_events.o handling_lhe_events.o \
@@ -73,6 +68,8 @@
7368
74%.o: %.f69%.o: %.f
75 $(FC) $(FFLAGS) -c -I. -I$(LIBDIR) $<70 $(FC) $(FFLAGS) -c -I. -I$(LIBDIR) $<
71%.o: %.f90
72 $(FC) $(FFLAGS) -c -I. -I$(LIBDIR) $<
76%.o: $(ANADIR)/%.f73%.o: $(ANADIR)/%.f
77 $(FC) $(FFLAGS) -c -I. -I$(ANADIR) $(FO_INCLUDEPATHS) $<74 $(FC) $(FFLAGS) -c -I. -I$(ANADIR) $(FO_INCLUDEPATHS) $<
78%.o: %.for75%.o: %.for
@@ -121,9 +118,13 @@
121 for dir in `ls -d V*`; do cd $$dir; make; cd ../; done118 for dir in `ls -d V*`; do cd $$dir; make; cd ../; done
122119
123reweight_xsec_events.o: weight_lines.o120reweight_xsec_events.o: weight_lines.o
124fks_singular.o: weight_lines.o121fks_singular.o: weight_lines.o mint_module.o
125driver_mintMC.o: weight_lines.o122driver_mintMC.o: weight_lines.o mint_module.o
126driver_mintFO.o: weight_lines.o123driver_mintFO.o: weight_lines.o mint_module.o
124setcuts.o: mint_module.o
125genps_fks.o: mint_module.o
126symmetry_fks_v3.o: mint_module.o
127test_soft_col_limits.o: mint_module.o
127128
128clean:129clean:
129 @rm -f *.o write_ajob_basic reweight_xsec_events madevent_* check_poles\130 @rm -f *.o write_ajob_basic reweight_xsec_events madevent_* check_poles\
130131
=== removed file 'Template/NLO/SubProcesses/mint-integrator2.f'
=== removed file 'Template/NLO/SubProcesses/mint.inc'
=== added file 'Template/NLO/SubProcesses/mint_module.f90'
--- Template/NLO/SubProcesses/mint_module.f90 1970-01-01 00:00:00 +0000
+++ Template/NLO/SubProcesses/mint_module.f90 2020-05-23 19:29:41 +0000
@@ -0,0 +1,1705 @@
1!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
2! MINT Integrator Package
3!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4! Original version by Paolo Nason (for POWHEG (BOX))
5! Modified by Rikkert Frederix (for MadGraph5_aMC@NLO)
6!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
7! subroutine mint(fun,ndim,ncalls0,itmax,imode,
8! ndim=number of dimensions
9! ncalls0=# of calls per iteration
10! itmax =# of iterations
11! fun(xx,www,ifirst): returns the function to be integrated multiplied by www;
12! xx(1:ndim) are the variables of integration
13! ifirst=0: normal behaviour
14! imode: integer flag
15!
16! imode=-1:
17! same as imode=0 as far as this routine is concerned, except for the
18! fact that a grid is read at the beginning (rather than initialized).
19! The return value of imode will be zero.
20!
21! imode=0:
22! When called with imode=0 the routine integrates the absolute value of
23! the function and sets up a grid xgrid(0:50,ndim) such that in each
24! ndim-1 dimensional slice (i.e. xgrid(m-1,n)<xx(n)<xgrid(m,n)) the
25! contribution of the integral is the same the array xgrid is setup at
26! this stage; ans and err are the integral and its error
27!
28! imode=1 (in fact #0)
29! When called with imode=1, the routine performs the integral of the
30! function fun using the grid xgrid. If some number in the array ifold,
31! (say, ifold(n)) is different from 1, it must be a divisor of 50, and
32! the 50 intervals xgrid(0:50,n) are grouped into ifold(n) groups, each
33! group containing 50/ifold(n) nearby intervals. For example, if
34! ifold(1)=5, the 50 intervals for the first dimension are divided in 5
35! groups of 10. The integral is then performed by folding on top of each
36! other these 5 groups. Suppose, for example, that we choose a random
37! point in xx(1) = xgrid(2,1)+x*(xgrid(3,1)-xgrid(2,1)), in the group of
38! the first 5 interval. we sum the contribution of this point to the
39! contributions of points
40! xgrid(2+m*10,1)+x*(xgrid(3+m*10,1)-xgrid(2+m*10,1)), with m=1,...,4.
41! In the sequence of calls to the function fun, the call for the first
42! point is performed with ifirst=0, and that for all subsequent points
43! with ifirst=1, so that the function can avoid to compute quantities
44! that only depend upon dimensions that have ifold=1, and do not change
45! in each group of folded call. The values returned by fun in a sequence
46! of folded calls with ifirst=0 and ifirst=1 are not used. The function
47! itself must accumulate the values, and must return them when called
48! with ifirst=2.
49!
50! Added the posibility to keep track of more than one integral:
51!
52! nintegrals=1 : the function that is used to update the grids. This is
53! the ABS cross section. If imode.eq.1, this does not contain the
54! virtual corrections because for them a separate maximum is kept using (5).
55! nintegrals=2 : the actual cross section. This includes virtual corrections.
56! nintegrals=3 : the cross section from the M_Virt/M_Born ratio alone:
57! this defines the average virtual that is added to each phase-space
58! point
59! nintegrals=4 : the cross section of the actual virtual minus the
60! average virtual. This is used to determine the fraction of phase-space
61! points for which we include the virtual.
62! nintegrals=5 : abs of 3
63! nintegrals=6 : born
64! nintegrals>6 : virtual and born order by order
65!
66
67module mint_module
68 use FKSParams ! contains use_poly_virtual
69 implicit none
70 integer, parameter, private :: nintervals=32 ! max number of intervals in the integration grids
71 integer, parameter, public :: ndimmax=60 ! max number of dimensions of the integral
72 integer, parameter, public :: n_ave_virt=10 ! max number of grids to set up to approx virtual
73 integer, parameter, public :: nintegrals=26 ! number of integrals to keep track of
74 integer, parameter, private :: nintervals_virt=8! max number of intervals in the grids for the approx virtual
75 integer, parameter, private :: min_inter=4 ! minimal number of intervals
76 integer, parameter, private :: min_it0=4 ! minimal number of iterations in the mint step 0 phase
77 integer, parameter, private :: min_it1=5 ! minimal number of iterations in the mint step 1 phase
78 integer, parameter, private :: max_points=100000! maximum number of points to trow per iteration if not enough non-zero points can be found.
79 integer, parameter, public :: maxchannels=20 ! set as least as large as in amcatnlo_run_interface
80 ! Note that the number of intervals in the integration grids, 'nintervals', cannot be arbitrarily large.
81 ! It should be equal to
82 ! nintervals = min_inter * 2^n,
83 ! where 'n' is an integer smaller than or equal to min(min_it0,min_it1).
84 !
85 ! The number of intergrals should be equal to
86 ! nintegrals=6+2*n_ave_virt
87 !
88
89! public variables
90 integer, public :: ncalls0,ndim,itmax,imode,n_ord_virt,nchans,iconfig,ichan,ifold_energy,ifold_yij,ifold_phi
91 integer, dimension(ndimmax), public :: ifold
92 integer, dimension(maxchannels), public :: iconfigs
93 double precision, public :: accuracy,min_virt_fraction_mint,wgt_mult
94 double precision, dimension(0:n_ave_virt,maxchannels), public :: average_virtual
95 double precision, dimension(0:n_ave_virt), public :: virt_wgt_mint,born_wgt_mint,polyfit
96 double precision, dimension(maxchannels), public :: virtual_fraction
97 double precision, dimension(nintegrals,0:maxchannels), public :: ans,unc
98 logical :: only_virt,new_point,pass_cuts_check
99
100! private variables
101 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: