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

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 969
Proposed branch: lp:~maddevelopers/mg5amcnlo/3.3.0
Merge into: lp:mg5amcnlo
Diff against target: 45665 lines (+19561/-10123)
616 files modified
.bzrignore (+1/-0)
INSTALL (+1/-1)
MadSpin/decay.py (+7/-8)
MadSpin/interface_madspin.py (+2/-2)
MadSpin/madspin (+3/-3)
Template/Common/Source/PDF/pdf.inc (+2/-1)
Template/LO/Cards/run_card.dat (+13/-6)
Template/LO/Source/PDF/ElectroweakFlux.f (+225/-0)
Template/LO/Source/PDF/ElectroweakFluxDriver.f (+561/-0)
Template/LO/Source/PDF/PhotonFlux.f (+10/-5)
Template/LO/Source/PDF/makefile (+3/-3)
Template/LO/Source/PDF/pdfwrap.f (+2/-2)
Template/LO/Source/PDF/pdg2pdf.f (+107/-34)
Template/LO/Source/PDF/pdg2pdf_lhapdf6.f (+105/-24)
Template/LO/Source/cuts.inc (+2/-1)
Template/LO/Source/dsample.f (+4/-3)
Template/LO/Source/readgrid.f (+1/-1)
Template/LO/Source/run.inc (+2/-1)
Template/LO/Source/setrun.f (+32/-8)
Template/LO/SubProcesses/cuts.f (+6/-5)
Template/LO/SubProcesses/genps.f (+2/-1)
Template/LO/SubProcesses/setcuts.f (+1/-1)
Template/LO/SubProcesses/unwgt.f (+2/-2)
Template/MadWeight/Cards/run_card.dat (+3/-2)
Template/MadWeight/src/setrun.f (+8/-0)
Template/NLO/Cards/run_card.dat (+4/-1)
Template/NLO/FixedOrderAnalysis/analysis_HwU_general.f (+290/-19)
Template/NLO/MCatNLO/Scripts/JetMatching.h (+2105/-0)
Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_PYTHIA8.Script (+19/-6)
Template/NLO/MCatNLO/srcPythia8/Makefile (+5/-0)
Template/NLO/MCatNLO/srcPythia8/Makefile_hep (+6/-0)
Template/NLO/MCatNLO/srcPythia8/Pythia83.cc (+171/-0)
Template/NLO/MCatNLO/srcPythia8/Pythia83_hep.cc (+121/-0)
Template/NLO/Source/make_opts.inc (+7/-13)
Template/NLO/SubProcesses/BinothLHA.f (+37/-3)
Template/NLO/SubProcesses/add_write_info.f (+72/-89)
Template/NLO/SubProcesses/analysis_lhe.f (+1/-1)
Template/NLO/SubProcesses/chooser_functions.f (+108/-14)
Template/NLO/SubProcesses/cluster.f (+2108/-798)
Template/NLO/SubProcesses/collect_events.f (+1/-1)
Template/NLO/SubProcesses/cuts.f (+585/-280)
Template/NLO/SubProcesses/driver_mintFO.f (+18/-10)
Template/NLO/SubProcesses/driver_mintMC.f (+35/-40)
Template/NLO/SubProcesses/fks_singular.f (+236/-114)
Template/NLO/SubProcesses/genps_fks.f (+21/-23)
Template/NLO/SubProcesses/handling_lhe_events.f (+29/-3)
Template/NLO/SubProcesses/makefile_fks_dir (+5/-3)
Template/NLO/SubProcesses/mint_module.f90 (+59/-30)
Template/NLO/SubProcesses/montecarlocounter.f (+18/-13)
Template/NLO/SubProcesses/pineappl_interface.cc (+1/-0)
Template/NLO/SubProcesses/recmom.f (+64/-8)
Template/NLO/SubProcesses/reweight_xsec_events.f (+1/-1)
Template/NLO/SubProcesses/setscales.f (+10/-8)
Template/NLO/SubProcesses/symmetry_fks_v3.f (+2/-0)
Template/NLO/SubProcesses/test_soft_col_limits.f (+1/-0)
Template/NLO/SubProcesses/timing_variables.inc (+2/-1)
Template/NLO/SubProcesses/weight_lines.f (+7/-1)
Template/NLO/SubProcesses/write_event.f (+1/-1)
Template/NLO/Utilities/check_events.f (+1/-1)
Template/NLO/Utilities/combine_jobs.f (+1/-1)
Template/NLO/Utilities/compare_events.f (+1/-1)
Template/NLO/Utilities/merge_events.f (+1/-1)
Template/NLO/Utilities/plot_events.f (+1/-1)
Template/NLO/Utilities/plot_events_lhef.f (+1/-1)
Template/NLO/Utilities/select_events.f (+1/-1)
Template/NLO/Utilities/split_events.f (+1/-1)
UpdateNotes.txt (+45/-0)
VERSION (+2/-2)
aloha/aloha_writers.py (+3/-1)
madgraph/__init__.py (+5/-1)
madgraph/core/base_objects.py (+16/-5)
madgraph/core/color_algebra.py (+4/-0)
madgraph/core/color_amp.py (+8/-3)
madgraph/core/diagram_generation.py (+55/-7)
madgraph/core/helas_objects.py (+32/-6)
madgraph/fks/fks_base.py (+11/-0)
madgraph/fks/fks_common.py (+15/-4)
madgraph/fks/fks_helas_objects.py (+10/-5)
madgraph/fks/fks_tag.py (+79/-0)
madgraph/interface/amcatnlo_run_interface.py (+41/-18)
madgraph/interface/common_run_interface.py (+43/-14)
madgraph/interface/extended_cmd.py (+1/-1)
madgraph/interface/loop_interface.py (+2/-2)
madgraph/interface/madevent_interface.py (+5/-1)
madgraph/interface/madgraph_interface.py (+64/-18)
madgraph/interface/reweight_interface.py (+2/-0)
madgraph/iolibs/export_cpp.py (+2/-2)
madgraph/iolibs/export_fks.py (+161/-100)
madgraph/iolibs/export_python.py (+4/-4)
madgraph/iolibs/export_v4.py (+108/-6)
madgraph/iolibs/helas_call_writers.py (+3/-0)
madgraph/iolibs/template_files/auto_dsig_v4.inc (+17/-1)
madgraph/iolibs/template_files/fks_info.inc (+7/-0)
madgraph/iolibs/template_files/madevent_electroweakFlux.inc (+116/-0)
madgraph/iolibs/template_files/madevent_symmetry.f (+3/-1)
madgraph/iolibs/template_files/matrix_madevent_group_v4.inc (+2/-14)
madgraph/iolibs/template_files/matrix_madevent_v4.inc (+5/-17)
madgraph/iolibs/template_files/rescale_alpha_tagged.inc (+40/-0)
madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc (+9/-0)
madgraph/iolibs/ufo_expression_parsers.py (+3/-0)
madgraph/loop/loop_diagram_generation.py (+1/-1)
madgraph/loop/loop_exporters.py (+2/-2)
madgraph/loop/loop_helas_objects.py (+5/-5)
madgraph/madevent/sum_html.py (+2/-3)
madgraph/various/banner.py (+564/-177)
madgraph/various/cluster.py (+2/-0)
madgraph/various/misc.py (+70/-0)
madgraph/various/process_checks.py (+20/-17)
madgraph/various/systematics.py (+185/-48)
models/check_param_card.py (+1/-1)
models/import_ufo.py (+3/-0)
tests/acceptance_tests/test_cmd.py (+20/-18)
tests/acceptance_tests/test_cmd_amcatnlo.py (+63/-0)
tests/acceptance_tests/test_cmd_madevent.py (+43/-8)
tests/input_files/DM_pion/CT_couplings.py (+2/-2)
tests/input_files/DM_pion/CT_vertices.py (+8/-4)
tests/input_files/DM_pion/__init__.py (+13/-11)
tests/input_files/DM_pion/coupling_orders.py (+1/-1)
tests/input_files/DM_pion/couplings.py (+1/-2)
tests/input_files/DM_pion/function_library.py (+2/-1)
tests/input_files/DM_pion/lorentz.py (+1/-2)
tests/input_files/DM_pion/parameters.py (+5/-4)
tests/input_files/DM_pion/particles.py (+5/-4)
tests/input_files/DM_pion/propagators.py (+1/-1)
tests/input_files/DM_pion/vertices.py (+4/-4)
tests/input_files/DM_pion/write_param_card.py (+15/-59)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_001.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_002.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_003.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_004.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_005.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_006.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_007.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%b_sf_008.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born_conf.inc (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born_hel.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%fks_info.inc (+8/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%get_color.f (+25/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%parton_lum_0.f (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_001.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_002.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_003.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_004.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_005.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_006.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_007.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%b_sf_008.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born_conf.inc (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born_hel.f (+8/-8)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%fks_info.inc (+8/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%get_color.f (+49/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%parton_lum_0.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born_conf.inc (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born_hel.f (+8/-8)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%fks_info.inc (+8/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%get_color.f (+49/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%parton_lum_0.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_001.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_002.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_003.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_004.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_005.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_006.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_007.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%b_sf_008.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born_conf.inc (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born_hel.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%fks_info.inc (+22/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%get_color.f (+49/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_2.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_3.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_4.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%matrix_5.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%parton_lum_1.f (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%parton_lum_2.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%parton_lum_3.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%parton_lum_4.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%parton_lum_5.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_001.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_002.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_003.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_004.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_005.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_006.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_007.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%b_sf_008.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born_conf.inc (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born_hel.f (+8/-8)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%fks_info.inc (+18/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%get_color.f (+49/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_1.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_2.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%matrix_3.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%parton_lum_1.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%parton_lum_2.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%parton_lum_3.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born_conf.inc (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born_hel.f (+8/-8)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%fks_info.inc (+18/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%get_color.f (+49/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_1.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_2.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%matrix_3.f (+12/-12)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%parton_lum_1.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%parton_lum_2.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%parton_lum_3.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_001.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_002.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_003.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_004.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%b_sf_005.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%born.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%born_conf.inc (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%born_hel.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%fks_info.inc (+20/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%get_color.f (+52/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_2.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_3.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_4.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%matrix_5.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%parton_lum_1.f (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%parton_lum_2.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%parton_lum_3.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%parton_lum_4.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%parton_lum_5.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ag_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_001.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_002.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_003.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_004.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_005.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_006.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_007.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%b_sf_008.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%born.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%born_conf.inc (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%born_hel.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%fks_info.inc (+30/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%get_color.f (+43/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_1.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_2.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_3.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_4.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_5.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%matrix_6.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%parton_lum_1.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%parton_lum_2.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%parton_lum_3.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%parton_lum_4.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%parton_lum_5.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%parton_lum_6.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ddx_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_001.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_002.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_003.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_004.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_005.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_006.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_007.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%b_sf_008.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%born.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%born_conf.inc (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%born_hel.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%fks_info.inc (+30/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%get_color.f (+43/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_1.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_2.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_3.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_4.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_5.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%matrix_6.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%parton_lum_1.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%parton_lum_2.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%parton_lum_3.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%parton_lum_4.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%parton_lum_5.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%parton_lum_6.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_dxd_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_001.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_002.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_003.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_004.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%b_sf_005.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%born.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%born_conf.inc (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%born_hel.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%fks_info.inc (+20/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%get_color.f (+52/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_2.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_3.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_4.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%matrix_5.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%parton_lum_1.f (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%parton_lum_2.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%parton_lum_3.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%parton_lum_4.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%parton_lum_5.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_ga_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_001.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_002.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_003.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_004.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_005.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_006.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_007.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%b_sf_008.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%born.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%born_conf.inc (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%born_hel.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%fks_info.inc (+26/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%get_color.f (+55/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_1.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_2.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_3.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_4.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_5.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_6.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_7.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_8.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%matrix_9.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_1.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_2.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_3.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_4.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_5.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_6.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_7.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_8.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%parton_lum_9.f (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_gg_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_001.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_002.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_003.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_004.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_005.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_006.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_007.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%b_sf_008.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%born.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%born_conf.inc (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%born_hel.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%fks_info.inc (+30/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%get_color.f (+43/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_1.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_2.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_3.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_4.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_5.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%matrix_6.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%parton_lum_1.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%parton_lum_2.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%parton_lum_3.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%parton_lum_4.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%parton_lum_5.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%parton_lum_6.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uux_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_001.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_002.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_003.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_004.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_005.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_006.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_007.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%b_sf_008.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%born.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%born_conf.inc (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%born_hel.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%fks_info.inc (+30/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%get_color.f (+43/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_1.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_2.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_3.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_4.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_5.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%matrix_6.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%parton_lum_1.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%parton_lum_2.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%parton_lum_3.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%parton_lum_4.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%parton_lum_5.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%parton_lum_6.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksrealew/%SubProcesses%P0_uxu_ttx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%polynomial.f (+40/-40)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%fks_info.inc (+14/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%get_color.f (+49/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%polynomial.f (+40/-40)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%fks_info.inc (+14/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%get_color.f (+49/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_001.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_002.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_003.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_004.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_005.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_006.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_007.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%b_sf_008.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born_conf.inc (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born_hel.f (+4/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%fks_info.inc (+12/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%get_color.f (+55/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%matrix_1.f (+6/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%parton_lum_1.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%CT_interface.f (+287/-287)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%V0_dxu_veep%polynomial.f (+80/-80)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%fks_info.inc (+16/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%get_color.f (+61/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_dxu_veep%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%CT_interface.f (+287/-287)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%V0_udx_veep%polynomial.f (+80/-80)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%a0Gmuconv.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%fks_info.inc (+16/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%get_color.f (+61/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%maxconfigs.inc (+2/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%maxparticles.inc (+3/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_wprod_fksew/%SubProcesses%P0_udx_veep%rescale_alpha_tagged.f (+43/-0)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/auto_dsig.f (+34/-0)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f (+8/-4)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f (+10/-0)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/auto_dsig.f (+34/-0)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+2/-2)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+16/-16)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+23/-23)
tests/input_files/IOTestsComparison/MECmdShell/check_html_long_process_strings/info.html (+10/-10)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%COLLIER_interface.f (+2/-2)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%CT_interface.f (+433/-433)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%TIR_interface.f (+5/-4)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%coef_construction_1.f (+13/-13)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_ampb_1.f (+1/-1)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_uvct_1.f (+13/-13)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_CT_calls_1.f (+13/-7)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f (+2/-2)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_num.f (+2/-2)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_coef_construction_1.f (+13/-13)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_compute_loop_coefs.f (+1/-1)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_ampb_1.f (+1/-1)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_uvct_1.f (+13/-13)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%polynomial.f (+234/-234)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%CT_interface.f (+288/-288)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%polynomial.f (+120/-120)
tests/input_files/IOTestsComparison/TestMadWeight/modification_to_cuts/cuts.f (+6/-5)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%input.inc (+4/-4)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%mp_input.inc (+19/-18)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/CT_interface.f (+108/-108)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f (+2/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/mp_born_amps_and_wfs.f (+2/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%input.inc (+4/-4)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+19/-18)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/CT_interface.f (+416/-416)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f (+16/-16)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/mp_born_amps_and_wfs.f (+16/-16)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%input.inc (+4/-4)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%mp_input.inc (+19/-18)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/CT_interface.f (+136/-136)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_uvct_1.f (+2/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_helas_calls_uvct_1.f (+2/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/polynomial.f (+182/-182)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%input.inc (+4/-4)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+19/-18)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/CT_interface.f (+401/-401)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/TIR_interface.f (+10/-4)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/coef_construction_1.f (+136/-136)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/helas_calls_ampb_1.f (+1/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/helas_calls_uvct_1.f (+17/-17)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_CT_calls_1.f (+178/-102)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f (+2/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_num.f (+2/-2)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_coef_construction_1.f (+136/-136)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_compute_loop_coefs.f (+1/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_helas_calls_ampb_1.f (+1/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_helas_calls_uvct_1.f (+17/-17)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/polynomial.f (+356/-356)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%coupl.inc (+8/-8)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%input.inc (+24/-24)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_coupl.inc (+10/-10)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_coupl_same_name.inc (+8/-8)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_input.inc (+18/-18)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/CT_interface.f (+198/-198)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%coupl.inc (+8/-8)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%input.inc (+24/-24)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_coupl.inc (+10/-10)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_coupl_same_name.inc (+8/-8)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_input.inc (+5/-5)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/CT_interface.f (+197/-197)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f (+12/-12)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/mp_born_amps_and_wfs.f (+12/-12)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/CT_interface.f (+266/-266)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/polynomial.f (+120/-120)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%coupl.inc (+8/-8)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%input.inc (+24/-24)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_coupl.inc (+10/-10)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_coupl_same_name.inc (+8/-8)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_input.inc (+5/-5)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/CT_interface.f (+399/-399)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/TIR_interface.f (+5/-4)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/coef_construction_1.f (+13/-13)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/helas_calls_ampb_1.f (+1/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/helas_calls_uvct_1.f (+13/-13)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_CT_calls_1.f (+13/-7)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f (+2/-2)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_num.f (+2/-2)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_coef_construction_1.f (+13/-13)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_compute_loop_coefs.f (+1/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_helas_calls_ampb_1.f (+1/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_helas_calls_uvct_1.f (+13/-13)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/polynomial.f (+234/-234)
tests/parallel_tests/test_ML5MSSMQCD.py (+2/-1)
tests/parallel_tests/test_aloha.py (+206/-308)
tests/time_db (+240/-239)
tests/unit_tests/core/test_color_amp.py (+1/-1)
tests/unit_tests/fks/test_fks_base.py (+7/-14)
tests/unit_tests/fks/test_fks_taggedphotons.py (+80/-0)
tests/unit_tests/interface/test_cmd.py (+25/-0)
tests/unit_tests/iolibs/test_import_v4.py (+1/-1)
tests/unit_tests/loop/test_import_LoopUFOModel.py (+1/-1)
tests/unit_tests/various/test_banner.py (+127/-4)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/3.3.0
Reviewer Review Type Date Requested Status
Olivier Mattelaer Approve
Review via email: mp+411474@code.launchpad.net

Description of the change

This includes:
 - Bug fixing from 2.9.6
 - EWA branch
 - New_clustering branch
 - tagged photon
 - lepton_from_proton branch
 - Move pythia8 support to pythya8.3

Known Bug:
 - jet veto cross-section (since 3.x.x)
 - issue with heft at NLO (since 3.x.x as well)

To post a comment you must log in.
lp:~maddevelopers/mg5amcnlo/3.3.0 updated
979. By olivier-mattelaer

merge with 2.7.0_gpu version 368->371: fixing randomness in ordering

980. By olivier-mattelaer

update IOTest (now should be reproducible version to version)

981. By olivier-mattelaer

force set to be ordered in debug mode (result more and more reproducible)

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

I have added a bunch of "python hack --applied only to debug mode--" to force set to be ordered and avoid the huge list of false positive in the IOTest.

If they are no objection to this, I will release it Thursday or Friday.

Olivier

lp:~maddevelopers/mg5amcnlo/3.3.0 updated
982. By olivier-mattelaer

fixing some py2 ordering issue, fixing side effect of ordered set, fixing tests

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

let's release this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2013-03-17 12:01:13 +0000
3+++ .bzrignore 2021-11-12 09:03:34 +0000
4@@ -1,3 +1,4 @@
5 models/RS/.DS_Store
6 help
7 ./tests/input_files/my_smallsm
8+
9
10=== modified file 'INSTALL'
11--- INSTALL 2013-11-15 11:21:46 +0000
12+++ INSTALL 2021-11-12 09:03:34 +0000
13@@ -24,7 +24,7 @@
14
15 * MadGraph5_aMC@NLO *
16
17-- Python 2.6 (or higher, but not compatible with 3.X)
18+- Python 3.7 (or higher, python2.7 is also working for the time being)
19
20 * MadEvent *
21 Package for the LO cross-section computation and generation of events
22
23=== modified file 'MadSpin/decay.py'
24--- MadSpin/decay.py 2021-05-23 14:17:53 +0000
25+++ MadSpin/decay.py 2021-11-12 09:03:34 +0000
26@@ -178,7 +178,7 @@
27 part=self.event2mg[item]
28 if part>0:
29 particle_line=self.get_particle_line(self.particle[part])
30- if abs(self.particle[part]["istup"]) == 1:
31+ if abs(self.particle[part]["istup"]) == 1 or abs(self.particle[part]["istup"]) == 2:
32 if "pt_scale" in self.particle[part]:
33 scales.append(self.particle[part]["pt_scale"])
34 else:
35@@ -187,17 +187,16 @@
36 particle_line=self.get_particle_line(self.resonance[part])
37 line+=particle_line
38
39+ if self.diese:
40+ line += self.diese
41+ if self.rwgt:
42+ line += self.rwgt
43 if any(scales):
44 sqrts = self.particle[1]["pt_scale"]
45- line += "<scales %s></scales>\n" % ' '.join(['pt_clust_%i=\"%s\"'
46- %(i-1,s if s else sqrts)
47+ line += "<scales %s></scales>\n" % ' '.join(['pt_clust_%i=\"%s\"'
48+ %(i+1,s if s else self.scale)
49 for i,s in enumerate(scales)
50 if i>1])
51-
52- if self.diese:
53- line += self.diese
54- if self.rwgt:
55- line += self.rwgt
56 line+="</event> \n"
57 return line
58
59
60=== modified file 'MadSpin/interface_madspin.py'
61--- MadSpin/interface_madspin.py 2021-05-23 07:47:20 +0000
62+++ MadSpin/interface_madspin.py 2021-11-12 09:03:34 +0000
63@@ -85,7 +85,7 @@
64 ############################################################################
65 ## Special post-processing of the options ##
66 ############################################################################
67- def post_set_ms_dir(self, value, change_userdefine, raiseerror):
68+ def post_set_ms_dir(self, value, change_userdefine, raiseerror, *opts):
69 """ special handling for set ms_dir """
70
71 self.__setitem__('curr_dir', value, change_userdefine=change_userdefine)
72@@ -97,7 +97,7 @@
73 random.seed(value)
74
75 ############################################################################
76- def post_set_run_card(self, value, change_userdefine, raiseerror):
77+ def post_set_run_card(self, value, change_userdefine, raiseerror, *opts):
78 """ special handling for set run_card """
79
80 if value == 'default':
81
82=== modified file 'MadSpin/madspin'
83--- MadSpin/madspin 2021-06-29 19:12:21 +0000
84+++ MadSpin/madspin 2021-11-12 09:03:34 +0000
85@@ -1,4 +1,4 @@
86-#! /usr/bin/env python
87+#! /usr/bin/env python3
88
89 ################################################################################
90 #
91@@ -20,8 +20,8 @@
92 from __future__ import absolute_import
93 from __future__ import print_function
94 import sys
95-if not sys.version_info[0] == 2 or sys.version_info[1] < 6:
96- sys.exit('MadSpin works only with python 2.6 or later (but not python 3.X).\n\
97+if sys.version_info[1] < 6:
98+ sys.exit('MadSpin works only with python 2.7 or with python 3.6 (or later).\n\
99 Please upgrate your version of python.')
100
101 import os
102
103=== modified file 'Template/Common/Source/PDF/pdf.inc'
104--- Template/Common/Source/PDF/pdf.inc 2021-04-16 08:31:20 +0000
105+++ Template/Common/Source/PDF/pdf.inc 2021-11-12 09:03:34 +0000
106@@ -6,6 +6,7 @@
107 c pdlabel= string identifying the pdf
108 c***********************************************************************
109 character*7 pdlabel,epa_label
110+ character*7 pdsublabel(2)
111 integer lhaid
112- common/to_pdf/lhaid,pdlabel,epa_label
113+ common/to_pdf/lhaid,pdlabel,epa_label,pdsublabel
114
115
116=== modified file 'Template/LO/Cards/run_card.dat'
117--- Template/LO/Cards/run_card.dat 2021-01-08 16:12:55 +0000
118+++ Template/LO/Cards/run_card.dat 2021-11-12 09:03:34 +0000
119@@ -27,8 +27,9 @@
120 %(iseed)s = iseed ! rnd seed (0=assigned automatically=default))
121 #*********************************************************************
122 # Collider type and energy *
123-# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=photon from proton, *
124-# 3=photon from electron, 4=photon from muon *
125+# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=elastic photon of proton,*
126+# +/-3=PDF of electron/positron beam *
127+# +/-4=PDF of muon/antimuon beam *
128 #*********************************************************************
129 %(lpp1)s = lpp1 ! beam 1 type
130 %(lpp2)s = lpp2 ! beam 2 type
131@@ -37,21 +38,26 @@
132 $beam_pol
133 $frame
134 #*********************************************************************
135-# PDF CHOICE: this automatically fixes also alpha_s and its evol. *
136+# PDF CHOICE: this automatically fixes alpha_s and its evol. *
137+# pdlabel: lhapdf=LHAPDF (installation needed) [1412.7420] *
138+# iww=Improved Weizsaecker-Williams Approx.[hep-ph/9310350] *
139+# eva=Effective W/Z/A Approx. [21yy.zzzzz] *
140+# none=No PDF, same as lhapdf with lppx=0 *
141 #*********************************************************************
142- %(pdlabel)s = pdlabel ! PDF set
143+$pdlabel
144 %(lhaid)s = lhaid ! if pdlabel=lhapdf, this is the lhapdf number
145 $ion_pdf
146 #*********************************************************************
147 # Renormalization and factorization scales *
148 #*********************************************************************
149 %(fixed_ren_scale)s = fixed_ren_scale ! if .true. use fixed ren scale
150- %(fixed_fac_scale)s = fixed_fac_scale ! if .true. use fixed fac scale
151+$fixed_fact_scale
152 %(scale)s = scale ! fixed ren scale
153 %(dsqrt_q2fact1)s = dsqrt_q2fact1 ! fixed fact scale for pdf1
154 %(dsqrt_q2fact2)s = dsqrt_q2fact2 ! fixed fact scale for pdf2
155 %(dynamical_scale_choice)s = dynamical_scale_choice ! Choose one of the preselected dynamical choices
156 %(scalefact)s = scalefact ! scale factor for event-by-event scales
157+ $eva_scale
158 #*********************************************************************
159 # Type and output format
160 #*********************************************************************
161@@ -80,7 +86,8 @@
162 #
163 #*******************************
164 # Parton level cuts definition *
165-#*******************************
166+#*******************************
167+ %(dsqrt_shat)s = dsqrt_shat ! minimal shat for full process
168 #
169 #
170 #*********************************************************************
171
172=== added file 'Template/LO/Source/PDF/ElectroweakFlux.f'
173--- Template/LO/Source/PDF/ElectroweakFlux.f 1970-01-01 00:00:00 +0000
174+++ Template/LO/Source/PDF/ElectroweakFlux.f 2021-11-12 09:03:34 +0000
175@@ -0,0 +1,225 @@
176+c /* ********************************************************* *
177+c Effective Vector Boson Approximation
178+c /* ********************************************************* *
179+c File: ElectroweakFlux.f
180+c R. Ruiz (2021 February)
181+c For details, see companion paper by ..., et al [arXiv:]
182+c /* ********************************************************* *
183+c /* ********************************************************* *
184+c function eva_fX_to_vV(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo):
185+c call electroweak PDF for for vector boson (hel=V=0,+,-) from fermion
186+c with fractional (0<pol<1) LH (RH) polarization of fLpol (1-fLpol)
187+c - fLpol = 0.5d0 = parent fermion is spin-averaged
188+c /* ********************************************************* *
189+c /* ********************************************************* *
190+c function eva_fF_to_vV(gg2,gF2,mv2,x,mu2,ievo):
191+c electroweak PDF for vector boson (hel=V=0,+,-) from fermion (hel=F=L/R)
192+c - gg2 = (coupling)^2
193+c - gF2 = (L/R chiral coupling)^2
194+c - mv2 = (mass of boson)^2
195+c - x = momentum fraction = (E_V / E_f)
196+c - mu2 = (max of evolution scale)^2
197+c - ievo = for evolution by virtuality (or !=0 for pT)
198+c /* ********************************************************* *
199+c /* ********************************************************* *
200+c /* ********************************************************* *
201+c /* ********************************************************* *
202+ double precision function eva_fX_to_vp(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
203+ implicit none
204+ integer ievo
205+ double precision gg2,gL2,gR2,fLpol,mv2,x,mu2
206+ double precision eva_fL_to_vp,eva_fR_to_vp
207+
208+ eva_fX_to_vp = fLpol*eva_fL_to_vp(gg2,gL2,mv2,x,mu2,ievo)
209+ & + (1d0-fLpol)*eva_fR_to_vp(gg2,gR2,mv2,x,mu2,ievo)
210+ return
211+ end
212+c /* ********************************************************* *
213+ double precision function eva_fX_to_vm(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
214+ implicit none
215+ integer ievo
216+ double precision gg2,gL2,gR2,fLpol,mv2,x,mu2
217+ double precision eva_fL_to_vm,eva_fR_to_vm
218+
219+ eva_fX_to_vm = fLpol*eva_fL_to_vm(gg2,gL2,mv2,x,mu2,ievo)
220+ & + (1d0-fLpol)*eva_fR_to_vm(gg2,gR2,mv2,x,mu2,ievo)
221+ return
222+ end
223+c /* ********************************************************* *
224+ double precision function eva_fX_to_v0(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
225+ implicit none
226+ integer ievo
227+ double precision gg2,gL2,gR2,fLpol,mv2,x,mu2
228+ double precision eva_fL_to_v0,eva_fR_to_v0
229+
230+ eva_fX_to_v0 = fLpol*eva_fL_to_v0(gg2,gL2,mv2,x,mu2,ievo)
231+ & + (1d0-fLpol)*eva_fR_to_v0(gg2,gR2,mv2,x,mu2,ievo)
232+ return
233+ end
234+c /* ********************************************************* *
235+ double precision function eva_fX_to_fL(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
236+ implicit none
237+ integer ievo
238+ double precision gg2,gL2,gR2,fLpol,mv2,x,mu2
239+ double precision eva_fL_to_fL,eva_fR_to_fL
240+
241+ eva_fX_to_fL = fLpol*eva_fL_to_fL(gg2,gL2,mv2,x,mu2,ievo)
242+ & + (1d0-fLpol)*eva_fR_to_fL(gg2,gR2,mv2,x,mu2,ievo)
243+ return
244+ end
245+c /* ********************************************************* *
246+ double precision function eva_fX_to_fR(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
247+ implicit none
248+ integer ievo
249+ double precision gg2,gL2,gR2,fLpol,mv2,x,mu2
250+ double precision eva_fL_to_fR,eva_fR_to_fR
251+
252+ eva_fX_to_fR = fLpol*eva_fL_to_fR(gg2,gL2,mv2,x,mu2,ievo)
253+ & + (1d0-fLpol)*eva_fR_to_fR(gg2,gR2,mv2,x,mu2,ievo)
254+ return
255+ end
256+c /* ********************************************************* *
257+c EVA (1/6) for f_L > v_+
258+ double precision function eva_fL_to_vp(gg2,gL2,mv2,x,mu2,ievo)
259+ implicit none
260+ integer ievo ! evolution by q2 or pT2
261+ double precision gg2,gL2,mv2,x,mu2
262+ double precision coup2,split,xxlog,fourPiSq
263+ data fourPiSq/39.47841760435743d0/ ! = 4pi**2
264+
265+c print*,'gg2,gL2,mv2,x,mu2,ievo',gg2 !3,gL2,mv2,x,mu2,ievo
266+ coup2 = gg2*gL2/fourPiSq
267+ split = (1.d0-x)**2 / 2.d0 / x
268+ if(ievo.eq.0) then
269+ xxlog = dlog(mu2/mv2)
270+ else
271+ xxlog = dlog(mu2/mv2/(1.d0-x))
272+ endif
273+
274+ eva_fL_to_vp = coup2*split*xxlog
275+ return
276+ end
277+c /* ********************************************************* *
278+c EVA (2/6) for f_L > v_-
279+ double precision function eva_fL_to_vm(gg2,gL2,mv2,x,mu2,ievo)
280+ implicit none
281+ integer ievo ! evolution by q2 or pT2
282+ double precision gg2,gL2,mv2,x,mu2
283+ double precision coup2,split,xxlog,fourPiSq
284+ data fourPiSq/39.47841760435743d0/ ! = 4pi**2
285+
286+ coup2 = gg2*gL2/fourPiSq
287+ split = 1.d0 / 2.d0 / x
288+ if(ievo.eq.0) then
289+ xxlog = dlog(mu2/mv2)
290+ else
291+ xxlog = dlog(mu2/mv2/(1.d0-x))
292+ endif
293+
294+ eva_fL_to_vm = coup2*split*xxlog
295+ return
296+ end
297+c /* ********************************************************* *
298+c EVA (3/6) for f_L > v_0
299+ double precision function eva_fL_to_v0(gg2,gL2,mv2,x,mu2,ievo)
300+ implicit none
301+ integer ievo ! evolution by q2 or pT2
302+ double precision gg2,gL2,mv2,x,mu2
303+ double precision coup2,split,xxlog,fourPiSq
304+ data fourPiSq/39.47841760435743d0/ ! = 4pi**2
305+c
306+ coup2 = gg2*gL2/fourPiSq
307+ split = (1.d0-x) / x
308+ xxlog = 1.d0
309+
310+ eva_fL_to_v0 = coup2*split*xxlog
311+ return
312+ end
313+c /* ********************************************************* *
314+c EVA (4/6) for f_R > v_+
315+ double precision function eva_fR_to_vp(gg2,gR2,mv2,x,mu2,ievo)
316+ implicit none
317+ integer ievo ! evolution by q2 or pT2
318+ double precision gg2,gR2,mv2,x,mu2
319+ double precision eva_fL_to_vm
320+
321+ eva_fR_to_vp = eva_fL_to_vm(gg2,gR2,mv2,x,mu2,ievo)
322+ return
323+ end
324+c /* ********************************************************* *
325+c EVA (5/6) for f_R > v_-
326+ double precision function eva_fR_to_vm(gg2,gR2,mv2,x,mu2,ievo)
327+ implicit none
328+ integer ievo ! evolution by q2 or pT2
329+ double precision gg2,gR2,mv2,x,mu2
330+ double precision eva_fL_to_vp
331+
332+ eva_fR_to_vm = eva_fL_to_vp(gg2,gR2,mv2,x,mu2,ievo)
333+ return
334+ end
335+c /* ********************************************************* *
336+c EVA (6/6) for f_R > v_0
337+ double precision function eva_fR_to_v0(gg2,gR2,mv2,x,mu2,ievo)
338+ implicit none
339+ integer ievo ! evolution by q2 or pT2
340+ double precision gg2,gR2,mv2,x,mu2
341+ double precision eva_fL_to_v0
342+
343+ eva_fR_to_v0 = eva_fL_to_v0(gg2,gR2,mv2,x,mu2,ievo)
344+ return
345+ end
346+c /* ********************************************************* *
347+c EVA () for f_L > f_L
348+c fL_to_fL(z) = fL_to_vp(1-z) + fL_to_vm(1-z)
349+ double precision function eva_fL_to_fL(gg2,gL2,mv2,x,mu2,ievo)
350+ implicit none
351+ integer ievo ! evolution by q2 or pT2
352+ double precision gg2,gL2,mv2,x,mu2
353+ double precision tmpVp,tmpVm,z
354+ double precision eva_fL_to_vp,eva_fL_to_vm
355+
356+ z = 1.d0 - x
357+ tmpVp = eva_fL_to_vp(gg2,gL2,mv2,z,mu2,ievo)
358+ tmpVm = eva_fL_to_vm(gg2,gL2,mv2,z,mu2,ievo)
359+
360+ eva_fL_to_fL = tmpVp + tmpVm
361+ return
362+ end
363+c /* ********************************************************* *
364+c EVA () for f_R > f_R
365+c fR_to_fR(z) = fR_to_vp(1-z) + fR_to_vm(1-z)
366+ double precision function eva_fR_to_fR(gg2,gR2,mv2,x,mu2,ievo)
367+ implicit none
368+ integer ievo ! evolution by q2 or pT2
369+ double precision gg2,gR2,mv2,x,mu2
370+ double precision tmpVp,tmpVm,z
371+ double precision eva_fR_to_vp,eva_fR_to_vm
372+
373+ z = 1.d0 - x
374+ tmpVp = eva_fR_to_vp(gg2,gR2,mv2,z,mu2,ievo)
375+ tmpVm = eva_fR_to_vm(gg2,gR2,mv2,z,mu2,ievo)
376+
377+ eva_fR_to_fR = tmpVp + tmpVm
378+ return
379+ end
380+c /* ********************************************************* *
381+c EVA () for f_L > f_R
382+ double precision function eva_fL_to_fR(gg2,gL2,mv2,x,mu2,ievo)
383+ implicit none
384+ integer ievo ! evolution by q2 or pT2
385+ double precision gg2,gL2,mv2,x,mu2
386+
387+ eva_fL_to_fR = 0d0
388+ return
389+ end
390+c /* ********************************************************* *
391+c EVA () for f_R > f_L
392+ double precision function eva_fR_to_fL(gg2,gR2,mv2,x,mu2,ievo)
393+ implicit none
394+ integer ievo ! evolution by q2 or pT2
395+ double precision gg2,gR2,mv2,x,mu2
396+
397+ eva_fR_to_fL = 0d0
398+ return
399+ end
400+c /* ********************************************************* *
401\ No newline at end of file
402
403=== added file 'Template/LO/Source/PDF/ElectroweakFluxDriver.f'
404--- Template/LO/Source/PDF/ElectroweakFluxDriver.f 1970-01-01 00:00:00 +0000
405+++ Template/LO/Source/PDF/ElectroweakFluxDriver.f 2021-11-12 09:03:34 +0000
406@@ -0,0 +1,561 @@
407+c /* ********************************************************* *
408+c Effective Vector Boson Approximation
409+c /* ********************************************************* *
410+c File: ElectroweakFluxDriver.f
411+c R. Ruiz (2021 February)
412+c For details, see companion paper by Costantini, et al [arXiv:]
413+c /* ********************************************************* *
414+c function eva_get_pdf_by_PID:
415+c - wrapper for eva_get_pdf_by_PID_evo
416+c function eva_get_pdf_by_PID_evo
417+c - set eva PDF couplings by PIDs
418+c - call V_+,V_-,V_0 PDF by v polarization (vpol)
419+c - call PDF for f_L,f_R by fL polarization (fLpol; fLpol=0.5 = unpolarized)
420+c subroutine eva_get_mv2_by_PID
421+c - assign mass by vPID
422+c subroutine eva_get_mf2_by_PID
423+c - assign mass by fPID
424+c subroutine eva_get_gg2_by_PID
425+c - assign universal coupling strength by vPID
426+c subroutine eva_get_gR2_by_PID
427+c - assign right couplings of fermion by vPID and fPID
428+c subroutine eva_get_gL2_by_PID
429+c - assign left couplings of fermion by vPID and fPID
430+c /* ********************************************************* *
431+ double precision function eva_get_pdf_by_PID(vPID,fPID,vpol,fLpol,x,mu2,ievo)
432+ implicit none
433+ integer ievo ! =0 for evolution by q^2 (!=0 for evolution by pT^2)
434+ integer vPID,fPID,vpol
435+ double precision fLpol,x,mu2
436+ double precision eva_get_pdf_by_PID_evo
437+ double precision eva_get_pdf_photon_evo
438+ double precision eva_get_pdf_neutrino_evo
439+
440+ double precision tiny,mu2min
441+ double precision QW,Qf
442+
443+ include 'ElectroweakFlux.inc'
444+
445+ tiny = 1d-8
446+ mu2min = 1d2 ! (10 GeV)^2 reset mu2min by vPID
447+
448+
449+c do the following checks before calling PDF:
450+c 1. momentum fraction, x
451+c 2. fermion polarization fraction, fLpol
452+c 3. vector boson (or neutrino) polarization by PID, vpol vPID
453+c 4. evolution scale, mu2
454+c 5. QED conservation check
455+c start checks
456+c 1. check momentum fraction
457+ if(x.lt.tiny.or.x.gt.(1d0-tiny)) then
458+ write(*,*) 'eva: x out of range',x
459+ eva_get_pdf_by_PID = 0d0
460+ return
461+ endif
462+c 2. check fermion polarization fraction
463+ if(fLpol.lt.0d0.or.fLpol.gt.1d0) then
464+ write(*,*) 'eva: fLpol out of range',fLpol
465+ stop
466+ eva_get_pdf_by_PID = 0d0
467+ return
468+ endif
469+c 3. check vector boson (or neutrino) polarization by PID
470+c also set lower bound on muf2 scale evolution by PID
471+ select case (iabs(vPID))
472+ case (12,14) ! ve, ve~, vm, vm~
473+ mu2min = eva_mw2 ! scale set by W emission
474+ if(iabs(vPol).ne.1) then
475+ write(*,*) 'vPol out of range for ve/vm',vPol
476+ stop 1214
477+ eva_get_pdf_by_PID = 0d0
478+ return
479+ endif
480+ case (23) ! z
481+ mu2min = eva_mz2
482+ if(iabs(vPol).ne.1.and.vPol.ne.0) then
483+ write(*,*) 'vPol out of range for Z',vPol
484+ stop 23
485+ eva_get_pdf_by_PID = 0d0
486+ return
487+ endif
488+ case (24) ! w
489+ mu2min = eva_mw2
490+ if(iabs(vPol).ne.1.and.vPol.ne.0) then
491+ write(*,*) 'vPol out of range for W',vPol
492+ stop 24
493+ eva_get_pdf_by_PID = 0d0
494+ return
495+ endif
496+ case (7,22) ! photon (special treatment for mu2min)
497+ call eva_get_mf2_by_PID(mu2min,fPID) ! set scale to mass of parent fermion
498+ if(iabs(vPol).ne.1) then
499+ write(*,*) 'vPol out of range for A',vPol
500+ stop 25
501+ eva_get_pdf_by_PID = 0d0
502+ return
503+ endif
504+c case (32) (eva for bsm)
505+c mu2min = eva_mx2
506+c if(iabs(vPol).ne.1.and.vPol.ne.0) then
507+c write(*,*) 'vPol out of range',vPol
508+c stop 26
509+c eva_get_pdf_by_PID = 0d0
510+c return
511+c endif
512+ case default
513+ write(*,*) 'vPID out of range',vPID
514+ stop 27
515+ eva_get_pdf_by_PID = 0d0
516+ return
517+ end select
518+c 4. check evolution scale
519+ if(ievo.ne.0) then
520+ mu2min = (1.d0-x)*mu2min
521+ endif
522+ if(mu2.lt.mu2min) then
523+ write(*,*) 'muf2 too small. setting muf2 to muf2min:',mu2,mu2min
524+ mu2 = mu2min
525+ endif
526+c 5. QED conservation check
527+ if(iabs(vPID).eq.24) then
528+ QW = dble(vPID/iabs(vPID))
529+ call eva_get_qEM_by_PID(Qf,fPID)
530+ if(dabs(Qf-QW).gt.eva_one) then
531+ write(*,*) 'Stopping EVA: QED charge violation with emission of vPID=',vPID,' by fPID =',fPID
532+ stop 24
533+ return
534+ endif
535+ endif
536+ if(iabs(vPID).eq.12.or.iabs(vPID).eq.14) then
537+ select case(vPID)
538+ case (12)
539+ if(fPID.ne.11) then
540+ write(*,*) 'Stopping EVA: neutrino mismatch with emission of vPID=',vPID,' by fPID =',fPID
541+ stop 1211
542+ endif
543+ case (-12)
544+ if(fPID.ne.-11) then
545+ write(*,*) 'Stopping EVA: neutrino mismatch with emission of vPID=',vPID,' by fPID =',fPID
546+ stop -1211
547+ endif
548+ case (14)
549+ if(fPID.ne.13) then
550+ write(*,*) 'Stopping EVA: neutrino mismatch with emission of vPID=',vPID,' by fPID =',fPID
551+ stop 1413
552+ endif
553+ case (-14)
554+ if(fPID.ne.-13) then
555+ write(*,*) 'Stopping EVA: neutrino mismatch with emission of vPID=',vPID,' by fPID =',fPID
556+ stop -1413
557+ endif
558+ case default
559+ write(*,*) 'Stopping EVA at neutrino check. should not be here with emission of vPID=',vPID,' by fPID =',fPID
560+ stop -1412
561+ end select
562+ endif
563+c if(iabs(vPID).eq.22.and.(
564+c & iabs(fPID).eq.12.or.
565+c & iabs(fPID).eq.14.or.
566+c & iabs(fPID).eq.16)) then
567+c write(*,*) 'QED charge violation with a emission by neutrino'
568+c eva_get_pdf_by_PID = 0d0
569+c return
570+c endif
571+c celebrate by calling the PDF
572+c if(vPID.eq.22.or.vPID.eq.7) then
573+c eva_get_pdf_by_PID = eva_get_pdf_photon_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
574+c else
575+c eva_get_pdf_by_PID = eva_get_pdf_by_PID_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
576+c endif
577+
578+ select case (abs(vPID))
579+ case (7,22)
580+ eva_get_pdf_by_PID = eva_get_pdf_photon_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
581+ case (12,14)
582+ eva_get_pdf_by_PID = eva_get_pdf_neutrino_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
583+ case default
584+ eva_get_pdf_by_PID = eva_get_pdf_by_PID_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
585+ end select
586+ return
587+ end
588+c /* ********************************************************* *
589+c /* ********************************************************* *
590+c /* ********************************************************* *
591+c /* ********************************************************* *
592+ double precision function eva_get_pdf_by_PID_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
593+ implicit none
594+ integer vPID,fPID,vpol,ievo
595+ double precision fLpol,x,mu2
596+ double precision eva_fX_to_vm,eva_fX_to_v0,eva_fX_to_vp
597+
598+ double precision gg2,gL2,gR2,mv2,tmpPDF
599+ call eva_get_mv2_by_PID(mv2,vPID)
600+ call eva_get_gg2_by_PID(gg2,vPID,fPID)
601+ if( fPID/iabs(fPID).gt.0 ) then ! particle
602+ call eva_get_gR2_by_PID(gR2,vPID,fPID)
603+ call eva_get_gL2_by_PID(gL2,vPID,fPID)
604+ else ! antiparticle (invert parity)
605+ call eva_get_gR2_by_PID(gL2,vPID,fPID)
606+ call eva_get_gL2_by_PID(gR2,vPID,fPID)
607+ endif
608+ select case (vpol)
609+ case (-1)
610+ tmpPDF = eva_fX_to_vm(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
611+ case (0)
612+ tmpPDF = eva_fX_to_v0(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
613+ case (+1)
614+ tmpPDF = eva_fX_to_vp(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
615+ case default
616+ write(*,*) 'vPol out of range; should not be here',vPol
617+ stop
618+ tmpPDF = 0d0
619+ end select
620+ eva_get_pdf_by_PID_evo = tmpPDF
621+ return
622+ end
623+c /* ********************************************************* *
624+ double precision function eva_get_pdf_photon_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
625+ implicit none
626+ integer vPID,fPID,vpol,ievo
627+ double precision fLpol,x,mu2
628+ double precision eva_fX_to_vm,eva_fX_to_v0,eva_fX_to_vp
629+
630+ double precision gg2,gL2,gR2,mf2,tmpPDF
631+ call eva_get_mf2_by_PID(mf2,fPID)
632+ call eva_get_gg2_by_PID(gg2,vPID,fPID)
633+ if( fPID/iabs(fPID).gt.0 ) then ! particle
634+ call eva_get_gR2_by_PID(gR2,vPID,fPID)
635+ call eva_get_gL2_by_PID(gL2,vPID,fPID)
636+ else ! antiparticle (invert parity)
637+ call eva_get_gR2_by_PID(gL2,vPID,fPID)
638+ call eva_get_gL2_by_PID(gR2,vPID,fPID)
639+ endif
640+ select case (vpol)
641+ case (-1)
642+ tmpPDF = eva_fX_to_vm(gg2,gL2,gR2,fLpol,mf2,x,mu2,ievo)
643+ case (+1)
644+ tmpPDF = eva_fX_to_vp(gg2,gL2,gR2,fLpol,mf2,x,mu2,ievo)
645+ case default
646+ write(*,*) 'vPol out of range; should not be here',vPol
647+ stop
648+ tmpPDF = 0d0
649+ end select
650+ eva_get_pdf_photon_evo = tmpPDF
651+ return
652+ end
653+c /* ********************************************************* *
654+c /* ********************************************************* *
655+ double precision function eva_get_pdf_neutrino_evo(vPID,fPID,vpol,fLpol,x,mu2,ievo)
656+ implicit none
657+ integer vPID,fPID,vpol,ievo
658+ logical isAntiNu
659+ double precision fLpol,x,mu2
660+ double precision eva_fX_to_fR,eva_fX_to_fL
661+
662+ double precision gg2,gL2,gR2,mv2,tmpPDF
663+ call eva_get_mv2_by_PID(mv2,vPID)
664+ call eva_get_gg2_by_PID(gg2,vPID,fPID)
665+ if( fPID/iabs(fPID).gt.0 ) then ! particle
666+ isAntiNu = .false.
667+ call eva_get_gR2_by_PID(gR2,vPID,fPID)
668+ call eva_get_gL2_by_PID(gL2,vPID,fPID)
669+ else ! antiparticle (invert parity)
670+ isAntiNu = .true.
671+ call eva_get_gR2_by_PID(gL2,vPID,fPID)
672+ call eva_get_gL2_by_PID(gR2,vPID,fPID)
673+ endif
674+
675+ select case (vpol)
676+ case (-1)
677+ if(isAntiNu) then ! no LH antineutrinos
678+ tmpPDF = 0
679+ else
680+ tmpPDF = eva_fX_to_fL(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
681+ endif
682+ case (+1)
683+ if(isAntiNu) then ! no RH neutrinos
684+ tmpPDF = eva_fX_to_fR(gg2,gL2,gR2,fLpol,mv2,x,mu2,ievo)
685+ else
686+ tmpPDF = 0
687+ endif
688+ case default
689+ write(*,*) 'vPol out of range; should not be here',vPol
690+ stop
691+ tmpPDF = 0d0
692+ end select
693+ eva_get_pdf_neutrino_evo = tmpPDF
694+ return
695+ end
696+c /* ********************************************************* *
697+c /* ********************************************************* *
698+c /* ********************************************************* *
699+c /* ********************************************************* *
700+c /* ********************************************************* *
701+ subroutine eva_get_mv2_by_PID(mv2,vPID)
702+ implicit none
703+ integer vPID
704+ double precision mv2
705+ include 'ElectroweakFlux.inc'
706+
707+ select case (iabs(vPID))
708+ case (7,22)
709+ mv2 = eva_zero
710+ case (23)
711+ mv2 = eva_mz2
712+ case (24)
713+ mv2 = eva_mw2
714+ case (12,14,16) ! l > vl splitting
715+ mv2 = eva_mw2
716+c case (25)
717+c mv2 = eva_mh2
718+c case (32)
719+c mv2 = eva_mx2
720+ case default
721+ write(*,*) 'eva: setting m_v to m_w. unknown vPID:', vPID
722+ mv2 = eva_mw2
723+ end select
724+ return
725+ end
726+c /* ********************************************************* *
727+c /* ********************************************************* *
728+ subroutine eva_get_mf2_by_PID(mf2,fPID)
729+ implicit none
730+ integer fPID
731+ double precision mf2
732+ include 'ElectroweakFlux.inc'
733+
734+ select case (iabs(fPID))
735+ case (1)
736+ mf2 = eva_md2
737+ case (2)
738+ mf2 = eva_mu2
739+ case (3)
740+ mf2 = eva_ms2
741+ case (4)
742+ mf2 = eva_mc2
743+ case (5)
744+ mf2 = eva_mb2
745+ case (6)
746+ mf2 = eva_mt2
747+ case (11)
748+ mf2 = eva_me2
749+ case (12,14,16)
750+ mf2 = eva_zero
751+ case (13)
752+ mf2 = eva_mm2
753+ case (15)
754+ mf2 = eva_ml2
755+ case default
756+ write(*,*) 'eva: asking for mass of unknown fPID: ', fPID
757+ stop 25
758+ mf2 = eva_zero
759+ end select
760+ return
761+ end
762+c /* ********************************************************* *
763+c /* ********************************************************* *
764+ subroutine eva_get_gg2_by_PID(gg2,vPID,fPID)
765+ implicit none
766+ integer vPID,fPID
767+ double precision gg2
768+ include 'ElectroweakFlux.inc'
769+
770+ select case (iabs(vPID))
771+c ******************************
772+ case (12,14) ! ve/vm/ve~/vm~
773+ gg2 = eva_gw2/2.d0
774+c ******************************
775+ case (7,22) ! a
776+c ******************************
777+ select case (iabs(fPID)) ! nested select case
778+ case (1) ! down
779+ gg2 = eva_ee2*eva_qed2 ! = e^2 * (-1/3)^2
780+ case (2) ! up
781+ gg2 = eva_ee2*eva_qeu2
782+ case (3) ! strange
783+ gg2 = eva_ee2*eva_qed2
784+ case (4) ! charm
785+ gg2 = eva_ee2*eva_qeu2
786+ case (5) ! bottom
787+ gg2 = eva_ee2*eva_qed2
788+ case (6) ! top
789+ gg2 = eva_ee2*eva_qeu2
790+ case (11,13,15) ! electron/muon/tau
791+ gg2 = eva_ee2*eva_qee2
792+ case (12,14,16) ! electron/muon/tau-neutrino
793+c write(*,*) 'eva: nu has zero QED charge.'
794+ gg2 = eva_zero
795+ case default
796+ write(*,*) 'eva: setting QED coup to (e*Q_e). unknown fPID:', fPID
797+ gg2 = eva_ee2*eva_qee2
798+ end select
799+c ******************************
800+ case (23) ! z
801+ gg2 = eva_gz2
802+c ******************************
803+ case (24) ! w+/w-
804+ gg2 = eva_gw2/2.d0
805+ if(vPID.eq.24) then ! w+
806+ select case (fPID)
807+ case (-1,2,-3,4,-5,6,-11,12,-13,14,-15,16)
808+ gg2 = gg2
809+ case default
810+ write(*,*) 'eva: violation of QED conservation. setting w+ffbar coup to zero'
811+ gg2 = eva_zero
812+ end select
813+ else ! w-
814+ select case (fPID)
815+ case (1,-2,3,-4,5,-6,11,-12,13,-14,15,-16)
816+ gg2 = gg2
817+ case default
818+ write(*,*) 'eva: violation of QED conservation. setting w-ffbar coup to zero'
819+ gg2 = eva_zero
820+ end select
821+ endif
822+c ******************************
823+ case default
824+ write(*,*) 'eva: setting coup to zero. unknown vPID:', vPID
825+ gg2 = eva_zero
826+ end select
827+ return
828+ end
829+c /* ********************************************************* *
830+c /* ********************************************************* *
831+ subroutine eva_get_qEM_by_PID(qEM,fPID)
832+ implicit none
833+ integer fPID
834+ double precision qEM
835+ include 'ElectroweakFlux.inc'
836+
837+ select case (iabs(fPID)) ! nested select case
838+ case (1) ! down
839+ qEM = eva_qed * fPID/iabs(fPID)
840+ case (2) ! up
841+ qEM = eva_qeu * fPID/iabs(fPID)
842+ case (3) ! strange
843+ qEM = eva_qed * fPID/iabs(fPID)
844+ case (4) ! charm
845+ qEM = eva_qeu * fPID/iabs(fPID)
846+ case (5) ! bottom
847+ qEM = eva_qed * fPID/iabs(fPID)
848+ case (6) ! top
849+ qEM = eva_qeu * fPID/iabs(fPID)
850+ case (11) ! electron
851+ qEM = eva_qee * fPID/iabs(fPID)
852+ case (12) ! electron-neutrino
853+ qEM = eva_zero
854+ case (13) ! muon
855+ qEM = eva_qee * fPID/iabs(fPID)
856+ case (14) ! muon-neutrino
857+ qEM = eva_zero
858+ case (15) ! tau
859+ qEM = eva_qee * fPID/iabs(fPID)
860+ case (16) ! tau-neutrino
861+ qEM = eva_zero
862+ case default
863+ write(*,*) 'eva: setting QED charge to zero. unknown fPID:', fPID
864+ qEM = eva_zero
865+ end select
866+c ******************************
867+ return
868+ end
869+c /* ********************************************************* *
870+c /* ********************************************************* *
871+ subroutine eva_get_gR2_by_PID(gR2,vPID,fPID)
872+ implicit none
873+ integer vPID,fPID
874+ double precision gR2
875+ include 'ElectroweakFlux.inc'
876+
877+ select case (iabs(vPID))
878+ case (7,22)
879+ gR2 = eva_one
880+ case (23)
881+c ******************************
882+ select case (iabs(fPID)) ! nested select case
883+ case (1) ! down
884+ gR2 = eva_zRd**2
885+ case (2) ! up
886+ gR2 = eva_zRu**2
887+ case (3) ! strange
888+ gR2 = eva_zRd**2
889+ case (4) ! charm
890+ gR2 = eva_zRu**2
891+ case (5) ! bottom
892+ gR2 = eva_zRd**2
893+ case (6) ! top
894+ gR2 = eva_zRu**2
895+ case (11) ! electron
896+ gR2 = eva_zRe**2
897+ case (12) ! electron-neutrino
898+ gR2 = eva_zRv**2
899+ case (13) ! muon
900+ gR2 = eva_zRe**2
901+ case (14) ! muon-neutrino
902+ gR2 = eva_zRv**2
903+ case (15) ! tau
904+ gR2 = eva_zRe**2
905+ case (16) ! tau-neutrino
906+ gR2 = eva_zRv**2
907+ case default
908+ gR2 = eva_one**2
909+ end select
910+c ******************************
911+ case (24)
912+ gR2 = eva_zero
913+ case default
914+ gR2 = eva_one
915+ end select
916+ return
917+ end
918+c /* ********************************************************* *
919+c /* ********************************************************* *
920+ subroutine eva_get_gL2_by_PID(gL2,vPID,fPID)
921+ implicit none
922+ integer vPID,fPID
923+ double precision gL2
924+ include 'ElectroweakFlux.inc'
925+
926+ select case (iabs(vPID))
927+ case (7,22)
928+ gL2 = eva_one
929+ case (23)
930+c ******************************
931+ select case (iabs(fPID)) ! nested select case
932+ case (1) ! down
933+ gL2 = eva_zLd**2
934+ case (2) ! up
935+ gL2 = eva_zLu**2
936+ case (3) ! strange
937+ gL2 = eva_zLd**2
938+ case (4) ! charm
939+ gL2 = eva_zLu**2
940+ case (5) ! bottom
941+ gL2 = eva_zLd**2
942+ case (6) ! top
943+ gL2 = eva_zLu**2
944+ case (11) ! electron
945+ gL2 = eva_zLe**2
946+ case (12) ! electron-neutrino
947+ gL2 = eva_zLv**2
948+ case (13) ! muon
949+ gL2 = eva_zLe**2
950+ case (14) ! muon-neutrino
951+ gL2 = eva_zLv**2
952+ case (15) ! tau
953+ gL2 = eva_zLe**2
954+ case (16) ! tau-neutrino
955+ gL2 = eva_zLv**2
956+ case default
957+ gL2 = eva_one**2
958+ end select
959+c ******************************
960+ case (24)
961+ gL2 = eva_one
962+ case default
963+ gL2 = eva_one
964+ end select
965+ return
966+ end
967+c /* ********************************************************* *
968
969=== modified file 'Template/LO/Source/PDF/PhotonFlux.f'
970--- Template/LO/Source/PDF/PhotonFlux.f 2020-08-07 14:49:25 +0000
971+++ Template/LO/Source/PDF/PhotonFlux.f 2021-11-12 09:03:34 +0000
972@@ -1,9 +1,14 @@
973-c/* ********************************************************* */
974+c/* ******************************************************** */
975 c/* Equivalent photon approximation structure function. * */
976-c/* V.M.Budnev et al., Phys.Rep. 15C (1975) 181 * */
977-c/* Improved Weizsaecker-Williams formula * */
978-c/* http://inspirehep.net/record/359425 * */
979-c/* ********************************************************* */
980+c/* V.M.Budnev, et al., Phys.Rep. 15C (1975) 181 * */
981+c/* https://inspirehep.net/literature/95445 * */
982+c/* For photon from proton (elastic limit, no DGLAP evo) * */
983+c/* * */
984+c/* Improved Weizsaecker-Williams formula * */
985+c/* S. Frixione, et al., Phys.Lett.B 319 (1993) 339-345 * */
986+c/* http://inspirehep.net/record/359425 * */
987+c/* For photon from electron (WW approx) + higher twist * */
988+c/* ******************************************************** */
989 c provided by Tomasz Pierzchala - UCL
990
991 real*8 function epa_lepton(x,q2max, mode)
992
993=== modified file 'Template/LO/Source/PDF/makefile'
994--- Template/LO/Source/PDF/makefile 2021-04-16 07:24:34 +0000
995+++ Template/LO/Source/PDF/makefile 2021-11-12 09:03:34 +0000
996@@ -15,14 +15,14 @@
997 $(error Bad lhadpfversion version 6 is now required)
998 else
999 ifeq ($(lhapdfsubversion),1) # 6.1.X
1000- PDF = pdfwrap_lhapdf.o pdf_lhapdf6.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o
1001+ PDF = pdfwrap_lhapdf.o pdf_lhapdf6.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o ElectroweakFluxDriver.o ElectroweakFlux.o
1002 else # 6.2.X
1003 CXXFLAGS+=-std=c++11
1004- PDF = pdfwrap_lhapdf.o pdf_lhapdf62.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o
1005+ PDF = pdfwrap_lhapdf.o pdf_lhapdf62.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o ElectroweakFluxDriver.o ElectroweakFlux.o
1006 endif
1007 endif
1008 else
1009- PDF = Ctq6Pdf.o pdfwrap.o opendata.o pdf.o PhotonFlux.o pdg2pdf.o NNPDFDriver.o eepdf.o gridpdfaux.o dfint.o kerset.o
1010+ PDF = Ctq6Pdf.o pdfwrap.o opendata.o pdf.o PhotonFlux.o pdg2pdf.o NNPDFDriver.o eepdf.o gridpdfaux.o dfint.o kerset.o ElectroweakFluxDriver.o ElectroweakFlux.o
1011 endif
1012
1013 all: $(LIBDIR)$(LIBRARY)
1014
1015=== modified file 'Template/LO/Source/PDF/pdfwrap.f'
1016--- Template/LO/Source/PDF/pdfwrap.f 2021-04-19 12:59:10 +0000
1017+++ Template/LO/Source/PDF/pdfwrap.f 2021-11-12 09:03:34 +0000
1018@@ -261,8 +261,8 @@
1019
1020 c---------------------------------------------------------------
1021 c---------------------------------------------------------------
1022-
1023-
1024+ elseif (pdlabel.eq.'eva'.or.pdlabel.eq.'iww'.or.pdlabel.eq.'none') then
1025+ asmz=asmz
1026 else
1027 asmz=0.118d0
1028 c do not crash anymore since arbitrary PDF can be added for lepton collision
1029
1030=== modified file 'Template/LO/Source/PDF/pdg2pdf.f'
1031--- Template/LO/Source/PDF/pdg2pdf.f 2021-04-24 20:53:56 +0000
1032+++ Template/LO/Source/PDF/pdg2pdf.f 2021-11-12 09:03:34 +0000
1033@@ -52,12 +52,32 @@
1034 data pdlabellast/2*'abcdefg'/
1035 data ihlast/2*-99/
1036
1037- if (ih.eq.9) then
1038+c effective w/z/a approximation (leading log fixed order, not resummed)
1039+ double precision eva_get_pdf_by_PID
1040+ external eva_get_pdf_by_PID
1041+ integer ppid
1042+ integer ievo,ievo_eva
1043+ common/to_eva/ievo_eva
1044+ integer hel,helMulti,hel_picked
1045+ double precision hel_jacobian
1046+ common/hel_picked/hel_picked,hel_jacobian
1047+ integer get_nhel
1048+ external get_nhel
1049+ real*8 pol(2),fLPol
1050+ common/to_polarization/pol
1051+
1052+
1053+c collider configuration
1054+ integer lpp(2)
1055+ double precision ebeam(2),xbk(2),q2fact(2)
1056+ common/to_collider/ebeam,xbk,q2fact,lpp
1057+
1058+ if (iabs(ih).eq.9) then
1059 pdg2pdf = 1d0
1060 return
1061 endif
1062
1063- nb_hadron = (nb_proton(beamid)+nb_neutron(beamid))
1064+ nb_hadron = (nb_proton(iabs(beamid))+nb_neutron(iabs(beamid)))
1065 c Make sure we have a reasonable Bjorken x. Note that even though
1066 c x=0 is not reasonable, we prefer to simply return pdg2pdf=0
1067 c instead of stopping the code, as this might accidentally happen.
1068@@ -101,31 +121,48 @@
1069 stop 1
1070 endif
1071 do i_ee = 1, n_ee
1072- ee_components(i_ee) = compute_eepdf(x,omx_ee(beamid),xmu,i_ee,ipart,ih_local)
1073+ ee_components(i_ee) = compute_eepdf(x,omx_ee(iabs(beamid)),xmu,i_ee,ipart,ih_local)
1074 enddo
1075 pdg2pdf = ee_components(1) ! temporary to test pdf load
1076-c write(*,*), x, beamid ,omx_ee(beamid),xmu,1,ipart,ih_local,pdg2pdf
1077+c write(*,*), x, beamid ,omx_ee(iabs(beamid)),xmu,1,ipart,ih_local,pdg2pdf
1078 return
1079 endif
1080
1081
1082- if (beamid.gt.0) then
1083+c If group_subprocesses is true, then IH=abs(lpp) and ipdg=ipdg*sgn(lpp) in export_v4.
1084+c For EVA, group_subprocesses is false and IH=LPP and ipdg are passed, instead.
1085+c If group_subprocesses is false, the following sets ipdg=ipdg*sgn(IH) if not in EVA
1086+ if(pdlabel.eq.'eva'.or.pdsublabel(iabs(beamid)).eq.'eva') then
1087+ ipart=ipdg
1088+ else
1089 ipart=sign(1,ih)*ipdg
1090- else
1091- ipart = ipdg
1092- endif
1093+ endif
1094
1095- if(iabs(ipart).eq.21) then
1096+ if(iabs(ipart).eq.21) then ! g
1097 ipart=0
1098- else if(iabs(ipart).eq.22) then
1099- ipart=7
1100- else if(iabs(ipart).eq.7) then
1101- ipart=7
1102-c This will be called for any PDG code, but we only support up to 7
1103+c else if(ipart.eq.12) then ! ve
1104+c ipart=12
1105+c else if(ipart.eq.-12) then ! ve~
1106+c ipart=-12
1107+c else if(ipart.eq.14) then ! vm
1108+c ipart=14
1109+c else if(ipart.eq.-14) then ! vm~
1110+c ipart=-14
1111+ else if(ipart.eq.24) then ! w+
1112+ ipart=24
1113+ else if(ipart.eq.-24) then ! w-
1114+ ipart=-24
1115+ else if(iabs(ipart).eq.23) then ! z
1116+ ipart=23
1117+ else if(iabs(ipart).eq.22) then ! a
1118+ ipart=7
1119+ else if(iabs(ipart).eq.7) then ! a
1120+ ipart=7
1121+c This will be called for any PDG code. We only support (for now) 0-7, and 22-24
1122 else if(iabs(ipart).gt.7)then
1123 write(*,*) 'PDF not supported for pdg ',ipdg
1124 write(*,*) 'For lepton colliders, please set the lpp* '//
1125- $ 'variables to 0 in the run_card'
1126+ $ 'variables to 0 in the run_card current is' , ih
1127 open(unit=26,file='../../../error',status='unknown')
1128 write(26,*) 'Error: PDF not supported for pdg ',ipdg
1129 stop 1
1130@@ -142,10 +179,10 @@
1131 enddo
1132
1133 c Reuse previous result, if possible
1134- if (ireuse.gt.0.)then
1135+ if (ireuse.gt.0.and.iabs(iporg).lt.8)then
1136 if (pdflast(iporg,ireuse).ne.-99d9) then
1137- pdg2pdf = get_ion_pdf(pdflast(-7, ireuse), iporg, nb_proton(beamid),
1138- $ nb_neutron(beamid))
1139+ pdg2pdf = get_ion_pdf(pdflast(-7, ireuse), iporg, nb_proton(iabs(beamid)),
1140+ $ nb_neutron(iabs(beamid)))
1141 return
1142 endif
1143 endif
1144@@ -186,31 +223,67 @@
1145 pdlabellast(ireuse)=pdlabel
1146 ihlast(ireuse)=ih
1147
1148- if(iabs(ipart).eq.7.and.ih.gt.1) then
1149- q2max=xmu*xmu
1150- if(abs(ih).eq.3.or.abs(ih).eq.4) then !from the electron or muonn
1151- pdg2pdf=epa_lepton(x,q2max, ih)
1152- elseif(ih .eq. 2) then !from a proton without breaking
1153- pdg2pdf=epa_proton(x,q2max,beamid)
1154- endif
1155- pdflast(iporg,ireuse)=pdg2pdf
1156- return
1157+ if(pdlabel.eq.'eva'.or.pdsublabel(iabs(beamid)).eq.'eva') then
1158+ if(iabs(ipart).ne.7.and.
1159+c & iabs(ipart).ne.12.and.
1160+c & iabs(ipart).ne.14.and.
1161+ & iabs(ipart).ne.23.and.
1162+ & iabs(ipart).ne.24 ) then
1163+ write(*,*) 'ERROR: EVA PDF only supported for A/Z/W, not for pdg = ',ipart
1164+ stop 1
1165+ else
1166+c write(*,*) 'running eva'
1167+ select case (iabs(ih))
1168+ case (0:2)
1169+ write(*,*) 'ERROR: EVA PDF only supported for e+/- and mu+/- beams, not for lpp/ih=',ih
1170+ stop 24
1171+ case (3) ! e+/-
1172+ ppid = 11
1173+ case (4) ! mu+/-
1174+ ppid = 13
1175+ case default
1176+ write(*,*) 'ERROR: EVA PDF only supported for e+/- and mu+/- beams, not for lpp/ih=',ih
1177+ stop 24
1178+ end select
1179+ ppid = ppid * ih/iabs(ih) ! get sign of parent
1180+ fLPol = pol(iabs(beamid)) ! see setrun.f for treatment of polbeam*
1181+ q2max = xmu*xmu
1182+ ievo = ievo_eva
1183+ hel = GET_NHEL(HEL_PICKED, beamid) ! helicity of v
1184+ helMulti = GET_NHEL(0, beamid) ! helicity multiplicity of v to undo spin averaging
1185+ pdg2pdf = helMulti*eva_get_pdf_by_PID(ipart,ppid,hel,fLpol,x,q2max,ievo)
1186+ return
1187+ endif
1188+ else ! this ensure backwards compatibility
1189+ if(iabs(ipart).eq.7.and.iabs(ih).gt.1) then
1190+ q2max=xmu*xmu
1191+ if(iabs(ih).eq.3.or.iabs(ih).eq.4) then !from the electron or muonn
1192+ pdg2pdf=epa_lepton(x,q2max, iabs(ih))
1193+ elseif(iabs(ih) .eq. 2) then !from a proton without breaking
1194+ pdg2pdf=epa_proton(x,q2max,beamid)
1195+ endif
1196+ pdflast(iporg,ireuse)=pdg2pdf
1197+ return
1198+ endif
1199 endif
1200+
1201+
1202+
1203
1204 if (pdlabel(1:5) .eq. 'cteq6') then
1205 C Be carefull u and d are flipped inside cteq6
1206- if (nb_proton(beamid).gt.1.or.nb_neutron(beamid).ne.0)then
1207+ if (nb_proton(iabs(beamid)).gt.1.or.nb_neutron(iabs(beamid)).ne.0)then
1208 if (ipart.eq.1.or.ipart.eq.2)then
1209 pdflast(1,ireuse)=Ctq6Pdf(2,x*nb_hadron,xmu) ! remember u/d flipping in cteq
1210 pdflast(2,ireuse)=Ctq6Pdf(1,x*nb_hadron,xmu)
1211- pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(beamid), nb_neutron(beamid))
1212+ pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(iabs(beamid)), nb_neutron(iabs(beamid)))
1213 else if (ipart.eq.-1.or.ipart.eq.-2)then
1214 pdflast(-1,ireuse)=Ctq6Pdf(-2,x*nb_hadron,xmu) ! remember u/d flipping in cteq
1215 pdflast(-2,ireuse)=Ctq6Pdf(-1,x*nb_hadron,xmu)
1216- pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(beamid), nb_neutron(beamid))
1217+ pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(iabs(beamid)), nb_neutron(iabs(beamid)))
1218 else
1219 pdflast(ipart,ireuse)=Ctq6Pdf(ipart,x*nb_hadron,xmu)
1220- pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(beamid), nb_neutron(beamid))
1221+ pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(iabs(beamid)), nb_neutron(iabs(beamid)))
1222 endif
1223 else
1224 if(iabs(ipart).ge.1.and.iabs(ipart).le.2)
1225@@ -219,9 +292,9 @@
1226 pdflast(iporg,ireuse)=pdg2pdf
1227 endif
1228 else
1229- call pftopdg(ih,x*nb_hadron,xmu,pdflast(-7,ireuse))
1230- pdg2pdf = get_ion_pdf(pdflast(-7, ireuse), iporg, nb_proton(beamid),
1231- $ nb_neutron(beamid))
1232+ call pftopdg(iabs(ih),x*nb_hadron,xmu,pdflast(-7,ireuse))
1233+ pdg2pdf = get_ion_pdf(pdflast(-7, ireuse), iporg, nb_proton(iabs(beamid)),
1234+ $ nb_neutron(iabs(beamid)))
1235 endif
1236
1237 return
1238
1239=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf6.f'
1240--- Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2021-07-28 14:12:54 +0000
1241+++ Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2021-11-12 09:03:34 +0000
1242@@ -34,7 +34,21 @@
1243 data imemlast/20*-99/
1244 data i_replace/20/
1245
1246- nb_hadron = (nb_proton(beamid)+nb_neutron(beamid))
1247+c effective w/z/a approximation (leading log fixed order, not resummed)
1248+ double precision eva_get_pdf_by_PID
1249+ external eva_get_pdf_by_PID
1250+ integer ppid
1251+ integer ievo,ievo_eva
1252+ common/to_eva/ievo_eva
1253+ integer hel,helMulti,hel_picked
1254+ double precision hel_jacobian
1255+ common/hel_picked/hel_picked,hel_jacobian
1256+ integer get_nhel
1257+ external get_nhel
1258+ real*8 pol(2),fLPol
1259+ common/to_polarization/pol
1260+
1261+ nb_hadron = (nb_proton(iabs(beamid))+nb_neutron(iabs(beamid)))
1262 c Make sure we have a reasonable Bjorken x. Note that even though
1263 c x=0 is not reasonable, we prefer to simply return pdg2pdf=0
1264 c instead of stopping the code, as this might accidentally happen.
1265@@ -53,21 +67,85 @@
1266 endif
1267 endif
1268
1269- ipart=ipdg
1270- if(iabs(ipart).eq.21) then
1271+c If group_subprocesses is true, then IH=abs(lpp) and ipdg=ipdg*sgn(lpp) in export_v4.
1272+c For EVA, group_subprocesses is false and IH=LPP and ipdg are passed, instead.
1273+c If group_subprocesses is false, the following sets ipdg=ipdg*sgn(IH) if not in EVA
1274+ if(pdsublabel(iabs(beamid)).eq.'eva') then
1275+ ipart=ipdg
1276+ else
1277+ ipart=ipdg*ih/iabs(ih)
1278+ endif
1279+
1280+ if(iabs(ipart).eq.21) then ! g
1281 ipart=0
1282- else if(iabs(ipart).eq.22) then
1283- ipart=7
1284- else if (iabs(ipart).eq.7) then
1285- ipart=7
1286-c This will be called for any PDG code, but we only support up to 7
1287- else if(iabs(ipart).gt.7)then
1288- write(*,*) 'PDF not supported for pdg ',ipdg
1289- write(*,*) 'For lepton colliders, please set the lpp* '//
1290- $ 'variables to 0 in the run_card'
1291- open(unit=26,file='../../../error',status='unknown')
1292- write(26,*) 'Error: PDF not supported for pdg ',ipdg
1293- stop 1
1294+c else if(ipart.eq.12) then ! ve
1295+c ipart=12
1296+c else if(ipart.eq.-12) then ! ve~
1297+c ipart=-12
1298+c else if(ipart.eq.14) then ! vm
1299+c ipart=14
1300+c else if(ipart.eq.-14) then ! vm~
1301+c ipart=-14
1302+ else if(ipart.eq.24) then ! w+
1303+ ipart=24
1304+ else if(ipart.eq.-24) then ! w-
1305+ ipart=-24
1306+ else if(iabs(ipart).eq.23) then ! z
1307+ ipart=23
1308+ else if(iabs(ipart).eq.22) then ! a
1309+ ipart=7
1310+ else if(iabs(ipart).eq.7) then ! a
1311+ ipart=7
1312+c This will be called for any PDG code. We only support (for now) 0-7, and 22-24
1313+c else if(iabs(ipart).gt.7)then
1314+c write(*,*) 'PDF not supported for pdg ',ipdg
1315+c write(*,*) 'For lepton colliders, please set the lpp* '//
1316+c $ 'variables to 0 in the run_card'
1317+c open(unit=26,file='../../../error',status='unknown')
1318+c write(26,*) 'Error: PDF not supported for pdg ',ipdg
1319+c stop 1
1320+ endif
1321+
1322+ if(pdsublabel(iabs(beamid)).eq.'eva') then
1323+ if(iabs(ipart).ne.7.and.
1324+c & iabs(ipart).ne.12.and.
1325+c & iabs(ipart).ne.14.and.
1326+ & iabs(ipart).ne.23.and.
1327+ & iabs(ipart).ne.24 ) then
1328+ write(*,*) 'ERROR: EVA PDF only supported for A/Z/W, not for pdg = ',ipart
1329+ stop 1
1330+ else
1331+c write(*,*) 'running eva'
1332+ select case (iabs(ih))
1333+ case (0:2)
1334+ write(*,*) 'ERROR: EVA PDF only supported for e+/- and mu+/- beams, not for lpp/ih=',ih
1335+ stop 24
1336+ case (3) ! e+/-
1337+ ppid = 11
1338+ case (4) ! mu+/-
1339+ ppid = 13
1340+ case default
1341+ write(*,*) 'ERROR: EVA PDF only supported for e+/- and mu+/- beams, not for lpp/ih=',ih
1342+ stop 24
1343+ end select
1344+ ppid = ppid * ih/iabs(ih) ! get sign of parent
1345+ fLPol = pol(iabs(beamid)) ! see setrun.f for treatment of polbeam*
1346+c q2max = xmu*xmu
1347+ ievo = ievo_eva
1348+ hel = GET_NHEL(HEL_PICKED, beamid) ! helicity of v
1349+ helMulti = GET_NHEL(0, beamid) ! helicity multiplicity of v to undo spin averaging
1350+ pdg2pdf = helMulti*eva_get_pdf_by_PID(ipart,ppid,hel,fLpol,x,xmu*xmu,ievo)
1351+ return
1352+ endif
1353+ else
1354+ if(iabs(ipart).eq.24.or.iabs(ipart).eq.23) then ! w/z
1355+ write(*,*) 'LHAPDF not supported for pdg ',ipdg
1356+ write(*,*) 'For EVA, check if pdlabel and pdsublabel* '//
1357+ $ 'are set correctly in the run_card'
1358+ open(unit=26,file='../../../error',status='unknown')
1359+ write(26,*) 'Error: PDF not supported for pdg ',ipdg
1360+ stop 1
1361+ endif
1362 endif
1363
1364 iporg=ipart
1365@@ -86,6 +164,9 @@
1366 ireuse = 0
1367 ii=i_replace
1368 do i=1,20
1369+ if (abs(ipart).gt.7)then
1370+ exit
1371+ endif
1372 c Check if result can be reused since any of last twenty
1373 c calls. Start checking with the last call and move back in time
1374 if (ih.eq.ihlast(ii)) then
1375@@ -105,9 +186,9 @@
1376 enddo
1377
1378 c Reuse previous result, if possible
1379- if (ireuse.gt.0) then
1380+ if (ireuse.gt.0.and.abs(ipart).le.7) then
1381 if (pdflast(ipart,ireuse).ne.-99d9) then
1382- pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(beamid), nb_neutron(beamid))/x
1383+ pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(iabs(beamid)), nb_neutron(iabs(beamid)))/x
1384 return
1385 endif
1386 endif
1387@@ -117,10 +198,10 @@
1388
1389 c Call lhapdf and give the current values to the arrays that should
1390 c be saved
1391- if(ih.eq.1) then
1392- if (nb_proton(beamid).eq.1.and.nb_neutron(beamid).eq.0) then
1393+ if(iabs(ih).eq.1) then
1394+ if (nb_proton(iabs(beamid)).eq.1.and.nb_neutron(iabs(beamid)).eq.0) then
1395 call evolvepart(ipart,x,xmu,pdg2pdf)
1396- pdflast(ipart, i_replace)=pdg2pdf
1397+ if (abs(ipart).le.7) pdflast(ipart, i_replace)=pdg2pdf
1398 else
1399 if (ipart.eq.1.or.ipart.eq.2) then
1400 call evolvepart(1,x*nb_hadron
1401@@ -136,12 +217,12 @@
1402 call evolvepart(ipart,x*nb_hadron
1403 & ,xmu,pdflast(ipart, i_replace))
1404 endif
1405- pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid))
1406+ pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(iabs(beamid)), nb_neutron(iabs(beamid)))
1407 endif
1408 pdg2pdf=pdg2pdf/x
1409- else if(abs(ih).eq.3.or.abs(ih).eq.4) then !from the electron
1410- pdg2pdf=epa_lepton(x,xmu*xmu, ih)
1411- else if(ih.eq.2) then ! photon from a proton without breaking
1412+ else if(iabs(ih).eq.3.or.iabs(ih).eq.4) then !from the electron
1413+ pdg2pdf=epa_lepton(x,xmu*xmu, iabs(ih))
1414+ else if(iabs(ih).eq.2) then ! photon from a proton without breaking
1415 pdg2pdf = epa_proton(x,xmu*xmu, beamid)
1416
1417 else
1418
1419=== modified file 'Template/LO/Source/cuts.inc'
1420--- Template/LO/Source/cuts.inc 2016-02-04 19:44:31 +0000
1421+++ Template/LO/Source/cuts.inc 2021-11-12 09:03:34 +0000
1422@@ -37,6 +37,7 @@
1423 REAL*8 misset,missetmax,ptheavy
1424 REAL*8 ptllmin,ptllmax
1425 integer maxjetflavor
1426+ REAl*8 dsqrt_shat
1427
1428 COMMON /to_min_max_cuts/
1429 & PTJmax,PTBmax,PTAmax,PTLmax,
1430@@ -59,7 +60,7 @@
1431 & ht2max,ht3max,ht4max,
1432 & htjmin,htjmax,ihtmin,ihtmax,
1433 & misset,missetmax,ptheavy,
1434- & ptllmin,ptllmax,
1435+ & ptllmin,ptllmax,dsqrt_shat,
1436 & maxjetflavor
1437
1438 C
1439
1440=== modified file 'Template/LO/Source/dsample.f'
1441--- Template/LO/Source/dsample.f 2021-05-04 15:12:08 +0000
1442+++ Template/LO/Source/dsample.f 2021-11-12 09:03:34 +0000
1443@@ -1459,19 +1459,20 @@
1444 COMMON/TO_CUTSDONE/CUTSDONE,CUTSPASSED
1445
1446 CHARACTER*7 PDLABEL,EPA_LABEL
1447+ character*7 pdsublabel(2)
1448 INTEGER LHAID
1449- COMMON/TO_PDF/LHAID,PDLABEL,EPA_LABEL
1450+ COMMON/TO_PDF/LHAID,PDLABEL,EPA_LABEL,pdsublabel
1451 c
1452 c Begin code
1453 c
1454 c It is important to divide the wgt stored in the grid by the
1455 c corresponding jacobian otherwise it flattens the sampled
1456 c distribution.
1457-C Also, if HEL_PICKED is equal to -1, it means that MadEvent
1458+C Also, if HEL_PICKED is greater than 0, it means that MadEvent
1459 C is in the initialization stage where all helicity were probed
1460 c and added individually to the grid directly by matrix<i>.f so
1461 c that they shouldn't be added here.
1462- if(ISUM_HEL.ne.0.and.HEL_PICKED.ne.-1.and.
1463+ if(ISUM_HEL.ne.0.and.HEL_PICKED.gt.0.and.
1464 & (.NOT.CUTSDONE.or.CUTSPASSED)) then
1465 call DS_add_entry('Helicity',HEL_PICKED,(wgt/hel_jacobian))
1466 endif
1467
1468=== removed file 'Template/LO/Source/pdf.inc'
1469=== modified file 'Template/LO/Source/readgrid.f'
1470--- Template/LO/Source/readgrid.f 2012-03-22 06:16:35 +0000
1471+++ Template/LO/Source/readgrid.f 2021-11-12 09:03:34 +0000
1472@@ -4,7 +4,7 @@
1473
1474 c...global variables
1475 include 'sudgrid.inc'
1476- include 'pdf.inc'
1477+ include 'PDF/pdf.inc'
1478 include 'maxparticles.inc'
1479 include 'run.inc'
1480
1481
1482=== modified file 'Template/LO/Source/run.inc'
1483--- Template/LO/Source/run.inc 2021-07-27 15:27:29 +0000
1484+++ Template/LO/Source/run.inc 2021-11-12 09:03:34 +0000
1485@@ -6,10 +6,11 @@
1486 c
1487 real*8 scale,scalefact,alpsfact
1488 logical fixed_ren_scale,fixed_fac_scale1,fixed_fac_scale2,fixed_couplings,hmult
1489- integer ickkw,nhmult,asrwgtflavor, dynamical_scale_choice
1490+ integer ickkw,nhmult,asrwgtflavor,dynamical_scale_choice,ievo_eva
1491 common/to_scale/scale,scalefact,alpsfact,fixed_ren_scale,fixed_fac_scale1,fixed_fac_scale2,
1492 $ fixed_couplings,ickkw,nhmult,hmult,asrwgtflavor,
1493 $ dynamical_scale_choice
1494+ common/to_eva/ievo_eva
1495 c
1496 c Collider
1497 c
1498
1499=== modified file 'Template/LO/Source/setrun.f'
1500--- Template/LO/Source/setrun.f 2021-04-24 20:53:56 +0000
1501+++ Template/LO/Source/setrun.f 2021-11-12 09:03:34 +0000
1502@@ -106,6 +106,22 @@
1503 $ sign((abs(pol(1))-1)*100,pol(1)),
1504 $ sign((abs(pol(2))-1)*100,pol(2))
1505
1506+
1507+ if(pdlabel.eq.'eva') then
1508+ ! pbX=-100 (pure LH beam) => fLpol=1.0 (in eva)
1509+ ! pbX=0 (RH + LH beam) => fLpol=0.5 (in eva)
1510+ ! pbX=+100 (pure RH beam) => fLpol=0.0 (in eva)
1511+ pol(1) = (-1d0/200d0)*pb1 + 0.5d0
1512+ pol(2) = (-1d0/200d0)*pb2 + 0.5d0
1513+ else
1514+ if(pdsublabel(1).eq.'eva') then
1515+ pol(1) = (-1d0/200d0)*pb1 + 0.5d0
1516+ endif
1517+ if(pdsublabel(2).eq.'eva') then
1518+ pol(2) = (-1d0/200d0)*pb2 + 0.5d0
1519+ endif
1520+ endif
1521+
1522 c !!! Default behavior changed (MH, Aug. 07) !!!
1523 c If no pdf, read the param_card and use the value from there and
1524 c order of alfas running = 2
1525@@ -132,10 +148,10 @@
1526 c In principle this should be always the case since the
1527 c banner.py is expected to correct such wrong run_card.
1528 if(use_syst)then
1529- if(scalefact.ne.1)then
1530- write(*,*) 'Warning: use_syst=T, setting scalefact to 1'
1531- scalefact=1
1532- endif
1533+c if(scalefact.ne.1)then
1534+c write(*,*) 'Warning: use_syst=T, setting scalefact to 1'
1535+c scalefact=1
1536+c endif
1537 if(alpsfact.ne.1)then
1538 write(*,*) 'Warning: use_syst=T, setting alpsfact to 1'
1539 alpsfact=1
1540@@ -152,6 +168,10 @@
1541 idbmup(i)=11
1542 elseif(lpp(i).eq.-3) then
1543 idbmup(i)=-11
1544+ elseif(lpp(i).eq.4) then
1545+ idbmup(i)=13
1546+ elseif(lpp(i).eq.-4) then
1547+ idbmup(i)=-13
1548 elseif(lpp(i).eq.0) then
1549 idbmup(i)=idup(i,1,1)
1550 else
1551@@ -179,10 +199,12 @@
1552 integer mpdf
1553 integer npdfs,i,pdfgup(2),pdfsup(2),lhaid
1554
1555- parameter (npdfs=17)
1556+ parameter (npdfs=19)
1557 character*7 pdflabs(npdfs)
1558 data pdflabs/
1559- $ 'none',
1560+ $ 'none',
1561+ $ 'eva',
1562+ $ 'iww',
1563 $ 'dressed',
1564 $ 'mrs02nl',
1565 $ 'mrs02nn',
1566@@ -201,8 +223,10 @@
1567 $ 'nn23nlo'/
1568 integer numspdf(npdfs)
1569 data numspdf/
1570- $ 00000,
1571- $ 00000,
1572+ $ 00000,
1573+ $ 00000,
1574+ $ 00000,
1575+ $ 00000,
1576 $ 20250,
1577 $ 20270,
1578 $ 19150,
1579
1580=== modified file 'Template/LO/SubProcesses/cuts.f'
1581--- Template/LO/SubProcesses/cuts.f 2021-07-27 15:27:29 +0000
1582+++ Template/LO/SubProcesses/cuts.f 2021-11-12 09:03:34 +0000
1583@@ -299,11 +299,12 @@
1584 c
1585 c Limit S_hat
1586 c
1587-c if (x1*x2*stot .gt. 500**2) then
1588-c passcuts=.false.
1589-c return
1590-c endif
1591-
1592+ if (dsqrt_shat.ne.0d0)then
1593+ if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then
1594+ passcuts=.false.
1595+ return
1596+ endif
1597+ endif
1598 C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight
1599
1600 if(debug) write (*,*) '============================='
1601
1602=== modified file 'Template/LO/SubProcesses/genps.f'
1603--- Template/LO/SubProcesses/genps.f 2021-07-28 14:12:54 +0000
1604+++ Template/LO/SubProcesses/genps.f 2021-11-12 09:03:34 +0000
1605@@ -147,7 +147,8 @@
1606 C Common blocks
1607 CHARACTER*7 PDLABEL,EPA_LABEL
1608 INTEGER LHAID
1609- COMMON/TO_PDF/LHAID,PDLABEL,EPA_LABEL
1610+ character*7 pdsublabel(2)
1611+ COMMON/TO_PDF/LHAID,PDLABEL,EPA_LABEL, pdsublabel
1612
1613
1614 integer lwgt(0:maxconfigs,maxinvar)
1615
1616=== modified file 'Template/LO/SubProcesses/setcuts.f'
1617--- Template/LO/SubProcesses/setcuts.f 2021-07-27 15:27:29 +0000
1618+++ Template/LO/SubProcesses/setcuts.f 2021-11-12 09:03:34 +0000
1619@@ -679,7 +679,7 @@
1620 do i=nincoming+1, nexternal
1621 smin_p = smin_p + pmass(i)
1622 enddo
1623- smin = max(smin, smin_p**2)
1624+ smin = max(smin, smin_p**2, dsqrt_shat**2)
1625 write(*,*) "Define smin to", smin
1626
1627 c Check that results are consistent among all the grouped subprocesses
1628
1629=== modified file 'Template/LO/SubProcesses/unwgt.f'
1630--- Template/LO/SubProcesses/unwgt.f 2021-03-13 10:03:56 +0000
1631+++ Template/LO/SubProcesses/unwgt.f 2021-11-12 09:03:34 +0000
1632@@ -724,7 +724,7 @@
1633 beam_number =2
1634 endif
1635
1636- if(n_pdfrw(1).gt.0.and.abs(lpp(1)).eq.1)then
1637+ if(n_pdfrw(1).gt.0.and.abs(lpp(1)).ne.2)then
1638 if(2*n_pdfrw(1).lt.10) then
1639 write(cfmt,'(a,I1,a,I1,a)') '(a,I1,a,I3,',
1640 $ n_pdfrw(1),'I9,',2*n_pdfrw(1),'E15.8,a)'
1641@@ -746,7 +746,7 @@
1642 if (flip) then
1643 beam_number = 1
1644 endif
1645- if(n_pdfrw(2).gt.0.and.abs(lpp(2)).eq.1)then
1646+ if(n_pdfrw(2).gt.0.and.abs(lpp(2)).ne.2)then
1647 if(2*n_pdfrw(2).lt.10) then
1648 write(cfmt,'(a,I1,a,I1,a)') '(a,I1,a,I3,',
1649 $ n_pdfrw(2),'I9,',2*n_pdfrw(2),'E15.8,a)'
1650
1651=== modified file 'Template/MadWeight/Cards/run_card.dat'
1652--- Template/MadWeight/Cards/run_card.dat 2015-04-05 23:18:48 +0000
1653+++ Template/MadWeight/Cards/run_card.dat 2021-11-12 09:03:34 +0000
1654@@ -23,8 +23,9 @@
1655 %(iseed)s = iseed ! rnd seed (0=assigned automatically=default))
1656 #*********************************************************************
1657 # Collider type and energy *
1658-# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=photon from proton, *
1659-# 3=photon from electron *
1660+# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=elastic photon of proton,*
1661+# +/-3=PDF of electron/positron beam *
1662+# +/-4=PDF of muon/antimuon beam *
1663 #*********************************************************************
1664 %(lpp1)s = lpp1 ! beam 1 type
1665 %(lpp2)s = lpp2 ! beam 2 type
1666
1667=== modified file 'Template/MadWeight/src/setrun.f'
1668--- Template/MadWeight/src/setrun.f 2021-08-20 19:53:32 +0000
1669+++ Template/MadWeight/src/setrun.f 2021-11-12 09:03:34 +0000
1670@@ -537,3 +537,11 @@
1671
1672 return
1673 end
1674+
1675+ INTEGER FUNCTION GET_NHEL(HEL, IPART)
1676+ implicit none
1677+ integer hel
1678+ integer ipart
1679+ get_nhel = 99
1680+ return
1681+ end
1682
1683=== modified file 'Template/NLO/Cards/run_card.dat'
1684--- Template/NLO/Cards/run_card.dat 2021-04-05 16:07:15 +0000
1685+++ Template/NLO/Cards/run_card.dat 2021-11-12 09:03:34 +0000
1686@@ -129,7 +129,10 @@
1687 %(bwcutoff)s = bwcutoff
1688 #***********************************************************************
1689 # Cuts on the jets. Jet clustering is performed by FastJet. *
1690-# - If gamma_is_j, photons are also clustered *
1691+# - If gamma_is_j, photons are also clustered with jets. *
1692+# Otherwise, they will be treated as tagged particles and photon *
1693+# isolation will be applied. Note that photons in the real emission *
1694+# will always be clustered with QCD partons. *
1695 # - When matching to a parton shower, these generation cuts should be *
1696 # considerably softer than the analysis cuts. *
1697 # - More specific cuts can be specified in SubProcesses/cuts.f *
1698
1699=== modified file 'Template/NLO/FixedOrderAnalysis/analysis_HwU_general.f'
1700--- Template/NLO/FixedOrderAnalysis/analysis_HwU_general.f 2018-10-26 09:55:25 +0000
1701+++ Template/NLO/FixedOrderAnalysis/analysis_HwU_general.f 2021-11-12 09:03:34 +0000
1702@@ -5,8 +5,12 @@
1703 integer nwgt
1704 character*(*) weights_info(*)
1705 integer i,l
1706- character*6 cc(2)
1707- data cc/'|T@NLO','|T@LO '/
1708+c character*6 cc(2)
1709+c data cc/'|T@NLO','|T@LO '/
1710+ character*13 cc(9)
1711+ data cc/ ' |T@NLO ',' |T@LO ',' |T@LO1 '
1712+ $ ,' |T@LO2 ',' |T@LO3 ',' |T@NLO1 '
1713+ $ ,' |T@NLO2 ',' |T@NLO3 ',' |T@NLO4 '/
1714
1715 c Also specific perturbative orders can be directly plotted, adding for examples
1716 c the following further entries in the variable data
1717@@ -18,8 +22,8 @@
1718 c
1719 c See also line 376 in this file
1720 call HwU_inithist(nwgt,weights_info)
1721- do i=1,2
1722- l=(i-1)*55
1723+ do i=1,9
1724+ l=(i-1)*59
1725 c transverse momenta
1726 call HwU_book(l+ 1,'total rate '//cc(i),1,0.5d0,1.5d0)
1727 call HwU_book(l+ 2,'1st charged lepton log pT '//cc(i),25,-0.2d0,3.8d0)
1728@@ -76,6 +80,14 @@
1729 c HT
1730 call HwU_book(l+54,'log HT (partons) '//cc(i),25,-0.2d0,3.8d0)
1731 call HwU_book(l+55,'log HT (reconstructed) '//cc(i),25,-0.2d0,3.8d0)
1732+
1733+
1734+ call HwU_book(l+56,'1st isolated ph log pT '//cc(i),25,-0.2d0,3.8d0)
1735+ call HwU_book(l+57,'2nd isolated ph log pT '//cc(i),25,-0.2d0,3.8d0)
1736+ call HwU_book(l+58,'3rd isolated ph log pT '//cc(i),25,-0.2d0,3.8d0)
1737+
1738+ call HwU_book(l+59,'3 isolated ph log M '//cc(i),25,-0.2d0,3.8d0)
1739+
1740 enddo
1741 return
1742 end
1743@@ -110,7 +122,7 @@
1744 $ ,ptmpmm,ptepve,ptmmvm,ptepemmpmm,ptepvemmvm,ptt,ptat,pttt
1745 $ ,etmiss,pth(2),pthh,ptv(3),ptjet(3),Mepem,Mmpmm,Mepve,Mmmvm
1746 $ ,Mepemmpmm,Mepvemmvm,Mtt,Mhh,Mj1j2,Mj1j3,Mj2j3,Mj1j2j3,Mvvv
1747- $ ,HTparton,HTreco,p_reco(0:4,nexternal)
1748+ $ ,HTparton,HTreco,p_reco(0:4,nexternal),ptphiso(nexternal),Mphphph
1749 integer nQCD,jet(nexternal),njet,itop,iatop,iem,iep,imp,imm,ive
1750 $ ,ivm,iv1,iv2,iv3,ih1,ih2,il,ipdg_reco(nexternal)
1751 double precision getptv4,getptv4_2,getptv4_4,getinvm4_2
1752@@ -119,25 +131,47 @@
1753 $ ,getinvm4_4,l10
1754 integer orders_tag_plot
1755 common /corderstagplot/ orders_tag_plot
1756+
1757+
1758+c Photon isolation
1759+ integer nph,nem,nin,nphiso
1760+ double precision ptg,chi_gamma_iso,iso_getdrv40
1761+ double precision Etsum(0:nexternal)
1762+ real drlist(nexternal)
1763+ double precision pgamma(0:3,nexternal),pgammaiso(0:3,nexternal),pem(0:3,nexternal)
1764+ logical alliso,isolated
1765+c Sort array of results: ismode>0 for real, isway=0 for ascending order
1766+ integer ismode,isway,izero,isorted(nexternal)
1767+ parameter (ismode=1)
1768+ parameter (isway=0)
1769+ parameter (izero=0)
1770+ integer get_n_tagged_photons
1771+
1772+
1773+ logical is_a_lp(nexternal),is_a_lm(nexternal),is_a_j(nexternal)
1774+ $ ,is_a_ph(nexternal)
1775+ REAL*8 pt,eta
1776+ external pt,eta,chi_gamma_iso,sortzv
1777+c integer iph1,iph2,iph3
1778 c First, try to recombine photons with leptons
1779- if (.not.quarkphreco) then
1780- write (*,*) 'quark-photon recombination is turned off. '/
1781- $ /'Do need it'
1782- stop
1783- endif
1784- if (.not. lepphreco) then
1785- write (*,*) 'lepton-photon recombination is turned off. '
1786- $ //'Do need it.'
1787- stop
1788- endif
1789+c if (.not.quarkphreco) then
1790+c write (*,*) 'quark-photon recombination is turned off. '/
1791+c $ /'Do need it'
1792+c stop
1793+c endif
1794+c if (.not. lepphreco) then
1795+c write (*,*) 'lepton-photon recombination is turned off. '
1796+c $ //'Do need it.'
1797+c stop
1798+c endif
1799 call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
1800 $ p, iPDG, p_reco, iPDG_reco)
1801
1802 c Put all (light) QCD partons(+photon) in momentum array for jet clustering.
1803 nQCD=0
1804 do j=nincoming+1,nexternal
1805- if (abs(ipdg_reco(j)).le.5 .or. ipdg_reco(j).eq.21 .or.
1806- $ ipdg_reco(j).eq.22)then
1807+ if (abs(ipdg_reco(j)).le.5 .or. ipdg_reco(j).eq.21
1808+ $ .or. (ipdg_reco(j).eq.22.and.gamma_is_j)) then
1809 nQCD=nQCD+1
1810 do i=0,3
1811 pQCD(i,nQCD)=p_reco(i,j)
1812@@ -173,6 +207,161 @@
1813 c
1814 c******************************************************************************
1815
1816+
1817+c PHOTON (ISOLATION) CUTS
1818+c
1819+c find the photons
1820+ do i=1,nexternal
1821+ if (istatus(i).eq.1 .and. ipdg(i).eq.22 .and. .not.gamma_is_j) then
1822+ is_a_ph(i)=.true.
1823+ else
1824+ is_a_ph(i)=.false.
1825+ endif
1826+ enddo
1827+ if (ptgmin.ne.0d0) then
1828+ nph=0
1829+ do j=nincoming+1,nexternal
1830+ if (is_a_ph(j)) then
1831+ nph=nph+1
1832+ do i=0,3
1833+ pgamma(i,nph)=p(i,j)
1834+ enddo
1835+ endif
1836+ enddo
1837+ if(nph.eq.0)goto 444
1838+c write(*,*) 'ERROR in cuts.f: photon isolation is not working'
1839+c $ // ' for mixed QED-QCD corrections'
1840+c stop 1
1841+
1842+ if(isoEM)then
1843+ nem=nph
1844+ do k=1,nem
1845+ do i=0,3
1846+ pem(i,k)=pgamma(i,k)
1847+ enddo
1848+ enddo
1849+ do j=nincoming+1,nexternal
1850+ if (is_a_lp(j).or.is_a_lm(j)) then
1851+ nem=nem+1
1852+ do i=0,3
1853+ pem(i,nem)=p(i,j)
1854+ enddo
1855+ endif
1856+ enddo
1857+ endif
1858+
1859+c alliso=.true.
1860+ nphiso=0
1861+
1862+ j=0
1863+c do while(j.lt.nph.and.alliso)
1864+ do while(j.lt.nph)
1865+
1866+c Loop over all photons
1867+ j=j+1
1868+
1869+ ptg=pt(pgamma(0,j))
1870+ if(ptg.lt.ptgmin)then
1871+ cycle
1872+c return
1873+ endif
1874+ if (etagamma.gt.0d0) then
1875+ if (abs(eta(pgamma(0,j))).gt.etagamma) then
1876+ cycle
1877+c return
1878+ endif
1879+ endif
1880+
1881+c Isolate from hadronic energy
1882+ do i=1,nQCD
1883+ drlist(i)=sngl(iso_getdrv40(pgamma(0,j),pQCD(0,i)))
1884+ enddo
1885+ call sortzv(drlist,isorted,nQCD,ismode,isway,izero)
1886+ Etsum(0)=0.d0
1887+ nin=0
1888+ do i=1,nQCD
1889+ if(dble(drlist(isorted(i))).le.R0gamma)then
1890+ nin=nin+1
1891+ Etsum(nin)=Etsum(nin-1)+pt(pQCD(0,isorted(i)))
1892+ endif
1893+ enddo
1894+ isolated=.True.
1895+ do i=1,nin
1896+c alliso=alliso .and.
1897+c $ Etsum(i).le.chi_gamma_iso(dble(drlist(isorted(i))),
1898+c $ R0gamma,xn,epsgamma,ptg)
1899+ if(Etsum(i).gt.chi_gamma_iso(dble(drlist(isorted(i))),
1900+ $ R0gamma,xn,epsgamma,ptg)) then
1901+ isolated=isolated.and..False.
1902+ endif
1903+ enddo
1904+ if(.not.isolated)cycle
1905+
1906+c Isolate from EM energy
1907+ if(isoEM.and.nem.gt.1)then
1908+ do i=1,nem
1909+ drlist(i)=sngl(iso_getdrv40(pgamma(0,j),pem(0,i)))
1910+ enddo
1911+ call sortzv(drlist,isorted,nem,ismode,isway,izero)
1912+c First of list must be the photon: check this, and drop it
1913+ if(isorted(1).ne.j.or.drlist(isorted(1)).gt.1.e-4)then
1914+ write(*,*)'Error #1 in photon isolation'
1915+ write(*,*)j,isorted(1),drlist(isorted(1))
1916+ stop
1917+ endif
1918+ Etsum(0)=0.d0
1919+ nin=0
1920+ do i=2,nem
1921+ if(dble(drlist(isorted(i))).le.R0gamma)then
1922+ nin=nin+1
1923+ Etsum(nin)=Etsum(nin-1)+pt(pem(0,isorted(i)))
1924+ endif
1925+ enddo
1926+ isolated=.True.
1927+ do i=1,nin
1928+c alliso=alliso .and.
1929+c $ Etsum(i).le.chi_gamma_iso(dble(drlist(isorted(i))),
1930+c $ R0gamma,xn,epsgamma,ptg)
1931+ if(Etsum(i).gt.chi_gamma_iso(dble(drlist(isorted(i))),
1932+ $ R0gamma,xn,epsgamma,ptg)) then
1933+ isolated=isolated.and..False.
1934+ endif
1935+ enddo
1936+ if(.not.isolated)cycle
1937+ endif
1938+c End of loop over photons
1939+
1940+ nphiso=nphiso+1
1941+
1942+ do i=0,3
1943+ pgammaiso(i,nphiso)=pgamma(i,j)
1944+ enddo
1945+
1946+
1947+ enddo
1948+ if(nphiso.lt.get_n_tagged_photons())then
1949+ print*,"mismatch with cuts.f"
1950+ stop
1951+ endif
1952+
1953+
1954+444 continue
1955+c End photon isolation
1956+ endif
1957+
1958+
1959+
1960+
1961+
1962+
1963+
1964+
1965+
1966+
1967+
1968+
1969+
1970+
1971 c Look for the other physics objects
1972 itop=0
1973 iatop=0
1974@@ -189,7 +378,14 @@
1975 iv3=0
1976 ih1=0
1977 ih2=0
1978+c iph1=0
1979+c iph2=0
1980+c iph3=0
1981+c print*,"nell'analisi"
1982 do i=1,nexternal
1983+c print*,"idpg di ",i,"=",ipdg(i)
1984+c print*,"idpg_reco di ",i,"=",ipdg_reco(i)
1985+
1986 if (ipdg_reco(i).eq.6) then
1987 itop=i
1988 elseif(ipdg_reco(i).eq.-6) then
1989@@ -232,8 +428,27 @@
1990 stop
1991 endif
1992 endif
1993+c elseif(abs(ipdg_reco(i)).eq.22.and.i.gt.nincoming) then
1994+c if (iph1.eq.0) then
1995+c iph1=i
1996+c else
1997+c if (iph2.eq.0) then
1998+c iph2=i
1999+c else
2000+c if (iph3.eq.0) then
2001+c iph3=i
2002+c else
2003+c write (*,*) 'too many photonss'
2004+c stop
2005+c endif
2006+c endif
2007+c endif
2008 endif
2009+
2010 enddo
2011+c print*,itop,iatop
2012+c stop
2013+
2014 if (itop.ne.0) ptt=getptv4(p_reco(0,itop))
2015 if (iatop.ne.0) ptat=getptv4(p_reco(0,iatop))
2016 if (itop.ne.0 .and. iatop.ne.0) then
2017@@ -318,11 +533,21 @@
2018 pth(2)=tmp
2019 endif
2020 endif
2021+
2022+
2023 if (iv1.ne.0) ptv(1)=getptv4(p_reco(0,iv1))
2024 if (iv2.ne.0) ptv(2)=getptv4(p_reco(0,iv2))
2025 if (iv3.ne.0) ptv(3)=getptv4(p_reco(0,iv3))
2026 if (iv1.ne.0 .and. iv2.ne.0 .and. iv3.ne.0) then
2027 Mvvv=getinvm4_3(p_reco(0,iv1),p_reco(0,iv2),p_reco(0,iv3))
2028+ endif
2029+
2030+ do i=1,nphiso
2031+ ptphiso(i)=getptv4(pgammaiso(0,i))
2032+ enddo
2033+
2034+ if (iv1.ne.0 .and. iv2.ne.0 .and. iv3.ne.0) then
2035+ Mvvv=getinvm4_3(p_reco(0,iv1),p_reco(0,iv2),p_reco(0,iv3))
2036 c order the vector bosons (if there are 3)
2037 do i=1,2
2038 do j=1,3-i
2039@@ -341,6 +566,31 @@
2040 ptv(2)=tmp
2041 endif
2042 endif
2043+
2044+
2045+
2046+
2047+ if (nphiso.eq.3) then
2048+ Mphphph=getinvm4_3(pgammaiso(0,1),pgammaiso(0,2),pgammaiso(0,3))
2049+c order the isolated photons (if there are 3)
2050+ do i=1,2
2051+ do j=1,3-i
2052+ if (ptphiso(j).lt.ptphiso(j+1)) then
2053+ tmp=ptphiso(j)
2054+ ptphiso(j)=ptphiso(j+1)
2055+ ptphiso(j+1)=tmp
2056+ endif
2057+ enddo
2058+ enddo
2059+ elseif (nphiso.eq.2) then
2060+c order the isolated photons (if there are 2)
2061+ if (ptphiso(1).lt.ptphiso(2)) then
2062+ tmp=ptphiso(1)
2063+ ptphiso(1)=ptphiso(2)
2064+ ptphiso(2)=tmp
2065+ endif
2066+ endif
2067+
2068 do i=1,njet
2069 ptjet(i)=getptv4(pjet(0,i))
2070 enddo
2071@@ -369,9 +619,18 @@
2072 enddo
2073 if (ive.ne.0 .or. ivm.ne.0) HTreco=HTreco+etmiss
2074
2075- do i=1,2
2076- l=(i-1)*55
2077+ do i=1,9
2078+ l=(i-1)*59
2079 if (ibody.ne.3 .and.i.eq.2) cycle
2080+ if (i.eq. 3.and.orders_tag_plot.ne.204) cycle
2081+ if (i.eq. 4.and.orders_tag_plot.ne.402) cycle
2082+ if (i.eq. 5.and.orders_tag_plot.ne.600) cycle
2083+ if (i.eq. 6.and.orders_tag_plot.ne.206) cycle
2084+ if (i.eq. 7.and.orders_tag_plot.ne.404) cycle
2085+ if (i.eq. 8.and.orders_tag_plot.ne.602) cycle
2086+ if (i.eq. 9.and.orders_tag_plot.ne.800) cycle
2087+
2088+
2089
2090 c How to tag orders (QCD+QED*100)
2091 c
2092@@ -493,6 +752,18 @@
2093 c HT
2094 call HwU_fill(l+54,l10(HTparton),wgts)
2095 call HwU_fill(l+55,l10(HTreco),wgts)
2096+
2097+ if (nphiso.ge.1) call HwU_fill(l+56,l10(ptphiso(1)),wgts)
2098+ if (nphiso.ge.2) call HwU_fill(l+57,l10(ptphiso(2)),wgts)
2099+ if (nphiso.ge.3) call HwU_fill(l+58,l10(ptphiso(3)),wgts)
2100+
2101+ if (nphiso.ge.3) call HwU_fill(l+59,l10(Mphphph),wgts)
2102+
2103+
2104+
2105+
2106+
2107+
2108 enddo
2109
2110 999 return
2111
2112=== added file 'Template/NLO/MCatNLO/Scripts/JetMatching.h'
2113--- Template/NLO/MCatNLO/Scripts/JetMatching.h 1970-01-01 00:00:00 +0000
2114+++ Template/NLO/MCatNLO/Scripts/JetMatching.h 2021-11-12 09:03:34 +0000
2115@@ -0,0 +1,2105 @@
2116+// JetMatching.h is a part of the PYTHIA event generator.
2117+// Copyright (C) 2021 Torbjorn Sjostrand.
2118+// PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
2119+// Please respect the MCnet Guidelines, see GUIDELINES for details.
2120+
2121+// Authors: Richard Corke (implementation of MLM matching as
2122+// in Alpgen for Alpgen input)
2123+// and Stephen Mrenna (implementation of MLM-style matching as
2124+// in Madgraph for Alpgen or Madgraph 5 input.)
2125+// and Simon de Visscher, Stefan Prestel (implementation of shower-kT
2126+// MLM-style matching and flavour treatment for Madgraph input)
2127+// and Stefan Prestel (FxFx NLO jet matching with aMC@NLO.)
2128+// This file provides the classes to perform MLM matching of
2129+// Alpgen or MadGraph 5 input.
2130+// Example usage is shown in main32.cc, and further details
2131+// can be found in the 'Jet Matching Style' manual page.
2132+
2133+#ifndef Pythia8_JetMatching_H
2134+#define Pythia8_JetMatching_H
2135+
2136+// Includes
2137+#include "Pythia8/Pythia.h"
2138+#include "Pythia8Plugins/GeneratorInput.h"
2139+
2140+namespace Pythia8 {
2141+
2142+//==========================================================================
2143+
2144+class HJSlowJet: public SlowJet {
2145+
2146+ public:
2147+
2148+ HJSlowJet(int powerIn, double Rin, double pTjetMinIn = 0.,
2149+ double etaMaxIn = 25., int selectIn = 1, int massSetIn = 2,
2150+ SlowJetHook* sjHookPtrIn = 0, bool useFJcoreIn = false,
2151+ bool useStandardRin = true) :
2152+ SlowJet(powerIn, Rin, pTjetMinIn, etaMaxIn, selectIn, massSetIn,
2153+ sjHookPtrIn, useFJcoreIn, useStandardRin) {}
2154+
2155+ // Note: The functions below have been made public to ease the generation
2156+ // of Python bindings.
2157+ //protected:
2158+
2159+ void findNext();
2160+
2161+};
2162+
2163+//--------------------------------------------------------------------------
2164+
2165+// Find next cluster pair to join.
2166+
2167+void HJSlowJet::findNext() {
2168+
2169+ // Find smallest of diB, dij.
2170+ if (clSize > 0) {
2171+ iMin = 0;
2172+ jMin = -1;
2173+ dMin = 1.0/TINY;
2174+ // Remove the possibility of choosing a beam clustering
2175+ for (int i = 1; i < clSize; ++i) {
2176+ for (int j = 0; j < i; ++j) {
2177+ if (dij[i*(i-1)/2 + j] < dMin) {
2178+ iMin = i;
2179+ jMin = j;
2180+ dMin = dij[i*(i-1)/2 + j];
2181+ }
2182+ }
2183+ }
2184+
2185+ // If no clusters left then instead default values.
2186+ } else {
2187+ iMin = -1;
2188+ jMin = -1;
2189+ dMin = 0.;
2190+ }
2191+
2192+}
2193+
2194+//==========================================================================
2195+
2196+// Declaration of main JetMatching class to perform MLM matching.
2197+// Note that it is defined with virtual inheritance, so that it can
2198+// be combined with other UserHooks classes, see e.g. main33.cc.
2199+
2200+class JetMatching : virtual public UserHooks {
2201+
2202+public:
2203+
2204+ // Constructor and destructor
2205+ JetMatching() : cellJet(NULL), slowJet(NULL), slowJetHard(NULL),
2206+ hjSlowJet(NULL) {}
2207+ ~JetMatching() {
2208+ if (cellJet) delete cellJet;
2209+ if (slowJet) delete slowJet;
2210+ if (slowJetHard) delete slowJetHard;
2211+ if (hjSlowJet) delete hjSlowJet;
2212+ // Print error statistics before exiting. Printing code
2213+ // basically copied from Info class.
2214+ // Header.
2215+ cout << "\n *------- JetMatching Error and Warning Messages Statistics"
2216+ << " -----------------------------------------------------* \n"
2217+ << " | "
2218+ << " | \n"
2219+ << " | times message "
2220+ << " | \n"
2221+ << " | "
2222+ << " | \n";
2223+
2224+ // Loop over all messages
2225+ map<string, int>::iterator messageEntry = messages.begin();
2226+ if (messageEntry == messages.end())
2227+ cout << " | 0 no errors or warnings to report "
2228+ << " | \n";
2229+ while (messageEntry != messages.end()) {
2230+ // Message printout.
2231+ string temp = messageEntry->first;
2232+ int len = temp.length();
2233+ temp.insert( len, max(0, 102 - len), ' ');
2234+ cout << " | " << setw(6) << messageEntry->second << " "
2235+ << temp << " | \n";
2236+ ++messageEntry;
2237+ }
2238+
2239+ // Done.
2240+ cout << " | "
2241+ << " | \n"
2242+ << " *------- End JetMatching Error and Warning Messages "
2243+ << "Statistics -------------------------------------------------* "
2244+ << endl;
2245+ }
2246+
2247+ // Initialisation
2248+ virtual bool initAfterBeams() = 0;
2249+
2250+ // Process level vetos
2251+ bool canVetoProcessLevel() { return doMerge; }
2252+ bool doVetoProcessLevel(Event& process) {
2253+ eventProcessOrig = process;
2254+ return false;
2255+ }
2256+
2257+ // Parton level vetos (before beam remnants and resonance decays)
2258+ bool canVetoPartonLevelEarly() { return doMerge; }
2259+ bool doVetoPartonLevelEarly(const Event& event);
2260+
2261+ // Shower step vetoes (after the first emission, for Shower-kT scheme)
2262+ int numberVetoStep() {return 1;}
2263+ bool canVetoStep() { return false; }
2264+ bool doVetoStep(int, int, int, const Event& ) { return false; }
2265+
2266+ // Note: The functions below have been made public to ease the generation
2267+ // of Python bindings.
2268+ //protected:
2269+
2270+ // Different steps of the matching algorithm.
2271+ virtual void sortIncomingProcess(const Event &)=0;
2272+ virtual void jetAlgorithmInput(const Event &, int)=0;
2273+ virtual void runJetAlgorithm()=0;
2274+ virtual bool matchPartonsToJets(int)=0;
2275+ virtual int matchPartonsToJetsLight()=0;
2276+ virtual int matchPartonsToJetsHeavy()=0;
2277+
2278+ // Print a message the first few times. Insert in database.
2279+ void errorMsg(string messageIn) {
2280+ // Recover number of times message occured. Also inserts new string.
2281+ int times = messages[messageIn];
2282+ ++messages[messageIn];
2283+ // Print message the first few times.
2284+ if (times < TIMESTOPRINT) cout << " PYTHIA " << messageIn << endl;
2285+ }
2286+
2287+protected:
2288+
2289+ // Constants to be changed for debug printout or extra checks.
2290+ static const bool MATCHINGDEBUG, MATCHINGCHECK;
2291+
2292+ enum vetoStatus { NONE, LESS_JETS, MORE_JETS, HARD_JET,
2293+ UNMATCHED_PARTON, INCLUSIVE_VETO };
2294+ enum partonTypes { ID_CHARM=4, ID_BOT=5, ID_TOP=6, ID_LEPMIN=11,
2295+ ID_LEPMAX=16, ID_GLUON=21, ID_PHOTON=22 };
2296+
2297+ // Master switch for merging
2298+ bool doMerge;
2299+ // Switch for merging in the shower-kT scheme. Needed here because
2300+ // the scheme uses different UserHooks functionality.
2301+ bool doShowerKt;
2302+
2303+ // Maximum and current number of jets
2304+ int nJetMax, nJet;
2305+
2306+ // Jet algorithm parameters
2307+ int jetAlgorithm;
2308+ double eTjetMin, coneRadius, etaJetMax, etaJetMaxAlgo;
2309+
2310+ // Internal jet algorithms
2311+ CellJet* cellJet;
2312+ SlowJet* slowJet;
2313+ SlowJet* slowJetHard;
2314+ HJSlowJet* hjSlowJet;
2315+
2316+ // SlowJet specific
2317+ int slowJetPower;
2318+
2319+ // Event records to store original incoming process, final-state of the
2320+ // incoming process and what will be passed to the jet algorithm.
2321+ // Not completely necessary to store all steps, but makes tracking the
2322+ // steps of the algorithm a lot easier.
2323+ Event eventProcessOrig, eventProcess, workEventJet;
2324+
2325+ // Sort final-state of incoming process into light/heavy jets and 'other'
2326+ vector<int> typeIdx[3];
2327+ set<int> typeSet[3];
2328+
2329+ // Momenta output of jet algorithm (to provide same output regardless of
2330+ // the selected jet algorithm)
2331+ vector<Vec4> jetMomenta;
2332+
2333+ // CellJet specific
2334+ int nEta, nPhi;
2335+ double eTseed, eTthreshold;
2336+
2337+ // Merging procedure parameters
2338+ int jetAllow, jetMatch, exclusiveMode;
2339+ double coneMatchLight, coneRadiusHeavy, coneMatchHeavy;
2340+ bool exclusive;
2341+
2342+ // Store the minimum eT/pT of matched light jets
2343+ double eTpTlightMin;
2344+
2345+ // Map for all error messages.
2346+ map<string, int> messages;
2347+ // Number of times the same error message is repeated, unless overridden.
2348+ static const int TIMESTOPRINT = 1;
2349+
2350+};
2351+
2352+//==========================================================================
2353+
2354+// Declaration of main UserHooks class to perform Alpgen matching.
2355+
2356+class JetMatchingAlpgen : virtual public JetMatching {
2357+
2358+public:
2359+
2360+ // Constructor and destructor
2361+ JetMatchingAlpgen() { }
2362+ ~JetMatchingAlpgen() { }
2363+
2364+ // Initialisation
2365+ bool initAfterBeams();
2366+
2367+private:
2368+
2369+ // Different steps of the matching algorithm.
2370+ void sortIncomingProcess(const Event &);
2371+ void jetAlgorithmInput(const Event &, int);
2372+ void runJetAlgorithm();
2373+ bool matchPartonsToJets(int);
2374+ int matchPartonsToJetsLight();
2375+ int matchPartonsToJetsHeavy();
2376+
2377+ // Sorting utility
2378+ void sortTypeIdx(vector < int > &vecIn);
2379+
2380+ // Constants
2381+ static const double GHOSTENERGY, ZEROTHRESHOLD;
2382+
2383+};
2384+
2385+//==========================================================================
2386+
2387+// Declaration of main UserHooks class to perform Madgraph matching.
2388+
2389+class JetMatchingMadgraph : virtual public JetMatching {
2390+
2391+public:
2392+
2393+ // Constructor and destructor
2394+ JetMatchingMadgraph() : slowJetDJR(NULL) { }
2395+ ~JetMatchingMadgraph() { if (slowJetDJR) delete slowJetDJR; }
2396+
2397+ // Initialisation
2398+ bool initAfterBeams();
2399+
2400+ // Process level vetos
2401+ bool canVetoProcessLevel() { return doMerge; }
2402+ bool doVetoProcessLevel(Event& process);
2403+
2404+ // Shower step vetoes (after the first emission, for Shower-kT scheme)
2405+ int numberVetoStep() {return 1;}
2406+ bool canVetoStep() { return doShowerKt; }
2407+ bool doVetoStep(int, int, int, const Event& );
2408+
2409+ // Jet algorithm to access the jet separations in the cleaned event
2410+ // after showering.
2411+ SlowJet* slowJetDJR;
2412+ // Functions to return the jet clustering scales and number of ME partons.
2413+ // These are useful to investigate the matching systematics.
2414+ vector<double> getDJR() { return DJR;}
2415+ pair<int,int> nMEpartons() { return nMEpartonsSave;}
2416+
2417+ // For systematic variations of the jet matching parameters, it is helpful
2418+ // to decouple the jet matching veto from the internal book-keeping. The
2419+ // veto can then be applied in hindsight by an expert user. The functions
2420+ // below return all the necessary information to do this.
2421+ Event getWorkEventJet() { return workEventJetSave; }
2422+ Event getProcessSubset() { return processSubsetSave; }
2423+ bool getExclusive() { return exclusive; }
2424+ double getPTfirst() { return pTfirstSave; }
2425+
2426+ // Note: The functions below have been made public to ease the generation
2427+ // of Python bindings.
2428+ //protected:
2429+
2430+ // Different steps of the matching algorithm.
2431+ void sortIncomingProcess(const Event &);
2432+ void jetAlgorithmInput(const Event &, int);
2433+ void runJetAlgorithm();
2434+ bool matchPartonsToJets(int);
2435+ int matchPartonsToJetsLight();
2436+ int matchPartonsToJetsHeavy();
2437+ int matchPartonsToJetsOther();
2438+ bool doShowerKtVeto(double pTfirst);
2439+
2440+ // Functions to clear and set the jet clustering scales.
2441+ void clearDJR() { DJR.resize(0);}
2442+ void setDJR( const Event& event);
2443+ // Functions to clear and set the jet clustering scales.
2444+ void clear_nMEpartons() { nMEpartonsSave.first = nMEpartonsSave.second =-1;}
2445+ void set_nMEpartons( const int nOrig, const int nMatch) {
2446+ clear_nMEpartons();
2447+ nMEpartonsSave.first = nOrig;
2448+ nMEpartonsSave.second = nMatch;
2449+ };
2450+
2451+ // Function to get the current number of partons in the Born state, as
2452+ // read from LHE.
2453+ int npNLO();
2454+
2455+private:
2456+
2457+ // Stored values of all inputs necessary to perform the jet matching, as
2458+ // needed when the veto is applied externally.
2459+ Event processSubsetSave;
2460+ Event workEventJetSave;
2461+ double pTfirstSave;
2462+
2463+ // Save if code should apply the veto, or simply store the things necessary
2464+ // to perform the veto externally.
2465+ bool performVeto;
2466+
2467+ // Variables.
2468+ vector<int> origTypeIdx[3];
2469+ int nQmatch;
2470+ double qCut, qCutSq, clFact;
2471+ bool doFxFx;
2472+ int nPartonsNow;
2473+ double qCutME, qCutMESq;
2474+
2475+ // Vector to store the jet clustering scales.
2476+ vector<double> DJR;
2477+ // Pair of integers giving the number of ME partons read from LHEF and used
2478+ // in the matching (can be different if some partons should not be matched)
2479+ pair<int,int> nMEpartonsSave;
2480+
2481+};
2482+
2483+//==========================================================================
2484+
2485+// Main implementation of JetMatching class.
2486+// This may be split out to a separate C++ file if desired,
2487+// but currently included here for ease of use.
2488+
2489+//--------------------------------------------------------------------------
2490+
2491+// Constants to be changed for debug printout or extra checks.
2492+const bool JetMatching::MATCHINGDEBUG = false;
2493+const bool JetMatching::MATCHINGCHECK = false;
2494+
2495+//--------------------------------------------------------------------------
2496+
2497+// Early parton level veto (before beam remnants and resonance showers)
2498+
2499+inline bool JetMatching::doVetoPartonLevelEarly(const Event& event) {
2500+
2501+ // 1) Sort the original incoming process. After this step is performed,
2502+ // the following assignments have been made:
2503+ // eventProcessOrig - the original incoming process
2504+ // eventProcess - the final-state of the incoming process with
2505+ // resonance decays removed (and resonances
2506+ // themselves now with positive status code)
2507+ // typeIdx[0/1/2] - Indices into 'eventProcess' of
2508+ // light jets/heavy jets/other
2509+ // typeSet[0/1/2] - Indices into 'event' of light jets/heavy jets/other
2510+ // workEvent - partons from the hardest subsystem + ISR + FSR only
2511+ sortIncomingProcess(event);
2512+
2513+ // For the shower-kT scheme, do not perform any veto here, as any vetoing
2514+ // will already have taken place in doVetoStep.
2515+ if ( doShowerKt ) return false;
2516+
2517+ // Debug printout.
2518+ if (MATCHINGDEBUG) {
2519+ // Begin
2520+ cout << endl << "-------- Begin Madgraph Debug --------" << endl;
2521+ // Original incoming process
2522+ cout << endl << "Original incoming process:";
2523+ eventProcessOrig.list();
2524+ // Final-state of original incoming process
2525+ cout << endl << "Final-state incoming process:";
2526+ eventProcess.list();
2527+ // List categories of sorted particles
2528+ for (size_t i = 0; i < typeIdx[0].size(); i++)
2529+ cout << ((i == 0) ? "Light jets: " : ", ") << setw(3) << typeIdx[0][i];
2530+ if( typeIdx[0].size()== 0 )
2531+ cout << "Light jets: None";
2532+
2533+ for (size_t i = 0; i < typeIdx[1].size(); i++)
2534+ cout << ((i == 0) ? "\nHeavy jets: " : ", ") << setw(3) << typeIdx[1][i];
2535+ for (size_t i = 0; i < typeIdx[2].size(); i++)
2536+ cout << ((i == 0) ? "\nOther: " : ", ") << setw(3) << typeIdx[2][i];
2537+ // Full event at this stage
2538+ cout << endl << endl << "Event:";
2539+ event.list();
2540+ // Work event (partons from hardest subsystem + ISR + FSR)
2541+ cout << endl << "Work event:";
2542+ workEvent.list();
2543+ }
2544+
2545+ // 2) Light/heavy jets: iType = 0 (light jets), 1 (heavy jets)
2546+ int iTypeEnd = (typeIdx[2].empty()) ? 2 : 3;
2547+ for (int iType = 0; iType < iTypeEnd; iType++) {
2548+
2549+ // 2a) Find particles which will be passed from the jet algorithm.
2550+ // Input from 'workEvent' and output in 'workEventJet'.
2551+ jetAlgorithmInput(event, iType);
2552+
2553+ // Debug printout.
2554+ if (MATCHINGDEBUG) {
2555+ // Jet algorithm event
2556+ cout << endl << "Jet algorithm event (iType = " << iType << "):";
2557+ workEventJet.list();
2558+ }
2559+
2560+ // 2b) Run jet algorithm on 'workEventJet'.
2561+ // Output is stored in jetMomenta.
2562+ runJetAlgorithm();
2563+
2564+ // 2c) Match partons to jets and decide if veto is necessary
2565+ if (matchPartonsToJets(iType) == true) {
2566+ // Debug printout.
2567+ if (MATCHINGDEBUG) {
2568+ cout << endl << "Event vetoed" << endl
2569+ << "---------- End MLM Debug ----------" << endl;
2570+ }
2571+ return true;
2572+ }
2573+ }
2574+
2575+ // Debug printout.
2576+ if (MATCHINGDEBUG) {
2577+ cout << endl << "Event accepted" << endl
2578+ << "---------- End MLM Debug ----------" << endl;
2579+ }
2580+
2581+ // If we reached here, then no veto
2582+ return false;
2583+
2584+}
2585+
2586+//==========================================================================
2587+
2588+// Main implementation of Alpgen UserHooks class.
2589+// This may be split out to a separate C++ file if desired,
2590+// but currently included here for ease of use.
2591+
2592+//--------------------------------------------------------------------------
2593+
2594+// Constants: could be changed here if desired, but normally should not.
2595+// These are of technical nature, as described for each.
2596+
2597+// The energy of ghost particles. For technical reasons, this cannot be
2598+// set arbitrarily low, see 'Particle::TINY' in 'Event.cc' for details.
2599+const double JetMatchingAlpgen::GHOSTENERGY = 1e-15;
2600+
2601+// A zero threshold value for double comparisons.
2602+const double JetMatchingAlpgen::ZEROTHRESHOLD = 1e-10;
2603+
2604+//--------------------------------------------------------------------------
2605+
2606+// Function to sort typeIdx vectors into descending eT/pT order.
2607+// Uses a selection sort, as number of partons generally small
2608+// and so efficiency not a worry.
2609+
2610+inline void JetMatchingAlpgen::sortTypeIdx(vector < int > &vecIn) {
2611+ for (size_t i = 0; i < vecIn.size(); i++) {
2612+ size_t jMax = i;
2613+ double vMax = (jetAlgorithm == 1) ?
2614+ eventProcess[vecIn[i]].eT() :
2615+ eventProcess[vecIn[i]].pT();
2616+ for (size_t j = i + 1; j < vecIn.size(); j++) {
2617+ double vNow = (jetAlgorithm == 1)
2618+ ? eventProcess[vecIn[j]].eT() : eventProcess[vecIn[j]].pT();
2619+ if (vNow > vMax) {
2620+ vMax = vNow;
2621+ jMax = j;
2622+ }
2623+ }
2624+ if (jMax != i) swap(vecIn[i], vecIn[jMax]);
2625+ }
2626+}
2627+
2628+//--------------------------------------------------------------------------
2629+
2630+// Initialisation routine automatically called from Pythia::init().
2631+// Setup all parts needed for the merging.
2632+
2633+inline bool JetMatchingAlpgen::initAfterBeams() {
2634+
2635+ // Read in parameters
2636+ doMerge = settingsPtr->flag("JetMatching:merge");
2637+ jetAlgorithm = settingsPtr->mode("JetMatching:jetAlgorithm");
2638+ nJet = settingsPtr->mode("JetMatching:nJet");
2639+ nJetMax = settingsPtr->mode("JetMatching:nJetMax");
2640+ eTjetMin = settingsPtr->parm("JetMatching:eTjetMin");
2641+ coneRadius = settingsPtr->parm("JetMatching:coneRadius");
2642+ etaJetMax = settingsPtr->parm("JetMatching:etaJetMax");
2643+ doShowerKt = settingsPtr->flag("JetMatching:doShowerKt");
2644+
2645+ // Use etaJetMax + coneRadius in input to jet algorithms
2646+ etaJetMaxAlgo = etaJetMax + coneRadius;
2647+
2648+ // CellJet specific
2649+ nEta = settingsPtr->mode("JetMatching:nEta");
2650+ nPhi = settingsPtr->mode("JetMatching:nPhi");
2651+ eTseed = settingsPtr->parm("JetMatching:eTseed");
2652+ eTthreshold = settingsPtr->parm("JetMatching:eTthreshold");
2653+
2654+ // SlowJet specific
2655+ slowJetPower = settingsPtr->mode("JetMatching:slowJetPower");
2656+ coneMatchLight = settingsPtr->parm("JetMatching:coneMatchLight");
2657+ coneRadiusHeavy = settingsPtr->parm("JetMatching:coneRadiusHeavy");
2658+ if (coneRadiusHeavy < 0.) coneRadiusHeavy = coneRadius;
2659+ coneMatchHeavy = settingsPtr->parm("JetMatching:coneMatchHeavy");
2660+
2661+ // Matching procedure
2662+ jetAllow = settingsPtr->mode("JetMatching:jetAllow");
2663+ jetMatch = settingsPtr->mode("JetMatching:jetMatch");
2664+ exclusiveMode = settingsPtr->mode("JetMatching:exclusive");
2665+
2666+ // If not merging, then done
2667+ if (!doMerge) return true;
2668+
2669+ // Exclusive mode; if set to 2, then set based on nJet/nJetMax
2670+ if (exclusiveMode == 2) {
2671+
2672+ // No nJet or nJetMax, so default to exclusive mode
2673+ if (nJet < 0 || nJetMax < 0) {
2674+ errorMsg("Warning in JetMatchingAlpgen:init: "
2675+ "missing jet multiplicity information; running in exclusive mode");
2676+ exclusive = true;
2677+
2678+ // Inclusive if nJet == nJetMax, exclusive otherwise
2679+ } else {
2680+ exclusive = (nJet == nJetMax) ? false : true;
2681+ }
2682+
2683+ // Otherwise, just set as given
2684+ } else {
2685+ exclusive = (exclusiveMode == 0) ? false : true;
2686+ }
2687+
2688+ // Initialise chosen jet algorithm. CellJet.
2689+ if (jetAlgorithm == 1) {
2690+
2691+ // Extra options for CellJet. nSel = 1 means that all final-state
2692+ // particles are taken and we retain control of what to select.
2693+ // smear/resolution/upperCut are not used and are set to default values.
2694+ int nSel = 2, smear = 0;
2695+ double resolution = 0.5, upperCut = 2.;
2696+ cellJet = new CellJet(etaJetMaxAlgo, nEta, nPhi, nSel,
2697+ smear, resolution, upperCut, eTthreshold);
2698+
2699+ // SlowJet
2700+ } else if (jetAlgorithm == 2) {
2701+ slowJet = new SlowJet(slowJetPower, coneRadius, eTjetMin, etaJetMaxAlgo);
2702+ }
2703+
2704+ // Check the jetMatch parameter; option 2 only works with SlowJet
2705+ if (jetAlgorithm == 1 && jetMatch == 2) {
2706+ errorMsg("Warning in JetMatchingAlpgen:init: "
2707+ "jetMatch = 2 only valid with SlowJet algorithm. "
2708+ "Reverting to jetMatch = 1");
2709+ jetMatch = 1;
2710+ }
2711+
2712+ // Setup local event records
2713+ eventProcessOrig.init("(eventProcessOrig)", particleDataPtr);
2714+ eventProcess.init("(eventProcess)", particleDataPtr);
2715+ workEventJet.init("(workEventJet)", particleDataPtr);
2716+
2717+ // Print information
2718+ string jetStr = (jetAlgorithm == 1) ? "CellJet" :
2719+ (slowJetPower == -1) ? "anti-kT" :
2720+ (slowJetPower == 0) ? "C/A" :
2721+ (slowJetPower == 1) ? "kT" : "unknown";
2722+ string modeStr = (exclusive) ? "exclusive" : "inclusive";
2723+ stringstream nJetStr, nJetMaxStr;
2724+ if (nJet >= 0) nJetStr << nJet; else nJetStr << "unknown";
2725+ if (nJetMax >= 0) nJetMaxStr << nJetMax; else nJetMaxStr << "unknown";
2726+ cout << endl
2727+ << " *------- MLM matching parameters -------*" << endl
2728+ << " | nJet | " << setw(14)
2729+ << nJetStr.str() << " |" << endl
2730+ << " | nJetMax | " << setw(14)
2731+ << nJetMaxStr.str() << " |" << endl
2732+ << " | Jet algorithm | " << setw(14)
2733+ << jetStr << " |" << endl
2734+ << " | eTjetMin | " << setw(14)
2735+ << eTjetMin << " |" << endl
2736+ << " | coneRadius | " << setw(14)
2737+ << coneRadius << " |" << endl
2738+ << " | etaJetMax | " << setw(14)
2739+ << etaJetMax << " |" << endl
2740+ << " | jetAllow | " << setw(14)
2741+ << jetAllow << " |" << endl
2742+ << " | jetMatch | " << setw(14)
2743+ << jetMatch << " |" << endl
2744+ << " | coneMatchLight | " << setw(14)
2745+ << coneMatchLight << " |" << endl
2746+ << " | coneRadiusHeavy | " << setw(14)
2747+ << coneRadiusHeavy << " |" << endl
2748+ << " | coneMatchHeavy | " << setw(14)
2749+ << coneMatchHeavy << " |" << endl
2750+ << " | Mode | " << setw(14)
2751+ << modeStr << " |" << endl
2752+ << " *-----------------------------------------*" << endl;
2753+
2754+ return true;
2755+}
2756+
2757+//--------------------------------------------------------------------------
2758+
2759+// Step (1): sort the incoming particles
2760+
2761+inline void JetMatchingAlpgen::sortIncomingProcess(const Event &event) {
2762+
2763+ // Remove resonance decays from original process and keep only final
2764+ // state. Resonances will have positive status code after this step.
2765+ omitResonanceDecays(eventProcessOrig, true);
2766+ eventProcess = workEvent;
2767+
2768+ // Sort original process final state into light/heavy jets and 'other'.
2769+ // Criteria:
2770+ // 1 <= ID <= 5 and massless, or ID == 21 --> light jet (typeIdx[0])
2771+ // 4 <= ID <= 6 and massive --> heavy jet (typeIdx[1])
2772+ // All else --> other (typeIdx[2])
2773+ // Note that 'typeIdx' stores indices into 'eventProcess' (after resonance
2774+ // decays are omitted), while 'typeSet' stores indices into the original
2775+ // process record, 'eventProcessOrig', but these indices are also valid
2776+ // in 'event'.
2777+ for (int i = 0; i < 3; i++) {
2778+ typeIdx[i].clear();
2779+ typeSet[i].clear();
2780+ }
2781+ for (int i = 0; i < eventProcess.size(); i++) {
2782+ // Ignore nonfinal and default to 'other'
2783+ if (!eventProcess[i].isFinal()) continue;
2784+ int idx = 2;
2785+
2786+ // Light jets
2787+ if (eventProcess[i].id() == ID_GLUON
2788+ || (eventProcess[i].idAbs() <= ID_BOT
2789+ && abs(eventProcess[i].m()) < ZEROTHRESHOLD)) idx = 0;
2790+
2791+ // Heavy jets
2792+ else if (eventProcess[i].idAbs() >= ID_CHARM
2793+ && eventProcess[i].idAbs() <= ID_TOP) idx = 1;
2794+
2795+ // Store
2796+ typeIdx[idx].push_back(i);
2797+ typeSet[idx].insert(eventProcess[i].daughter1());
2798+ }
2799+
2800+ // Extract partons from hardest subsystem + ISR + FSR only into
2801+ // workEvent. Note no resonance showers or MPIs.
2802+ subEvent(event);
2803+}
2804+
2805+//--------------------------------------------------------------------------
2806+
2807+// Step (2a): pick which particles to pass to the jet algorithm
2808+
2809+inline void JetMatchingAlpgen::jetAlgorithmInput(const Event &event,
2810+ int iType) {
2811+
2812+ // Take input from 'workEvent' and put output in 'workEventJet'
2813+ workEventJet = workEvent;
2814+
2815+ // Loop over particles and decide what to pass to the jet algorithm
2816+ for (int i = 0; i < workEventJet.size(); ++i) {
2817+ if (!workEventJet[i].isFinal()) continue;
2818+
2819+ // jetAllow option to disallow certain particle types
2820+ if (jetAllow == 1) {
2821+
2822+ // Original AG+Py6 algorithm explicitly excludes tops,
2823+ // leptons and photons.
2824+ int id = workEventJet[i].idAbs();
2825+ if ( (id >= ID_LEPMIN && id <= ID_LEPMAX) || id == ID_TOP
2826+ || id == ID_PHOTON) {
2827+ workEventJet[i].statusNeg();
2828+ continue;
2829+ }
2830+ }
2831+
2832+ // Get the index of this particle in original event
2833+ int idx = workEventJet[i].daughter1();
2834+
2835+ // Start with particle idx, and afterwards track mothers
2836+ while (true) {
2837+
2838+ // Light jets
2839+ if (iType == 0) {
2840+
2841+ // Do not include if originates from heavy jet or 'other'
2842+ if (typeSet[1].find(idx) != typeSet[1].end() ||
2843+ typeSet[2].find(idx) != typeSet[2].end()) {
2844+ workEventJet[i].statusNeg();
2845+ break;
2846+ }
2847+
2848+ // Made it to start of event record so done
2849+ if (idx == 0) break;
2850+ // Otherwise next mother and continue
2851+ idx = event[idx].mother1();
2852+
2853+ // Heavy jets
2854+ } else if (iType == 1) {
2855+
2856+ // Only include if originates from heavy jet
2857+ if (typeSet[1].find(idx) != typeSet[1].end()) break;
2858+
2859+ // Made it to start of event record with no heavy jet mother,
2860+ // so DO NOT include particle
2861+ if (idx == 0) {
2862+ workEventJet[i].statusNeg();
2863+ break;
2864+ }
2865+
2866+ // Otherwise next mother and continue
2867+ idx = event[idx].mother1();
2868+
2869+ // Other jets
2870+ } else if (iType == 2) {
2871+
2872+ // Only include if originates from other jet
2873+ if (typeSet[2].find(idx) != typeSet[2].end()) break;
2874+
2875+ // Made it to start of event record with no heavy jet mother,
2876+ // so DO NOT include particle
2877+ if (idx == 0) {
2878+ workEventJet[i].statusNeg();
2879+ break;
2880+ }
2881+
2882+ // Otherwise next mother and continue
2883+ idx = event[idx].mother1();
2884+
2885+ } // if (iType)
2886+ } // while (true)
2887+ } // for (i)
2888+
2889+ // For jetMatch = 2, insert ghost particles corresponding to
2890+ // each hard parton in the original process
2891+ if (jetMatch == 2) {
2892+ for (int i = 0; i < int(typeIdx[iType].size()); i++) {
2893+ // Get y/phi of the parton
2894+ Vec4 pIn = eventProcess[typeIdx[iType][i]].p();
2895+ double y = pIn.rap();
2896+ double phi = pIn.phi();
2897+
2898+ // Create a ghost particle and add to the workEventJet
2899+ double e = GHOSTENERGY;
2900+ double e2y = exp(2. * y);
2901+ double pz = e * (e2y - 1.) / (e2y + 1.);
2902+ double pt = sqrt(e*e - pz*pz);
2903+ double px = pt * cos(phi);
2904+ double py = pt * sin(phi);
2905+ workEventJet.append( ID_GLUON, 99, 0, 0, 0, 0, 0, 0, px, py, pz, e);
2906+
2907+ // Extra check on reconstructed y/phi values. If many warnings
2908+ // of this type, GHOSTENERGY may be set too low.
2909+ if (MATCHINGCHECK) {
2910+ int lastIdx = workEventJet.size() - 1;
2911+ if (abs(y - workEventJet[lastIdx].y()) > ZEROTHRESHOLD ||
2912+ abs(phi - workEventJet[lastIdx].phi()) > ZEROTHRESHOLD)
2913+ errorMsg("Warning in JetMatchingAlpgen:jetAlgorithmInput: "
2914+ "ghost particle y/phi mismatch");
2915+ }
2916+
2917+ } // for (i)
2918+ } // if (jetMatch == 2)
2919+}
2920+
2921+//--------------------------------------------------------------------------
2922+
2923+// Step (2b): run jet algorithm and provide common output
2924+
2925+inline void JetMatchingAlpgen::runJetAlgorithm() {
2926+
2927+ // Run the jet clustering algorithm
2928+ if (jetAlgorithm == 1)
2929+ cellJet->analyze(workEventJet, eTjetMin, coneRadius, eTseed);
2930+ else
2931+ slowJet->analyze(workEventJet);
2932+
2933+ // Extract four-momenta of jets with |eta| < etaJetMax and
2934+ // put into jetMomenta. Note that this is done backwards as
2935+ // jets are removed with SlowJet.
2936+ jetMomenta.clear();
2937+ int iJet = (jetAlgorithm == 1) ? cellJet->size() - 1:
2938+ slowJet->sizeJet() - 1;
2939+ for (int i = iJet; i > -1; i--) {
2940+ Vec4 jetMom = (jetAlgorithm == 1) ? cellJet->pMassive(i) :
2941+ slowJet->p(i);
2942+ double eta = jetMom.eta();
2943+
2944+ if (abs(eta) > etaJetMax) {
2945+ if (jetAlgorithm == 2) slowJet->removeJet(i);
2946+ continue;
2947+ }
2948+ jetMomenta.push_back(jetMom);
2949+ }
2950+
2951+ // Reverse jetMomenta to restore eT/pT ordering
2952+ reverse(jetMomenta.begin(), jetMomenta.end());
2953+}
2954+
2955+//--------------------------------------------------------------------------
2956+
2957+// Step (2c): veto decision (returning true vetoes the event)
2958+
2959+inline bool JetMatchingAlpgen::matchPartonsToJets(int iType) {
2960+
2961+ // Use two different routines for light/heavy jets as
2962+ // different veto conditions and for clarity
2963+ if (iType == 0) return (matchPartonsToJetsLight() > 0);
2964+ else if (iType == 1) return (matchPartonsToJetsHeavy() > 0);
2965+ else if (iType == 2) return false;
2966+ return true;
2967+}
2968+
2969+//--------------------------------------------------------------------------
2970+
2971+// Step(2c): light jets
2972+// Return codes are given indicating the reason for a veto.
2973+// Although not currently used, they are a useful debugging tool:
2974+// 0 = no veto
2975+// 1 = veto as number of jets less than number of partons
2976+// 2 = veto as exclusive mode and number of jets greater than
2977+// number of partons
2978+// 3 = veto as inclusive mode and there would be an extra jet
2979+// that is harder than any matched soft jet
2980+// 4 = veto as there is a parton which does not match a jet
2981+
2982+inline int JetMatchingAlpgen::matchPartonsToJetsLight() {
2983+
2984+ // Always veto if number of jets is less than original number of jets
2985+ if (jetMomenta.size() < typeIdx[0].size()) return LESS_JETS;
2986+ // Veto if in exclusive mode and number of jets bigger than original
2987+ if (exclusive && jetMomenta.size() > typeIdx[0].size()) return MORE_JETS;
2988+
2989+ // Sort partons by eT/pT
2990+ sortTypeIdx(typeIdx[0]);
2991+
2992+ // Number of hard partons
2993+ int nParton = typeIdx[0].size();
2994+
2995+ // Keep track of which jets have been assigned a hard parton
2996+ vector < bool > jetAssigned;
2997+ jetAssigned.assign(jetMomenta.size(), false);
2998+
2999+ // Jet matching procedure: (1) deltaR between partons and jets
3000+ if (jetMatch == 1) {
3001+
3002+ // Loop over light hard partons and get 4-momentum
3003+ for (int i = 0; i < nParton; i++) {
3004+ Vec4 p1 = eventProcess[typeIdx[0][i]].p();
3005+
3006+ // Track which jet has the minimal dR measure with this parton
3007+ int jMin = -1;
3008+ double dRmin = 0.;
3009+
3010+ // Loop over all jets (skipping those already assigned).
3011+ for (int j = 0; j < int(jetMomenta.size()); j++) {
3012+ if (jetAssigned[j]) continue;
3013+
3014+ // DeltaR between parton/jet and store if minimum
3015+ double dR = (jetAlgorithm == 1)
3016+ ? REtaPhi(p1, jetMomenta[j]) : RRapPhi(p1, jetMomenta[j]);
3017+ if (jMin < 0 || dR < dRmin) {
3018+ dRmin = dR;
3019+ jMin = j;
3020+ }
3021+ } // for (j)
3022+
3023+ // Check for jet-parton match
3024+ if (jMin >= 0 && dRmin < coneRadius * coneMatchLight) {
3025+
3026+ // If the matched jet is not one of the nParton hardest jets,
3027+ // the extra left over jet would be harder than some of the
3028+ // matched jets. This is disallowed, so veto.
3029+ if (jMin >= nParton) return HARD_JET;
3030+
3031+ // Mark jet as assigned.
3032+ jetAssigned[jMin] = true;
3033+
3034+ // If no match, then event will be vetoed in all cases
3035+ } else return UNMATCHED_PARTON;
3036+
3037+ } // for (i)
3038+
3039+ // Jet matching procedure: (2) ghost particles in SlowJet
3040+ } else {
3041+
3042+ // Loop over added 'ghost' particles and find if assigned to a jet
3043+ for (int i = workEventJet.size() - nParton;
3044+ i < workEventJet.size(); i++) {
3045+ int jMin = slowJet->jetAssignment(i);
3046+
3047+ // Veto if:
3048+ // 1) not one of nParton hardest jets
3049+ // 2) not assigned to a jet
3050+ // 3) jet has already been assigned
3051+ if (jMin >= nParton) return HARD_JET;
3052+ if (jMin < 0 || jetAssigned[jMin]) return UNMATCHED_PARTON;
3053+
3054+ // Mark jet as assigned
3055+ jetAssigned[jMin] = true;
3056+
3057+ } // for (i)
3058+ } // if (jetMatch)
3059+
3060+ // Minimal eT/pT (CellJet/SlowJet) of matched light jets. Needed
3061+ // later for heavy jet vetos in inclusive mode.
3062+ if (nParton > 0)
3063+ eTpTlightMin = (jetAlgorithm == 1) ? jetMomenta[nParton - 1].eT()
3064+ : jetMomenta[nParton - 1].pT();
3065+ else
3066+ eTpTlightMin = -1.;
3067+
3068+ // No veto
3069+ return NONE;
3070+}
3071+
3072+//--------------------------------------------------------------------------
3073+
3074+// Step(2c): heavy jets
3075+// Return codes are given indicating the reason for a veto.
3076+// Although not currently used, they are a useful debugging tool:
3077+// 0 = no veto as there are no extra jets present
3078+// 1 = veto as in exclusive mode and extra jets present
3079+// 2 = veto as in inclusive mode and extra jets were harder
3080+// than any matched light jet
3081+
3082+inline int JetMatchingAlpgen::matchPartonsToJetsHeavy() {
3083+
3084+ // If there are no extra jets, then accept
3085+ if (jetMomenta.empty()) return NONE;
3086+
3087+ // Number of hard partons
3088+ int nParton = typeIdx[1].size();
3089+
3090+ // Remove jets that are close to heavy quarks
3091+ set < int > removeJets;
3092+
3093+ // Jet matching procedure: (1) deltaR between partons and jets
3094+ if (jetMatch == 1) {
3095+
3096+ // Loop over heavy hard partons and get 4-momentum
3097+ for (int i = 0; i < nParton; i++) {
3098+ Vec4 p1 = eventProcess[typeIdx[1][i]].p();
3099+
3100+ // Loop over all jets, find dR and mark for removal if match
3101+ for (int j = 0; j < int(jetMomenta.size()); j++) {
3102+ double dR = (jetAlgorithm == 1) ?
3103+ REtaPhi(p1, jetMomenta[j]) : RRapPhi(p1, jetMomenta[j]);
3104+ if (dR < coneRadiusHeavy * coneMatchHeavy)
3105+ removeJets.insert(j);
3106+
3107+ } // for (j)
3108+ } // for (i)
3109+
3110+ // Jet matching procedure: (2) ghost particles in SlowJet
3111+ } else {
3112+
3113+ // Loop over added 'ghost' particles and if assigned to a jet
3114+ // then mark this jet for removal
3115+ for (int i = workEventJet.size() - nParton;
3116+ i < workEventJet.size(); i++) {
3117+ int jMin = slowJet->jetAssignment(i);
3118+ if (jMin >= 0) removeJets.insert(jMin);
3119+ }
3120+
3121+ }
3122+
3123+ // Remove jets (backwards order to not disturb indices)
3124+ for (set < int >::reverse_iterator it = removeJets.rbegin();
3125+ it != removeJets.rend(); it++)
3126+ jetMomenta.erase(jetMomenta.begin() + *it);
3127+
3128+ // Handle case if there are still extra jets
3129+ if (!jetMomenta.empty()) {
3130+
3131+ // Exclusive mode, so immediate veto
3132+ if (exclusive) return MORE_JETS;
3133+
3134+ // Inclusive mode; extra jets must be softer than any matched light jet
3135+ else if (eTpTlightMin >= 0.)
3136+ for (size_t j = 0; j < jetMomenta.size(); j++) {
3137+ // CellJet uses eT, SlowJet uses pT
3138+ if ( (jetAlgorithm == 1 && jetMomenta[j].eT() > eTpTlightMin) ||
3139+ (jetAlgorithm == 2 && jetMomenta[j].pT() > eTpTlightMin) )
3140+ return HARD_JET;
3141+ }
3142+
3143+ } // if (!jetMomenta.empty())
3144+
3145+ // No extra jets were present so no veto
3146+ return NONE;
3147+}
3148+
3149+//==========================================================================
3150+
3151+// Main implementation of Madgraph UserHooks class.
3152+// This may be split out to a separate C++ file if desired,
3153+// but currently included here for ease of use.
3154+
3155+//--------------------------------------------------------------------------
3156+
3157+// Initialisation routine automatically called from Pythia::init().
3158+// Setup all parts needed for the merging.
3159+
3160+inline bool JetMatchingMadgraph::initAfterBeams() {
3161+
3162+ // Initialise values for stored jet matching veto inputs.
3163+ pTfirstSave = -1.;
3164+ processSubsetSave.init("(eventProcess)", particleDataPtr);
3165+ workEventJetSave.init("(workEventJet)", particleDataPtr);
3166+
3167+ // Read in Madgraph specific configuration variables
3168+ bool setMad = settingsPtr->flag("JetMatching:setMad");
3169+
3170+ // If Madgraph parameters are present, then parse in MadgraphPar object
3171+ MadgraphPar par;
3172+ string parStr = infoPtr->header("MGRunCard");
3173+ if (!parStr.empty()) {
3174+ par.parse(parStr);
3175+ par.printParams();
3176+ }
3177+
3178+ // Set Madgraph merging parameters from the file if requested
3179+ if (setMad) {
3180+ if ( par.haveParam("xqcut") && par.haveParam("maxjetflavor")
3181+ && par.haveParam("alpsfact") && par.haveParam("ickkw") ) {
3182+ settingsPtr->flag("JetMatching:merge", par.getParam("ickkw"));
3183+ settingsPtr->parm("JetMatching:qCut", par.getParam("xqcut"));
3184+ settingsPtr->mode("JetMatching:nQmatch",
3185+ par.getParamAsInt("maxjetflavor"));
3186+ settingsPtr->parm("JetMatching:clFact",
3187+ clFact = par.getParam("alpsfact"));
3188+ if (par.getParamAsInt("ickkw") == 0)
3189+ errorMsg("Error in JetMatchingMadgraph:init: "
3190+ "Madgraph file parameters are not set for merging");
3191+
3192+ // Warn if setMad requested, but one or more parameters not present
3193+ } else {
3194+ errorMsg("Warning in JetMatchingMadgraph:init: "
3195+ "Madgraph merging parameters not found");
3196+ if (!par.haveParam("xqcut")) errorMsg("Warning in "
3197+ "JetMatchingMadgraph:init: No xqcut");
3198+ if (!par.haveParam("ickkw")) errorMsg("Warning in "
3199+ "JetMatchingMadgraph:init: No ickkw");
3200+ if (!par.haveParam("maxjetflavor")) errorMsg("Warning in "
3201+ "JetMatchingMadgraph:init: No maxjetflavor");
3202+ if (!par.haveParam("alpsfact")) errorMsg("Warning in "
3203+ "JetMatchingMadgraph:init: No alpsfact");
3204+ }
3205+ }
3206+
3207+ // Read in FxFx matching parameters
3208+ doFxFx = settingsPtr->flag("JetMatching:doFxFx");
3209+ nPartonsNow = settingsPtr->mode("JetMatching:nPartonsNow");
3210+ qCutME = settingsPtr->parm("JetMatching:qCutME");
3211+ qCutMESq = pow(qCutME,2);
3212+
3213+ // Read in Madgraph merging parameters
3214+ doMerge = settingsPtr->flag("JetMatching:merge");
3215+ doShowerKt = settingsPtr->flag("JetMatching:doShowerKt");
3216+ qCut = settingsPtr->parm("JetMatching:qCut");
3217+ nQmatch = settingsPtr->mode("JetMatching:nQmatch");
3218+ clFact = settingsPtr->parm("JetMatching:clFact");
3219+
3220+ // Read in jet algorithm parameters
3221+ jetAlgorithm = settingsPtr->mode("JetMatching:jetAlgorithm");
3222+ nJetMax = settingsPtr->mode("JetMatching:nJetMax");
3223+ eTjetMin = settingsPtr->parm("JetMatching:eTjetMin");
3224+ coneRadius = settingsPtr->parm("JetMatching:coneRadius");
3225+ etaJetMax = settingsPtr->parm("JetMatching:etaJetMax");
3226+ slowJetPower = settingsPtr->mode("JetMatching:slowJetPower");
3227+
3228+ // Matching procedure
3229+ jetAllow = settingsPtr->mode("JetMatching:jetAllow");
3230+ exclusiveMode = settingsPtr->mode("JetMatching:exclusive");
3231+ qCutSq = pow(qCut,2);
3232+ etaJetMaxAlgo = etaJetMax;
3233+
3234+ // Read if veto should be performed internally.
3235+ performVeto = settingsPtr->flag("JetMatching:doVeto");
3236+
3237+ // If not merging, then done
3238+ if (!doMerge) return true;
3239+
3240+ // Exclusive mode; if set to 2, then set based on nJet/nJetMax
3241+ if (exclusiveMode == 2) {
3242+
3243+ // No nJet or nJetMax, so default to exclusive mode
3244+ if (nJetMax < 0) {
3245+ errorMsg("Warning in JetMatchingMadgraph:init: "
3246+ "missing jet multiplicity information; running in exclusive mode");
3247+ exclusiveMode = 1;
3248+ }
3249+ }
3250+
3251+ // Initialise chosen jet algorithm.
3252+ // Currently, this only supports the kT-algorithm in SlowJet.
3253+ // Use the QCD distance measure by default.
3254+ jetAlgorithm = 2;
3255+ slowJetPower = 1;
3256+ slowJet = new SlowJet(slowJetPower, coneRadius, eTjetMin,
3257+ etaJetMaxAlgo, 2, 2, NULL, false);
3258+
3259+ // For FxFx, also initialise jet algorithm to define matrix element jets.
3260+ // Currently, this only supports the kT-algorithm in SlowJet.
3261+ // Use the QCD distance measure by default.
3262+ slowJetHard = new SlowJet(slowJetPower, coneRadius, qCutME,
3263+ etaJetMaxAlgo, 2, 2, NULL, false);
3264+
3265+ // To access the DJR's
3266+ slowJetDJR = new SlowJet(slowJetPower, coneRadius, qCutME,
3267+ etaJetMaxAlgo, 2, 2, NULL, false);
3268+
3269+ // A special version of SlowJet to handle heavy and other partons
3270+ hjSlowJet = new HJSlowJet(slowJetPower, coneRadius, 0.0,
3271+ 100.0, 1, 2, NULL, false, true);
3272+
3273+ // Setup local event records
3274+ eventProcessOrig.init("(eventProcessOrig)", particleDataPtr);
3275+ eventProcess.init("(eventProcess)", particleDataPtr);
3276+ workEventJet.init("(workEventJet)", particleDataPtr);
3277+
3278+ // Print information
3279+ string jetStr = (jetAlgorithm == 1) ? "CellJet" :
3280+ (slowJetPower == -1) ? "anti-kT" :
3281+ (slowJetPower == 0) ? "C/A" :
3282+ (slowJetPower == 1) ? "kT" : "unknown";
3283+ string modeStr = (exclusiveMode) ? "exclusive" : "inclusive";
3284+ cout << endl
3285+ << " *----- Madgraph matching parameters -----*" << endl
3286+ << " | qCut | " << setw(14)
3287+ << qCut << " |" << endl
3288+ << " | nQmatch | " << setw(14)
3289+ << nQmatch << " |" << endl
3290+ << " | clFact | " << setw(14)
3291+ << clFact << " |" << endl
3292+ << " | Jet algorithm | " << setw(14)
3293+ << jetStr << " |" << endl
3294+ << " | eTjetMin | " << setw(14)
3295+ << eTjetMin << " |" << endl
3296+ << " | etaJetMax | " << setw(14)
3297+ << etaJetMax << " |" << endl
3298+ << " | jetAllow | " << setw(14)
3299+ << jetAllow << " |" << endl
3300+ << " | Mode | " << setw(14)
3301+ << modeStr << " |" << endl
3302+ << " *-----------------------------------------*" << endl;
3303+
3304+ return true;
3305+}
3306+
3307+//--------------------------------------------------------------------------
3308+
3309+// Process level vetos
3310+
3311+inline bool JetMatchingMadgraph::doVetoProcessLevel(Event& process) {
3312+
3313+ eventProcessOrig = process;
3314+
3315+ // Setup for veto if hard ME has too many partons.
3316+ // This is done to achieve consistency with the Pythia6 implementation.
3317+
3318+ // Clear the event of MPI systems and resonace decay products. Store trimmed
3319+ // event in workEvent.
3320+ sortIncomingProcess(process);
3321+
3322+ // Veto in case the hard input matrix element already has too many partons.
3323+ if ( !doFxFx && int(typeIdx[0].size()) > nJetMax )
3324+ return true;
3325+ if ( doFxFx && npNLO() < nJetMax && int(typeIdx[0].size()) > nJetMax )
3326+ return true;
3327+
3328+ // Done
3329+ return false;
3330+
3331+}
3332+
3333+//--------------------------------------------------------------------------
3334+
3335+inline bool JetMatchingMadgraph::doVetoStep(int iPos, int nISR, int nFSR,
3336+ const Event& event) {
3337+
3338+ // Do not perform any veto if not in the Shower-kT scheme.
3339+ if ( !doShowerKt ) return false;
3340+
3341+ // Do nothing for emissions after the first one.
3342+ if ( nISR + nFSR > 1 ) return false;
3343+
3344+ // Do nothing in resonance decay showers.
3345+ if (iPos == 5) return false;
3346+
3347+ // Clear the event of MPI systems and resonace decay products. Store trimmed
3348+ // event in workEvent.
3349+ sortIncomingProcess(event);
3350+
3351+ // Get (kinematical) pT of first emission
3352+ double pTfirst = 0.;
3353+
3354+ // Get weak bosons, for later checks if the emission is a "QCD emission".
3355+ vector<int> weakBosons;
3356+ for (int i = 0; i < event.size(); i++) {
3357+ if ( event[i].id() == 22
3358+ && event[i].id() == 23
3359+ && event[i].idAbs() == 24)
3360+ weakBosons.push_back(i);
3361+ }
3362+
3363+ for (int i = workEvent.size()-1; i > 0; --i) {
3364+ if ( workEvent[i].isFinal() && workEvent[i].colType() != 0
3365+ && (workEvent[i].statusAbs() == 43 || workEvent[i].statusAbs() == 51)) {
3366+ // Check if any of the EW bosons are ancestors of this parton. This
3367+ // should never happen for the first non-resonance shower emission.
3368+ // Check just to be sure.
3369+ bool QCDemission = true;
3370+ // Get position of this parton in the actual event (workEvent does
3371+ // not contain right mother-daughter relations). Stored in daughters.
3372+ int iPosOld = workEvent[i].daughter1();
3373+ for (int j = 0; i < int(weakBosons.size()); ++i)
3374+ if ( event[iPosOld].isAncestor(j)) {
3375+ QCDemission = false;
3376+ break;
3377+ }
3378+ // Done for a QCD emission.
3379+ if (QCDemission){
3380+ pTfirst = workEvent[i].pT();
3381+ break;
3382+ }
3383+ }
3384+ }
3385+
3386+ // Store things that are necessary to perform the shower-kT veto externally.
3387+ pTfirstSave = pTfirst;
3388+ // Done if only inputs for an external vetoing procedure should be stored.
3389+ if (!performVeto) return false;
3390+
3391+ // Check veto.
3392+ if ( doShowerKtVeto(pTfirst) ) return true;
3393+
3394+ // No veto if come this far.
3395+ return false;
3396+
3397+}
3398+
3399+//--------------------------------------------------------------------------
3400+
3401+inline bool JetMatchingMadgraph::doShowerKtVeto(double pTfirst) {
3402+
3403+ // Only check veto in the shower-kT scheme.
3404+ if ( !doShowerKt ) return false;
3405+
3406+ // Reset veto code
3407+ bool doVeto = false;
3408+
3409+ // Find the (kinematical) pT of the softest (light) parton in the hard
3410+ // process.
3411+ int nParton = typeIdx[0].size();
3412+ double pTminME=1e10;
3413+ for ( int i = 0; i < nParton; ++i)
3414+ pTminME = min(pTminME,eventProcess[typeIdx[0][i]].pT());
3415+
3416+ // Veto if the softest hard process parton is below Qcut.
3417+ if ( nParton > 0 && pow(pTminME,2) < qCutSq ) doVeto = true;
3418+
3419+ // For non-highest multiplicity, veto if the hardest emission is harder
3420+ // than Qcut.
3421+ if ( exclusive && pow(pTfirst,2) > qCutSq ) {
3422+ doVeto = true;
3423+ // For highest multiplicity sample, veto if the hardest emission is harder
3424+ // than the hard process parton.
3425+ } else if ( !exclusive && nParton > 0 && pTfirst > pTminME ) {
3426+ doVeto = true;
3427+ }
3428+
3429+ // Return veto
3430+ return doVeto;
3431+
3432+}
3433+
3434+//--------------------------------------------------------------------------
3435+
3436+// Function to set the jet clustering scales (to be used as output)
3437+
3438+inline void JetMatchingMadgraph::setDJR( const Event& event) {
3439+
3440+ // Clear members.
3441+ clearDJR();
3442+ vector<double> result;
3443+
3444+ // Initialize SlowJetDJR jet algorithm with event
3445+ if (!slowJetDJR->setup(event) ) {
3446+ errorMsg("Warning in JetMatchingMadgraph:setDJR"
3447+ ": the SlowJet algorithm failed on setup");
3448+ return;
3449+ }
3450+
3451+ // Cluster in steps to find all hadronic jets
3452+ while ( slowJetDJR->sizeAll() - slowJetDJR->sizeJet() > 0 ) {
3453+ // Save the next clustering scale.
3454+ result.push_back(sqrt(slowJetDJR->dNext()));
3455+ // Perform step.
3456+ slowJetDJR->doStep();
3457+ }
3458+
3459+ // Save clustering scales in reserve order.
3460+ for (int i=int(result.size())-1; i >= 0; --i)
3461+ DJR.push_back(result[i]);
3462+
3463+}
3464+
3465+//--------------------------------------------------------------------------
3466+
3467+// Function to get the current number of partons in the Born state, as
3468+// read from LHE.
3469+
3470+inline int JetMatchingMadgraph::npNLO(){
3471+ string npIn = infoPtr->getEventAttribute("npNLO",true);
3472+ int np = (npIn != "") ? atoi((char*)npIn.c_str()) : -1;
3473+ if ( np < 0 ) { ; }
3474+ else return np;
3475+ return nPartonsNow;
3476+}
3477+
3478+//--------------------------------------------------------------------------
3479+
3480+// Step (1): sort the incoming particles
3481+
3482+inline void JetMatchingMadgraph::sortIncomingProcess(const Event &event) {
3483+
3484+ // Remove resonance decays from original process and keep only final
3485+ // state. Resonances will have positive status code after this step.
3486+ omitResonanceDecays(eventProcessOrig, true);
3487+ clearDJR();
3488+ clear_nMEpartons();
3489+
3490+ // Step-FxFx-1: remove preclustering from FxFx
3491+
3492+ /*
3493+
3494+ // For FxFx, pre-cluster partons in the event into jets.
3495+ if (doFxFx) {
3496+
3497+ // Get final state partons
3498+ eventProcess.clear();
3499+ workEventJet.clear();
3500+ for( int i=0; i < workEvent.size(); ++i) {
3501+ // Original AG+Py6 algorithm explicitly excludes tops,
3502+ // leptons and photons.
3503+ int id = workEvent[i].idAbs();
3504+ if ((id >= ID_LEPMIN && id <= ID_LEPMAX) || id == ID_TOP
3505+ || id == ID_PHOTON || id == 23 || id == 24 || id == 25) {
3506+ eventProcess.append(workEvent[i]);
3507+ } else {
3508+ workEventJet.append(workEvent[i]);
3509+ }
3510+ }
3511+
3512+ // Initialize SlowJetHard jet algorithm with current working event
3513+ if (!slowJetHard->setup(workEventJet) ) {
3514+ errorMsg("Warning in JetMatchingMadgraph:sortIncomingProcess"
3515+ ": the SlowJet algorithm failed on setup");
3516+ return;
3517+ }
3518+
3519+ // Get matrix element cut scale.
3520+ double localQcutSq = qCutMESq;
3521+ // Cluster in steps to find all hadronic jets at the scale qCutME
3522+ while ( slowJetHard->sizeAll() - slowJetHard->sizeJet() > 0 ) {
3523+ // Done if next step is above qCut
3524+ if( slowJetHard->dNext() > localQcutSq ) break;
3525+ // Done if we're at or below the number of partons in the Born state.
3526+ if( slowJetHard->sizeAll()-slowJetHard->sizeJet() <= npNLO()) break;
3527+ slowJetHard->doStep();
3528+ }
3529+
3530+ // Construct a master copy of the event containing only the
3531+ // hardest nPartonsNow hadronic clusters. While constructing the event,
3532+ // the parton type (ID_GLUON) and status (98,99) are arbitrary.
3533+ int nJets = slowJetHard->sizeJet();
3534+ int nClus = slowJetHard->sizeAll();
3535+ int nNow = 0;
3536+ for (int i = nJets; i < nClus; ++i) {
3537+ vector<int> parts;
3538+ if (i < nClus-nJets) parts = slowJetHard->clusConstituents(i);
3539+ else parts = slowJetHard->constituents(nClus-nJets-i);
3540+ int flavour = ID_GLUON;
3541+ for(int j=0; j < int(parts.size()); ++j)
3542+ if (workEventJet[parts[j]].id() == ID_BOT)
3543+ flavour = ID_BOT;
3544+ eventProcess.append( flavour, 98,
3545+ workEventJet[parts.back()].mother1(),
3546+ workEventJet[parts.back()].mother2(),
3547+ workEventJet[parts.back()].daughter1(),
3548+ workEventJet[parts.back()].daughter2(),
3549+ 0, 0, slowJetHard->p(i).px(), slowJetHard->p(i).py(),
3550+ slowJetHard->p(i).pz(), slowJetHard->p(i).e() );
3551+ nNow++;
3552+ }
3553+
3554+ // Done. Clean-up
3555+ workEventJet.clear();
3556+
3557+ */
3558+
3559+ // Step-FxFx-2: : set the same eventProcess for both MLM and FxFx. This was only for MLM
3560+ // Add the type 2 selection also for FxFx
3561+
3562+ // For MLM matching, simply take hard process state from workEvent,
3563+ // without any preclustering.
3564+ //} else {
3565+ eventProcess = workEvent;
3566+ //}
3567+
3568+ // Sort original process final state into light/heavy jets and 'other'.
3569+ // Criteria:
3570+ // 1 <= ID <= nQmatch, or ID == 21 --> light jet (typeIdx[0])
3571+ // nQMatch < ID --> heavy jet (typeIdx[1])
3572+ // All else that is colored --> other (typeIdx[2])
3573+ // Note that 'typeIdx' stores indices into 'eventProcess' (after resonance
3574+ // decays are omitted), while 'typeSet' stores indices into the original
3575+ // process record, 'eventProcessOrig', but these indices are also valid
3576+ // in 'event'.
3577+ for (int i = 0; i < 3; i++) {
3578+ typeIdx[i].clear();
3579+ typeSet[i].clear();
3580+ origTypeIdx[i].clear();
3581+ }
3582+ for (int i = 0; i < eventProcess.size(); i++) {
3583+ // Ignore non-final state and default to 'other'
3584+ if (!eventProcess[i].isFinal()) continue;
3585+ int idx = -1;
3586+ int orig_idx = -1;
3587+
3588+ // Light jets: all gluons and quarks with id less than or equal to nQmatch
3589+ if (eventProcess[i].isGluon()
3590+ || (eventProcess[i].idAbs() <= nQmatch) ) {
3591+ orig_idx = 0;
3592+ if (doFxFx) {
3593+ // Crucial point FxFx: MG5 puts the scale of a not-to-be-matched quark 1 MeV lower than scalup. For
3594+ // such particles, we should keep the default "2"
3595+ idx = ( trunc(1000. * eventProcess[i].scale()) == trunc(1000. * infoPtr->scalup()) ) ? 0 : 2;
3596+
3597+ }
3598+ else {
3599+ // Crucial point: MG puts the scale of a non-QCD particle to eCM. For
3600+ // such particles, we should keep the default "2"
3601+ idx = ( eventProcess[i].scale() < 1.999 * sqrt(infoPtr->eA()
3602+ * infoPtr->eB()) ) ? 0 : 2;
3603+ }
3604+ }
3605+
3606+ // Heavy jets: all quarks with id greater than nQmatch
3607+ else if (eventProcess[i].idAbs() > nQmatch
3608+ && eventProcess[i].idAbs() <= ID_TOP) {
3609+ idx = 1;
3610+ orig_idx = 1;
3611+ // Update to include non-SM colored particles
3612+ } else if (eventProcess[i].colType() != 0
3613+ && eventProcess[i].idAbs() > ID_TOP) {
3614+ idx = 1;
3615+ orig_idx = 1;
3616+ }
3617+ if( idx < 0 ) continue;
3618+ // Store
3619+ typeIdx[idx].push_back(i);
3620+ typeSet[idx].insert(eventProcess[i].daughter1());
3621+ origTypeIdx[orig_idx].push_back(i);
3622+ }
3623+
3624+ // Exclusive mode; if set to 2, then set based on nJet/nJetMax
3625+ if (exclusiveMode == 2) {
3626+
3627+ // Inclusive if nJet == nJetMax, exclusive otherwise
3628+ int nParton = origTypeIdx[0].size();
3629+ exclusive = (nParton == nJetMax) ? false : true;
3630+
3631+ // Otherwise, just set as given
3632+ } else {
3633+ exclusive = (exclusiveMode == 0) ? false : true;
3634+ }
3635+
3636+ // Extract partons from hardest subsystem + ISR + FSR only into
3637+ // workEvent. Note no resonance showers or MPIs.
3638+ subEvent(event);
3639+
3640+ // Store things that are necessary to perform the kT-MLM veto externally.
3641+ int nParton = typeIdx[0].size();
3642+ processSubsetSave.clear();
3643+ for ( int i = 0; i < nParton; ++i)
3644+ processSubsetSave.append( eventProcess[typeIdx[0][i]] );
3645+
3646+}
3647+
3648+//--------------------------------------------------------------------------
3649+
3650+// Step (2a): pick which particles to pass to the jet algorithm
3651+
3652+inline void JetMatchingMadgraph::jetAlgorithmInput(const Event &event,
3653+ int iType) {
3654+
3655+ // Take input from 'workEvent' and put output in 'workEventJet'
3656+ workEventJet = workEvent;
3657+
3658+ // Loop over particles and decide what to pass to the jet algorithm
3659+ for (int i = 0; i < workEventJet.size(); ++i) {
3660+ if (!workEventJet[i].isFinal()) continue;
3661+
3662+ // jetAllow option to disallow certain particle types
3663+ if (jetAllow == 1) {
3664+ // Remove all non-QCD partons from veto list
3665+ if( workEventJet[i].colType() == 0 ) {
3666+ workEventJet[i].statusNeg();
3667+ continue;
3668+ }
3669+ }
3670+
3671+ // Get the index of this particle in original event
3672+ int idx = workEventJet[i].daughter1();
3673+
3674+ // Start with particle idx, and afterwards track mothers
3675+ while (true) {
3676+
3677+ // Light jets
3678+ if (iType == 0) {
3679+
3680+ // Do not include if originates from heavy jet or 'other'
3681+ if (typeSet[1].find(idx) != typeSet[1].end() ||
3682+ typeSet[2].find(idx) != typeSet[2].end()) {
3683+ workEventJet[i].statusNeg();
3684+ break;
3685+ }
3686+
3687+ // Made it to start of event record so done
3688+ if (idx == 0) break;
3689+ // Otherwise next mother and continue
3690+ idx = event[idx].mother1();
3691+
3692+ // Heavy jets
3693+ } else if (iType == 1) {
3694+
3695+ // Only include if originates from heavy jet
3696+ if (typeSet[1].find(idx) != typeSet[1].end()) break;
3697+
3698+ // Made it to start of event record with no heavy jet mother,
3699+ // so DO NOT include particle
3700+ if (idx == 0) {
3701+ workEventJet[i].statusNeg();
3702+ break;
3703+ }
3704+
3705+ // Otherwise next mother and continue
3706+ idx = event[idx].mother1();
3707+
3708+ // Other jets
3709+ } else if (iType == 2) {
3710+
3711+ // Only include if originates from other jet
3712+ if (typeSet[2].find(idx) != typeSet[2].end()) break;
3713+
3714+ // Made it to start of event record with no heavy jet mother,
3715+ // so DO NOT include particle
3716+ if (idx == 0) {
3717+ workEventJet[i].statusNeg();
3718+ break;
3719+ }
3720+
3721+ // Otherwise next mother and continue
3722+ idx = event[idx].mother1();
3723+
3724+ } // if (iType)
3725+ } // while (true)
3726+ } // for (i)
3727+}
3728+
3729+//--------------------------------------------------------------------------
3730+
3731+// Step (2b): run jet algorithm and provide common output
3732+// This does nothing, because the jet algorithm is run several times
3733+// in the matching algorithm.
3734+
3735+inline void JetMatchingMadgraph::runJetAlgorithm() {; }
3736+
3737+//--------------------------------------------------------------------------
3738+
3739+// Step (2c): veto decision (returning true vetoes the event)
3740+
3741+inline bool JetMatchingMadgraph::matchPartonsToJets(int iType) {
3742+
3743+ // Use different routines for light/heavy/other jets as
3744+ // different veto conditions and for clarity
3745+ if (iType == 0) {
3746+ // Record the jet separations here, also if matchPartonsToJetsLight
3747+ // returns preemptively.
3748+ setDJR(workEventJet);
3749+ set_nMEpartons(origTypeIdx[0].size(), typeIdx[0].size());
3750+ // Perform jet matching.
3751+ return (matchPartonsToJetsLight() > 0);
3752+ } else if (iType == 1) {
3753+ return (matchPartonsToJetsHeavy() > 0);
3754+ } else {
3755+ return (matchPartonsToJetsOther() > 0);
3756+ }
3757+
3758+}
3759+
3760+//--------------------------------------------------------------------------
3761+
3762+// Step(2c): light jets
3763+// Return codes are given indicating the reason for a veto.
3764+// Although not currently used, they are a useful debugging tool:
3765+// 0 = no veto
3766+// 1 = veto as number of jets less than number of partons
3767+// 2 = veto as exclusive mode and number of jets greater than
3768+// number of partons
3769+// 3 = veto as inclusive mode and there would be an extra jet
3770+// that is harder than any matched soft jet
3771+// 4 = veto as there is a parton which does not match a jet
3772+
3773+inline int JetMatchingMadgraph::matchPartonsToJetsLight() {
3774+
3775+ // Store things that are necessary to perform the kT-MLM veto externally.
3776+ workEventJetSave = workEventJet;
3777+ // Done if only inputs for an external vetoing procedure should be stored.
3778+ if (!performVeto) return false;
3779+
3780+ // Count the number of hard partons
3781+ int nParton = typeIdx[0].size();
3782+
3783+ // Initialize SlowJet with current working event
3784+ if (!slowJet->setup(workEventJet) ) {
3785+ errorMsg("Warning in JetMatchingMadgraph:matchPartonsToJets"
3786+ "Light: the SlowJet algorithm failed on setup");
3787+ return NONE;
3788+ }
3789+ double localQcutSq = qCutSq;
3790+ double dOld = 0.0;
3791+ // Cluster in steps to find all hadronic jets at the scale qCut
3792+ while ( slowJet->sizeAll() - slowJet->sizeJet() > 0 ) {
3793+ if( slowJet->dNext() > localQcutSq ) break;
3794+ dOld = slowJet->dNext();
3795+ slowJet->doStep();
3796+ }
3797+ int nJets = slowJet->sizeJet();
3798+ int nClus = slowJet->sizeAll();
3799+
3800+ // Debug printout.
3801+ if (MATCHINGDEBUG) slowJet->list(true);
3802+
3803+ // Count of the number of hadronic jets in SlowJet accounting
3804+ int nCLjets = nClus - nJets;
3805+ // Get number of partons. Different for MLM and FxFx schemes.
3806+ //int nRequested = (doFxFx) ? npNLO() : nParton;
3807+ //Step-FxFx-3: Change nRequested subtracting the typeIdx[2] partons
3808+ //Exclude the highest multiplicity sample in the case of real emissions and all typeIdx[2]
3809+ //npNLO=multiplicity,nJetMax=njmax(shower_card),typeIdx[2]="Weak" jets
3810+ int nRequested = (doFxFx && !(npNLO()==nJetMax && npNLO()==(typeIdx[2].size()-1) )) ? npNLO()-typeIdx[2].size() : nParton;
3811+
3812+ //Step-FxFx-4:For FxFx veto the real emissions that have only typeIdx=2 partons
3813+ //From Step-FxFx-3 they already have negative nRequested, so this step may not be necessary
3814+ //Exclude the highest multiplicity sample
3815+ if (doFxFx && npNLO()<nJetMax && typeIdx[2].size()>0 && npNLO()==(typeIdx[2].size()-1)) {
3816+ return MORE_JETS;
3817+ }
3818+//----------------
3819+ //Exclude all Weak Jets for matching
3820+ //if (doFxFx && typeIdx[2].size()>0) {
3821+ // return MORE_JETS;
3822+ //} // 2A
3823+ //keep only Weak Jets for matching
3824+ //if (doFxFx && typeIdx[2].size()==0) {
3825+ // return MORE_JETS;
3826+ //} // 2B
3827+ //keep only lowest multiplicity sample @0
3828+ //if (doFxFx && npNLO()==1) {
3829+ // return MORE_JETS;
3830+ //} // 2C
3831+ //keep only highest multiplicity sample @1
3832+ //if (doFxFx && npNLO()==0) {
3833+ // return MORE_JETS;
3834+ //} // 2D
3835+//--------------
3836+ // Veto event if too few hadronic jets
3837+ if ( nCLjets < nRequested ) return LESS_JETS;
3838+
3839+ // In exclusive mode, do not allow more hadronic jets than partons
3840+ if ( exclusive && !doFxFx ) {
3841+ if ( nCLjets > nRequested ) return MORE_JETS;
3842+ } else {
3843+
3844+ // For FxFx, in the non-highest multipicity, all jets need to matched to
3845+ // partons. For nCLjets > nRequested, this is not possible. Hence, we can
3846+ // veto here already.
3847+ // if ( doFxFx && nRequested < nJetMax && nCLjets > nRequested )
3848+ //Step-FxFx-5:Change the nRequested to npNLO() in the first condition
3849+ //Before in Step-FxFx-3 it was nRequested=npNLO() for FxFx
3850+ //This way we correctly select the non-highest multipicity regardless the nRequested
3851+ if ( doFxFx && npNLO() < nJetMax && nCLjets > nRequested )
3852+ return MORE_JETS;
3853+
3854+ // Now continue in inclusive mode.
3855+ // In inclusive mode, there can be more hadronic jets than partons,
3856+ // provided that all partons are properly matched to hadronic jets.
3857+ // Start by setting up the jet algorithm.
3858+ if (!slowJet->setup(workEventJet) ) {
3859+ errorMsg("Warning in JetMatchingMadgraph:matchPartonsToJets"
3860+ "Light: the SlowJet algorithm failed on setup");
3861+ return NONE;
3862+ }
3863+
3864+ // For FxFx, continue clustering as long as the jet separation is above
3865+ // qCut.
3866+ if (doFxFx) {
3867+ while ( slowJet->sizeAll() - slowJet->sizeJet() > 0 ) {
3868+ if( slowJet->dNext() > localQcutSq ) break;
3869+ slowJet->doStep();
3870+ }
3871+ // For MLM, cluster into hadronic jets until there are the same number as
3872+ // partons.
3873+ } else {
3874+ while ( slowJet->sizeAll() - slowJet->sizeJet() > nParton )
3875+ slowJet->doStep();
3876+ }
3877+
3878+ // Sort partons in pT. Update local qCut value.
3879+ // Hadronic jets are already sorted in pT.
3880+ localQcutSq = dOld;
3881+ if ( clFact >= 0. && nParton > 0 ) {
3882+ vector<double> partonPt;
3883+ for (int i = 0; i < nParton; ++i)
3884+ partonPt.push_back( eventProcess[typeIdx[0][i]].pT2() );
3885+ sort( partonPt.begin(), partonPt.end());
3886+ localQcutSq = max( qCutSq, partonPt[0]);
3887+ }
3888+ nJets = slowJet->sizeJet();
3889+ nClus = slowJet->sizeAll();
3890+ }
3891+ // Update scale if clustering factor is non-zero
3892+ if ( clFact != 0. ) localQcutSq *= pow2(clFact);
3893+
3894+ Event tempEvent;
3895+ tempEvent.init( "(tempEvent)", particleDataPtr);
3896+ int nPass = 0;
3897+ double pTminEstimate = -1.;
3898+ // Construct a master copy of the event containing only the
3899+ // hardest nParton hadronic clusters. While constructing the event,
3900+ // the parton type (ID_GLUON) and status (98,99) are arbitrary.
3901+ for (int i = nJets; i < nClus; ++i) {
3902+ tempEvent.append( ID_GLUON, 98, 0, 0, 0, 0, 0, 0, slowJet->p(i).px(),
3903+ slowJet->p(i).py(), slowJet->p(i).pz(), slowJet->p(i).e() );
3904+ ++nPass;
3905+ pTminEstimate = max( pTminEstimate, slowJet->pT(i));
3906+ if(nPass == nRequested) break;
3907+ }
3908+
3909+ int tempSize = tempEvent.size();
3910+ // This keeps track of which hadronic jets are matched to parton
3911+ vector<bool> jetAssigned;
3912+ jetAssigned.assign( tempSize, false);
3913+
3914+ // This keeps track of which partons are matched to which hadronic
3915+ // jets.
3916+ vector< vector<bool> > partonMatchesJet;
3917+ for (int i=0; i < nParton; ++i )
3918+ partonMatchesJet.push_back( vector<bool>(tempEvent.size(),false) );
3919+
3920+ // Begin matching.
3921+ // Do jet matching for FxFx.
3922+ // Make sure that the nPartonsNow hardest hadronic jets are matched to any
3923+ // of the nPartonsNow (+1) partons. This matching is done by attaching a jet
3924+ // from the list of unmatched hadronic jets, and appending a jet from the
3925+ // list of partonic jets, one at a time. The partonic jet will be clustered
3926+ // with the hadronic jet or the beam if the distance measure is below the
3927+ // cut. The hadronic jet is matched once this happens. Otherwise, another
3928+ // partonic jet is tried. When a hadronic jet is matched to a partonic jet,
3929+ // it is removed from the list of unmatched hadronic jets. This process
3930+ // continues until the nPartonsNow hardest hadronic jets are matched to
3931+ // partonic jets, or it is not possible to make a match for a hadronic jet.
3932+ int iNow = 0;
3933+ int nMatched = 0;
3934+ while ( doFxFx && iNow < tempSize ) {
3935+
3936+ // Check if this shower jet matches any partonic jet.
3937+ Event tempEventJet;
3938+ tempEventJet.init("(tempEventJet)", particleDataPtr);
3939+ for (int i=0; i < nParton; ++i ) {
3940+
3941+ //// Only assign a parton once.
3942+ //for (int j=0; j < tempSize; ++j )
3943+ // if ( partonMatchesJet[i][j]) continue;
3944+
3945+ // Attach a single hadronic jet.
3946+ tempEventJet.clear();
3947+ tempEventJet.append( ID_GLUON, 98, 0, 0, 0, 0, 0, 0,
3948+ tempEvent[iNow].px(), tempEvent[iNow].py(),
3949+ tempEvent[iNow].pz(), tempEvent[iNow].e() );
3950+ // Attach the current parton.
3951+ Vec4 pIn = eventProcess[typeIdx[0][i]].p();
3952+ tempEventJet.append( ID_GLUON, 99, 0, 0, 0, 0, 0, 0,
3953+ pIn.px(), pIn.py(), pIn.pz(), pIn.e() );
3954+
3955+ // Setup jet algorithm.
3956+ if ( !slowJet->setup(tempEventJet) ) {
3957+ errorMsg("Warning in JetMatchingMadgraph:matchPartonsToJets"
3958+ "Light: the SlowJet algorithm failed on setup");
3959+ return NONE;
3960+ }
3961+
3962+ // These are the conditions for the hadronic jet to match the parton
3963+ // at the local qCut scale
3964+ if ( slowJet->iNext() == tempEventJet.size() - 1
3965+ && slowJet->jNext() > -1 && slowJet->dNext() < localQcutSq ) {
3966+ jetAssigned[iNow] = true;
3967+ partonMatchesJet[i][iNow] = true;
3968+ }
3969+
3970+ } // End loop over hard partons.
3971+
3972+ // Veto if the jet could not be assigned to any parton.
3973+ if ( jetAssigned[iNow] ) nMatched++;
3974+
3975+ // Continue;
3976+ ++iNow;
3977+ }
3978+
3979+ // Jet matching veto for FxFx
3980+ if (doFxFx) {
3981+// if ( nRequested < nJetMax && nMatched != nRequested )
3982+// return UNMATCHED_PARTON;
3983+// if ( nRequested == nJetMax && nMatched < nRequested )
3984+// return UNMATCHED_PARTON;
3985+ //Step-FxFx-6:Change the nRequested to npNLO() in the first condition (like in Step-FxFx-5)
3986+ //Before in Step-FxFx-3 it was nRequested=npNLO() for FxFx
3987+ //This way we correctly select the non-highest multipicity regardless the nRequested
3988+ if ( npNLO() < nJetMax && nMatched != nRequested )
3989+ return UNMATCHED_PARTON;
3990+ if ( npNLO() == nJetMax && nMatched < nRequested )
3991+ return UNMATCHED_PARTON;
3992+ }
3993+
3994+ // Do jet matching for MLM.
3995+ // Take the list of unmatched hadronic jets and append a parton, one at
3996+ // a time. The parton will be clustered with the "closest" hadronic jet
3997+ // or the beam if the distance measure is below the cut. When a hadronic
3998+ // jet is matched to a parton, it is removed from the list of unmatched
3999+ // hadronic jets. This process continues until all hadronic jets are
4000+ // matched to partons or it is not possible to make a match.
4001+ iNow = 0;
4002+ while (!doFxFx && iNow < nParton ) {
4003+ Event tempEventJet;
4004+ tempEventJet.init("(tempEventJet)", particleDataPtr);
4005+ for (int i = 0; i < tempSize; ++i) {
4006+ if (jetAssigned[i]) continue;
4007+ Vec4 pIn = tempEvent[i].p();
4008+ // Append unmatched hadronic jets
4009+ tempEventJet.append( ID_GLUON, 98, 0, 0, 0, 0, 0, 0,
4010+ pIn.px(), pIn.py(), pIn.pz(), pIn.e() );
4011+ }
4012+
4013+ Vec4 pIn = eventProcess[typeIdx[0][iNow]].p();
4014+ // Append the current parton
4015+ tempEventJet.append( ID_GLUON, 99, 0, 0, 0, 0, 0, 0,
4016+ pIn.px(), pIn.py(), pIn.pz(), pIn.e() );
4017+ if ( !slowJet->setup(tempEventJet) ) {
4018+ errorMsg("Warning in JetMatchingMadgraph:matchPartonsToJets"
4019+ "Light: the SlowJet algorithm failed on setup");
4020+ return NONE;
4021+ }
4022+ // These are the conditions for the hadronic jet to match the parton
4023+ // at the local qCut scale
4024+ if ( slowJet->iNext() == tempEventJet.size() - 1
4025+ && slowJet->jNext() > -1 && slowJet->dNext() < localQcutSq ) {
4026+ int iKnt = -1;
4027+ for (int i = 0; i != tempSize; ++i) {
4028+ if (jetAssigned[i]) continue;
4029+ ++iKnt;
4030+ // Identify the hadronic jet that matches the parton
4031+ if (iKnt == slowJet->jNext() ) jetAssigned[i] = true;
4032+ }
4033+ } else {
4034+ return UNMATCHED_PARTON;
4035+ }
4036+ ++iNow;
4037+ }
4038+
4039+ // Minimal eT/pT (CellJet/SlowJet) of matched light jets.
4040+ // Needed later for heavy jet vetos in inclusive mode.
4041+ // This information is not used currently.
4042+ if (nParton > 0 && pTminEstimate > 0) eTpTlightMin = pTminEstimate;
4043+ else eTpTlightMin = -1.;
4044+
4045+ // Record the jet separations.
4046+ setDJR(workEventJet);
4047+
4048+ // No veto
4049+ return NONE;
4050+}
4051+
4052+//--------------------------------------------------------------------------
4053+
4054+// Step(2c): heavy jets
4055+// Return codes are given indicating the reason for a veto.
4056+// Although not currently used, they are a useful debugging tool:
4057+// 0 = no veto as there are no extra jets present
4058+// 1 = veto as in exclusive mode and extra jets present
4059+// 2 = veto as in inclusive mode and extra jets were harder
4060+// than any matched light jet
4061+
4062+inline int JetMatchingMadgraph::matchPartonsToJetsHeavy() {
4063+
4064+ // Currently, heavy jets are unmatched
4065+ // If there are no extra jets, then accept
4066+ // jetMomenta is NEVER used by MadGraph and is always empty.
4067+ // This check does nothing.
4068+ // Rather, if there is any heavy flavor that is harder than
4069+ // what is present at the LHE level, then the event should
4070+ // be vetoed.
4071+
4072+ // if (jetMomenta.empty()) return NONE;
4073+ // Count the number of hard partons
4074+ int nParton = typeIdx[1].size();
4075+
4076+ Event tempEventJet(workEventJet);
4077+
4078+ double scaleF(1.0);
4079+ // Rescale the heavy partons that are from the hard process to
4080+ // have pT=collider energy. Soft/collinear gluons will cluster
4081+ // onto them, leaving a remnant of hard emissions.
4082+ for( int i=0; i<nParton; ++i) {
4083+ scaleF = eventProcessOrig[0].e()/workEventJet[typeIdx[1][i]].pT();
4084+ tempEventJet[typeIdx[1][i]].rescale5(scaleF);
4085+ }
4086+
4087+ if (!hjSlowJet->setup(tempEventJet) ) {
4088+ errorMsg("Warning in JetMatchingMadgraph:matchPartonsToJets"
4089+ "Heavy: the SlowJet algorithm failed on setup");
4090+ return NONE;
4091+ }
4092+
4093+
4094+ while ( hjSlowJet->sizeAll() - hjSlowJet->sizeJet() > 0 ) {
4095+ if( hjSlowJet->dNext() > qCutSq ) break;
4096+ hjSlowJet->doStep();
4097+ }
4098+
4099+ int nCLjets(0);
4100+ // Count the number of clusters with pT>qCut. This includes the
4101+ // original hard partons plus any hard emissions.
4102+ for(int idx=0 ; idx< hjSlowJet->sizeAll(); ++idx) {
4103+ if( hjSlowJet->pT(idx) > sqrt(qCutSq) ) nCLjets++;
4104+ }
4105+
4106+ // Debug printout.
4107+ if (MATCHINGDEBUG) hjSlowJet->list(true);
4108+
4109+ // Count of the number of hadronic jets in SlowJet accounting
4110+ // int nCLjets = nClus - nJets;
4111+ // Get number of partons. Different for MLM and FxFx schemes.
4112+ int nRequested = nParton;
4113+
4114+ // Veto event if too few hadronic jets
4115+ if ( nCLjets < nRequested ) {
4116+ if (MATCHINGDEBUG) cout << "veto : hvy LESS_JETS " << endl;
4117+ if (MATCHINGDEBUG) cout << "nCLjets = " << nCLjets << "; nRequest = "
4118+ << nRequested << endl;
4119+ return LESS_JETS;
4120+ }
4121+
4122+ // In exclusive mode, do not allow more hadronic jets than partons
4123+ if ( exclusive ) {
4124+ if ( nCLjets > nRequested ) {
4125+ if (MATCHINGDEBUG) cout << "veto : excl hvy MORE_JETS " << endl;
4126+ return MORE_JETS;
4127+ }
4128+ }
4129+
4130+ // No extra jets were present so no veto
4131+ return NONE;
4132+}
4133+
4134+//--------------------------------------------------------------------------
4135+
4136+// Step(2c): other jets
4137+// Return codes are given indicating the reason for a veto.
4138+// Although not currently used, they are a useful debugging tool:
4139+// 0 = no veto as there are no extra jets present
4140+// 1 = veto as in exclusive mode and extra jets present
4141+// 2 = veto as in inclusive mode and extra jets were harder
4142+// than any matched light jet
4143+
4144+inline int JetMatchingMadgraph::matchPartonsToJetsOther() {
4145+
4146+ // Currently, heavy jets are unmatched
4147+ // If there are no extra jets, then accept
4148+ // jetMomenta is NEVER used by MadGraph and is always empty.
4149+ // This check does nothing.
4150+ // Rather, if there is any heavy flavor that is harder than
4151+ // what is present at the LHE level, then the event should
4152+ // be vetoed.
4153+
4154+ // if (jetMomenta.empty()) return NONE;
4155+ // Count the number of hard partons
4156+ int nParton = typeIdx[2].size();
4157+
4158+ Event tempEventJet(workEventJet);
4159+
4160+ double scaleF(1.0);
4161+ // Rescale the heavy partons that are from the hard process to
4162+ // have pT=collider energy. Soft/collinear gluons will cluster
4163+ // onto them, leaving a remnant of hard emissions.
4164+ for( int i=0; i<nParton; ++i) {
4165+ scaleF = eventProcessOrig[0].e()/workEventJet[typeIdx[2][i]].pT();
4166+ tempEventJet[typeIdx[2][i]].rescale5(scaleF);
4167+ }
4168+
4169+ if (!hjSlowJet->setup(tempEventJet) ) {
4170+ errorMsg("Warning in JetMatchingMadgraph:matchPartonsToJets"
4171+ "Heavy: the SlowJet algorithm failed on setup");
4172+ return NONE;
4173+ }
4174+
4175+
4176+ while ( hjSlowJet->sizeAll() - hjSlowJet->sizeJet() > 0 ) {
4177+ if( hjSlowJet->dNext() > qCutSq ) break;
4178+ hjSlowJet->doStep();
4179+ }
4180+
4181+ int nCLjets(0);
4182+ // Count the number of clusters with pT>qCut. This includes the
4183+ // original hard partons plus any hard emissions.
4184+ for(int idx=0 ; idx< hjSlowJet->sizeAll(); ++idx) {
4185+ if( hjSlowJet->pT(idx) > sqrt(qCutSq) ) nCLjets++;
4186+ }
4187+
4188+ // Debug printout.
4189+ if (MATCHINGDEBUG) hjSlowJet->list(true);
4190+
4191+ // Count of the number of hadronic jets in SlowJet accounting
4192+ // int nCLjets = nClus - nJets;
4193+ // Get number of partons. Different for MLM and FxFx schemes.
4194+ int nRequested = nParton;
4195+
4196+ // Veto event if too few hadronic jets
4197+ if ( nCLjets < nRequested ) {
4198+ if (MATCHINGDEBUG) cout << "veto : other LESS_JETS " << endl;
4199+ if (MATCHINGDEBUG) cout << "nCLjets = " << nCLjets << "; nRequest = "
4200+ << nRequested << endl;
4201+ return LESS_JETS;
4202+ }
4203+
4204+ // In exclusive mode, do not allow more hadronic jets than partons
4205+ if ( exclusive ) {
4206+ if ( nCLjets > nRequested ) {
4207+ if (MATCHINGDEBUG) cout << "veto : excl other MORE_JETS" << endl;
4208+ return MORE_JETS;
4209+ }
4210+ }
4211+
4212+ // No extra jets were present so no veto
4213+ return NONE;
4214+}
4215+
4216+//==========================================================================
4217+
4218+} // end namespace Pythia8
4219+
4220+#endif // end Pythia8_JetMatching_H
4221
4222=== modified file 'Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_PYTHIA8.Script'
4223--- Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_PYTHIA8.Script 2021-04-15 15:17:31 +0000
4224+++ Template/NLO/MCatNLO/Scripts/MCatNLO_MadFKS_PYTHIA8.Script 2021-11-12 09:03:34 +0000
4225@@ -230,23 +230,33 @@
4226
4227 if [ ! -d $PYTHIA8LOCATION/xmldoc ]
4228 then
4229- PY8VER="8.2"
4230- echo ' USING PYTHIA 8, version >= 8.200'
4231- chmod +x $PYTHIA8LOCATION/bin/pythia8-config
4232- read HEPMCINCLIB <<< $($PYTHIA8LOCATION/bin/pythia8-config --hepmc2)
4233+ if [ -f $PYTHIA8LOCATION/share/Pythia8/xmldoc/Version.xml ]
4234+ then
4235+ while read line; do
4236+ if [[ $line == *"Pythia:versionNumber"*"8.2"* ]]; then PY8VER="8.2" ; echo ' USING PYTHIA 8.2xy' ; fi
4237+ if [[ $line == *"Pythia:versionNumber"*"8.3"* ]]; then PY8VER="8.3" ; echo ' USING PYTHIA 8.3xy' ; fi
4238+ done < $PYTHIA8LOCATION/share/Pythia8/xmldoc/Version.xml
4239+ else
4240+ echo "Cannot determine Pythia8 version, stopping run"
4241+ exit -1
4242+ fi
4243+ chmod +x $PYTHIA8LOCATION/bin/pythia8-config
4244+ read HEPMCINCLIB <<< $($PYTHIA8LOCATION/bin/pythia8-config --hepmc2)
4245 else
4246- PY8VER="8.1"
4247- echo ' USING PYTHIA 8, version < 8.200'
4248+ PY8VER="8.1"
4249+ echo ' USING PYTHIA 8.1xy'
4250 fi
4251
4252 if [ "$PY8UTI" != "" ]
4253 then
4254 if [ $PY8VER == "8.1" ]; then cp -rf $thisdir/srcPythia8/Pythia8.cc $thisdir/Pythia8.cc; fi
4255 if [ $PY8VER == "8.2" ]; then cp -rf $thisdir/srcPythia8/Pythia82.cc $thisdir/Pythia82.cc; fi
4256+ if [ $PY8VER == "8.3" ]; then cp -rf $thisdir/srcPythia8/Pythia83.cc $thisdir/Pythia83.cc; fi
4257 cp -rf $thisdir/srcPythia8/Makefile $thisdir/Makefile
4258 else
4259 if [ $PY8VER == "8.1" ]; then cp -rf $thisdir/srcPythia8/Pythia8_hep.cc $thisdir/Pythia8.cc; fi
4260 if [ $PY8VER == "8.2" ]; then cp -rf $thisdir/srcPythia8/Pythia82_hep.cc $thisdir/Pythia82.cc; fi
4261+ if [ $PY8VER == "8.3" ]; then cp -rf $thisdir/srcPythia8/Pythia83_hep.cc $thisdir/Pythia83.cc; fi
4262 cp -rf $thisdir/srcPythia8/Makefile_hep $thisdir/Makefile
4263 fi
4264 if [ -f $thisdir/Pythia8.exe ]
4265@@ -256,6 +266,7 @@
4266
4267 if [ $PY8VER == "8.1" ]; then cp -rf $PYTHIA8LOCATION/xmldoc $thisdir; fi
4268 if [ $PY8VER == "8.2" ]; then cp -rf $PYTHIA8LOCATION/share/Pythia8/xmldoc $thisdir; fi
4269+if [ $PY8VER == "8.3" ]; then cp -rf $PYTHIA8LOCATION/share/Pythia8/xmldoc $thisdir; fi
4270 PY8UTIMAKE="PY8UTI="$PY8UTI
4271 FORFILEMAKE="FORFILE="$PY8UTI
4272 HEPMCMAKE="HEPMCINCLIB="$HEPMCINCLIB
4273@@ -263,6 +274,7 @@
4274
4275 if [ $PY8VER == "8.1" ]; then make Pythia8 "$PY8UTIMAKE" "$FORFILEMAKE" "$LGFORTRANMAKE" "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE"; fi
4276 if [ $PY8VER == "8.2" ]; then make Pythia82 "$PY8UTIMAKE" "$FORFILEMAKE" "$LGFORTRANMAKE" "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE" "$HEPMCMAKE"; fi
4277+if [ $PY8VER == "8.3" ]; then make Pythia83 "$PY8UTIMAKE" "$FORFILEMAKE" "$LGFORTRANMAKE" "$LIBSMAKE" "$LIBSMAKEP" "$INCLMAKE" "$HEPMCMAKE"; fi
4278
4279 cd $thisdir
4280 if [ ! -f $thisdir/Pythia8.exe ]
4281@@ -366,6 +378,7 @@
4282 ! 3) Beam-parameter settings.
4283 Beams:frameType = 4 ! LHE initialization
4284 Beams:LHEF = events.lhe ! Input LHE file
4285+Beams:setProductionScalesFromLHEF=on ! Identify the Weak Jets
4286
4287 ! 4) Switch on/off the key event-generation steps.
4288 EOF
4289
4290=== modified file 'Template/NLO/MCatNLO/srcPythia8/Makefile'
4291--- Template/NLO/MCatNLO/srcPythia8/Makefile 2015-12-04 17:56:46 +0000
4292+++ Template/NLO/MCatNLO/srcPythia8/Makefile 2021-11-12 09:03:34 +0000
4293@@ -51,6 +51,11 @@
4294 -L$(PYTHIA8LOCATION)/$(LIBDIR) -lpythia8 $(LIBGZIP) \
4295 -lHepMCfio $(LIBGFORTRAN) $(HEPMCINCLIB) $(EXTRAPATHS) $(EXTRALIBS) \
4296
4297+Pythia83: $(FORFILE) $(PYTHIA8LOCATION)/$(LIBDIR)/libpythia8.a
4298+ $(CXX) $(CXXFLAGS) -I$(PYTHIA8LOCATION)/$(INCDIR) \
4299+ -I$(TOPDIR)/$(INCDIR) $(INCLOPTION) $@.cc -o Pythia8.exe $(FORFILE) \
4300+ -L$(PYTHIA8LOCATION)/$(LIBDIR) -lpythia8 $(LIBGZIP) \
4301+ -lHepMCfio $(LIBGFORTRAN) $(HEPMCINCLIB) $(EXTRAPATHS) $(EXTRALIBS) \
4302
4303 .PHONY: clean
4304 clean:
4305
4306=== modified file 'Template/NLO/MCatNLO/srcPythia8/Makefile_hep'
4307--- Template/NLO/MCatNLO/srcPythia8/Makefile_hep 2015-12-04 17:56:46 +0000
4308+++ Template/NLO/MCatNLO/srcPythia8/Makefile_hep 2021-11-12 09:03:34 +0000
4309@@ -51,6 +51,12 @@
4310 -L$(PYTHIA8LOCATION)/$(LIBDIR) -lpythia8 $(LIBGZIP) \
4311 $(HEPMCINCLIB) $(EXTRAPATHS) $(EXTRALIBS) \
4312
4313+Pythia83: $(FORFILE) $(PYTHIA8LOCATION)/$(LIBDIR)/libpythia8.a
4314+ $(CXX) $(CXXFLAGS) -I$(PYTHIA8LOCATION)/$(INCDIR) \
4315+ -I$(TOPDIR)/$(INCDIR) $(INCLOPTION) $@.cc -o Pythia8.exe $(FORFILE) \
4316+ -L$(PYTHIA8LOCATION)/$(LIBDIR) -lpythia8 $(LIBGZIP) \
4317+ $(HEPMCINCLIB) $(EXTRAPATHS) $(EXTRALIBS) \
4318+
4319 .PHONY: clean
4320 clean:
4321 rm -rf *.exe
4322
4323=== added file 'Template/NLO/MCatNLO/srcPythia8/Pythia83.cc'
4324--- Template/NLO/MCatNLO/srcPythia8/Pythia83.cc 1970-01-01 00:00:00 +0000
4325+++ Template/NLO/MCatNLO/srcPythia8/Pythia83.cc 2021-11-12 09:03:34 +0000
4326@@ -0,0 +1,171 @@
4327+// Driver for Pythia 8. Reads an input file dynamically created on
4328+// the basis of the inputs specified in MCatNLO_MadFKS_PY8.Script
4329+#include "Pythia8/Pythia.h"
4330+#include "Pythia8Plugins/HepMC2.h"
4331+#include "Pythia8Plugins/aMCatNLOHooks.h"
4332+#include "Pythia8Plugins/CombineMatchingInput.h"
4333+#include "HepMC/GenEvent.h"
4334+#include "HepMC/IO_GenEvent.h"
4335+#include "HepMC/IO_BaseClass.h"
4336+#include "HepMC/IO_HEPEVT.h"
4337+#include "HepMC/HEPEVT_Wrapper.h"
4338+#include "fstream"
4339+#include "LHEFRead.h"
4340+
4341+using namespace Pythia8;
4342+
4343+extern "C" {
4344+ extern struct {
4345+ double EVWGT;
4346+ } cevwgt_;
4347+}
4348+#define cevwgt cevwgt_
4349+
4350+extern "C" {
4351+ void pyabeg_(int&,char(*)[50]);
4352+ void pyaend_(double&);
4353+ void pyanal_(int&,double(*));
4354+}
4355+
4356+int main() {
4357+ Pythia pythia;
4358+
4359+ int cwgtinfo_nn;
4360+ char cwgtinfo_weights_info[1024][50];
4361+ double cwgt_ww[1024];
4362+
4363+ string inputname="Pythia8.cmd",outputname="Pythia8.hep";
4364+
4365+ pythia.readFile(inputname.c_str());
4366+
4367+ //Create UserHooks pointer for the FxFX matching. Stop if it failed. Pass pointer to Pythia.
4368+ CombineMatchingInput combined;
4369+ //UserHooks* matching = NULL;
4370+
4371+ string filename = pythia.word("Beams:LHEF");
4372+
4373+ MyReader read(filename);
4374+ read.lhef_read_wgtsinfo_(cwgtinfo_nn,cwgtinfo_weights_info);
4375+ pyabeg_(cwgtinfo_nn,cwgtinfo_weights_info);
4376+
4377+ int nAbort=10;
4378+ int nPrintLHA=1;
4379+ int iAbort=0;
4380+ int iPrintLHA=0;
4381+ int nstep=5000;
4382+ int iEventtot=pythia.mode("Main:numberOfEvents");
4383+ int iEventshower=pythia.mode("Main:spareMode1");
4384+ string evt_norm=pythia.word("Main:spareWord1");
4385+ int iEventtot_norm=iEventtot;
4386+ if (evt_norm != "sum"){
4387+ iEventtot_norm=1;
4388+ }
4389+
4390+ //FxFx merging
4391+ bool isFxFx=pythia.flag("JetMatching:doFxFx");
4392+ if (isFxFx) {
4393+ combined.setHook(pythia);
4394+ //matching = combined->getHook(pythia);
4395+ //if (!matching) {
4396+ // std::cout << " Failed to initialise jet matching structures.\n"
4397+ // << " Program stopped.";
4398+ // return 1;
4399+ //}
4400+ //pythia.setUserHooksPtr(matching);
4401+ int nJmax=pythia.mode("JetMatching:nJetMax");
4402+ double Qcut=pythia.parm("JetMatching:qCut");
4403+ double PTcut=pythia.parm("JetMatching:qCutME");
4404+ if (Qcut <= PTcut || Qcut <= 0.) {
4405+ std::cout << " \n";
4406+ std::cout << "Merging scale (shower_card.dat) smaller than pTcut (run_card.dat)"
4407+ << Qcut << " " << PTcut << "\n";
4408+ return 0;
4409+ }
4410+ }
4411+
4412+ // Initialise Pythia.
4413+ if (!pythia.init()) {
4414+ cout << "Error: could not initialise Pythia" << endl;
4415+ return 0;
4416+ };
4417+
4418+ HepMC::IO_BaseClass *_hepevtio;
4419+ HepMC::Pythia8ToHepMC ToHepMC;
4420+ HepMC::IO_GenEvent ascii_io(outputname.c_str(), std::ios::out);
4421+ double nSelected;
4422+ int nTry;
4423+ double norm;
4424+
4425+ // Cross section
4426+ double sigmaTotal = 0.;
4427+ int iLHEFread=0;
4428+
4429+ for (int iEvent = 0; ; ++iEvent) {
4430+ if (!pythia.next()) {
4431+ if (++iAbort < nAbort) continue;
4432+ break;
4433+ }
4434+ // the number of events read by Pythia so far
4435+ nSelected=double(pythia.info.nSelected());
4436+ // normalisation factor for the default analyses defined in pyanal_
4437+ norm=iEventtot_norm*iEvent/nSelected;
4438+
4439+ if (nSelected >= iEventshower) break;
4440+ if (pythia.info.isLHA() && iPrintLHA < nPrintLHA) {
4441+ pythia.LHAeventList();
4442+ pythia.info.list();
4443+ pythia.process.list();
4444+ pythia.event.list();
4445+ ++iPrintLHA;
4446+ }
4447+
4448+ double evtweight = pythia.info.weight();
4449+ double normhepmc;
4450+ // Add the weight of the current event to the cross section.
4451+ normhepmc = 1. / double(iEventshower);
4452+ if (evt_norm != "sum") {
4453+ sigmaTotal += evtweight*normhepmc;
4454+ } else {
4455+ sigmaTotal += evtweight*normhepmc*iEventtot;
4456+ }
4457+
4458+ HepMC::GenEvent* hepmcevt = new HepMC::GenEvent();
4459+ ToHepMC.fill_next_event( pythia, hepmcevt );
4460+
4461+ //define the IO_HEPEVT
4462+ _hepevtio = new HepMC::IO_HEPEVT;
4463+ _hepevtio->write_event(hepmcevt);
4464+
4465+ //event weight
4466+ cevwgt.EVWGT=hepmcevt->weights()[0];
4467+
4468+ //call the FORTRAN analysis for this event. First, make sure to
4469+ //re-synchronize the reading of the weights with the reading of
4470+ //the event. (They get desynchronised if an event was rejected).
4471+ nTry=pythia.info.nTried();
4472+ for (; iLHEFread<nTry ; ++iLHEFread) {
4473+ read.lhef_read_wgts_(cwgt_ww);
4474+ }
4475+ cwgt_ww[0]=cevwgt.EVWGT;
4476+ pyanal_(cwgtinfo_nn,cwgt_ww);
4477+
4478+ if (iEvent % nstep == 0 && iEvent >= 100){
4479+ pyaend_(norm);
4480+ }
4481+ delete hepmcevt;
4482+ }
4483+ pyaend_(norm);
4484+
4485+ pythia.stat();
4486+ if (isFxFx){
4487+ std::cout << " \n";
4488+ std::cout << "*********************************************************************** \n";
4489+ std::cout << "*********************************************************************** \n";
4490+ std::cout << "Cross section, including FxFx merging is: "
4491+ << sigmaTotal << "\n";
4492+ std::cout << "*********************************************************************** \n";
4493+ std::cout << "*********************************************************************** \n";
4494+ }
4495+
4496+ return 0;
4497+}
4498
4499=== added file 'Template/NLO/MCatNLO/srcPythia8/Pythia83_hep.cc'
4500--- Template/NLO/MCatNLO/srcPythia8/Pythia83_hep.cc 1970-01-01 00:00:00 +0000
4501+++ Template/NLO/MCatNLO/srcPythia8/Pythia83_hep.cc 2021-11-12 09:03:34 +0000
4502@@ -0,0 +1,121 @@
4503+// Driver for Pythia 8. Reads an input file dynamically created on
4504+// the basis of the inputs specified in MCatNLO_MadFKS_PY8.Script
4505+#include "Pythia8/Pythia.h"
4506+#include "Pythia8Plugins/HepMC2.h"
4507+#include "Pythia8Plugins/aMCatNLOHooks.h"
4508+#include "Pythia8Plugins/CombineMatchingInput.h"
4509+#include "HepMC/GenEvent.h"
4510+#include "HepMC/IO_GenEvent.h"
4511+
4512+using namespace Pythia8;
4513+
4514+int main() {
4515+ Pythia pythia;
4516+
4517+ string inputname="Pythia8.cmd",outputname="Pythia8.hep";
4518+
4519+ pythia.readFile(inputname.c_str());
4520+
4521+ //Create UserHooks pointer for the FxFX matching. Stop if it failed. Pass pointer to Pythia.
4522+ CombineMatchingInput combined;
4523+ //UserHooks* matching = NULL;
4524+
4525+ int nAbort=10;
4526+ int nPrintLHA=1;
4527+ int iAbort=0;
4528+ int iPrintLHA=0;
4529+ int iEventtot=pythia.mode("Main:numberOfEvents");
4530+ int iEventshower=pythia.mode("Main:spareMode1");
4531+ string evt_norm=pythia.word("Main:spareWord1");
4532+
4533+ //FxFx merging
4534+ bool isFxFx=pythia.flag("JetMatching:doFxFx");
4535+ if (isFxFx) {
4536+ combined.setHook(pythia);
4537+ //matching = combined->getHook(pythia);
4538+ //if (!matching) {
4539+ // std::cout << " Failed to initialise jet matching structures.\n"
4540+ // << " Program stopped.";
4541+ // return 1;
4542+ //}
4543+ //pythia.setUserHooksPtr(matching);
4544+ int nJmax=pythia.mode("JetMatching:nJetMax");
4545+ double Qcut=pythia.parm("JetMatching:qCut");
4546+ double PTcut=pythia.parm("JetMatching:qCutME");
4547+ if (Qcut <= PTcut || Qcut <= 0.) {
4548+ std::cout << " \n";
4549+ std::cout << "Merging scale (shower_card.dat) smaller than pTcut (run_card.dat)"
4550+ << Qcut << " " << PTcut << "\n";
4551+ return 0;
4552+ }
4553+ }
4554+
4555+ // Initialise Pythia.
4556+ if (!pythia.init()) {
4557+ cout << "Error: could not initialise Pythia" << endl;
4558+ return 0;
4559+ };
4560+
4561+ HepMC::Pythia8ToHepMC ToHepMC;
4562+ HepMC::IO_GenEvent ascii_io(outputname.c_str(), std::ios::out);
4563+ // Do not store cross section information, as this will be done manually.
4564+ ToHepMC.set_store_pdf(false);
4565+ ToHepMC.set_store_proc(false);
4566+ ToHepMC.set_store_xsec(false);
4567+
4568+ // Cross section an error.
4569+ double sigmaTotal = 0.;
4570+ double errorTotal = 0.;
4571+
4572+ for (int iEvent = 0; ; ++iEvent) {
4573+ if (!pythia.next()) {
4574+ if (++iAbort < nAbort) continue;
4575+ break;
4576+ }
4577+ // the number of events read by Pythia so far
4578+ int nSelected=pythia.info.nSelected();
4579+
4580+ if (nSelected > iEventshower) break;
4581+ if (pythia.info.isLHA() && iPrintLHA < nPrintLHA) {
4582+ pythia.LHAeventList();
4583+ pythia.info.list();
4584+ pythia.process.list();
4585+ pythia.event.list();
4586+ ++iPrintLHA;
4587+ }
4588+
4589+ HepMC::GenEvent* hepmcevt = new HepMC::GenEvent();
4590+ double evtweight = pythia.info.weight();
4591+ double normhepmc;
4592+ // ALWAYS NORMALISE HEPMC WEIGHTS TO SUM TO THE CROSS SECTION
4593+ if (evt_norm != "sum") {
4594+ normhepmc = 1. / double(iEventshower);
4595+ } else {
4596+ normhepmc = double(iEventtot) / double(iEventshower);
4597+ }
4598+ sigmaTotal += evtweight*normhepmc;
4599+ hepmcevt->weights().push_back(evtweight*normhepmc);
4600+ ToHepMC.fill_next_event( pythia, hepmcevt );
4601+ // Add the weight of the current event to the cross section.
4602+ // Report cross section to hepmc
4603+ HepMC::GenCrossSection xsec;
4604+ xsec.set_cross_section( sigmaTotal, pythia.info.sigmaErr() );
4605+ hepmcevt->set_cross_section( xsec );
4606+ // Write the HepMC event to file. Done with it.
4607+ ascii_io << hepmcevt;
4608+ delete hepmcevt;
4609+ }
4610+
4611+ pythia.stat();
4612+ if (isFxFx){
4613+ std::cout << " \n";
4614+ std::cout << "*********************************************************************** \n";
4615+ std::cout << "*********************************************************************** \n";
4616+ std::cout << "Cross section, including FxFx merging is: "
4617+ << sigmaTotal << "\n";
4618+ std::cout << "*********************************************************************** \n";
4619+ std::cout << "*********************************************************************** \n";
4620+ }
4621+
4622+ return 0;
4623+}
4624
4625=== removed file 'Template/NLO/Source/genps.inc'
4626=== modified file 'Template/NLO/Source/make_opts.inc'
4627--- Template/NLO/Source/make_opts.inc 2020-09-16 12:13:39 +0000
4628+++ Template/NLO/Source/make_opts.inc 2021-11-12 09:03:34 +0000
4629@@ -93,23 +93,17 @@
4630 endif
4631 llhapdf = $(shell $(lhapdf) --libs)
4632 reweight_xsec_events_pdf_dummy=
4633- # check if we need to activate c++11 (for lhapdf6.2)
4634- ifeq ($(origin CXX),default)
4635- ifeq ($lhapdfversion$lhapdfsubversion,62)
4636- CXX=$(DEFAULT_CPP_COMPILER) -std=c++11
4637- else
4638- CXX=$(DEFAULT_CPP_COMPILER)
4639- endif
4640- endif
4641 else
4642 alfas_functions=alfas_functions
4643 llhapdf=
4644 reweight_xsec_events_pdf_dummy=reweight_xsec_events_pdf_dummy.o
4645- # Set CXX unless it's defined by an environment variable
4646- ifeq ($(origin CXX),default)
4647- CXX=$(DEFAULT_CPP_COMPILER)
4648- endif
4649-endif
4650+endif
4651+
4652+# Set CXX unless it's defined by an environment variable
4653+ifeq ($(origin CXX),default)
4654+ CXX=$(DEFAULT_CPP_COMPILER) -std=c++11
4655+endif
4656+
4657
4658 # Option PineAPPL
4659 ifneq ($(pineappl),)
4660
4661=== removed file 'Template/NLO/Source/maxconfigs.inc'
4662=== removed file 'Template/NLO/Source/maxparticles.inc'
4663=== modified file 'Template/NLO/SubProcesses/BinothLHA.f'
4664--- Template/NLO/SubProcesses/BinothLHA.f 2020-06-26 09:54:58 +0000
4665+++ Template/NLO/SubProcesses/BinothLHA.f 2021-11-12 09:03:34 +0000
4666@@ -8,6 +8,7 @@
4667 implicit none
4668 include "nexternal.inc"
4669 include "coupl.inc"
4670+ include "../../Source/MODEL/input.inc"
4671 include 'born_nhel.inc'
4672 double precision pi, zero,mone
4673 parameter (pi=3.1415926535897932385d0)
4674@@ -57,6 +58,7 @@
4675 integer getordpowfromindex_ml5
4676 integer orders_to_amp_split_pos
4677 logical, allocatable, save :: keep_order(:)
4678+ include 'a0Gmuconv.inc'
4679 include 'orders.inc'
4680 integer amp_orders(nsplitorders)
4681 integer split_amp_orders(nsplitorders), iamp
4682@@ -74,10 +76,17 @@
4683
4684 logical updateloop
4685 common /to_updateloop/updateloop
4686+
4687+ integer get_n_tagged_photons
4688+ external get_n_tagged_photons
4689+ double precision get_virtual_a0Gmu_conv
4690+ external get_virtual_a0Gmu_conv
4691+ integer ntagph, qed_pow_b
4692 c masses
4693 include 'pmass.inc'
4694 data nbad / 0 /
4695
4696+
4697 IOErrCounter = 0
4698 c update the ren_scale for MadLoop and the couplings (should be the
4699 c Ellis-Sexton scale)
4700@@ -93,8 +102,7 @@
4701 single = 0d0
4702 double = 0d0
4703 born_hel_from_virt = 0d0
4704-C reset the amp_split array
4705- amp_split(1:amp_split_size) = 0d0
4706+C reset the various arrays
4707 amp_split_finite_ML(1:amp_split_size) = 0d0
4708 amp_split_poles_ML(1:amp_split_size,1) = 0d0
4709 amp_split_poles_ML(1:amp_split_size,2) = 0d0
4710@@ -256,6 +264,32 @@
4711 c endif
4712 c virt_wgt=virt_wgt+conversion*born_wgt*ao2pi
4713 c======================================================================
4714+
4715+c======================================================================
4716+c If there are tagged photon and other particles in the process,
4717+C one must use a mixed Gmu-alpha0 renormalisation.
4718+ ntagph = get_n_tagged_photons()
4719+ if (ntagph.ne.0) then
4720+ do i = 1, AMP_SPLIT_SIZE_BORN
4721+ call amp_split_pos_to_orders(i, amp_orders)
4722+ born_wgt = amp_split(i)
4723+ ! this is the number of powers of 'e' in the born
4724+ qed_pow_b = amp_orders(qed_pos)
4725+ amp_orders(qed_pos) = amp_orders(qed_pos) + 2
4726+ if (amp_orders(qed_pos).gt.NLO_ORDERS(qed_pos)) cycle
4727+
4728+ amp_split_poles_ML(orders_to_amp_split_pos(amp_orders),1) =
4729+ $ amp_split_poles_ML(orders_to_amp_split_pos(amp_orders),1) +
4730+ $ get_virtual_a0Gmu_conv(qed_pow_b,ntagph,1,born_wgt)
4731+
4732+ amp_split_finite_ML(orders_to_amp_split_pos(amp_orders)) =
4733+ $ amp_split_finite_ML(orders_to_amp_split_pos(amp_orders)) +
4734+ $ get_virtual_a0Gmu_conv(qed_pow_b,ntagph,0,born_wgt)
4735+
4736+ enddo
4737+ endif
4738+c======================================================================
4739+
4740 c
4741 c Check poles for the first PS points when doing MC over helicities, and
4742 c for all phase-space points when not doing MC over helicities. Skip
4743@@ -268,7 +302,7 @@
4744 polecheck_passed = .true.
4745 ! loop over the full result and each of the amp_split
4746 ! contribution
4747- do iamp=0,amp_split_size
4748+ do iamp=1,amp_split_size
4749 ! skip 0 contributions in the amp_split array
4750 if (iamp.ne.0) then
4751 if (amp_split_poles_FKS(iamp,1).eq.0d0.and.
4752
4753=== modified file 'Template/NLO/SubProcesses/add_write_info.f'
4754--- Template/NLO/SubProcesses/add_write_info.f 2018-05-01 13:46:54 +0000
4755+++ Template/NLO/SubProcesses/add_write_info.f 2021-11-12 09:03:34 +0000
4756@@ -92,8 +92,8 @@
4757 data (xdir(i),i=1,3) /0,0,1/
4758
4759 c For (n+1)-body this is the configuration mapping
4760- integer mapconfig(0:lmaxconfigs), this_config
4761- common/to_mconfigs/mapconfig, this_config
4762+ integer this_config
4763+ common/to_mconfigs/this_config
4764
4765 c For shifting QCD partons from zero to their mass-shell
4766 double precision x(99),p(0:3,99)
4767@@ -119,6 +119,14 @@
4768 & ,fksfather_lhe(fks_configs) ,ipartner_lhe(fks_configs)
4769 common/cto_LHE1/iSorH_lhe,ifks_lhe,jfks_lhe,
4770 # fksfather_lhe,ipartner_lhe
4771+c pt_clust string
4772+ integer need_matching(nexternal)
4773+ common /c_need_matching_to_write/ need_matching
4774+ double precision ptclus
4775+ CHARACTER temp*600,temp0*7,integ*1,float*18
4776+ CHARACTER integfour*4
4777+ CHARACTER(LEN=1000) ptclusstring
4778+ common /c_ptclusstring/ ptclusstring
4779 include 'orders.inc'
4780 logical is_aorg(nexternal)
4781 common /c_is_aorg/is_aorg
4782@@ -581,6 +589,38 @@
4783 pb(j,ito(i))=pb(j,i)
4784 enddo
4785 enddo
4786+
4787+
4788+! write the ptclusstring that knows about which partons should be
4789+! considered in the MLM-like matching
4790+ if (ickkw.eq.3) then
4791+ if (nincoming.ne.2) then
4792+ write (*,*) 'Need to incoming particles with ickkw=3 '/
4793+ $ /'(add_write_info.f)'
4794+ stop
4795+ endif
4796+ temp0='<scales '
4797+ temp=''
4798+ do i=nincoming+1,nexpart
4799+ integfour=''
4800+ float=''
4801+ if (need_matching(i).ne.-1) then
4802+ ptclus=shower_scale
4803+ else
4804+ if (nincoming.ne.2) then
4805+ write (*,*) 'need two incoming particles '/
4806+ $ /'in add_write_info.f'
4807+ stop 1
4808+ endif
4809+ ptclus=shower_scale-0.001d0
4810+ endif
4811+ Write(float,'(f16.5)') ptclus
4812+ write(integfour,'(i4)') ito(i)
4813+ temp=trim(temp)//' pt_clust_'//trim(adjustl(integfour))/
4814+ $ /'="'//trim(adjustl(float))//'"'
4815+ enddo
4816+ ptclusstring=trim(adjustl(temp0//trim(temp)//'></scales>'))
4817+ endif
4818 c
4819 c Set the number of particles that needs to be written in event file
4820 c
4821@@ -593,108 +633,51 @@
4822 subroutine set_itree(iconfig,Hevents,itree,sprop_tree,pmass_tree
4823 & ,pwidth_tree)
4824 implicit none
4825- integer iconfig
4826+ integer iconfig,iconf
4827 logical Hevents
4828 include "genps.inc"
4829 include 'nexternal.inc'
4830 include "coupl.inc"
4831- double precision ZERO
4832- parameter (ZERO=0d0)
4833+ include 'nFKSconfigs.inc'
4834+ include 'real_from_born_configs.inc'
4835+ double precision pmass(-nexternal:0,lmaxconfigs,0:fks_configs)
4836+ double precision pwidth(-nexternal:0,lmaxconfigs,0:fks_configs)
4837+ integer iforest(2,-max_branch:-1,lmaxconfigs,0:fks_configs)
4838+ integer sprop(-max_branch:-1,lmaxconfigs,0:fks_configs)
4839+ integer tprid(-max_branch:-1,lmaxconfigs,0:fks_configs)
4840+ integer mapconfig(0:lmaxconfigs,0:fks_configs)
4841+ common /c_configurations/pmass,pwidth,iforest,sprop,tprid
4842+ $ ,mapconfig
4843 integer itree(2,-max_branch:-1)
4844 integer sprop_tree(-max_branch:-1)
4845- include "born_conf.inc"
4846- integer i,j,jj
4847- double precision pmass(-nexternal:0,lmaxconfigs)
4848- double precision pwidth(-nexternal:0,lmaxconfigs)
4849- integer pow(-nexternal:0,lmaxconfigs)
4850+ integer i,j
4851 double precision pmass_tree(-nexternal:0)
4852 double precision pwidth_tree(-nexternal:0)
4853- integer i_fks,j_fks
4854- common/fks_indices/i_fks,j_fks
4855- include "born_props.inc"
4856-c
4857+ INTEGER NFKSPROCESS
4858+ COMMON/C_NFKSPROCESS/NFKSPROCESS
4859 c Do not really care about t-channels: loop should just go to
4860-c nexternal-4, even though there is one more when there are t-channels
4861-c around
4862- do j=-(nexternal-4),-1
4863- do i=1,2
4864- itree(i,j)=iforest(i,j,iconfig)
4865- enddo
4866- sprop_tree(j)=sprop(j,iconfig)
4867- pmass_tree(j)=pmass(j,iconfig)
4868- pwidth_tree(j)=pwidth(j,iconfig)
4869- enddo
4870-c
4871-c When we are doing H-events, we need to add --when j_fks is final
4872-c state-- the s-channel branching fks_mother -> j_fks + i_fks. When
4873-c j_fks is initial state, we need to add a 'bogus' t-channel splitting
4874-c to make sure that all the loops stop properly
4875-c
4876+c nexternal-3 (or 4), even though there is one more when there are
4877+c t-channels around
4878 if (Hevents) then
4879-c must re-label the external particles to get the correct daughters
4880- if (i_fks.le.j_fks) then
4881- write (*,*) 'ERROR: i_fks should be greater than j_fks'
4882- stop
4883- endif
4884+ iconf=real_from_born_conf(iconfig,nFKSprocess)
4885+ do j=-(nexternal-3),-1
4886+ do i=1,2
4887+ itree(i,j)=iforest(i,j,iconf,nFKSprocess)
4888+ enddo
4889+ sprop_tree(j)=sprop(j,iconf,nFKSprocess)
4890+ pmass_tree(j)=pmass(j,iconf,nFKSprocess)
4891+ pwidth_tree(j)=pwidth(j,iconf,nFKSprocess)
4892+ enddo
4893+ else
4894 do j=-(nexternal-4),-1
4895 do i=1,2
4896- if ( itree(i,j).ge.i_fks ) then
4897- itree(i,j)=itree(i,j)+1
4898- endif
4899+ itree(i,j)=iforest(i,j,iconfig,0)
4900 enddo
4901+ sprop_tree(j)=sprop(j,iconfig,0)
4902+ pmass_tree(j)=pmass(j,iconfig,0)
4903+ pwidth_tree(j)=pwidth(j,iconfig,0)
4904 enddo
4905-c
4906- if (j_fks.gt.nincoming) then
4907-c we must add an extra s-channel. Easiest is to add it all the way at
4908-c the beginning. Therefore, relabel everything else first. Use the
4909-c original ones to make sure we are doing it correctly (and not
4910-c accidentally overwriting something).
4911- do j=-(nexternal-4),-1
4912- sprop_tree(j-1)=sprop(j,iconfig)
4913- pmass_tree(j-1)=pmass(j,iconfig)
4914- pwidth_tree(j-1)=pwidth(j,iconfig)
4915- do i=1,2
4916- itree(i,j-1)=iforest(i,j,iconfig)
4917-c Also update the internal references
4918- if ( itree(i,j-1).lt. 0 ) then
4919- itree(i,j-1)=itree(i,j-1)-1
4920- endif
4921- enddo
4922- enddo
4923-c
4924-c Add the new s-channel
4925-c
4926- itree(1,-1)=i_fks
4927- itree(2,-1)=j_fks
4928-c This will never be an on-shell s-channel. Hence, give it some bogus values:
4929- sprop_tree(-1)=0
4930- pmass_tree(-1)=0d0
4931- pwidth_tree(-1)=0d0
4932-c
4933-c We have to make sure that the fks_mother (which is equal to the j_fks
4934-c label of the Born) is replaced by the new s-channel
4935-c
4936- do j=-(nexternal-3),-2 ! do not include the new s-channel
4937- do i=1,2
4938- if ( itree(i,j).eq. j_fks ) then
4939- itree(i,j)=-1 ! reference to the new s-channel
4940- endif
4941- enddo
4942- enddo
4943-
4944- else
4945-c j_fks is initial state
4946- jj=-(nexternal-3) ! Just add it at the end
4947-c setting itree to 1 (or 2) makes sure that the loops over s-channel
4948-c propagators will exit
4949- itree(1,jj)=1
4950- itree(2,jj)=1
4951- sprop_tree(jj)=0
4952- pmass_tree(jj)=0d0
4953- pwidth_tree(jj)=0d0
4954- endif
4955 endif
4956-
4957 return
4958 end
4959
4960
4961=== modified file 'Template/NLO/SubProcesses/analysis_lhe.f'
4962--- Template/NLO/SubProcesses/analysis_lhe.f 2018-06-04 16:53:37 +0000
4963+++ Template/NLO/SubProcesses/analysis_lhe.f 2021-11-12 09:03:34 +0000
4964@@ -87,7 +87,7 @@
4965 c Auxiliary quantities used when writing events
4966 integer kwgtinfo
4967 integer i_wgt, kk, ii, jj, n, nn
4968- character*140 buff
4969+ character*1000 buff
4970 INTEGER MAXNUP
4971 PARAMETER (MAXNUP=500)
4972 INTEGER NUP,IDPRUP,IDUP(MAXNUP),ISTUP(MAXNUP),
4973
4974=== removed file 'Template/NLO/SubProcesses/c_weight.inc.THIS'
4975=== modified file 'Template/NLO/SubProcesses/chooser_functions.f'
4976--- Template/NLO/SubProcesses/chooser_functions.f 2018-04-05 17:59:21 +0000
4977+++ Template/NLO/SubProcesses/chooser_functions.f 2021-11-12 09:03:34 +0000
4978@@ -8,25 +8,24 @@
4979 double precision ZERO
4980 parameter (ZERO=0d0)
4981 include 'maxparticles.inc'
4982- include 'ngraphs.inc'
4983+ include 'maxconfigs.inc'
4984 integer i,j,k
4985 INTEGER NFKSPROCESS
4986 COMMON/C_NFKSPROCESS/NFKSPROCESS
4987- integer iforest(2,-max_branch:-1,n_max_cg)
4988- integer sprop(-max_branch:-1,n_max_cg)
4989- integer tprid(-max_branch:-1,n_max_cg)
4990- integer mapconfig(0:n_max_cg)
4991+ integer iforest(2,-max_branch:-1,lmaxconfigs)
4992+ integer sprop(-max_branch:-1,lmaxconfigs)
4993+ integer tprid(-max_branch:-1,lmaxconfigs)
4994+ integer mapconfig(0:lmaxconfigs)
4995 common/c_configs_inc/iforest,sprop,tprid,mapconfig
4996- double precision prmass(-max_branch:nexternal,n_max_cg)
4997- double precision prwidth(-max_branch:-1,n_max_cg)
4998- integer prow(-max_branch:-1,n_max_cg)
4999+ double precision prmass(-max_branch:nexternal,lmaxconfigs)
5000+ double precision prwidth(-max_branch:-1,lmaxconfigs)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: