Merge lp:~maddevelopers/mg5amcnlo/3.0.3 into lp:~maddevelopers/mg5amcnlo/3.0.1_4FS_merged3.0.2_latest

Proposed by marco zaro
Status: Merged
Merged at revision: 953
Proposed branch: lp:~maddevelopers/mg5amcnlo/3.0.3
Merge into: lp:~maddevelopers/mg5amcnlo/3.0.1_4FS_merged3.0.2_latest
Diff against target: 94598 lines (+86924/-3133) (has conflicts)
261 files modified
Template/NLO/SubProcesses/BinothLHA.f (+73/-2)
Template/NLO/SubProcesses/cuts.f (+1/-1)
Template/NLO/SubProcesses/fks_singular.f (+7157/-0)
Template/NLO/SubProcesses/splitorders_stuff.f (+329/-152)
UpdateNotes.txt (+59/-0)
VERSION (+5/-0)
madgraph/iolibs/export_v4.py (+16/-0)
madgraph/iolibs/files.py (+2/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_001.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_002.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_003.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_004.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_005.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_006.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_007.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_008.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f (+346/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%sborn_sf.f (+81/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_001.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_002.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_003.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_004.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_005.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_006.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_007.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_008.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f (+349/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%sborn_sf.f (+81/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f (+349/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%sborn_sf.f (+81/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_001.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_002.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_003.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_004.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_005.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_006.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_007.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_008.f (+88/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f (+346/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_1.f (+287/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_2.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_3.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_4.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_5.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%sborn_sf.f (+81/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_001.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_002.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_003.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_004.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_005.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_006.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_007.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_008.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f (+349/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_1.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_2.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_3.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%sborn_sf.f (+81/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+91/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f (+349/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_1.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_2.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_3.f (+282/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%sborn_sf.f (+81/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_001.f (+264/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_002.f (+264/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_003.f (+265/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_004.f (+264/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_005.f (+265/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%born.f (+707/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_1.f (+486/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_2.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_3.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_4.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_5.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%sborn_sf.f (+80/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_001.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_002.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_003.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_004.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_005.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_006.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_007.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_008.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%born.f (+726/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_1.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_2.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_3.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_4.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_5.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_6.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%sborn_sf.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_001.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_002.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_003.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_004.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_005.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_006.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_007.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_008.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%born.f (+726/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_1.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_2.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_3.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_4.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_5.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_6.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%sborn_sf.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_001.f (+264/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_002.f (+264/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_003.f (+265/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_004.f (+264/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_005.f (+265/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%born.f (+707/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_1.f (+486/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_2.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_3.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_4.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_5.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%sborn_sf.f (+80/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_001.f (+270/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_002.f (+269/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_003.f (+269/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_004.f (+269/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_005.f (+269/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_006.f (+271/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_007.f (+270/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_008.f (+271/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%born.f (+715/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_1.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_2.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_3.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_4.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_5.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_6.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_7.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_8.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_9.f (+486/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%sborn_sf.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_001.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_002.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_003.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_004.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_005.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_006.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_007.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_008.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%born.f (+726/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_1.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_2.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_3.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_4.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_5.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_6.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%sborn_sf.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%born.f (+726/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_1.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_2.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_3.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_4.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_5.f (+481/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_6.f (+520/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%sborn_sf.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%CT_interface.f (+272/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%b_sf_001.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f (+347/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%matrix_1.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%matrix_2.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%matrix_3.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%sborn_sf.f (+60/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%CT_interface.f (+272/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%b_sf_001.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f (+347/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%matrix_1.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%matrix_2.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%matrix_3.f (+277/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%sborn_sf.f (+60/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_001.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_002.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_003.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_004.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_005.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_006.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_007.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_008.f (+89/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f (+347/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%matrix_1.f (+278/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%sborn_sf.f (+81/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%COLLIER_interface.f (+736/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%CT_interface.f (+2026/-855)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%TIR_interface.f (+528/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%born_matrix.f (+655/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%check_sa_born_splitOrders.f (+527/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%helas_calls_ampb_1.f (+148/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%loop_matrix.f (+2812/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%mp_compute_loop_coefs.f (+453/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%polynomial.f (+1237/-599)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%b_sf_001.f (+267/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%born.f (+708/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%matrix_1.f (+475/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%matrix_2.f (+475/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%matrix_3.f (+475/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%sborn_sf.f (+68/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%COLLIER_interface.f (+736/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%CT_interface.f (+2026/-855)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%TIR_interface.f (+528/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%born_matrix.f (+655/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%check_sa_born_splitOrders.f (+527/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%helas_calls_ampb_1.f (+148/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%loop_matrix.f (+2812/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%mp_compute_loop_coefs.f (+453/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%polynomial.f (+1237/-599)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%b_sf_001.f (+267/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%born.f (+708/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%matrix_1.f (+475/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%matrix_2.f (+475/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%matrix_3.f (+475/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%sborn_sf.f (+68/-0)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%polynomial.f (+75/-16)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f (+20/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc (+49/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%model_functions.f (+20/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+5/-5)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+6/-4)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f (+20/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc (+49/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%model_functions.f (+20/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+5/-5)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+6/-4)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_CT_calls_1.f (+24/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%model_functions.f (+20/-2)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc (+36/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%model_functions.f (+20/-2)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-2)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc (+36/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%model_functions.f (+20/-2)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-2)
tests/time_db (+250/-17)
Text conflict in Template/NLO/SubProcesses/BinothLHA.f
Text conflict in Template/NLO/SubProcesses/fks_singular.f
Text conflict in Template/NLO/SubProcesses/splitorders_stuff.f
Text conflict in UpdateNotes.txt
Text conflict in VERSION
Text conflict in madgraph/iolibs/export_v4.py
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_6.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_6.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_6.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_7.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_8.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_9.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_6.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_4.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_5.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_6.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%CT_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%CT_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_002.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_003.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_004.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_005.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_006.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_007.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_008.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%COLLIER_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%CT_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%TIR_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%born_matrix.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%check_sa_born_splitOrders.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%helas_calls_ampb_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%loop_matrix.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%mp_compute_loop_coefs.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%polynomial.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%COLLIER_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%CT_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%TIR_interface.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%born_matrix.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%check_sa_born_splitOrders.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%helas_calls_ampb_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%loop_matrix.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%mp_compute_loop_coefs.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%polynomial.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%b_sf_001.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%born.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%matrix_1.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%matrix_2.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%matrix_3.f
Text conflict in tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%sborn_sf.f
Text conflict in tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%polynomial.f
Text conflict in tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f
Text conflict in tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc
Text conflict in tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%model_functions.f
Text conflict in tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f
Text conflict in tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc
Text conflict in tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%model_functions.f
Text conflict in tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_CT_calls_1.f
Text conflict in tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%model_functions.f
Text conflict in tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc
Text conflict in tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%model_functions.f
Text conflict in tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc
Text conflict in tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%model_functions.f
Text conflict in tests/time_db
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/3.0.3
Reviewer Review Type Date Requested Status
marco zaro Disapprove
Valentin Hirschi Pending
Rikkert Frederix Pending
Review via email: mp+386426@code.launchpad.net

Commit message

Enables the computation of EW corrections in the 4FS

Description of the change

the possibility of computing EW corrections in the 4FS is added, including in the complex-mass scheme.

To post a comment you must log in.
Revision history for this message
marco zaro (marco-zaro) wrote :

sorry, the merge should have been the other way round...

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Template/NLO/SubProcesses/BinothLHA.f'
2--- Template/NLO/SubProcesses/BinothLHA.f 2020-06-26 09:40:32 +0000
3+++ Template/NLO/SubProcesses/BinothLHA.f 2020-06-26 09:44:49 +0000
4@@ -117,8 +117,13 @@
5 c itself again to perform stability check to make sure no unstable EPS
6 c splips unnoticed.
7 CALL FORCE_STABILITY_CHECK(.TRUE.)
8- CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
9- CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)
10+ IF (.not. force_polecheck) THEN ! still have the pole for the pole check
11+ CALL COLLIER_COMPUTE_UV_POLES(.FALSE.)
12+ CALL COLLIER_COMPUTE_IR_POLES(.FALSE.)
13+ else
14+ CALL COLLIER_COMPUTE_UV_POLES(.TRUE.)
15+ CALL COLLIER_COMPUTE_IR_POLES(.TRUE.)
16+ endif
17 firsttime_run = .false.
18 endif
19 firsttime=firsttime.or.force_polecheck
20@@ -260,6 +265,7 @@
21 if ((firsttime .or. mc_hel.eq.0) .and. mod(ret_code,100)/10.ne.3
22 $ .and. mod(ret_code,100)/10.ne.4) then
23 call getpoles(p,QES2,madfks_double,madfks_single,fksprefact)
24+<<<<<<< TREE
25 polecheck_passed = .true.
26 ! loop over the full result and each of the amp_split
27 ! contribution
28@@ -323,6 +329,71 @@
29 endif
30 if (mc_hel.ne.0) then
31 198 continue
32+=======
33+ polecheck_passed = .true.
34+ ! loop over the full result and each of the amp_split
35+ ! contribution
36+ do iamp=0,amp_split_size
37+ ! skip 0 contributions in the amp_split array
38+ if (iamp.ne.0) then
39+ if (amp_split_poles_FKS(iamp,1).eq.0d0.and.
40+ $ amp_split_poles_FKS(iamp,1).eq.0d0) cycle
41+ endif
42+ if (iamp.eq.0) then
43+ if (firsttime) then
44+ write(*,*) ''
45+ write(*,*) 'Sum of all split-orders'
46+ endif
47+ else
48+ if (firsttime) then
49+ write(*,*) ''
50+ write(*,*) 'Splitorders', iamp
51+ call amp_split_pos_to_orders(iamp,split_amp_orders)
52+ do i = 1, nsplitorders
53+ write(*,*) ' ',ordernames(i), ':',
54+ $ split_amp_orders(i)
55+ enddo
56+ endif
57+ single=amp_split_poles_ML(iamp,1)
58+ double=amp_split_poles_ML(iamp,2)
59+ madfks_single=amp_split_poles_FKS(iamp,1)
60+ madfks_double=amp_split_poles_FKS(iamp,2)
61+ endif
62+ avgPoleRes(1)=(single+madfks_single)/2.0d0
63+ avgPoleRes(2)=(double+madfks_double)/2.0d0
64+ PoleDiff(1)=dabs(single - madfks_single)
65+ PoleDiff(2)=dabs(double - madfks_double)
66+ if ((dabs(avgPoleRes(1))+dabs(avgPoleRes(2))).ne.0d0) then
67+ cpol = .not.((((PoleDiff(1)+PoleDiff(2))/
68+ $ (dabs(avgPoleRes(1))+dabs(avgPoleRes(2)))) .lt.
69+ $ tolerance*10d0).or.(mod(ret_code,10).eq.7.and..not.force_polecheck))
70+ else
71+ cpol = .not.((PoleDiff(1)+PoleDiff(2).lt.tolerance*10d0)
72+ $ .or.(mod(ret_code,10).eq.7))
73+ endif
74+ if (tolerance.lt.0.0d0) then
75+ cpol = .false.
76+ endif
77+ if (.not. cpol .and. firsttime) then
78+ write(*,*) "---- POLES CANCELLED ----"
79+ write(*,*) " COEFFICIENT DOUBLE POLE:"
80+ write(*,*) " MadFKS: ", madfks_double,
81+ & " OLP: ", double
82+ write(*,*) " COEFFICIENT SINGLE POLE:"
83+ write(*,*) " MadFKS: ",madfks_single,
84+ & " OLP: ",single
85+ if (iamp.eq.0) then
86+ write(*,*) " FINITE:"
87+ write(*,*) " OLP: ",virt_wgt
88+ write(*,*) " BORN: ",born_wgt
89+ write(*,*) " MOMENTA (Exyzm): "
90+ do i = 1, nexternal-1
91+ write(*,*) i,p(0,i),p(1,i),p(2,i),p(3,i),pmass(i)
92+ enddo
93+ endif
94+ if (mc_hel.ne.0) then
95+ 198 continue
96+>>>>>>> MERGE-SOURCE
97 c Set-up the MC over helicities. This assumes that the 'HelFilter.dat'
98 c exists, which should be the case when firsttime is false.
99 if (NHelForMCoverHels.lt.0) then
100
101=== modified file 'Template/NLO/SubProcesses/cuts.f'
102--- Template/NLO/SubProcesses/cuts.f 2020-06-26 09:40:32 +0000
103+++ Template/NLO/SubProcesses/cuts.f 2020-06-26 09:44:49 +0000
104@@ -139,7 +139,7 @@
105 return
106 endif
107 endif
108- if (ipdg(i).eq.-ipdg(j)) then
109+ if (ipdg_reco(i).eq.-ipdg_reco(j)) then
110 if (drll_sf.gt.0d0) then
111 if (R2_04(p_reco(0,i),p_reco(0,j)).lt.drll_sf**2) then
112 passcuts_user=.false.
113
114=== modified file 'Template/NLO/SubProcesses/fks_singular.f'
115--- Template/NLO/SubProcesses/fks_singular.f 2020-05-21 11:44:35 +0000
116+++ Template/NLO/SubProcesses/fks_singular.f 2020-06-26 09:44:49 +0000
117@@ -1,3 +1,4 @@
118+<<<<<<< TREE
119 subroutine compute_born
120 c This subroutine computes the Born matrix elements and adds its value
121 c to the list of weights using the add_wgt subroutine
122@@ -7154,3 +7155,7159 @@
123 end
124
125
126+=======
127+ subroutine compute_born
128+c This subroutine computes the Born matrix elements and adds its value
129+c to the list of weights using the add_wgt subroutine
130+ use extra_weights
131+ implicit none
132+ include 'nexternal.inc'
133+ include 'coupl.inc'
134+ include 'timing_variables.inc'
135+ include 'orders.inc'
136+ integer orders(nsplitorders)
137+ integer iamp
138+
139+ ! stuff for the 6->5 flav scheme
140+ double precision amp_split_6to5f(amp_split_size),
141+ & amp_split_6to5f_muf(amp_split_size),
142+ & amp_split_6to5f_mur(amp_split_size)
143+ common /to_amp_split_6to5f/ amp_split_6to5f, amp_split_6to5f_muf,
144+ & amp_split_6to5f_mur
145+
146+ double precision wgt_c
147+ double precision wgt1
148+ double precision wgt6f1,wgt6f2,wgt6f3
149+ double precision p_born(0:3,nexternal-1)
150+ common /pborn/ p_born
151+ double precision xiimax_cnt(-2:2)
152+ common /cxiimaxcnt/xiimax_cnt
153+ double precision xi_i_hat_ev,xi_i_hat_cnt(-2:2)
154+ common /cxi_i_hat/xi_i_hat_ev,xi_i_hat_cnt
155+ double precision f_b,f_nb
156+ common /factor_nbody/ f_b,f_nb
157+ double precision xiScut_used,xiBSVcut_used
158+ common /cxiScut_used/xiScut_used,xiBSVcut_used
159+ double precision g22
160+ integer get_orders_tag
161+ call cpu_time(tBefore)
162+ if (f_b.eq.0d0) return
163+ if (xi_i_hat_ev*xiimax_cnt(0) .gt. xiBSVcut_used) return
164+ call sborn(p_born,wgt_c)
165+ do iamp=1, amp_split_size
166+ if (amp_split(iamp).eq.0d0) cycle
167+ call amp_split_pos_to_orders(iamp, orders)
168+ QCD_power=orders(qcd_pos)
169+ wgtcpower=0d0
170+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
171+ orders_tag=get_orders_tag(orders)
172+ wgt1=amp_split(iamp)*f_b/g**(qcd_power)
173+ call add_wgt(2,orders,wgt1,0d0,0d0)
174+ enddo
175+
176+C This is the counterterm for the 6f->5f scheme change
177+C of parton distributions (e.g. NNPDF2.3).
178+C It is called in this function such that if is included
179+C in the LO cross section
180+ call compute_6to5flav_cnt()
181+ do iamp=1, amp_split_size
182+ if (amp_split_6to5f(iamp).eq.0d0.and.
183+ $ amp_split_6to5f_mur(iamp).eq.0d0.and.
184+ $ amp_split_6to5f_muf(iamp).eq.0d0) cycle
185+ call amp_split_pos_to_orders(iamp, orders)
186+ QCD_power=orders(qcd_pos)
187+ g22=g**(QCD_power)
188+ wgtcpower=0d0
189+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
190+ orders_tag=get_orders_tag(orders)
191+ wgt6f1=amp_split_6to5f(iamp)*f_b/g**(qcd_power)
192+ wgt6f2=amp_split_6to5f_mur(iamp)*f_b/g**(qcd_power)
193+ wgt6f3=amp_split_6to5f_muf(iamp)*f_b/g**(qcd_power)
194+ call add_wgt(2,orders,wgt6f1,wgt6f2,wgt6f3)
195+ enddo
196+ call cpu_time(tAfter)
197+ tBorn=tBorn+(tAfter-tBefore)
198+ return
199+ end
200+
201+
202+ subroutine compute_6to5flav_cnt()
203+C This is the counterterm for the 6f->5f scheme change
204+C of parton distributions (e.g. NNPDF2.3).
205+C It is called in this function such that if is included
206+C in the LO cross section
207+ implicit none
208+ include 'nexternal.inc'
209+ include 'coupl.inc'
210+ include 'q_es.inc'
211+ include 'run.inc'
212+ include 'genps.inc'
213+ double precision p_born(0:3,nexternal-1)
214+ common /pborn/ p_born
215+ include 'orders.inc'
216+ integer orders(nsplitorders)
217+ integer iamp
218+ double precision amp_split_6to5f(amp_split_size),
219+ & amp_split_6to5f_muf(amp_split_size),
220+ & amp_split_6to5f_mur(amp_split_size)
221+ common /to_amp_split_6to5f/ amp_split_6to5f, amp_split_6to5f_muf,
222+ & amp_split_6to5f_mur
223+ integer orders_to_amp_split_pos
224+ integer niglu
225+ save niglu
226+ integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc),
227+ $ icolup(2,nexternal,maxflow),niprocs
228+ common /c_leshouche_inc/idup,mothup,icolup,niprocs
229+ integer i, j, k
230+ logical firsttime
231+ data firsttime /.true./
232+ double precision tf, pi
233+ parameter (tf=0.5d0)
234+ parameter (pi=3.1415926535897932385d0)
235+ integer alphasbpow
236+ double precision wgtborn, alphas
237+ ! switch on/off here
238+ logical include_6to5_cnt
239+ data include_6to5_cnt /.false./
240+
241+CMZMZ REMEMBER!!!!
242+c wgt1 : weight of the contribution not multiplying a scale log
243+c wgt2 : coefficient of the weight multiplying the log[mu_R^2/Q^2]
244+c wgt3 : coefficient of the weight multiplying the log[mu_F^2/Q^2]
245+
246+ ! set everything to 0
247+ amp_split_6to5f(1:amp_split_size) = 0d0
248+ amp_split_6to5f_muf(1:amp_split_size) = 0d0
249+ amp_split_6to5f_mur(1:amp_split_size) = 0d0
250+
251+ ! skip if we don't want this piece or if the scale is
252+ ! below mt
253+ if (.not.include_6to5_cnt.or.scale.lt.mdl_mt) return
254+
255+C the contribution is the following (if mu > mt):
256+C Add a term -alphas n TF/3pi log (muR^2/mt^2) sigma(0)
257+C where n is the power of alphas for the Born xsec sigma(0)
258+C Add a term −alphas TF/3pi log (mt^2/muF^2) sigma(0) for each
259+C gluon in the initial state
260+
261+ if (firsttime) then
262+ ! count the number of gluons
263+ do i = 1, nincoming
264+ if (idup(i, 1).eq.21) niglu = niglu + 1
265+ enddo
266+ write(*,*) 'compute_6to5flav_cnt found n initial gluons:', niglu
267+ firsttime=.false.
268+ endif
269+
270+ ! compute the born
271+ call sborn(p_born,wgtborn)
272+ alphas = g**2/4d0/pi
273+ do iamp = 1, amp_split_size
274+ if (amp_split(iamp).eq.0d0) cycle
275+ call amp_split_pos_to_orders(iamp, orders)
276+ alphasbpow = orders(qcd_pos)/2
277+ if (niglu.ne.0 .or. alphasbpow.ne.0) then
278+ ! this contribution will end up with one extra power
279+ ! of alpha_s
280+ orders(qcd_pos) = orders(qcd_pos) + 2
281+
282+ amp_split_6to5f_muf(orders_to_amp_split_pos(orders)) =
283+ & alphas / 3d0 / pi * TF * dble(niglu) * amp_split(iamp)
284+
285+ amp_split_6to5f_mur(orders_to_amp_split_pos(orders)) =
286+ & - alphas / 3d0 / pi * TF * dble(alphasbpow) * amp_split(iamp)
287+
288+ amp_split_6to5f(orders_to_amp_split_pos(orders)) =
289+ & dlog(qes2/mdl_mt**2) *
290+ & (alphas / 3d0 / pi * TF * dble(niglu)
291+ & - alphas / 3d0 / pi * TF * dble(alphasbpow)) * amp_split(iamp)
292+ endif
293+ enddo
294+
295+ return
296+ end
297+
298+
299+
300+
301+ subroutine compute_nbody_noborn
302+c This subroutine computes the soft-virtual matrix elements and adds its
303+c value to the list of weights using the add_wgt subroutine
304+ use extra_weights
305+ use mint_module
306+ implicit none
307+ include 'nexternal.inc'
308+ include 'coupl.inc'
309+ include 'run.inc'
310+ include 'timing_variables.inc'
311+ include 'orders.inc'
312+ integer orders(nsplitorders)
313+ integer iamp, i
314+ double precision amp_split_virt(amp_split_size),
315+ & amp_split_born_for_virt(amp_split_size),
316+ & amp_split_avv(amp_split_size)
317+ common /to_amp_split_virt/amp_split_virt,
318+ & amp_split_born_for_virt,
319+ & amp_split_avv
320+ double precision amp_split_wgtnstmp(amp_split_size),
321+ $ amp_split_wgtwnstmpmuf(amp_split_size),
322+ $ amp_split_wgtwnstmpmur(amp_split_size)
323+ common /to_amp_split_bsv/amp_split_wgtnstmp,
324+ $ amp_split_wgtwnstmpmuf,
325+ $ amp_split_wgtwnstmpmur
326+ double precision wgt1,wgt2,wgt3,bsv_wgt,virt_wgt,born_wgt,pi,g2
327+ & ,g22,wgt4
328+ parameter (pi=3.1415926535897932385d0)
329+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
330+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
331+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
332+ double precision xiimax_cnt(-2:2)
333+ common /cxiimaxcnt/xiimax_cnt
334+ double precision xi_i_hat_ev,xi_i_hat_cnt(-2:2)
335+ common /cxi_i_hat/xi_i_hat_ev,xi_i_hat_cnt
336+ double precision f_b,f_nb
337+ common /factor_nbody/ f_b,f_nb
338+ double precision xiScut_used,xiBSVcut_used
339+ common /cxiScut_used/xiScut_used,xiBSVcut_used
340+ double precision fxfx_exp_rewgt
341+ common /c_fxfx_exp_regt/ fxfx_exp_rewgt
342+ integer get_orders_tag
343+ character*4 abrv
344+ common /to_abrv/ abrv
345+ call cpu_time(tBefore)
346+ if (f_nb.eq.0d0) return
347+ if (xi_i_hat_ev*xiimax_cnt(0) .gt. xiBSVcut_used) return
348+ call bornsoftvirtual(p1_cnt(0,1,0),bsv_wgt,virt_wgt,born_wgt)
349+ if (ickkw.eq.3 .and. fxfx_exp_rewgt.ne.0d0 .and. abrv.ne.'born') then
350+ write(*,*) 'FIX FXFX-MERGING in FKS_EW'
351+ stop
352+ wgt1=wgt1 - fxfx_exp_rewgt*born_wgt*f_nb/g2/(4d0*pi)
353+ elseif (ickkw.eq.-1) then
354+ if (wgtbpower.ne.0) then
355+ write (*,*) 'ERROR in VETO XSec: bpower should'/
356+ $ /' be zero (no QCD partons at the'/
357+ $ /' Born allowed)', wgtbpower
358+ endif
359+ H1_factor_virt=virt_wgt/(g22/(4d0*pi))/born_wgt
360+ born_wgt_veto=born_wgt/g2
361+ call compute_veto_compensating_factor(H1_factor_virt
362+ $ ,born_wgt_veto,1d0,1d0,veto_compensating_factor)
363+C Since VETOXSEC must still be adapted in FKS_EW, I put a dummy
364+C order array here which I arbitrarily chose to be the (-1,-1)
365+C to make sure that it cannot be incorrectly understood.
366+ do i=1,nsplitorders
367+ orders(i)=-1
368+ enddo
369+ call add_wgt(7,orders,-veto_compensating_factor*f_nb,0d0,0d0)
370+ write(*,*) 'FIX VETOXSEC in FKS_EW'
371+ stop
372+ endif
373+ do iamp=1, amp_split_size
374+ if (amp_split_wgtnstmp(iamp).eq.0d0.and.
375+ $ amp_split_wgtwnstmpmur(iamp).eq.0d0.and.
376+ $ amp_split_wgtwnstmpmuf(iamp).eq.0d0.and.
377+ $ amp_split_avv(iamp).eq.0d0) cycle
378+ call amp_split_pos_to_orders(iamp, orders)
379+ QCD_power=orders(qcd_pos)
380+ wgtcpower=0d0
381+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
382+ orders_tag=get_orders_tag(orders)
383+ g22=g**(QCD_power)
384+ wgt1=amp_split_wgtnstmp(iamp)*f_nb/g22
385+ wgt2=amp_split_wgtwnstmpmur(iamp)*f_nb/g22
386+ wgt3=amp_split_wgtwnstmpmuf(iamp)*f_nb/g22
387+ wgt4=amp_split_avv(iamp)*f_nb/g22
388+ call add_wgt(3,orders,wgt1,wgt2,wgt3)
389+ call add_wgt(15,orders,wgt4,0d0,0d0)
390+ enddo
391+c Special for the soft-virtual needed for the virt-tricks. The
392+c *_wgt_mint variable should be directly passed to the mint-integrator
393+c and not be part of the plots nor computation of the cross section.
394+ virt_wgt_mint(0)=virt_wgt*f_nb
395+ born_wgt_mint(0)=born_wgt*f_b
396+ do iamp=1, amp_split_size
397+ if (amp_split_virt(iamp).eq.0d0) then
398+ virt_wgt_mint(iamp)=0d0
399+ born_wgt_mint(iamp)=0d0
400+ cycle
401+ endif
402+ call amp_split_pos_to_orders(iamp, orders)
403+ QCD_power=orders(qcd_pos)
404+ wgtcpower=0d0
405+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
406+ orders_tag=get_orders_tag(orders)
407+ virt_wgt_mint(iamp)=amp_split_virt(iamp)*f_nb
408+ born_wgt_mint(iamp)=amp_split_born_for_virt(iamp)*f_nb
409+ wgt1=virt_wgt_mint(iamp)/g**(QCD_power)
410+ call add_wgt(14,orders,wgt1,0d0,0d0)
411+ enddo
412+ call cpu_time(tAfter)
413+ tIS=tIS+(tAfter-tBefore)
414+ return
415+ end
416+
417+ subroutine compute_real_emission(p,sudakov_damp)
418+c This subroutine computes the real-emission matrix elements and adds
419+c its value to the list of weights using the add_wgt subroutine
420+ use extra_weights
421+ implicit none
422+ include 'nexternal.inc'
423+ include 'coupl.inc'
424+ include 'timing_variables.inc'
425+ include 'orders.inc'
426+ integer orders(nsplitorders)
427+ integer iamp
428+ double precision s_ev,fks_Sij,p(0:3,nexternal),wgt1,fx_ev
429+ $ ,sudakov_damp
430+ external fks_Sij
431+ integer i_fks,j_fks
432+ common/fks_indices/i_fks,j_fks
433+ double precision xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev(0:3)
434+ $ ,p_i_fks_cnt(0:3,-2:2)
435+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
436+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
437+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
438+ integer get_orders_tag
439+ call cpu_time(tBefore)
440+ if (f_r.eq.0d0) return
441+ s_ev = fks_Sij(p,i_fks,j_fks,xi_i_fks_ev,y_ij_fks_ev)
442+ if (s_ev.le.0.d0) return
443+ call sreal(p,xi_i_fks_ev,y_ij_fks_ev,fx_ev)
444+ do iamp=1, amp_split_size
445+ if (amp_split(iamp).eq.0d0) cycle
446+ call amp_split_pos_to_orders(iamp, orders)
447+ QCD_power=orders(qcd_pos)
448+ wgtcpower=0d0
449+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
450+ orders_tag=get_orders_tag(orders)
451+ wgt1=amp_split(iamp)*s_ev*f_r/g**(qcd_power)
452+ if (sudakov_damp.gt.0d0) then
453+ call add_wgt(1,orders,wgt1*sudakov_damp,0d0,0d0)
454+ endif
455+ if (sudakov_damp.lt.1d0) then
456+ call add_wgt(11,orders,wgt1*(1d0-sudakov_damp),0d0,0d0)
457+ endif
458+ enddo
459+ call cpu_time(tAfter)
460+ tReal=tReal+(tAfter-tBefore)
461+ return
462+ end
463+
464+ subroutine compute_soft_counter_term(replace_MC_subt)
465+c This subroutine computes the soft counter term and adds its value to
466+c the list of weights using the add_wgt subroutine
467+ use extra_weights
468+ implicit none
469+ include 'nexternal.inc'
470+ include 'coupl.inc'
471+ include 'timing_variables.inc'
472+ include 'orders.inc'
473+ integer orders(nsplitorders)
474+ integer iamp
475+ double precision wgt1,s_s,fks_Sij,fx_s,zero,replace_MC_subt,g22
476+ parameter (zero=0d0)
477+ external fks_Sij
478+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
479+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
480+ common/counterevnts/ p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
481+ double precision xiScut_used,xiBSVcut_used
482+ common /cxiScut_used/xiScut_used,xiBSVcut_used
483+ double precision xiimax_cnt(-2:2)
484+ common /cxiimaxcnt/xiimax_cnt
485+ double precision xi_i_hat_ev,xi_i_hat_cnt(-2:2)
486+ common /cxi_i_hat/xi_i_hat_ev,xi_i_hat_cnt
487+ double precision xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev(0:3)
488+ $ ,p_i_fks_cnt(0:3,-2:2)
489+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
490+ integer i_fks,j_fks
491+ common/fks_indices/i_fks,j_fks
492+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
493+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
494+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
495+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
496+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
497+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
498+ integer get_orders_tag
499+ call cpu_time(tBefore)
500+ if (f_s.eq.0d0 .and. f_s_MC_S.eq.0d0 .and. f_s_MC_H.eq.0d0) return
501+ if (xi_i_hat_ev*xiimax_cnt(0).gt.xiScut_used .and. replace_MC_subt.eq.0d0)
502+ $ return
503+ s_s = fks_Sij(p1_cnt(0,1,0),i_fks,j_fks,zero,y_ij_fks_ev)
504+ if (s_s.le.0d0) return
505+ call sreal(p1_cnt(0,1,0),0d0,y_ij_fks_ev,fx_s)
506+
507+ do iamp=1, amp_split_size
508+ if (amp_split(iamp).eq.0d0) cycle
509+ call amp_split_pos_to_orders(iamp, orders)
510+ QCD_power=orders(qcd_pos)
511+ wgtcpower=0d0
512+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
513+ orders_tag=get_orders_tag(orders)
514+ g22=g**(QCD_power)
515+ if (replace_MC_subt.gt.0d0) then
516+ wgt1=amp_split(iamp)*s_s/g22*replace_MC_subt
517+ call add_wgt(8,orders,-wgt1*f_s_MC_H,0d0,0d0)
518+ wgt1=wgt1*f_s_MC_S
519+ else
520+ wgt1=0d0
521+ endif
522+ if (xi_i_fks_ev.le.xiScut_used) then
523+ wgt1=wgt1-amp_split(iamp)*s_s*f_s/g22
524+ endif
525+ if (wgt1.ne.0d0) call add_wgt(4,orders,wgt1,0d0,0d0)
526+ enddo
527+
528+ call cpu_time(tAfter)
529+ tCount=tCount+(tAfter-tBefore)
530+ return
531+ end
532+
533+ subroutine compute_collinear_counter_term(replace_MC_subt)
534+c This subroutine computes the collinear counter term and adds its value
535+c to the list of weights using the add_wgt subroutine
536+ use extra_weights
537+ implicit none
538+ include 'nexternal.inc'
539+ include 'coupl.inc'
540+ include 'fks_powers.inc'
541+ include 'timing_variables.inc'
542+ include 'orders.inc'
543+ integer orders(nsplitorders)
544+ integer iamp
545+ double precision amp_split_wgtdegrem_xi(amp_split_size),
546+ $ amp_split_wgtdegrem_lxi(amp_split_size),
547+ $ amp_split_wgtdegrem_muF(amp_split_size)
548+ common /to_amp_split_deg/amp_split_wgtdegrem_xi,
549+ $ amp_split_wgtdegrem_lxi,
550+ $ amp_split_wgtdegrem_muF
551+ ! amp_split for the DIS scheme
552+ double precision amp_split_wgtdis_p(amp_split_size),
553+ $ amp_split_wgtdis_l(amp_split_size),
554+ $ amp_split_wgtdis_d(amp_split_size)
555+ common /to_amp_split_dis/amp_split_wgtdis_p,
556+ $ amp_split_wgtdis_l,
557+ $ amp_split_wgtdis_d
558+ double precision zero,one,s_c,fks_Sij,fx_c,deg_xi_c,deg_lxi_c,wgt1
559+ & ,wgt3,g22,replace_MC_subt
560+ external fks_Sij
561+ parameter (zero=0d0,one=1d0)
562+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
563+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
564+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
565+ integer i_fks,j_fks
566+ common/fks_indices/i_fks,j_fks
567+ double precision xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev(0:3)
568+ $ ,p_i_fks_cnt(0:3,-2:2)
569+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
570+ double precision xi_i_fks_cnt(-2:2)
571+ common /cxiifkscnt/xi_i_fks_cnt
572+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
573+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
574+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
575+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
576+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
577+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
578+ double precision pmass(nexternal)
579+ integer get_orders_tag
580+ call cpu_time(tBefore)
581+ include 'pmass.inc'
582+ if (f_c.eq.0d0 .and. f_dc.eq.0d0 .and. f_c_MC_S.eq.0d0 .and.
583+ $ f_c_MC_H.eq.0d0)return
584+ if ( (y_ij_fks_ev.le.1d0-deltaS .and. replace_MC_subt.eq.0d0) .or.
585+ $ pmass(j_fks).ne.0.d0 ) return
586+ s_c = fks_Sij(p1_cnt(0,1,1),i_fks,j_fks,xi_i_fks_cnt(1),one)
587+ if (s_c.le.0d0) return
588+ ! sreal_deg should be called **BEFORE** sreal
589+ ! in order not to overwrtie the amp_split array
590+ call sreal_deg(p1_cnt(0,1,1),xi_i_fks_cnt(1),one,deg_xi_c
591+ $ ,deg_lxi_c)
592+ call sreal(p1_cnt(0,1,1),xi_i_fks_cnt(1),one,fx_c)
593+
594+ do iamp=1, amp_split_size
595+ if (amp_split(iamp).eq.0d0.and.
596+ $ amp_split_wgtdegrem_xi(iamp).eq.0d0.and.
597+ $ amp_split_wgtdegrem_lxi(iamp).eq.0d0.and.
598+ $ amp_split_wgtdis_p(iamp).eq.0d0.and.
599+ $ amp_split_wgtdis_l(iamp).eq.0d0.and.
600+ $ amp_split_wgtdis_d(iamp).eq.0d0) cycle
601+
602+ call amp_split_pos_to_orders(iamp, orders)
603+ QCD_power=orders(qcd_pos)
604+ wgtcpower=0d0
605+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
606+ orders_tag=get_orders_tag(orders)
607+ g22=g**(QCD_power)
608+ if (replace_MC_subt.gt.0d0) then
609+ wgt1=amp_split(iamp)*s_c/g22*replace_MC_subt
610+ call add_wgt(9,orders,-wgt1*f_c_MC_H,0d0,0d0)
611+ wgt1=wgt1*f_c_MC_S
612+ else
613+ wgt1=0d0
614+ endif
615+ if (y_ij_fks_ev.gt.1d0-deltaS) then
616+ wgt1=wgt1-amp_split(iamp)*s_c*f_c/g22
617+ wgt1=wgt1+
618+ $ (amp_split_wgtdegrem_xi(iamp)+amp_split_wgtdis_p(iamp)+
619+ $ (amp_split_wgtdegrem_lxi(iamp)+amp_split_wgtdis_l(iamp))
620+ $ *log(xi_i_fks_cnt(1)))*f_dc/g22
621+ wgt3=amp_split_wgtdegrem_muF(iamp)*f_dc/g22
622+ else
623+ wgt3=0d0
624+ endif
625+ if (wgt1.ne.0d0 .or. wgt3.ne.0d0) call add_wgt(5,orders,wgt1,0d0,wgt3)
626+ enddo
627+
628+ call cpu_time(tAfter)
629+ tCount=tCount+(tAfter-tBefore)
630+ return
631+ end
632+
633+ subroutine compute_soft_collinear_counter_term(replace_MC_subt)
634+c This subroutine computes the soft-collinear counter term and adds its
635+c value to the list of weights using the add_wgt subroutine
636+ use extra_weights
637+ implicit none
638+ include 'nexternal.inc'
639+ include 'coupl.inc'
640+ include 'fks_powers.inc'
641+ include 'timing_variables.inc'
642+ include 'orders.inc'
643+ integer orders(nsplitorders)
644+ integer iamp
645+ double precision amp_split_wgtdegrem_xi(amp_split_size),
646+ $ amp_split_wgtdegrem_lxi(amp_split_size),
647+ $ amp_split_wgtdegrem_muF(amp_split_size)
648+ common /to_amp_split_deg/amp_split_wgtdegrem_xi,
649+ $ amp_split_wgtdegrem_lxi,
650+ $ amp_split_wgtdegrem_muF
651+ ! amp_split for the DIS scheme
652+ double precision amp_split_wgtdis_p(amp_split_size),
653+ $ amp_split_wgtdis_l(amp_split_size),
654+ $ amp_split_wgtdis_d(amp_split_size)
655+ common /to_amp_split_dis/amp_split_wgtdis_p,
656+ $ amp_split_wgtdis_l,
657+ $ amp_split_wgtdis_d
658+ double precision zero,one,s_sc,fks_Sij,fx_sc,wgt1,wgt3,deg_xi_sc
659+ $ ,deg_lxi_sc,g22,replace_MC_subt
660+ external fks_Sij
661+ parameter (zero=0d0,one=1d0)
662+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
663+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
664+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
665+ double precision xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev(0:3)
666+ $ ,p_i_fks_cnt(0:3,-2:2)
667+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
668+ integer i_fks,j_fks
669+ common/fks_indices/i_fks,j_fks
670+ double precision xiScut_used,xiBSVcut_used
671+ common /cxiScut_used/xiScut_used,xiBSVcut_used
672+ double precision xi_i_fks_cnt(-2:2)
673+ common /cxiifkscnt/xi_i_fks_cnt
674+ double precision xiimax_cnt(-2:2)
675+ common /cxiimaxcnt/xiimax_cnt
676+ double precision xi_i_hat_ev,xi_i_hat_cnt(-2:2)
677+ common /cxi_i_hat/xi_i_hat_ev,xi_i_hat_cnt
678+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
679+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
680+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
681+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
682+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
683+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
684+ ! DIS scheme prefactors
685+ double precision f_dis_d,f_dis_p,f_dis_l
686+ common/factor_dis/f_dis_d,f_dis_p,f_dis_l
687+ double precision pmass(nexternal)
688+ integer get_orders_tag
689+ include 'pmass.inc'
690+ call cpu_time(tBefore)
691+ if (f_sc.eq.0d0 .and. f_dsc(1).eq.0d0 .and. f_dsc(2).eq.0d0 .and.
692+ $ f_dsc(3).eq.0d0 .and. f_dsc(4).eq.0d0 .and. f_sc_MC_S.eq.0d0
693+ $ .and. f_sc_MC_H.eq.0d0) return
694+ if ( ((xi_i_hat_ev*xiimax_cnt(1).ge.xiScut_used .or. y_ij_fks_ev.le.1d0
695+ $ -deltaS) .and. replace_MC_subt.eq.0d0).or.
696+ $ pmass(j_fks).ne.0.d0 ) return
697+ s_sc = fks_Sij(p1_cnt(0,1,2),i_fks,j_fks,zero,one)
698+ if (s_sc.le.0d0) return
699+ ! sreal_deg should be called **BEFORE** sreal
700+ ! in order not to overwrtie the amp_split array
701+ call sreal_deg(p1_cnt(0,1,2),zero,one, deg_xi_sc,deg_lxi_sc)
702+ call sreal(p1_cnt(0,1,2),zero,one,fx_sc)
703+
704+ do iamp=1, amp_split_size
705+ if (amp_split(iamp).eq.0d0.and.
706+ $ amp_split_wgtdegrem_xi(iamp).eq.0d0.and.
707+ $ amp_split_wgtdegrem_lxi(iamp).eq.0d0.and.
708+ $ amp_split_wgtdis_p(iamp).eq.0d0.and.
709+ $ amp_split_wgtdis_l(iamp).eq.0d0.and.
710+ $ amp_split_wgtdis_d(iamp).eq.0d0) cycle
711+ call amp_split_pos_to_orders(iamp, orders)
712+ QCD_power=orders(qcd_pos)
713+ wgtcpower=0d0
714+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
715+ orders_tag=get_orders_tag(orders)
716+ g22=g**(QCD_power)
717+ if (replace_MC_subt.gt.0d0) then
718+ wgt1=-amp_split(iamp)*s_sc/g22*replace_MC_subt
719+ call add_wgt(10,orders,-wgt1*f_sc_MC_H,0d0,0d0)
720+ wgt1=wgt1*f_sc_MC_S
721+ else
722+ wgt1=0d0
723+ endif
724+ if (xi_i_fks_cnt(1).lt.xiScut_used .and.
725+ $ y_ij_fks_ev.gt.1d0-deltaS) then
726+ wgt1=wgt1+amp_split(iamp)*s_sc*f_sc/g22
727+ wgt1=wgt1+
728+ $ (-(amp_split_wgtdegrem_xi(iamp)+amp_split_wgtdis_p(iamp)+
729+ $ (amp_split_wgtdegrem_lxi(iamp)+amp_split_wgtdis_l(iamp))
730+ $ *log(xi_i_fks_cnt(1)))*f_dsc(1)-
731+ $ (amp_split_wgtdegrem_xi(iamp)*f_dsc(2)+
732+ $ amp_split_wgtdegrem_lxi(iamp)*f_dsc(3))+
733+ $ amp_split_wgtdis_d(iamp)*f_dis_d+
734+ $ amp_split_wgtdis_p(iamp)*f_dis_p+
735+ $ amp_split_wgtdis_l(iamp)*f_dis_l)/g22
736+ wgt3=-amp_split_wgtdegrem_muF(iamp)*f_dsc(4)/g22
737+ else
738+ wgt3=0d0
739+ endif
740+ if (wgt1.ne.0d0 .or. wgt3.ne.0d0) call add_wgt(6,orders,wgt1,0d0,wgt3)
741+ enddo
742+
743+ call cpu_time(tAfter)
744+ tCount=tCount+(tAfter-tBefore)
745+ return
746+ end
747+
748+ subroutine compute_MC_subt_term(p,gfactsf,gfactcl,probne)
749+ use extra_weights
750+ implicit none
751+c This subroutine computes the MonteCarlo subtraction terms and adds
752+c their values to the list of weights using the add_wgt subroutine. It
753+c returns the values for the gfactsf, gfactcl and probne to check if we
754+c need to include the FKS subtraction terms as replacements in the soft
755+c and collinear limits and the Sudakov damping for the real-emission,
756+c respectively.
757+ include 'nexternal.inc'
758+ include 'madfks_mcatnlo.inc'
759+ include 'timing_variables.inc'
760+ include 'coupl.inc'
761+ include 'orders.inc'
762+ integer nofpartners,i
763+ double precision p(0:3,nexternal),gfactsf,gfactcl,probne,fks_Sij
764+ $ ,sevmc,dummy,zhw(nexternal),xmcxsec(nexternal),g22,wgt1
765+ $ ,xlum_mc_fact,fks_Hij
766+ external fks_Sij,fks_Hij
767+ logical lzone(nexternal),flagmc
768+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
769+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
770+ double precision xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev(0:3)
771+ $ ,p_i_fks_cnt(0:3,-2:2)
772+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
773+ integer i_fks,j_fks
774+ common/fks_indices/i_fks,j_fks
775+ double precision xm12
776+ integer ileg
777+ common/cscaleminmax/xm12,ileg
778+ integer fks_j_from_i(nexternal,0:nexternal)
779+ & ,particle_type(nexternal),pdg_type(nexternal)
780+ common /c_fks_inc/fks_j_from_i,particle_type,pdg_type
781+ logical MCcntcalled
782+ common/c_MCcntcalled/MCcntcalled
783+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
784+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
785+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
786+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
787+ integer iamp
788+ integer orders(nsplitorders)
789+ double precision amp_split_xmcxsec(amp_split_size,nexternal)
790+ common /to_amp_split_xmcxsec/amp_split_xmcxsec
791+ integer get_orders_tag
792+ integer n_MC_subt_diverge
793+ common/counter_subt_diverge/n_MC_subt_diverge
794+ call cpu_time(tBefore)
795+ if (f_MC_S.eq.0d0 .and. f_MC_H.eq.0d0) return
796+ if(UseSfun)then
797+ sevmc = fks_Sij(p,i_fks,j_fks,xi_i_fks_ev,y_ij_fks_ev)
798+ else
799+ sevmc = fks_Hij(p,i_fks,j_fks)
800+ endif
801+ if (sevmc.eq.0d0) return
802+ call xmcsubt(p,xi_i_fks_ev,y_ij_fks_ev,gfactsf,gfactcl,probne,
803+ $ dummy,nofpartners,lzone,flagmc,zhw,xmcxsec)
804+ MCcntcalled=.true.
805+ if (flagmc) then
806+ if(ileg.gt.4 .or. ileg.lt.1)then
807+ write(*,*)'Error: unrecognized ileg in compute_MC_subt_term'
808+ & ,ileg
809+ stop 1
810+ endif
811+ do i=1,nofpartners
812+ if(lzone(i))then
813+ call get_mc_lum(j_fks,zhw(i),xi_i_fks_ev,xlum_mc_fact)
814+ do iamp=1, amp_split_size
815+ if (amp_split_xmcxsec(iamp,i).eq.0d0) cycle
816+ call amp_split_pos_to_orders(iamp, orders)
817+ QCD_power=orders(qcd_pos)
818+ wgtcpower=0d0
819+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
820+ orders_tag=get_orders_tag(orders)
821+ g22=g**(QCD_power)
822+ wgt1=sevmc*f_MC_S*xlum_mc_fact*
823+ & amp_split_xmcxsec(iamp,i)/g22
824+ call add_wgt(12,orders,wgt1,0d0,0d0)
825+ wgt1=sevmc*f_MC_H*xlum_mc_fact*
826+ & amp_split_xmcxsec(iamp,i)/g22
827+ call add_wgt(13,orders,-wgt1,0d0,0d0)
828+ enddo
829+ endif
830+ enddo
831+ endif
832+ if( (.not.flagmc) .and. gfactsf.eq.1.d0 .and.
833+ $ xi_i_fks_ev.lt.0.02d0 .and. particle_type(i_fks).eq.8 )then
834+ n_MC_subt_diverge=n_MC_subt_diverge+1
835+ endif
836+ call cpu_time(tAfter)
837+ t_MC_subt=t_MC_subt+(tAfter-tBefore)
838+ return
839+ end
840+
841+
842+ logical function pdg_equal(pdg1,pdg2)
843+c Returns .true. if the lists of PDG codes --'pdg1' and 'pdg2'-- are
844+c equal.
845+ implicit none
846+ include 'nexternal.inc'
847+ integer i,pdg1(nexternal),pdg2(nexternal)
848+ pdg_equal=.true.
849+ do i=1,nexternal
850+ if (pdg1(i).ne.pdg2(i)) then
851+ pdg_equal=.false.
852+ return
853+ endif
854+ enddo
855+ end
856+
857+ logical function momenta_equal(p1,p2)
858+c Returns .true. only if the momenta p1 and p2 are equal. To save time,
859+c it only checks the 0th and 3rd components (energy and z-direction).
860+ implicit none
861+ include 'nexternal.inc'
862+ integer i,j
863+ double precision p1(0:3,nexternal),p2(0:3,nexternal),vtiny
864+ parameter (vtiny=1d-8)
865+ momenta_equal=.true.
866+ do i=1,nexternal
867+ do j=0,3,3
868+ if (p1(j,i).eq.0d0 .or. p2(j,i).eq.0d0) then
869+ if (abs(p1(j,i)-p2(j,i)).gt.vtiny) then
870+ momenta_equal=.false.
871+ return
872+ endif
873+ else
874+ if (abs((p1(j,i)-p2(j,i))/
875+ $ max(abs(p1(j,i)),abs(p2(j,i)))).gt.vtiny) then
876+ momenta_equal=.false.
877+ return
878+ endif
879+ endif
880+ enddo
881+ enddo
882+ end
883+
884+ logical function momenta_equal_uborn(p1,p2,jfks1,ifks1,jfks2
885+ $ ,ifks2)
886+c Returns .true. only if the momenta p1 and p2 are equal, but with the
887+c momenta of i_fks and j_fks summed. To save time, it only checks the
888+c 0th and 3rd components (energy and z-direction).
889+ implicit none
890+ include 'nexternal.inc'
891+ integer i,j,jfks1,ifks1,jfks2,ifks2
892+ double precision p1(0:3,nexternal),p2(0:3,nexternal),vtiny,pb1(0:3
893+ $ ,nexternal),pb2(0:3,nexternal)
894+ logical momenta_equal
895+ external momenta_equal
896+ parameter (vtiny=1d-8)
897+c Fill the underlying Born momenta pb1 and pb2
898+ do i=1,nexternal
899+ do j=0,3,3 ! skip x and y components, since they are not used in
900+ ! the 'momenta_equal' function
901+ if (i.lt.ifks1) then
902+ pb1(j,i)=p1(j,i)
903+ elseif (i.eq.ifks1) then
904+c Sum the i_fks to the j_fks momenta (i_fks is always greater than
905+c j_fks, so this is fine: it will NOT be overwritten later in the
906+c do-loop)
907+ pb1(j,jfks1)=pb1(j,jfks1)+p1(j,i)
908+ pb1(j,nexternal)=0d0 ! fill the final one with zero's
909+ else
910+ pb1(j,i-1)=p1(j,i) ! skip the i_fks momenta
911+ endif
912+ if (i.lt.ifks2) then
913+ pb2(j,i)=p2(j,i)
914+ elseif (i.eq.ifks2) then
915+ pb2(j,jfks2)=pb2(j,jfks2)+p2(j,i) ! sum i_fks to j_fks momenta
916+ pb2(j,nexternal)=0d0 ! fill the final one with zero's
917+ else
918+ pb2(j,i-1)=p2(j,i) ! skip the i_fks momenta
919+ endif
920+ enddo
921+ enddo
922+c Check if they are equal
923+ momenta_equal_uborn=momenta_equal(pb1,pb2)
924+ end
925+
926+ subroutine set_FxFx_scale(iterm,p)
927+c Sets the FxFx cluster scale and multiplies the f_* factors (computed
928+c by 'compute_prefactors_nbody' and 'compute_prefactors_n1body') by the
929+c Sudakov suppression. If called more than once with the same momenta
930+c and iterm, skip setting of the scales, and multiply the f_* factors by
931+c the cached Sudakovs.
932+c iterm= 0 : reset the computation of the Sudakovs
933+c iterm= 1 : Sudakov for n-body kinematics (f_b and f_nb)
934+c iterm= 2 : Sudakov for n-body kinematics (all but f_b and f_nb)
935+c iterm= 3 : Sudakov for n+1-body kinematics
936+c iterm= -1 or -2 : only restore scales for n-body w/o recomputing
937+c iterm= -3 : only restore scales for n+1-body w/o recomputing
938+ implicit none
939+ include 'nexternal.inc'
940+ include 'run.inc'
941+ include 'timing_variables.inc'
942+ integer iterm,iterm_last_izero,iterm_last_mohdr,i,j
943+ & ,nfxfx_ren_scales_izero,nfxfx_ren_scales_mohdr
944+ double precision p(0:3,nexternal),p_last_izero(0:3,nexternal)
945+ & ,p_last_mohdr(0:3,nexternal),rewgt,rewgt_izero,rewgt_mohdr
946+ & ,rewgt_exp_izero,rewgt_exp_mohdr
947+ & ,fxfx_ren_scales_izero(0:nexternal),fxfx_fac_scale_izero(2)
948+ & ,fxfx_ren_scales_mohdr(0:nexternal),fxfx_fac_scale_mohdr(2)
949+ logical setclscales,rewgt_izero_calculated,rewgt_mohdr_calculated
950+ & ,momenta_equal,already_set
951+ external setclscales,rewgt,momenta_equal
952+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
953+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
954+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
955+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
956+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
957+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
958+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
959+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
960+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
961+ double precision f_b,f_nb
962+ common /factor_nbody/ f_b,f_nb
963+ double precision fxfx_exp_rewgt
964+ common /c_fxfx_exp_regt/ fxfx_exp_rewgt
965+ integer nFxFx_ren_scales
966+ double precision FxFx_ren_scales(0:nexternal),
967+ $ FxFx_fac_scale(2)
968+ common/c_FxFx_scales/FxFx_ren_scales,nFxFx_ren_scales,
969+ $ FxFx_fac_scale
970+ save rewgt_mohdr_calculated,rewgt_izero_calculated,p_last_izero
971+ & ,p_last_mohdr,iterm_last_izero,iterm_last_mohdr
972+ & ,fxfx_ren_scales_izero ,fxfx_ren_scales_mohdr
973+ & ,fxfx_fac_scale_izero ,fxfx_fac_scale_mohdr
974+ & ,nfxfx_ren_scales_izero ,nfxfx_ren_scales_mohdr
975+ call cpu_time(tBefore)
976+ ktscheme=1
977+ if (iterm.eq.0) then
978+ rewgt_mohdr_calculated=.false.
979+ rewgt_izero_calculated=.false.
980+ fxfx_exp_rewgt=0d0
981+ return
982+ endif
983+ already_set=.false.
984+ if (iterm.eq.1 .or. iterm.eq.2) then
985+c n-body momenta FxFx Sudakov factor (i.e. for S-events)
986+ if (rewgt_izero_calculated) then
987+ if (iterm_last_izero.ne.1 .and. iterm_last_izero.ne.2) then
988+ if (momenta_equal(p1_cnt(0,1,0),p_last_izero)) then
989+ already_set=.true.
990+ endif
991+ endif
992+ endif
993+ if (.not.already_set) then
994+ if (.not. setclscales(p1_cnt(0,1,0))) then
995+ write (*,*) 'ERROR in setclscales izero'
996+ stop 1
997+ endif
998+ rewgt_izero=min(rewgt(p1_cnt(0,1,0),rewgt_exp_izero),1d0)
999+ fxfx_exp_rewgt=min(rewgt_exp_izero,0d0)
1000+ endif
1001+ rewgt_izero_calculated=.true.
1002+ iterm_last_izero=iterm
1003+ do i=1,nexternal
1004+ do j=0,3
1005+ p_last_izero(j,i)=p1_cnt(j,i,0)
1006+ enddo
1007+ enddo
1008+ if (iterm.eq.1) then
1009+ f_b =f_b *rewgt_izero
1010+ f_nb=f_nb*rewgt_izero
1011+ elseif(iterm.eq.2) then
1012+ f_s =f_s *rewgt_izero
1013+ f_c =f_c *rewgt_izero
1014+ f_dc=f_dc*rewgt_izero
1015+ f_sc=f_sc*rewgt_izero
1016+ do i=1,4
1017+ f_dsc(i)=f_dsc(i)*rewgt_izero
1018+ enddo
1019+ f_MC_S =f_MC_S *rewgt_izero
1020+ f_s_MC_S =f_s_MC_S *rewgt_izero
1021+ f_c_MC_S =f_c_MC_S *rewgt_izero
1022+ f_sc_MC_S=f_sc_MC_S*rewgt_izero
1023+ endif
1024+ nFxFx_ren_scales_izero=nFxFx_ren_scales
1025+ do i=0,nexternal
1026+ FxFx_ren_scales_izero(i)=FxFx_ren_scales(i)
1027+ enddo
1028+ do i=1,2
1029+ FxFx_fac_scale_izero(i)=FxFx_fac_scale(i)
1030+ enddo
1031+ elseif (iterm.eq.3) then
1032+c n+1-body momenta FxFx Sudakov factor (i.e. for H-events)
1033+ if (rewgt_mohdr_calculated) then
1034+ if (iterm.eq.iterm_last_mohdr) then
1035+ if (momenta_equal(p,p_last_mohdr)) then
1036+ already_set=.true.
1037+ endif
1038+ endif
1039+ endif
1040+ if (.not. already_set) then
1041+ if (.not. setclscales(p)) then
1042+ write (*,*) 'ERROR in setclscales mohdr'
1043+ stop 1
1044+ endif
1045+ rewgt_mohdr=min(rewgt(p,rewgt_exp_mohdr),1d0)
1046+ endif
1047+ rewgt_mohdr_calculated=.true.
1048+ iterm_last_mohdr=iterm
1049+ do i=1,nexternal
1050+ do j=0,3
1051+ p_last_mohdr(j,i)=p(j,i)
1052+ enddo
1053+ enddo
1054+ f_r=f_r*rewgt_mohdr
1055+ f_MC_H =f_MC_H *rewgt_mohdr
1056+ f_s_MC_H =f_s_MC_H *rewgt_izero
1057+ f_c_MC_H =f_c_MC_H *rewgt_izero
1058+ f_sc_MC_H=f_sc_MC_H*rewgt_izero
1059+ nFxFx_ren_scales_mohdr=nFxFx_ren_scales
1060+ do i=0,nexternal
1061+ FxFx_ren_scales_mohdr(i)=FxFx_ren_scales(i)
1062+ enddo
1063+ do i=1,2
1064+ FxFx_fac_scale_mohdr(i)=FxFx_fac_scale(i)
1065+ enddo
1066+ call cpu_time(tAfter)
1067+ tFxFx=tFxFx+(tAfter-tBefore)
1068+ return
1069+ elseif (iterm.eq.-1 .or. iterm.eq.-2) then
1070+c Restore scales for the n-body FxFx terms
1071+ nFxFx_ren_scales=nFxFx_ren_scales_izero
1072+ do i=0,nexternal
1073+ FxFx_ren_scales(i)=FxFx_ren_scales_izero(i)
1074+ enddo
1075+ do i=1,2
1076+ FxFx_fac_scale(i)=FxFx_fac_scale_izero(i)
1077+ enddo
1078+ elseif (iterm.eq.-3) then
1079+c Restore scales for the n+1-body FxFx terms
1080+ nFxFx_ren_scales=nFxFx_ren_scales_mohdr
1081+ do i=0,nexternal
1082+ FxFx_ren_scales(i)=FxFx_ren_scales_mohdr(i)
1083+ enddo
1084+ do i=1,2
1085+ FxFx_fac_scale(i)=FxFx_fac_scale_mohdr(i)
1086+ enddo
1087+ else
1088+ write (*,*) 'ERROR: unknown iterm in set_FxFx_scale',iterm
1089+ stop 1
1090+ endif
1091+ call cpu_time(tAfter)
1092+ tFxFx=tFxFx+(tAfter-tBefore)
1093+ return
1094+ end
1095+
1096+
1097+ subroutine compute_prefactors_nbody(vegas_wgt)
1098+c Compute all the relevant prefactors for the Born and the soft-virtual,
1099+c i.e. all the nbody contributions. Also initialises the plots and
1100+c bpower.
1101+ use extra_weights
1102+ use mint_module
1103+ implicit none
1104+ include 'nexternal.inc'
1105+ include 'run.inc'
1106+ include 'genps.inc'
1107+ include 'timing_variables.inc'
1108+ double precision pi,vegas_wgt
1109+ integer i
1110+ logical firsttime
1111+ data firsttime /.true./
1112+ parameter (pi=3.1415926535897932385d0)
1113+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
1114+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
1115+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
1116+ double precision xinorm_ev
1117+ common /cxinormev/xinorm_ev
1118+ double precision xiimax_ev
1119+ common /cxiimaxev/xiimax_ev
1120+ double precision xiScut_used,xiBSVcut_used
1121+ common /cxiScut_used/xiScut_used,xiBSVcut_used
1122+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1123+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1124+ double precision fkssymmetryfactor,fkssymmetryfactorBorn,
1125+ $ fkssymmetryfactorDeg
1126+ integer ngluons,nquarks(-6:6),nphotons
1127+ common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
1128+ & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
1129+ double precision f_b,f_nb
1130+ common /factor_nbody/ f_b,f_nb
1131+ integer iappl
1132+ common /for_applgrid/ iappl
1133+ logical needrndec
1134+ parameter (needrndec=.false.)
1135+ real*8 ran2
1136+ external ran2
1137+ real*8 rndec(10)
1138+ common/crndec/rndec
1139+ include "appl_common.inc"
1140+ !!!include "orders.inc"
1141+ call cpu_time(tBefore)
1142+c Random numbers to be used in the plotting routine: these numbers will
1143+c not change between events, counter events and n-body contributions.
1144+ if(needrndec)then
1145+ do i=1,10
1146+ rndec(i)=ran2()
1147+ enddo
1148+ endif
1149+ if (firsttime) then
1150+ if (iappl.ne.0) appl_amp_split_size = amp_split_size
1151+c Initialize hiostograms for fixed order runs
1152+ if (fixed_order) call initplot
1153+ firsttime=.false.
1154+ endif
1155+ call set_cms_stuff(0)
1156+c f_* multiplication factors for Born and nbody
1157+ f_b=jac_cnt(0)*xinorm_ev/(min(xiimax_ev,xiBSVcut_used)*shat/(16
1158+ $ *pi**2))*fkssymmetryfactorBorn*vegas_wgt
1159+ f_nb=f_b
1160+ call cpu_time(tAfter)
1161+ tf_nb=tf_nb+(tAfter-tBefore)
1162+ return
1163+ end
1164+
1165+
1166+ subroutine include_multichannel_enhance(imode)
1167+ implicit none
1168+ include 'nexternal.inc'
1169+ include 'run.inc'
1170+ include 'genps.inc'
1171+ include 'timing_variables.inc'
1172+ double precision xnoborn_cnt,xtot,wgt_c,enhance,enhance_real
1173+ $ ,pas(0:3,nexternal)
1174+ data xnoborn_cnt /0d0/
1175+ integer inoborn_cnt,i,imode
1176+ data inoborn_cnt /0/
1177+ double precision p_born(0:3,nexternal-1)
1178+ common/pborn/ p_born
1179+ double precision p_born_ev(0:3,nexternal-1)
1180+ common/pborn_ev/ p_born_ev
1181+ double precision p_ev(0:3,nexternal)
1182+ common/pev/ p_ev
1183+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
1184+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
1185+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
1186+ integer mapconfig(0:lmaxconfigs), iconfig
1187+ common/to_mconfigs/mapconfig, iconfig
1188+ Double Precision amp2(ngraphs), jamp2(0:ncolor)
1189+ common/to_amps/ amp2, jamp2
1190+ double precision diagramsymmetryfactor
1191+ common /dsymfactor/diagramsymmetryfactor
1192+ double precision f_b,f_nb
1193+ common /factor_nbody/ f_b,f_nb
1194+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
1195+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
1196+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1197+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1198+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1199+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1200+ double precision f_dis_d,f_dis_p,f_dis_l
1201+ common/factor_dis/f_dis_d,f_dis_p,f_dis_l
1202+ integer igranny,iaunt
1203+ logical granny_chain(-nexternal:nexternal),granny_is_res
1204+ & ,granny_chain_real_final(-nexternal:nexternal)
1205+ common /c_granny_res/igranny,iaunt,granny_is_res,granny_chain
1206+ & ,granny_chain_real_final
1207+ logical calculatedBorn
1208+ common/ccalculatedBorn/calculatedBorn
1209+
1210+ call cpu_time(tBefore)
1211+
1212+c Compute the multi-channel enhancement factor 'enhance'.
1213+ enhance=1.d0
1214+ if (p_born(0,1).gt.0d0) then
1215+ call sborn(p_born,wgt_c)
1216+ elseif(p_born(0,1).lt.0d0)then
1217+ enhance=0d0
1218+ endif
1219+ if (enhance.eq.0d0)then
1220+ xnoborn_cnt=xnoborn_cnt+1.d0
1221+ if(log10(xnoborn_cnt).gt.inoborn_cnt)then
1222+ write (*,*) 'WARNING: no Born momenta more than 10**',
1223+ $ inoborn_cnt,'times'
1224+ inoborn_cnt=inoborn_cnt+1
1225+ endif
1226+ else
1227+ xtot=0d0
1228+ if (mapconfig(0).eq.0) then
1229+ write (*,*) 'Fatal error in compute_prefactor_nbody:'/
1230+ & /' no Born diagrams ',mapconfig,
1231+ & '. Check bornfromreal.inc'
1232+ write (*,*) 'Is fks_singular compiled correctly?'
1233+ stop 1
1234+ endif
1235+ do i=1, mapconfig(0)
1236+ xtot=xtot+amp2(mapconfig(i))
1237+ enddo
1238+ if (xtot.ne.0d0) then
1239+ enhance=amp2(mapconfig(iconfig))/xtot
1240+ enhance=enhance*diagramsymmetryfactor
1241+ else
1242+ enhance=0d0
1243+ endif
1244+ endif
1245+
1246+c In the case there is the special phase-space mapping for resonances,
1247+c use the Born computed with those as the mapping.
1248+ enhance_real=1.d0
1249+ if (granny_is_res .and. imode.eq.2) then
1250+ if (p_born_ev(0,1).gt.0d0) then
1251+ calculatedBorn=.false.
1252+ pas(0:3,nexternal)=0d0
1253+ pas(0:3,1:nexternal-1)=p_born_ev(0:3,1:nexternal-1)
1254+ call set_alphas(pas)
1255+ call sborn(p_born_ev,wgt_c)
1256+ call set_alphas(p_ev)
1257+ calculatedBorn=.false.
1258+ elseif(p_born_ev(0,1).lt.0d0)then
1259+ if (enhance.ne.0d0) then
1260+ enhance_real=enhance
1261+ else
1262+ enhance_real=0d0
1263+ endif
1264+ endif
1265+c Compute the multi-channel enhancement factor 'enhance_real'.
1266+ if (enhance_real.eq.0d0)then
1267+ xnoborn_cnt=xnoborn_cnt+1.d0
1268+ if(log10(xnoborn_cnt).gt.inoborn_cnt)then
1269+ write (*,*) 'WARNING: no Born momenta more than 10**',
1270+ $ inoborn_cnt,'times'
1271+ inoborn_cnt=inoborn_cnt+1
1272+ endif
1273+ else
1274+ xtot=0d0
1275+ if (mapconfig(0).eq.0) then
1276+ write (*,*) 'Fatal error in compute_prefactor_n1body,'/
1277+ & /' no Born diagrams ',mapconfig
1278+ & ,'. Check bornfromreal.inc'
1279+ write (*,*) 'Is fks_singular compiled correctly?'
1280+ stop 1
1281+ endif
1282+ do i=1, mapconfig(0)
1283+ xtot=xtot+amp2(mapconfig(i))
1284+ enddo
1285+ if (xtot.ne.0d0) then
1286+ enhance_real=amp2(mapconfig(iconfig))/xtot
1287+ enhance_real=enhance_real*diagramsymmetryfactor
1288+ else
1289+ enhance_real=0d0
1290+ endif
1291+ endif
1292+ else
1293+ enhance_real=enhance
1294+ endif
1295+
1296+ if (imode.eq.1) then
1297+ f_b= f_b *enhance
1298+ f_nb= f_nb *enhance
1299+ elseif(imode.eq.2) then
1300+ f_r= f_r *enhance_real
1301+ elseif(imode.eq.4) then
1302+ f_MC_S= f_MC_S *enhance
1303+ f_MC_H= f_MC_H *enhance
1304+ elseif(imode.eq.3) then
1305+ f_s= f_s *enhance
1306+ f_s_MC_S= f_s_MC_S *enhance
1307+ f_S_MC_H= f_S_MC_H *enhance
1308+ f_c= f_c *enhance
1309+ f_c_MC_S= f_c_MC_S *enhance
1310+ f_c_MC_H= f_c_MC_H *enhance
1311+ f_dc= f_dc *enhance
1312+ f_sc= f_sc *enhance
1313+ f_sc_MC_S=f_sc_MC_S*enhance
1314+ f_sc_MC_H=f_sc_MC_H*enhance
1315+ f_dsc(1)= f_dsc(1) *enhance
1316+ f_dsc(2)= f_dsc(2) *enhance
1317+ f_dsc(3)= f_dsc(3) *enhance
1318+ f_dsc(4)= f_dsc(4) *enhance
1319+ f_dis_d= f_dis_d *enhance
1320+ f_dis_p= f_dis_p *enhance
1321+ f_dis_l= f_dis_l *enhance
1322+ endif
1323+ call cpu_time(tAfter)
1324+ tf_nb=tf_nb+(tAfter-tBefore)
1325+
1326+ return
1327+ end
1328+
1329+
1330+ subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
1331+c Compute all relevant prefactors for the real emission and counter
1332+c terms.
1333+ implicit none
1334+ include 'nexternal.inc'
1335+ include 'run.inc'
1336+ include 'genps.inc'
1337+ include 'fks_powers.inc'
1338+ include 'coupl.inc'
1339+ include 'timing_variables.inc'
1340+ double precision vegas_wgt,prefact,prefact_cnt_ssc,prefact_deg
1341+ $ ,prefact_c,prefact_coll,jac_ev,pi,prefact_cnt_ssc_c
1342+ $ ,prefact_coll_c,prefact_deg_slxi,prefact_deg_sxi,zero
1343+ integer i
1344+ parameter (pi=3.1415926535897932385d0, ZERO=0d0)
1345+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
1346+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
1347+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
1348+ double precision xi_i_fks_ev,y_ij_fks_ev
1349+ double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
1350+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
1351+ integer i_fks,j_fks
1352+ common/fks_indices/i_fks,j_fks
1353+ double precision xi_i_fks_cnt(-2:2)
1354+ common /cxiifkscnt/xi_i_fks_cnt
1355+ double precision xinorm_ev
1356+ common /cxinormev/xinorm_ev
1357+ double precision xiimax_ev
1358+ common /cxiimaxev/xiimax_ev
1359+ double precision xiimax_cnt(-2:2)
1360+ common /cxiimaxcnt/xiimax_cnt
1361+ double precision xinorm_cnt(-2:2)
1362+ common /cxinormcnt/xinorm_cnt
1363+ double precision delta_used
1364+ common /cdelta_used/delta_used
1365+ double precision xicut_used
1366+ common /cxicut_used/xicut_used
1367+ double precision xiScut_used,xiBSVcut_used
1368+ common /cxiScut_used/xiScut_used,xiBSVcut_used
1369+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1370+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1371+ double precision fkssymmetryfactor,fkssymmetryfactorBorn,
1372+ & fkssymmetryfactorDeg
1373+ integer ngluons,nquarks(-6:6),nphotons
1374+ common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
1375+ & fkssymmetryfactorDeg,ngluons,nquarks,nphotons
1376+ logical nocntevents
1377+ common/cnocntevents/nocntevents
1378+ double precision f_r,f_s,f_c,f_dc,f_sc,f_dsc(4)
1379+ common/factor_n1body/f_r,f_s,f_c,f_dc,f_sc,f_dsc
1380+ double precision f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1381+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1382+ common/factor_n1body_NLOPS/f_s_MC_S,f_s_MC_H,f_c_MC_S,f_c_MC_H
1383+ $ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
1384+ ! prefactors for the DIS scheme
1385+ double precision prefact_dis_d,prefact_dis_p,prefact_dis_l
1386+ double precision f_dis_d,f_dis_p,f_dis_l
1387+ common/factor_dis/f_dis_d,f_dis_p,f_dis_l
1388+ double precision pmass(nexternal)
1389+ include 'pmass.inc'
1390+ call cpu_time(tBefore)
1391+
1392+c f_* multiplication factors for real-emission, soft counter, ... etc.
1393+ prefact=xinorm_ev/xi_i_fks_ev/(1-y_ij_fks_ev)
1394+ f_r=prefact*jac_ev*fkssymmetryfactor*vegas_wgt
1395+ f_MC_S=f_r
1396+ f_MC_H=f_r
1397+ if (.not.nocntevents) then
1398+ prefact_cnt_ssc=xinorm_ev/min(xiimax_ev,xiScut_used)*
1399+ $ log(xicut_used/min(xiimax_ev,xiScut_used))/(1
1400+ $ -y_ij_fks_ev)
1401+ f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)
1402+ $ *fkssymmetryfactor*vegas_wgt
1403+ f_s_MC_S=prefact*jac_cnt(0)
1404+ $ *fkssymmetryfactor*vegas_wgt
1405+ f_s_MC_H=f_s_MC_S
1406+
1407+ if (pmass(j_fks).eq.0d0) then
1408+c For the soft-collinear, these should be itwo. But they are always
1409+c equal to ione, so no need to define separate factors.
1410+ prefact_c=xinorm_cnt(1)/xi_i_fks_cnt(1)/(1-y_ij_fks_ev)
1411+ prefact_coll=xinorm_cnt(1)/xi_i_fks_cnt(1)*log(delta_used
1412+ $ /deltaS)/deltaS
1413+ f_c=(prefact_c+prefact_coll)*jac_cnt(1)
1414+ $ *fkssymmetryfactor*vegas_wgt
1415+ f_c_MC_S=prefact_c*jac_cnt(1)
1416+ $ *fkssymmetryfactor*vegas_wgt
1417+ f_c_MC_H=f_c_MC_S
1418+
1419+ call set_cms_stuff(1)
1420+ prefact_deg=xinorm_cnt(1)/xi_i_fks_cnt(1)/deltaS
1421+ prefact_cnt_ssc_c=xinorm_cnt(1)/min(xiimax_cnt(1)
1422+ & ,xiScut_used)*log(xicut_used/min(xiimax_cnt(1)
1423+ & ,xiScut_used))*1/(1-y_ij_fks_ev)
1424+ prefact_coll_c=xinorm_cnt(1)/min(xiimax_cnt(1),xiScut_used)
1425+ $ *log(xicut_used/min(xiimax_cnt(1),xiScut_used))
1426+ $ *log(delta_used/deltaS)/deltaS
1427+ f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))
1428+ $ *fkssymmetryfactorDeg*vegas_wgt
1429+ f_sc=(prefact_c+prefact_coll+prefact_cnt_ssc_c
1430+ & +prefact_coll_c)*jac_cnt(2)
1431+ & *fkssymmetryfactorDeg*vegas_wgt
1432+ f_sc_MC_S=prefact_c*jac_cnt(2)
1433+ $ *fkssymmetryfactor*vegas_wgt
1434+ f_sc_MC_H=f_sc_MC_S
1435+
1436+ call set_cms_stuff(2)
1437+ prefact_deg_sxi=xinorm_cnt(1)/min(xiimax_cnt(1),xiScut_used)
1438+ & *log(xicut_used/min(xiimax_cnt(1),xiScut_used))*1
1439+ & /deltaS
1440+ prefact_deg_slxi=xinorm_cnt(1)/min(xiimax_cnt(1)
1441+ & ,xiScut_used)*( log(xicut_used)**2
1442+ & -log(min(xiimax_cnt(1),xiScut_used))**2 )*1/(2.d0
1443+ & *deltaS)
1444+ f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))
1445+ & *fkssymmetryfactorDeg*vegas_wgt
1446+ f_dsc(2)=prefact_deg_sxi*jac_cnt(2)/(shat/(32*pi**2))
1447+ & *fkssymmetryfactorDeg*vegas_wgt
1448+ f_dsc(3)=prefact_deg_slxi*jac_cnt(2)/(shat/(32*pi**2))
1449+ & *fkssymmetryfactorDeg*vegas_wgt
1450+ f_dsc(4)=( prefact_deg+prefact_deg_sxi )*jac_cnt(2)/(shat
1451+ & /(32*pi**2))*fkssymmetryfactorDeg
1452+ & *vegas_wgt
1453+ ! prefactor for the DIS scheme
1454+ prefact_dis_d=xinorm_cnt(1)/xiScut_used/deltaS
1455+ f_dis_d=prefact_dis_d*jac_cnt(2)/(shat/(32*pi**2))
1456+ & *fkssymmetryfactorDeg*vegas_wgt
1457+ prefact_dis_p=xinorm_cnt(1)*dlog(xiScut_used)/xiScut_used/deltaS
1458+ f_dis_p=prefact_dis_p*jac_cnt(2)/(shat/(32*pi**2))
1459+ & *fkssymmetryfactorDeg*vegas_wgt
1460+ prefact_dis_l=xinorm_cnt(1)*dlog(xiScut_used)**2/2d0/xiScut_used/deltaS
1461+ f_dis_l=prefact_dis_l*jac_cnt(2)/(shat/(32*pi**2))
1462+ & *fkssymmetryfactorDeg*vegas_wgt
1463+ else
1464+ f_c=0d0
1465+ f_dc=0d0
1466+ f_sc=0d0
1467+ do i=1,4
1468+ f_dsc(i)=0d0
1469+ enddo
1470+ f_c_MC_S=0d0
1471+ f_c_MC_H=0d0
1472+ f_sc_MC_S=0d0
1473+ f_sc_MC_H=0d0
1474+ endif
1475+ else
1476+ f_s=0d0
1477+ f_c=0d0
1478+ f_dc=0d0
1479+ f_sc=0d0
1480+ do i=1,4
1481+ f_dsc(i)=0d0
1482+ enddo
1483+ f_s_MC_S=0d0
1484+ f_s_MC_H=0d0
1485+ f_c_MC_S=0d0
1486+ f_c_MC_H=0d0
1487+ f_sc_MC_S=0d0
1488+ f_sc_MC_H=0d0
1489+ endif
1490+ call cpu_time(tAfter)
1491+ tf_all=tf_all+(tAfter-tBefore)
1492+ return
1493+ end
1494+
1495+
1496+ subroutine add_wgt(type,orders,wgt1,wgt2,wgt3)
1497+c Adds a contribution to the list in weight_lines. 'type' sets the type
1498+c of the contribution and wgt1..wgt3 are the coefficients multiplying
1499+c the logs. The arguments are:
1500+c type=1 : real-emission
1501+c type=2 : Born
1502+c type=3 : integrated counter terms
1503+c type=4 : soft counter-term
1504+c type=5 : collinear counter-term
1505+c type=6 : soft-collinear counter-term
1506+c type=7 : O(alphaS) expansion of Sudakov factor for NNLL+NLO
1507+c type=8 : soft counter-term (with n+1-body kin.)
1508+c type=9 : collinear counter-term (with n+1-body kin.)
1509+c type=10: soft-collinear counter-term (with n+1-body kin.)
1510+c type=11: real-emission (with n-body kin.)
1511+c type=12: MC subtraction with n-body kin.
1512+c type=13: MC subtraction with n+1-body kin.
1513+c type=14: virtual corrections
1514+c type=15: virt-trick: average born contribution
1515+c wgt1 : weight of the contribution not multiplying a scale log
1516+c wgt2 : coefficient of the weight multiplying the log[mu_R^2/Q^2]
1517+c wgt3 : coefficient of the weight multiplying the log[mu_F^2/Q^2]
1518+c
1519+c
1520+c The argument orders specifies what are the squared coupling orders
1521+c factorizing the particular set of weights added here. The position of
1522+c the QCD and QED orders there can be obtained via the parameter qcd_pos
1523+c and qed_pos defined in orders.inc
1524+c This is solely used for now in order to apply a potential user-defined filer.
1525+c
1526+c This subroutine increments the 'icontr' counter: each new call to this
1527+c function makes sure that it's considered a new contribution. For each
1528+c contribution, we save the
1529+c The type: itype(icontr)
1530+c The weights: wgt(1,icontr),wgt(2,icontr) and wgt(3,icontr) for
1531+c wgt1, wgt2 and wgt3, respectively.
1532+c The Bjorken x's: bjx(1,icontr), bjx(2,icontr)
1533+c The Ellis-Sexton scale squared used to compute the weight:
1534+c scales2(1,icontr)
1535+c The renormalisation scale squared used to compute the weight:
1536+c scales2(2,icontr)
1537+c The factorisation scale squared used to compute the weight:
1538+c scales2(3,icontr)
1539+c The value of the strong coupling: g_strong(icontr)
1540+c The FKS configuration: nFKS(icontr)
1541+c The boost to go from the momenta in the C.o.M. frame to the
1542+c laboratory frame: y_bst(icontr)
1543+c The power of the strong coupling (g_strong) for the current
1544+c weight: QCDpower(icontr)
1545+c The momenta: momenta(j,i,icontr). For the Born contribution, the
1546+c counter-term momenta are used. This is okay for any IR-safe
1547+c observables.
1548+c The PDG codes: pdg(i,icontr). Always the ones with length
1549+c 'nexternal' are used, because the momenta are also the
1550+c 'nexternal' ones. This is okay for IR-safe observables.
1551+c The PDG codes of the underlying Born process:
1552+c pdg_uborn(i,icontr). The PDGs of j_fks and i_fks are combined
1553+c to get the PDG code of the mother. The extra parton is given a
1554+c PDG=21 (gluon) code.
1555+c If the contribution belongs to an H-event or S-event:
1556+c H_event(icontr)
1557+c The weight of the born or real-emission matrix element
1558+c corresponding to this contribution: wgt_ME_tree. This weight does
1559+c include the 'ngluon' correction factor for the Born.
1560+c
1561+c Not set in this subroutine, but included in the weight_lines module
1562+c are the
1563+c wgts(iwgt,icontr) : weights including scale/PDFs/logs. These are
1564+c normalised so that they can be used directly to compute cross
1565+c sections and fill plots. 'iwgt' goes from 1 to the maximum
1566+c number of weights obtained from scale and PDF reweighting, with
1567+c the iwgt=1 element being the central value.
1568+c plot_id(icontr) : =20 for Born, 11 for real-emission and 12 for
1569+c anything else.
1570+c plot_wgts(iwgt,icontr) : same as wgts(), but only non-zero for
1571+c unique contributions and non-unique are added to the unique
1572+c ones. 'Unique' here is defined that they would be identical in
1573+c an analysis routine (i.e. same momenta and PDG codes)
1574+c shower_scale(icontr) : The preferred shower starting scale for
1575+c this contribution
1576+c niproc(icontr) : number of combined subprocesses in parton_lum_*.f
1577+c parton_iproc(iproc,icontr) : value of the PDF for the iproc
1578+c contribution
1579+c parton_pdg(nexternal,iproc,icontr) : value of the PDG codes for
1580+c the iproc contribution
1581+c ipr(icontr): for separate_flavour_configs: the iproc of current
1582+c contribution
1583+ use weight_lines
1584+ use extra_weights
1585+ use FKSParams
1586+ implicit none
1587+ include 'nexternal.inc'
1588+ include 'run.inc'
1589+ include 'genps.inc'
1590+ include 'coupl.inc'
1591+ include 'fks_info.inc'
1592+ include 'q_es.inc'
1593+ include 'orders.inc'
1594+ integer type,i,j
1595+ logical foundIt,foundOrders
1596+ double precision wgt1,wgt2,wgt3
1597+ integer orders(nsplitorders)
1598+ integer nFKSprocess
1599+ common/c_nFKSprocess/nFKSprocess
1600+ double precision p_born(0:3,nexternal-1)
1601+ common/pborn/ p_born
1602+ double precision p_ev(0:3,nexternal)
1603+ common/pev/ p_ev
1604+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1605+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
1606+ double precision p1_cnt(0:3,nexternal,-2:2),wgt_cnt(-2:2)
1607+ $ ,pswgt_cnt(-2:2),jac_cnt(-2:2)
1608+ common/counterevnts/p1_cnt,wgt_cnt,pswgt_cnt,jac_cnt
1609+ double precision fkssymmetryfactor,fkssymmetryfactorBorn,
1610+ & fkssymmetryfactorDeg
1611+ integer ngluons,nquarks(-6:6)
1612+ common/numberofparticles/fkssymmetryfactor,fkssymmetryfactorBorn,
1613+ & fkssymmetryfactorDeg,ngluons,nquarks
1614+ double precision wgt_ME_born,wgt_ME_real
1615+ common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real
1616+
1617+ if (wgt1.eq.0d0 .and. wgt2.eq.0d0 .and. wgt3.eq.0d0) return
1618+c Check for NaN's and INF's. Simply skip the contribution
1619+ if (wgt1.ne.wgt1) return
1620+ if (wgt2.ne.wgt2) return
1621+ if (wgt3.ne.wgt3) return
1622+
1623+C Apply user-defined (in FKS_params.dat) contribution type filters if necessary
1624+ if (VetoedContributionTypes(0).gt.0) then
1625+ do i=1,VetoedContributionTypes(0)
1626+ if (type.eq.VetoedContributionTypes(i)) then
1627+C This contribution was explicitely vetoed out by the user. Skip it.
1628+ return
1629+ endif
1630+ enddo
1631+ endif
1632+ if (SelectedContributionTypes(0).gt.0) then
1633+ foundIt = .False.
1634+ do i=1,SelectedContributionTypes(0)
1635+ if (type.eq.SelectedContributionTypes(i)) then
1636+ foundIt = .True.
1637+ exit
1638+ endif
1639+ enddo
1640+ if (.not.foundIt) then
1641+C This contribution was not part of the user selection. Skip it.
1642+ return
1643+ endif
1644+ endif
1645+
1646+C Apply the user-defined coupling-order filter if present
1647+C First the simple QCD and QED filters
1648+ if (QCD_squared_selected.ne.-1.and.
1649+ & QCD_squared_selected.ne.orders(qcd_pos)) then
1650+ return
1651+ endif
1652+ if (QED_squared_selected.ne.-1.and.
1653+ & QED_squared_selected.ne.orders(qed_pos)) then
1654+ return
1655+ endif
1656+C Secondly, the more advanced filter
1657+ if (SelectedCouplingOrders(1,0).gt.0) then
1658+ foundIt = .False.
1659+ do j=1,SelectedCouplingOrders(1,0)
1660+ foundOrders = .True.
1661+ do i=1,nsplitorders
1662+ if (SelectedCouplingOrders(i,j).ne.orders(i)) then
1663+ foundOrders = .False.
1664+ exit
1665+ endif
1666+ enddo
1667+ if (foundOrders) then
1668+ foundIt = .True.
1669+ exit
1670+ endif
1671+ enddo
1672+ if (.not.foundIt) then
1673+ return
1674+ endif
1675+ endif
1676+
1677+ icontr=icontr+1
1678+ call weight_lines_allocated(nexternal,icontr,max_wgt,max_iproc)
1679+ itype(icontr)=type
1680+ wgt(1,icontr)=wgt1
1681+ wgt(2,icontr)=wgt2
1682+ wgt(3,icontr)=wgt3
1683+ bjx(1,icontr)=xbk(1)
1684+ bjx(2,icontr)=xbk(2)
1685+ scales2(1,icontr)=QES2
1686+ scales2(2,icontr)=scale**2
1687+ scales2(3,icontr)=q2fact(1)
1688+ g_strong(icontr)=g
1689+ nFKS(icontr)=nFKSprocess
1690+ y_bst(icontr)=ybst_til_tolab
1691+ qcdpower(icontr)=QCD_power
1692+ cpower(icontr)=wgtcpower
1693+ orderstag(icontr)=orders_tag
1694+ ipr(icontr)=0
1695+ call set_pdg(icontr,nFKSprocess)
1696+
1697+c Compensate for the fact that in the Born matrix elements, we use the
1698+c identical particle symmetry factor of the corresponding real emission
1699+c matrix elements
1700+ wgt_ME_tree(1,icontr)=wgt_me_born
1701+ wgt_ME_tree(2,icontr)=wgt_me_real
1702+ do i=1,nexternal
1703+ do j=0,3
1704+ if (p1_cnt(0,1,0).gt.0d0) then
1705+ momenta_m(j,i,1,icontr)=p1_cnt(j,i,0)
1706+ elseif (p1_cnt(0,1,1).gt.0d0) then
1707+ momenta_m(j,i,1,icontr)=p1_cnt(j,i,1)
1708+ elseif (p1_cnt(0,1,2).gt.0d0) then
1709+ momenta_m(j,i,1,icontr)=p1_cnt(j,i,2)
1710+ else
1711+ if (i.lt.fks_i_d(nFKSprocess)) then
1712+ momenta_m(j,i,1,icontr)=p_born(j,i)
1713+ elseif(i.eq.fks_i_d(nFKSprocess)) then
1714+ momenta_m(j,i,1,icontr)=0d0
1715+ else
1716+ momenta_m(j,i,1,icontr)=p_born(j,i-1)
1717+ endif
1718+ endif
1719+ momenta_m(j,i,2,icontr)=p_ev(j,i)
1720+ enddo
1721+ enddo
1722+
1723+ if(type.eq.1 .or. type.eq. 8 .or. type.eq.9 .or. type.eq.10 .or.
1724+ & type.eq.13) then
1725+c real emission and n+1-body kin. contributions to counter terms and MC
1726+c subtr term
1727+ do i=1,nexternal
1728+ do j=0,3
1729+ momenta(j,i,icontr)=momenta_m(j,i,2,icontr)
1730+ enddo
1731+ enddo
1732+ H_event(icontr)=.true.
1733+ elseif(type.ge.2 .and. type.le.7 .or. type.eq.11 .or. type.eq.12
1734+ $ .or. type.eq.14 .or. type.eq.15)then
1735+c Born, counter term, soft-virtual, or n-body kin. contributions to real
1736+c and MC subtraction terms.
1737+ do i=1,nexternal
1738+ do j=0,3
1739+ momenta(j,i,icontr)=momenta_m(j,i,1,icontr)
1740+ enddo
1741+ enddo
1742+ H_event(icontr)=.false.
1743+ else
1744+ write (*,*) 'ERROR: unknown type in add_wgt',type
1745+ stop 1
1746+ endif
1747+ return
1748+ end
1749+
1750+
1751+ subroutine include_veto_multiplier
1752+ use weight_lines
1753+ use extra_weights
1754+ implicit none
1755+c Multiply all the weights by the NNLL-NLO jet veto Sudakov factors,
1756+c i.e., the term on the 2nd line of Eq.(20) of arXiv:1412.8408.
1757+ include 'nexternal.inc'
1758+ integer i,j
1759+ if (H1_factor_virt.ne.0d0) then
1760+ call compute_veto_multiplier(H1_factor_virt,1d0,1d0
1761+ & ,veto_multiplier)
1762+ do i=1,icontr
1763+ do j=1,3
1764+ wgt(j,i)=wgt(j,i)*veto_multiplier
1765+ enddo
1766+ enddo
1767+ else
1768+ veto_multiplier=1d0
1769+ endif
1770+ end
1771+
1772+ subroutine include_PDF_and_alphas
1773+c Multiply the saved wgt() info by the PDFs, alpha_S and the scale
1774+c dependence and saves the weights in the wgts() array. The weights in
1775+c this array are now correctly normalised to compute the cross section
1776+c or to fill histograms.
1777+ use weight_lines
1778+ use extra_weights
1779+ use mint_module
1780+ use FKSParams
1781+ implicit none
1782+ include 'nexternal.inc'
1783+ include 'run.inc'
1784+ include 'coupl.inc'
1785+ include 'timing_variables.inc'
1786+ include 'genps.inc'
1787+ include 'orders.inc'
1788+ integer orders(nsplitorders)
1789+ integer i,j,k,iamp,icontr_orig
1790+ logical virt_found
1791+ double precision xlum,dlum,pi,mu2_r,mu2_f,mu2_q,rwgt_muR_dep_fac
1792+ $ ,wgt_wo_pdf,conv
1793+ external rwgt_muR_dep_fac
1794+ parameter (pi=3.1415926535897932385d0)
1795+ external dlum
1796+ integer nFKSprocess
1797+ common/c_nFKSprocess/nFKSprocess
1798+ INTEGER IPROC
1799+ DOUBLE PRECISION PD(0:MAXPROC)
1800+ COMMON /SUBPROC/ PD, IPROC
1801+ parameter (conv=389379660d0) ! conversion to picobarns
1802+ call cpu_time(tBefore)
1803+ if (icontr.eq.0) return
1804+ virt_found=.false.
1805+c number of contributions before they are (possibly) increased through a
1806+c call to separate_flavour_config().
1807+ icontr_orig=icontr
1808+ i=0
1809+ do while (i.lt.icontr)
1810+ i=i+1
1811+ nFKSprocess=nFKS(i)
1812+ xbk(1) = bjx(1,i)
1813+ xbk(2) = bjx(2,i)
1814+ mu2_q=scales2(1,i)
1815+ mu2_r=scales2(2,i)
1816+ mu2_f=scales2(3,i)
1817+ q2fact(1)=mu2_f
1818+ q2fact(2)=mu2_f
1819+c call the PDFs
1820+ xlum = dlum()
1821+c iwgt=1 is the central value (i.e. no scale/PDF reweighting).
1822+ iwgt=1
1823+ call weight_lines_allocated(nexternal,max_contr,iwgt,iproc)
1824+c set_pdg_codes fills the niproc, parton_iproc, parton_pdg and
1825+c parton_pdg_uborn [Do only for the contributions that were already
1826+c available as part of the input -- NOT the ones that are created
1827+c through the call to separate_flavour_config(), since that will
1828+c overwrite the relevant information.]
1829+ if (i.le.icontr_orig) call set_pdg_codes(iproc,pd,nFKSprocess,i)
1830+ if (separate_flavour_configs .and. ipr(i).eq.0) then
1831+ call separate_flavour_config(i) ! this increases icontr
1832+ endif
1833+ if (separate_flavour_configs .and. ipr(i).ne.0) then
1834+ if (nincoming.eq.2) then
1835+ xlum=pd(ipr(i))*conv
1836+ else
1837+ xlum=pd(ipr(i))
1838+ endif
1839+ endif
1840+ wgt_wo_pdf=(wgt(1,i) + wgt(2,i)*log(mu2_r/mu2_q) + wgt(3,i)
1841+ & *log(mu2_f/mu2_q))*g_strong(i)**QCDpower(i)
1842+ & *rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r),cpower(i))
1843+ wgts(iwgt,i)=xlum * wgt_wo_pdf
1844+ do j=1,iproc
1845+ parton_iproc(j,i)=parton_iproc(j,i) * wgt_wo_pdf
1846+ enddo
1847+ if (itype(i).eq.14 .and. .not.virt_found) then
1848+ virt_found=.true.
1849+c Special for the soft-virtual needed for the virt-tricks. The
1850+c *_wgt_mint variable should be directly passed to the mint-integrator
1851+c and not be part of the plots nor computation of the cross section.
1852+ virt_wgt_mint(0)=virt_wgt_mint(0)*xlum
1853+ & *rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r),cpower(i))
1854+ born_wgt_mint(0)=born_wgt_mint(0)*xlum
1855+ & *rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r),cpower(i))
1856+ do iamp=1,amp_split_size
1857+ call amp_split_pos_to_orders(iamp, orders)
1858+ QCD_power=orders(qcd_pos)
1859+ wgtcpower=0d0
1860+ if (cpower_pos.gt.0) wgtcpower=dble(orders(cpower_pos))
1861+ virt_wgt_mint(iamp)=virt_wgt_mint(iamp)*xlum
1862+ & *rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r),wgtcpower)
1863+ born_wgt_mint(iamp)=born_wgt_mint(iamp)*xlum
1864+ & *rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r),wgtcpower)
1865+ enddo
1866+ endif
1867+ enddo
1868+ call cpu_time(tAfter)
1869+ t_as=t_as+(tAfter-tBefore)
1870+ return
1871+ end
1872+
1873+ subroutine include_bias_wgt
1874+c Include the weight from the bias_wgt_function to all the contributions
1875+c in icontr. This only changes the weight of the central value (after
1876+c inclusion of alphaS and parton luminosity). Both for 'wgts(1,icontr)'
1877+c as well as the the 'parton_iproc(1:niproc(icontr),icontr)', since
1878+c these are the ones used in MINT as well as for unweighting. Also the
1879+c 'virt_wgt_mint' and 'born_wgt_mint' are updated. Furthermore, to
1880+c include the weight also in the 'wgt' array that contain the
1881+c coefficients for PDF and scale computations.
1882+ use weight_lines
1883+ use mint_module
1884+ implicit none
1885+ include 'orders.inc'
1886+ integer orders(nsplitorders)
1887+ integer i,j,iamp
1888+ logical virt_found
1889+ double precision bias
1890+ character*7 event_norm
1891+ common /event_normalisation/event_norm
1892+c Set the bias_wgt to 1 in case we do not have to do any biassing
1893+ if (event_norm(1:4).ne.'bias') then
1894+ do i=1,icontr
1895+ bias_wgt(i)=1d0
1896+ enddo
1897+ return
1898+ endif
1899+ virt_found=.false.
1900+c loop over all contributions
1901+ do i=1,icontr
1902+ if (itype(i).eq.1) then
1903+ ! use (n+1)-body momenta for the real emission. Pick the
1904+ ! first IPROC for parton PDGs.
1905+ call bias_weight_function(momenta_m(0,1,2,i),parton_pdg(1,1
1906+ $ ,i),bias)
1907+ else
1908+ ! use n-body momenta for all the other contributions. Pick
1909+ ! the first IPROC for parton PDGs.
1910+ call bias_weight_function(momenta_m(0,1,1,i),parton_pdg(1,1
1911+ $ ,i),bias)
1912+ endif
1913+ bias_wgt(i)=bias
1914+c Update the weights:
1915+ wgts(1,i)=wgts(1,i)*bias_wgt(i)
1916+ do j=1,niproc(i)
1917+ parton_iproc(j,i)=parton_iproc(j,i)*bias_wgt(i)
1918+ enddo
1919+ do j=1,3
1920+ wgt(j,i)=wgt(j,i)*bias_wgt(i)
1921+ enddo
1922+ if (itype(i).eq.14 .and. .not.virt_found) then
1923+ virt_found=.true.
1924+ virt_wgt_mint(0)=virt_wgt_mint(0)*bias_wgt(i)
1925+ born_wgt_mint(0)=born_wgt_mint(0)*bias_wgt(i)
1926+ do iamp=1,amp_split_size
1927+ call amp_split_pos_to_orders(iamp, orders)
1928+ virt_wgt_mint(iamp)=virt_wgt_mint(iamp)*bias_wgt(i)
1929+ born_wgt_mint(iamp)=born_wgt_mint(iamp)*bias_wgt(i)
1930+ enddo
1931+ endif
1932+ enddo
1933+ return
1934+ end
1935+
1936+ subroutine include_inverse_bias_wgt(inv_bias)
1937+c Update the inverse of the bias in the event weight. All information in
1938+c the rwgt_lines is NOT updated.
1939+ use weight_lines
1940+ use extra_weights
1941+ implicit none
1942+ include 'genps.inc'
1943+ include 'nFKSconfigs.inc'
1944+ integer i,ict,ipro,ii
1945+ double precision wgt_num,wgt_denom,inv_bias
1946+ character*7 event_norm
1947+ common /event_normalisation/event_norm
1948+ integer iproc_save(fks_configs),eto(maxproc,fks_configs)
1949+ $ ,etoi(maxproc,fks_configs),maxproc_found
1950+ common/cproc_combination/iproc_save,eto,etoi,maxproc_found
1951+ logical Hevents
1952+ common/SHevents/Hevents
1953+ if (event_norm(1:4).ne.'bias') then
1954+ inv_bias=1d0
1955+ return
1956+ endif
1957+ wgt_num=0d0
1958+ wgt_denom=0d0
1959+ do i=1,icontr_sum(0,icontr_picked)
1960+ ict=icontr_sum(i,icontr_picked)
1961+ if (bias_wgt(ict).eq.0d0) then
1962+ write (*,*) "ERROR in include_inverse_bias_wgt: "/
1963+ $ /"bias_wgt is equal to zero",ict,bias_wgt
1964+ stop 1
1965+ endif
1966+c for all the rwgt_lines, remove the bias-wgt contribution from the
1967+c weights there. Note that the wgtref (also written in the event file)
1968+c keeps its contribution from the bias_wgt.
1969+ if (.not. Hevents) then
1970+ ipro=eto(etoi(iproc_picked,nFKS(ict)),nFKS(ict))
1971+ do ii=1,iproc_save(nFKS(ict))
1972+ if (eto(ii,nFKS(ict)).ne.ipro) cycle
1973+ wgt_denom=wgt_denom+parton_iproc(ii,ict)
1974+ wgt_num=wgt_num+parton_iproc(ii,ict)/bias_wgt(ict)
1975+ enddo
1976+ else
1977+ ipro=iproc_picked
1978+ wgt_denom=wgt_denom+parton_iproc(ipro,ict)
1979+ wgt_num=wgt_num+parton_iproc(ipro,ict)/bias_wgt(ict)
1980+ endif
1981+ enddo
1982+ if (abs((wgtref-wgt_denom)/(wgtref+wgt_denom)).gt.1d-10) then
1983+ write (*,*) "ERROR in include_inverse_bias_wgt: "/
1984+ $ /"reference weight not equal to recomputed weight",wgtref
1985+ $ ,wgt_denom
1986+ stop 1
1987+ endif
1988+c update the event weight to be written in the file
1989+ inv_bias=wgt_num/wgt_denom
1990+ return
1991+ end
1992+
1993+
1994+ subroutine separate_flavour_config(ict)
1995+ use weight_lines
1996+ implicit none
1997+ include 'nexternal.inc'
1998+ logical fixed_order,nlo_ps
1999+ common /c_fnlo_nlops/fixed_order,nlo_ps
2000+ integer ict,i_add,i,j,k,ict_new,n
2001+ if ((.not.fixed_order).or.nlo_ps .or. niproc(ict).eq.1) then
2002+ return
2003+ endif
2004+ i_add=niproc(ict)-1
2005+ call weight_lines_allocated(nexternal,icontr+i_add,max_wgt
2006+ $ ,max_iproc)
2007+ do i=1,niproc(ict)
2008+ if (i.eq.1) then
2009+ niproc(ict)=1
2010+ ipr(ict)=1
2011+ cycle
2012+ endif
2013+ ict_new=icontr+(i-1)
2014+ ipr(ict_new)=i
2015+ itype(ict_new)=itype(ict)
2016+ do j=1,3
2017+ wgt(j,ict_new)=wgt(j,ict)
2018+ scales2(j,ict_new)=scales2(j,ict)
2019+ enddo
2020+ do j=1,2
2021+ bjx(j,ict_new)=bjx(j,ict)
2022+ wgt_ME_tree(j,ict_new)=wgt_ME_tree(j,ict)
2023+ enddo
2024+ g_strong(ict_new)=g_strong(ict)
2025+ nFKS(ict_new)=nFKS(ict)
2026+ y_bst(ict_new)=y_bst(ict)
2027+ QCDpower(ict_new)=QCDpower(ict)
2028+ cpower(ict_new)=cpower(ict)
2029+ orderstag(ict_new)=orderstag(ict)
2030+ H_event(ict_new)=H_event(ict)
2031+ do k=1,nexternal
2032+ do j=0,3
2033+ momenta(j,k,ict_new)=momenta(j,k,ict)
2034+ do n=1,2
2035+ momenta_m(j,k,n,ict_new)=momenta_m(j,k,n,ict)
2036+ enddo
2037+ enddo
2038+ pdg(k,ict_new)=parton_pdg(k,i,ict)
2039+ pdg_uborn(k,ict_new)=parton_pdg_uborn(k,i,ict)
2040+ parton_pdg(k,1,ict_new)=parton_pdg(k,i,ict)
2041+ parton_pdg_uborn(k,1,ict_new)=parton_pdg_uborn(k,i,ict)
2042+ enddo
2043+ niproc(ict_new)=1
2044+ parton_iproc(1,ict_new)=parton_iproc(i,ict)
2045+ enddo
2046+ icontr=icontr+i_add
2047+ return
2048+ end
2049+
2050+
2051+ subroutine set_pdg_codes(iproc,pd,iFKS,ict)
2052+ use weight_lines
2053+ implicit none
2054+ include 'nexternal.inc'
2055+ include 'genps.inc'
2056+ include 'fks_info.inc'
2057+ integer j,k,iproc,ict,iFKS
2058+ double precision pd(0:maxproc),conv
2059+ parameter (conv=389379660d0) ! conversion to picobarns
2060+ include 'leshouche_decl.inc'
2061+ common/c_leshouche_idup_d/ idup_d
2062+ include 'orders.inc'
2063+c save also the separate contributions to the PDFs and the corresponding
2064+c PDG codes
2065+ niproc(ict)=iproc
2066+ do j=1,iproc
2067+ if (nincoming.eq.2) then
2068+ parton_iproc(j,ict)=pd(j)*conv
2069+ else
2070+c Keep GeV's for decay processes (no conv. factor needed)
2071+ parton_iproc(j,ict)=pd(j)
2072+ endif
2073+ do k=1,nexternal
2074+ parton_pdg(k,j,ict)=idup_d(iFKS,k,j)
2075+ if (k.lt.fks_j_d(iFKS)) then
2076+ parton_pdg_uborn(k,j,ict)=idup_d(iFKS,k,j)
2077+ elseif(k.eq.fks_j_d(iFKS)) then
2078+ if ( abs(idup_d(iFKS,fks_i_d(iFKS),j)) .eq.
2079+ & abs(idup_d(iFKS,fks_j_d(iFKS),j)) .and.
2080+ & abs(pdg(fks_i_d(iFKS),ict)).ne.21 .and.
2081+ & abs(pdg(fks_i_d(iFKS),ict)).ne.22 ) then
2082+ ! check if any extra cnt is needed
2083+ if (extra_cnt_d(iFKS).eq.0) then
2084+ ! if not, assign photon/gluon depending on split_type
2085+ if (split_type_d(iFKS,qcd_pos)) then
2086+ parton_pdg_uborn(k,j,ict)=21
2087+ elseif (split_type_d(iFKS,qed_pos)) then
2088+ parton_pdg_uborn(k,j,ict)=22
2089+ else
2090+ write (*,*) 'set_pdg_codes ',
2091+ & 'ERROR#1 in PDG assigment for underlying Born'
2092+ stop 1
2093+ endif
2094+ else
2095+ ! if there are extra cnt's, assign the pdg of the
2096+ ! mother in the born (according to isplitorder_born_d)
2097+ if (isplitorder_born_d(iFKS).eq.qcd_pos) then
2098+ parton_pdg_uborn(k,j,ict)=21
2099+ else if (isplitorder_born_d(iFKS).eq.qcd_pos) then
2100+ parton_pdg_uborn(k,j,ict)=22
2101+ else
2102+ write (*,*) 'set_pdg_codes ',
2103+ & 'ERROR#2 in PDG assigment for underlying Born'
2104+ stop 1
2105+ endif
2106+ endif
2107+ elseif (abs(idup_d(iFKS,fks_i_d(iFKS),j)).eq.21.or.
2108+ & idup_d(iFKS,fks_i_d(iFKS),j).eq.22) then
2109+ parton_pdg_uborn(k,j,ict)=idup_d(iFKS,fks_j_d(iFKS),j)
2110+ elseif (idup_d(iFKS,fks_j_d(iFKS),j).eq.21.or.
2111+ & idup_d(iFKS,fks_j_d(iFKS),j).eq.22) then
2112+ parton_pdg_uborn(k,j,ict)=-idup_d(iFKS,fks_i_d(iFKS),j)
2113+ else
2114+ write (*,*) 'set_pdg_codes ',
2115+ & 'ERROR#3 in PDG assigment for underlying Born'
2116+ stop 1
2117+ endif
2118+ elseif(k.lt.fks_i_d(iFKS)) then
2119+ parton_pdg_uborn(k,j,ict)=idup_d(iFKS,k,j)
2120+ elseif(k.eq.nexternal) then
2121+ if (split_type_d(iFKS,qcd_pos)) then
2122+ parton_pdg_uborn(k,j,ict)=21 ! give the extra particle a gluon PDG code
2123+ elseif (split_type_d(iFKS,qed_pos)) then
2124+ parton_pdg_uborn(k,j,ict)=22 ! give the extra particle a photon PDG code
2125+ endif
2126+ elseif(k.ge.fks_i_d(iFKS)) then
2127+ parton_pdg_uborn(k,j,ict)=idup_d(iFKS,k+1,j)
2128+ endif
2129+ enddo
2130+ enddo
2131+ return
2132+ end
2133+
2134+
2135+ subroutine reweight_scale
2136+c Use the saved weight_lines info to perform scale reweighting. Extends the
2137+c wgts() array to include the weights.
2138+ use weight_lines
2139+ use extra_weights
2140+ use FKSParams
2141+ implicit none
2142+ include 'nexternal.inc'
2143+ include 'run.inc'
2144+ include 'timing_variables.inc'
2145+ include 'genps.inc'
2146+ integer i,kr,kf,iwgt_save,dd
2147+ double precision xlum(maxscales),dlum,pi,mu2_r(maxscales),c_mu2_r
2148+ $ ,c_mu2_f,mu2_f(maxscales),mu2_q,alphas,g(maxscales)
2149+ $ ,rwgt_muR_dep_fac,conv
2150+ external rwgt_muR_dep_fac
2151+ parameter (pi=3.1415926535897932385d0)
2152+ external dlum,alphas
2153+ integer nFKSprocess
2154+ common/c_nFKSprocess/nFKSprocess
2155+ INTEGER IPROC
2156+ DOUBLE PRECISION PD(0:MAXPROC)
2157+ COMMON /SUBPROC/ PD, IPROC
2158+ parameter (conv=389379660d0) ! conversion to picobarns
2159+ call cpu_time(tBefore)
2160+ if (icontr.eq.0) return
2161+c currently we have 'iwgt' weights in the wgts() array.
2162+ iwgt_save=iwgt
2163+c loop over all the contributions in the weight lines module
2164+ do i=1,icontr
2165+ iwgt=iwgt_save
2166+ nFKSprocess=nFKS(i)
2167+ xbk(1) = bjx(1,i)
2168+ xbk(2) = bjx(2,i)
2169+ mu2_q=scales2(1,i)
2170+c Loop over the dynamical_scale_choices
2171+ do dd=1,dyn_scale(0)
2172+c renormalisation scale variation (requires recomputation of the strong
2173+c coupling)
2174+ call set_mu_central(i,dd,c_mu2_r,c_mu2_f)
2175+ do kr=1,nint(scalevarR(0))
2176+ if ((.not. lscalevar(dd)) .and. kr.ne.1) exit
2177+ mu2_r(kr)=c_mu2_r*scalevarR(kr)**2
2178+ g(kr)=sqrt(4d0*pi*alphas(sqrt(mu2_r(kr))))
2179+ enddo
2180+c factorisation scale variation (require recomputation of the PDFs)
2181+ do kf=1,nint(scalevarF(0))
2182+ if ((.not. lscalevar(dd)) .and. kf.ne.1) exit
2183+ mu2_f(kf)=c_mu2_f*scalevarF(kf)**2
2184+ q2fact(1)=mu2_f(kf)
2185+ q2fact(2)=mu2_f(kf)
2186+ xlum(kf) = dlum()
2187+ if (separate_flavour_configs .and. ipr(i).ne.0) then
2188+ if (nincoming.eq.2) then
2189+ xlum(kf)=pd(ipr(i))*conv
2190+ else
2191+ xlum(kf)=pd(ipr(i))
2192+ endif
2193+ endif
2194+ enddo
2195+ do kf=1,nint(scalevarF(0))
2196+ if ((.not. lscalevar(dd)) .and. kf.ne.1) exit
2197+ do kr=1,nint(scalevarR(0))
2198+ if ((.not. lscalevar(dd)) .and. kr.ne.1) exit
2199+ iwgt=iwgt+1 ! increment the iwgt for the wgts() array
2200+ call weight_lines_allocated(nexternal,max_contr,iwgt
2201+ $ ,max_iproc)
2202+c add the weights to the array
2203+ wgts(iwgt,i)=xlum(kf) * (wgt(1,i)+wgt(2,i)
2204+ & *log(mu2_r(kr)/mu2_q)+wgt(3,i)*log(mu2_f(kf)
2205+ & /mu2_q))*g(kr)**QCDpower(i)
2206+ wgts(iwgt,i)=wgts(iwgt,i)*rwgt_muR_dep_fac(
2207+ & sqrt(mu2_r(kr)),sqrt(scales2(2,i)),cpower(i))
2208+ enddo
2209+ enddo
2210+ enddo
2211+ enddo
2212+ call cpu_time(tAfter)
2213+ tr_s=tr_s+(tAfter-tBefore)
2214+ return
2215+ end
2216+
2217+ subroutine reweight_scale_NNLL
2218+c Use the saved weight lines info to perform scale reweighting. Extends the
2219+c wgts() array to include the weights. Special for the NNLL+NLO jet-veto
2220+c computations (ickkw.eq.-1).
2221+ use weight_lines
2222+ use extra_weights
2223+ use FKSParams
2224+ implicit none
2225+ include 'nexternal.inc'
2226+ include 'run.inc'
2227+ include 'timing_variables.inc'
2228+ include 'genps.inc'
2229+ integer i,ks,kh,iwgt_save
2230+ double precision xlum(maxscales),dlum,pi,mu2_r(maxscales)
2231+ & ,mu2_f(maxscales),mu2_q,alphas,g(maxscales),rwgt_muR_dep_fac
2232+ & ,veto_multiplier_new(maxscales,maxscales)
2233+ & ,veto_compensating_factor_new,conv
2234+ external rwgt_muR_dep_fac
2235+ parameter (pi=3.1415926535897932385d0)
2236+ external dlum,alphas
2237+ integer nFKSprocess
2238+ common/c_nFKSprocess/nFKSprocess
2239+ INTEGER IPROC
2240+ DOUBLE PRECISION PD(0:MAXPROC)
2241+ COMMON /SUBPROC/ PD, IPROC
2242+ parameter (conv=389379660d0) ! conversion to picobarns
2243+ call cpu_time(tBefore)
2244+ write(*,*) 'FIX NLLL'
2245+ stop 1
2246+ if (icontr.eq.0) return
2247+ if (dyn_scale(0).gt.1) then
2248+ write (*,*) "When doing NNLL+NLO veto, "/
2249+ $ /"can only do one dynamical_scale_choice",dyn_scale(0)
2250+ stop
2251+ endif
2252+
2253+c currently we have 'iwgt' weights in the wgts() array.
2254+ iwgt_save=iwgt
2255+c compute the new veto multiplier factor
2256+ do ks=1,nint(scalevarR(0))
2257+ if ((.not. lscalevar(1)) .and. ks.ne.1) exit
2258+ do kh=1,nint(scalevarF(0))
2259+ if ((.not. lscalevar(1)) .and. kh.ne.1) exit
2260+ if (H1_factor_virt.ne.0d0) then
2261+ call compute_veto_multiplier(H1_factor_virt,scalevarR(ks)
2262+ $ ,scalevarF(kh),veto_multiplier_new(ks,kh))
2263+ veto_multiplier_new(ks,kh)=veto_multiplier_new(ks,kh)
2264+ & /veto_multiplier
2265+ else
2266+ veto_multiplier_new(ks,kh)=1d0
2267+ endif
2268+ enddo
2269+ enddo
2270+c loop over all the contributions in the weight lines module
2271+ do i=1,icontr
2272+ iwgt=iwgt_save
2273+ nFKSprocess=nFKS(i)
2274+ xbk(1) = bjx(1,i)
2275+ xbk(2) = bjx(2,i)
2276+ mu2_q=scales2(1,i)
2277+c Hard scale variation
2278+ do kh=1,nint(scalevarF(0))
2279+ if ((.not. lscalevar(1)) .and. kh.ne.1) exit
2280+c soft scale variation
2281+ do ks=1,nint(scalevarR(0))
2282+ if ((.not. lscalevar(1)) .and. ks.ne.1) exit
2283+ mu2_r(ks)=scales2(2,i)*scalevarR(ks)**2
2284+ g(ks)=sqrt(4d0*pi*alphas(sqrt(mu2_r(ks))))
2285+ mu2_f(ks)=scales2(2,i)*scalevarR(ks)**2
2286+ q2fact(1)=mu2_f(ks)
2287+ q2fact(2)=mu2_f(ks)
2288+ xlum(ks) = dlum()
2289+ if (separate_flavour_configs .and. ipr(i).ne.0) then
2290+ if (nincoming.eq.2) then
2291+ xlum=pd(ipr(i))*conv
2292+ else
2293+ xlum=pd(ipr(i))
2294+ endif
2295+ endif
2296+ iwgt=iwgt+1 ! increment the iwgt for the wgts() array
2297+ call weight_lines_allocated(nexternal,max_contr,iwgt
2298+ $ ,max_iproc)
2299+c add the weights to the array
2300+ if (itype(i).ne.7) then
2301+ wgts(iwgt,i)=xlum(ks) * (wgt(1,i)+wgt(2,i)
2302+ & *log(mu2_r(ks)/mu2_q)+wgt(3,i)*log(mu2_f(ks)
2303+ & /mu2_q))*g(ks)**QCDpower(i)
2304+ else
2305+c special for the itype=7 (i.e, the veto-compensating factor)
2306+ call compute_veto_compensating_factor(H1_factor_virt
2307+ & ,born_wgt_veto,scalevarR(ks),scalevarF(kh)
2308+ & ,veto_compensating_factor_new)
2309+ wgts(iwgt,i)=xlum(ks) * wgt(1,i)*g(ks)**QCDpower(i)
2310+ & /veto_compensating_factor
2311+ & *veto_compensating_factor_new
2312+ endif
2313+ wgts(iwgt,i)=wgts(iwgt,i)*rwgt_muR_dep_fac(
2314+ & sqrt(mu2_r(ks)),sqrt(scales2(2,i)),cpower(i))
2315+ wgts(iwgt,i)=wgts(iwgt,i)*veto_multiplier_new(ks,kh)
2316+ enddo
2317+ enddo
2318+ enddo
2319+ call cpu_time(tAfter)
2320+ tr_s=tr_s+(tAfter-tBefore)
2321+ return
2322+ end
2323+
2324+ subroutine reweight_pdf
2325+c Use the saved weight_lines info to perform PDF reweighting. Extends the
2326+c wgts() array to include the weights.
2327+ use weight_lines
2328+ use extra_weights
2329+ use FKSParams
2330+ implicit none
2331+ include 'nexternal.inc'
2332+ include 'run.inc'
2333+ include 'timing_variables.inc'
2334+ include 'genps.inc'
2335+ integer n,izero,i,nn
2336+ parameter (izero=0)
2337+ double precision xlum,dlum,pi,mu2_r,mu2_f,mu2_q,rwgt_muR_dep_fac,g
2338+ & ,alphas,conv
2339+ external rwgt_muR_dep_fac
2340+ parameter (pi=3.1415926535897932385d0)
2341+ external dlum,alphas
2342+ integer nFKSprocess
2343+ common/c_nFKSprocess/nFKSprocess
2344+ INTEGER IPROC
2345+ DOUBLE PRECISION PD(0:MAXPROC)
2346+ COMMON /SUBPROC/ PD, IPROC
2347+ parameter (conv=389379660d0) ! conversion to picobarns
2348+ call cpu_time(tBefore)
2349+ if (icontr.eq.0) return
2350+ do nn=1,lhaPDFid(0)
2351+c Use as external loop the one over the PDF sets and as internal the one
2352+c over the icontr. This reduces the number of calls to InitPDF and
2353+c allows for better caching of the PDFs
2354+ do n=0,nmemPDF(nn)
2355+ iwgt=iwgt+1
2356+ call weight_lines_allocated(nexternal,max_contr,iwgt
2357+ $ ,max_iproc)
2358+ call InitPDFm(nn,n)
2359+ do i=1,icontr
2360+ nFKSprocess=nFKS(i)
2361+ xbk(1) = bjx(1,i)
2362+ xbk(2) = bjx(2,i)
2363+ mu2_q=scales2(1,i)
2364+ mu2_r=scales2(2,i)
2365+ mu2_f=scales2(3,i)
2366+ q2fact(1)=mu2_f
2367+ q2fact(2)=mu2_f
2368+c Compute the luminosity
2369+ xlum = dlum()
2370+ if (separate_flavour_configs .and. ipr(i).ne.0) then
2371+ if (nincoming.eq.2) then
2372+ xlum=pd(ipr(i))*conv
2373+ else
2374+ xlum=pd(ipr(i))
2375+ endif
2376+ endif
2377+c Recompute the strong coupling: alpha_s in the PDF might change
2378+ g=sqrt(4d0*pi*alphas(sqrt(mu2_r)))
2379+c add the weights to the array
2380+ wgts(iwgt,i)=xlum * (wgt(1,i) + wgt(2,i)*log(mu2_r/mu2_q)
2381+ & +wgt(3,i)*log(mu2_f/mu2_q))*g**QCDpower(i)
2382+ wgts(iwgt,i)=wgts(iwgt,i)*
2383+ & rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r),cpower(i))
2384+ enddo
2385+ enddo
2386+ enddo
2387+ call InitPDFm(1,0)
2388+ call cpu_time(tAfter)
2389+ tr_pdf=tr_pdf+(tAfter-tBefore)
2390+ return
2391+ end
2392+
2393+ subroutine fill_applgrid_weights(vegas_wgt)
2394+c Fills the ApplGrid weights of appl_common.inc. This subroutine assumes
2395+c that there is an unique PS configuration: at most one Born, one real
2396+c and one set of counter terms. Among other things, this means that one
2397+c must do MC over FKS directories.
2398+ use weight_lines
2399+ implicit none
2400+ include 'nexternal.inc'
2401+ include 'appl_common.inc'
2402+ include 'nFKSconfigs.inc'
2403+ include 'genps.inc'
2404+ integer i,j
2405+ double precision final_state_rescaling,vegas_wgt
2406+ integer flavour_map(fks_configs)
2407+ common/c_flavour_map/flavour_map
2408+ integer iproc_save(fks_configs),eto(maxproc,fks_configs),
2409+ & etoi(maxproc,fks_configs),maxproc_found
2410+ common/cproc_combination/iproc_save,eto,etoi,maxproc_found
2411+ integer lo_qcd_to_amp_pos, nlo_qcd_to_amp_pos
2412+ integer pos
2413+ if (icontr.gt.8) then
2414+ write (*,*) 'ERROR: too many applgrid weights. '/
2415+ & /'Should have at most one of each itype.',icontr
2416+ stop 1
2417+ endif
2418+ do j=1,amp_split_size
2419+ do i=1,4
2420+ appl_w0(i,j)=0d0
2421+ appl_wR(i,j)=0d0
2422+ appl_wF(i,j)=0d0
2423+ appl_wB(i,j)=0d0
2424+ appl_x1(i,j)=0d0
2425+ appl_x2(i,j)=0d0
2426+ appl_QES2(i,j)=0d0
2427+ appl_muR2(i,j)=0d0
2428+ appl_muF2(i,j)=0d0
2429+ appl_qcdpower(i,j) = -1
2430+ enddo
2431+ appl_flavmap(i)=0
2432+ enddo
2433+ appl_event_weight = 0d0
2434+ appl_vegaswgt = vegas_wgt
2435+ if (icontr.eq.0) return
2436+ do i=1,icontr
2437+ appl_event_weight=appl_event_weight+wgts(1,i)/vegas_wgt
2438+ final_state_rescaling = dble(iproc_save(nFKS(i))) /
2439+ & dble(appl_nproc(flavour_map(nFKS(i))))
2440+ if (itype(i).eq.2) then
2441+ pos = lo_qcd_to_amp_pos(qcdpower(i))
2442+ else
2443+ pos = nlo_qcd_to_amp_pos(qcdpower(i))
2444+ endif
2445+
2446+ if (itype(i).eq.1) then
2447+c real
2448+ appl_w0(1,pos)=appl_w0(1,pos)+wgt(1,i)*final_state_rescaling
2449+ appl_qcdpower(1,pos)=qcdpower(i)
2450+ appl_x1(1,pos)=bjx(1,i)
2451+ appl_x2(1,pos)=bjx(2,i)
2452+ appl_flavmap(1) = flavour_map(nFKS(i))
2453+ appl_QES2(1,pos)=scales2(1,i)
2454+ appl_muR2(1,pos)=scales2(2,i)
2455+ appl_muF2(1,pos)=scales2(3,i)
2456+ elseif (itype(i).eq.2) then
2457+c born
2458+ appl_wB(2,pos)=appl_wB(2,pos)+wgt(1,i)*final_state_rescaling
2459+ appl_qcdpower(2,pos)=qcdpower(i)
2460+ appl_x1(2,pos)=bjx(1,i)
2461+ appl_x2(2,pos)=bjx(2,i)
2462+ appl_flavmap(2) = flavour_map(nFKS(i))
2463+ appl_QES2(2,pos)=scales2(1,i)
2464+ appl_muR2(2,pos)=scales2(2,i)
2465+ appl_muF2(2,pos)=scales2(3,i)
2466+ elseif (itype(i).eq.3 .or. itype(i).eq.4 .or. itype(i).eq.14
2467+ & .or. itype(i).eq.15)then
2468+c virtual, soft-virtual or soft-counter
2469+ appl_w0(2,pos)=appl_w0(2,pos)+wgt(1,i)*final_state_rescaling
2470+ appl_wR(2,pos)=appl_wR(2,pos)+wgt(2,i)*final_state_rescaling
2471+ appl_wF(2,pos)=appl_wF(2,pos)+wgt(3,i)*final_state_rescaling
2472+ appl_qcdpower(2,pos)=qcdpower(i)
2473+ appl_x1(2,pos)=bjx(1,i)
2474+ appl_x2(2,pos)=bjx(2,i)
2475+ appl_flavmap(2) = flavour_map(nFKS(i))
2476+ appl_QES2(2,pos)=scales2(1,i)
2477+ appl_muR2(2,pos)=scales2(2,i)
2478+ appl_muF2(2,pos)=scales2(3,i)
2479+ elseif (itype(i).eq.5) then
2480+c collinear counter
2481+ appl_w0(3,pos)=appl_w0(3,pos)+wgt(1,i)*final_state_rescaling
2482+ appl_wF(3,pos)=appl_wF(3,pos)+wgt(3,i)*final_state_rescaling
2483+ appl_qcdpower(3,pos)=qcdpower(i)
2484+ appl_x1(3,pos)=bjx(1,i)
2485+ appl_x2(3,pos)=bjx(2,i)
2486+ appl_flavmap(3) = flavour_map(nFKS(i))
2487+ appl_QES2(3,pos)=scales2(1,i)
2488+ appl_muR2(3,pos)=scales2(2,i)
2489+ appl_muF2(3,pos)=scales2(3,i)
2490+ elseif (itype(i).eq.6) then
2491+c soft-collinear counter
2492+ appl_w0(4,pos)=appl_w0(4,pos)+wgt(1,i)*final_state_rescaling
2493+ appl_wF(4,pos)=appl_wF(4,pos)+wgt(3,i)*final_state_rescaling
2494+ appl_qcdpower(4,pos)=qcdpower(i)
2495+ appl_x1(4,pos)=bjx(1,i)
2496+ appl_x2(4,pos)=bjx(2,i)
2497+ appl_flavmap(4) = flavour_map(nFKS(i))
2498+ appl_QES2(4,pos)=scales2(1,i)
2499+ appl_muR2(4,pos)=scales2(2,i)
2500+ appl_muF2(4,pos)=scales2(3,i)
2501+ endif
2502+ enddo
2503+ return
2504+ end
2505+
2506+
2507+ subroutine set_pdg(ict,iFKS)
2508+c fills the pdg and pdg_uborn variables. It uses only the 1st IPROC. For
2509+c the pdg_uborn (the PDG codes for the underlying Born process) the PDG
2510+c codes of i_fks and j_fks are combined to give the PDG code of the
2511+c mother and the extra (n+1) parton is given the PDG code of the gluon.
2512+ use weight_lines
2513+ implicit none
2514+ include 'nexternal.inc'
2515+ include 'fks_info.inc'
2516+ include 'genps.inc'
2517+ integer k,ict,iFKS
2518+ integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc),
2519+ $ icolup(2,nexternal,maxflow),niprocs
2520+ common /c_leshouche_inc/idup,mothup,icolup,niprocs
2521+ include 'orders.inc'
2522+ do k=1,nexternal
2523+ pdg(k,ict)=idup(k,1)
2524+ enddo
2525+ do k=1,nexternal
2526+ if (k.lt.fks_j_d(iFKS)) then
2527+ pdg_uborn(k,ict)=pdg(k,ict)
2528+ elseif(k.eq.fks_j_d(iFKS)) then
2529+ if ( abs(pdg(fks_i_d(iFKS),ict)) .eq.
2530+ & abs(pdg(fks_j_d(iFKS),ict)) .and.
2531+ & abs(pdg(fks_i_d(iFKS),ict)).ne.21.and.
2532+ & abs(pdg(fks_i_d(iFKS),ict)).ne.22) then
2533+c gluon splitting: g/a -> ff
2534+ !!!pdg_uborn(k,ict)=21
2535+ ! check if any extra cnt is needed
2536+ if (extra_cnt_d(iFKS).eq.0) then
2537+ ! if not, assign photon/gluon depending on split_type
2538+ if (split_type_d(iFKS,qcd_pos)) then
2539+ pdg_uborn(k,ict)=21
2540+ else if (split_type_d(iFKS,qed_pos)) then
2541+ pdg_uborn(k,ict)=22
2542+ else
2543+ write (*,*) 'set_pdg ',
2544+ & 'ERROR#1 in PDG assigment for underlying Born'
2545+ stop 1
2546+ endif
2547+ else
2548+ ! if there are extra cnt's, assign the pdg of the
2549+ ! mother in the born (according to isplitorder_born_d)
2550+ if (isplitorder_born_d(iFKS).eq.qcd_pos) then
2551+ pdg_uborn(k,ict)=21
2552+ else if (isplitorder_born_d(iFKS).eq.qcd_pos) then
2553+ pdg_uborn(k,ict)=22
2554+ else
2555+ write (*,*) 'set_pdg ',
2556+ & 'ERROR#2 in PDG assigment for underlying Born'
2557+ stop 1
2558+ endif
2559+ endif
2560+ elseif (abs(pdg(fks_i_d(iFKS),ict)).eq.21.or.
2561+ & abs(pdg(fks_i_d(iFKS),ict)).eq.22) then
2562+c final state gluon radiation: X -> Xg
2563+ pdg_uborn(k,ict)=pdg(fks_j_d(iFKS),ict)
2564+ elseif (pdg(fks_j_d(iFKS),ict).eq.21.or.
2565+ & pdg(fks_j_d(iFKS),ict).eq.22) then
2566+c initial state gluon splitting (gluon is j_fks): g -> XX
2567+ pdg_uborn(k,ict)=-pdg(fks_i_d(iFKS),ict)
2568+ else
2569+ write (*,*)
2570+ & 'set_pdg ERROR#3 in PDG assigment for underlying Born'
2571+ stop 1
2572+ endif
2573+ elseif(k.lt.fks_i_d(iFKS)) then
2574+ pdg_uborn(k,ict)=pdg(k,ict)
2575+ elseif(k.eq.nexternal) then
2576+ if (split_type_d(iFKS,qcd_pos)) then
2577+ pdg_uborn(k,ict)=21 ! give the extra particle a gluon PDG code
2578+ elseif (split_type_d(iFKS,qed_pos)) then
2579+ pdg_uborn(k,ict)=22 ! give the extra particle a photon PDG code
2580+ endif
2581+ elseif(k.ge.fks_i_d(iFKS)) then
2582+ pdg_uborn(k,ict)=pdg(k+1,ict)
2583+ endif
2584+ enddo
2585+ return
2586+ end
2587+
2588+ subroutine get_wgt_nbody(sig)
2589+c Sums all the central weights that contribution to the nbody cross
2590+c section
2591+ use weight_lines
2592+ implicit none
2593+ include 'nexternal.inc'
2594+ double precision sig
2595+ integer i
2596+ sig=0d0
2597+ if (icontr.eq.0) return
2598+ do i=1,icontr
2599+ if (itype(i).eq.2 .or. itype(i).eq.3 .or. itype(i).eq.14 .or.
2600+ & itype(i).eq.7 .or. itype(i).eq.15) then
2601+ sig=sig+wgts(1,i)
2602+ endif
2603+ enddo
2604+ return
2605+ end
2606+
2607+ subroutine get_wgt_no_nbody(sig)
2608+c Sums all the central weights that contribution to the cross section
2609+c excluding the nbody contributions.
2610+ use weight_lines
2611+ implicit none
2612+ include 'nexternal.inc'
2613+ double precision sig
2614+ integer i
2615+ sig=0d0
2616+ if (icontr.eq.0) return
2617+ do i=1,icontr
2618+ if (itype(i).ne.2 .and. itype(i).ne.3 .and. itype(i).ne.14
2619+ & .and. itype(i).ne.7 .and. itype(i).ne.15) then
2620+ sig=sig+wgts(1,i)
2621+ endif
2622+ enddo
2623+ return
2624+ end
2625+
2626+ subroutine fill_plots
2627+c Calls the analysis routine (which fill plots) for all the
2628+c contributions in the weight_lines module. Instead of really calling
2629+c it for all, it first checks if weights can be summed (i.e. they have
2630+c the same PDG codes and the same momenta) before calling the analysis
2631+c to greatly reduce the calls to the analysis routines.
2632+ use weight_lines
2633+ use extra_weights
2634+ implicit none
2635+ include 'nexternal.inc'
2636+ include 'timing_variables.inc'
2637+ include 'fks_info.inc'
2638+ integer i,ii,j,max_weight
2639+ logical momenta_equal,momenta_equal_uborn,pdg_equal
2640+ external momenta_equal,momenta_equal_uborn,pdg_equal
2641+ double precision,allocatable :: www(:)
2642+ ! stuff for plotting the different splitorders
2643+ integer orders_tag_plot
2644+ common /corderstagplot/ orders_tag_plot
2645+ save max_weight
2646+ call cpu_time(tBefore)
2647+ if (icontr.eq.0) return
2648+c fill the plots_wgts. Check if we can sum weights together before
2649+c calling the analysis routines. This is the case if the PDG codes and
2650+c the momenta are identical.
2651+ do i=1,icontr
2652+ do j=1,iwgt
2653+ plot_wgts(j,i)=0d0
2654+ enddo
2655+ if (itype(i).eq.2) then
2656+ plot_id(i)=20 ! Born
2657+ elseif(itype(i).eq.1) then
2658+ plot_id(i)=11 ! real-emission
2659+ else
2660+ plot_id(i)=12 ! soft-virtual and counter terms
2661+ endif
2662+c Loop over all previous icontr. If the plot_id, PDGs and momenta are
2663+c equal to a previous icountr, add the current weight to the plot_wgts
2664+c of that contribution and exit the do-loop. This loop extends to 'i',
2665+c so if the current weight cannot be summed to a previous one, the ii=i
2666+c contribution makes sure that it is added as a new element.
2667+ do ii=1,i
2668+ if (orderstag(ii).ne.orderstag(i)) cycle
2669+ if (plot_id(ii).ne.plot_id(i)) cycle
2670+ if (plot_id(i).eq.20 .or. plot_id(i).eq.12) then
2671+ if (.not.pdg_equal(pdg_uborn(1,ii),pdg_uborn(1,i))) cycle
2672+ else
2673+ if (.not.pdg_equal(pdg(1,ii),pdg(1,i))) cycle
2674+ endif
2675+ if (plot_id(i).eq.20 .or. plot_id(i).eq.12) then
2676+ if (.not.momenta_equal_uborn(momenta(0,1,ii),momenta(0,1
2677+ $ ,i),fks_j_d(nFKS(ii)),fks_i_d(nFKS(ii))
2678+ $ ,fks_j_d(nFKS(i)) ,fks_i_d(nFKS(i)))) cycle
2679+ else
2680+ if (.not.momenta_equal(momenta(0,1,ii),momenta(0,1,i)))
2681+ $ cycle
2682+ endif
2683+ do j=1,iwgt
2684+ plot_wgts(j,ii)=plot_wgts(j,ii)+wgts(j,i)
2685+ enddo
2686+ exit
2687+ enddo
2688+ enddo
2689+ do i=1,icontr
2690+ if (plot_wgts(1,i).ne.0d0) then
2691+ if (.not.allocated(www)) then
2692+ allocate(www(iwgt))
2693+ max_weight=iwgt
2694+ elseif(iwgt.ne.max_weight) then
2695+ write (*,*) 'Error in fill_plots (fks_singular.f): '/
2696+ $ /'number of weights should not vary between PS '/
2697+ $ /'points',iwgt,max_weight
2698+ stop
2699+ endif
2700+ do j=1,iwgt
2701+ www(j)=plot_wgts(j,i)
2702+ enddo
2703+c call the analysis/histogramming routines
2704+ orders_tag_plot=orderstag(i)
2705+ call outfun(momenta(0,1,i),y_bst(i),www,pdg(1,i),plot_id(i))
2706+ endif
2707+ enddo
2708+ call cpu_time(tAfter)
2709+ t_plot=t_plot+(tAfter-tBefore)
2710+ return
2711+ end
2712+
2713+ subroutine fill_mint_function(f)
2714+c Fills the function that is returned to the MINT integrator
2715+ use weight_lines
2716+ use mint_module
2717+ implicit none
2718+ include 'nexternal.inc'
2719+ include 'orders.inc'
2720+ integer i,iamp,ithree,isix
2721+ double precision f(nintegrals),sigint
2722+ double precision virtual_over_born
2723+ common /c_vob/ virtual_over_born
2724+ sigint=0d0
2725+ do i=1,icontr
2726+ sigint=sigint+wgts(1,i)
2727+ enddo
2728+ f(1)=abs(sigint)
2729+ f(2)=sigint
2730+ f(4)=virtual_over_born ! not used for anything
2731+ do iamp=0,amp_split_size
2732+ if (iamp.eq.0) then
2733+ f(3)=0d0
2734+ f(6)=0d0
2735+ f(5)=0d0
2736+ do i=1,amp_split_size
2737+ f(3)=f(3)+virt_wgt_mint(i)
2738+ f(6)=f(6)+born_wgt_mint(i)
2739+ f(5)=f(5)+abs(virt_wgt_mint(i))
2740+ enddo
2741+ else
2742+ ithree=2*iamp+5
2743+ isix=2*iamp+6
2744+ f(ithree)=virt_wgt_mint(iamp)
2745+ f(isix)=born_wgt_mint(iamp)
2746+ endif
2747+ enddo
2748+ return
2749+ end
2750+
2751+
2752+ subroutine include_shape_in_shower_scale(p,iFKS)
2753+c Includes the shape function from the MC counter terms in the shower
2754+c starting scale. This function needs to be called (at least) once per
2755+c FKS configuration that is included in the current PS point.
2756+ use weight_lines
2757+ implicit none
2758+ include 'nexternal.inc'
2759+ include 'run.inc'
2760+ include 'nFKSconfigs.inc'
2761+ integer i,iFKS,Hevents,izero,mohdr
2762+ double precision ddum(6),p(0:3,nexternal)
2763+ logical ldum
2764+ double precision xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev(0:3)
2765+ & ,p_i_fks_cnt(0:3,-2:2)
2766+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
2767+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
2768+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
2769+ double precision xm12
2770+ integer ileg
2771+ common/cscaleminmax/xm12,ileg
2772+ character*4 abrv
2773+ common /to_abrv/ abrv
2774+ logical MCcntcalled
2775+ common/c_MCcntcalled/MCcntcalled
2776+ double precision SCALUP(fks_configs*2)
2777+ common /cshowerscale/SCALUP
2778+ parameter (izero=0,mohdr=-100)
2779+c Compute the shower starting scale including the shape function
2780+ if ( (.not. MCcntcalled) .and.
2781+ & abrv.ne.'born' .and. ickkw.ne.4) then
2782+ if(p(0,1).ne.-99d0)then
2783+ call set_cms_stuff(mohdr)
2784+ call assign_emsca(p,xi_i_fks_ev,y_ij_fks_ev)
2785+ call kinematics_driver(xi_i_fks_ev,y_ij_fks_ev,shat,p,ileg,
2786+ & xm12,ddum(1),ddum(2),ddum(3),ddum(4),ddum(5),ddum(6)
2787+ & ,ldum)
2788+ endif
2789+ endif
2790+ call set_cms_stuff(izero)
2791+ call set_shower_scale(iFKS*2-1,.false.)
2792+ call set_cms_stuff(mohdr)
2793+ call set_shower_scale(iFKS*2,.true.)
2794+c loop over all the weights and update the relevant ones
2795+c (i.e. nFKS(i)=iFKS)
2796+ do i=1,icontr
2797+ if (nFKS(i).eq.iFKS) then
2798+ if (H_event(i)) then
2799+c H-event contribution
2800+ shower_scale(i)=SCALUP(iFKS*2)
2801+ else
2802+c S-event contribution
2803+ shower_scale(i)=SCALUP(iFKS*2-1)
2804+ endif
2805+ endif
2806+ enddo
2807+ return
2808+ end
2809+
2810+
2811+ subroutine sum_identical_contributions
2812+c Sum contributions that would lead to an identical event before taking
2813+c the ABS value. In particular this means adding the real emission with
2814+c the MC counter terms for the H-events FKS configuration by FKS
2815+c configuration, while for the S-events also contributions from the
2816+c various FKS configurations can be summed together.
2817+ use weight_lines
2818+ use mint_module
2819+ implicit none
2820+ include 'nexternal.inc'
2821+ include 'genps.inc'
2822+ include 'nFKSconfigs.inc'
2823+ include 'fks_info.inc'
2824+ include 'timing_variables.inc'
2825+ integer i,j,ii,jj,i_soft
2826+ logical momenta_equal,pdg_equal,equal,found_S
2827+ external momenta_equal,pdg_equal
2828+ integer iproc_save(fks_configs),eto(maxproc,fks_configs),
2829+ & etoi(maxproc,fks_configs),maxproc_found
2830+ common/cproc_combination/iproc_save,eto,etoi,maxproc_found
2831+ call cpu_time(tBefore)
2832+ if (icontr.eq.0) return
2833+c Find the contribution to sum all the S-event ones. This should be one
2834+c that has a soft singularity. We set it to 'i_soft'.
2835+ i_soft=0
2836+ found_S=.false.
2837+ do i=1,icontr
2838+ if (H_event(i)) then
2839+ cycle
2840+ else
2841+ found_S=.true.
2842+ endif
2843+ if (abs(pdg_type_d(nFKS(i),fks_i_d(nFKS(i)))).eq.21
2844+ & .or.abs(pdg_type_d(nFKS(i),fks_i_d(nFKS(i)))).eq.22) then
2845+ i_soft=i
2846+ exit
2847+ endif
2848+ enddo
2849+ if (found_S .and. i_soft.eq.0) then
2850+ write (*,*) 'ERROR: S-event contribution found, '/
2851+ $ /'but no FKS configuration with soft singularity'
2852+ stop 1
2853+ endif
2854+c Main loop over contributions. For H-events we have to check explicitly
2855+c to which contribution we can sum the current contribution (if any),
2856+c while for the S-events we can sum it to the 'i_soft' one.
2857+ do i=1,icontr
2858+ do j=1,niproc(i)
2859+ unwgt(j,i)=0d0
2860+ enddo
2861+ icontr_sum(0,i)=0
2862+ if (H_event(i)) then
2863+ do ii=1,i
2864+ if (.not.H_event(ii)) cycle
2865+c H-event. If PDG codes, shower starting scale and momenta are equal, we
2866+c can sum them before taking ABS value.
2867+ if (niproc(ii).ne.niproc(i)) cycle
2868+ if (shower_scale(ii).ne.shower_scale(i)) cycle
2869+ equal=.true.
2870+ do j=1,niproc(ii)
2871+ if (.not.pdg_equal(parton_pdg(1,j,ii),
2872+ & parton_pdg(1,j,i))) then
2873+ equal=.false.
2874+ exit
2875+ endif
2876+ enddo
2877+ if (.not. equal) cycle
2878+ if (.not. momenta_equal(momenta(0,1,ii),
2879+ & momenta(0,1,i))) cycle
2880+c Identical contributions found: sum the contribution "i" to "ii"
2881+ icontr_sum(0,ii)=icontr_sum(0,ii)+1
2882+ icontr_sum(icontr_sum(0,ii),ii)=i
2883+ do j=1,niproc(ii)
2884+ unwgt(j,ii)=unwgt(j,ii)+parton_iproc(j,i)
2885+ enddo
2886+ exit
2887+ enddo
2888+ else
2889+c S-event: we can sum everything to 'i_soft': all the contributions to
2890+c the S-events can be summed together. Ignore the shower_scale: this
2891+c will be updated later
2892+ icontr_sum(0,i_soft)=icontr_sum(0,i_soft)+1
2893+ icontr_sum(icontr_sum(0,i_soft),i_soft)=i
2894+ do j=1,niproc(i_soft)
2895+ do jj=1,iproc_save(nFKS(i))
2896+ if (eto(jj,nFKS(i)).eq.j) then
2897+c When computing upper bounding envelope (imode.eq.1) do not include the
2898+c virtual corrections. Exception: when computing only the virtual, do
2899+c include it here!
2900+ if (itype(i).eq.14 .and. imode.eq.1 .and. .not.
2901+ $ only_virt) exit
2902+ unwgt(j,i_soft)=unwgt(j,i_soft)+parton_iproc(jj,i)
2903+ endif
2904+ enddo
2905+ enddo
2906+ endif
2907+ enddo
2908+ call cpu_time(tAfter)
2909+ t_isum=t_isum+(tAfter-tBefore)
2910+ return
2911+ end
2912+
2913+ subroutine update_shower_scale_Sevents
2914+c When contributions from various FKS configrations are summed together
2915+c for the S-events (see the sum_identical_contributions subroutine), we
2916+c need to update the shower starting scale (because it is not
2917+c necessarily the same for all of these summed FKS configurations). Take
2918+c the weighted average over the FKS configurations as the shower scale
2919+c for the summed contribution.
2920+ use weight_lines
2921+ implicit none
2922+ include 'nexternal.inc'
2923+ include 'nFKSconfigs.inc'
2924+ integer i,j,ict
2925+ double precision tmp_wgt(fks_configs),showerscale(fks_configs)
2926+ $ ,temp_wgt,shsctemp
2927+ do i=1,fks_configs
2928+ tmp_wgt(i)=0d0
2929+ showerscale(i)=-1d0
2930+ enddo
2931+c sum the weights that contribute to a single FKS configuration.
2932+ do i=1,icontr
2933+ if (H_event(i)) cycle
2934+ if (icontr_sum(0,i).eq.0) cycle
2935+ do j=1,icontr_sum(0,i)
2936+ ict=icontr_sum(j,i)
2937+ tmp_wgt(nFKS(ict))=tmp_wgt(nFKS(ict))+wgts(1,i)
2938+ if (showerscale(nFKS(ict)).eq.-1d0) then
2939+ showerscale(nFKS(ict))=shower_scale(ict)
2940+c check that all the shower starting scales are identical for all the
2941+c contribution to a given FKS configuration.
2942+ elseif ( abs((showerscale(nFKS(ict))-shower_scale(ict))
2943+ $ /(showerscale(nFKS(ict))+shower_scale(ict)))
2944+ $ .gt. 1d-6 ) then
2945+ write (*,*) 'ERROR in update_shower_scale_Sevents'
2946+ $ ,showerscale(nFKS(ict)),shower_scale(ict)
2947+ stop 1
2948+ endif
2949+ enddo
2950+ enddo
2951+c Compute the weighted average of the shower scale. Weight is given by
2952+c the ABS cross section to given FKS configuration.
2953+ temp_wgt=0d0
2954+ shsctemp=0d0
2955+ do i=1,fks_configs
2956+ temp_wgt=temp_wgt+abs(tmp_wgt(i))
2957+ shsctemp=shsctemp+abs(tmp_wgt(i))*showerscale(i)
2958+ enddo
2959+ if (temp_wgt.ne.0d0) then
2960+ shsctemp=shsctemp/temp_wgt
2961+ else
2962+ shsctemp=0d0
2963+ endif
2964+c Overwrite the shower scale for the S-events
2965+ do i=1,icontr
2966+ if (H_event(i)) cycle
2967+ if (icontr_sum(0,i).ne.0) shower_scale(i)=shsctemp
2968+ enddo
2969+ return
2970+ end
2971+
2972+
2973+ subroutine fill_mint_function_NLOPS(f,n1body_wgt)
2974+c Fills the function that is returned to the MINT integrator. Depending
2975+c on the imode we should or should not include the virtual corrections.
2976+ use weight_lines
2977+ use mint_module
2978+ implicit none
2979+ include 'nexternal.inc'
2980+ include 'orders.inc'
2981+ integer i,j,ict,iamp,ithree,isix
2982+ double precision f(nintegrals),sigint,sigint1,sigint_ABS
2983+ $ ,n1body_wgt,tmp_wgt,max_weight
2984+ double precision virtual_over_born
2985+ common /c_vob/ virtual_over_born
2986+ sigint=0d0
2987+ sigint1=0d0
2988+ sigint_ABS=0d0
2989+ n1body_wgt=0d0
2990+ max_weight=0d0
2991+ if (icontr.eq.0) then
2992+ sigint_ABS=0d0
2993+ sigint=0d0
2994+ sigint1=0d0
2995+ else
2996+ do i=1,icontr
2997+ sigint=sigint+wgts(1,i)
2998+ max_weight=max(max_weight,abs(wgts(1,i)))
2999+ if (icontr_sum(0,i).eq.0) cycle
3000+ do j=1,niproc(i)
3001+ sigint_ABS=sigint_ABS+abs(unwgt(j,i))
3002+ sigint1=sigint1+unwgt(j,i) ! for consistency check
3003+ max_weight=max(max_weight,abs(unwgt(j,i)))
3004+ enddo
3005+ enddo
3006+c check the consistency of the results up to machine precision (10^-10 here)
3007+ if (imode.ne.1 .or. only_virt) then
3008+ if (abs((sigint-sigint1)/max_weight).gt.1d-10) then
3009+ write (*,*) 'ERROR: inconsistent integrals #0',sigint
3010+ $ ,sigint1,max_weight,abs((sigint-sigint1)/max_weight)
3011+ do i=1, icontr
3012+ write (*,*) i,icontr_sum(0,i),niproc(i),wgts(1,i)
3013+ if (icontr_sum(0,i).eq.0) cycle
3014+ do j=1,niproc(i)
3015+ write (*,*) j,unwgt(j,i)
3016+ enddo
3017+ enddo
3018+ stop 1
3019+ endif
3020+ else
3021+ sigint1=sigint1+virt_wgt_mint(0)
3022+ if (abs((sigint-sigint1)/max_weight).gt.1d-10) then
3023+ write (*,*) 'ERROR: inconsistent integrals #1',sigint
3024+ $ ,sigint1,max_weight,abs((sigint-sigint1)/max_weight)
3025+ $ ,virt_wgt_mint
3026+ do i=1, icontr
3027+ write (*,*) i,icontr_sum(0,i),niproc(i),wgts(1,i)
3028+ if (icontr_sum(0,i).eq.0) cycle
3029+ do j=1,niproc(i)
3030+ write (*,*) j,unwgt(j,i)
3031+ enddo
3032+ enddo
3033+ stop 1
3034+ endif
3035+ endif
3036+c n1body_wgt is used for the importance sampling over FKS directories
3037+ do i=1,icontr
3038+ if (icontr_sum(0,i).eq.0) cycle
3039+ tmp_wgt=0d0
3040+ do j=1,icontr_sum(0,i)
3041+ ict=icontr_sum(j,i)
3042+ if ( itype(ict).ne.2 .and. itype(ict).ne.3 .and.
3043+ $ itype(ict).ne.14 .and. itype(ict).ne.15)
3044+ $ tmp_wgt=tmp_wgt+wgts(1,ict)
3045+ enddo
3046+ n1body_wgt=n1body_wgt+abs(tmp_wgt)
3047+ enddo
3048+ endif
3049+ f(1)=sigint_ABS
3050+ f(2)=sigint
3051+ f(4)=virtual_over_born
3052+ do iamp=0,amp_split_size
3053+ if (iamp.eq.0) then
3054+ f(3)=0d0
3055+ f(6)=0d0
3056+ f(5)=0d0
3057+ do i=1,amp_split_size
3058+ f(3)=f(3)+virt_wgt_mint(i)
3059+ f(6)=f(6)+born_wgt_mint(i)
3060+ f(5)=f(5)+abs(virt_wgt_mint(i))
3061+ enddo
3062+ else
3063+ ithree=2*iamp+5
3064+ isix=2*iamp+6
3065+ f(ithree)=virt_wgt_mint(iamp)
3066+ f(isix)=born_wgt_mint(iamp)
3067+ endif
3068+ enddo
3069+ return
3070+ end
3071+
3072+
3073+ subroutine pick_unweight_contr(iFKS_picked)
3074+c Randomly pick (weighted by the ABS values) the contribution to a given
3075+c PS point that should be written in the event file.
3076+ use weight_lines
3077+ implicit none
3078+ include 'nexternal.inc'
3079+ include 'genps.inc'
3080+ include 'nFKSconfigs.inc'
3081+ include 'fks_info.inc'
3082+ include 'timing_variables.inc'
3083+ integer i,j,k,iFKS_picked,ict
3084+ double precision tot_sum,rnd,ran2,current,target
3085+ external ran2
3086+ integer i_process_addwrite
3087+ common/c_addwrite/i_process_addwrite
3088+ logical Hevents
3089+ common/SHevents/Hevents
3090+ logical dummy
3091+ double precision evtsgn
3092+ common /c_unwgt/ evtsgn,dummy
3093+ integer iproc_save(fks_configs),eto(maxproc,fks_configs)
3094+ $ ,etoi(maxproc,fks_configs),maxproc_found
3095+ common/cproc_combination/iproc_save,eto,etoi,maxproc_found
3096+ integer nFKSprocess
3097+ common/c_nFKSprocess/nFKSprocess
3098+ double precision SCALUP(fks_configs*2)
3099+ common /cshowerscale/SCALUP
3100+ double precision tmp_wgt(fks_configs),sum_granny_wgt
3101+ logical write_granny(fks_configs)
3102+ integer which_is_granny(fks_configs)
3103+ common/write_granny_resonance/which_is_granny,write_granny
3104+
3105+ call cpu_time(tBefore)
3106+ if (icontr.eq.0) return
3107+ tot_sum=0d0
3108+ do i=1,icontr
3109+ do j=1,niproc(i)
3110+ tot_sum=tot_sum+abs(unwgt(j,i))
3111+ enddo
3112+ enddo
3113+ rnd=ran2()
3114+ current=0d0
3115+ target=rnd*tot_sum
3116+ i=1
3117+ j=0
3118+ do while (current.lt.target)
3119+ j=j+1
3120+ if (mod(j,niproc(i)+1).eq.0) then
3121+ j=1
3122+ i=i+1
3123+ endif
3124+ current=current+abs(unwgt(j,i))
3125+ enddo
3126+c found the contribution that should be written:
3127+ icontr_picked=i
3128+ iproc_picked=j
3129+ if (H_event(icontr_picked)) then
3130+ Hevents=.true.
3131+ i_process_addwrite=iproc_picked
3132+ iFKS_picked=nFKS(icontr_picked)
3133+ SCALUP(iFKS_picked*2)=shower_scale(icontr_picked)
3134+ else
3135+ Hevents=.false.
3136+ i_process_addwrite=etoi(iproc_picked,nFKS(icontr_picked))
3137+ do k=1,icontr_sum(0,icontr_picked)
3138+ ict=icontr_sum(k,icontr_picked)
3139+ !MZif (particle_type_d(nFKS(ict),fks_i_d(nFKS(ict))).eq.8) then
3140+ if (need_color_links_d(nFKS(ict)).or.need_charge_links_d(nFKS(ict))) then
3141+ iFKS_picked=nFKS(ict)
3142+ exit
3143+ endif
3144+ if (k.eq.icontr_sum(0,icontr_picked)) then
3145+ write (*,*) 'ERROR: no configuration with i_fks a gluon'
3146+ stop 1
3147+ endif
3148+ enddo
3149+ SCALUP(iFKS_picked*2-1)=shower_scale(icontr_picked)
3150+c Determine if we need to write the granny (based only on the special
3151+c mapping in genps_fks) randomly, weighted by the seperate contributions
3152+c that are summed together in a single S-event.
3153+ do i=1,fks_configs
3154+ tmp_wgt(i)=0d0
3155+ enddo
3156+c fill tmp_wgt with the sum of weights per FKS configuration
3157+ do k=1,icontr_sum(0,icontr_picked)
3158+ ict=icontr_sum(k,icontr_picked)
3159+ tmp_wgt(nFKS(ict))=tmp_wgt(nFKS(ict))+wgts(1,ict)
3160+ enddo
3161+c Randomly select an FKS configuration
3162+ sum_granny_wgt=0d0
3163+ do i=1,fks_configs
3164+ sum_granny_wgt=sum_granny_wgt+abs(tmp_wgt(i))
3165+ enddo
3166+ target=ran2()*sum_granny_wgt
3167+ current=0d0
3168+ i=0
3169+ do while (current.le.target)
3170+ i=i+1
3171+ current=current+abs(tmp_wgt(i))
3172+ enddo
3173+c Overwrite the granny information of the FKS configuration with the
3174+c soft singularity with the FKS configuration randomly chosen.
3175+ write_granny(iFKS_picked)=write_granny(i)
3176+ which_is_granny(iFKS_picked)=which_is_granny(i)
3177+ endif
3178+ evtsgn=sign(1d0,unwgt(iproc_picked,icontr_picked))
3179+ call cpu_time(tAfter)
3180+ t_p_unw=t_p_unw+(tAfter-tBefore)
3181+ return
3182+ end
3183+
3184+
3185+ subroutine fill_rwgt_lines
3186+c Fills the lines, n_ctr_str, to be written in an event file with the
3187+c (internal) information to perform scale and/or PDF reweighting. All
3188+c information is available in each line to do the reweighting, apart
3189+c from the momenta: these are put in the momenta_str() array, and a
3190+c label in each of the n_ctr_str refers to a corresponding set of
3191+c momenta in the momenta_str() array.
3192+ use weight_lines
3193+ use extra_weights
3194+ implicit none
3195+ include 'nexternal.inc'
3196+ include 'genps.inc'
3197+ include 'nFKSconfigs.inc'
3198+ include 'fks_info.inc'
3199+ integer k,i,ii,j,jj,ict,ipro,momenta_conf(2)
3200+ logical momenta_equal,found
3201+ double precision conv
3202+ double precision,allocatable :: temp3(:,:,:)
3203+ character(len=1024),allocatable :: ctemp(:)
3204+ external momenta_equal
3205+ character*512 procid,str_temp
3206+ parameter (conv=389379660d0) ! conversion to picobarns
3207+ integer iproc_save(fks_configs),eto(maxproc,fks_configs)
3208+ $ ,etoi(maxproc,fks_configs),maxproc_found
3209+ common/cproc_combination/iproc_save,eto,etoi,maxproc_found
3210+ logical Hevents
3211+ common/SHevents/Hevents
3212+ if (.not.allocated(momenta_str)) allocate(momenta_str(0:3
3213+ $ ,max_mext,max_mom_str))
3214+ wgtref=unwgt(iproc_picked,icontr_picked)
3215+ n_ctr_found=0
3216+ n_mom_conf=0
3217+c Loop over all the contributions in the picked contribution (the latter
3218+c is chosen in the pick_unweight_contr() subroutine)
3219+ do i=1,icontr_sum(0,icontr_picked)
3220+ ict=icontr_sum(i,icontr_picked)
3221+c Check if the current set of momenta are already available in the
3222+c momenta_str array. If not, add it.
3223+ found=.false.
3224+ do k=1,2
3225+ do j=1,n_mom_conf
3226+ if (momenta_m(0,1,k,ict).le.0d0) then
3227+ momenta_conf(k)=0
3228+ cycle
3229+ endif
3230+ if (momenta_equal(momenta_str(0,1,j),
3231+ & momenta_m(0,1,k,ict))) then
3232+ momenta_conf(k)=j
3233+ found=.true.
3234+ exit
3235+ endif
3236+ enddo
3237+ if (.not. found) then
3238+ n_mom_conf=n_mom_conf+1
3239+ if (n_mom_conf.gt.max_mom_str .or. nexternal.gt.max_mext)
3240+ $ then
3241+ allocate(temp3(0:3,max(nexternal,max_mext)
3242+ $ ,max(n_mom_conf,max_mom_str)))
3243+ temp3(0:3,1:min(nexternal,max_mext)
3244+ $ ,1:min(max_mom_str,n_mom_conf))=momenta_str
3245+ call move_alloc(temp3,momenta_str)
3246+ max_mom_str=max(n_mom_conf,max_mom_str)
3247+ max_mext=max(nexternal,max_mext)
3248+ endif
3249+ do ii=1,nexternal
3250+ do jj=0,3
3251+ momenta_str(jj,ii,n_mom_conf)=
3252+ & momenta_m(jj,ii,k,ict)
3253+ enddo
3254+ enddo
3255+ momenta_conf(k)=n_mom_conf
3256+ endif
3257+ enddo
3258+ if (.not. Hevents) then
3259+c For S-events, be careful to take all the IPROC that contribute to the
3260+c iproc_picked:
3261+ ipro=eto(etoi(iproc_picked,nFKS(ict)),nFKS(ict))
3262+ do ii=1,iproc_save(nFKS(ict))
3263+ if (eto(ii,nFKS(ict)).ne.ipro) cycle
3264+ n_ctr_found=n_ctr_found+1
3265+
3266+ if (.not.allocated(n_ctr_str))
3267+ $ allocate(n_ctr_str(max_n_ctr))
3268+ if (n_ctr_found.gt.max_n_ctr) then
3269+ allocate(ctemp(n_ctr_found))
3270+ ctemp(1:max_n_ctr)=n_ctr_str
3271+ call move_alloc(ctemp,n_ctr_str)
3272+ max_n_ctr=n_ctr_found
3273+ endif
3274+
3275+ if (nincoming.eq.2) then
3276+ write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)')
3277+ & (wgt(j,ict)*conv,j=1,3),(wgt_me_tree(j,ict),j=1,2),
3278+ & nexternal
3279+ else
3280+ write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)')
3281+ & (wgt(j,ict),j=1,3),(wgt_me_tree(j,ict),j=1,2),
3282+ & nexternal
3283+ endif
3284+
3285+ procid=''
3286+ do j=1,nexternal
3287+ write (str_temp,*) parton_pdg(j,ii,ict)
3288+ procid=trim(adjustl(procid))//' '
3289+ & //trim(adjustl(str_temp))
3290+ enddo
3291+ n_ctr_str(n_ctr_found) =
3292+ & trim(adjustl(n_ctr_str(n_ctr_found)))//' '
3293+ & //trim(adjustl(procid))
3294+
3295+ write (str_temp,30)
3296+ & QCDpower(ict),
3297+ & (bjx(j,ict),j=1,2),
3298+ & (scales2(j,ict),j=1,3),
3299+ & g_strong(ict),
3300+ & (momenta_conf(j),j=1,2),
3301+ & itype(ict),
3302+ & nFKS(ict),
3303+ & fks_i_d(nFKS(ict)),
3304+ & fks_j_d(nFKS(ict)),
3305+ & parton_pdg_uborn(fks_j_d(nFKS(ict)),ii,ict),
3306+ & parton_iproc(ii,ict),
3307+ & bias_wgt(ict)
3308+ n_ctr_str(n_ctr_found) =
3309+ & trim(adjustl(n_ctr_str(n_ctr_found)))//' '
3310+ & //trim(adjustl(str_temp))
3311+ enddo
3312+ else
3313+c H-event
3314+ ipro=iproc_picked
3315+ n_ctr_found=n_ctr_found+1
3316+
3317+ if (.not.allocated(n_ctr_str))
3318+ $ allocate(n_ctr_str(max_n_ctr))
3319+ if (n_ctr_found.gt.max_n_ctr) then
3320+ allocate(ctemp(n_ctr_found))
3321+ ctemp(1:max_n_ctr)=n_ctr_str
3322+ call move_alloc(ctemp,n_ctr_str)
3323+ max_n_ctr=n_ctr_found
3324+ endif
3325+
3326+ if (nincoming.eq.2) then
3327+ write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)')
3328+ & (wgt(j,ict)*conv,j=1,3),(wgt_me_tree(j,ict),j=1,2),
3329+ & nexternal
3330+ else
3331+ write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)')
3332+ & (wgt(j,ict),j=1,3),(wgt_me_tree(j,ict),j=1,2),
3333+ & nexternal
3334+ endif
3335+
3336+ procid=''
3337+ do j=1,nexternal
3338+ write (str_temp,*) parton_pdg(j,ipro,ict)
3339+ procid=trim(adjustl(procid))//' '
3340+ & //trim(adjustl(str_temp))
3341+ enddo
3342+ n_ctr_str(n_ctr_found) =
3343+ & trim(adjustl(n_ctr_str(n_ctr_found)))//' '
3344+ & //trim(adjustl(procid))
3345+
3346+ write (str_temp,30)
3347+ & QCDpower(ict),
3348+ & (bjx(j,ict),j=1,2),
3349+ & (scales2(j,ict),j=1,3),
3350+ & g_strong(ict),
3351+ & (momenta_conf(j),j=1,2),
3352+ & itype(ict),
3353+ & nFKS(ict),
3354+ & fks_i_d(nFKS(ict)),
3355+ & fks_j_d(nFKS(ict)),
3356+ & parton_pdg_uborn(fks_j_d(nFKS(ict)),ipro,ict),
3357+ & parton_iproc(ipro,ict),
3358+ & bias_wgt(ict)
3359+ n_ctr_str(n_ctr_found) =
3360+ & trim(adjustl(n_ctr_str(n_ctr_found)))//' '
3361+ & //trim(adjustl(str_temp))
3362+
3363+
3364+ endif
3365+ enddo
3366+ return
3367+ 30 format(i2,6(1x,d14.8),6(1x,i2),1x,i8,1x,d18.12,1x,d18.12)
3368+ end
3369+
3370+
3371+ subroutine rotate_invar(pin,pout,cth,sth,cphi,sphi)
3372+c Given the four momentum pin, returns the four momentum pout (in the same
3373+c Lorentz frame) by performing a three-rotation of an angle theta
3374+c (cos(theta)=cth) around the y axis, followed by a three-rotation of an
3375+c angle phi (cos(phi)=cphi) along the z axis. The components of pin
3376+c and pout are given along these axes
3377+ implicit none
3378+ real*8 cth,sth,cphi,sphi,pin(0:3),pout(0:3)
3379+ real*8 q1,q2,q3
3380+c
3381+ q1=pin(1)
3382+ q2=pin(2)
3383+ q3=pin(3)
3384+ pout(1)=q1*cphi*cth-q2*sphi+q3*cphi*sth
3385+ pout(2)=q1*sphi*cth+q2*cphi+q3*sphi*sth
3386+ pout(3)=-q1*sth+q3*cth
3387+ pout(0)=pin(0)
3388+ return
3389+ end
3390+
3391+
3392+ subroutine trp_rotate_invar(pin,pout,cth,sth,cphi,sphi)
3393+c This subroutine performs a rotation in the three-space using a rotation
3394+c matrix that is the transpose of that used in rotate_invar(). Thus, if
3395+c called with the *same* angles, trp_rotate_invar() acting on the output
3396+c of rotate_invar() will return the input of rotate_invar()
3397+ implicit none
3398+ real*8 cth,sth,cphi,sphi,pin(0:3),pout(0:3)
3399+ real*8 q1,q2,q3
3400+c
3401+ q1=pin(1)
3402+ q2=pin(2)
3403+ q3=pin(3)
3404+ pout(1)=q1*cphi*cth+q2*sphi*cth-q3*sth
3405+ pout(2)=-q1*sphi+q2*cphi
3406+ pout(3)=q1*cphi*sth+q2*sphi*sth+q3*cth
3407+ pout(0)=pin(0)
3408+ return
3409+ end
3410+
3411+
3412+ subroutine getaziangles(p,cphi,sphi)
3413+ implicit none
3414+ real*8 p(0:3),cphi,sphi
3415+ real*8 xlength,cth,sth
3416+ double precision rho
3417+ external rho
3418+c
3419+ xlength=rho(p)
3420+ if(xlength.ne.0.d0)then
3421+ cth=p(3)/xlength
3422+ sth=sqrt(1-cth**2)
3423+ if(sth.ne.0.d0)then
3424+ cphi=p(1)/(xlength*sth)
3425+ sphi=p(2)/(xlength*sth)
3426+ else
3427+ cphi=1.d0
3428+ sphi=0.d0
3429+ endif
3430+ else
3431+ cphi=1.d0
3432+ sphi=0.d0
3433+ endif
3434+ return
3435+ end
3436+
3437+ subroutine phspncheck_born(ecm,xmass,xmom,pass)
3438+c Checks four-momentum conservation.
3439+c WARNING: works only in the partonic c.m. frame
3440+ implicit none
3441+ include 'nexternal.inc'
3442+ real*8 ecm,xmass(nexternal-1),xmom(0:3,nexternal-1)
3443+ real*8 tiny,xm,xlen4,xsum(0:3),xsuma(0:3),xrat(0:3),ptmp(0:3)
3444+ parameter (tiny=5.d-3)
3445+ integer jflag,npart,i,j,jj
3446+ logical pass
3447+c
3448+ pass=.true.
3449+ jflag=0
3450+ npart=nexternal-1
3451+ do i=0,3
3452+ xsum(i)=0.d0
3453+ xsuma(i)=0.d0
3454+ do j=nincoming+1,npart
3455+ xsum(i)=xsum(i)+xmom(i,j)
3456+ xsuma(i)=xsuma(i)+abs(xmom(i,j))
3457+ enddo
3458+ if(i.eq.0)xsum(i)=xsum(i)-ecm
3459+ if(xsuma(i).lt.1.d0)then
3460+ xrat(i)=abs(xsum(i))
3461+ else
3462+ xrat(i)=abs(xsum(i))/xsuma(i)
3463+ endif
3464+ if(xrat(i).gt.tiny.and.jflag.eq.0)then
3465+ write(*,*)'Momentum is not conserved'
3466+ write(*,*)'i=',i
3467+ do j=1,npart
3468+ write(*,'(4(d14.8,1x))') (xmom(jj,j),jj=0,3)
3469+ enddo
3470+ jflag=1
3471+ endif
3472+ enddo
3473+ if(jflag.eq.1)then
3474+ write(*,'(4(d14.8,1x))') (xsum(jj),jj=0,3)
3475+ write(*,'(4(d14.8,1x))') (xrat(jj),jj=0,3)
3476+ pass=.false.
3477+ return
3478+ endif
3479+c
3480+ do j=1,npart
3481+ do i=0,3
3482+ ptmp(i)=xmom(i,j)
3483+ enddo
3484+ xm=xlen4(ptmp)
3485+ if(abs(xm-xmass(j))/ptmp(0).gt.tiny .and.
3486+ & abs(xm-xmass(j)).gt.tiny)then
3487+ write(*,*)'Mass shell violation'
3488+ write(*,*)'j=',j
3489+ write(*,*)'mass=',xmass(j)
3490+ write(*,*)'mass computed=',xm
3491+ write(*,'(4(d14.8,1x))') (xmom(jj,j),jj=0,3)
3492+ pass=.false.
3493+ return
3494+ endif
3495+ enddo
3496+ return
3497+ end
3498+
3499+
3500+ subroutine phspncheck_nocms(npart,ecm,xmass,xmom,pass)
3501+c Checks four-momentum conservation. Derived from phspncheck;
3502+c works in any frame
3503+ implicit none
3504+ integer npart,maxmom
3505+ include "genps.inc"
3506+ include "nexternal.inc"
3507+ real*8 ecm,xmass(-max_branch:max_particles),
3508+ # xmom(0:3,nexternal)
3509+ real*8 tiny,vtiny,xm,xlen4,den,ecmtmp,xsum(0:3),xsuma(0:3),
3510+ # xrat(0:3),ptmp(0:3)
3511+ parameter (tiny=5.d-3)
3512+ parameter (vtiny=1.d-6)
3513+ integer jflag,i,j,jj
3514+ logical pass
3515+ double precision dot
3516+ external dot
3517+c
3518+ pass=.true.
3519+ jflag=0
3520+ do i=0,3
3521+ if (nincoming.eq.2) then
3522+ xsum(i)=-xmom(i,1)-xmom(i,2)
3523+ xsuma(i)=abs(xmom(i,1))+abs(xmom(i,2))
3524+ elseif(nincoming.eq.1) then
3525+ xsum(i)=-xmom(i,1)
3526+ xsuma(i)=abs(xmom(i,1))
3527+ endif
3528+ do j=nincoming+1,npart
3529+ xsum(i)=xsum(i)+xmom(i,j)
3530+ xsuma(i)=xsuma(i)+abs(xmom(i,j))
3531+ enddo
3532+ if(xsuma(i).lt.1.d0)then
3533+ xrat(i)=abs(xsum(i))
3534+ else
3535+ xrat(i)=abs(xsum(i))/xsuma(i)
3536+ endif
3537+ if(xrat(i).gt.tiny.and.jflag.eq.0)then
3538+ write(*,*)'Momentum is not conserved [nocms]'
3539+ write(*,*)'i=',i
3540+ do j=1,npart
3541+ write(*,'(i2,1x,4(d14.8,1x))') j,(xmom(jj,j),jj=0,3)
3542+ enddo
3543+ jflag=1
3544+ endif
3545+ enddo
3546+ if(jflag.eq.1)then
3547+ write(*,'(a3,1x,4(d14.8,1x))') 'sum',(xsum(jj),jj=0,3)
3548+ write(*,'(a3,1x,4(d14.8,1x))') 'rat',(xrat(jj),jj=0,3)
3549+ pass=.false.
3550+ return
3551+ endif
3552+c
3553+ do j=1,npart
3554+ do i=0,3
3555+ ptmp(i)=xmom(i,j)
3556+ enddo
3557+ xm=xlen4(ptmp)
3558+ if(ptmp(0).ge.1.d0)then
3559+ den=ptmp(0)
3560+ else
3561+ den=1.d0
3562+ endif
3563+ if(abs(xm-xmass(j))/den.gt.tiny .and.
3564+ & abs(xm-xmass(j)).gt.tiny)then
3565+ write(*,*)'Mass shell violation [nocms]'
3566+ write(*,*)'j=',j
3567+ write(*,*)'mass=',xmass(j)
3568+ write(*,*)'mass computed=',xm
3569+ write(*,'(4(d14.8,1x))') (xmom(jj,j),jj=0,3)
3570+ pass=.false.
3571+ return
3572+ endif
3573+ enddo
3574+c
3575+ if (nincoming.eq.2) then
3576+ ecmtmp=sqrt(2d0*dot(xmom(0,1),xmom(0,2)))
3577+ elseif (nincoming.eq.1) then
3578+ ecmtmp=xmom(0,1)
3579+ endif
3580+ if(abs(ecm-ecmtmp).gt.vtiny)then
3581+ write(*,*)'Inconsistent shat [nocms]'
3582+ write(*,*)'ecm given= ',ecm
3583+ write(*,*)'ecm computed=',ecmtmp
3584+ write(*,'(4(d14.8,1x))') (xmom(jj,1),jj=0,3)
3585+ write(*,'(4(d14.8,1x))') (xmom(jj,2),jj=0,3)
3586+ pass=.false.
3587+ return
3588+ endif
3589+
3590+ return
3591+ end
3592+
3593+
3594+ function xlen4(v)
3595+ implicit none
3596+ real*8 xlen4,tmp,v(0:3)
3597+c
3598+ tmp=v(0)**2-v(1)**2-v(2)**2-v(3)**2
3599+ xlen4=sign(1.d0,tmp)*sqrt(abs(tmp))
3600+ return
3601+ end
3602+
3603+
3604+ subroutine set_shower_scale(iFKS,Hevents)
3605+ implicit none
3606+ include "nexternal.inc"
3607+ include "madfks_mcatnlo.inc"
3608+ integer iFKS
3609+ logical Hevents
3610+ double precision xi_i_fks_ev,y_ij_fks_ev
3611+ double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
3612+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
3613+ double precision sqrtshat_ev,shat_ev
3614+ common/parton_cms_ev/sqrtshat_ev,shat_ev
3615+ double precision emsca,scalemin,scalemax,emsca_bare
3616+ logical emscasharp
3617+ common/cemsca/emsca,emsca_bare,emscasharp,scalemin,scalemax
3618+ character*4 abrv
3619+ common/to_abrv/abrv
3620+ include 'nFKSconfigs.inc'
3621+ double precision SCALUP(fks_configs*2)
3622+ common /cshowerscale/SCALUP
3623+ double precision shower_S_scale(fks_configs*2)
3624+ & ,shower_H_scale(fks_configs*2),ref_H_scale(fks_configs*2)
3625+ & ,pt_hardness
3626+ common /cshowerscale2/shower_S_scale,shower_H_scale,ref_H_scale
3627+ & ,pt_hardness
3628+
3629+ double precision xm12
3630+ integer ileg
3631+ common/cscaleminmax/xm12,ileg
3632+
3633+c Initialise
3634+ SCALUP(iFKS)=0d0
3635+c S events
3636+ if(.not.Hevents)then
3637+ if(abrv.ne.'born'.and.abrv.ne.'grid'.and.
3638+ & dampMCsubt.and.emsca.ne.0d0)then
3639+ SCALUP(iFKS)=min(emsca,scalemax)
3640+ else
3641+ call assign_scaleminmax(shat_ev,xi_i_fks_ev,scalemin
3642+ $ ,scalemax,ileg,xm12)
3643+ SCALUP(iFKS)=scalemax
3644+ endif
3645+ SCALUP(iFKS)=min(SCALUP(iFKS),shower_S_scale(iFKS))
3646+c H events
3647+ else
3648+ if(dampMCsubt.and.emsca.ne.0d0)then
3649+ SCALUP(iFKS)=scalemax
3650+ else
3651+ call assign_scaleminmax(shat_ev,xi_i_fks_ev,scalemin
3652+ $ ,scalemax,ileg,xm12)
3653+ SCALUP(iFKS)=scalemax
3654+ endif
3655+ SCALUP(iFKS)=min(SCALUP(iFKS),max(shower_H_scale(iFKS),
3656+ & ref_H_scale(iFKS)-min(emsca,scalemax)))
3657+ endif
3658+c Minimal starting scale
3659+ SCALUP(iFKS)=max(SCALUP(iFKS),3d0)
3660+
3661+ return
3662+ end
3663+
3664+
3665+ subroutine set_shower_scale_noshape(pp,iFKS)
3666+ implicit none
3667+ integer iFKS,j,i,iSH,nmax
3668+ include "nexternal.inc"
3669+ include "madfks_mcatnlo.inc"
3670+ include 'run.inc'
3671+ include 'nFKSconfigs.inc'
3672+ LOGICAL IS_A_J(NEXTERNAL),IS_A_LP(NEXTERNAL),IS_A_LM(NEXTERNAL)
3673+ LOGICAL IS_A_PH(NEXTERNAL)
3674+ COMMON /TO_SPECISA/IS_A_J,IS_A_LP,IS_A_LM,IS_A_PH
3675+ double precision sqrtshat_ev,shat_ev
3676+ common/parton_cms_ev/sqrtshat_ev,shat_ev
3677+ double precision sqrtshat_cnt(-2:2),shat_cnt(-2:2)
3678+ common/parton_cms_cnt/sqrtshat_cnt,shat_cnt
3679+ double precision p_born(0:3,nexternal-1)
3680+ common/pborn/p_born
3681+ double precision shower_S_scale(fks_configs*2)
3682+ & ,shower_H_scale(fks_configs*2),ref_H_scale(fks_configs*2)
3683+ & ,pt_hardness
3684+ common /cshowerscale2/shower_S_scale,shower_H_scale,ref_H_scale
3685+ & ,pt_hardness
3686+ double precision ptparton,pt,pp(0:3,nexternal),ppp(0:3,nexternal)
3687+ external pt
3688+c jet cluster algorithm
3689+ integer NN,NJET,JET(nexternal)
3690+ double precision pQCD(0:3,nexternal),PJET(0:3,nexternal),rfj,sycut
3691+ $ ,palg,amcatnlo_fastjetdmergemax,di(nexternal)
3692+ external amcatnlo_fastjetdmergemax
3693+
3694+c Initialise
3695+ NN=0
3696+ ppp=0d0
3697+ pQCD=0d0
3698+ pt_hardness=0d0
3699+ do j=1,nexternal
3700+ if (j.gt.nincoming.and.is_a_j(j)) then
3701+ NN=NN+1
3702+ ptparton=pt(pp(0,j))
3703+ endif
3704+ enddo
3705+
3706+c Unphysical situation
3707+ if(NN.le.0)then
3708+ write(*,*)'Error in set_shower_scale_noshape:'
3709+ write(*,*)'not enough QCD partons in process ',NN
3710+ stop
3711+c Processes without jets at the Born
3712+ elseif(NN.eq.1)then
3713+ shower_S_scale(iFKS)=sqrtshat_cnt(0)
3714+ shower_H_scale(iFKS)=sqrtshat_ev-ptparton
3715+c$$$ shower_H_scale(iFKS)=sqrtshat_cnt(0)
3716+ ref_H_scale(iFKS)=0d0
3717+c Processes with jets at the Born (iSH = 1 (2) means S (H) events)
3718+ else
3719+ do iSH=1,2
3720+ if(iSH.eq.1)then
3721+ nmax=nexternal-1
3722+ do j=1,nmax
3723+ do i=0,3
3724+ ppp(i,j)=p_born(i,j)
3725+ enddo
3726+ enddo
3727+ elseif(iSH.eq.2)then
3728+ nmax=nexternal
3729+ do j=1,nmax
3730+ do i=0,3
3731+ ppp(i,j)=pp(i,j)
3732+ enddo
3733+ enddo
3734+ else
3735+ write(*,*)'Wrong iSH inset_shower_scale_noshape: ',iSH
3736+ stop
3737+ endif
3738+ if(ppp(0,1).gt.0d0)then
3739+c Put all (light) QCD partons in momentum array for jet clustering.
3740+ NN=0
3741+ do j=nincoming+1,nmax
3742+ if (is_a_j(j))then
3743+ NN=NN+1
3744+ do i=0,3
3745+ pQCD(i,NN)=ppp(i,j)
3746+ enddo
3747+ endif
3748+ enddo
3749+c One MUST use kt, and no lower pt cut. The radius parameter can be changed
3750+ palg=1d0 ! jet algorithm: 1.0=kt, 0.0=C/A, -1.0 = anti-kt
3751+ sycut=0d0 ! minimum jet pt
3752+ rfj=1d0 ! the radius parameter
3753+ call amcatnlo_fastjetppgenkt_timed(pQCD,NN,rfj,sycut,palg,
3754+ & pjet,njet,jet)
3755+ do i=1,NN
3756+ di(i)=sqrt(amcatnlo_fastjetdmergemax(i-1))
3757+ if (i.gt.1)then
3758+ if(di(i).gt.di(i-1))then
3759+ write(*,*)'Error in set_shower_scale_noshape'
3760+ write(*,*)NN,i,di(i),di(i-1)
3761+ stop
3762+ endif
3763+ endif
3764+ enddo
3765+ if(iSH.eq.1)shower_S_scale(iFKS)=di(NN)
3766+ if(iSH.eq.2)then
3767+ ref_H_scale(iFKS)=di(NN-1)
3768+ pt_hardness=di(NN)
3769+c$$$ shower_H_scale(iFKS)=ref_H_scale(iFKS)-pt_hardness
3770+ shower_H_scale(iFKS)=ref_H_scale(iFKS)-pt_hardness/2d0
3771+ endif
3772+ else
3773+ if(iSH.eq.1)shower_S_scale(iFKS)=sqrtshat_cnt(0)
3774+ if(iSH.eq.2)then
3775+ ref_H_scale(iFKS)=shower_S_scale(iFKS)
3776+ shower_H_scale(iFKS)=ref_H_scale(iFKS)
3777+ endif
3778+ endif
3779+ enddo
3780+ endif
3781+
3782+ return
3783+ end
3784+
3785+
3786+
3787+ subroutine sreal(pp,xi_i_fks,y_ij_fks,wgt)
3788+c Wrapper for the n+1 contribution. Returns the n+1 matrix element
3789+c squared reduced by the FKS damping factor xi**2*(1-y).
3790+c Close to the soft or collinear limits it calls the corresponding
3791+c Born and multiplies with the AP splitting function or eikonal factors.
3792+ implicit none
3793+ include "nexternal.inc"
3794+ include "coupl.inc"
3795+
3796+ double precision pp(0:3,nexternal),wgt
3797+ double precision xi_i_fks,y_ij_fks
3798+
3799+ double precision shattmp,dot
3800+ integer i,j
3801+
3802+ integer i_fks,j_fks
3803+ common/fks_indices/i_fks,j_fks
3804+
3805+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
3806+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,
3807+ # sqrtshat,shat
3808+
3809+ logical softtest,colltest
3810+ common/sctests/softtest,colltest
3811+
3812+ double precision zero,tiny
3813+ parameter (zero=0d0)
3814+ logical need_color_links, need_charge_links
3815+ common /c_need_links/need_color_links, need_charge_links
3816+
3817+ double precision pmass(nexternal)
3818+ include 'orders.inc'
3819+
3820+ include "pmass.inc"
3821+
3822+ if (softtest.or.colltest) then
3823+ tiny=1d-12
3824+ else
3825+ tiny=1d-6
3826+ endif
3827+
3828+ if(pp(0,1).le.0.d0)then
3829+c Unphysical kinematics: set matrix elements equal to zero
3830+ wgt=0.d0
3831+ return
3832+ endif
3833+
3834+c Consistency check -- call to set_cms_stuff() must be done prior to
3835+c entering this function
3836+ if (nincoming.eq.2) then
3837+ shattmp=2d0*dot(pp(0,1),pp(0,2))
3838+ else
3839+ shattmp=pp(0,1)**2
3840+ endif
3841+ if(abs(shattmp/shat-1.d0).gt.1.d-5)then
3842+ write(*,*)'Error in sreal: inconsistent shat'
3843+ write(*,*)shattmp,shat
3844+ stop
3845+ endif
3846+
3847+ if (1d0-y_ij_fks.lt.tiny)then
3848+ if (pmass(j_fks).eq.zero.and.j_fks.le.nincoming)then
3849+ call sborncol_isr(pp,xi_i_fks,y_ij_fks,wgt)
3850+ elseif (pmass(j_fks).eq.zero.and.j_fks.ge.nincoming+1)then
3851+ call sborncol_fsr(pp,xi_i_fks,y_ij_fks,wgt)
3852+ else
3853+ wgt=0d0
3854+ amp_split(1:amp_split_size) = 0d0
3855+ endif
3856+ elseif (xi_i_fks.lt.tiny)then
3857+ if (need_color_links.or.need_charge_links)then
3858+c has soft singularities
3859+ call sbornsoft(pp,xi_i_fks,y_ij_fks,wgt)
3860+ else
3861+ wgt=0d0
3862+ amp_split(1:amp_split_size) = 0d0
3863+ endif
3864+ else
3865+ call smatrix_real(pp,wgt)
3866+ wgt=wgt*xi_i_fks**2*(1d0-y_ij_fks)
3867+ amp_split(1:amp_split_size) = amp_split(1:amp_split_size)*xi_i_fks**2*(1d0-y_ij_fks)
3868+ endif
3869+
3870+ return
3871+ end
3872+
3873+
3874+
3875+ subroutine sborncol_fsr(p,xi_i_fks,y_ij_fks,wgt)
3876+ implicit none
3877+ include "nexternal.inc"
3878+ double precision p(0:3,nexternal),wgt
3879+ double precision xi_i_fks,y_ij_fks
3880+C
3881+ double precision p_born(0:3,nexternal-1)
3882+ common/pborn/p_born
3883+
3884+ integer i_fks,j_fks
3885+ common/fks_indices/i_fks,j_fks
3886+
3887+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
3888+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,
3889+ # sqrtshat,shat
3890+
3891+ double precision xi_i_fks_ev,y_ij_fks_ev
3892+ double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
3893+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
3894+
3895+ double complex xij_aor
3896+ common/cxij_aor/xij_aor
3897+
3898+ double precision cthbe,sthbe,cphibe,sphibe
3899+ common/cbeangles/cthbe,sthbe,cphibe,sphibe
3900+
3901+ logical calculatedBorn
3902+ common/ccalculatedBorn/calculatedBorn
3903+
3904+ integer i,j,imother_fks,iord
3905+C ap and Q contain the QCD(1) and QED(2) Altarelli-Parisi kernel
3906+ double precision t,z,ap(2),E_j_fks,E_i_fks,Q(2),cphi_mother,
3907+ # sphi_mother,pi(0:3),pj(0:3),wgt_born
3908+ double complex W1(6),W2(6),W3(6),W4(6),Wij_angle,Wij_recta
3909+ double complex azifact
3910+
3911+c Particle types (=color/charges) of i_fks, j_fks and fks_mother
3912+ integer i_type,j_type,m_type
3913+ double precision ch_i,ch_j,ch_m
3914+ common/cparticle_types/i_type,j_type,m_type,ch_i,ch_j,ch_m
3915+
3916+ double precision zero,vtiny
3917+ parameter (zero=0d0)
3918+ parameter (vtiny=1d-8)
3919+ double complex ximag
3920+ parameter (ximag=(0.d0,1.d0))
3921+
3922+ include 'orders.inc'
3923+ double precision amp_split_local(amp_split_size)
3924+ logical split_type(nsplitorders)
3925+ common /c_split_type/split_type
3926+ complex*16 ans_cnt(2, nsplitorders), wgt1(2)
3927+ common /c_born_cnt/ ans_cnt
3928+ double complex ans_extra_cnt(2,nsplitorders)
3929+ integer iextra_cnt, isplitorder_born, isplitorder_cnt
3930+ common /c_extra_cnt/iextra_cnt, isplitorder_born, isplitorder_cnt
3931+
3932+ double precision iden_comp
3933+ common /c_iden_comp/iden_comp
3934+C
3935+ amp_split_local(1:amp_split_size) = 0d0
3936+
3937+C
3938+ if(p_born(0,1).le.0.d0)then
3939+c Unphysical kinematics: set matrix elements equal to zero
3940+ write (*,*) "No born momenta in sborncol_fsr"
3941+ wgt=0.d0
3942+ return
3943+ endif
3944+
3945+ E_j_fks = p(0,j_fks)
3946+ E_i_fks = p(0,i_fks)
3947+ z = 1d0 - E_i_fks/(E_i_fks+E_j_fks)
3948+ t = z * shat/4d0
3949+ call sborn(p_born,wgt_born)
3950+ if (iextra_cnt.gt.0)
3951+ 1 call extra_cnt(p_born, iextra_cnt, ans_extra_cnt)
3952+ call AP_reduced(j_type,i_type,ch_j,ch_i,t,z,ap)
3953+ call Qterms_reduced_timelike(j_type,i_type,ch_j,ch_i,t,z,Q)
3954+ wgt=0d0
3955+ do iord = 1, nsplitorders
3956+ if (.not.split_type(iord) .or. (iord.ne.qed_pos .and.
3957+ $ iord.ne.qcd_pos)) cycle
3958+C check if any extra_cnt is needed
3959+ if (iextra_cnt.gt.0) then
3960+ if (iord.eq.isplitorder_born) then
3961+ call sborn(p_born,wgt_born)
3962+ wgt1(1) = ans_cnt(1,iord)
3963+ wgt1(2) = ans_cnt(2,iord)
3964+ elseif (iord.eq.isplitorder_cnt) then
3965+ ! this is the contribution from the extra cnt
3966+ call extra_cnt(p_born, iextra_cnt, ans_extra_cnt)
3967+ wgt1(1) = ans_extra_cnt(1,iord)
3968+ wgt1(2) = ans_extra_cnt(2,iord)
3969+ else
3970+ write(*,*) 'ERROR in sborncol_fsr', iord
3971+ stop
3972+ endif
3973+ else
3974+ call sborn(p_born,wgt_born)
3975+ wgt1(1) = ans_cnt(1,iord)
3976+ wgt1(2) = ans_cnt(2,iord)
3977+ endif
3978+ if ((abs(j_type).eq.3 .and.i_type.eq.8) .or.
3979+ # (dabs(ch_j).ne.0d0 .and.ch_i.eq.0d0)) then
3980+ Q(1)=0d0
3981+ Q(2)=0d0
3982+ wgt1(2)=0d0
3983+ elseif (m_type.eq.8.or.ch_m.eq.0d0) then
3984+c Insert <ij>/[ij] which is not included by sborn()
3985+ if (1d0-y_ij_fks.lt.vtiny)then
3986+ azifact=xij_aor
3987+ else
3988+ do i=0,3
3989+ pi(i)=p_i_fks_ev(i)
3990+ pj(i)=p(i,j_fks)
3991+ enddo
3992+ CALL IXXXSO(pi ,ZERO ,+1,+1,W1)
3993+ CALL OXXXSO(pj ,ZERO ,-1,+1,W2)
3994+ CALL IXXXSO(pi ,ZERO ,-1,+1,W3)
3995+ CALL OXXXSO(pj ,ZERO ,+1,+1,W4)
3996+ Wij_angle=(0d0,0d0)
3997+ Wij_recta=(0d0,0d0)
3998+ do i=1,4
3999+ Wij_angle = Wij_angle + W1(i)*W2(i)
4000+ Wij_recta = Wij_recta + W3(i)*W4(i)
4001+ enddo
4002+ azifact=Wij_angle/Wij_recta
4003+ endif
4004+c Insert the extra factor due to Madgraph convention for polarization vectors
4005+ imother_fks=min(i_fks,j_fks)
4006+ call getaziangles(p_born(0,imother_fks),
4007+ # cphi_mother,sphi_mother)
4008+ wgt1(2) = -(cphi_mother-ximag*sphi_mother)**2 *
4009+ # wgt1(2) * azifact
4010+ amp_split_cnt(1:amp_split_size,2,iord) = -(cphi_mother-ximag
4011+ $ *sphi_mother)**2 *amp_split_cnt(1:amp_split_size,2
4012+ $ ,iord) * azifact
4013+ else
4014+ write(*,*) 'FATAL ERROR in sborncol_fsr',i_type,j_type,i_fks
4015+ $ ,j_fks
4016+ stop 1
4017+ endif
4018+ if (iord.eq.qcd_pos) then
4019+ wgt=wgt+dble(wgt1(1)*ap(1)+wgt1(2)*Q(1))
4020+ amp_split_local(1:amp_split_size) =
4021+ $ amp_split_local(1:amp_split_size)
4022+ $ +dble(amp_split_cnt(1:amp_split_size,1,iord)*AP(1)
4023+ $ +amp_split_cnt(1:amp_split_size,2,iord)*Q(1))
4024+ endif
4025+ if (iord.eq.qed_pos) then
4026+ wgt=wgt+dble(wgt1(1)*ap(2)+wgt1(2)*Q(2))
4027+ amp_split_local(1:amp_split_size) =
4028+ $ amp_split_local(1:amp_split_size)
4029+ $ +dble(amp_split_cnt(1:amp_split_size,1,iord)*AP(2)
4030+ $ +amp_split_cnt(1:amp_split_size,2,iord)*Q(2))
4031+ endif
4032+ enddo
4033+ wgt=wgt*iden_comp
4034+ amp_split(1:amp_split_size) = amp_split_local(1:amp_split_size)
4035+ $ *iden_comp
4036+ return
4037+ end
4038+
4039+
4040+
4041+ subroutine sborncol_isr(p,xi_i_fks,y_ij_fks,wgt)
4042+ implicit none
4043+ include "nexternal.inc"
4044+ double precision p(0:3,nexternal),wgt
4045+ double precision xi_i_fks,y_ij_fks
4046+C
4047+ double precision p_born(0:3,nexternal-1)
4048+ common/pborn/p_born
4049+
4050+ integer i_fks,j_fks
4051+ common/fks_indices/i_fks,j_fks
4052+
4053+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
4054+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,
4055+ # sqrtshat,shat
4056+
4057+ double precision xi_i_fks_ev,y_ij_fks_ev
4058+ double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
4059+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
4060+
4061+ double complex xij_aor
4062+ common/cxij_aor/xij_aor
4063+
4064+ logical calculatedBorn
4065+ common/ccalculatedBorn/calculatedBorn
4066+
4067+c Particle types (=color/charges) of i_fks, j_fks and fks_mother
4068+ integer i_type,j_type,m_type
4069+ double precision ch_i,ch_j,ch_m
4070+ common/cparticle_types/i_type,j_type,m_type,ch_i,ch_j,ch_m
4071+
4072+ integer i, j, iord
4073+C ap and Q contain the QCD(1) and QED(2) Altarelli-Parisi kernel
4074+ double precision t,z,ap(2),Q(2),cphi_mother,sphi_mother,
4075+ $ pi(0:3),pj(0:3),wgt_born
4076+ double complex W1(6),W2(6),W3(6),W4(6),Wij_angle,Wij_recta
4077+ double complex azifact
4078+
4079+ double precision zero,vtiny
4080+ parameter (zero=0d0)
4081+ parameter (vtiny=1d-8)
4082+ double complex ximag
4083+ parameter (ximag=(0.d0,1.d0))
4084+
4085+ include 'orders.inc'
4086+ double precision amp_split_local(amp_split_size)
4087+ double complex amp_split_cnt_local(amp_split_size,2,nsplitorders)
4088+ integer iamp
4089+ logical split_type(nsplitorders)
4090+ common /c_split_type/split_type
4091+ complex*16 ans_cnt(2, nsplitorders), wgt1(2)
4092+ common /c_born_cnt/ ans_cnt
4093+ double complex ans_extra_cnt(2,nsplitorders)
4094+ integer iextra_cnt, isplitorder_born, isplitorder_cnt
4095+ common /c_extra_cnt/iextra_cnt, isplitorder_born, isplitorder_cnt
4096+
4097+ double precision iden_comp
4098+ common /c_iden_comp/iden_comp
4099+C
4100+ amp_split_local(1:amp_split_size) = 0d0
4101+
4102+ if(p_born(0,1).le.0.d0)then
4103+c Unphysical kinematics: set matrix elements equal to zero
4104+ write (*,*) "No born momenta in sborncol_isr"
4105+ wgt=0.d0
4106+ return
4107+ endif
4108+
4109+ z = 1d0 - xi_i_fks
4110+c sreal return {\cal M} of FKS except for the partonic flux 1/(2*s).
4111+c Thus, an extra factor z (implicit in the flux of the reduced Born
4112+c in FKS) has to be inserted here
4113+ t = z*shat/4d0
4114+ call AP_reduced(m_type,i_type,ch_m,ch_i,t,z,ap)
4115+ call Qterms_reduced_spacelike(m_type,i_type,ch_m,ch_i,t,z,Q)
4116+ wgt=0d0
4117+ do iord = 1, nsplitorders
4118+ if (.not.split_type(iord) .or. (iord.ne.qed_pos .and.
4119+ $ iord.ne.qcd_pos)) cycle
4120+C check if any extra_cnt is needed
4121+ if (iextra_cnt.gt.0) then
4122+ if (iord.eq.isplitorder_born) then
4123+ ! this is the contribution from the born ME
4124+ call sborn(p_born,wgt_born)
4125+ wgt1(1:2) = ans_cnt(1:2,iord)
4126+ else if (iord.eq.isplitorder_cnt) then
4127+ ! this is the contribution from the extra cnt
4128+ call extra_cnt(p_born, iextra_cnt, ans_extra_cnt)
4129+ wgt1(1:2) = ans_extra_cnt(1:2,iord)
4130+ else
4131+ write(*,*) 'ERROR in sborncol_isr', iord
4132+ stop
4133+ endif
4134+ else
4135+ call sborn(p_born,wgt_born)
4136+ wgt1(1:2) = ans_cnt(1:2,iord)
4137+ endif
4138+ amp_split_cnt_local(1:amp_split_size,1,iord)=
4139+ $ amp_split_cnt(1:amp_split_size,1,iord)
4140+ amp_split_cnt_local(1:amp_split_size,2,iord)=
4141+ $ amp_split_cnt(1:amp_split_size,2,iord)
4142+ if (abs(m_type).eq.3.or.ch_m.ne.0d0) then
4143+ Q(1)=0d0
4144+ Q(2)=0d0
4145+ wgt1(2)=dcmplx(0d0,0d0)
4146+ amp_split_cnt_local(1:amp_split_size,2,iord)=dcmplx(0d0,0d0)
4147+ else
4148+c Insert <ij>/[ij] which is not included by sborn()
4149+ if (1d0-y_ij_fks.lt.vtiny)then
4150+ azifact=xij_aor
4151+ else
4152+ do i=0,3
4153+ pi(i)=p_i_fks_ev(i)
4154+ pj(i)=p(i,j_fks)
4155+ enddo
4156+ if(j_fks.eq.2 .and. nincoming.eq.2)then
4157+c Rotation according to innerpin.m. Use rotate_invar() if a more
4158+c general rotation is needed
4159+ pi(1)=-pi(1)
4160+ pi(3)=-pi(3)
4161+ pj(1)=-pj(1)
4162+ pj(3)=-pj(3)
4163+ endif
4164+ CALL IXXXSO(pi ,ZERO ,+1,+1,W1)
4165+ CALL OXXXSO(pj ,ZERO ,-1,+1,W2)
4166+ CALL IXXXSO(pi ,ZERO ,-1,+1,W3)
4167+ CALL OXXXSO(pj ,ZERO ,+1,+1,W4)
4168+ Wij_angle=(0d0,0d0)
4169+ Wij_recta=(0d0,0d0)
4170+ do i=1,4
4171+ Wij_angle = Wij_angle + W1(i)*W2(i)
4172+ Wij_recta = Wij_recta + W3(i)*W4(i)
4173+ enddo
4174+ azifact=Wij_angle/Wij_recta
4175+ endif
4176+c Insert the extra factor due to Madgraph convention for polarization vectors
4177+ cphi_mother=1.d0
4178+ sphi_mother=0.d0
4179+ wgt1(2) = -(cphi_mother+ximag*sphi_mother)**2 * wgt1(2) *
4180+ $ dconjg(azifact)
4181+ amp_split_cnt_local(1:amp_split_size,2,iord) = -(cphi_mother
4182+ $ +ximag*sphi_mother)**2
4183+ $ *amp_split_cnt_local(1:amp_split_size,2,iord) *
4184+ $ dconjg(azifact)
4185+ endif
4186+ if (iord.eq.qcd_pos) then
4187+ wgt=wgt+dble(wgt1(1)*ap(1)+wgt1(2)*Q(1))
4188+ amp_split_local(1:amp_split_size) =
4189+ $ amp_split_local(1:amp_split_size)
4190+ $ +dble(amp_split_cnt_local(1:amp_split_size,1,iord)
4191+ $ *AP(1)+amp_split_cnt_local(1:amp_split_size,2,iord)
4192+ $ *Q(1))
4193+ endif
4194+ if (iord.eq.qed_pos) then
4195+ wgt=wgt+dble(wgt1(1)*ap(2)+wgt1(2)*Q(2))
4196+ amp_split_local(1:amp_split_size) =
4197+ $ amp_split_local(1:amp_split_size)
4198+ $ +dble(amp_split_cnt_local(1:amp_split_size,1,iord)
4199+ $ *AP(2)+amp_split_cnt_local(1:amp_split_size,2,iord)
4200+ $ *Q(2))
4201+ endif
4202+ enddo
4203+ wgt=wgt*iden_comp
4204+ amp_split(1:amp_split_size) = amp_split_local(1:amp_split_size)
4205+ $ *iden_comp
4206+ return
4207+ end
4208+
4209+
4210+ subroutine xkplus(col1, col2, ch1, ch2, x, xkk)
4211+c This function returns the quantity K^{(+)}_{ab}(x), relevant for
4212+c the MS --> DIS change in the factorization scheme. Notice that
4213+c there's NO multiplicative (1-x) factor like in the previous functions.
4214+C the first entry in xkk is for QCD splittings, the second QED
4215+ implicit none
4216+ integer col1, col2
4217+ double precision ch1, ch2
4218+ double precision x, xkk(2)
4219+
4220+ double precision pi, vcf, vtf, vca, xnc
4221+ parameter (pi=3.14159265358979312D0)
4222+ parameter (vcf=4.d0/3.d0)
4223+ parameter (vtf=1.d0/2.d0)
4224+ parameter (vca=3.d0)
4225+ parameter (xnc=3.d0)
4226+
4227+ include "coupl.inc"
4228+c
4229+ if(col1.eq.8.and.col2.eq.8)then ! gg
4230+ xkk(1)=-2*nf*vtf*(1-x)*(-(x**2+(1-x)**2)*log(x)+8*x*(1-x)-1)
4231+ xkk(2)=0d0
4232+ elseif((abs(col1).eq.3.and.abs(col2).eq.3) .or.
4233+ $ (dabs(ch1).gt.0d0.and.dabs(ch2).gt.0d0))then ! qq
4234+ xkk(1)=vtf*(1-x)*(-(x**2+(1-x)**2)*log(x)+8*x*(1-x)-1)
4235+ xkk(2)=dble(abs(col1))*ch1**2*(1-x)*(-(x**2+(1-x)**2)*log(x)+8*x*(1-x)-1)
4236+ elseif((col1.eq.8.and.abs(col2).eq.3) .or.
4237+ $ (dabs(ch1).eq.0d0.and.dabs(ch2).gt.0d0))then ! gq
4238+ xkk(1)=-vcf*(-3.d0/2.d0-(1+x**2)*log(x)+(1-x)*(3+2*x))
4239+ xkk(2)=-ch2**2*(-3.d0/2.d0-(1+x**2)*log(x)+(1-x)*(3+2*x))
4240+ elseif((abs(col1).eq.3.and.col2.eq.8) .or.
4241+ $ (dabs(ch1).gt.0d0.and.dabs(ch2).eq.0d0))then ! qg
4242+ xkk(1)=vcf*(-3.d0/2.d0-(1+x**2)*log(x)+(1-x)*(3+2*x))
4243+ xkk(2)=ch1**2*(-3.d0/2.d0-(1+x**2)*log(x)+(1-x)*(3+2*x))
4244+ else
4245+ write(6,*)'Error in xkplus: wrong values', col1, col2, ch1, ch2
4246+ stop
4247+ endif
4248+ xkk(1) = xkk(1)*g**2
4249+ xkk(2) = xkk(2)*dble(gal(1))**2
4250+ return
4251+ end
4252+
4253+
4254+ subroutine xklog(col1, col2, ch1, ch2, x, xkk)
4255+c This function returns the quantity K^{(l)}_{ab}(x), relevant for
4256+c the MS --> DIS change in the factorization scheme. Notice that
4257+c there's NO multiplicative (1-x) factor like in the previous functions.
4258+C the first entry in xkk is for QCD splittings, the second QED
4259+ implicit none
4260+ integer col1, col2
4261+ double precision ch1, ch2
4262+ double precision x, xkk(2)
4263+
4264+ double precision pi, vcf, vtf, vca, xnc
4265+ parameter (pi=3.14159265358979312D0)
4266+ parameter (vcf=4.d0/3.d0)
4267+ parameter (vtf=1.d0/2.d0)
4268+ parameter (vca=3.d0)
4269+ parameter (xnc=3.d0)
4270+
4271+ include "coupl.inc"
4272+c
4273+ if(col1.eq.8.and.col2.eq.8)then ! gg
4274+ xkk(1)=-2*nf*vtf*(1-x)*(x**2+(1-x)**2)
4275+ xkk(2)=0d0
4276+ elseif((abs(col1).eq.3.and.abs(col2).eq.3) .or.
4277+ $ (dabs(ch1).gt.0d0.and.dabs(ch2).gt.0d0))then ! qq
4278+ xkk(1)=vtf*(1-x)*(x**2+(1-x)**2)
4279+ xkk(2)=dble(abs(col1))*ch1**2*(1-x)*(x**2+(1-x)**2)
4280+ elseif((col1.eq.8.and.abs(col2).eq.3) .or.
4281+ $ (dabs(ch1).eq.0d0.and.dabs(ch2).gt.0d0))then ! gq
4282+ xkk(1)=-vcf*(1+x**2)
4283+ xkk(2)=-ch2**2*(1+x**2)
4284+ elseif((abs(col1).eq.3.and.col2.eq.8) .or.
4285+ $ (dabs(ch1).gt.0d0.and.dabs(ch2).eq.0d0))then ! qg
4286+ xkk(1)=vcf*(1+x**2)
4287+ xkk(2)=ch1**2*(1+x**2)
4288+ else
4289+ write(6,*)'Error in xklog: wrong values', col1, col2, ch1, ch2
4290+ stop
4291+ endif
4292+ xkk(1) = xkk(1)*g**2
4293+ xkk(2) = xkk(2)*dble(gal(1))**2
4294+ return
4295+ end
4296+
4297+
4298+ subroutine xkdelta(col1, col2, ch1, ch2, xkk)
4299+c This function returns the quantity K^{(d)}_{ab}, relevant for
4300+c the MS --> DIS change in the factorization scheme.
4301+C the first entry in xkk is for QCD splittings, the second QED
4302+ implicit none
4303+ integer col1, col2
4304+ double precision ch1, ch2
4305+ double precision xkk(2)
4306+
4307+ double precision pi, vcf, vtf, vca, xnc
4308+ parameter (pi=3.14159265358979312D0)
4309+ parameter (vcf=4.d0/3.d0)
4310+ parameter (vtf=1.d0/2.d0)
4311+ parameter (vca=3.d0)
4312+ parameter (xnc=3.d0)
4313+
4314+ include "coupl.inc"
4315+c
4316+ if(col1.eq.8.and.col2.eq.8)then ! gg
4317+ xkk(1)=0.d0
4318+ xkk(2)=0.d0
4319+ elseif((abs(col1).eq.3.and.abs(col2).eq.3) .or.
4320+ $ (dabs(ch1).gt.0d0.and.dabs(ch2).gt.0d0))then ! qq
4321+ xkk(1)=0.d0
4322+ xkk(2)=0.d0
4323+ elseif((col1.eq.8.and.abs(col2).eq.3) .or.
4324+ $ (dabs(ch1).eq.0d0.and.dabs(ch2).gt.0d0))then ! gq
4325+ xkk(1)=vcf*(9.d0/2.d0+pi**2/3.d0)
4326+ xkk(2)=ch2**2*(9.d0/2.d0+pi**2/3.d0)
4327+ elseif((abs(col1).eq.3.and.col2.eq.8) .or.
4328+ $ (dabs(ch1).gt.0d0.and.dabs(ch2).eq.0d0))then ! qg
4329+ xkk(1)=-vcf*(9.d0/2.d0+pi**2/3.d0)
4330+ xkk(2)=-ch1**2*(9.d0/2.d0+pi**2/3.d0)
4331+ else
4332+ write(6,*)'Error in xkdelta: wrong values', col1, col2, ch1, ch2
4333+ stop
4334+ endif
4335+ xkk(1) = xkk(1)*g**2
4336+ xkk(2) = xkk(2)*dble(gal(1))**2
4337+ return
4338+ end
4339+
4340+
4341+ subroutine AP_reduced(col1, col2, ch1, ch2, t, z, ap)
4342+c Returns Altarelli-Parisi splitting function summed/averaged over helicities
4343+c times prefactors such that |M_n+1|^2 = ap * |M_n|^2. This means
4344+c AP_reduced = (1-z) P_{S(part1,part2)->part1+part2}(z) * g^2/t
4345+C the first entry in AP is QCD, the second QED
4346+c Therefore, the labeling conventions for particle IDs are not as in FKS:
4347+c part1 and part2 are the two particles emerging from the branching.
4348+c part1 and part2 can be either gluon (8) or (anti-)quark (+-3). z is the
4349+c fraction of the energy of part1 and t is the invariant mass of the mother.
4350+ implicit none
4351+
4352+ integer col1, col2
4353+ double precision ch1, ch2
4354+ double precision z,ap(2),t
4355+
4356+ double precision CA,TR,CF
4357+ parameter (CA=3d0,TR=1d0/2d0,CF=4d0/3d0)
4358+
4359+ include "coupl.inc"
4360+
4361+C sanity check
4362+ if (col1.eq.8.and.dabs(ch1).ne.0d0 .or.
4363+ 1 col2.eq.8.and.dabs(ch2).ne.0d0) then
4364+ write (*,*) 'Fatal Error #0 in AP_reduced',col1,col2,ch1,ch2
4365+ stop
4366+ endif
4367+
4368+ if (col1.eq.8 .and. col2.eq.8)then
4369+c g->gg splitting
4370+ ap(1) = 2d0 * CA * ( (1d0-z)**2/z + z + z*(1d0-z)**2 )
4371+ ap(2) = 0d0
4372+
4373+ elseif ((abs(col1).eq.3 .and. abs(col2).eq.3) .or.
4374+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).gt.0d0)) then
4375+c g/a->qqbar splitting
4376+ ap(1) = TR * ( z**2 + (1d0-z)**2 )*(1d0-z)
4377+ ap(2) = dble(abs(col1)) * ch1**2 * ( z**2 + (1d0-z)**2 )*(1d0-z)
4378+
4379+ elseif ((abs(col1).eq.3 .and. col2.eq.8) .or.
4380+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).eq.0d0)) then
4381+c q->q g/a splitting
4382+ ap(1) = CF * (1d0+z**2)
4383+ ap(2) = ch1**2 * (1d0+z**2)
4384+
4385+ elseif ((col1.eq.8 .and. abs(col2).eq.3) .or.
4386+ & (dabs(ch1).eq.0d0 .and. dabs(ch2).gt.0d0)) then
4387+c q->gq splitting
4388+ ap(1) = CF * (1d0+(1d0-z)**2)*(1d0-z)/z
4389+ ap(2) = ch2**2 * (1d0+(1d0-z)**2)*(1d0-z)/z
4390+
4391+ else
4392+ write (*,*) 'Fatal Error #1 in AP_reduced',col1,col2,ch1,ch2
4393+ stop
4394+ endif
4395+
4396+ ap(1) = ap(1)*g**2/t
4397+ ap(2) = ap(2)*dble(gal(1))**2/t
4398+ return
4399+ end
4400+
4401+
4402+ subroutine AP_reduced_prime(col1,col2,ch1,ch2,t,z,apprime)
4403+c Returns (1-z)*P^\prime * gS^2/t, with the same conventions as AP_reduced
4404+C the first entry in APprime is QCD, the second QED
4405+ implicit none
4406+
4407+ integer col1, col2
4408+ double precision ch1, ch2
4409+ double precision z,apprime(2),t
4410+
4411+ double precision CA,TR,CF
4412+ parameter (CA=3d0,TR=1d0/2d0,CF=4d0/3d0)
4413+
4414+ include "coupl.inc"
4415+
4416+ if (col1.eq.8 .and. col2.eq.8) then
4417+c g->gg splitting
4418+ apprime(1) = 0d0
4419+ apprime(2) = 0d0
4420+
4421+ elseif ((abs(col1).eq.3 .and. abs(col2).eq.3) .or.
4422+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).gt.0d0)) then
4423+c g/a->qqbar splitting
4424+ apprime(1) = -2 * TR * z * (1d0-z)**2
4425+ apprime(2) = -2 * dble(abs(col1)) * ch1**2 * z * (1d0-z)**2
4426+
4427+ elseif ((abs(col1).eq.3 .and. col2.eq.8) .or.
4428+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).eq.0d0)) then
4429+c q->q g/a splitting
4430+ apprime(1) = - CF * (1d0-z)**2
4431+ apprime(2) = - ch1**2 * (1d0-z)**2
4432+
4433+ elseif ((col1.eq.8 .and. abs(col2).eq.3) .or.
4434+ & (dabs(ch1).eq.0d0 .and. dabs(ch2).gt.0d0)) then
4435+c q->g/a q splitting
4436+ apprime(1) = - CF * z * (1d0-z)
4437+ apprime(2) = - ch2**2 * z * (1d0-z)
4438+ else
4439+ write (*,*) 'Fatal error in AP_reduced_prime',col1,col2,ch1,ch2
4440+ stop
4441+ endif
4442+
4443+ apprime(1) = apprime(1)*g**2/t
4444+ apprime(2) = apprime(2)*dble(gal(1))**2/t
4445+ return
4446+ end
4447+
4448+
4449+ subroutine Qterms_reduced_timelike(col1,col2,ch1,ch2,t,z,Qterms)
4450+c Eq's B.31 to B.34 of FKS paper, times (1-z)*g^2/t. The labeling
4451+c conventions for particle IDs are the same as those in AP_reduced
4452+C the first entry in Qterms is QCD, the second QED
4453+ implicit none
4454+
4455+ integer col1, col2
4456+ double precision ch1, ch2
4457+ double precision z,Qterms(2),t
4458+
4459+ double precision CA,TR,CF
4460+ parameter (CA=3d0,TR=1d0/2d0,CF=4d0/3d0)
4461+
4462+ include "coupl.inc"
4463+
4464+ if (col1.eq.8 .and. col2.eq.8) then
4465+c g->gg splitting
4466+ Qterms(1) = -4d0 * CA * z*(1d0-z)**2
4467+ Qterms(2) = 0d0
4468+
4469+ elseif ((abs(col1).eq.3 .and. abs(col2).eq.3) .or.
4470+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).gt.0d0)) then
4471+c g/a ->qqbar splitting
4472+ Qterms(1) = 4d0 * TR * z*(1d0-z)**2
4473+ Qterms(2) = 4d0 * dble(abs(col1)) * ch1**2 * z*(1d0-z)**2
4474+
4475+ elseif ((abs(col1).eq.3 .and. col2.eq.8) .or.
4476+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).eq.0d0)) then
4477+c q->q g/a splitting
4478+ Qterms(1) = 0d0
4479+ Qterms(2) = 0d0
4480+
4481+ elseif ((col1.eq.8 .and. abs(col2).eq.3) .or.
4482+ & (dabs(ch1).eq.0d0 .and. dabs(ch2).gt.0d0)) then
4483+c q->g/a q splitting
4484+ Qterms(1) = 0d0
4485+ Qterms(2) = 0d0
4486+ else
4487+ write (*,*) 'Fatal error in Qterms_reduced_timelike',col1,col2,ch1,ch2
4488+ stop
4489+ endif
4490+
4491+ Qterms(1) = Qterms(1)*g**2/t
4492+ Qterms(2) = Qterms(2)*dble(gal(1))**2/t
4493+ return
4494+ end
4495+
4496+
4497+ subroutine Qterms_reduced_spacelike(col1,col2,ch1,ch2,t,z,Qterms)
4498+c Eq's B.42 to B.45 of FKS paper, times (1-z)*gS^2/t. The labeling
4499+c conventions for particle IDs are the same as those in AP_reduced.
4500+C the first entry in Qterms is QCD, the second QED
4501+c Thus, part1 has momentum fraction z, and it is the one off-shell
4502+c (see (FKS.B.41))
4503+ implicit none
4504+
4505+ integer col1, col2
4506+ double precision ch1, ch2
4507+ double precision z,Qterms(2),t
4508+
4509+ double precision CA,TR,CF
4510+ parameter (CA=3d0,TR=1d0/2d0,CF=4d0/3d0)
4511+
4512+ include "coupl.inc"
4513+
4514+ if (col1.eq.8 .and. col2.eq.8)then
4515+c g->gg splitting
4516+ Qterms(1) = -4d0 * CA * (1d0-z)**2/z
4517+ Qterms(2) = 0d0
4518+
4519+ elseif ((abs(col1).eq.3 .and. abs(col2).eq.3) .or.
4520+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).gt.0d0)) then
4521+c g/a->qqbar splitting
4522+ Qterms(1) = 0d0
4523+ Qterms(2) = 0d0
4524+
4525+ elseif ((abs(col1).eq.3 .and. col2.eq.8) .or.
4526+ & (dabs(ch1).gt.0d0 .and. dabs(ch2).eq.0d0)) then
4527+c q->qg/a splitting
4528+ Qterms(1) = 0d0
4529+ Qterms(2) = 0d0
4530+
4531+ elseif ((col1.eq.8 .and. abs(col2).eq.3) .or.
4532+ & (dabs(ch1).eq.0d0 .and. dabs(ch2).gt.0d0)) then
4533+c q->g/a q splitting
4534+ Qterms(1) = -4d0 * CF * (1d0-z)**2/z
4535+ Qterms(2) = -4d0 * ch2**2 * (1d0-z)**2/z
4536+ else
4537+ write (*,*) 'Fatal error in Qterms_reduced_spacelike',col1,col2,ch1,ch2
4538+ stop
4539+ endif
4540+
4541+ Qterms(1) = Qterms(1)*g**2/t
4542+ Qterms(2) = Qterms(2)*dble(gal(1))**2/t
4543+ return
4544+ end
4545+
4546+
4547+ subroutine AP_reduced_SUSY(col1,col2,ch1,ch2,t,z,ap)
4548+c Same as AP_reduced, except for the fact that it only deals with
4549+c go -> go g
4550+c sq -> sq g
4551+c splittings in SUSY. We assume this function to be called with
4552+c part2==colour(i_fks)
4553+ implicit none
4554+
4555+ integer col1, col2
4556+ double precision ch1, ch2
4557+ double precision z,ap(2),t
4558+
4559+ double precision CA,TR,CF
4560+ parameter (CA=3d0,TR=1d0/2d0,CF=4d0/3d0)
4561+
4562+ include "coupl.inc"
4563+ write(*,*) 'FIX AP REDUCED SUSY'
4564+
4565+ if (col2.ne.8.and.ch2.ne.0d0)then
4566+ write (*,*) 'Fatal error #0 in AP_reduced_SUSY',col1,col2,ch1,ch2
4567+ stop
4568+ endif
4569+
4570+ if (col1.eq.8)then
4571+c go->gog splitting
4572+ ap(1) = CA * (1d0+z**2)
4573+ ap(2) = 0d0
4574+
4575+ elseif(abs(col1).eq.3.or.ch1.ne.0d0)then
4576+c sq->sqg splitting
4577+ ap(1) = 2d0 * CF * z
4578+ ap(2) = 2d0 * ch1**2 * z
4579+
4580+ else
4581+ write (*,*) 'Fatal error in AP_reduced_SUSY',col1,col2,ch1,ch2
4582+ stop
4583+ endif
4584+
4585+ ap(1) = ap(1)*g**2/t
4586+ ap(2) = ap(2)*dble(gal(1))**2/t
4587+
4588+ return
4589+ end
4590+
4591+
4592+ subroutine AP_reduced_massive(col1,col2,ch1,ch2,t,z,q2,m2,ap)
4593+c Returns massive Altarelli-Parisi splitting function summed/averaged over helicities
4594+c times prefactors such that |M_n+1|^2 = ap * |M_n|^2. This means
4595+c AP_reduced = (1-z) P_{S(part1,part2)->part1+part2}(z) * gS^2/t
4596+c Therefore, the labeling conventions for particle IDs are not as in FKS:
4597+c part1 and part2 are the two particles emerging from the branching.
4598+c part1 and part2 can be either gluon (8) or (anti-)quark (+-3). z is the
4599+c fraction of the energy of part1 and t is the invariant mass of the mother.
4600+ implicit none
4601+
4602+ integer col1, col2
4603+ double precision ch1, ch2
4604+ double precision z,ap(2),t,q2,m2
4605+
4606+ double precision CA,TR,CF
4607+ parameter (CA=3d0,TR=1d0/2d0,CF=4d0/3d0)
4608+
4609+ include "coupl.inc"
4610+ write(*,*) 'FIX AP REDUCED MASSIVE'
4611+
4612+ if (col1.eq.8 .and. col2.eq.8)then
4613+c g->gg splitting
4614+ ap(1) = 2d0 * CA * ( (1d0-z)**2/z + z + z*(1d0-z)**2 )
4615+ ap(2) = 0d0
4616+
4617+ elseif((abs(col1).eq.3 .and. abs(col2).eq.3).or.
4618+ & (ch1.ne.0d0 .and. ch2.ne.0d0))then
4619+c g->qqbar splitting
4620+ ap(1) = TR * ( z**2 + (1d0-z)**2 )*(1d0-z) + TR * 2d0*m2/(z*q2)
4621+ ap(1) = dble(abs(col1)) * ch1**2 * ( z**2 + (1d0-z)**2 )*(1d0-z) + TR * 2d0*m2/(z*q2)
4622+ elseif((abs(col1).eq.3 .and. col2.eq.8).or.
4623+ & (ch1.ne.0d0.and.ch2.eq.0d0))then
4624+c q->qg splitting
4625+ ap(1) = CF * (1d0+z**2) - CF * 2d0*m2/(z*q2)
4626+ ap(2) = ch1**2 * (1d0+z**2) - ch1**2 * 2d0*m2/(z*q2)
4627+
4628+ elseif((col1.eq.8 .and. abs(col2).eq.3).or.
4629+ & (ch1.eq.0d0.and.ch2.ne.0d0))then
4630+c q->gq splitting
4631+ ap(1) = CF * (1d0+(1d0-z)**2)*(1d0-z)/z - CF * 2d0*m2/(z*q2)
4632+ ap(2) = ch2**2 * (1d0+(1d0-z)**2)*(1d0-z)/z - ch2**2 * 2d0*m2/(z*q2)
4633+ else
4634+ write (*,*) 'Fatal error in AP_reduced',col1,col2,ch1,ch2
4635+ stop
4636+ endif
4637+
4638+ ap(1) = ap(1)*g**2/t
4639+ ap(2) = ap(2)*dble(gal(1))**2/t
4640+
4641+ return
4642+ end
4643+
4644+
4645+
4646+ subroutine sbornsoft(pp,xi_i_fks,y_ij_fks,wgt)
4647+ implicit none
4648+
4649+ include "nexternal.inc"
4650+c include "fks.inc"
4651+ integer fks_j_from_i(nexternal,0:nexternal)
4652+ & ,particle_type(nexternal),pdg_type(nexternal)
4653+ common /c_fks_inc/fks_j_from_i,particle_type,pdg_type
4654+ include "coupl.inc"
4655+
4656+ integer m,n
4657+
4658+ double precision softcontr,pp(0:3,nexternal),wgt,eik,xi_i_fks
4659+ & ,y_ij_fks
4660+ double precision wgt1
4661+ integer i,j,k
4662+
4663+ double precision p_born(0:3,nexternal-1)
4664+ common/pborn/p_born
4665+
4666+ integer i_fks,j_fks
4667+ common/fks_indices/i_fks,j_fks
4668+
4669+ double precision zero,pmass(nexternal)
4670+ parameter(zero=0d0)
4671+
4672+ logical need_color_links, need_charge_links
4673+ common /c_need_links/need_color_links, need_charge_links
4674+ integer ipos_ord
4675+ include 'orders.inc'
4676+ double precision amp_split_soft(amp_split_size)
4677+ common /to_amp_split_soft/amp_split_soft
4678+
4679+ double precision iden_comp
4680+ common /c_iden_comp/iden_comp
4681+
4682+ include "pmass.inc"
4683+c
4684+c Call the Born to be sure that 'CalculatedBorn' is done correctly. This
4685+c should always be done before calling the color-correlated Borns,
4686+c because of the caching of the diagrams.
4687+c
4688+ call sborn(p_born(0,1),wgt1)
4689+c
4690+C Reset the amp_split array
4691+ amp_split(1:amp_split_size) = 0d0
4692+
4693+ softcontr=0d0
4694+ do i=1,fks_j_from_i(i_fks,0)
4695+ do j=1,i
4696+ m=fks_j_from_i(i_fks,i)
4697+ n=fks_j_from_i(i_fks,j)
4698+ if ((m.ne.n .or. (m.eq.n .and. pmass(m).ne.ZERO)) .and.
4699+ & n.ne.i_fks.and.m.ne.i_fks) then
4700+C wgt includes the gs/w^2
4701+ call sborn_sf(p_born,m,n,wgt)
4702+ if (wgt.ne.0d0) then
4703+ call eikonal_reduced(pp,m,n,i_fks,j_fks,
4704+ # xi_i_fks,y_ij_fks,eik)
4705+ softcontr=softcontr+wgt*eik*iden_comp
4706+ ! update the amp_split array
4707+ if (need_color_links) ipos_ord = qcd_pos
4708+ if (need_charge_links) ipos_ord = qed_pos
4709+ amp_split(1:amp_split_size) = amp_split(1:amp_split_size)
4710+ $ - 2d0 * eik * amp_split_soft(1:amp_split_size)*iden_comp
4711+ endif
4712+ endif
4713+ enddo
4714+ enddo
4715+ wgt=softcontr
4716+c Add minus sign to compensate the minus in the color factor
4717+c of the color-linked Borns (b_sf_0??.f)
4718+c Factor two to fix the limits.
4719+ wgt=-2d0*wgt
4720+ return
4721+ end
4722+
4723+
4724+ subroutine eikonal_reduced(pp,m,n,i_fks,j_fks,xi_i_fks,y_ij_fks,eik)
4725+c Returns the eikonal factor
4726+ implicit none
4727+
4728+ include "nexternal.inc"
4729+ double precision eik,pp(0:3,nexternal),xi_i_fks,y_ij_fks
4730+ double precision dot,dotnm,dotni,dotmi,fact
4731+ integer n,m,i_fks,j_fks,i
4732+ integer softcol
4733+
4734+ include "coupl.inc"
4735+
4736+ external dot
4737+ double precision xi_i_fks_ev,y_ij_fks_ev
4738+ double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2)
4739+ common/fksvariables/xi_i_fks_ev,y_ij_fks_ev,p_i_fks_ev,p_i_fks_cnt
4740+
4741+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
4742+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,
4743+ # sqrtshat,shat
4744+
4745+ real*8 phat_i_fks(0:3)
4746+
4747+ double precision zero,pmass(nexternal),tiny
4748+ parameter(zero=0d0)
4749+ parameter(tiny=1d-6)
4750+ include "pmass.inc"
4751+
4752+c Define the reduced momentum for i_fks
4753+ softcol=0
4754+ if (1d0-y_ij_fks.lt.tiny)softcol=2
4755+ if(p_i_fks_cnt(0,softcol).lt.0d0)then
4756+ if(xi_i_fks.eq.0.d0)then
4757+ write (*,*) 'Error #1 in eikonal_reduced',
4758+ # softcol,xi_i_fks,y_ij_fks
4759+ stop
4760+ endif
4761+ if(pp(0,i_fks).ne.0.d0)then
4762+ write(*,*)'WARNING in eikonal_reduced: no cnt momenta',
4763+ # softcol,xi_i_fks,y_ij_fks
4764+ do i=0,3
4765+ phat_i_fks(i)=pp(i,i_fks)/xi_i_fks
4766+ enddo
4767+ else
4768+ write (*,*) 'Error #2 in eikonal_reduced',
4769+ # softcol,xi_i_fks,y_ij_fks
4770+ stop
4771+ endif
4772+ else
4773+ do i=0,3
4774+ phat_i_fks(i)=p_i_fks_cnt(i,softcol)
4775+ enddo
4776+ endif
4777+c Calculate the eikonal factor
4778+ dotnm=dot(pp(0,n),pp(0,m))
4779+ if ((m.ne.j_fks .and. n.ne.j_fks) .or. pmass(j_fks).ne.ZERO) then
4780+ dotmi=dot(pp(0,m),phat_i_fks)
4781+ dotni=dot(pp(0,n),phat_i_fks)
4782+ fact= 1d0-y_ij_fks
4783+ elseif (m.eq.j_fks .and. n.ne.j_fks .and.
4784+ & pmass(j_fks).eq.ZERO) then
4785+ dotni=dot(pp(0,n),phat_i_fks)
4786+ dotmi=sqrtshat/2d0 * pp(0,j_fks)
4787+ fact= 1d0
4788+ elseif (m.ne.j_fks .and. n.eq.j_fks .and.
4789+ & pmass(j_fks).eq.ZERO) then
4790+ dotni=sqrtshat/2d0 * pp(0,j_fks)
4791+ dotmi=dot(pp(0,m),phat_i_fks)
4792+ fact= 1d0
4793+ else
4794+ write (*,*) 'Error #3 in eikonal_reduced'
4795+ stop
4796+ endif
4797+
4798+ eik = dotnm/(dotni*dotmi)*fact
4799+ return
4800+ end
4801+
4802+
4803+ subroutine sreal_deg(p,xi_i_fks,y_ij_fks,
4804+ # collrem_xi,collrem_lxi)
4805+ use extra_weights
4806+ implicit none
4807+ include "genps.inc"
4808+ include 'nexternal.inc'
4809+ include "coupl.inc"
4810+ include 'q_es.inc'
4811+ include "run.inc"
4812+ include "orders.inc"
4813+
4814+ integer iord, iap
4815+ double precision p(0:3,nexternal),collrem_xi,collrem_lxi
4816+ double precision xi_i_fks,y_ij_fks
4817+ double precision collrem_xi_tmp, collrem_lxi_tmp
4818+
4819+ double precision p_born(0:3,nexternal-1), wgt_born
4820+ common/pborn/p_born
4821+
4822+ integer i_fks,j_fks
4823+ common/fks_indices/i_fks,j_fks
4824+
4825+ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat
4826+ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm,
4827+ # sqrtshat,shat
4828+
4829+ double precision delta_used
4830+ common /cdelta_used/delta_used
4831+
4832+ double precision rwgt,shattmp,dot,born_wgt,oo2pi,z,t,ap(2),
4833+ # apprime(2),xkkernp(2),xkkernd(2),xkkernl(2),xnorm
4834+ external dot
4835+
4836+c Particle types (=color/charges) of i_fks, j_fks and fks_mother
4837+ integer i_type,j_type,m_type
4838+ double precision ch_i, ch_j, ch_m
4839+ common/cparticle_types/i_type,j_type,m_type,ch_i,ch_j,ch_m
4840+ complex*16 ans_cnt(2, nsplitorders), wgt1(2)
4841+ common /c_born_cnt/ ans_cnt
4842+ logical split_type(nsplitorders)
4843+ common /c_split_type/split_type
4844+
4845+ double precision one,pi
4846+ parameter (one=1.d0)
4847+ parameter (pi=3.1415926535897932385d0)
4848+ double precision iden_comp
4849+ common /c_iden_comp/iden_comp
4850+
4851+ double complex ans_extra_cnt(2,nsplitorders)
4852+ integer iextra_cnt, isplitorder_born, isplitorder_cnt
4853+ common /c_extra_cnt/iextra_cnt, isplitorder_born, isplitorder_cnt
4854+ logical calculatedBorn
4855+ common/ccalculatedBorn/calculatedBorn
4856+
4857+C keep track of each split orders
4858+ integer iamp
4859+ double precision amp_split_collrem_xi(amp_split_size),
4860+ $ amp_split_collrem_lxi(amp_split_size),
4861+ $ amp_split_wgtdegrem_xi(amp_split_size),
4862+ $ amp_split_wgtdegrem_lxi(amp_split_size),
4863+ $ amp_split_wgtdegrem_muF(amp_split_size)
4864+ common /to_amp_split_deg/amp_split_wgtdegrem_xi,
4865+ $ amp_split_wgtdegrem_lxi,
4866+ $ amp_split_wgtdegrem_muF
4867+ ! amp_split for the DIS scheme
4868+ double precision amp_split_wgtdis_p(amp_split_size),
4869+ $ amp_split_wgtdis_l(amp_split_size),
4870+ $ amp_split_wgtdis_d(amp_split_size)
4871+ common /to_amp_split_dis/amp_split_wgtdis_p,
4872+ $ amp_split_wgtdis_l,
4873+ $ amp_split_wgtdis_d
4874+ double precision prefact_xi
4875+
4876+ ! PDF scheme (DIS or MSbar)
4877+ character*2 PDFscheme
4878+ data PDFscheme /'MS'/ ! DI-> dis, MS-> msbar
4879+
4880+ amp_split_collrem_xi(1:amp_split_size) = 0d0
4881+ amp_split_collrem_lxi(1:amp_split_size) = 0d0
4882+ amp_split_wgtdegrem_xi(1:amp_split_size) = 0d0
4883+ amp_split_wgtdegrem_lxi(1:amp_split_size) = 0d0
4884+ amp_split_wgtdegrem_muF(1:amp_split_size) = 0d0
4885+ amp_split_wgtdis_p(1:amp_split_size) = 0d0
4886+ amp_split_wgtdis_l(1:amp_split_size) = 0d0
4887+ amp_split_wgtdis_d(1:amp_split_size) = 0d0
4888+
4889+
4890+ if(j_fks.gt.nincoming)then
4891+c Do not include this contribution for final-state branchings
4892+ collrem_xi=0.d0
4893+ collrem_lxi=0.d0
4894+ if(doreweight)then
4895+ wgtdegrem_xi=0.d0
4896+ wgtdegrem_lxi=0.d0
4897+ wgtdegrem_muF=0.d0
4898+ endif
4899+ return
4900+ endif
4901+
4902+ if(p_born(0,1).le.0.d0)then
4903+c Unphysical kinematics: set matrix elements equal to zero
4904+ write (*,*) "No born momenta in sreal_deg"
4905+ collrem_xi=0.d0
4906+ collrem_lxi=0.d0
4907+ if(doreweight)then
4908+ wgtdegrem_xi=0.d0
4909+ wgtdegrem_lxi=0.d0
4910+ wgtdegrem_muF=0.d0
4911+ endif
4912+ return
4913+ endif
4914+
4915+c Consistency check -- call to set_cms_stuff() must be done prior to
4916+c entering this function
4917+ if (nincoming.eq.2) then
4918+ shattmp=2d0*dot(p(0,1),p(0,2))
4919+ else
4920+ shattmp=p(0,1)**2
4921+ endif
4922+ if(abs(shattmp/shat-1.d0).gt.1.d-5)then
4923+ write(*,*)'Error in sreal: inconsistent shat'
4924+ write(*,*)shattmp,shat
4925+ stop
4926+ endif
4927+
4928+c A factor gS^2 is included in the Altarelli-Parisi kernels
4929+ oo2pi=one/(8d0*PI**2)
4930+
4931+ z = 1d0 - xi_i_fks
4932+ t = one
4933+ call AP_reduced(m_type,i_type,ch_m,ch_i,t,z,ap)
4934+ call AP_reduced_prime(m_type,i_type,ch_m,ch_i,t,z,apprime)
4935+
4936+ ! call the DIS kernels here
4937+ ! p-> [1/(1-z)]_+
4938+ ! l-> [log(1-z)/(1-z)]_+
4939+ ! d-> delta(1-z)
4940+ call xkplus(m_type,i_type,ch_m,ch_i,z,xkkernp)
4941+ call xkdelta(m_type,i_type,ch_m,ch_i,xkkernd)
4942+ call xklog(m_type,i_type,ch_m,ch_i,z,xkkernl)
4943+
4944+ collrem_xi=0.d0
4945+ collrem_lxi=0.d0
4946+ calculatedborn=.false.
4947+ do iord = 1, nsplitorders
4948+ if (.not.split_type(iord).or.(iord.ne.qed_pos.and.iord.ne.qcd_pos)) cycle
4949+
4950+C check if any extra_cnt is needed
4951+ if (iextra_cnt.gt.0) then
4952+ if (iord.eq.isplitorder_born) then
4953+ ! this is the contribution from the born ME
4954+ call sborn(p_born,wgt_born)
4955+ wgt1(1) = ans_cnt(1,iord)
4956+ wgt1(2) = ans_cnt(2,iord)
4957+ else if (iord.eq.isplitorder_cnt) then
4958+ ! this is the contribution from the extra cnt
4959+ call extra_cnt(p_born,iextra_cnt,ans_extra_cnt)
4960+ wgt1(1) = ans_extra_cnt(1,iord)
4961+ wgt1(2) = ans_extra_cnt(2,iord)
4962+ else
4963+ write(*,*) 'ERROR in sreal_deg', iord
4964+ stop
4965+ endif
4966+ else
4967+ call sborn(p_born,wgt_born)
4968+ wgt1(1) = ans_cnt(1,iord)
4969+ wgt1(2) = ans_cnt(2,iord)
4970+ endif
4971+
4972+ if (iord.eq.qcd_pos) iap = 1
4973+ if (iord.eq.qed_pos) iap = 2
4974+ collrem_xi_tmp=ap(iap)*log(shat*delta_used/(2*q2fact(j_fks))) -
4975+ # apprime(iap)
4976+ collrem_lxi_tmp=2*ap(iap)
4977+
4978+c The partonic flux 1/(2*s) is inserted in genps. Thus, an extra
4979+c factor z (implicit in the flux of the reduced Born in FKS)
4980+c has to be inserted here
4981+ xnorm=1.d0/z *iden_comp
4982+
4983+ collrem_xi=collrem_xi + oo2pi*dble(wgt1(1))*collrem_xi_tmp*
4984+ & xnorm
4985+ collrem_lxi=collrem_lxi + oo2pi*dble(wgt1(1))*collrem_lxi_tmp*
4986+ & xnorm
4987+
4988+ amp_split_collrem_xi(1:amp_split_size) = amp_split_collrem_xi(1:amp_split_size)+
4989+ & dble(amp_split_cnt(1:amp_split_size,1,iord))*oo2pi*collrem_xi_tmp*xnorm
4990+ amp_split_collrem_lxi(1:amp_split_size) = amp_split_collrem_lxi(1:amp_split_size)+
4991+ & dble(amp_split_cnt(1:amp_split_size,1,iord))*oo2pi*collrem_lxi_tmp*xnorm
4992+
4993+ prefact_xi=ap(iap)*log(shat*delta_used/(2*QES2)) -
4994+ & apprime(iap)
4995+ amp_split_wgtdegrem_xi(1:amp_split_size) = amp_split_wgtdegrem_xi(1:amp_split_size)+
4996+ & oo2pi*dble(amp_split_cnt(1:amp_split_size,1,iord))*prefact_xi*xnorm
4997+ amp_split_wgtdegrem_lxi(1:amp_split_size) = amp_split_collrem_lxi(1:amp_split_size)
4998+ amp_split_wgtdegrem_muF(1:amp_split_size) = amp_split_wgtdegrem_muF(1:amp_split_size)-
4999+ & oo2pi*dble(amp_split_cnt(1:amp_split_size,1,iord))*ap(iap)*xnorm
5000+ ! amp split for the DIS scheme
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: