Merge lp:~mg5core1/mg5amcnlo/2.5.6 into lp:mg5amcnlo/lts
- 2.5.6
- Merge into series2.0
Status: | Merged |
---|---|
Merged at revision: | 274 |
Proposed branch: | lp:~mg5core1/mg5amcnlo/2.5.6 |
Merge into: | lp:mg5amcnlo/lts |
Diff against target: |
30012 lines (+12931/-7078) 292 files modified
MadSpin/decay.py (+9/-4) MadSpin/src/driver.f (+1/-0) Template/LO/Cards/run_card.dat (+1/-1) Template/LO/Source/.make_opts (+22/-8) Template/LO/Source/PDF/pdf.f (+1/-1) Template/LO/Source/PDF/pdg2pdf.f (+5/-0) Template/LO/Source/PDF/pdg2pdf_lhapdf.f (+5/-0) Template/LO/Source/dsample.f (+39/-8) Template/LO/SubProcesses/dummy_fct.f (+47/-0) Template/LO/SubProcesses/genps.f (+184/-94) Template/LO/SubProcesses/makefile (+2/-1) Template/LO/SubProcesses/refine.sh (+1/-1) Template/LO/SubProcesses/unwgt.f (+1/-1) Template/NLO/Cards/run_card.dat (+1/-1) Template/NLO/Cards/shower_card.dat (+1/-1) Template/NLO/FixedOrderAnalysis/HwU.f (+199/-59) Template/NLO/FixedOrderAnalysis/HwU.inc (+0/-22) Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f (+2/-2) Template/NLO/MCatNLO/include/reweight0.inc (+3/-0) Template/NLO/MCatNLO/srcHerwig/madfks_hwdriver.f (+19/-1) Template/NLO/MCatNLO/srcHerwig/madfks_hwlhin.f (+0/-1) Template/NLO/MCatNLO/srcPythia/madfks_pydriver.f (+1/-1) Template/NLO/MCatNLO/srcPythia/madfks_pylhin.f (+0/-1) Template/NLO/MCatNLO/srcPythia8/Pythia8.cc (+2/-2) Template/NLO/MCatNLO/srcPythia8/Pythia82.cc (+2/-2) Template/NLO/MCatNLO/srcPythia8/Pythia82_hep.cc (+2/-2) Template/NLO/MCatNLO/srcPythia8/Pythia8_hep.cc (+2/-2) Template/NLO/Source/alfas_functions_lhapdf.f (+1/-1) Template/NLO/Source/extra_weights.f (+43/-0) Template/NLO/Source/getissud.f (+0/-201) Template/NLO/Source/make_opts.inc (+12/-5) Template/NLO/Source/makefile (+5/-9) Template/NLO/Source/run.inc (+0/-5) Template/NLO/Source/run_config.inc (+0/-54) Template/NLO/Source/setrun.f (+60/-177) Template/NLO/Source/sudgrid.inc (+0/-4) Template/NLO/SubProcesses/add_write_info.f (+0/-1) Template/NLO/SubProcesses/analysis_lhe.f (+6/-5) Template/NLO/SubProcesses/c_weight.inc (+0/-24) Template/NLO/SubProcesses/check_poles.f (+1/-0) Template/NLO/SubProcesses/collect_events.f (+7/-14) Template/NLO/SubProcesses/combine_root.C (+5/-4) Template/NLO/SubProcesses/cuts.f (+39/-24) Template/NLO/SubProcesses/driver_mintFO.f (+11/-10) Template/NLO/SubProcesses/driver_mintMC.f (+30/-27) Template/NLO/SubProcesses/fks_singular.f (+267/-933) Template/NLO/SubProcesses/genps_fks.f (+22/-92) Template/NLO/SubProcesses/handling_lhe_events.f (+52/-30) Template/NLO/SubProcesses/madfks_plot.f (+20/-11) Template/NLO/SubProcesses/makefile (+7/-6) Template/NLO/SubProcesses/makefile_fks_dir (+18/-16) Template/NLO/SubProcesses/mirror.f (+0/-27) Template/NLO/SubProcesses/montecarlocounter.f (+50/-22) Template/NLO/SubProcesses/reweight.f (+14/-14) Template/NLO/SubProcesses/reweight.inc (+0/-39) Template/NLO/SubProcesses/reweight0.inc (+0/-155) Template/NLO/SubProcesses/reweight1.inc (+0/-13) Template/NLO/SubProcesses/reweightNLO.inc (+0/-16) Template/NLO/SubProcesses/reweight_all.inc (+0/-74) Template/NLO/SubProcesses/reweight_xsec.f (+1/-1063) Template/NLO/SubProcesses/reweight_xsec_events.f (+28/-32) Template/NLO/SubProcesses/setcuts.f (+1/-39) Template/NLO/SubProcesses/setscales.f (+1/-5) Template/NLO/SubProcesses/symmetry_fks_test_MC.f (+0/-673) Template/NLO/SubProcesses/symmetry_fks_test_ME.f (+0/-596) Template/NLO/SubProcesses/symmetry_fks_v3.f (+76/-310) Template/NLO/SubProcesses/test_soft_col_limits.f (+542/-0) Template/NLO/SubProcesses/timing_variables.inc (+3/-4) Template/NLO/SubProcesses/trapfpe_secure.c (+0/-86) Template/NLO/SubProcesses/weight_lines.f (+251/-0) Template/NLO/SubProcesses/write_event.f (+7/-53) Template/NLO/Utilities/check_events.f (+164/-92) Template/NLO/Utilities/makefile (+3/-2) Template/RWGTNLO/makefile (+1/-1) Template/loop_material/StandAlone/SubProcesses/makefile (+10/-1) UpdateNotes.txt (+51/-0) VERSION (+2/-1) aloha/create_aloha.py (+10/-7) madgraph/core/base_objects.py (+16/-2) madgraph/core/diagram_generation.py (+3/-4) madgraph/core/helas_objects.py (+2/-2) madgraph/interface/amcatnlo_run_interface.py (+40/-24) madgraph/interface/common_run_interface.py (+101/-56) madgraph/interface/extended_cmd.py (+24/-9) madgraph/interface/loop_interface.py (+26/-9) madgraph/interface/madevent_interface.py (+94/-22) madgraph/interface/madgraph_interface.py (+22/-16) madgraph/interface/madweight_interface.py (+1/-1) madgraph/interface/reweight_interface.py (+745/-638) madgraph/iolibs/export_cpp.py (+3/-2) madgraph/iolibs/export_fks.py (+15/-18) madgraph/iolibs/export_v4.py (+219/-56) madgraph/iolibs/file_writers.py (+52/-0) madgraph/iolibs/files.py (+6/-2) madgraph/iolibs/template_files/born_fks.inc (+33/-10) madgraph/iolibs/template_files/loop/improve_ps.inc (+22/-3) madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc (+9/-0) madgraph/iolibs/template_files/loop_optimized/check_py.f.inc (+40/-5) madgraph/iolibs/template_files/loop_optimized/check_sa.py.inc (+2/-2) madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc (+139/-0) madgraph/iolibs/template_files/loop_optimized/helas_calls_split.inc (+2/-2) madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc (+21/-2) madgraph/iolibs/template_files/loop_optimized/mp_compute_loop_coefs.inc (+20/-4) madgraph/iolibs/template_files/loop_optimized/mp_helas_calls_split.inc (+2/-2) madgraph/iolibs/template_files/madevent_combine_events.f (+16/-5) madgraph/iolibs/template_files/madevent_makefile_source (+5/-5) madgraph/iolibs/template_files/makefile_sa_f2py (+23/-0) madgraph/iolibs/template_files/makefile_sa_f_sp (+1/-1) madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc (+5/-4) madgraph/iolibs/template_files/matrix_standalone_v4.inc (+7/-4) madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc (+2/-0) madgraph/loop/loop_diagram_generation.py (+9/-1) madgraph/loop/loop_exporters.py (+144/-4) madgraph/loop/loop_helas_objects.py (+8/-2) madgraph/madevent/combine_runs.py (+7/-4) madgraph/madevent/gen_crossxhtml.py (+12/-3) madgraph/madevent/gen_ximprove.py (+61/-12) madgraph/madevent/sum_html.py (+30/-7) madgraph/various/banner.py (+31/-17) madgraph/various/cluster.py (+20/-9) madgraph/various/lhe_parser.py (+496/-99) madgraph/various/misc.py (+37/-3) madgraph/various/systematics.py (+149/-18) mg5decay/decay_objects.py (+3/-0) models/check_param_card.py (+5/-3) models/import_ufo.py (+3/-4) models/template_files/fortran/lha_read.f (+2/-2) models/template_files/fortran/lha_read_mp.f (+2/-2) models/usermod.py (+21/-0) tests/acceptance_tests/test_cmd_reweight.py (+268/-5) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f (+35/-11) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%genps.inc (+4/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f (+35/-11) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%genps.inc (+4/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f (+35/-11) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%genps.inc (+4/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f (+37/-13) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f (+37/-13) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f (+37/-13) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f (+5/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f (+35/-11) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%genps.inc (+4/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f (+5/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f (+35/-11) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%genps.inc (+4/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f (+37/-13) tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%genps.inc (+4/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%parton_lum_chooser.f (+0/-4) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f (+11/-9) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f (+7/-4) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f (+25/-3) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+25/-3) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f (+25/-3) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+25/-3) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+25/-3) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f (+25/-3) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f (+25/-3) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f (+25/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f (+5/-4) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f (+7/-4) tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f (+5/-4) tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f (+5/-4) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f (+10/-0) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f (+10/-0) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f (+10/-0) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f (+10/-0) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f (+10/-0) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f (+7/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/f2py_wrapper.f (+37/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/helas_calls_uvct_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/improve_ps.f (+24/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_CT_calls_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f (+25/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_coef_construction_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_compute_loop_coefs.f (+23/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_helas_calls_ampb_1.f (+3/-3) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_helas_calls_uvct_1.f (+3/-3) tests/input_files/loop_smgrav/.restrict_parallel_test.dat (+59/-0) tests/input_files/loop_smgrav/CT_couplings.py (+738/-0) tests/input_files/loop_smgrav/CT_parameters.py (+167/-0) tests/input_files/loop_smgrav/CT_vertices.py (+968/-0) tests/input_files/loop_smgrav/__init__.py (+27/-0) tests/input_files/loop_smgrav/coupling_orders.py (+16/-0) tests/input_files/loop_smgrav/couplings.py (+449/-0) tests/input_files/loop_smgrav/function_library.py (+64/-0) tests/input_files/loop_smgrav/lorentz.py (+194/-0) tests/input_files/loop_smgrav/object_library.py (+333/-0) tests/input_files/loop_smgrav/parameters.py (+829/-0) tests/input_files/loop_smgrav/particles.py (+357/-0) tests/input_files/loop_smgrav/restrict_default.dat (+59/-0) tests/input_files/loop_smgrav/restrict_parallel_test.dat (+59/-0) tests/input_files/loop_smgrav/restrict_test.dat (+61/-0) tests/input_files/loop_smgrav/vertices.py (+830/-0) tests/input_files/loop_smgrav/write_param_card.py (+181/-0) tests/parallel_tests/test_cmd_amcatnlo.py (+1/-1) tests/time_db (+260/-257) tests/unit_tests/interface/test_edit_card.py (+33/-2) tests/unit_tests/iolibs/test_export_fks_EW.py (+1/-5) vendor/DiscreteSampler/DiscreteSampler.f (+1/-1) |
To merge this branch: | bzr merge lp:~mg5core1/mg5amcnlo/2.5.6 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MadTeam | Pending | ||
Review via email: mp+328650@code.launchpad.net |
Commit message
Description of the change
Hi guys,
With Rikkert and Stefano, we agreed to release 2.5.6 this friday.
They are two branch that need to be merged before that:
1) bias_function ( which i need to finish the review --already started--)
2) reweight_mass ( Which both Valentin and Rikkert have started to review)
Two branch have actually already been approved for merging but (as far as I know where not merged already):
HwU_allocated -> Rikkert can you merge it (if you want)
mg5hpc -> That's for me.
I would like to see if it is possible to merge:
maddm_dev (would be review by Valentin)
but if that does not make it, it is not critical.
Anything else that you want to include in this version?
I would actually propose to call it 2.6.0 since this version includes a lot of new features.
Cheers,
Olivier
Stefano Frixione (stefano-frixione) wrote : | # |
Rikkert Frederix (frederix) wrote : | # |
Hi Olivier, Stefano,
I think EW should be 3.0.0.
I don't mind calling it 2.6.0, but 2.5.6 is also fine for me. No strong feelings either way.
HwU_allocated has already been merged a couple of versions ago.
I'm currently testing the reweight_mass with the complete H+2j FxFx. I've got ~500k events. It seems to be a bit faster as the old hand-written reweighting. I'll make some plots this afternoon and check with our previous results.
Cheers,
Rik
- 317. By Rikkert Frederix
-
removed the s-hat as dynamical-
scale-choice option 4. This is not IR safe. - 318. By Rikkert Frederix
-
merge with the bias_function branch
- 319. By Rikkert Frederix
-
Fixed a problem with the bias in split-event generation and the cross
section printed to the screen at the end of the run. - 320. By olivier-mattelaer
-
merge reweight_mass
- 321. By olivier-mattelaer
-
allow syntax set nevents 100k and 1M (in general for all integer variable)
- 322. By marco zaro
-
fix in combine_root.C; variables were declared inside loops but
used also outside - 323. By olivier-mattelaer
-
update iotest
- 324. By olivier-mattelaer
-
fix to put support for lhapdf6.2
- 325. By olivier-mattelaer
-
merge maddm_dev (v.298)
- 326. By olivier-mattelaer
-
merge 2.5.6_cflow_fix
- 327. By olivier-mattelaer
-
update Update note and documentation
- 328. By olivier-mattelaer
-
fixing tests
- 329. By olivier-mattelaer
-
do the reweigthing always in the center of mass frame to avoid loop stability issue
- 330. By olivier-mattelaer
-
fixing test issue + one bug in the re-weighting in output mode 2.0
- 331. By Valentin Hirschi
-
1. Fixed issue in the PY8 histogramming related to
https://bugs.launchpad .net/mg5amcnlo/ +bug/1706139
2. Updated ninja tarball. - 332. By olivier-mattelaer
-
fixing one parralel test
Preview Diff
1 | === modified file 'MadSpin/decay.py' | |||
2 | --- MadSpin/decay.py 2017-05-22 08:05:00 +0000 | |||
3 | +++ MadSpin/decay.py 2017-08-16 21:26:30 +0000 | |||
4 | @@ -207,6 +207,7 @@ | |||
5 | 207 | line+="\n" | 207 | line+="\n" |
6 | 208 | return line | 208 | return line |
7 | 209 | 209 | ||
8 | 210 | |||
9 | 210 | def reshuffle_resonances(self,mother): | 211 | def reshuffle_resonances(self,mother): |
10 | 211 | """ reset the momentum of each resonance in the production event | 212 | """ reset the momentum of each resonance in the production event |
11 | 212 | to the sum of momenta of the daughters | 213 | to the sum of momenta of the daughters |
12 | @@ -222,9 +223,9 @@ | |||
13 | 222 | if self.resonance[index]["mothup1"]==mother: | 223 | if self.resonance[index]["mothup1"]==mother: |
14 | 223 | daughters.append(index) | 224 | daughters.append(index) |
15 | 224 | 225 | ||
19 | 225 | if len(daughters)!=2: | 226 | # if len(daughters)!=2: |
20 | 226 | logger.info("Got more than 2 (%s) daughters for one particles" % len(daughters)) | 227 | # logger.info("Got more than 2 (%s) daughters for one particles" % len(daughters)) |
21 | 227 | logger.info("in one production event (before decay)") | 228 | # logger.info("in one production event (before decay)") |
22 | 228 | 229 | ||
23 | 229 | 230 | ||
24 | 230 | if daughters[0]>0: | 231 | if daughters[0]>0: |
25 | @@ -1633,11 +1634,15 @@ | |||
26 | 1633 | self.ask_edit_cards(['param_card'],[], plot=False) | 1634 | self.ask_edit_cards(['param_card'],[], plot=False) |
27 | 1634 | 1635 | ||
28 | 1635 | 1636 | ||
29 | 1637 | commandline = 'import model %s' % model.get('modelpath+restriction') | ||
30 | 1638 | if not model.mg5_name: | ||
31 | 1639 | commandline += ' --modelname' | ||
32 | 1640 | cmd.exec_cmd(commandline) | ||
33 | 1641 | |||
34 | 1636 | line = 'compute_widths %s %s' % \ | 1642 | line = 'compute_widths %s %s' % \ |
35 | 1637 | (' '.join([str(i) for i in opts['particles']]), | 1643 | (' '.join([str(i) for i in opts['particles']]), |
36 | 1638 | ' '.join('--%s=%s' % (key,value) for (key,value) in opts.items() | 1644 | ' '.join('--%s=%s' % (key,value) for (key,value) in opts.items() |
37 | 1639 | if key not in ['model', 'force', 'particles'] and value)) | 1645 | if key not in ['model', 'force', 'particles'] and value)) |
38 | 1640 | cmd.exec_cmd('import model %s' % model.get('modelpath+restriction')) | ||
39 | 1641 | 1646 | ||
40 | 1642 | #pattern for checking complex mass scheme. | 1647 | #pattern for checking complex mass scheme. |
41 | 1643 | has_cms = re.compile(r'''set\s+complex_mass_scheme\s*(True|T|1|true|$|;)''', re.M) | 1648 | has_cms = re.compile(r'''set\s+complex_mass_scheme\s*(True|T|1|true|$|;)''', re.M) |
42 | 1644 | 1649 | ||
43 | === modified file 'MadSpin/src/driver.f' | |||
44 | --- MadSpin/src/driver.f 2017-03-13 14:10:42 +0000 | |||
45 | +++ MadSpin/src/driver.f 2017-08-16 21:26:30 +0000 | |||
46 | @@ -384,6 +384,7 @@ | |||
47 | 384 | do k=1,nb_mc_masses | 384 | do k=1,nb_mc_masses |
48 | 385 | m(indices_mc_masses(k))=values_mc_masses(k) | 385 | m(indices_mc_masses(k))=values_mc_masses(k) |
49 | 386 | enddo | 386 | enddo |
50 | 387 | ivar=0 | ||
51 | 387 | call generate_momenta_conf(jac,x,itree,qmass,qwidth,ptrial,pprod,map_external2res) | 388 | call generate_momenta_conf(jac,x,itree,qmass,qwidth,ptrial,pprod,map_external2res) |
52 | 388 | 389 | ||
53 | 389 | if (jac.lt.0d0) then | 390 | if (jac.lt.0d0) then |
54 | 390 | 391 | ||
55 | === modified file 'Template/LO/Cards/run_card.dat' | |||
56 | --- Template/LO/Cards/run_card.dat 2016-11-21 14:12:27 +0000 | |||
57 | +++ Template/LO/Cards/run_card.dat 2017-08-16 21:26:30 +0000 | |||
58 | @@ -114,7 +114,6 @@ | |||
59 | 114 | %(pta)s = pta ! minimum pt for the photons | 114 | %(pta)s = pta ! minimum pt for the photons |
60 | 115 | %(ptl)s = ptl ! minimum pt for the charged leptons | 115 | %(ptl)s = ptl ! minimum pt for the charged leptons |
61 | 116 | %(misset)s = misset ! minimum missing Et (sum of neutrino's momenta) | 116 | %(misset)s = misset ! minimum missing Et (sum of neutrino's momenta) |
62 | 117 | %(ptheavy)s = ptheavy ! minimum pt for one heavy final state | ||
63 | 118 | %(ptjmax)s = ptjmax ! maximum pt for the jets | 117 | %(ptjmax)s = ptjmax ! maximum pt for the jets |
64 | 119 | %(ptbmax)s = ptbmax ! maximum pt for the b | 118 | %(ptbmax)s = ptbmax ! maximum pt for the b |
65 | 120 | %(ptamax)s = ptamax ! maximum pt for the photons | 119 | %(ptamax)s = ptamax ! maximum pt for the photons |
66 | @@ -191,6 +190,7 @@ | |||
67 | 191 | #********************************************************************* | 190 | #********************************************************************* |
68 | 192 | # Inclusive cuts * | 191 | # Inclusive cuts * |
69 | 193 | #********************************************************************* | 192 | #********************************************************************* |
70 | 193 | %(ptheavy)s = ptheavy ! minimum pt for at least one heavy final state | ||
71 | 194 | %(xptj)s = xptj ! minimum pt for at least one jet | 194 | %(xptj)s = xptj ! minimum pt for at least one jet |
72 | 195 | %(xptb)s = xptb ! minimum pt for at least one b | 195 | %(xptb)s = xptb ! minimum pt for at least one b |
73 | 196 | %(xpta)s = xpta ! minimum pt for at least one photon | 196 | %(xpta)s = xpta ! minimum pt for at least one photon |
74 | 197 | 197 | ||
75 | === modified file 'Template/LO/Source/.make_opts' | |||
76 | --- Template/LO/Source/.make_opts 2016-12-02 21:56:34 +0000 | |||
77 | +++ Template/LO/Source/.make_opts 2017-08-16 21:26:30 +0000 | |||
78 | @@ -37,9 +37,6 @@ | |||
79 | 37 | CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) | 37 | CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) |
80 | 38 | endif | 38 | endif |
81 | 39 | 39 | ||
82 | 40 | # Increase the number of allowed charcters in a Fortran line | ||
83 | 41 | FFLAGS+= -ffixed-line-length-132 | ||
84 | 42 | |||
85 | 43 | # Set FC unless it's defined by an environment variable | 40 | # Set FC unless it's defined by an environment variable |
86 | 44 | ifeq ($(origin FC),default) | 41 | ifeq ($(origin FC),default) |
87 | 45 | FC=$(DEFAULT_F_COMPILER) | 42 | FC=$(DEFAULT_F_COMPILER) |
88 | @@ -48,6 +45,15 @@ | |||
89 | 48 | F2PY=$(DEFAULT_F2PY_COMPILER) | 45 | F2PY=$(DEFAULT_F2PY_COMPILER) |
90 | 49 | endif | 46 | endif |
91 | 50 | 47 | ||
92 | 48 | # Increase the number of allowed charcters in a Fortran line | ||
93 | 49 | ifeq ($(FC), ftn) | ||
94 | 50 | FFLAGS+= -extend-source # for ifort type of compiler | ||
95 | 51 | else | ||
96 | 52 | FFLAGS+= -ffixed-line-length-132 | ||
97 | 53 | endif | ||
98 | 54 | |||
99 | 55 | |||
100 | 56 | |||
101 | 51 | UNAME := $(shell uname -s) | 57 | UNAME := $(shell uname -s) |
102 | 52 | ifeq ($(origin LDFLAGS), undefined) | 58 | ifeq ($(origin LDFLAGS), undefined) |
103 | 53 | LDFLAGS=$(STDLIB) $(MACFLAG) | 59 | LDFLAGS=$(STDLIB) $(MACFLAG) |
104 | @@ -89,12 +95,20 @@ | |||
105 | 89 | # Option lhapdf | 95 | # Option lhapdf |
106 | 90 | 96 | ||
107 | 91 | ifneq ($(lhapdf),) | 97 | ifneq ($(lhapdf),) |
111 | 92 | CXXFLAGS += $(shell $(lhapdf) --cppflags) | 98 | CXXFLAGS += $(shell $(lhapdf) --cppflags) |
112 | 93 | alfas_functions=alfas_functions_lhapdf | 99 | alfas_functions=alfas_functions_lhapdf |
113 | 94 | llhapdf+= -lLHAPDF | 100 | llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF |
114 | 101 | # check if we need to activate c++11 (for lhapdf6.2) | ||
115 | 102 | ifeq ($(origin CXX),default) | ||
116 | 103 | ifeq ($lhapdfversion$lhapdfsubversion,62) | ||
117 | 104 | CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 | ||
118 | 105 | else | ||
119 | 106 | CXX=$(DEFAULT_CPP_COMPILER) | ||
120 | 107 | endif | ||
121 | 108 | endif | ||
122 | 95 | else | 109 | else |
125 | 96 | alfas_functions=alfas_functions | 110 | alfas_functions=alfas_functions |
126 | 97 | llhapdf= | 111 | llhapdf= |
127 | 98 | endif | 112 | endif |
128 | 99 | 113 | ||
129 | 100 | # Helper function to check MG5 version | 114 | # Helper function to check MG5 version |
130 | 101 | 115 | ||
131 | === modified file 'Template/LO/Source/PDF/pdf.f' | |||
132 | --- Template/LO/Source/PDF/pdf.f 2014-10-20 07:53:19 +0000 | |||
133 | +++ Template/LO/Source/PDF/pdf.f 2017-08-16 21:26:30 +0000 | |||
134 | @@ -14,7 +14,7 @@ | |||
135 | 14 | include 'pdf.inc' | 14 | include 'pdf.inc' |
136 | 15 | C | 15 | C |
137 | 16 | call fdist(ih,x, q, pdf) | 16 | call fdist(ih,x, q, pdf) |
139 | 17 | 17 | ||
140 | 18 | return | 18 | return |
141 | 19 | end | 19 | end |
142 | 20 | 20 | ||
143 | 21 | 21 | ||
144 | === modified file 'Template/LO/Source/PDF/pdg2pdf.f' | |||
145 | --- Template/LO/Source/PDF/pdg2pdf.f 2014-01-07 10:50:42 +0000 | |||
146 | +++ Template/LO/Source/PDF/pdg2pdf.f 2017-08-16 21:26:30 +0000 | |||
147 | @@ -26,6 +26,11 @@ | |||
148 | 26 | data pdlabellast/2*'abcdefg'/ | 26 | data pdlabellast/2*'abcdefg'/ |
149 | 27 | data ihlast/2*-99/ | 27 | data ihlast/2*-99/ |
150 | 28 | 28 | ||
151 | 29 | if (ih.eq.9) then | ||
152 | 30 | pdg2pdf = 1d0 | ||
153 | 31 | return | ||
154 | 32 | endif | ||
155 | 33 | |||
156 | 29 | c Make sure we have a reasonable Bjorken x. Note that even though | 34 | c Make sure we have a reasonable Bjorken x. Note that even though |
157 | 30 | c x=0 is not reasonable, we prefer to simply return pdg2pdf=0 | 35 | c x=0 is not reasonable, we prefer to simply return pdg2pdf=0 |
158 | 31 | c instead of stopping the code, as this might accidentally happen. | 36 | c instead of stopping the code, as this might accidentally happen. |
159 | 32 | 37 | ||
160 | === modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf.f' | |||
161 | --- Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2013-12-09 11:12:33 +0000 | |||
162 | +++ Template/LO/Source/PDF/pdg2pdf_lhapdf.f 2017-08-16 21:26:30 +0000 | |||
163 | @@ -22,6 +22,11 @@ | |||
164 | 22 | data pdflast/30*-99d9/ | 22 | data pdflast/30*-99d9/ |
165 | 23 | data imemlast/2*-99/ | 23 | data imemlast/2*-99/ |
166 | 24 | 24 | ||
167 | 25 | if (ih.eq.9) then | ||
168 | 26 | pdg2pdf =1d0 | ||
169 | 27 | return | ||
170 | 28 | endif | ||
171 | 29 | |||
172 | 25 | c Make sure we have a reasonable Bjorken x. Note that even though | 30 | c Make sure we have a reasonable Bjorken x. Note that even though |
173 | 26 | c x=0 is not reasonable, we prefer to simply return pdg2pdf=0 | 31 | c x=0 is not reasonable, we prefer to simply return pdg2pdf=0 |
174 | 27 | c instead of stopping the code, as this might accidentally happen. | 32 | c instead of stopping the code, as this might accidentally happen. |
175 | 28 | 33 | ||
176 | === modified file 'Template/LO/Source/dsample.f' | |||
177 | --- Template/LO/Source/dsample.f 2015-10-01 10:08:45 +0000 | |||
178 | +++ Template/LO/Source/dsample.f 2017-08-16 21:26:30 +0000 | |||
179 | @@ -997,6 +997,43 @@ | |||
180 | 997 | 997 | ||
181 | 998 | end subroutine write_discrete_grids | 998 | end subroutine write_discrete_grids |
182 | 999 | 999 | ||
183 | 1000 | subroutine write_grid(name) | ||
184 | 1001 | c************************************************************************ | ||
185 | 1002 | c Write out the grid | ||
186 | 1003 | c************************************************************************ | ||
187 | 1004 | implicit none | ||
188 | 1005 | |||
189 | 1006 | character*(*) name | ||
190 | 1007 | |||
191 | 1008 | include 'genps.inc' | ||
192 | 1009 | |||
193 | 1010 | double precision tmean, trmean, tsigma | ||
194 | 1011 | integer dim, events, itm, kn, cur_it, invar, configs | ||
195 | 1012 | common /sample_common/ | ||
196 | 1013 | . tmean, trmean, tsigma, dim, events, itm, kn, cur_it, invar, configs | ||
197 | 1014 | |||
198 | 1015 | double precision twgt, maxwgt,swgt(maxevents) | ||
199 | 1016 | integer lun, nw, itmin | ||
200 | 1017 | common/to_unwgt/twgt, maxwgt, swgt, lun, nw, itmin | ||
201 | 1018 | |||
202 | 1019 | double precision grid(2, ng, 0:maxinvar) | ||
203 | 1020 | common /data_grid/ grid | ||
204 | 1021 | |||
205 | 1022 | double precision force_max_wgt | ||
206 | 1023 | common/unwgt_secondary_max/force_max_wgt | ||
207 | 1024 | |||
208 | 1025 | integer i,j | ||
209 | 1026 | |||
210 | 1027 | open(26, file='ftn26',status='unknown') | ||
211 | 1028 | write(26,fmt='(4f21.17)') ((grid(2,i,j),i=1,ng),j=1,invar) | ||
212 | 1029 | write(26,*) twgt, force_max_wgt | ||
213 | 1030 | c write(26,fmt='(4f21.16)') (alpha(i),i=1,maxconfigs) | ||
214 | 1031 | call write_discrete_grids(26,'ref') | ||
215 | 1032 | close(26) | ||
216 | 1033 | return | ||
217 | 1034 | end | ||
218 | 1035 | |||
219 | 1036 | |||
220 | 1000 | subroutine read_discrete_grids(stream_id) | 1037 | subroutine read_discrete_grids(stream_id) |
221 | 1001 | c************************************************************************ | 1038 | c************************************************************************ |
222 | 1002 | c Write out the grid using the DiscreteSampler module | 1039 | c Write out the grid using the DiscreteSampler module |
223 | @@ -1714,7 +1751,7 @@ | |||
224 | 1714 | if (kn .ge. max_events .and. non_zero .le. 5) then | 1751 | if (kn .ge. max_events .and. non_zero .le. 5) then |
225 | 1715 | call none_pass(max_events) | 1752 | call none_pass(max_events) |
226 | 1716 | endif | 1753 | endif |
228 | 1717 | if (non_zero .eq. events .or. (kn .gt. 200*events .and. | 1754 | if (non_zero .ge. events .or. (kn .gt. 200*events .and. |
229 | 1718 | $ non_zero .gt. 5)) then | 1755 | $ non_zero .gt. 5)) then |
230 | 1719 | 1756 | ||
231 | 1720 | c # special mode where we store information to combine them | 1757 | c # special mode where we store information to combine them |
232 | @@ -2179,13 +2216,7 @@ | |||
233 | 2179 | . /23X,11HCross sec =,e12.4/ | 2216 | . /23X,11HCross sec =,e12.4/ |
234 | 2180 | . 13X,21HChi**2 per DoF. =,f12.4/1X,79(1H-)) | 2217 | . 13X,21HChi**2 per DoF. =,f12.4/1X,79(1H-)) |
235 | 2181 | if (use_cut .ne. 0) then | 2218 | if (use_cut .ne. 0) then |
243 | 2182 | open(26, file='ftn26',status='unknown') | 2219 | call write_grid('ftn26') |
237 | 2183 | write(26,fmt='(4f21.17)') | ||
238 | 2184 | $ ((grid(2,i,j),i=1,ng),j=1,invar) | ||
239 | 2185 | write(26,*) twgt, force_max_wgt | ||
240 | 2186 | call write_discrete_grids(26,'ref') | ||
241 | 2187 | c write(26,fmt='(4f21.17)') (alpha(i),i=1,maxconfigs) | ||
242 | 2188 | close(26) | ||
244 | 2189 | endif | 2220 | endif |
245 | 2190 | call sample_writehtm() | 2221 | call sample_writehtm() |
246 | 2191 | c open(unit=22,file=result_file,status='old', | 2222 | c open(unit=22,file=result_file,status='old', |
247 | 2192 | 2223 | ||
248 | === added file 'Template/LO/SubProcesses/dummy_fct.f' | |||
249 | --- Template/LO/SubProcesses/dummy_fct.f 1970-01-01 00:00:00 +0000 | |||
250 | +++ Template/LO/SubProcesses/dummy_fct.f 2017-08-16 21:26:30 +0000 | |||
251 | @@ -0,0 +1,47 @@ | |||
252 | 1 | subroutine get_dummy_x1(sjac, X1, R, pbeam1, pbeam2, stot, shat) | ||
253 | 2 | implicit none | ||
254 | 3 | include 'maxparticles.inc' | ||
255 | 4 | include 'run.inc' | ||
256 | 5 | c include 'genps.inc' | ||
257 | 6 | double precision sjac ! jacobian. should be updated not reinit | ||
258 | 7 | double precision X1 ! bjorken X. output | ||
259 | 8 | double precision R ! random value after grid transfrormation. between 0 and 1 | ||
260 | 9 | double precision pbeam1(0:3) ! momentum of the first beam (input and/or output) | ||
261 | 10 | double precision pbeam2(0:3) ! momentum of the second beam (input and/or output) | ||
262 | 11 | double precision stot ! total energy (input and /or output) | ||
263 | 12 | double precision shat ! output | ||
264 | 13 | |||
265 | 14 | c global variable to set (or not) | ||
266 | 15 | double precision cm_rap | ||
267 | 16 | logical set_cm_rap | ||
268 | 17 | common/to_cm_rap/set_cm_rap,cm_rap | ||
269 | 18 | |||
270 | 19 | set_cm_rap=.false. ! then cm_rap will be set as .5d0*dlog(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) | ||
271 | 20 | ! ebeam(1) and ebeam(2) are defined here thanks to 'run.inc' | ||
272 | 21 | shat = x1*ebeam(1)*ebeam(2) | ||
273 | 22 | return | ||
274 | 23 | end | ||
275 | 24 | |||
276 | 25 | subroutine get_dummy_x1_x2(sjac, X, R, pbeam1, pbeam2, stot,shat) | ||
277 | 26 | implicit none | ||
278 | 27 | include 'maxparticles.inc' | ||
279 | 28 | include 'run.inc' | ||
280 | 29 | c include 'genps.inc' | ||
281 | 30 | double precision sjac ! jacobian. should be updated not reinit | ||
282 | 31 | double precision X(2) ! bjorken X. output | ||
283 | 32 | double precision R(2) ! random value after grid transfrormation. between 0 and 1 | ||
284 | 33 | double precision pbeam1(0:3) ! momentum of the first beam | ||
285 | 34 | double precision pbeam2(0:3) ! momentum of the second beam | ||
286 | 35 | double precision stot ! total energy | ||
287 | 36 | double precision shat ! output | ||
288 | 37 | |||
289 | 38 | c global variable to set (or not) | ||
290 | 39 | double precision cm_rap | ||
291 | 40 | logical set_cm_rap | ||
292 | 41 | common/to_cm_rap/set_cm_rap,cm_rap | ||
293 | 42 | |||
294 | 43 | set_cm_rap=.false. ! then cm_rap will be set as .5d0*dlog(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) | ||
295 | 44 | ! ebeam(1) and ebeam(2) are defined here thanks to 'run.inc' | ||
296 | 45 | shat = x(1)*x(2)*ebeam(1)*ebeam(2) | ||
297 | 46 | return | ||
298 | 47 | end | ||
299 | 0 | 48 | ||
300 | === modified file 'Template/LO/SubProcesses/genps.f' | |||
301 | --- Template/LO/SubProcesses/genps.f 2016-09-06 15:01:18 +0000 | |||
302 | +++ Template/LO/SubProcesses/genps.f 2017-08-16 21:26:30 +0000 | |||
303 | @@ -124,7 +124,6 @@ | |||
304 | 124 | integer sprop(maxsproc,-max_branch:-1,lmaxconfigs) | 124 | integer sprop(maxsproc,-max_branch:-1,lmaxconfigs) |
305 | 125 | integer tprid(-max_branch:-1,lmaxconfigs) | 125 | integer tprid(-max_branch:-1,lmaxconfigs) |
306 | 126 | common/to_sprop/sprop,tprid | 126 | common/to_sprop/sprop,tprid |
307 | 127 | integer lwgt(0:maxconfigs,maxinvar) | ||
308 | 128 | logical firsttime | 127 | logical firsttime |
309 | 129 | 128 | ||
310 | 130 | double precision xprop(3,nexternal),tprop(3,nexternal) | 129 | double precision xprop(3,nexternal),tprop(3,nexternal) |
311 | @@ -132,7 +131,7 @@ | |||
312 | 132 | integer imatch | 131 | integer imatch |
313 | 133 | save maxwgt | 132 | save maxwgt |
314 | 134 | 133 | ||
316 | 135 | integer ninvar, nconfigs | 134 | integer ninvar |
317 | 136 | 135 | ||
318 | 137 | c | 136 | c |
319 | 138 | c External | 137 | c External |
320 | @@ -142,6 +141,9 @@ | |||
321 | 142 | c | 141 | c |
322 | 143 | c Global | 142 | c Global |
323 | 144 | c | 143 | c |
324 | 144 | integer lwgt(0:maxconfigs,maxinvar) | ||
325 | 145 | common/to_lwgt/lwgt | ||
326 | 146 | |||
327 | 145 | double precision pmass(nexternal) | 147 | double precision pmass(nexternal) |
328 | 146 | common/to_mass/ pmass | 148 | common/to_mass/ pmass |
329 | 147 | 149 | ||
330 | @@ -172,7 +174,6 @@ | |||
331 | 172 | double precision stot,m1,m2 | 174 | double precision stot,m1,m2 |
332 | 173 | common/to_stot/stot,m1,m2 | 175 | common/to_stot/stot,m1,m2 |
333 | 174 | 176 | ||
334 | 175 | save lwgt | ||
335 | 176 | save ndim,nfinal,nbranch,nparticles | 177 | save ndim,nfinal,nbranch,nparticles |
336 | 177 | 178 | ||
337 | 178 | integer jfig,k | 179 | integer jfig,k |
338 | @@ -200,40 +201,7 @@ | |||
339 | 200 | c write(*,*) 'using iconfig',iconfig | 201 | c write(*,*) 'using iconfig',iconfig |
340 | 201 | if (firsttime) then | 202 | if (firsttime) then |
341 | 202 | firsttime=.false. | 203 | firsttime=.false. |
376 | 203 | do i=1,nexternal | 204 | call configure_integral(this_config,mincfig, maxcfig, invar,maxwgt) |
343 | 204 | m(i)=pmass(i) | ||
344 | 205 | enddo | ||
345 | 206 | c Set stot | ||
346 | 207 | if (nincoming.eq.1) then | ||
347 | 208 | stot=m(1)**2 | ||
348 | 209 | else | ||
349 | 210 | m1=m(1) | ||
350 | 211 | m2=m(2) | ||
351 | 212 | if (abs(lpp(1)) .eq. 1 .or. abs(lpp(1)) .eq. 2) m1 = 0.938d0 | ||
352 | 213 | if (abs(lpp(2)) .eq. 1 .or. abs(lpp(2)) .eq. 2) m2 = 0.938d0 | ||
353 | 214 | if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0 | ||
354 | 215 | if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0 | ||
355 | 216 | if(ebeam(1).lt.m1) ebeam(1)=m1 | ||
356 | 217 | if(ebeam(2).lt.m2) ebeam(2)=m2 | ||
357 | 218 | pi1(0)=ebeam(1) | ||
358 | 219 | pi1(3)=sqrt(max(ebeam(1)**2-m1**2, 0d0)) | ||
359 | 220 | pi2(0)=ebeam(2) | ||
360 | 221 | pi2(3)=-sqrt(max(ebeam(2)**2-m2**2, 0d0)) | ||
361 | 222 | stot=m1**2+m2**2+2*(pi1(0)*pi2(0)-pi1(3)*pi2(3)) | ||
362 | 223 | endif | ||
363 | 224 | write(*,'(x,a,f13.2)') 'Set CM energy to ',sqrt(stot) | ||
364 | 225 | c Start graph mapping | ||
365 | 226 | do i=1,mapconfig(0) | ||
366 | 227 | if (mapconfig(i) .eq. iconfig) this_config=i | ||
367 | 228 | enddo | ||
368 | 229 | write(*,*) 'Mapping Graph',iconfig,' to config',this_config | ||
369 | 230 | iconfig = this_config | ||
370 | 231 | nconfigs = 1 | ||
371 | 232 | mincfig=iconfig | ||
372 | 233 | maxcfig=iconfig | ||
373 | 234 | call map_invarients(minvar,nconfigs,ninvar,mincfig,maxcfig,nexternal,nincoming) | ||
374 | 235 | maxwgt=0d0 | ||
375 | 236 | c write(*,'(a,12i4)') 'Summing configs',(isym(i),i=1,isym(0)) | ||
377 | 237 | nparticles = nexternal | 205 | nparticles = nexternal |
378 | 238 | nfinal = nparticles-nincoming | 206 | nfinal = nparticles-nincoming |
379 | 239 | nbranch = nparticles-2 | 207 | nbranch = nparticles-2 |
380 | @@ -241,51 +209,10 @@ | |||
381 | 241 | if (ndim .lt. 0) ndim = 0 !For 2->1 processes tjs 5/24/2010 | 209 | if (ndim .lt. 0) ndim = 0 !For 2->1 processes tjs 5/24/2010 |
382 | 242 | if (abs(lpp(1)) .ge. 1) ndim=ndim+1 | 210 | if (abs(lpp(1)) .ge. 1) ndim=ndim+1 |
383 | 243 | if (abs(lpp(2)) .ge. 1) ndim=ndim+1 | 211 | if (abs(lpp(2)) .ge. 1) ndim=ndim+1 |
397 | 244 | call set_peaks | 212 | do i=1,nexternal |
398 | 245 | if (.false. ) then | 213 | m(i)=pmass(i) |
399 | 246 | call find_matches(iconfig,isym(0)) | 214 | enddo |
387 | 247 | write(*,'(a,12i4)') 'Summing configs',(isym(i),i=1,isym(0)) | ||
388 | 248 | endif | ||
389 | 249 | if (.false.) then | ||
390 | 250 | i=1 | ||
391 | 251 | do while (mapconfig(i) .ne. iconfig | ||
392 | 252 | $ .and. i .lt. mapconfig(0)) | ||
393 | 253 | i=i+1 | ||
394 | 254 | enddo | ||
395 | 255 | endif | ||
396 | 256 | |||
400 | 257 | write(*,'(a,12e10.3)') ' Masses:',(m(i),i=1,nparticles) | 215 | write(*,'(a,12e10.3)') ' Masses:',(m(i),i=1,nparticles) |
401 | 258 | do j=1,invar | ||
402 | 259 | lwgt(0,j)=0 | ||
403 | 260 | enddo | ||
404 | 261 | c | ||
405 | 262 | c Here we set up which diagrams contribute to each variable | ||
406 | 263 | c in principle more than 1 diagram can contribute to a variable | ||
407 | 264 | c if we believe they will have identical structure. | ||
408 | 265 | c | ||
409 | 266 | c do i=1,mapconfig(0) | ||
410 | 267 | do i=mincfig,maxcfig | ||
411 | 268 | c do k=1,isym(0) | ||
412 | 269 | c i = isym(k) | ||
413 | 270 | write(*,'(15i4)') i,(minvar(j,i),j=1,ndim) | ||
414 | 271 | do j=1,ndim | ||
415 | 272 | ipole = minvar(j,i) | ||
416 | 273 | if (ipole .ne. 0) then | ||
417 | 274 | n = lwgt(0,ipole)+1 | ||
418 | 275 | lwgt(n,ipole)=mapconfig(i) | ||
419 | 276 | lwgt(0,ipole)=n | ||
420 | 277 | endif | ||
421 | 278 | enddo | ||
422 | 279 | enddo | ||
423 | 280 | |||
424 | 281 | c Initialize dsig (needed for subprocess group running mode) | ||
425 | 282 | dum=dsig(0,0,1) | ||
426 | 283 | |||
427 | 284 | else | ||
428 | 285 | do i=1,11 | ||
429 | 286 | c swidth(i)=-5d0 !tells us to use the same point over again | ||
430 | 287 | enddo | ||
431 | 288 | c swidth(10)=0d0 | ||
432 | 289 | endif !First_time | 216 | endif !First_time |
433 | 290 | 217 | ||
434 | 291 | if (.false.) then | 218 | if (.false.) then |
435 | @@ -301,24 +228,48 @@ | |||
436 | 301 | xbk(2) = 1d0 | 228 | xbk(2) = 1d0 |
437 | 302 | sjac = 1d0 | 229 | sjac = 1d0 |
438 | 303 | if (abs(lpp(1)) .ge. 1 .and. abs(lpp(2)) .ge. 1) then | 230 | if (abs(lpp(1)) .ge. 1 .and. abs(lpp(2)) .ge. 1) then |
440 | 304 | call sample_get_x(sjac,x(ndim-1),ndim-1,mincfig,0d0,1d0) | 231 | if (abs(lpp(1)).eq.9.or.abs(lpp(2)).eq.9)then |
441 | 232 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) | ||
442 | 233 | call sample_get_x(sjac,x(ndim-1),ndim-1,mincfig,0d0,1d0) | ||
443 | 234 | call get_dummy_x1_x2(sjac, Xbk(1), x(ndim-1),pi1, pi2, stot, s(-nbranch)) | ||
444 | 235 | if (.not.set_cm_rap)then | ||
445 | 236 | cm_rap=.5d0*dlog(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) | ||
446 | 237 | set_cm_rap=.true. | ||
447 | 238 | endif | ||
448 | 239 | else | ||
449 | 240 | call sample_get_x(sjac,x(ndim-1),ndim-1,mincfig,0d0,1d0) | ||
450 | 305 | c----- | 241 | c----- |
451 | 306 | c tjs 5/24/2010 for 2->1 process | 242 | c tjs 5/24/2010 for 2->1 process |
452 | 307 | c------- | 243 | c------- |
457 | 308 | xtau = x(ndim-1) | 244 | xtau = x(ndim-1) |
458 | 309 | if(nexternal .eq. 3) then | 245 | if(nexternal .eq. 3) then |
459 | 310 | x(ndim-1) = pmass(3)*pmass(3)/stot | 246 | x(ndim-1) = pmass(3)*pmass(3)/stot |
460 | 311 | sjac=1 / stot !for delta function in d_tau | 247 | sjac=1 / stot !for delta function in d_tau |
461 | 248 | endif | ||
462 | 249 | |||
463 | 250 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) | ||
464 | 251 | CALL GENCMS(STOT,Xbk(1),Xbk(2),X(ndim-1), SMIN,SJAC) | ||
465 | 252 | x(ndim-1) = xtau !Fix for 2->1 process | ||
466 | 253 | c Set CM rapidity for use in the rap() function | ||
467 | 254 | cm_rap=.5d0*dlog(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) | ||
468 | 255 | set_cm_rap=.true. | ||
469 | 256 | c Set shat | ||
470 | 257 | s(-nbranch) = xbk(1)*xbk(2)*stot | ||
471 | 312 | endif | 258 | endif |
472 | 313 | 259 | ||
473 | 260 | elseif (lpp(1).eq.9.or.lpp(2).eq.9) then | ||
474 | 314 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) | 261 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) |
482 | 315 | CALL GENCMS(STOT,Xbk(1),Xbk(2),X(ndim-1), SMIN,SJAC) | 262 | if (lpp(1).eq.9)then |
483 | 316 | x(ndim-1) = xtau !Fix for 2->1 process | 263 | call get_dummy_x1(sjac, xbk(1), x(ndim), pi1, pi2, stot, s(-nbranch)) |
484 | 317 | c Set CM rapidity for use in the rap() function | 264 | xbk(2) = 1d0 |
485 | 318 | cm_rap=.5d0*dlog(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) | 265 | else |
486 | 319 | set_cm_rap=.true. | 266 | call get_dummy_x1(sjac, xbk(2), x(ndim), pi1, pi2, stot, s(-nbranch)) |
487 | 320 | c Set shat | 267 | xbk(1) = 1d0 |
488 | 321 | s(-nbranch) = xbk(1)*xbk(2)*stot | 268 | endif |
489 | 269 | if (.not.set_cm_rap)then | ||
490 | 270 | cm_rap=.5d0*dlog(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) | ||
491 | 271 | set_cm_rap=.true. | ||
492 | 272 | endif | ||
493 | 322 | elseif (abs(lpp(1)) .ge. 1) then | 273 | elseif (abs(lpp(1)) .ge. 1) then |
494 | 323 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) | 274 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) |
495 | 324 | xbk(1) = x(ndim) | 275 | xbk(1) = x(ndim) |
496 | @@ -360,7 +311,10 @@ | |||
497 | 360 | c | 311 | c |
498 | 361 | c First Generate Momentum for initial state particles | 312 | c First Generate Momentum for initial state particles |
499 | 362 | c | 313 | c |
501 | 363 | if(nincoming.eq.2) then | 314 | if (lpp(1).eq.9.or.lpp(2).eq.9)then |
502 | 315 | p(:,1) = pi1(:) | ||
503 | 316 | p(:,2) = pi2(:) | ||
504 | 317 | else if(nincoming.eq.2) then | ||
505 | 364 | call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2)) | 318 | call mom2cx(m(-nbranch),m(1),m(2),1d0,0d0,p(0,1),p(0,2)) |
506 | 365 | else | 319 | else |
507 | 366 | do i=0,3 | 320 | do i=0,3 |
508 | @@ -548,6 +502,138 @@ | |||
509 | 548 | end | 502 | end |
510 | 549 | 503 | ||
511 | 550 | 504 | ||
512 | 505 | subroutine configure_integral(iconfig,mincfig,maxcfig,invar,maxwgt) | ||
513 | 506 | c************************************************************************** | ||
514 | 507 | c inputs iconfig == Current configuration working on | ||
515 | 508 | c output m | ||
516 | 509 | c************************************************************************** | ||
517 | 510 | |||
518 | 511 | implicit none | ||
519 | 512 | |||
520 | 513 | include 'genps.inc' | ||
521 | 514 | include 'maxconfigs.inc' | ||
522 | 515 | include 'nexternal.inc' | ||
523 | 516 | include 'maxamps.inc' | ||
524 | 517 | include 'run.inc' | ||
525 | 518 | |||
526 | 519 | c local | ||
527 | 520 | double precision pi1(0:3),pi2(0:3),p0,p3 | ||
528 | 521 | double precision dum | ||
529 | 522 | integer i,j,ipole,n | ||
530 | 523 | integer nbranch,ndim,nconfigs | ||
531 | 524 | integer ninvar | ||
532 | 525 | integer nparticles,nfinal | ||
533 | 526 | |||
534 | 527 | |||
535 | 528 | c | ||
536 | 529 | c Arguments | ||
537 | 530 | c | ||
538 | 531 | integer iconfig,mincfig,maxcfig,invar | ||
539 | 532 | double precision maxwgt | ||
540 | 533 | c | ||
541 | 534 | c External | ||
542 | 535 | c | ||
543 | 536 | double precision lambda,dot,dsig | ||
544 | 537 | logical passcuts | ||
545 | 538 | |||
546 | 539 | |||
547 | 540 | logical firsttime | ||
548 | 541 | data firsttime/.true./ | ||
549 | 542 | save firsttime | ||
550 | 543 | c | ||
551 | 544 | c global | ||
552 | 545 | c | ||
553 | 546 | double precision M(-max_branch:max_particles) | ||
554 | 547 | |||
555 | 548 | double precision pmass(nexternal) | ||
556 | 549 | common/to_mass/ pmass | ||
557 | 550 | |||
558 | 551 | double precision stot,m1,m2 | ||
559 | 552 | common/to_stot/stot,m1,m2 | ||
560 | 553 | |||
561 | 554 | integer mapconfig(0:lmaxconfigs), this_config | ||
562 | 555 | common/to_mconfigs/mapconfig, this_config | ||
563 | 556 | |||
564 | 557 | integer Minvar(maxdim,lmaxconfigs) | ||
565 | 558 | common /to_invar/ Minvar | ||
566 | 559 | |||
567 | 560 | integer lwgt(0:maxconfigs,maxinvar) | ||
568 | 561 | common/to_lwgt/lwgt | ||
569 | 562 | |||
570 | 563 | if (firsttime)then | ||
571 | 564 | firsttime=.false. | ||
572 | 565 | do i=1,nexternal | ||
573 | 566 | m(i)=pmass(i) | ||
574 | 567 | enddo | ||
575 | 568 | c Set stot | ||
576 | 569 | if (nincoming.eq.1) then | ||
577 | 570 | stot=m(1)**2 | ||
578 | 571 | else | ||
579 | 572 | m1=m(1) | ||
580 | 573 | m2=m(2) | ||
581 | 574 | if (abs(lpp(1)) .eq. 1 .or. abs(lpp(1)) .eq. 2) m1 = 0.938d0 | ||
582 | 575 | if (abs(lpp(2)) .eq. 1 .or. abs(lpp(2)) .eq. 2) m2 = 0.938d0 | ||
583 | 576 | if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0 | ||
584 | 577 | if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0 | ||
585 | 578 | if(ebeam(1).lt.m1.and.lpp(1).ne.9) ebeam(1)=m1 | ||
586 | 579 | if(ebeam(2).lt.m2.and.lpp(2).ne.9) ebeam(2)=m2 | ||
587 | 580 | pi1(0)=ebeam(1) | ||
588 | 581 | pi1(3)=sqrt(max(ebeam(1)**2-m1**2, 0d0)) | ||
589 | 582 | pi2(0)=ebeam(2) | ||
590 | 583 | pi2(3)=-sqrt(max(ebeam(2)**2-m2**2, 0d0)) | ||
591 | 584 | stot=m1**2+m2**2+2*(pi1(0)*pi2(0)-pi1(3)*pi2(3)) | ||
592 | 585 | endif | ||
593 | 586 | write(*,'(x,a,f13.2)') 'Set CM energy to ',sqrt(stot) | ||
594 | 587 | endif | ||
595 | 588 | c Start graph mapping | ||
596 | 589 | do i=1,mapconfig(0) | ||
597 | 590 | if (mapconfig(i) .eq. iconfig) this_config=i | ||
598 | 591 | enddo | ||
599 | 592 | write(*,*) 'Mapping Graph',iconfig,' to config',this_config | ||
600 | 593 | iconfig = this_config | ||
601 | 594 | nconfigs = 1 | ||
602 | 595 | mincfig=iconfig | ||
603 | 596 | maxcfig=iconfig | ||
604 | 597 | call map_invarients(minvar,nconfigs,ninvar,mincfig,maxcfig,nexternal,nincoming) | ||
605 | 598 | maxwgt=0d0 | ||
606 | 599 | c write(*,'(a,12i4)') 'Summing configs',(isym(i),i=1,isym(0)) | ||
607 | 600 | nparticles = nexternal | ||
608 | 601 | nfinal = nparticles-nincoming | ||
609 | 602 | nbranch = nparticles-2 | ||
610 | 603 | ndim = 3*nfinal-4 | ||
611 | 604 | if (ndim .lt. 0) ndim = 0 !For 2->1 processes tjs 5/24/2010 | ||
612 | 605 | if (abs(lpp(1)) .ge. 1) ndim=ndim+1 | ||
613 | 606 | if (abs(lpp(2)) .ge. 1) ndim=ndim+1 | ||
614 | 607 | call set_peaks | ||
615 | 608 | do j=1,invar | ||
616 | 609 | lwgt(0,j)=0 | ||
617 | 610 | enddo | ||
618 | 611 | c | ||
619 | 612 | c Here we set up which diagrams contribute to each variable | ||
620 | 613 | c in principle more than 1 diagram can contribute to a variable | ||
621 | 614 | c if we believe they will have identical structure. | ||
622 | 615 | c | ||
623 | 616 | c do i=1,mapconfig(0) | ||
624 | 617 | do i=mincfig,maxcfig | ||
625 | 618 | c do k=1,isym(0) | ||
626 | 619 | c i = isym(k) | ||
627 | 620 | write(*,'(15i4)') i,(minvar(j,i),j=1,ndim) | ||
628 | 621 | do j=1,ndim | ||
629 | 622 | ipole = minvar(j,i) | ||
630 | 623 | if (ipole .ne. 0) then | ||
631 | 624 | n = lwgt(0,ipole)+1 | ||
632 | 625 | lwgt(n,ipole)=mapconfig(i) | ||
633 | 626 | lwgt(0,ipole)=n | ||
634 | 627 | endif | ||
635 | 628 | enddo | ||
636 | 629 | enddo | ||
637 | 630 | |||
638 | 631 | c Initialize dsig (needed for subprocess group running mode) | ||
639 | 632 | dum=dsig(0,0,1) | ||
640 | 633 | |||
641 | 634 | return | ||
642 | 635 | end | ||
643 | 636 | |||
644 | 551 | subroutine one_tree(itree,iconfig,nbranch,P,M,S,X,jac,pswgt) | 637 | subroutine one_tree(itree,iconfig,nbranch,P,M,S,X,jac,pswgt) |
645 | 552 | c************************************************************************ | 638 | c************************************************************************ |
646 | 553 | c Calculates the momentum for everything below in the tree until | 639 | c Calculates the momentum for everything below in the tree until |
647 | @@ -1180,3 +1266,7 @@ | |||
648 | 1180 | X2 = SQRT(TAU)*EXP(-ETA) | 1266 | X2 = SQRT(TAU)*EXP(-ETA) |
649 | 1181 | 1267 | ||
650 | 1182 | END | 1268 | END |
651 | 1269 | |||
652 | 1270 | |||
653 | 1271 | |||
654 | 1272 | |||
655 | 1183 | 1273 | ||
656 | === modified file 'Template/LO/SubProcesses/makefile' | |||
657 | --- Template/LO/SubProcesses/makefile 2017-03-13 20:27:08 +0000 | |||
658 | +++ Template/LO/SubProcesses/makefile 2017-08-16 21:26:30 +0000 | |||
659 | @@ -32,7 +32,7 @@ | |||
660 | 32 | 32 | ||
661 | 33 | PROCESS= driver.o myamp.o genps.o unwgt.o setcuts.o get_color.o \ | 33 | PROCESS= driver.o myamp.o genps.o unwgt.o setcuts.o get_color.o \ |
662 | 34 | cuts.o cluster.o reweight.o initcluster.o addmothers.o setscales.o \ | 34 | cuts.o cluster.o reweight.o initcluster.o addmothers.o setscales.o \ |
664 | 35 | idenparts.o \ | 35 | idenparts.o dummy_fct.o \ |
665 | 36 | $(patsubst %.f,%.o,$(wildcard auto_dsig*.f)) \ | 36 | $(patsubst %.f,%.o,$(wildcard auto_dsig*.f)) \ |
666 | 37 | $(patsubst %.f,%.o,$(wildcard matrix*.f)) | 37 | $(patsubst %.f,%.o,$(wildcard matrix*.f)) |
667 | 38 | 38 | ||
668 | @@ -64,6 +64,7 @@ | |||
669 | 64 | driver.f: genps.inc | 64 | driver.f: genps.inc |
670 | 65 | symmetry.o: genps.inc nexternal.inc configs.inc run_config.inc | 65 | symmetry.o: genps.inc nexternal.inc configs.inc run_config.inc |
671 | 66 | genps.o: genps.inc nexternal.inc configs.inc | 66 | genps.o: genps.inc nexternal.inc configs.inc |
672 | 67 | dummy_fct.0: run.inc genps.inc | ||
673 | 67 | cuts.o: genps.inc nexternal.inc pmass.inc | 68 | cuts.o: genps.inc nexternal.inc pmass.inc |
674 | 68 | setcuts.o: genps.inc run_config.inc | 69 | setcuts.o: genps.inc run_config.inc |
675 | 69 | invarients.o: genps.inc nexternal.inc | 70 | invarients.o: genps.inc nexternal.inc |
676 | 70 | 71 | ||
677 | === modified file 'Template/LO/SubProcesses/refine.sh' | |||
678 | --- Template/LO/SubProcesses/refine.sh 2016-06-12 00:01:23 +0000 | |||
679 | +++ Template/LO/SubProcesses/refine.sh 2017-08-16 21:26:30 +0000 | |||
680 | @@ -89,7 +89,7 @@ | |||
681 | 89 | if [ "$keeplog" = true ] ; then | 89 | if [ "$keeplog" = true ] ; then |
682 | 90 | echo "" >> $k; echo "ls status:" >> $k; ls >> $k | 90 | echo "" >> $k; echo "ls status:" >> $k; ls >> $k |
683 | 91 | else | 91 | else |
685 | 92 | rm ftn26 > /dev/null | 92 | rm ftn26 &> /dev/null |
686 | 93 | fi | 93 | fi |
687 | 94 | 94 | ||
688 | 95 | 95 | ||
689 | 96 | 96 | ||
690 | === modified file 'Template/LO/SubProcesses/unwgt.f' | |||
691 | --- Template/LO/SubProcesses/unwgt.f 2016-09-03 13:26:00 +0000 | |||
692 | +++ Template/LO/SubProcesses/unwgt.f 2017-08-16 21:26:30 +0000 | |||
693 | @@ -603,7 +603,7 @@ | |||
694 | 603 | if (nincoming.eq.2) then | 603 | if (nincoming.eq.2) then |
695 | 604 | if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. | 604 | if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. |
696 | 605 | $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then | 605 | $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then |
698 | 606 | if(xbk(1).eq.1d0.or.pmass(1).eq.0d0) then | 606 | if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then |
699 | 607 | ! construct the beam momenta in each frame and compute the related (z)boost | 607 | ! construct the beam momenta in each frame and compute the related (z)boost |
700 | 608 | ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam | 608 | ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam |
701 | 609 | ebi(1) = 0 | 609 | ebi(1) = 0 |
702 | 610 | 610 | ||
703 | === modified file 'Template/NLO/Cards/run_card.dat' | |||
704 | --- Template/NLO/Cards/run_card.dat 2016-09-08 23:15:34 +0000 | |||
705 | +++ Template/NLO/Cards/run_card.dat 2017-08-16 21:26:30 +0000 | |||
706 | @@ -36,7 +36,7 @@ | |||
707 | 36 | # Normalize the weights of LHE events such that they sum or average to * | 36 | # Normalize the weights of LHE events such that they sum or average to * |
708 | 37 | # the total cross section * | 37 | # the total cross section * |
709 | 38 | #*********************************************************************** | 38 | #*********************************************************************** |
711 | 39 | %(event_norm)s = event_norm ! average or sum | 39 | %(event_norm)s = event_norm ! valid settings: average, sum, bias |
712 | 40 | #*********************************************************************** | 40 | #*********************************************************************** |
713 | 41 | # Number of points per itegration channel (ignored for aMC@NLO runs) * | 41 | # Number of points per itegration channel (ignored for aMC@NLO runs) * |
714 | 42 | #*********************************************************************** | 42 | #*********************************************************************** |
715 | 43 | 43 | ||
716 | === modified file 'Template/NLO/Cards/shower_card.dat' | |||
717 | --- Template/NLO/Cards/shower_card.dat 2016-02-19 13:21:36 +0000 | |||
718 | +++ Template/NLO/Cards/shower_card.dat 2017-08-16 21:26:30 +0000 | |||
719 | @@ -27,7 +27,7 @@ | |||
720 | 27 | #*********************************************************************** | 27 | #*********************************************************************** |
721 | 28 | # PDFs and non-perturbative modelling * | 28 | # PDFs and non-perturbative modelling * |
722 | 29 | #*********************************************************************** | 29 | #*********************************************************************** |
724 | 30 | pdfcode = 0 # 0 = internal, 1 = same as NLO, other = lhaglue | 30 | pdfcode = 1 # 0 = internal, 1 = same as NLO, other = lhaglue |
725 | 31 | ue_enabled = F # underlying event | 31 | ue_enabled = F # underlying event |
726 | 32 | hadronize = T # hadronisation on/off !IGNORED BY HERWIG6! | 32 | hadronize = T # hadronisation on/off !IGNORED BY HERWIG6! |
727 | 33 | lambda_5 = -1 # Lambda_5 (< 0 = default) !IGNORED BY PYTHIA8! | 33 | lambda_5 = -1 # Lambda_5 (< 0 = default) !IGNORED BY PYTHIA8! |
728 | 34 | 34 | ||
729 | === modified file 'Template/NLO/FixedOrderAnalysis/HwU.f' | |||
730 | --- Template/NLO/FixedOrderAnalysis/HwU.f 2017-02-03 13:37:36 +0000 | |||
731 | +++ Template/NLO/FixedOrderAnalysis/HwU.f 2017-08-16 21:26:30 +0000 | |||
732 | @@ -1,7 +1,7 @@ | |||
733 | 1 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | 1 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
734 | 2 | C C | 2 | C C |
735 | 3 | C HwU: Histograms with Uncertainties C | 3 | C HwU: Histograms with Uncertainties C |
737 | 4 | C By Rikkert Frederix, Dec. 2014 C | 4 | C By Rikkert Frederix, 12-2014--05-2017 C |
738 | 5 | C C | 5 | C C |
739 | 6 | C Book, fill and write out histograms. Particularly suited for NLO C | 6 | C Book, fill and write out histograms. Particularly suited for NLO C |
740 | 7 | C computations with correlations between points (ie. event and C | 7 | C computations with correlations between points (ie. event and C |
741 | @@ -9,26 +9,41 @@ | |||
742 | 9 | C and PDF uncertainties through reweighting). C | 9 | C and PDF uncertainties through reweighting). C |
743 | 10 | C C | 10 | C C |
744 | 11 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | 11 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
745 | 12 | |||
746 | 13 | c The module contains effectively the common block with allocatable | ||
747 | 14 | c variables (something not possible in old fortran version) | ||
748 | 15 | module HwU_variables | ||
749 | 16 | implicit none | ||
750 | 17 | integer :: max_plots,max_points,max_bins,nwgts,np | ||
751 | 18 | integer :: error_estimation=3 | ||
752 | 19 | logical, allocatable :: booked(:) | ||
753 | 20 | integer, allocatable :: nbin(:),histi(:,:),p_bin(:),p_label(:) | ||
754 | 21 | character(len=50), allocatable :: title(:) | ||
755 | 22 | character(len=50), allocatable :: wgts_info(:) | ||
756 | 23 | double precision, allocatable :: histy(:,:,:),histy_acc(:,:,:) | ||
757 | 24 | $ ,histy2(:,:),histy_err(:,:),histxl(:,:),histxm(:,:) | ||
758 | 25 | $ ,step(:),p_wgts(:,:) | ||
759 | 26 | save | ||
760 | 27 | end module HwU_variables | ||
761 | 28 | |||
762 | 12 | 29 | ||
763 | 13 | c To be called once at the start of each run. Initialises the packages | 30 | c To be called once at the start of each run. Initialises the packages |
764 | 14 | c and sets the number of weights that need to be included for each point. | 31 | c and sets the number of weights that need to be included for each point. |
765 | 15 | subroutine HwU_inithist(nweights,wgt_info) | 32 | subroutine HwU_inithist(nweights,wgt_info) |
766 | 33 | use HwU_variables | ||
767 | 16 | implicit none | 34 | implicit none |
768 | 17 | include "HwU.inc" | ||
769 | 18 | integer i,nweights | 35 | integer i,nweights |
770 | 19 | character*(*) wgt_info(*) | 36 | character*(*) wgt_info(*) |
774 | 20 | do i=1,max_plots | 37 | call HwU_deallocate_all |
775 | 21 | booked(i)=.false. | 38 | max_plots=0 |
776 | 22 | enddo | 39 | max_points=0 |
777 | 40 | max_bins=0 | ||
778 | 41 | np=0 | ||
779 | 23 | c Number of weights associated to each point. Note that the first | 42 | c Number of weights associated to each point. Note that the first |
780 | 24 | c weight should always be the 'central value' and it should not be | 43 | c weight should always be the 'central value' and it should not be |
781 | 25 | c zero if any of the other weights are non-zero. | 44 | c zero if any of the other weights are non-zero. |
782 | 26 | nwgts=nweights | 45 | nwgts=nweights |
788 | 27 | if (nwgts.gt.max_wgts) then | 46 | allocate(wgts_info(nwgts)) |
784 | 28 | write (*,*) 'ERROR: increase max_wgts in HwU histogramming' | ||
785 | 29 | $ ,max_wgts,nwgts | ||
786 | 30 | stop 1 | ||
787 | 31 | endif | ||
789 | 32 | do i=1,nwgts | 47 | do i=1,nwgts |
790 | 33 | wgts_info(i)=wgt_info(i) | 48 | wgts_info(i)=wgt_info(i) |
791 | 34 | enddo | 49 | enddo |
792 | @@ -48,10 +63,9 @@ | |||
793 | 48 | c square root of the sum of the squares. Perform a weighted average | 63 | c square root of the sum of the squares. Perform a weighted average |
794 | 49 | c iteration-by-iteration | 64 | c iteration-by-iteration |
795 | 50 | c input 3: Same as input 2, but weighted average is same as from MINT | 65 | c input 3: Same as input 2, but weighted average is same as from MINT |
796 | 66 | use HwU_variables | ||
797 | 51 | implicit none | 67 | implicit none |
798 | 52 | integer input | 68 | integer input |
799 | 53 | integer error_estimation | ||
800 | 54 | common /HwU_common2/ error_estimation | ||
801 | 55 | if (input.ge.0 .and. input.le.3) then | 69 | if (input.ge.0 .and. input.le.3) then |
802 | 56 | error_estimation=input | 70 | error_estimation=input |
803 | 57 | else | 71 | else |
804 | @@ -60,39 +74,20 @@ | |||
805 | 60 | endif | 74 | endif |
806 | 61 | return | 75 | return |
807 | 62 | end | 76 | end |
820 | 63 | 77 | ||
809 | 64 | block data HwU | ||
810 | 65 | c set the default for the error estimation method. To reduce the size of | ||
811 | 66 | c the executable, put the error_estimation variable in a separate common | ||
812 | 67 | c block. If we would have included the 'HwU.inc' file here, that | ||
813 | 68 | c complete common block seems to be included in the size executable | ||
814 | 69 | c (approx. 110 MB). | ||
815 | 70 | integer error_estimation | ||
816 | 71 | common /HwU_common2/ error_estimation | ||
817 | 72 | data error_estimation /3/ | ||
818 | 73 | end | ||
819 | 74 | |||
821 | 75 | c Book the histograms at the start of the run. Give a 'label' (an | 78 | c Book the histograms at the start of the run. Give a 'label' (an |
822 | 76 | c integer) that identifies the plot when filling it and a title | 79 | c integer) that identifies the plot when filling it and a title |
823 | 77 | c ('title_l') for each plot. Also the number of bins ('nbin_l') and the | 80 | c ('title_l') for each plot. Also the number of bins ('nbin_l') and the |
824 | 78 | c plot range (from 'xmin' to 'xmax') should be given. | 81 | c plot range (from 'xmin' to 'xmax') should be given. |
825 | 79 | subroutine HwU_book(label,title_l,nbin_l,xmin,xmax) | 82 | subroutine HwU_book(label,title_l,nbin_l,xmin,xmax) |
826 | 83 | use HwU_variables | ||
827 | 80 | implicit none | 84 | implicit none |
828 | 81 | include "HwU.inc" | ||
829 | 82 | integer label,nbin_l,i,j | 85 | integer label,nbin_l,i,j |
830 | 83 | character*(*) title_l | 86 | character*(*) title_l |
831 | 84 | double precision xmin,xmax | 87 | double precision xmin,xmax |
843 | 85 | c Check that label and number of bins are reasonable | 88 | c Allocate space for new histograms if needed |
844 | 86 | if (label.gt.max_plots) then | 89 | call HwU_allocate_histo(label,nbin_l) |
845 | 87 | write (*,*) 'ERROR: increase max_plots in HwU histogramming' | 90 | c Setup the histogram |
835 | 88 | $ ,max_plots, label | ||
836 | 89 | stop 1 | ||
837 | 90 | endif | ||
838 | 91 | if (nbin_l.gt.max_bins) then | ||
839 | 92 | write (*,*) 'ERROR: increase max_bins in HwU histogramming' | ||
840 | 93 | $ ,max_bins,nbin_l | ||
841 | 94 | stop 1 | ||
842 | 95 | endif | ||
846 | 96 | booked(label)=.true. | 91 | booked(label)=.true. |
847 | 97 | title(label)=title_l | 92 | title(label)=title_l |
848 | 98 | nbin(label)=nbin_l | 93 | nbin(label)=nbin_l |
849 | @@ -111,7 +106,6 @@ | |||
850 | 111 | histy2(label,i)=0d0 | 106 | histy2(label,i)=0d0 |
851 | 112 | histy_err(label,i)=0d0 | 107 | histy_err(label,i)=0d0 |
852 | 113 | enddo | 108 | enddo |
853 | 114 | np=0 | ||
854 | 115 | return | 109 | return |
855 | 116 | end | 110 | end |
856 | 117 | 111 | ||
857 | @@ -121,8 +115,8 @@ | |||
858 | 121 | c the 'HwU_inithist' subroutine. That means that each point should have | 115 | c the 'HwU_inithist' subroutine. That means that each point should have |
859 | 122 | c the same number of weights. | 116 | c the same number of weights. |
860 | 123 | subroutine HwU_fill(label,x,wgts) | 117 | subroutine HwU_fill(label,x,wgts) |
861 | 118 | use HwU_variables | ||
862 | 124 | implicit none | 119 | implicit none |
863 | 125 | include "HwU.inc" | ||
864 | 126 | integer label,i,j,bin | 120 | integer label,i,j,bin |
865 | 127 | double precision x, wgts(*) | 121 | double precision x, wgts(*) |
866 | 128 | c If central weight is zero do not add this point. | 122 | c If central weight is zero do not add this point. |
867 | @@ -147,11 +141,7 @@ | |||
868 | 147 | enddo | 141 | enddo |
869 | 148 | c If a new bin, add it to the list of points | 142 | c If a new bin, add it to the list of points |
870 | 149 | np=np+1 | 143 | np=np+1 |
876 | 150 | if (np.gt.max_points) then | 144 | call HwU_allocate_p |
872 | 151 | write (*,*) 'ERROR: increase max_points in HwU histogramming' | ||
873 | 152 | $ ,max_points | ||
874 | 153 | stop 1 | ||
875 | 154 | endif | ||
877 | 155 | p_label(np)=label | 145 | p_label(np)=label |
878 | 156 | p_bin(np)=bin | 146 | p_bin(np)=bin |
879 | 157 | do j=1,nwgts | 147 | do j=1,nwgts |
880 | @@ -159,7 +149,7 @@ | |||
881 | 159 | enddo | 149 | enddo |
882 | 160 | return | 150 | return |
883 | 161 | end | 151 | end |
885 | 162 | 152 | ||
886 | 163 | c Call after all correlated contributions for a give phase-space | 153 | c Call after all correlated contributions for a give phase-space |
887 | 164 | c point. I.e., every time you get a new set of random numbers from | 154 | c point. I.e., every time you get a new set of random numbers from |
888 | 165 | c MINT/VEGAS. It adds the current list of points to the histograms. Add | 155 | c MINT/VEGAS. It adds the current list of points to the histograms. Add |
889 | @@ -168,8 +158,8 @@ | |||
890 | 168 | c this way, correlations between events and counter-events can be | 158 | c this way, correlations between events and counter-events can be |
891 | 169 | c correctly taken into account. | 159 | c correctly taken into account. |
892 | 170 | subroutine HwU_add_points | 160 | subroutine HwU_add_points |
893 | 161 | use HwU_variables | ||
894 | 171 | implicit none | 162 | implicit none |
895 | 172 | include "HwU.inc" | ||
896 | 173 | integer i,j | 163 | integer i,j |
897 | 174 | do i=1,np | 164 | do i=1,np |
898 | 175 | do j=1,nwgts | 165 | do j=1,nwgts |
899 | @@ -192,12 +182,11 @@ | |||
900 | 192 | c the current iteration so that they can be filled with the next | 182 | c the current iteration so that they can be filled with the next |
901 | 193 | c iteration. | 183 | c iteration. |
902 | 194 | subroutine HwU_accum_iter(inclde,nPSpoints,values) | 184 | subroutine HwU_accum_iter(inclde,nPSpoints,values) |
903 | 185 | use HwU_variables | ||
904 | 195 | implicit none | 186 | implicit none |
905 | 196 | include "HwU.inc" | ||
906 | 197 | logical inclde | 187 | logical inclde |
907 | 198 | integer nPSpoints,label,i,j | 188 | integer nPSpoints,label,i,j |
910 | 199 | double precision nPSinv,etot,vtot(max_wgts),niter,y_squared | 189 | double precision nPSinv,etot,niter,y_squared,values(2) |
909 | 200 | $ ,values(2) | ||
911 | 201 | data niter /0d0/ | 190 | data niter /0d0/ |
912 | 202 | nPSinv = 1d0/dble(nPSpoints) | 191 | nPSinv = 1d0/dble(nPSpoints) |
913 | 203 | if (inclde) niter = niter+1d0 | 192 | if (inclde) niter = niter+1d0 |
914 | @@ -226,8 +215,8 @@ | |||
915 | 226 | c intermediate stages this function can be called (together with | 215 | c intermediate stages this function can be called (together with |
916 | 227 | c HwU_output) to write intermediate plots to disk. | 216 | c HwU_output) to write intermediate plots to disk. |
917 | 228 | subroutine finalize_histograms(nPSpoints) | 217 | subroutine finalize_histograms(nPSpoints) |
918 | 218 | use HwU_variables | ||
919 | 229 | implicit none | 219 | implicit none |
920 | 230 | include "HwU.inc" | ||
921 | 231 | integer label,nPSpoints,i,j | 220 | integer label,nPSpoints,i,j |
922 | 232 | double precision nPSinv,niter,dummy(2) | 221 | double precision nPSinv,niter,dummy(2) |
923 | 233 | nPSinv=1d0/dble(nPSpoints) | 222 | nPSinv=1d0/dble(nPSpoints) |
924 | @@ -257,13 +246,13 @@ | |||
925 | 257 | c histograms the central value should not be zero if any of the other | 246 | c histograms the central value should not be zero if any of the other |
926 | 258 | c weights are non-zero. | 247 | c weights are non-zero. |
927 | 259 | subroutine accumulate_results(label,nPSinv,niter,values) | 248 | subroutine accumulate_results(label,nPSinv,niter,values) |
928 | 249 | use HwU_variables | ||
929 | 260 | implicit none | 250 | implicit none |
930 | 261 | include "HwU.inc" | ||
931 | 262 | integer label,i,j | 251 | integer label,i,j |
933 | 263 | double precision nPSinv,etot,vtot(max_wgts),niter,y_squared | 252 | double precision nPSinv,etot,niter,y_squared |
934 | 264 | $ ,values(2),a1,a2 | 253 | $ ,values(2),a1,a2 |
937 | 265 | integer error_estimation | 254 | double precision,allocatable :: vtot(:) |
938 | 266 | common /HwU_common2/ error_estimation | 255 | if (.not. allocated(vtot)) allocate(vtot(nwgts)) |
939 | 267 | if (error_estimation.eq.2) then | 256 | if (error_estimation.eq.2) then |
940 | 268 | c Use the weighted average bin-by-bin. This is not really justified | 257 | c Use the weighted average bin-by-bin. This is not really justified |
941 | 269 | c for fNLO computations, because for bins with low statistics, the | 258 | c for fNLO computations, because for bins with low statistics, the |
942 | @@ -395,14 +384,15 @@ | |||
943 | 395 | c Write the histograms to disk at the end of the run, multiplying the | 384 | c Write the histograms to disk at the end of the run, multiplying the |
944 | 396 | c output by 'xnorm' | 385 | c output by 'xnorm' |
945 | 397 | subroutine HwU_output(unit,xnorm) | 386 | subroutine HwU_output(unit,xnorm) |
946 | 387 | use HwU_variables | ||
947 | 398 | implicit none | 388 | implicit none |
948 | 399 | include "HwU.inc" | ||
949 | 400 | integer unit,i,j,label | 389 | integer unit,i,j,label |
950 | 401 | integer max_length | 390 | integer max_length |
953 | 402 | parameter (max_length=(max_wgts+3)*17) | 391 | character(len=:), allocatable :: buffer |
952 | 403 | character*(max_length) buffer | ||
954 | 404 | character*4 str_nbin | 392 | character*4 str_nbin |
955 | 405 | double precision xnorm | 393 | double precision xnorm |
956 | 394 | if (.not. allocated(buffer)) | ||
957 | 395 | & allocate(character(len=(nwgts+3)*17) :: buffer) | ||
958 | 406 | c column info: x_min, x_max, y (central value), dy, {extra | 396 | c column info: x_min, x_max, y (central value), dy, {extra |
959 | 407 | c weights}. | 397 | c weights}. |
960 | 408 | write (unit,'(a$)') '##& xmin' | 398 | write (unit,'(a$)') '##& xmin' |
961 | @@ -440,9 +430,156 @@ | |||
962 | 440 | write (unit,'(a)') '' | 430 | write (unit,'(a)') '' |
963 | 441 | write (unit,'(a)') '' | 431 | write (unit,'(a)') '' |
964 | 442 | enddo | 432 | enddo |
968 | 443 | return | 433 | deallocate(buffer) |
969 | 444 | end | 434 | return |
970 | 445 | 435 | end | |
971 | 436 | |||
972 | 437 | c Clean all the allocatable variables: | ||
973 | 438 | subroutine HwU_deallocate_all | ||
974 | 439 | use HwU_variables | ||
975 | 440 | implicit none | ||
976 | 441 | if (allocated(wgts_info)) deallocate(wgts_info) | ||
977 | 442 | if (allocated(booked)) deallocate(booked) | ||
978 | 443 | if (allocated(title)) deallocate(title) | ||
979 | 444 | if (allocated(nbin)) deallocate(nbin) | ||
980 | 445 | if (allocated(step)) deallocate(step) | ||
981 | 446 | if (allocated(histxl)) deallocate(histxl) | ||
982 | 447 | if (allocated(histxm)) deallocate(histxm) | ||
983 | 448 | if (allocated(histy)) deallocate(histy) | ||
984 | 449 | if (allocated(histy_acc)) deallocate(histy_acc) | ||
985 | 450 | if (allocated(histi)) deallocate(histi) | ||
986 | 451 | if (allocated(histy2)) deallocate(histy2) | ||
987 | 452 | if (allocated(histy_err)) deallocate(histy_err) | ||
988 | 453 | if (allocated(p_bin)) deallocate(p_bin) | ||
989 | 454 | if (allocated(p_label)) deallocate(p_label) | ||
990 | 455 | if (allocated(p_wgts)) deallocate(p_wgts) | ||
991 | 456 | return | ||
992 | 457 | end | ||
993 | 458 | |||
994 | 459 | |||
995 | 460 | subroutine HwU_allocate_p | ||
996 | 461 | use HwU_variables | ||
997 | 462 | implicit none | ||
998 | 463 | integer,allocatable :: itemp1(:) | ||
999 | 464 | double precision, allocatable :: temp2(:,:) | ||
1000 | 465 | if (.not. allocated(p_bin)) then | ||
1001 | 466 | allocate(p_bin(max_plots)) | ||
1002 | 467 | allocate(p_label(max_plots)) | ||
1003 | 468 | allocate(p_wgts(nwgts,max_plots)) | ||
1004 | 469 | max_points=max_plots | ||
1005 | 470 | else | ||
1006 | 471 | if (np.gt.max_points) then | ||
1007 | 472 | c p_bin | ||
1008 | 473 | allocate(itemp1(np+max_plots)) | ||
1009 | 474 | itemp1(1:max_points)=p_bin | ||
1010 | 475 | call move_alloc(itemp1,p_bin) | ||
1011 | 476 | |||
1012 | 477 | c p_label | ||
1013 | 478 | allocate(itemp1(np+max_plots)) | ||
1014 | 479 | itemp1(1:max_points)=p_label | ||
1015 | 480 | call move_alloc(itemp1,p_label) | ||
1016 | 481 | c p_wgts | ||
1017 | 482 | allocate(temp2(nwgts,np+max_plots)) | ||
1018 | 483 | temp2(1:nwgts,1:max_points)=p_wgts | ||
1019 | 484 | call move_alloc(temp2,p_wgts) | ||
1020 | 485 | max_points=np+max_plots | ||
1021 | 486 | endif | ||
1022 | 487 | endif | ||
1023 | 488 | return | ||
1024 | 489 | end | ||
1025 | 490 | |||
1026 | 491 | subroutine HwU_allocate_histo(label,nbin_l) | ||
1027 | 492 | use HwU_variables | ||
1028 | 493 | implicit none | ||
1029 | 494 | logical,allocatable :: ltemp(:) | ||
1030 | 495 | integer,allocatable :: itemp1(:),itemp2(:,:) | ||
1031 | 496 | character(len=50),allocatable :: ctemp(:) | ||
1032 | 497 | double precision, allocatable :: temp1(:),temp2(:,:),temp3(:,:,:) | ||
1033 | 498 | integer label,i,nbin_l,label_max,nbin_max | ||
1034 | 499 | logical debug | ||
1035 | 500 | parameter (debug=.true.) | ||
1036 | 501 | c Check if variables are already allocated. If not, simply allocate a | ||
1037 | 502 | c single histogram | ||
1038 | 503 | if (.not. allocated(booked)) then | ||
1039 | 504 | allocate(booked(1)) | ||
1040 | 505 | booked(1)=.false. | ||
1041 | 506 | allocate(title(1)) | ||
1042 | 507 | allocate(nbin(1)) | ||
1043 | 508 | allocate(step(1)) | ||
1044 | 509 | allocate(histxl(1,nbin_l)) | ||
1045 | 510 | allocate(histxm(1,nbin_l)) | ||
1046 | 511 | allocate(histy(nwgts,1,nbin_l)) | ||
1047 | 512 | allocate(histy_acc(nwgts,1,nbin_l)) | ||
1048 | 513 | allocate(histi(1,nbin_l)) | ||
1049 | 514 | allocate(histy2(1,nbin_l)) | ||
1050 | 515 | allocate(histy_err(1,nbin_l)) | ||
1051 | 516 | max_plots=1 | ||
1052 | 517 | max_bins=nbin_l | ||
1053 | 518 | endif | ||
1054 | 519 | c If current label is greater than the plots already allocated, increase | ||
1055 | 520 | c the size of the allocated arrays. This is kind of slow, but shouldn't | ||
1056 | 521 | c really matter since it's only done at the start of a run. | ||
1057 | 522 | if (label.gt.max_plots .or. nbin_l.gt.max_bins) then | ||
1058 | 523 | label_max=max(label,max_plots) | ||
1059 | 524 | nbin_max=max(nbin_l,max_bins) | ||
1060 | 525 | c booked | ||
1061 | 526 | allocate(ltemp(label_max)) | ||
1062 | 527 | ltemp(1:max_plots)=booked | ||
1063 | 528 | call move_alloc(ltemp,booked) | ||
1064 | 529 | do i=max_plots+1,label_max | ||
1065 | 530 | booked(i)=.false. ! histos have not yet been setup | ||
1066 | 531 | enddo | ||
1067 | 532 | c title | ||
1068 | 533 | allocate(ctemp(label_max)) | ||
1069 | 534 | ctemp(1:max_plots)=title | ||
1070 | 535 | call move_alloc(ctemp,title) | ||
1071 | 536 | c nbin | ||
1072 | 537 | allocate(itemp1(label_max)) | ||
1073 | 538 | itemp1(1:max_plots)=nbin | ||
1074 | 539 | call move_alloc(itemp1,nbin) | ||
1075 | 540 | c step | ||
1076 | 541 | allocate(temp1(label_max)) | ||
1077 | 542 | temp1(1:max_plots)=step | ||
1078 | 543 | call move_alloc(temp1,step) | ||
1079 | 544 | c histxl | ||
1080 | 545 | allocate(temp2(label_max,nbin_max)) | ||
1081 | 546 | temp2(1:max_plots,1:max_bins)=histxl | ||
1082 | 547 | call move_alloc(temp2,histxl) | ||
1083 | 548 | c histxm | ||
1084 | 549 | allocate(temp2(label_max,nbin_max)) | ||
1085 | 550 | temp2(1:max_plots,1:max_bins)=histxm | ||
1086 | 551 | call move_alloc(temp2,histxm) | ||
1087 | 552 | c histy | ||
1088 | 553 | allocate(temp3(nwgts,label_max,nbin_max)) | ||
1089 | 554 | temp3(1:nwgts,1:max_plots,1:max_bins)=histy | ||
1090 | 555 | call move_alloc(temp3,histy) | ||
1091 | 556 | c histy_acc | ||
1092 | 557 | allocate(temp3(nwgts,label_max,nbin_max)) | ||
1093 | 558 | temp3(1:nwgts,1:max_plots,1:max_bins)=histy_acc | ||
1094 | 559 | call move_alloc(temp3,histy_acc) | ||
1095 | 560 | c histi | ||
1096 | 561 | allocate(itemp2(label_max,nbin_max)) | ||
1097 | 562 | itemp2(1:max_plots,1:max_bins)=histi | ||
1098 | 563 | call move_alloc(itemp2,histi) | ||
1099 | 564 | c histy2 | ||
1100 | 565 | allocate(temp2(label_max,nbin_max)) | ||
1101 | 566 | temp2(1:max_plots,1:max_bins)=histy2 | ||
1102 | 567 | call move_alloc(temp2,histy2) | ||
1103 | 568 | c histy_err | ||
1104 | 569 | allocate(temp2(label_max,nbin_max)) | ||
1105 | 570 | temp2(1:max_plots,1:max_bins)=histy_err | ||
1106 | 571 | call move_alloc(temp2,histy_err) | ||
1107 | 572 | c Update maximums | ||
1108 | 573 | max_plots=label_max | ||
1109 | 574 | max_bins=nbin_max | ||
1110 | 575 | elseif (booked(label)) then | ||
1111 | 576 | write (*,*) 'ERROR in HwU.f: histogram already booked',label | ||
1112 | 577 | stop | ||
1113 | 578 | endif | ||
1114 | 579 | return | ||
1115 | 580 | end | ||
1116 | 581 | |||
1117 | 582 | |||
1118 | 446 | c dummy subroutine | 583 | c dummy subroutine |
1119 | 447 | subroutine accum(idummy) | 584 | subroutine accum(idummy) |
1120 | 448 | integer idummy | 585 | integer idummy |
1121 | @@ -451,3 +588,6 @@ | |||
1122 | 451 | subroutine addfil(string) | 588 | subroutine addfil(string) |
1123 | 452 | character*(*) string | 589 | character*(*) string |
1124 | 453 | end | 590 | end |
1125 | 591 | |||
1126 | 592 | |||
1127 | 593 | |||
1128 | 454 | 594 | ||
1129 | === removed file 'Template/NLO/FixedOrderAnalysis/HwU.inc' | |||
1130 | --- Template/NLO/FixedOrderAnalysis/HwU.inc 2016-02-18 14:05:45 +0000 | |||
1131 | +++ Template/NLO/FixedOrderAnalysis/HwU.inc 1970-01-01 00:00:00 +0000 | |||
1132 | @@ -1,22 +0,0 @@ | |||
1133 | 1 | * -*-fortran-*- | ||
1134 | 2 | |||
1135 | 3 | integer max_plots,max_bins,max_wgts,max_points | ||
1136 | 4 | parameter (max_plots=200) | ||
1137 | 5 | parameter (max_bins=100) | ||
1138 | 6 | parameter (max_wgts=1024) | ||
1139 | 7 | parameter (max_points=max_plots*40) | ||
1140 | 8 | |||
1141 | 9 | logical booked(max_plots) | ||
1142 | 10 | integer nbin(max_plots),nwgts,np,p_bin(max_points) | ||
1143 | 11 | & ,p_label(max_points),histi(max_plots,max_bins) | ||
1144 | 12 | character*50 title(max_plots) | ||
1145 | 13 | character*50 wgts_info(max_wgts) | ||
1146 | 14 | double precision histy(max_wgts,max_plots,max_bins) | ||
1147 | 15 | $ ,histy_acc(max_wgts,max_plots,max_bins),histy2(max_plots | ||
1148 | 16 | $ ,max_bins),histy_err(max_plots,max_bins),histxl(max_plots | ||
1149 | 17 | $ ,max_bins),histxm(max_plots,max_bins),step(max_plots) | ||
1150 | 18 | $ ,p_wgts(max_wgts,max_points) | ||
1151 | 19 | |||
1152 | 20 | common/HwU_common/histy,histy_acc,histy2,histy_err,histxl,histxm | ||
1153 | 21 | & ,p_wgts,step,histi,nbin,p_bin,p_label,np,nwgts | ||
1154 | 22 | & ,booked,title,wgts_info | ||
1155 | 23 | 0 | ||
1156 | === modified file 'Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f' | |||
1157 | --- Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f 2014-12-03 11:51:14 +0000 | |||
1158 | +++ Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f 2017-08-16 21:26:30 +0000 | |||
1159 | @@ -17,12 +17,12 @@ | |||
1160 | 17 | c o) The first argument is an integer that labels the histogram. In | 17 | c o) The first argument is an integer that labels the histogram. In |
1161 | 18 | c the analysis_end and analysis_fill subroutines this label is used | 18 | c the analysis_end and analysis_fill subroutines this label is used |
1162 | 19 | c to keep track of the histogram. The label should be a number | 19 | c to keep track of the histogram. The label should be a number |
1164 | 20 | c between 1 and max_plots=200 (can be increased in HwU.inc). | 20 | c starting at 1 and be increased for each plot. |
1165 | 21 | c o) The second argument is a string that will apear above the | 21 | c o) The second argument is a string that will apear above the |
1166 | 22 | c histogram. Do not use brackets "(" or ")" inside this string. | 22 | c histogram. Do not use brackets "(" or ")" inside this string. |
1167 | 23 | c o) The third, forth and fifth arguments are the number of bis, the | 23 | c o) The third, forth and fifth arguments are the number of bis, the |
1168 | 24 | c lower edge of the first bin and the upper edge of the last | 24 | c lower edge of the first bin and the upper edge of the last |
1170 | 25 | c bin. There is a maximum of 100 bins per histogram. | 25 | c bin. |
1171 | 26 | c o) When including scale and/or PDF uncertainties, declare a | 26 | c o) When including scale and/or PDF uncertainties, declare a |
1172 | 27 | c histogram for each weight, and compute the uncertainties from the | 27 | c histogram for each weight, and compute the uncertainties from the |
1173 | 28 | c final set of histograms | 28 | c final set of histograms |
1174 | 29 | 29 | ||
1175 | === removed symlink 'Template/NLO/MCatNLO/include/HwU.inc' | |||
1176 | === target was u'../../FixedOrderAnalysis/HwU.inc' | |||
1177 | === modified symlink 'Template/NLO/MCatNLO/include/reweight0.inc' | |||
1178 | === target was u'../../SubProcesses/reweight0.inc' | |||
1179 | --- Template/NLO/MCatNLO/include/reweight0.inc 1970-01-01 00:00:00 +0000 | |||
1180 | +++ Template/NLO/MCatNLO/include/reweight0.inc 2017-08-16 21:26:30 +0000 | |||
1181 | @@ -0,0 +1,3 @@ | |||
1182 | 1 | integer max_weight_shower,maxscales,maxPDFs | ||
1183 | 2 | parameter (max_weight_shower=1024,maxscales=9,maxPDFs=200) | ||
1184 | 3 | integer iwgtnumpartn,jwgtinfo,mexternal | ||
1185 | 0 | 4 | ||
1186 | === modified file 'Template/NLO/MCatNLO/srcHerwig/madfks_hwdriver.f' | |||
1187 | --- Template/NLO/MCatNLO/srcHerwig/madfks_hwdriver.f 2014-12-09 10:04:28 +0000 | |||
1188 | +++ Template/NLO/MCatNLO/srcHerwig/madfks_hwdriver.f 2017-08-16 21:26:30 +0000 | |||
1189 | @@ -323,7 +323,7 @@ | |||
1190 | 323 | C---EVENTS ARE NORMALIZED TO SUM OR AVERAGE TO THE TOTAL CROSS SECTION | 323 | C---EVENTS ARE NORMALIZED TO SUM OR AVERAGE TO THE TOTAL CROSS SECTION |
1191 | 324 | WRITE(*,*)'How are the events normalized ("average" or "sum")?' | 324 | WRITE(*,*)'How are the events normalized ("average" or "sum")?' |
1192 | 325 | READ(*,*)NORM_EVENT | 325 | READ(*,*)NORM_EVENT |
1194 | 326 | if (NORM_EVENT.eq.'average')MQQ=1 | 326 | if (NORM_EVENT(1:3).ne.'sum')MQQ=1 |
1195 | 327 | 327 | ||
1196 | 328 | MSFLAG=0 | 328 | MSFLAG=0 |
1197 | 329 | IF (LHSOFT) THEN | 329 | IF (LHSOFT) THEN |
1198 | @@ -397,3 +397,21 @@ | |||
1199 | 397 | CALL RCLOS() | 397 | CALL RCLOS() |
1200 | 398 | 999 STOP | 398 | 999 STOP |
1201 | 399 | END | 399 | END |
1202 | 400 | |||
1203 | 401 | |||
1204 | 402 | c dummy routines for stdhep | ||
1205 | 403 | SUBROUTINE PYERRM(MERR,CHMESS) | ||
1206 | 404 | implicit none | ||
1207 | 405 | integer MERR | ||
1208 | 406 | CHARACTER CHMESS*(*) | ||
1209 | 407 | write(*,*)'dummy PYERRM should never be called from HW6' | ||
1210 | 408 | stop | ||
1211 | 409 | end | ||
1212 | 410 | |||
1213 | 411 | |||
1214 | 412 | FUNCTION PYCOMP(KF) | ||
1215 | 413 | implicit none | ||
1216 | 414 | integer KF,PYCOMP | ||
1217 | 415 | write(*,*)'dummy PYCOMP should never be called from HW6' | ||
1218 | 416 | stop | ||
1219 | 417 | end | ||
1220 | 400 | 418 | ||
1221 | === modified file 'Template/NLO/MCatNLO/srcHerwig/madfks_hwlhin.f' | |||
1222 | --- Template/NLO/MCatNLO/srcHerwig/madfks_hwlhin.f 2017-01-17 07:54:00 +0000 | |||
1223 | +++ Template/NLO/MCatNLO/srcHerwig/madfks_hwlhin.f 2017-08-16 21:26:30 +0000 | |||
1224 | @@ -80,7 +80,6 @@ | |||
1225 | 80 | read(iunit,'(a)')string ! <rwgt> | 80 | read(iunit,'(a)')string ! <rwgt> |
1226 | 81 | enddo | 81 | enddo |
1227 | 82 | if(index(string,'</event>').eq.0)then | 82 | if(index(string,'</event>').eq.0)then |
1228 | 83 | wgtref=XWGTUP/MQQ | ||
1229 | 84 | do iww=2,nwgt ! start at 2, because 'central value' is not part of the extra weights | 83 | do iww=2,nwgt ! start at 2, because 'central value' is not part of the extra weights |
1230 | 85 | call read_rwgt_line_wgt(iunit,ww(iww)) | 84 | call read_rwgt_line_wgt(iunit,ww(iww)) |
1231 | 86 | enddo | 85 | enddo |
1232 | 87 | 86 | ||
1233 | === modified file 'Template/NLO/MCatNLO/srcPythia/madfks_pydriver.f' | |||
1234 | --- Template/NLO/MCatNLO/srcPythia/madfks_pydriver.f 2014-11-27 15:36:48 +0000 | |||
1235 | +++ Template/NLO/MCatNLO/srcPythia/madfks_pydriver.f 2017-08-16 21:26:30 +0000 | |||
1236 | @@ -318,7 +318,7 @@ | |||
1237 | 318 | C---EVENTS ARE NORMALIZED TO SUM OR AVERAGE TO THE TOTAL CROSS SECTION | 318 | C---EVENTS ARE NORMALIZED TO SUM OR AVERAGE TO THE TOTAL CROSS SECTION |
1238 | 319 | WRITE(*,*)'How are the events normalized ("average" or "sum")?' | 319 | WRITE(*,*)'How are the events normalized ("average" or "sum")?' |
1239 | 320 | READ(*,*)NORM_EVENT | 320 | READ(*,*)NORM_EVENT |
1241 | 321 | if (NORM_EVENT.eq.'average')MQQ=1 | 321 | if (NORM_EVENT(1:3).ne.'sum')MQQ=1 |
1242 | 322 | 322 | ||
1243 | 323 | C---USER'S INITIAL CALCULATIONS | 323 | C---USER'S INITIAL CALCULATIONS |
1244 | 324 | CALL PYABEG | 324 | CALL PYABEG |
1245 | 325 | 325 | ||
1246 | === modified file 'Template/NLO/MCatNLO/srcPythia/madfks_pylhin.f' | |||
1247 | --- Template/NLO/MCatNLO/srcPythia/madfks_pylhin.f 2016-03-21 08:45:42 +0000 | |||
1248 | +++ Template/NLO/MCatNLO/srcPythia/madfks_pylhin.f 2017-08-16 21:26:30 +0000 | |||
1249 | @@ -80,7 +80,6 @@ | |||
1250 | 80 | if(jwgtinfo.eq.9)then | 80 | if(jwgtinfo.eq.9)then |
1251 | 81 | if (nwgt.gt.1) then | 81 | if (nwgt.gt.1) then |
1252 | 82 | read(iunit,'(a)')string ! <rwgt> | 82 | read(iunit,'(a)')string ! <rwgt> |
1253 | 83 | wgtref=XWGTUP/MQQ | ||
1254 | 84 | do iww=2,nwgt ! start at 2, because 'central value' is not part of the extra weights | 83 | do iww=2,nwgt ! start at 2, because 'central value' is not part of the extra weights |
1255 | 85 | call read_rwgt_line_wgt(iunit,ww(iww)) | 84 | call read_rwgt_line_wgt(iunit,ww(iww)) |
1256 | 86 | enddo | 85 | enddo |
1257 | 87 | 86 | ||
1258 | === modified file 'Template/NLO/MCatNLO/srcPythia8/Pythia8.cc' | |||
1259 | --- Template/NLO/MCatNLO/srcPythia8/Pythia8.cc 2016-02-23 11:25:37 +0000 | |||
1260 | +++ Template/NLO/MCatNLO/srcPythia8/Pythia8.cc 2017-08-16 21:26:30 +0000 | |||
1261 | @@ -58,7 +58,7 @@ | |||
1262 | 58 | int iEventshower=pythia.mode("Main:spareMode1"); | 58 | int iEventshower=pythia.mode("Main:spareMode1"); |
1263 | 59 | string evt_norm=pythia.word("Main:spareWord1"); | 59 | string evt_norm=pythia.word("Main:spareWord1"); |
1264 | 60 | int iEventtot_norm=iEventtot; | 60 | int iEventtot_norm=iEventtot; |
1266 | 61 | if (evt_norm == "average"){ | 61 | if (evt_norm != "sum"){ |
1267 | 62 | iEventtot_norm=1; | 62 | iEventtot_norm=1; |
1268 | 63 | } | 63 | } |
1269 | 64 | 64 | ||
1270 | @@ -112,7 +112,7 @@ | |||
1271 | 112 | double normhepmc; | 112 | double normhepmc; |
1272 | 113 | // Add the weight of the current event to the cross section. | 113 | // Add the weight of the current event to the cross section. |
1273 | 114 | normhepmc = 1. / double(iEventshower); | 114 | normhepmc = 1. / double(iEventshower); |
1275 | 115 | if (evt_norm == "average") { | 115 | if (evt_norm != "sum") { |
1276 | 116 | sigmaTotal += evtweight*normhepmc; | 116 | sigmaTotal += evtweight*normhepmc; |
1277 | 117 | } else { | 117 | } else { |
1278 | 118 | sigmaTotal += evtweight*normhepmc*iEventtot; | 118 | sigmaTotal += evtweight*normhepmc*iEventtot; |
1279 | 119 | 119 | ||
1280 | === modified file 'Template/NLO/MCatNLO/srcPythia8/Pythia82.cc' | |||
1281 | --- Template/NLO/MCatNLO/srcPythia8/Pythia82.cc 2016-02-23 11:25:37 +0000 | |||
1282 | +++ Template/NLO/MCatNLO/srcPythia8/Pythia82.cc 2017-08-16 21:26:30 +0000 | |||
1283 | @@ -57,7 +57,7 @@ | |||
1284 | 57 | int iEventshower=pythia.mode("Main:spareMode1"); | 57 | int iEventshower=pythia.mode("Main:spareMode1"); |
1285 | 58 | string evt_norm=pythia.word("Main:spareWord1"); | 58 | string evt_norm=pythia.word("Main:spareWord1"); |
1286 | 59 | int iEventtot_norm=iEventtot; | 59 | int iEventtot_norm=iEventtot; |
1288 | 60 | if (evt_norm == "average"){ | 60 | if (evt_norm != "sum"){ |
1289 | 61 | iEventtot_norm=1; | 61 | iEventtot_norm=1; |
1290 | 62 | } | 62 | } |
1291 | 63 | 63 | ||
1292 | @@ -118,7 +118,7 @@ | |||
1293 | 118 | double normhepmc; | 118 | double normhepmc; |
1294 | 119 | // Add the weight of the current event to the cross section. | 119 | // Add the weight of the current event to the cross section. |
1295 | 120 | normhepmc = 1. / double(iEventshower); | 120 | normhepmc = 1. / double(iEventshower); |
1297 | 121 | if (evt_norm == "average") { | 121 | if (evt_norm != "sum") { |
1298 | 122 | sigmaTotal += evtweight*normhepmc; | 122 | sigmaTotal += evtweight*normhepmc; |
1299 | 123 | } else { | 123 | } else { |
1300 | 124 | sigmaTotal += evtweight*normhepmc*iEventtot; | 124 | sigmaTotal += evtweight*normhepmc*iEventtot; |
1301 | 125 | 125 | ||
1302 | === modified file 'Template/NLO/MCatNLO/srcPythia8/Pythia82_hep.cc' | |||
1303 | --- Template/NLO/MCatNLO/srcPythia8/Pythia82_hep.cc 2015-03-19 11:57:06 +0000 | |||
1304 | +++ Template/NLO/MCatNLO/srcPythia8/Pythia82_hep.cc 2017-08-16 21:26:30 +0000 | |||
1305 | @@ -70,7 +70,7 @@ | |||
1306 | 70 | // the number of events read by Pythia so far | 70 | // the number of events read by Pythia so far |
1307 | 71 | int nSelected=pythia.info.nSelected(); | 71 | int nSelected=pythia.info.nSelected(); |
1308 | 72 | 72 | ||
1310 | 73 | if (nSelected >= iEventshower) break; | 73 | if (nSelected > iEventshower) break; |
1311 | 74 | if (pythia.info.isLHA() && iPrintLHA < nPrintLHA) { | 74 | if (pythia.info.isLHA() && iPrintLHA < nPrintLHA) { |
1312 | 75 | pythia.LHAeventList(); | 75 | pythia.LHAeventList(); |
1313 | 76 | pythia.info.list(); | 76 | pythia.info.list(); |
1314 | @@ -83,7 +83,7 @@ | |||
1315 | 83 | double evtweight = pythia.info.weight(); | 83 | double evtweight = pythia.info.weight(); |
1316 | 84 | double normhepmc; | 84 | double normhepmc; |
1317 | 85 | // ALWAYS NORMALISE HEPMC WEIGHTS TO SUM TO THE CROSS SECTION | 85 | // ALWAYS NORMALISE HEPMC WEIGHTS TO SUM TO THE CROSS SECTION |
1319 | 86 | if (evt_norm == "average") { | 86 | if (evt_norm != "sum") { |
1320 | 87 | normhepmc = 1. / double(iEventshower); | 87 | normhepmc = 1. / double(iEventshower); |
1321 | 88 | } else { | 88 | } else { |
1322 | 89 | normhepmc = double(iEventtot) / double(iEventshower); | 89 | normhepmc = double(iEventtot) / double(iEventshower); |
1323 | 90 | 90 | ||
1324 | === modified file 'Template/NLO/MCatNLO/srcPythia8/Pythia8_hep.cc' | |||
1325 | --- Template/NLO/MCatNLO/srcPythia8/Pythia8_hep.cc 2015-03-19 12:02:08 +0000 | |||
1326 | +++ Template/NLO/MCatNLO/srcPythia8/Pythia8_hep.cc 2017-08-16 21:26:30 +0000 | |||
1327 | @@ -64,7 +64,7 @@ | |||
1328 | 64 | // the number of events read by Pythia so far | 64 | // the number of events read by Pythia so far |
1329 | 65 | int nSelected=pythia.info.nSelected(); | 65 | int nSelected=pythia.info.nSelected(); |
1330 | 66 | 66 | ||
1332 | 67 | if (nSelected >= iEventshower) break; | 67 | if (nSelected > iEventshower) break; |
1333 | 68 | if (pythia.info.isLHA() && iPrintLHA < nPrintLHA) { | 68 | if (pythia.info.isLHA() && iPrintLHA < nPrintLHA) { |
1334 | 69 | pythia.LHAeventList(); | 69 | pythia.LHAeventList(); |
1335 | 70 | pythia.info.list(); | 70 | pythia.info.list(); |
1336 | @@ -77,7 +77,7 @@ | |||
1337 | 77 | double evtweight = pythia.info.weight(); | 77 | double evtweight = pythia.info.weight(); |
1338 | 78 | double normhepmc; | 78 | double normhepmc; |
1339 | 79 | // ALWAYS NORMALISE HEPMC WEIGHTS TO SUM TO THE CROSS SECTION | 79 | // ALWAYS NORMALISE HEPMC WEIGHTS TO SUM TO THE CROSS SECTION |
1341 | 80 | if (evt_norm == "average") { | 80 | if (evt_norm != "sum") { |
1342 | 81 | normhepmc = 1. / double(iEventshower); | 81 | normhepmc = 1. / double(iEventshower); |
1343 | 82 | } else { | 82 | } else { |
1344 | 83 | normhepmc = double(iEventtot) / double(iEventshower); | 83 | normhepmc = double(iEventtot) / double(iEventshower); |
1345 | 84 | 84 | ||
1346 | === modified file 'Template/NLO/Source/alfas_functions_lhapdf.f' | |||
1347 | --- Template/NLO/Source/alfas_functions_lhapdf.f 2013-12-20 05:39:24 +0000 | |||
1348 | +++ Template/NLO/Source/alfas_functions_lhapdf.f 2017-08-16 21:26:30 +0000 | |||
1349 | @@ -89,7 +89,7 @@ | |||
1350 | 89 | ALPHAS=alphasPDF(Q) | 89 | ALPHAS=alphasPDF(Q) |
1351 | 90 | call cpu_time(tAfter) | 90 | call cpu_time(tAfter) |
1352 | 91 | 91 | ||
1354 | 92 | tPDF = tPDF + (tAfter-tBefore) | 92 | c tPDF = tPDF + (tAfter-tBefore) |
1355 | 93 | 93 | ||
1356 | 94 | RETURN | 94 | RETURN |
1357 | 95 | END | 95 | END |
1358 | 96 | 96 | ||
1359 | === added file 'Template/NLO/Source/extra_weights.f' | |||
1360 | --- Template/NLO/Source/extra_weights.f 1970-01-01 00:00:00 +0000 | |||
1361 | +++ Template/NLO/Source/extra_weights.f 2017-08-16 21:26:30 +0000 | |||
1362 | @@ -0,0 +1,43 @@ | |||
1363 | 1 | module extra_weights | ||
1364 | 2 | |||
1365 | 3 | integer,parameter :: iwgtinfo=-5,maxscales=9,maxPDFs=200 | ||
1366 | 4 | $ ,maxPDFsets=25,maxdynscales=10 | ||
1367 | 5 | integer :: max_mom_str=1,max_mext=1,max_n_ctr=1 | ||
1368 | 6 | logical :: doreweight,lscalevar(maxdynscales) | ||
1369 | 7 | $ ,lpdfvar(maxPDFsets) | ||
1370 | 8 | integer :: iwgtnumpartn,jwgtinfo,mexternal | ||
1371 | 9 | $ ,lhaPDFid(0:maxPDFsets),nmemPDF(maxPDFsets) | ||
1372 | 10 | $ ,dyn_scale(0:maxdynscales),n_ctr_found,n_mom_conf | ||
1373 | 11 | double precision :: wgtdegrem_xi,wgtdegrem_lxi,wgtdegrem_muF | ||
1374 | 12 | $ ,wgtnstmp,wgtwnstmpmuf,wgtwnstmpmur,wgtnstmp_avgvirt | ||
1375 | 13 | $ ,wgtref,scalevarR(0:maxscales),scalevarF(0:maxscales) | ||
1376 | 14 | $ ,wgtxsecmu(maxscales,maxscales,maxdynscales) | ||
1377 | 15 | $ ,wgtxsecPDF(0:maxPDFs,maxPDFsets),wgtbpower,wgtcpower | ||
1378 | 16 | $ ,veto_multiplier,H1_factor_virt,veto_compensating_factor | ||
1379 | 17 | $ ,born_wgt_veto | ||
1380 | 18 | double precision,allocatable :: momenta_str(:,:,:) | ||
1381 | 19 | character(len= 100) :: LHAPDFsetname(maxPDFsets) | ||
1382 | 20 | character(len=1024),allocatable :: n_ctr_str(:) | ||
1383 | 21 | |||
1384 | 22 | c input of cpower (checked against calculated value) | ||
1385 | 23 | double precision,parameter :: cpowerinput=0d0 | ||
1386 | 24 | c switch for running muR-dependent factor runfac=1(running)/0(fixed) | ||
1387 | 25 | integer,parameter :: runfac=0 | ||
1388 | 26 | c WARNING: If you set runfac=1 to include a muR-dependent factor | ||
1389 | 27 | c make sure you modified the function rwgt_muR_dep_fac in | ||
1390 | 28 | c reweight_xsec.f and compute_cpower in fks_singular.f | ||
1391 | 29 | c appropiately to include all muR dependent overall factors | ||
1392 | 30 | c (except for alpha_s) in the calculation. This procedure | ||
1393 | 31 | c will be incorrect, if you miss one of the muR dependent | ||
1394 | 32 | c factors or if there is a not factorizing muR dependent term. | ||
1395 | 33 | c You also have to set ren_group_coeff_in and cpowerinput | ||
1396 | 34 | c to the proper values. | ||
1397 | 35 | |||
1398 | 36 | c first order coefficient of renormalization group equation of the | ||
1399 | 37 | c muR-dependent factor, | ||
1400 | 38 | c e.g. for masses: ren_group_coeff = gamma0 = 3/2*C_F, | ||
1401 | 39 | c i.e. also for Yukawa: ren_group_coeff = gamma0 | ||
1402 | 40 | integer,parameter :: ren_group_coeff_in=0d0 | ||
1403 | 41 | |||
1404 | 42 | save | ||
1405 | 43 | end module extra_weights | ||
1406 | 0 | 44 | ||
1407 | === removed file 'Template/NLO/Source/getissud.f' | |||
1408 | --- Template/NLO/Source/getissud.f 2012-12-04 16:52:45 +0000 | |||
1409 | +++ Template/NLO/Source/getissud.f 1970-01-01 00:00:00 +0000 | |||
1410 | @@ -1,201 +0,0 @@ | |||
1411 | 1 | C...GETISSUD performs an interpolation/extrapolation in 3 dimensions by | ||
1412 | 2 | C...fitting quadratic splines using 4 points in each dimension | ||
1413 | 3 | double precision function getissud(ibeam,kfl,x1,x2,pt2) | ||
1414 | 4 | implicit none | ||
1415 | 5 | |||
1416 | 6 | include 'sudgrid.inc' | ||
1417 | 7 | |||
1418 | 8 | c Arguments | ||
1419 | 9 | integer ibeam,kfl | ||
1420 | 10 | double precision x1,x2,pt2 | ||
1421 | 11 | c Storing values for the interpolation | ||
1422 | 12 | double precision smallgrid(4,4),minigrid(4) ! pt2,x1 | ||
1423 | 13 | c Local variables | ||
1424 | 14 | integer ipt2,ix1,ix2,ilo,ihi,i,j,k,kkfl,ipoints | ||
1425 | 15 | double precision pt2i,x2i,x1i,minpoint,maxpoint,x(3) | ||
1426 | 16 | integer nerr | ||
1427 | 17 | data nerr/0/ | ||
1428 | 18 | |||
1429 | 19 | getissud=0 | ||
1430 | 20 | |||
1431 | 21 | x(1)=log(x2) | ||
1432 | 22 | x(2)=x1 | ||
1433 | 23 | x(3)=log(pt2) | ||
1434 | 24 | |||
1435 | 25 | kkfl=kfl | ||
1436 | 26 | if(ibeam.lt.0) kkfl=-kkfl | ||
1437 | 27 | if(kkfl.lt.-2) kkfl=iabs(kfl) | ||
1438 | 28 | if(iabs(kkfl).eq.21) kkfl=0 | ||
1439 | 29 | if(kkfl.eq.5) then | ||
1440 | 30 | ipoints=2 | ||
1441 | 31 | else | ||
1442 | 32 | ipoints=1 | ||
1443 | 33 | endif | ||
1444 | 34 | if(kkfl.gt.5) then | ||
1445 | 35 | if(nerr.lt.10) | ||
1446 | 36 | $ write(*,*)'GETISSUD Warning: flavor ',kfl,' not supported' | ||
1447 | 37 | nerr=nerr+1 | ||
1448 | 38 | getissud=1 | ||
1449 | 39 | return | ||
1450 | 40 | endif | ||
1451 | 41 | |||
1452 | 42 | if(x(1).lt.points(1,ipoints).or. | ||
1453 | 43 | $ x(1).gt.points(nx2,ipoints).and.nerr.lt.10) | ||
1454 | 44 | $ then | ||
1455 | 45 | write(*,*) 'GETISSUD Warning: extrapolation in x2: ',x2 | ||
1456 | 46 | nerr=nerr+1 | ||
1457 | 47 | endif | ||
1458 | 48 | |||
1459 | 49 | if(x(2).lt.points(nx2+1,ipoints).or. | ||
1460 | 50 | $ x(2).gt.points(nx2+nx1,ipoints) | ||
1461 | 51 | $ .and.nerr.lt.10) then | ||
1462 | 52 | write(*,*) 'GETISSUD Warning: extrapolation in x1: ',x1 | ||
1463 | 53 | nerr=nerr+1 | ||
1464 | 54 | endif | ||
1465 | 55 | |||
1466 | 56 | if(kkfl.eq.5.and.pt2.lt.22.3109)then | ||
1467 | 57 | getissud=1d0 | ||
1468 | 58 | return | ||
1469 | 59 | endif | ||
1470 | 60 | |||
1471 | 61 | if(kkfl.eq.5.and.x1.gt.0.6)then | ||
1472 | 62 | getissud=0d0 | ||
1473 | 63 | return | ||
1474 | 64 | endif | ||
1475 | 65 | |||
1476 | 66 | if(x(3).lt.points(nx2+nx1+1,ipoints)) then | ||
1477 | 67 | write(*,*) 'GETISSUD Error! pt2 = ',exp(x(3)),' < ', | ||
1478 | 68 | $ exp(points(nx2+nx1+1,ipoints)),' = min(pt2). Not allowed!' | ||
1479 | 69 | write(*,*) 'You need to regenerate grid with new pt2min.' | ||
1480 | 70 | stop | ||
1481 | 71 | endif | ||
1482 | 72 | |||
1483 | 73 | if(x(3).lt.points(nx2+nx1+1,ipoints).or. | ||
1484 | 74 | $ x(3).gt.points(nx2+nx1+npt2,ipoints) | ||
1485 | 75 | $ .and.nerr.lt.10) then | ||
1486 | 76 | write(*,*) 'GETISSUD Warning: extrapolation in pt2: ',pt2 | ||
1487 | 77 | nerr=nerr+1 | ||
1488 | 78 | endif | ||
1489 | 79 | |||
1490 | 80 | |||
1491 | 81 | c Find nearest points by binary method | ||
1492 | 82 | c x2 | ||
1493 | 83 | ilo=1 | ||
1494 | 84 | ihi=nx2 | ||
1495 | 85 | do while(ihi.gt.ilo+1) | ||
1496 | 86 | ix2=ilo+(ihi-ilo)/2 | ||
1497 | 87 | if(x(1).gt.points(ix2,ipoints))then | ||
1498 | 88 | ilo=ix2 | ||
1499 | 89 | else | ||
1500 | 90 | ihi=ix2 | ||
1501 | 91 | endif | ||
1502 | 92 | enddo | ||
1503 | 93 | if(x(1).lt.points(ix2,ipoints)) | ||
1504 | 94 | $ ix2=ix2-1 | ||
1505 | 95 | ix2=max(2,min(ix2,nx2-2)) | ||
1506 | 96 | |||
1507 | 97 | c print *,'x2: ',ix2,x(1),(points(i,ipoints),i=ix2-1,ix2+2) | ||
1508 | 98 | |||
1509 | 99 | c x1 | ||
1510 | 100 | ilo=1 | ||
1511 | 101 | ihi=nx1 | ||
1512 | 102 | do while(ihi.gt.ilo+1) | ||
1513 | 103 | ix1=ilo+(ihi-ilo)/2 | ||
1514 | 104 | if(x(2).gt.points(nx2+ix1,ipoints))then | ||
1515 | 105 | ilo=ix1 | ||
1516 | 106 | else | ||
1517 | 107 | ihi=ix1 | ||
1518 | 108 | endif | ||
1519 | 109 | enddo | ||
1520 | 110 | if(x(2).lt.points(nx2+ix1,ipoints)) | ||
1521 | 111 | $ ix1=ix1-1 | ||
1522 | 112 | ix1=max(2,min(ix1,nx1-2)) | ||
1523 | 113 | |||
1524 | 114 | do while(kkfl.eq.5.and. | ||
1525 | 115 | $ points(nx2+ix1+2,ipoints).gt.0.6) | ||
1526 | 116 | ix1=ix1-1 | ||
1527 | 117 | enddo | ||
1528 | 118 | |||
1529 | 119 | c print *,'x1: ',ix1,x(2),(points(nx2+i,ipoints),i=ix1-1,ix1+2) | ||
1530 | 120 | |||
1531 | 121 | c pt2 | ||
1532 | 122 | ilo=1 | ||
1533 | 123 | ihi=npt2 | ||
1534 | 124 | do while(ihi.gt.ilo+1) | ||
1535 | 125 | ipt2=ilo+(ihi-ilo)/2 | ||
1536 | 126 | if(x(3).gt.points(nx2+nx1+ipt2,ipoints))then | ||
1537 | 127 | ilo=ipt2 | ||
1538 | 128 | else | ||
1539 | 129 | ihi=ipt2 | ||
1540 | 130 | endif | ||
1541 | 131 | enddo | ||
1542 | 132 | if(x(3).lt.points(nx2+nx1+ipt2,ipoints)) | ||
1543 | 133 | $ ipt2=ipt2-1 | ||
1544 | 134 | ipt2=max(2,min(ipt2,npt2-2)) | ||
1545 | 135 | |||
1546 | 136 | do while(kkfl.eq.5.and. | ||
1547 | 137 | $ exp(points(nx2+nx1+ipt2-1,ipoints)).lt.22.3109) | ||
1548 | 138 | ipt2=ipt2+1 | ||
1549 | 139 | enddo | ||
1550 | 140 | c print *,'pt2: ',ipt2,x(3),(points(nx2+nx1+i,ipoints),i=ipt2-1,ipt2+2) | ||
1551 | 141 | c print *,'pt: ',ipt2,exp(x(3)/2), | ||
1552 | 142 | c $ (exp(points(nx2+nx1+i,ipoints)/2),i=ipt2-1,ipt2+2) | ||
1553 | 143 | |||
1554 | 144 | C Now perform inter-/extra-polation | ||
1555 | 145 | |||
1556 | 146 | C Start with x2, which should have the flattest distribution | ||
1557 | 147 | C Calculate sud(x2,ax1,apt2) for the 4x4 apt2 and ax1 | ||
1558 | 148 | C Then continue with pt2 and calculate sud(x2,ax1,pt2) | ||
1559 | 149 | C for the 4 ax1 | ||
1560 | 150 | C Finally calculate sud(x2,x1,pt2) | ||
1561 | 151 | |||
1562 | 152 | do i=1,4 | ||
1563 | 153 | do j=1,4 | ||
1564 | 154 | c print *,'x1,pt:',points(nx2+ix1-2+i,ipoints), | ||
1565 | 155 | c $ exp(points(nx2+nx1+ipt2-2+j,ipoints)/2) | ||
1566 | 156 | call splint2(sudgrid(ix2-1,ix1-2+i,ipt2-2+j,kkfl), | ||
1567 | 157 | $ points(ix2-1,ipoints),4,x(1),smallgrid(j,i)) | ||
1568 | 158 | smallgrid(j,i)=max(0d0,min(1d0,smallgrid(j,i))) | ||
1569 | 159 | enddo | ||
1570 | 160 | enddo | ||
1571 | 161 | |||
1572 | 162 | do i=1,4 | ||
1573 | 163 | call splint2(smallgrid(1,i), | ||
1574 | 164 | $ points(nx2+nx1+ipt2-1,ipoints),4,x(3),minigrid(i)) | ||
1575 | 165 | minigrid(i)=max(0d0,min(1d0,minigrid(i))) | ||
1576 | 166 | enddo | ||
1577 | 167 | |||
1578 | 168 | call splint2(minigrid, | ||
1579 | 169 | $ points(nx2+ix1-1,ipoints),4,x(2),getissud) | ||
1580 | 170 | getissud=max(0d0,min(1d0,getissud)) | ||
1581 | 171 | |||
1582 | 172 | c print *,'Result: ',getissud | ||
1583 | 173 | |||
1584 | 174 | return | ||
1585 | 175 | end | ||
1586 | 176 | |||
1587 | 177 | |||
1588 | 178 | subroutine splint2(ypoints,xpoints,npoints,x,ans) | ||
1589 | 179 | implicit none | ||
1590 | 180 | |||
1591 | 181 | C arguments | ||
1592 | 182 | integer npoints | ||
1593 | 183 | double precision ypoints(npoints),xpoints(npoints) | ||
1594 | 184 | double precision x,ans | ||
1595 | 185 | C local variables | ||
1596 | 186 | double precision a0,a1,a2,sd | ||
1597 | 187 | integer ifail,i | ||
1598 | 188 | |||
1599 | 189 | CALL DLSQP2(npoints,xpoints,ypoints,a0,a1,a2,sd,ifail) | ||
1600 | 190 | |||
1601 | 191 | c print *,'Point, interpolation:' | ||
1602 | 192 | c do i=1,npoints | ||
1603 | 193 | c print *,exp(xpoints(i)),ypoints(i), | ||
1604 | 194 | c $ a0+a1*xpoints(i)+a2*xpoints(i)**2 | ||
1605 | 195 | c enddo | ||
1606 | 196 | |||
1607 | 197 | ans=a0+a1*x+a2*x**2 | ||
1608 | 198 | c print *,x,ans | ||
1609 | 199 | |||
1610 | 200 | return | ||
1611 | 201 | end | ||
1612 | 202 | 0 | ||
1613 | === modified file 'Template/NLO/Source/make_opts.inc' | |||
1614 | --- Template/NLO/Source/make_opts.inc 2016-06-28 14:44:52 +0000 | |||
1615 | +++ Template/NLO/Source/make_opts.inc 2017-08-16 21:26:30 +0000 | |||
1616 | @@ -48,11 +48,6 @@ | |||
1617 | 48 | F2PY=$(DEFAULT_F2PY_COMPILER) | 48 | F2PY=$(DEFAULT_F2PY_COMPILER) |
1618 | 49 | endif | 49 | endif |
1619 | 50 | 50 | ||
1620 | 51 | # Set CXX unless it's defined by an environment variable | ||
1621 | 52 | ifeq ($(origin CXX),default) | ||
1622 | 53 | CXX=$(DEFAULT_CPP_COMPILER) | ||
1623 | 54 | endif | ||
1624 | 55 | |||
1625 | 56 | UNAME := $(shell uname -s) | 51 | UNAME := $(shell uname -s) |
1626 | 57 | ifeq ($(origin LDFLAGS), undefined) | 52 | ifeq ($(origin LDFLAGS), undefined) |
1627 | 58 | LDFLAGS=$(STDLIB) $(MACFLAG) | 53 | LDFLAGS=$(STDLIB) $(MACFLAG) |
1628 | @@ -94,10 +89,22 @@ | |||
1629 | 94 | alfas_functions=alfas_functions_lhapdf | 89 | alfas_functions=alfas_functions_lhapdf |
1630 | 95 | llhapdf = $(shell $(lhapdf) --libs) | 90 | llhapdf = $(shell $(lhapdf) --libs) |
1631 | 96 | reweight_xsec_events_pdf_dummy= | 91 | reweight_xsec_events_pdf_dummy= |
1632 | 92 | # check if we need to activate c++11 (for lhapdf6.2) | ||
1633 | 93 | ifeq ($(origin CXX),default) | ||
1634 | 94 | ifeq ($lhapdfversion$lhapdfsubversion,62) | ||
1635 | 95 | CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 | ||
1636 | 96 | else | ||
1637 | 97 | CXX=$(DEFAULT_CPP_COMPILER) | ||
1638 | 98 | endif | ||
1639 | 99 | endif | ||
1640 | 97 | else | 100 | else |
1641 | 98 | alfas_functions=alfas_functions | 101 | alfas_functions=alfas_functions |
1642 | 99 | llhapdf= | 102 | llhapdf= |
1643 | 100 | reweight_xsec_events_pdf_dummy=reweight_xsec_events_pdf_dummy.o | 103 | reweight_xsec_events_pdf_dummy=reweight_xsec_events_pdf_dummy.o |
1644 | 104 | # Set CXX unless it's defined by an environment variable | ||
1645 | 105 | ifeq ($(origin CXX),default) | ||
1646 | 106 | CXX=$(DEFAULT_CPP_COMPILER) | ||
1647 | 107 | endif | ||
1648 | 101 | endif | 108 | endif |
1649 | 102 | 109 | ||
1650 | 103 | # Option APPLGrid | 110 | # Option APPLGrid |
1651 | 104 | 111 | ||
1652 | === modified file 'Template/NLO/Source/makefile' | |||
1653 | --- Template/NLO/Source/makefile 2017-05-09 13:28:25 +0000 | |||
1654 | +++ Template/NLO/Source/makefile 2017-08-16 21:26:30 +0000 | |||
1655 | @@ -8,12 +8,8 @@ | |||
1656 | 8 | IREGIDIR= ./IREGI/src/ | 8 | IREGIDIR= ./IREGI/src/ |
1657 | 9 | STDHEPDIR= ./StdHEP/ | 9 | STDHEPDIR= ./StdHEP/ |
1658 | 10 | 10 | ||
1665 | 11 | PROCESS= matrix.o myamp.o | 11 | GENERIC = $(alfas_functions).o rw_routines.o kin_functions.o \ |
1666 | 12 | 12 | run_printout.o dgauss.o ranmar.o setrun.o | |
1661 | 13 | GENERIC = $(alfas_functions).o rw_routines.o kin_functions.o setrun.o \ | ||
1662 | 14 | run_printout.o dgauss.o ranmar.o getissud.o | ||
1663 | 15 | |||
1664 | 16 | INCLUDEF = coupl.inc pmass.inc cluster.inc | ||
1667 | 17 | 13 | ||
1668 | 18 | .f.o: ; $(FC) $(FFLAGS) -c $*.f | 14 | .f.o: ; $(FC) $(FFLAGS) -c $*.f |
1669 | 19 | 15 | ||
1670 | @@ -21,19 +17,19 @@ | |||
1671 | 21 | $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc | 17 | $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc |
1672 | 22 | rm -f PDF/*.o | 18 | rm -f PDF/*.o |
1673 | 23 | 19 | ||
1674 | 24 | |||
1675 | 25 | $(LIBDIR)libdhelas.a: DHELAS | 20 | $(LIBDIR)libdhelas.a: DHELAS |
1676 | 26 | rm -f $(LIBDIR)libdhelas.a | 21 | rm -f $(LIBDIR)libdhelas.a |
1677 | 27 | cd DHELAS; make | 22 | cd DHELAS; make |
1678 | 28 | 23 | ||
1679 | 29 | $(LIBDIR)libgeneric.a: $(GENERIC) | 24 | $(LIBDIR)libgeneric.a: $(GENERIC) |
1680 | 30 | rm -f $(LIBDIR)libgeneric.a | 25 | rm -f $(LIBDIR)libgeneric.a |
1682 | 31 | ar cru libgeneric.a $(GENERIC) | 26 | ar cru libgeneric.a $(GENERIC) extra_weights.o |
1683 | 32 | ranlib libgeneric.a | 27 | ranlib libgeneric.a |
1684 | 33 | mv libgeneric.a $(LIBDIR) | 28 | mv libgeneric.a $(LIBDIR) |
1685 | 29 | cp -f extra_weights.mod $(LIBDIR) | ||
1686 | 34 | rm -f $(alfas_functions).o | 30 | rm -f $(alfas_functions).o |
1687 | 35 | 31 | ||
1689 | 36 | setrun.o: run_card.inc | 32 | setrun.o: run_card.inc extra_weights.o |
1690 | 37 | $(FC) $(FFLAGS) -c -o setrun.o setrun.f | 33 | $(FC) $(FFLAGS) -c -o setrun.o setrun.f |
1691 | 38 | 34 | ||
1692 | 39 | $(LIBDIR)libpdf.a: PDF | 35 | $(LIBDIR)libpdf.a: PDF |
1693 | 40 | 36 | ||
1694 | === modified file 'Template/NLO/Source/run.inc' | |||
1695 | --- Template/NLO/Source/run.inc 2017-01-13 15:01:41 +0000 | |||
1696 | +++ Template/NLO/Source/run.inc 2017-08-16 21:26:30 +0000 | |||
1697 | @@ -54,11 +54,6 @@ | |||
1698 | 54 | double precision bwcutoff | 54 | double precision bwcutoff |
1699 | 55 | common/to_bwcutoff/ bwcutoff | 55 | common/to_bwcutoff/ bwcutoff |
1700 | 56 | c | 56 | c |
1701 | 57 | c Sudakov grid file name | ||
1702 | 58 | c | ||
1703 | 59 | character*130 issgridfile | ||
1704 | 60 | common/to_sgridfile/issgridfile | ||
1705 | 61 | c | ||
1706 | 62 | c kT/pT scheme for xqcut, clustering according to channel | 57 | c kT/pT scheme for xqcut, clustering according to channel |
1707 | 63 | c | 58 | c |
1708 | 64 | integer ktscheme | 59 | integer ktscheme |
1709 | 65 | 60 | ||
1710 | === removed file 'Template/NLO/Source/run_config.inc' | |||
1711 | --- Template/NLO/Source/run_config.inc 2015-09-24 16:36:04 +0000 | |||
1712 | +++ Template/NLO/Source/run_config.inc 1970-01-01 00:00:00 +0000 | |||
1713 | @@ -1,54 +0,0 @@ | |||
1714 | 1 | c********************************************************************* | ||
1715 | 2 | c Parameters to configure running information for MadEvent | ||
1716 | 3 | c The default values of these parameters should not need to be | ||
1717 | 4 | c changed, unless there is a special need for optimization | ||
1718 | 5 | c********************************************************************* | ||
1719 | 6 | c | ||
1720 | 7 | c The following parameters are used by symmetry.f in setting up the survey | ||
1721 | 8 | c | ||
1722 | 9 | integer icomp | ||
1723 | 10 | parameter (icomp = 3) !BW + Symmetry compression 0 == none | ||
1724 | 11 | integer min_events_subprocess !Minimum number of events | ||
1725 | 12 | parameter (min_events_subprocess = 2000) !per iteration in each subprocess | ||
1726 | 13 | integer min_events_channel !Minimum number of events | ||
1727 | 14 | parameter (min_events_channel = 1000) !per iteration in each channel | ||
1728 | 15 | integer iter_survey !Number of iterations for survey | ||
1729 | 16 | parameter (iter_survey=4) | ||
1730 | 17 | integer nhel_survey !Number of helicities to sum for each | ||
1731 | 18 | parameter (nhel_survey=0) !phase space point. (0 = sum_all) | ||
1732 | 19 | c | ||
1733 | 20 | c The following parameters are used by gen_ximprove.f in running refine | ||
1734 | 21 | c | ||
1735 | 22 | integer min_events !Minimum number of events/iteration | ||
1736 | 23 | parameter (min_events = 2000) !to refine a channel | ||
1737 | 24 | integer max_events !Maximum number of events/iteration | ||
1738 | 25 | parameter (max_events = 2000) !to refine a channel | ||
1739 | 26 | integer max_iter !Maximum number of iterations | ||
1740 | 27 | parameter (max_iter = 9) !during refinement | ||
1741 | 28 | integer nhel_refine !Number of helicities to sum for each | ||
1742 | 29 | parameter (nhel_refine=0) !phase space point. (0 = sum_all) | ||
1743 | 30 | c | ||
1744 | 31 | c The following are used for parallel running | ||
1745 | 32 | c | ||
1746 | 33 | character*(20) PBS_QUE | ||
1747 | 34 | parameter (PBS_QUE = 'madgraph') | ||
1748 | 35 | |||
1749 | 36 | integer ChanPerJob | ||
1750 | 37 | parameter (ChanPerJob=100000000) !Number of channels / job for survey | ||
1751 | 38 | |||
1752 | 39 | c integer max_np | ||
1753 | 40 | c parameter (max_np=1) !Number of channels / job for refine | ||
1754 | 41 | c | ||
1755 | 42 | c | ||
1756 | 43 | c | ||
1757 | 44 | double precision trunc_max | ||
1758 | 45 | parameter (trunc_max=0.01) | ||
1759 | 46 | c | ||
1760 | 47 | c The following are used for grid type running | ||
1761 | 48 | c | ||
1762 | 49 | double precision acc_wu | ||
1763 | 50 | parameter (acc_wu = 0.01) !Desired accuracy from warmup run | ||
1764 | 51 | integer npoints_wu, itmax_wu !warmup # points/iterations | ||
1765 | 52 | parameter (npoints_wu = 4000, itmax_wu = 8) | ||
1766 | 53 | integer min_gevents_wu | ||
1767 | 54 | parameter (min_gevents_wu=1000) !Minumum # unweighted events to generate from channel | ||
1768 | 55 | 0 | ||
1769 | === modified file 'Template/NLO/Source/setrun.f' | |||
1770 | --- Template/NLO/Source/setrun.f 2017-05-09 11:54:11 +0000 | |||
1771 | +++ Template/NLO/Source/setrun.f 2017-08-16 21:26:30 +0000 | |||
1772 | @@ -6,47 +6,16 @@ | |||
1773 | 6 | c 2. Collider parameters | 6 | c 2. Collider parameters |
1774 | 7 | c 3. cuts | 7 | c 3. cuts |
1775 | 8 | c---------------------------------------------------------------------- | 8 | c---------------------------------------------------------------------- |
1776 | 9 | use extra_weights | ||
1777 | 9 | implicit none | 10 | implicit none |
1778 | 10 | c | ||
1779 | 11 | c parameters | ||
1780 | 12 | c | ||
1781 | 13 | integer maxpara | ||
1782 | 14 | parameter (maxpara=1000) | ||
1783 | 15 | c | ||
1784 | 16 | c local | ||
1785 | 17 | c | ||
1786 | 18 | integer npara | ||
1787 | 19 | character*20 param(maxpara),value(maxpara) | ||
1788 | 20 | c | ||
1789 | 21 | c include | ||
1790 | 22 | c | ||
1791 | 23 | include 'PDF/pdf.inc' | 11 | include 'PDF/pdf.inc' |
1792 | 24 | include 'run.inc' | 12 | include 'run.inc' |
1793 | 25 | include 'alfas.inc' | 13 | include 'alfas.inc' |
1794 | 26 | include 'MODEL/coupl.inc' | 14 | include 'MODEL/coupl.inc' |
1804 | 27 | include '../SubProcesses/reweight0.inc' | 15 | integer k,i |
1796 | 28 | |||
1797 | 29 | double precision D | ||
1798 | 30 | common/to_dj/D | ||
1799 | 31 | c | ||
1800 | 32 | c local | ||
1801 | 33 | c | ||
1802 | 34 | character*20 ctemp | ||
1803 | 35 | integer k,i,l1,l2 | ||
1805 | 36 | character*132 buff | 16 | character*132 buff |
1806 | 37 | C | ||
1807 | 38 | C input cuts | ||
1808 | 39 | C | ||
1809 | 40 | include 'cuts.inc' | 17 | include 'cuts.inc' |
1819 | 41 | C | 18 | c Les Houches init block (for the <init> info) |
1811 | 42 | C BEAM POLARIZATION | ||
1812 | 43 | C | ||
1813 | 44 | REAL*8 POL(2) | ||
1814 | 45 | common/to_polarization/ POL | ||
1815 | 46 | data POL/1d0,1d0/ | ||
1816 | 47 | c | ||
1817 | 48 | c Les Houches init block (for the <init> info) | ||
1818 | 49 | c | ||
1820 | 50 | integer maxpup | 19 | integer maxpup |
1821 | 51 | parameter(maxpup=100) | 20 | parameter(maxpup=100) |
1822 | 52 | integer idbmup,pdfgup,pdfsup,idwtup,nprup,lprup | 21 | integer idbmup,pdfgup,pdfsup,idwtup,nprup,lprup |
1823 | @@ -55,7 +24,6 @@ | |||
1824 | 55 | & idwtup,nprup,xsecup(maxpup),xerrup(maxpup), | 24 | & idwtup,nprup,xsecup(maxpup),xerrup(maxpup), |
1825 | 56 | & xmaxup(maxpup),lprup(maxpup) | 25 | & xmaxup(maxpup),lprup(maxpup) |
1826 | 57 | c | 26 | c |
1827 | 58 | logical gridrun,gridpack | ||
1828 | 59 | integer iseed | 27 | integer iseed |
1829 | 60 | common /to_seed/ iseed | 28 | common /to_seed/ iseed |
1830 | 61 | integer nevents | 29 | integer nevents |
1831 | @@ -64,17 +32,13 @@ | |||
1832 | 64 | integer iappl | 32 | integer iappl |
1833 | 65 | common /for_applgrid/ iappl | 33 | common /for_applgrid/ iappl |
1834 | 66 | integer idum | 34 | integer idum |
1840 | 67 | C | 35 | c jet-rate distance. To be set to 1 for FxFx |
1841 | 68 | c | 36 | double precision D |
1842 | 69 | c---------- | 37 | common/to_dj/D |
1843 | 70 | c start | 38 | c Include all the parameters set in the run_card.dat |
1839 | 71 | c---------- | ||
1844 | 72 | include 'run_card.inc' | 39 | include 'run_card.inc' |
1847 | 73 | 40 | c Change shower_MC string to upper case | |
1846 | 74 | c MZ add the possibility to have shower_MC input lowercase | ||
1848 | 75 | call to_upper(shower_MC) | 41 | call to_upper(shower_MC) |
1849 | 76 | C | ||
1850 | 77 | |||
1851 | 78 | c Determine if there is a need to do scale and/or PDF reweighting | 42 | c Determine if there is a need to do scale and/or PDF reweighting |
1852 | 79 | do_rwgt_scale=.false. | 43 | do_rwgt_scale=.false. |
1853 | 80 | do i=1,dyn_scale(0) | 44 | do i=1,dyn_scale(0) |
1854 | @@ -90,69 +54,41 @@ | |||
1855 | 90 | exit | 54 | exit |
1856 | 91 | endif | 55 | endif |
1857 | 92 | enddo | 56 | enddo |
1858 | 93 | |||
1859 | 94 | c Default scale and PDF choice used for the actual run | 57 | c Default scale and PDF choice used for the actual run |
1860 | 95 | dynamical_scale_choice=dyn_scale(1) | 58 | dynamical_scale_choice=dyn_scale(1) |
1861 | 96 | lhaid=lhaPDFid(1) | 59 | lhaid=lhaPDFid(1) |
1862 | 97 | |||
1863 | 98 | c merging cuts | ||
1864 | 99 | xqcut=0d0 | ||
1865 | 100 | xmtc=0d0 | ||
1866 | 101 | d=1d0 | ||
1867 | 102 | |||
1868 | 103 | c********************************************************************* | ||
1869 | 104 | c Random Number Seed * | ||
1870 | 105 | c********************************************************************* | ||
1871 | 106 | |||
1872 | 107 | gridrun=.false. | ||
1873 | 108 | gridpack=.false. | ||
1874 | 109 | |||
1875 | 110 | c************************************************************************ | ||
1876 | 111 | c Renormalization and factorization scales * | ||
1877 | 112 | c************************************************************************ | ||
1878 | 113 | c | ||
1879 | 114 | |||
1880 | 115 | c For backward compatibility | 60 | c For backward compatibility |
1881 | 116 | scale = muR_ref_fixed | 61 | scale = muR_ref_fixed |
1882 | 117 | q2fact(1) = muF1_ref_fixed**2 ! fact scale**2 for pdf1 | 62 | q2fact(1) = muF1_ref_fixed**2 ! fact scale**2 for pdf1 |
1883 | 118 | q2fact(2) = muF2_ref_fixed**2 ! fact scale**2 for pdf2 | 63 | q2fact(2) = muF2_ref_fixed**2 ! fact scale**2 for pdf2 |
1884 | 119 | scalefact=muR_over_ref | 64 | scalefact=muR_over_ref |
1885 | 120 | ellissextonfact=QES_over_ref | 65 | ellissextonfact=QES_over_ref |
1886 | 121 | |||
1887 | 122 | c check that the event normalization input is reasoble | 66 | c check that the event normalization input is reasoble |
1888 | 123 | buff = event_norm | 67 | buff = event_norm |
1889 | 124 | call case_trap2(buff) ! requires a string of length 20 at least | 68 | call case_trap2(buff) ! requires a string of length 20 at least |
1890 | 125 | event_norm=buff | 69 | event_norm=buff |
1893 | 126 | if (event_norm(1:7).ne.'average' .and. event_norm(1:3).ne.'sum' | 70 | if ( event_norm(1:7).ne.'average' .and. |
1894 | 127 | $ .and. event_norm(1:5).ne.'unity')then | 71 | $ event_norm(1:3).ne.'sum' .and. |
1895 | 72 | $ event_norm(1:5).ne.'unity'.and. | ||
1896 | 73 | $ event_norm(1:4).ne.'bias')then | ||
1897 | 128 | write (*,*) 'Do not understand the event_norm parameter'/ | 74 | write (*,*) 'Do not understand the event_norm parameter'/ |
1898 | 129 | & /' in the run_card.dat. Possible options are'/ | 75 | & /' in the run_card.dat. Possible options are'/ |
1907 | 130 | & /' "average", "sum" or "unity". Current input is: ', | 76 | & /' "average", "sum", "unity" or "bias". '/ |
1908 | 131 | & event_norm | 77 | & /'Current input is: ', event_norm |
1901 | 132 | open(unit=26,file='../../error',status='unknown') | ||
1902 | 133 | write (26,*) 'Do not understand the event_norm parameter'/ | ||
1903 | 134 | & /' in the run_card.dat. Possible options are'/ | ||
1904 | 135 | & /' "average", "sum" or "unity". Current input is: ', | ||
1905 | 136 | & event_norm | ||
1906 | 137 | |||
1909 | 138 | stop 1 | 78 | stop 1 |
1910 | 139 | endif | 79 | endif |
1914 | 140 | 80 | c Check parameters for FxFx/UNLOPS/NNLL-veto | |
1912 | 141 | c info for reweight | ||
1913 | 142 | |||
1915 | 143 | if ( ickkw.ne.0 .and. ickkw.ne.4 .and. ickkw.ne.3 .and. | 81 | if ( ickkw.ne.0 .and. ickkw.ne.4 .and. ickkw.ne.3 .and. |
1916 | 144 | & ickkw.ne.-1) then | 82 | & ickkw.ne.-1) then |
1917 | 145 | write (*,*) 'ickkw parameter not known. ickkw=',ickkw | 83 | write (*,*) 'ickkw parameter not known. ickkw=',ickkw |
1918 | 146 | stop | 84 | stop |
1919 | 147 | endif | 85 | endif |
1920 | 148 | c$$$ ickkw=0 | ||
1921 | 149 | chcluster=.false. | 86 | chcluster=.false. |
1922 | 150 | ktscheme=1 | 87 | ktscheme=1 |
1928 | 151 | 88 | xqcut=0d0 | |
1929 | 152 | c !!! Default behavior changed (MH, Aug. 07) !!! | 89 | xmtc=0d0 |
1930 | 153 | c If no pdf, read the param_card and use the value from there and | 90 | D=1d0 |
1931 | 154 | c order of alfas running = 2 | 91 | c Set alphaS(mZ) |
1927 | 155 | |||
1932 | 156 | if(lpp(1).ne.0.or.lpp(2).ne.0) then | 92 | if(lpp(1).ne.0.or.lpp(2).ne.0) then |
1933 | 157 | write(*,*) 'A PDF is used, so alpha_s(MZ)'/ | 93 | write(*,*) 'A PDF is used, so alpha_s(MZ)'/ |
1934 | 158 | & /' is going to be modified' | 94 | & /' is going to be modified' |
1935 | @@ -172,33 +108,29 @@ | |||
1936 | 172 | write(*,*) 'The default order of alpha_s running is fixed to ' | 108 | write(*,*) 'The default order of alpha_s running is fixed to ' |
1937 | 173 | & ,nloop | 109 | & ,nloop |
1938 | 174 | endif | 110 | endif |
1942 | 175 | c !!! end of modification !!! | 111 | C Fill common block for Les Houches init info |
1940 | 176 | |||
1941 | 177 | C Fill common block for Les Houches init info | ||
1943 | 178 | do i=1,2 | 112 | do i=1,2 |
1960 | 179 | if(lpp(i).eq.1.or.lpp(i).eq.2) then | 113 | if(lpp(i).eq.1.or.lpp(i).eq.2) then |
1961 | 180 | idbmup(i)=2212 | 114 | idbmup(i)=2212 |
1962 | 181 | elseif(lpp(i).eq.-1.or.lpp(i).eq.-2) then | 115 | elseif(lpp(i).eq.-1.or.lpp(i).eq.-2) then |
1963 | 182 | idbmup(i)=-2212 | 116 | idbmup(i)=-2212 |
1964 | 183 | elseif(lpp(i).eq.3) then | 117 | elseif(lpp(i).eq.3) then |
1965 | 184 | idbmup(i)=11 | 118 | idbmup(i)=11 |
1966 | 185 | elseif(lpp(i).eq.-3) then | 119 | elseif(lpp(i).eq.-3) then |
1967 | 186 | idbmup(i)=-11 | 120 | idbmup(i)=-11 |
1968 | 187 | elseif(lpp(i).eq.0) then | 121 | elseif(lpp(i).eq.0) then |
1969 | 188 | open (unit=71,status='old',file='initial_states_map.dat') | 122 | open (unit=71,status='old',file='initial_states_map.dat') |
1970 | 189 | read (71,*,err=100)idum,idum,idbmup(1),idbmup(2) | 123 | read (71,*,err=100)idum,idum,idbmup(1),idbmup(2) |
1971 | 190 | close (71) | 124 | close (71) |
1972 | 191 | c idbmup(i)=idup(i,1) | 125 | else |
1973 | 192 | else | 126 | idbmup(i)=lpp(i) |
1974 | 193 | idbmup(i)=lpp(i) | 127 | endif |
1959 | 194 | endif | ||
1975 | 195 | ebmup(i)=ebeam(i) | 128 | ebmup(i)=ebeam(i) |
1976 | 196 | enddo | 129 | enddo |
1977 | 197 | call get_pdfup(pdlabel,pdfgup,pdfsup,lhaid) | 130 | call get_pdfup(pdlabel,pdfgup,pdfsup,lhaid) |
1979 | 198 | 131 | c Fill the nmemPDF(i) array with the number of PDF error set. This we | |
1980 | 132 | c get from LHAPDF. | ||
1981 | 199 | if (lpdfvar(1) .and. (lpp(1).ne.0.or.lpp(2).ne.0) ) then | 133 | if (lpdfvar(1) .and. (lpp(1).ne.0.or.lpp(2).ne.0) ) then |
1982 | 200 | c fill the nmemPDF(i) array with the number of PDF error set. This we | ||
1983 | 201 | c get from LHAPDF. | ||
1984 | 202 | call numberPDFm(1,nmemPDF(1)) | 134 | call numberPDFm(1,nmemPDF(1)) |
1985 | 203 | if (nmemPDF(1).eq.1) then | 135 | if (nmemPDF(1).eq.1) then |
1986 | 204 | nmemPDF(1)=0 | 136 | nmemPDF(1)=0 |
1987 | @@ -207,100 +139,51 @@ | |||
1988 | 207 | else | 139 | else |
1989 | 208 | nmemPDF(1)=0 | 140 | nmemPDF(1)=0 |
1990 | 209 | endif | 141 | endif |
1991 | 210 | |||
1992 | 211 | return | ||
1993 | 212 | 99 write(*,*) 'error in reading' | ||
1994 | 213 | return | 142 | return |
1995 | 214 | 100 write(*,*) '"initial_states_map.dat" not found (or incorrect'/ | 143 | 100 write(*,*) '"initial_states_map.dat" not found (or incorrect'/ |
1996 | 215 | $ /' format) by "Source/setrun"' | 144 | $ /' format) by "Source/setrun"' |
1997 | 216 | stop 1 | 145 | stop 1 |
1998 | 217 | end | 146 | end |
1999 | 218 | 147 | ||
2000 | 219 | C------------------------------------------------- | ||
2001 | 220 | C GET_PDFUP | ||
2002 | 221 | C Convert MadEvent pdf name to LHAPDF number | ||
2003 | 222 | C------------------------------------------------- | ||
2004 | 223 | |||
2005 | 224 | subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) | 148 | subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) |
2006 | 149 | C Convert internal pdf name to LHAPDF number | ||
2007 | 225 | implicit none | 150 | implicit none |
2008 | 226 | |||
2009 | 227 | character*(*) pdfin | 151 | character*(*) pdfin |
2010 | 228 | integer mpdf | 152 | integer mpdf |
2011 | 229 | integer npdfs,i,pdfgup(2),pdfsup(2),lhaid | 153 | integer npdfs,i,pdfgup(2),pdfsup(2),lhaid |
2012 | 230 | |||
2013 | 231 | parameter (npdfs=16) | 154 | parameter (npdfs=16) |
2014 | 232 | character*7 pdflabs(npdfs) | 155 | character*7 pdflabs(npdfs) |
2032 | 233 | data pdflabs/ | 156 | data pdflabs/ 'none', 'mrs02nl', 'mrs02nn', 'cteq4_m', 'cteq4_l', |
2033 | 234 | $ 'none', | 157 | $ 'cteq4_d', 'cteq5_m', 'cteq5_d', 'cteq5_l', 'cteq5m1', |
2034 | 235 | $ 'mrs02nl', | 158 | $ 'cteq6_m', 'cteq6_l', 'cteq6l1', 'nn23lo', 'nn23lo1', |
2035 | 236 | $ 'mrs02nn', | 159 | $ 'nn23nlo'/ |
2019 | 237 | $ 'cteq4_m', | ||
2020 | 238 | $ 'cteq4_l', | ||
2021 | 239 | $ 'cteq4_d', | ||
2022 | 240 | $ 'cteq5_m', | ||
2023 | 241 | $ 'cteq5_d', | ||
2024 | 242 | $ 'cteq5_l', | ||
2025 | 243 | $ 'cteq5m1', | ||
2026 | 244 | $ 'cteq6_m', | ||
2027 | 245 | $ 'cteq6_l', | ||
2028 | 246 | $ 'cteq6l1', | ||
2029 | 247 | $ 'nn23lo', | ||
2030 | 248 | $ 'nn23lo1', | ||
2031 | 249 | $ 'nn23nlo'/ | ||
2036 | 250 | integer numspdf(npdfs) | 160 | integer numspdf(npdfs) |
2056 | 251 | data numspdf/ | 161 | data numspdf/ 00000, 20250, 20270, 19150, 19170, 19160, 19050, |
2057 | 252 | $ 00000, | 162 | $ 19060, 19070, 19051, 10000, 10041, 10042, 246800, 247000, |
2058 | 253 | $ 20250, | 163 | $ 244800/ |
2040 | 254 | $ 20270, | ||
2041 | 255 | $ 19150, | ||
2042 | 256 | $ 19170, | ||
2043 | 257 | $ 19160, | ||
2044 | 258 | $ 19050, | ||
2045 | 259 | $ 19060, | ||
2046 | 260 | $ 19070, | ||
2047 | 261 | $ 19051, | ||
2048 | 262 | $ 10000, | ||
2049 | 263 | $ 10041, | ||
2050 | 264 | $ 10042, | ||
2051 | 265 | $ 246800, | ||
2052 | 266 | $ 247000, | ||
2053 | 267 | $ 244800/ | ||
2054 | 268 | |||
2055 | 269 | |||
2059 | 270 | if(pdfin.eq."lhapdf") then | 164 | if(pdfin.eq."lhapdf") then |
2066 | 271 | write(*,*)'using LHAPDF' | 165 | write(*,*)'using LHAPDF' |
2067 | 272 | do i=1,2 | 166 | do i=1,2 |
2068 | 273 | pdfgup(i)=-1 | 167 | pdfgup(i)=-1 |
2069 | 274 | pdfsup(i)=lhaid | 168 | pdfsup(i)=lhaid |
2070 | 275 | enddo | 169 | enddo |
2071 | 276 | return | 170 | return |
2072 | 277 | endif | 171 | endif |
2073 | 278 | |||
2074 | 279 | |||
2075 | 280 | mpdf=-1 | 172 | mpdf=-1 |
2076 | 281 | do i=1,npdfs | 173 | do i=1,npdfs |
2080 | 282 | if(pdfin(1:len_trim(pdfin)) .eq. pdflabs(i))then | 174 | if(pdfin(1:len_trim(pdfin)) .eq. pdflabs(i))then |
2081 | 283 | mpdf=numspdf(i) | 175 | mpdf=numspdf(i) |
2082 | 284 | endif | 176 | endif |
2083 | 285 | enddo | 177 | enddo |
2084 | 286 | |||
2085 | 287 | if(mpdf.eq.-1) then | 178 | if(mpdf.eq.-1) then |
2096 | 288 | write(*,*)'ERROR: pdf ',pdfin,' not implemented in get_pdfup.' | 179 | write(*,*)'ERROR: pdf ',pdfin,' not implemented in get_pdfup.' |
2097 | 289 | write(*,*)'known pdfs are' | 180 | write(*,*)'known pdfs are' |
2098 | 290 | write(*,*) pdflabs | 181 | write(*,*) pdflabs |
2099 | 291 | open(unit=26,file='../../error',status='unknown') | 182 | stop 1 |
2090 | 292 | write(26,*)'ERROR: pdf ',pdfin,' not implemented in get_pdfup.' | ||
2091 | 293 | write(26,*)'known pdfs are' | ||
2092 | 294 | write(26,*) pdflabs | ||
2093 | 295 | stop 1 | ||
2094 | 296 | c$$$ write(*,*)'using ',pdflabs(12) | ||
2095 | 297 | c$$$ mpdf=numspdf(12) | ||
2100 | 298 | endif | 183 | endif |
2101 | 299 | |||
2102 | 300 | do i=1,2 | 184 | do i=1,2 |
2105 | 301 | pdfgup(i)=-1 | 185 | pdfgup(i)=-1 |
2106 | 302 | pdfsup(i)=mpdf | 186 | pdfsup(i)=mpdf |
2107 | 303 | enddo | 187 | enddo |
2108 | 304 | |||
2109 | 305 | return | 188 | return |
2110 | 306 | end | 189 | end |
2111 | 307 | 190 | ||
2112 | === removed file 'Template/NLO/Source/sudgrid.inc' | |||
2113 | --- Template/NLO/Source/sudgrid.inc 2012-08-28 21:06:34 +0000 | |||
2114 | +++ Template/NLO/Source/sudgrid.inc 1970-01-01 00:00:00 +0000 | |||
2115 | @@ -1,4 +0,0 @@ | |||
2116 | 1 | integer npt2,nx1,nx2 | ||
2117 | 2 | parameter(npt2=40,nx1=80,nx2=20) | ||
2118 | 3 | double precision points(nx2+nx1+npt2,2),sudgrid(nx2,nx1,npt2,-2:5) | ||
2119 | 4 | common/sudgrid/points,sudgrid | ||
2120 | 5 | 0 | ||
2121 | === modified file 'Template/NLO/SubProcesses/add_write_info.f' | |||
2122 | --- Template/NLO/SubProcesses/add_write_info.f 2017-05-16 08:15:12 +0000 | |||
2123 | +++ Template/NLO/SubProcesses/add_write_info.f 2017-08-16 21:26:30 +0000 | |||
2124 | @@ -7,7 +7,6 @@ | |||
2125 | 7 | include "nexternal.inc" | 7 | include "nexternal.inc" |
2126 | 8 | include "born_nhel.inc" | 8 | include "born_nhel.inc" |
2127 | 9 | include "coloramps.inc" | 9 | include "coloramps.inc" |
2128 | 10 | include "reweight0.inc" | ||
2129 | 11 | include "nFKSconfigs.inc" | 10 | include "nFKSconfigs.inc" |
2130 | 12 | include "leshouche_decl.inc" | 11 | include "leshouche_decl.inc" |
2131 | 13 | include "run.inc" | 12 | include "run.inc" |
2132 | 14 | 13 | ||
2133 | === modified file 'Template/NLO/SubProcesses/analysis_lhe.f' | |||
2134 | --- Template/NLO/SubProcesses/analysis_lhe.f 2017-02-14 15:57:59 +0000 | |||
2135 | +++ Template/NLO/SubProcesses/analysis_lhe.f 2017-08-16 21:26:30 +0000 | |||
2136 | @@ -30,29 +30,30 @@ | |||
2137 | 30 | integer npoints | 30 | integer npoints |
2138 | 31 | double precision cross_section | 31 | double precision cross_section |
2139 | 32 | common /for_FixedOrder_lhe/ cross_section,npoints | 32 | common /for_FixedOrder_lhe/ cross_section,npoints |
2140 | 33 | character*10 MonteCarlo | ||
2141 | 33 | inquire(41,OPENED=lopen) ! safety | 34 | inquire(41,OPENED=lopen) ! safety |
2142 | 34 | if (lopen) then | 35 | if (lopen) then |
2143 | 35 | backspace(41) ! overwrite the final </eventgroup> tag | 36 | backspace(41) ! overwrite the final </eventgroup> tag |
2144 | 36 | write (41,*) nevents,sum_of_wgts,cross_section | 37 | write (41,*) nevents,sum_of_wgts,cross_section |
2145 | 37 | close(41) | 38 | close(41) |
2146 | 38 | open(41, file='header.txt') | 39 | open(41, file='header.txt') |
2148 | 39 | call write_lhef_header(41, 0, 'FO') | 40 | MonteCarlo='FO' |
2149 | 41 | call write_lhef_header(41, 0, MonteCarlo) | ||
2150 | 40 | close(41) | 42 | close(41) |
2151 | 41 | endif | 43 | endif |
2152 | 42 | end | 44 | end |
2153 | 43 | 45 | ||
2154 | 44 | subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) | 46 | subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) |
2155 | 47 | use extra_weights | ||
2156 | 45 | implicit none | 48 | implicit none |
2157 | 46 | include 'nexternal.inc' | 49 | include 'nexternal.inc' |
2158 | 47 | include 'reweight.inc' | ||
2159 | 48 | include 'run.inc' | 50 | include 'run.inc' |
2162 | 49 | integer nwgt,max_weight | 51 | integer nwgt |
2161 | 50 | parameter (max_weight=maxscales*maxscales+maxpdfs+1) | ||
2163 | 51 | c include 'genps.inc' | 52 | c include 'genps.inc' |
2164 | 52 | integer istatus(nexternal) | 53 | integer istatus(nexternal) |
2165 | 53 | integer iPDG(nexternal) | 54 | integer iPDG(nexternal) |
2166 | 54 | double precision p(0:4,nexternal) | 55 | double precision p(0:4,nexternal) |
2168 | 55 | double precision wgts(max_weight) | 56 | double precision wgts(*) |
2169 | 56 | integer ibody | 57 | integer ibody |
2170 | 57 | integer nwgts,nevents | 58 | integer nwgts,nevents |
2171 | 58 | double precision sum_of_wgts | 59 | double precision sum_of_wgts |
2172 | 59 | 60 | ||
2173 | === removed file 'Template/NLO/SubProcesses/c_weight.inc' | |||
2174 | --- Template/NLO/SubProcesses/c_weight.inc 2016-03-21 08:45:42 +0000 | |||
2175 | +++ Template/NLO/SubProcesses/c_weight.inc 1970-01-01 00:00:00 +0000 | |||
2176 | @@ -1,24 +0,0 @@ | |||
2177 | 1 | * -*-fortran-*- | ||
2178 | 2 | |||
2179 | 3 | integer max_contr,max_wgt,max_iproc | ||
2180 | 4 | parameter (max_contr=128,max_wgt=1024,max_iproc=100) | ||
2181 | 5 | logical H_event(max_contr) | ||
2182 | 6 | integer nFKS(max_contr),itype(max_contr),QCDpower(max_contr) | ||
2183 | 7 | $ ,pdg(nexternal,0:max_contr),pdg_uborn(nexternal,0:max_contr) | ||
2184 | 8 | $ ,parton_pdg_uborn(nexternal,max_iproc,max_contr) | ||
2185 | 9 | $ ,parton_pdg(nexternal,max_iproc,max_contr),icontr,iwgt | ||
2186 | 10 | $ ,plot_id(max_contr),niproc(max_contr),parton_pdf(nexternal | ||
2187 | 11 | $ ,max_iproc,max_contr),icontr_sum(0:max_iproc,max_contr) | ||
2188 | 12 | $ ,icontr_picked,iproc_picked | ||
2189 | 13 | double precision momenta(0:3,nexternal,max_contr),momenta_m(0:3 | ||
2190 | 14 | $ ,nexternal,2,max_contr),wgt(3,max_contr),wgt_ME_tree(2 | ||
2191 | 15 | $ ,max_contr),bjx(2,max_contr),scales2(3,max_contr) | ||
2192 | 16 | $ ,g_strong(max_contr),wgts(max_wgt,max_contr) | ||
2193 | 17 | $ ,parton_iproc(max_iproc,max_contr),y_bst(max_contr) | ||
2194 | 18 | $ ,plot_wgts(max_wgt,max_contr),shower_scale(max_contr) | ||
2195 | 19 | $ ,unwgt(max_iproc,max_contr) | ||
2196 | 20 | common /c_weights/momenta,momenta_m,wgt,wgt_ME_tree,wgts,plot_wgts | ||
2197 | 21 | $ ,parton_iproc,bjx,scales2,g_strong,y_bst,shower_scale,unwgt | ||
2198 | 22 | $ ,parton_pdg,nFKS,itype,QCDpower,pdg,pdg_uborn | ||
2199 | 23 | $ ,parton_pdg_uborn,plot_id,niproc,icontr,iwgt,icontr_sum | ||
2200 | 24 | $ ,icontr_picked,iproc_picked,H_event | ||
2201 | 25 | 0 | ||
2202 | === modified file 'Template/NLO/SubProcesses/check_poles.f' | |||
2203 | --- Template/NLO/SubProcesses/check_poles.f 2017-04-13 09:51:06 +0000 | |||
2204 | +++ Template/NLO/SubProcesses/check_poles.f 2017-08-16 21:26:30 +0000 | |||
2205 | @@ -183,6 +183,7 @@ | |||
2206 | 183 | enddo | 183 | enddo |
2207 | 184 | enddo | 184 | enddo |
2208 | 185 | 185 | ||
2209 | 186 | CALL UPDATE_AS_PARAM() | ||
2210 | 186 | call sborn(p_born, born) | 187 | call sborn(p_born, born) |
2211 | 187 | call sloopmatrix_thres(p_born,virt_wgts,tolerance, | 188 | call sloopmatrix_thres(p_born,virt_wgts,tolerance, |
2212 | 188 | 1 accuracies,return_code) | 189 | 1 accuracies,return_code) |
2213 | 189 | 190 | ||
2214 | === modified file 'Template/NLO/SubProcesses/collect_events.f' | |||
2215 | --- Template/NLO/SubProcesses/collect_events.f 2016-02-24 12:45:15 +0000 | |||
2216 | +++ Template/NLO/SubProcesses/collect_events.f 2017-08-16 21:26:30 +0000 | |||
2217 | @@ -1,6 +1,6 @@ | |||
2218 | 1 | program collect_events | 1 | program collect_events |
2219 | 2 | implicit none | 2 | implicit none |
2221 | 3 | character*120 string120,eventfile | 3 | character*512 string512,eventfile |
2222 | 4 | character*19 basicfile,nextbasicfile | 4 | character*19 basicfile,nextbasicfile |
2223 | 5 | character*15 outputfile | 5 | character*15 outputfile |
2224 | 6 | integer istep,i,numoffiles,nbunches,nevents,ievents,junit(80) | 6 | integer istep,i,numoffiles,nbunches,nevents,ievents,junit(80) |
2225 | @@ -65,9 +65,9 @@ | |||
2226 | 65 | nevents=0 | 65 | nevents=0 |
2227 | 66 | xtotal=0.d0 | 66 | xtotal=0.d0 |
2228 | 67 | do while (.true.) | 67 | do while (.true.) |
2232 | 68 | read(10,'(120a)',err=2,end=2) string120 | 68 | read(10,'(512a)',err=2,end=2) string512 |
2233 | 69 | eventfile=string120(2:index(string120,' ')) | 69 | eventfile=string512(2:index(string512,' ')) |
2234 | 70 | read(string120(index(string120,' '):120),*) | 70 | read(string512(index(string512,' '):512),*) |
2235 | 71 | $ ievents,absxsec,xsecfrac | 71 | $ ievents,absxsec,xsecfrac |
2236 | 72 | if (ievents.eq.0) cycle | 72 | if (ievents.eq.0) cycle |
2237 | 73 | nevents=nevents+ievents | 73 | nevents=nevents+ievents |
2238 | @@ -209,8 +209,9 @@ | |||
2239 | 209 | end | 209 | end |
2240 | 210 | 210 | ||
2241 | 211 | 211 | ||
2244 | 212 | subroutine collect_all_evfiles(ioutput,numoffiles,junit, | 212 | subroutine collect_all_evfiles(ioutput,numoffiles,junit,imaxevt |
2245 | 213 | # imaxevt,evwgt) | 213 | $ ,evwgt) |
2246 | 214 | use extra_weights | ||
2247 | 214 | implicit none | 215 | implicit none |
2248 | 215 | integer i_orig | 216 | integer i_orig |
2249 | 216 | common /c_i_orig/i_orig | 217 | common /c_i_orig/i_orig |
2250 | @@ -237,8 +238,6 @@ | |||
2251 | 237 | data iseed/1/ | 238 | data iseed/1/ |
2252 | 238 | double precision rnd,fk88random | 239 | double precision rnd,fk88random |
2253 | 239 | external fk88random | 240 | external fk88random |
2254 | 240 | logical debug | ||
2255 | 241 | parameter (debug=.false.) | ||
2256 | 242 | integer nevents_file(80),proc_id(80) | 241 | integer nevents_file(80),proc_id(80) |
2257 | 243 | common /to_nevents_file/nevents_file,proc_id | 242 | common /to_nevents_file/nevents_file,proc_id |
2258 | 244 | double precision xsecfrac_all(80) | 243 | double precision xsecfrac_all(80) |
2259 | @@ -249,18 +248,12 @@ | |||
2260 | 249 | double precision xsecup_l(100),xerrup_l(100) | 248 | double precision xsecup_l(100),xerrup_l(100) |
2261 | 250 | integer lprup_l(100),nproc_l | 249 | integer lprup_l(100),nproc_l |
2262 | 251 | logical found_proc | 250 | logical found_proc |
2263 | 252 | include 'reweight_all.inc' | ||
2264 | 253 | include 'run.inc' | 251 | include 'run.inc' |
2265 | 254 | integer proc_id_tot(0:100) | 252 | integer proc_id_tot(0:100) |
2266 | 255 | double precision xsec(100),xsecABS,xerr(100) | 253 | double precision xsec(100),xsecABS,xerr(100) |
2267 | 256 | logical get_xsec_from_res1 | 254 | logical get_xsec_from_res1 |
2268 | 257 | common/total_xsec/xsec,xerr,xsecABS,proc_id_tot,get_xsec_from_res1 | 255 | common/total_xsec/xsec,xerr,xsecABS,proc_id_tot,get_xsec_from_res1 |
2269 | 258 | c | 256 | c |
2270 | 259 | if(debug) then | ||
2271 | 260 | write (*,*) ioutput,numoffiles,(junit(ii),ii=1,numoffiles) | ||
2272 | 261 | write(ioutput,*)'test test test' | ||
2273 | 262 | return | ||
2274 | 263 | endif | ||
2275 | 264 | maxevt=0 | 257 | maxevt=0 |
2276 | 265 | if (.not. get_xsec_from_res1) then | 258 | if (.not. get_xsec_from_res1) then |
2277 | 266 | do i=1,100 | 259 | do i=1,100 |
2278 | 267 | 260 | ||
2279 | === modified file 'Template/NLO/SubProcesses/combine_root.C' | |||
2280 | --- Template/NLO/SubProcesses/combine_root.C 2013-12-02 16:53:51 +0000 | |||
2281 | +++ Template/NLO/SubProcesses/combine_root.C 2017-08-16 21:26:30 +0000 | |||
2282 | @@ -44,11 +44,13 @@ | |||
2283 | 44 | //can be easily lifted | 44 | //can be easily lifted |
2284 | 45 | int maxfiles=1000; | 45 | int maxfiles=1000; |
2285 | 46 | 46 | ||
2286 | 47 | int numoffiles; | ||
2287 | 48 | string filenames[maxfiles]; | ||
2288 | 49 | string currentdir; | ||
2289 | 50 | |||
2290 | 47 | if(fileoffiles.is_open()) | 51 | if(fileoffiles.is_open()) |
2291 | 48 | { | 52 | { |
2292 | 49 | string filenames[maxfiles]; | ||
2293 | 50 | 53 | ||
2294 | 51 | int numoffiles; | ||
2295 | 52 | fileoffiles >> numoffiles; | 54 | fileoffiles >> numoffiles; |
2296 | 53 | 55 | ||
2297 | 54 | if(numoffiles>maxfiles){ | 56 | if(numoffiles>maxfiles){ |
2298 | @@ -56,7 +58,6 @@ | |||
2299 | 56 | return; | 58 | return; |
2300 | 57 | } | 59 | } |
2301 | 58 | 60 | ||
2302 | 59 | string currentdir; | ||
2303 | 60 | fileoffiles >> currentdir; | 61 | fileoffiles >> currentdir; |
2304 | 61 | 62 | ||
2305 | 62 | for(int i = 0; i < numoffiles; ++i) | 63 | for(int i = 0; i < numoffiles; ++i) |
2306 | @@ -122,8 +123,8 @@ | |||
2307 | 122 | int llength = HistoContents.size(); | 123 | int llength = HistoContents.size(); |
2308 | 123 | if(myverbose)cout << "Total number of histograms: " << llength << endl; | 124 | if(myverbose)cout << "Total number of histograms: " << llength << endl; |
2309 | 124 | 125 | ||
2310 | 126 | int llength0 = llength; | ||
2311 | 125 | if(i==0){ | 127 | if(i==0){ |
2312 | 126 | int llength0 = llength; | ||
2313 | 127 | for(int j = 0; j < llength; j++){ | 128 | for(int j = 0; j < llength; j++){ |
2314 | 128 | TString histname = HistoContents[j]->GetName(); | 129 | TString histname = HistoContents[j]->GetName(); |
2315 | 129 | if(myverbose){ | 130 | if(myverbose){ |
2316 | 130 | 131 | ||
2317 | === modified file 'Template/NLO/SubProcesses/cuts.f' | |||
2318 | --- Template/NLO/SubProcesses/cuts.f 2017-05-09 12:37:07 +0000 | |||
2319 | +++ Template/NLO/SubProcesses/cuts.f 2017-08-16 21:26:30 +0000 | |||
2320 | @@ -898,32 +898,47 @@ | |||
2321 | 898 | end | 898 | end |
2322 | 899 | 899 | ||
2323 | 900 | 900 | ||
2337 | 901 | subroutine unweight_function(p_born,unwgtfun) | 901 | subroutine bias_weight_function(p,ipdg,bias_wgt) |
2338 | 902 | c This is a user-defined function to which to unweight the events | 902 | c This is a user-defined function to which to bias the event generation. |
2339 | 903 | c A non-flat distribution will generate events with a certain | 903 | c A non-flat distribution will generate events with a certain weight |
2340 | 904 | c weight. This is particularly useful to generate more events | 904 | c inversely proportinal to the bias_wgt. This is particularly useful to |
2341 | 905 | c (with smaller weight) in tails of distributions. | 905 | c generate more events (with smaller weight) in tails of distributions. |
2342 | 906 | c It computes the unwgt factor from the momenta and multiplies | 906 | c It computes the bias_wgt factor from the momenta and multiplies the |
2343 | 907 | c the weight that goes into MINT (or vegas) with this factor. | 907 | c weight that goes into MINT (or vegas) with this factor. Before |
2344 | 908 | c Before writing out the events (or making the plots), this factor | 908 | c writing out the events (or making the plots), this factor is again |
2345 | 909 | c is again divided out. | 909 | c divided out. A value different from 1 makes that MINT (or vegas) does |
2346 | 910 | c This function should be called with the Born momenta to be sure | 910 | c not list the correct cross section, but the cross section can still be |
2347 | 911 | c that it stays the same for the events, counter-events, etc. | 911 | c computed from summing all the weights of the events (and dividing by |
2348 | 912 | c A value different from 1 makes that MINT (or vegas) does not list | 912 | c the number of events). Since the weights of the events are no longer |
2349 | 913 | c the correct cross section. | 913 | c identical for all events, the statistical uncertainty on this total |
2350 | 914 | c cross section can be much larger than without including the bias. | ||
2351 | 915 | c | ||
2352 | 916 | c The 'bias_wgt' should be a IR-safe function of the momenta. | ||
2353 | 917 | c | ||
2354 | 918 | c For this to be used, the 'event_norm' option in the run_card should be | ||
2355 | 919 | c set to | ||
2356 | 920 | c 'bias' = event_norm | ||
2357 | 921 | c | ||
2358 | 914 | implicit none | 922 | implicit none |
2359 | 915 | include 'nexternal.inc' | 923 | include 'nexternal.inc' |
2371 | 916 | double precision unwgtfun,p_born(0:3,nexternal-1),shat,sumdot | 924 | double precision bias_wgt,p(0:3,nexternal),H_T |
2372 | 917 | external sumdot | 925 | integer ipdg(nexternal),i |
2373 | 918 | 926 | ||
2374 | 919 | unwgtfun=1d0 | 927 | bias_wgt=1d0 |
2375 | 920 | 928 | ||
2376 | 921 | c How to enhance the tails is very process dependent. But, it is | 929 | c How to enhance the tails is very process dependent. For example for |
2377 | 922 | c probably easiest to enhance the tails using shat, e.g.: | 930 | c top quark production one could use: |
2378 | 923 | c shat=sumdot(p_born(0,1),p_born(0,2),1d0) | 931 | c do i=1,nexternal |
2379 | 924 | c unwgtfun=max(100d0**2,shat)/100d0**2 | 932 | c if (ipdg(i).eq.6) then |
2380 | 925 | c unwgtfun=unwgtfun**2 | 933 | c bias_wgt=sqrt(p(1,i)**2+p(2,i)**2)**3 |
2381 | 926 | 934 | c endif | |
2382 | 935 | c enddo | ||
2383 | 936 | c Or to use H_T^2 one does | ||
2384 | 937 | c H_T=0d0 | ||
2385 | 938 | c do i=3,nexternal | ||
2386 | 939 | c H_T=H_T+sqrt(max(0d0,(p(0,i)+p(3,i))*(p(0,i)-p(3,i)))) | ||
2387 | 940 | c enddo | ||
2388 | 941 | c bias_wgt=H_T**2 | ||
2389 | 927 | return | 942 | return |
2390 | 928 | end | 943 | end |
2391 | 929 | 944 | ||
2392 | 930 | 945 | ||
2393 | === modified file 'Template/NLO/SubProcesses/driver_mintFO.f' | |||
2394 | --- Template/NLO/SubProcesses/driver_mintFO.f 2017-05-09 11:54:11 +0000 | |||
2395 | +++ Template/NLO/SubProcesses/driver_mintFO.f 2017-08-16 21:26:30 +0000 | |||
2396 | @@ -2,6 +2,7 @@ | |||
2397 | 2 | c************************************************************************** | 2 | c************************************************************************** |
2398 | 3 | c This is the driver for the whole calculation | 3 | c This is the driver for the whole calculation |
2399 | 4 | c************************************************************************** | 4 | c************************************************************************** |
2400 | 5 | use extra_weights | ||
2401 | 5 | implicit none | 6 | implicit none |
2402 | 6 | C | 7 | C |
2403 | 7 | C CONSTANTS | 8 | C CONSTANTS |
2404 | @@ -10,14 +11,13 @@ | |||
2405 | 10 | parameter (ZERO = 0d0) | 11 | parameter (ZERO = 0d0) |
2406 | 11 | include 'nexternal.inc' | 12 | include 'nexternal.inc' |
2407 | 12 | include 'genps.inc' | 13 | include 'genps.inc' |
2408 | 13 | include 'reweight.inc' | ||
2409 | 14 | INTEGER ITMAX, NCALL | 14 | INTEGER ITMAX, NCALL |
2410 | 15 | 15 | ||
2411 | 16 | common/citmax/itmax,ncall | 16 | common/citmax/itmax,ncall |
2412 | 17 | C | 17 | C |
2413 | 18 | C LOCAL | 18 | C LOCAL |
2414 | 19 | C | 19 | C |
2416 | 20 | integer i,j,l,l1,l2,ndim | 20 | integer i,j,l,l1,l2 |
2417 | 21 | character*130 buf | 21 | character*130 buf |
2418 | 22 | c | 22 | c |
2419 | 23 | c Global | 23 | c Global |
2420 | @@ -26,7 +26,8 @@ | |||
2421 | 26 | include 'run.inc' | 26 | include 'run.inc' |
2422 | 27 | include 'coupl.inc' | 27 | include 'coupl.inc' |
2423 | 28 | 28 | ||
2425 | 29 | c Vegas stuff | 29 | c Vegas stuff |
2426 | 30 | integer ndim | ||
2427 | 30 | common/tosigint/ndim | 31 | common/tosigint/ndim |
2428 | 31 | 32 | ||
2429 | 32 | real*8 sigint | 33 | real*8 sigint |
2430 | @@ -175,6 +176,8 @@ | |||
2431 | 175 | if(imode.eq.0)then | 176 | if(imode.eq.0)then |
2432 | 176 | c Don't safe the reweight information when just setting up the grids. | 177 | c Don't safe the reweight information when just setting up the grids. |
2433 | 177 | doreweight=.false. | 178 | doreweight=.false. |
2434 | 179 | do_rwgt_scale=.false. | ||
2435 | 180 | do_rwgt_pdf=.false. | ||
2436 | 178 | do kchan=1,nchans | 181 | do kchan=1,nchans |
2437 | 179 | do i=1,ndimmax | 182 | do i=1,ndimmax |
2438 | 180 | do j=0,nintervals | 183 | do j=0,nintervals |
2439 | @@ -210,10 +213,10 @@ | |||
2440 | 210 | endif | 213 | endif |
2441 | 211 | c | 214 | c |
2442 | 212 | c Setup for parton-level NLO reweighting | 215 | c Setup for parton-level NLO reweighting |
2443 | 213 | if(do_rwgt_scale.or.do_rwgt_pdf) call setup_fill_rwgt_NLOplot() | ||
2444 | 214 | call mint(sigint,ndim,ncall,itmax,imode,xgrid,ymax | 216 | call mint(sigint,ndim,ncall,itmax,imode,xgrid,ymax |
2445 | 215 | $ ,ymax_virt,ans,unc,chi2,nhits_in_grids) | 217 | $ ,ymax_virt,ans,unc,chi2,nhits_in_grids) |
2446 | 216 | call topout | 218 | call topout |
2447 | 219 | call deallocate_weight_lines | ||
2448 | 217 | write(*,*)'Final result [ABS]:',ans(1,0),' +/-',unc(1,0) | 220 | write(*,*)'Final result [ABS]:',ans(1,0),' +/-',unc(1,0) |
2449 | 218 | write(*,*)'Final result:',ans(2,0),' +/-',unc(2,0) | 221 | write(*,*)'Final result:',ans(2,0),' +/-',unc(2,0) |
2450 | 219 | write(*,*)'chi**2 per D.o.F.:',chi2(1,0) | 222 | write(*,*)'chi**2 per D.o.F.:',chi2(1,0) |
2451 | @@ -320,10 +323,6 @@ | |||
2452 | 320 | c timing statistics | 323 | c timing statistics |
2453 | 321 | include "timing_variables.inc" | 324 | include "timing_variables.inc" |
2454 | 322 | data tOLP/0.0/ | 325 | data tOLP/0.0/ |
2455 | 323 | data tFastJet/0.0/ | ||
2456 | 324 | data tPDF/0.0/ | ||
2457 | 325 | data tDSigI/0.0/ | ||
2458 | 326 | data tDSigR/0.0/ | ||
2459 | 327 | data tGenPS/0.0/ | 326 | data tGenPS/0.0/ |
2460 | 328 | data tBorn/0.0/ | 327 | data tBorn/0.0/ |
2461 | 329 | data tIS/0.0/ | 328 | data tIS/0.0/ |
2462 | @@ -345,12 +344,12 @@ | |||
2463 | 345 | 344 | ||
2464 | 346 | 345 | ||
2465 | 347 | double precision function sigint(xx,vegas_wgt,ifl,f) | 346 | double precision function sigint(xx,vegas_wgt,ifl,f) |
2466 | 347 | use weight_lines | ||
2467 | 348 | use extra_weights | ||
2468 | 348 | implicit none | 349 | implicit none |
2469 | 349 | include 'nexternal.inc' | 350 | include 'nexternal.inc' |
2470 | 350 | include 'mint.inc' | 351 | include 'mint.inc' |
2471 | 351 | include 'nFKSconfigs.inc' | 352 | include 'nFKSconfigs.inc' |
2472 | 352 | include 'c_weight.inc' | ||
2473 | 353 | include 'reweight.inc' | ||
2474 | 354 | include 'run.inc' | 353 | include 'run.inc' |
2475 | 355 | double precision xx(ndimmax),vegas_wgt,f(nintegrals),jac,p(0:3 | 354 | double precision xx(ndimmax),vegas_wgt,f(nintegrals),jac,p(0:3 |
2476 | 356 | $ ,nexternal),rwgt,vol,sig,x(99),MC_int_wgt | 355 | $ ,nexternal),rwgt,vol,sig,x(99),MC_int_wgt |
2477 | @@ -505,6 +504,7 @@ | |||
2478 | 505 | 504 | ||
2479 | 506 | subroutine update_fks_dir(nFKS) | 505 | subroutine update_fks_dir(nFKS) |
2480 | 507 | implicit none | 506 | implicit none |
2481 | 507 | include 'run.inc' | ||
2482 | 508 | integer nFKS | 508 | integer nFKS |
2483 | 509 | integer nFKSprocess | 509 | integer nFKSprocess |
2484 | 510 | common/c_nFKSprocess/nFKSprocess | 510 | common/c_nFKSprocess/nFKSprocess |
2485 | @@ -513,6 +513,7 @@ | |||
2486 | 513 | call leshouche_inc_chooser() | 513 | call leshouche_inc_chooser() |
2487 | 514 | call setcuts | 514 | call setcuts |
2488 | 515 | call setfksfactor(.false.) | 515 | call setfksfactor(.false.) |
2489 | 516 | if (ickkw.eq.3) call configs_and_props_inc_chooser() | ||
2490 | 516 | return | 517 | return |
2491 | 517 | end | 518 | end |
2492 | 518 | 519 | ||
2493 | 519 | 520 | ||
2494 | === modified file 'Template/NLO/SubProcesses/driver_mintMC.f' | |||
2495 | --- Template/NLO/SubProcesses/driver_mintMC.f 2017-05-09 12:41:29 +0000 | |||
2496 | +++ Template/NLO/SubProcesses/driver_mintMC.f 2017-08-16 21:26:30 +0000 | |||
2497 | @@ -2,6 +2,7 @@ | |||
2498 | 2 | c************************************************************************** | 2 | c************************************************************************** |
2499 | 3 | c This is the driver for the whole calculation | 3 | c This is the driver for the whole calculation |
2500 | 4 | c************************************************************************** | 4 | c************************************************************************** |
2501 | 5 | use extra_weights | ||
2502 | 5 | implicit none | 6 | implicit none |
2503 | 6 | C | 7 | C |
2504 | 7 | C CONSTANTS | 8 | C CONSTANTS |
2505 | @@ -10,7 +11,6 @@ | |||
2506 | 10 | parameter (ZERO = 0d0) | 11 | parameter (ZERO = 0d0) |
2507 | 11 | include 'nexternal.inc' | 12 | include 'nexternal.inc' |
2508 | 12 | include 'genps.inc' | 13 | include 'genps.inc' |
2509 | 13 | include 'reweight.inc' | ||
2510 | 14 | INTEGER ITMAX, NCALL | 14 | INTEGER ITMAX, NCALL |
2511 | 15 | 15 | ||
2512 | 16 | common/citmax/itmax,ncall | 16 | common/citmax/itmax,ncall |
2513 | @@ -50,7 +50,9 @@ | |||
2514 | 50 | double precision average_virtual(maxchannels),virtual_fraction(maxchannels) | 50 | double precision average_virtual(maxchannels),virtual_fraction(maxchannels) |
2515 | 51 | common/c_avg_virt/average_virtual,virtual_fraction | 51 | common/c_avg_virt/average_virtual,virtual_fraction |
2516 | 52 | 52 | ||
2518 | 53 | double precision weight | 53 | double precision weight,event_weight,inv_bias |
2519 | 54 | character*7 event_norm | ||
2520 | 55 | common /event_normalisation/event_norm | ||
2521 | 54 | c For MINT: | 56 | c For MINT: |
2522 | 55 | real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals | 57 | real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals |
2523 | 56 | $ ,ndimmax,maxchannels),ymax_virt(maxchannels),ans(nintegrals | 58 | $ ,ndimmax,maxchannels),ymax_virt(maxchannels),ans(nintegrals |
2524 | @@ -142,6 +144,8 @@ | |||
2525 | 142 | doreweight=do_rwgt_scale.or.do_rwgt_pdf | 144 | doreweight=do_rwgt_scale.or.do_rwgt_pdf |
2526 | 143 | else | 145 | else |
2527 | 144 | doreweight=.false. | 146 | doreweight=.false. |
2528 | 147 | do_rwgt_scale=.false. | ||
2529 | 148 | do_rwgt_pdf=.false. | ||
2530 | 145 | endif | 149 | endif |
2531 | 146 | if (abrv(1:4).eq.'virt') then | 150 | if (abrv(1:4).eq.'virt') then |
2532 | 147 | only_virt=.true. | 151 | only_virt=.true. |
2533 | @@ -201,6 +205,7 @@ | |||
2534 | 201 | write (*,*) 'imode is ',imode | 205 | write (*,*) 'imode is ',imode |
2535 | 202 | call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt | 206 | call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt |
2536 | 203 | $ ,ans,unc,chi2,nhits_in_grids) | 207 | $ ,ans,unc,chi2,nhits_in_grids) |
2537 | 208 | call deallocate_weight_lines | ||
2538 | 204 | open(unit=58,file='res_0',status='unknown') | 209 | open(unit=58,file='res_0',status='unknown') |
2539 | 205 | write(58,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1) | 210 | write(58,*)'Final result [ABS]:',ans(1,1),' +/-',unc(1,1) |
2540 | 206 | write(58,*)'Final result:',ans(2,1),' +/-',unc(2,1) | 211 | write(58,*)'Final result:',ans(2,1),' +/-',unc(2,1) |
2541 | @@ -257,6 +262,7 @@ | |||
2542 | 257 | write (*,*) 'imode is ',imode | 262 | write (*,*) 'imode is ',imode |
2543 | 258 | call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt | 263 | call mint(sigintF,ndim,ncall,itmax,imode,xgrid,ymax,ymax_virt |
2544 | 259 | $ ,ans,unc,chi2,nhits_in_grids) | 264 | $ ,ans,unc,chi2,nhits_in_grids) |
2545 | 265 | call deallocate_weight_lines | ||
2546 | 260 | 266 | ||
2547 | 261 | c If integrating the virtuals alone, we include the virtuals in | 267 | c If integrating the virtuals alone, we include the virtuals in |
2548 | 262 | c ans(1). Therefore, no need to have them in ans(5) and we have to set | 268 | c ans(1). Therefore, no need to have them in ans(5) and we have to set |
2549 | @@ -307,7 +313,11 @@ | |||
2550 | 307 | if (ickkw.eq.-1) putonshell=.false. | 313 | if (ickkw.eq.-1) putonshell=.false. |
2551 | 308 | unwgt=.true. | 314 | unwgt=.true. |
2552 | 309 | open (unit=99,file='nevts',status='old',err=999) | 315 | open (unit=99,file='nevts',status='old',err=999) |
2554 | 310 | read (99,*) nevts | 316 | if (event_norm(1:4).ne.'bias') then |
2555 | 317 | read (99,*) nevts | ||
2556 | 318 | else | ||
2557 | 319 | read (99,*) nevts,event_weight | ||
2558 | 320 | endif | ||
2559 | 311 | close(99) | 321 | close(99) |
2560 | 312 | write(*,*) 'Generating ', nevts, ' events' | 322 | write(*,*) 'Generating ', nevts, ' events' |
2561 | 313 | if(nevts.eq.0) then | 323 | if(nevts.eq.0) then |
2562 | @@ -350,7 +360,11 @@ | |||
2563 | 350 | absint=ans(1,1)+ans(5,1) | 360 | absint=ans(1,1)+ans(5,1) |
2564 | 351 | uncer=unc(2,1) | 361 | uncer=unc(2,1) |
2565 | 352 | 362 | ||
2567 | 353 | weight=(ans(1,1)+ans(5,1))/ncall | 363 | if (event_norm(1:4).ne.'bias') then |
2568 | 364 | weight=(ans(1,1)+ans(5,1))/ncall | ||
2569 | 365 | else | ||
2570 | 366 | weight=event_weight | ||
2571 | 367 | endif | ||
2572 | 354 | 368 | ||
2573 | 355 | if (abrv(1:3).ne.'all' .and. abrv(1:4).ne.'born' .and. | 369 | if (abrv(1:3).ne.'all' .and. abrv(1:4).ne.'born' .and. |
2574 | 356 | $ abrv(1:4).ne.'virt') then | 370 | $ abrv(1:4).ne.'virt') then |
2575 | @@ -385,8 +399,13 @@ | |||
2576 | 385 | call pick_unweight_contr(iFKS_picked) | 399 | call pick_unweight_contr(iFKS_picked) |
2577 | 386 | call update_fks_dir(iFKS_picked) | 400 | call update_fks_dir(iFKS_picked) |
2578 | 387 | call fill_rwgt_lines | 401 | call fill_rwgt_lines |
2579 | 402 | if (event_norm(1:4).eq.'bias') then | ||
2580 | 403 | call include_inverse_bias_wgt(inv_bias) | ||
2581 | 404 | weight=event_weight*inv_bias | ||
2582 | 405 | endif | ||
2583 | 388 | call finalize_event(x,weight,lunlhe,putonshell) | 406 | call finalize_event(x,weight,lunlhe,putonshell) |
2584 | 389 | enddo | 407 | enddo |
2585 | 408 | call deallocate_weight_lines | ||
2586 | 390 | vn=-1 | 409 | vn=-1 |
2587 | 391 | call gen(sigintF,ndim,xgrid,ymax,ymax_virt,3,x,vn) | 410 | call gen(sigintF,ndim,xgrid,ymax,ymax_virt,3,x,vn) |
2588 | 392 | write (*,*) 'Generation efficiencies:',x(1),x(4) | 411 | write (*,*) 'Generation efficiencies:',x(1),x(4) |
2589 | @@ -482,10 +501,6 @@ | |||
2590 | 482 | c timing statistics | 501 | c timing statistics |
2591 | 483 | include "timing_variables.inc" | 502 | include "timing_variables.inc" |
2592 | 484 | data tOLP/0.0/ | 503 | data tOLP/0.0/ |
2593 | 485 | data tFastJet/0.0/ | ||
2594 | 486 | data tPDF/0.0/ | ||
2595 | 487 | data tDSigI/0.0/ | ||
2596 | 488 | data tDSigR/0.0/ | ||
2597 | 489 | data tGenPS/0.0/ | 504 | data tGenPS/0.0/ |
2598 | 490 | data tBorn/0.0/ | 505 | data tBorn/0.0/ |
2599 | 491 | data tIS/0.0/ | 506 | data tIS/0.0/ |
2600 | @@ -719,14 +734,7 @@ | |||
2601 | 719 | c | 734 | c |
2602 | 720 | c Here I want to set up with B.W. we map and which we don't | 735 | c Here I want to set up with B.W. we map and which we don't |
2603 | 721 | c | 736 | c |
2612 | 722 | dconfig = dconfig-iconfig | 737 | lbw(0)=0 |
2605 | 723 | if (dconfig .eq. 0) then | ||
2606 | 724 | write(*,*) 'Not subdividing B.W.' | ||
2607 | 725 | lbw(0)=0 | ||
2608 | 726 | else | ||
2609 | 727 | write(*,*) 'Error BW setting: not supported at NLO' | ||
2610 | 728 | stop 1 | ||
2611 | 729 | endif | ||
2613 | 730 | 10 format( a) | 738 | 10 format( a) |
2614 | 731 | 12 format( a,i4) | 739 | 12 format( a,i4) |
2615 | 732 | end | 740 | end |
2616 | @@ -739,12 +747,11 @@ | |||
2617 | 739 | 747 | ||
2618 | 740 | 748 | ||
2619 | 741 | function sigintF(xx,vegas_wgt,ifl,f) | 749 | function sigintF(xx,vegas_wgt,ifl,f) |
2621 | 742 | c From dsample_fks | 750 | use weight_lines |
2622 | 743 | implicit none | 751 | implicit none |
2623 | 744 | include 'mint.inc' | 752 | include 'mint.inc' |
2624 | 745 | include 'nexternal.inc' | 753 | include 'nexternal.inc' |
2625 | 746 | include 'nFKSconfigs.inc' | 754 | include 'nFKSconfigs.inc' |
2626 | 747 | include 'c_weight.inc' | ||
2627 | 748 | include 'run.inc' | 755 | include 'run.inc' |
2628 | 749 | logical firsttime,passcuts,passcuts_nbody,passcuts_n1body | 756 | logical firsttime,passcuts,passcuts_nbody,passcuts_n1body |
2629 | 750 | integer i,ifl,proc_map(0:fks_configs,0:fks_configs) | 757 | integer i,ifl,proc_map(0:fks_configs,0:fks_configs) |
2630 | @@ -952,9 +959,11 @@ | |||
2631 | 952 | call include_shape_in_shower_scale(p,iFKS) | 959 | call include_shape_in_shower_scale(p,iFKS) |
2632 | 953 | enddo | 960 | enddo |
2633 | 954 | 12 continue | 961 | 12 continue |
2635 | 955 | 962 | ||
2636 | 956 | c Include PDFs and alpha_S and reweight to include the uncertainties | 963 | c Include PDFs and alpha_S and reweight to include the uncertainties |
2637 | 957 | call include_PDF_and_alphas | 964 | call include_PDF_and_alphas |
2638 | 965 | c Include the weight from the bias_function | ||
2639 | 966 | call include_bias_wgt | ||
2640 | 958 | c Sum the contributions that can be summed before taking the ABS value | 967 | c Sum the contributions that can be summed before taking the ABS value |
2641 | 959 | call sum_identical_contributions | 968 | call sum_identical_contributions |
2642 | 960 | c Update the shower starting scale for the S-events after we have | 969 | c Update the shower starting scale for the S-events after we have |
2643 | @@ -979,7 +988,6 @@ | |||
2644 | 979 | include 'nexternal.inc' | 988 | include 'nexternal.inc' |
2645 | 980 | include 'run.inc' | 989 | include 'run.inc' |
2646 | 981 | include 'genps.inc' | 990 | include 'genps.inc' |
2647 | 982 | include 'reweight_all.inc' | ||
2648 | 983 | include 'nFKSconfigs.inc' | 991 | include 'nFKSconfigs.inc' |
2649 | 984 | double precision lum,dlum | 992 | double precision lum,dlum |
2650 | 985 | external dlum | 993 | external dlum |
2651 | @@ -1003,19 +1011,12 @@ | |||
2652 | 1003 | write (*,*)'Using ickkw=4, include only 1 FKS dir per'/ | 1011 | write (*,*)'Using ickkw=4, include only 1 FKS dir per'/ |
2653 | 1004 | $ /' Born PS point (sum=0)' | 1012 | $ /' Born PS point (sum=0)' |
2654 | 1005 | endif | 1013 | endif |
2655 | 1006 | maxproc_save=0 | ||
2656 | 1007 | do nFKSprocess=1,fks_configs | 1014 | do nFKSprocess=1,fks_configs |
2657 | 1008 | call fks_inc_chooser() | 1015 | call fks_inc_chooser() |
2658 | 1009 | c Set Bjorken x's to some random value before calling the dlum() function | 1016 | c Set Bjorken x's to some random value before calling the dlum() function |
2659 | 1010 | xbk(1)=0.5d0 | 1017 | xbk(1)=0.5d0 |
2660 | 1011 | xbk(2)=0.5d0 | 1018 | xbk(2)=0.5d0 |
2661 | 1012 | lum=dlum() ! updates IPROC | 1019 | lum=dlum() ! updates IPROC |
2662 | 1013 | maxproc_save=max(maxproc_save,IPROC) | ||
2663 | 1014 | if (doreweight) then | ||
2664 | 1015 | call reweight_settozero() | ||
2665 | 1016 | call reweight_settozero_all(nFKSprocess*2,.true.) | ||
2666 | 1017 | call reweight_settozero_all(nFKSprocess*2-1,.true.) | ||
2667 | 1018 | endif | ||
2668 | 1019 | enddo | 1020 | enddo |
2669 | 1020 | write (*,*) 'Total number of FKS directories is', fks_configs | 1021 | write (*,*) 'Total number of FKS directories is', fks_configs |
2670 | 1021 | c For sum over identical FKS pairs, need to find the identical structures | 1022 | c For sum over identical FKS pairs, need to find the identical structures |
2671 | @@ -1207,6 +1208,7 @@ | |||
2672 | 1207 | 1208 | ||
2673 | 1208 | subroutine update_fks_dir(nFKS) | 1209 | subroutine update_fks_dir(nFKS) |
2674 | 1209 | implicit none | 1210 | implicit none |
2675 | 1211 | include 'run.inc' | ||
2676 | 1210 | integer nFKS | 1212 | integer nFKS |
2677 | 1211 | integer nFKSprocess | 1213 | integer nFKSprocess |
2678 | 1212 | common/c_nFKSprocess/nFKSprocess | 1214 | common/c_nFKSprocess/nFKSprocess |
2679 | @@ -1215,6 +1217,7 @@ | |||
2680 | 1215 | call leshouche_inc_chooser() | 1217 | call leshouche_inc_chooser() |
2681 | 1216 | call setcuts | 1218 | call setcuts |
2682 | 1217 | call setfksfactor(.true.) | 1219 | call setfksfactor(.true.) |
2683 | 1220 | if (ickkw.eq.3) call configs_and_props_inc_chooser() | ||
2684 | 1218 | return | 1221 | return |
2685 | 1219 | end | 1222 | end |
2686 | 1220 | 1223 | ||
2687 | 1221 | 1224 | ||
2688 | === modified file 'Template/NLO/SubProcesses/fks_singular.f' | |||
2689 | --- Template/NLO/SubProcesses/fks_singular.f 2017-05-09 13:42:19 +0000 | |||
2690 | +++ Template/NLO/SubProcesses/fks_singular.f 2017-08-16 21:26:30 +0000 | |||
2691 | @@ -1,9 +1,9 @@ | |||
2692 | 1 | subroutine compute_born | 1 | subroutine compute_born |
2693 | 2 | c This subroutine computes the Born matrix elements and adds its value | 2 | c This subroutine computes the Born matrix elements and adds its value |
2694 | 3 | c to the list of weights using the add_wgt subroutine | 3 | c to the list of weights using the add_wgt subroutine |
2695 | 4 | use extra_weights | ||
2696 | 4 | implicit none | 5 | implicit none |
2697 | 5 | include 'nexternal.inc' | 6 | include 'nexternal.inc' |
2698 | 6 | include 'reweight0.inc' | ||
2699 | 7 | include 'coupl.inc' | 7 | include 'coupl.inc' |
2700 | 8 | include 'timing_variables.inc' | 8 | include 'timing_variables.inc' |
2701 | 9 | double complex wgt_c(2) | 9 | double complex wgt_c(2) |
2702 | @@ -31,9 +31,9 @@ | |||
2703 | 31 | subroutine compute_nbody_noborn | 31 | subroutine compute_nbody_noborn |
2704 | 32 | c This subroutine computes the soft-virtual matrix elements and adds its | 32 | c This subroutine computes the soft-virtual matrix elements and adds its |
2705 | 33 | c value to the list of weights using the add_wgt subroutine | 33 | c value to the list of weights using the add_wgt subroutine |
2706 | 34 | use extra_weights | ||
2707 | 34 | implicit none | 35 | implicit none |
2708 | 35 | include 'nexternal.inc' | 36 | include 'nexternal.inc' |
2709 | 36 | include 'reweight.inc' | ||
2710 | 37 | include 'coupl.inc' | 37 | include 'coupl.inc' |
2711 | 38 | include 'run.inc' | 38 | include 'run.inc' |
2712 | 39 | include 'timing_variables.inc' | 39 | include 'timing_variables.inc' |
2713 | @@ -94,10 +94,10 @@ | |||
2714 | 94 | subroutine compute_real_emission(p,sudakov_damp) | 94 | subroutine compute_real_emission(p,sudakov_damp) |
2715 | 95 | c This subroutine computes the real-emission matrix elements and adds | 95 | c This subroutine computes the real-emission matrix elements and adds |
2716 | 96 | c its value to the list of weights using the add_wgt subroutine | 96 | c its value to the list of weights using the add_wgt subroutine |
2717 | 97 | use extra_weights | ||
2718 | 97 | implicit none | 98 | implicit none |
2719 | 98 | include 'nexternal.inc' | 99 | include 'nexternal.inc' |
2720 | 99 | include 'coupl.inc' | 100 | include 'coupl.inc' |
2721 | 100 | include 'reweight0.inc' | ||
2722 | 101 | include 'timing_variables.inc' | 101 | include 'timing_variables.inc' |
2723 | 102 | double precision x,dot,f_damp,ffact,s_ev,fks_Sij,p(0:3,nexternal) | 102 | double precision x,dot,f_damp,ffact,s_ev,fks_Sij,p(0:3,nexternal) |
2724 | 103 | $ ,wgt1,fx_ev,sudakov_damp | 103 | $ ,wgt1,fx_ev,sudakov_damp |
2725 | @@ -134,10 +134,10 @@ | |||
2726 | 134 | subroutine compute_soft_counter_term(replace_MC_subt) | 134 | subroutine compute_soft_counter_term(replace_MC_subt) |
2727 | 135 | c This subroutine computes the soft counter term and adds its value to | 135 | c This subroutine computes the soft counter term and adds its value to |
2728 | 136 | c the list of weights using the add_wgt subroutine | 136 | c the list of weights using the add_wgt subroutine |
2729 | 137 | use extra_weights | ||
2730 | 137 | implicit none | 138 | implicit none |
2731 | 138 | include 'nexternal.inc' | 139 | include 'nexternal.inc' |
2732 | 139 | include 'coupl.inc' | 140 | include 'coupl.inc' |
2733 | 140 | include 'reweight0.inc' | ||
2734 | 141 | include 'timing_variables.inc' | 141 | include 'timing_variables.inc' |
2735 | 142 | double precision wgt1,s_s,fks_Sij,fx_s,zero,replace_MC_subt,g22 | 142 | double precision wgt1,s_s,fks_Sij,fx_s,zero,replace_MC_subt,g22 |
2736 | 143 | parameter (zero=0d0) | 143 | parameter (zero=0d0) |
2737 | @@ -185,11 +185,11 @@ | |||
2738 | 185 | subroutine compute_collinear_counter_term(replace_MC_subt) | 185 | subroutine compute_collinear_counter_term(replace_MC_subt) |
2739 | 186 | c This subroutine computes the collinear counter term and adds its value | 186 | c This subroutine computes the collinear counter term and adds its value |
2740 | 187 | c to the list of weights using the add_wgt subroutine | 187 | c to the list of weights using the add_wgt subroutine |
2741 | 188 | use extra_weights | ||
2742 | 188 | implicit none | 189 | implicit none |
2743 | 189 | include 'nexternal.inc' | 190 | include 'nexternal.inc' |
2744 | 190 | include 'coupl.inc' | 191 | include 'coupl.inc' |
2745 | 191 | include 'fks_powers.inc' | 192 | include 'fks_powers.inc' |
2746 | 192 | include 'reweight.inc' | ||
2747 | 193 | include 'timing_variables.inc' | 193 | include 'timing_variables.inc' |
2748 | 194 | double precision zero,one,s_c,fks_Sij,fx_c,deg_xi_c,deg_lxi_c,wgt1 | 194 | double precision zero,one,s_c,fks_Sij,fx_c,deg_xi_c,deg_lxi_c,wgt1 |
2749 | 195 | & ,wgt3,g22,replace_MC_subt | 195 | & ,wgt3,g22,replace_MC_subt |
2750 | @@ -248,10 +248,10 @@ | |||
2751 | 248 | subroutine compute_soft_collinear_counter_term(replace_MC_subt) | 248 | subroutine compute_soft_collinear_counter_term(replace_MC_subt) |
2752 | 249 | c This subroutine computes the soft-collinear counter term and adds its | 249 | c This subroutine computes the soft-collinear counter term and adds its |
2753 | 250 | c value to the list of weights using the add_wgt subroutine | 250 | c value to the list of weights using the add_wgt subroutine |
2754 | 251 | use extra_weights | ||
2755 | 251 | implicit none | 252 | implicit none |
2756 | 252 | include 'nexternal.inc' | 253 | include 'nexternal.inc' |
2757 | 253 | include 'coupl.inc' | 254 | include 'coupl.inc' |
2758 | 254 | include 'reweight.inc' | ||
2759 | 255 | include 'fks_powers.inc' | 255 | include 'fks_powers.inc' |
2760 | 256 | include 'timing_variables.inc' | 256 | include 'timing_variables.inc' |
2761 | 257 | double precision zero,one,s_sc,fks_Sij,fx_sc,wgt1,wgt3,deg_xi_sc | 257 | double precision zero,one,s_sc,fks_Sij,fx_sc,wgt1,wgt3,deg_xi_sc |
2762 | @@ -314,6 +314,7 @@ | |||
2763 | 314 | end | 314 | end |
2764 | 315 | 315 | ||
2765 | 316 | subroutine compute_MC_subt_term(p,gfactsf,gfactcl,probne) | 316 | subroutine compute_MC_subt_term(p,gfactsf,gfactcl,probne) |
2766 | 317 | use extra_weights | ||
2767 | 317 | implicit none | 318 | implicit none |
2768 | 318 | c This subroutine computes the MonteCarlo subtraction terms and adds | 319 | c This subroutine computes the MonteCarlo subtraction terms and adds |
2769 | 319 | c their values to the list of weights using the add_wgt subroutine. It | 320 | c their values to the list of weights using the add_wgt subroutine. It |
2770 | @@ -324,7 +325,6 @@ | |||
2771 | 324 | include 'nexternal.inc' | 325 | include 'nexternal.inc' |
2772 | 325 | include 'madfks_mcatnlo.inc' | 326 | include 'madfks_mcatnlo.inc' |
2773 | 326 | include 'timing_variables.inc' | 327 | include 'timing_variables.inc' |
2774 | 327 | include 'reweight.inc' | ||
2775 | 328 | include 'coupl.inc' | 328 | include 'coupl.inc' |
2776 | 329 | integer nofpartners,i | 329 | integer nofpartners,i |
2777 | 330 | double precision p(0:3,nexternal),gfactsf,gfactcl,probne,x,dot | 330 | double precision p(0:3,nexternal),gfactsf,gfactcl,probne,x,dot |
2778 | @@ -613,13 +613,13 @@ | |||
2779 | 613 | c Compute all the relevant prefactors for the Born and the soft-virtual, | 613 | c Compute all the relevant prefactors for the Born and the soft-virtual, |
2780 | 614 | c i.e. all the nbody contributions. Also initialises the plots and | 614 | c i.e. all the nbody contributions. Also initialises the plots and |
2781 | 615 | c bpower. | 615 | c bpower. |
2782 | 616 | use extra_weights | ||
2783 | 616 | implicit none | 617 | implicit none |
2784 | 617 | include 'nexternal.inc' | 618 | include 'nexternal.inc' |
2785 | 618 | include 'run.inc' | 619 | include 'run.inc' |
2786 | 619 | include 'genps.inc' | 620 | include 'genps.inc' |
2787 | 620 | include 'reweight0.inc' | ||
2788 | 621 | include 'timing_variables.inc' | 621 | include 'timing_variables.inc' |
2790 | 622 | double precision pi,unwgtfun,vegas_wgt,enhance,xnoborn_cnt,xtot | 622 | double precision pi,vegas_wgt,enhance,xnoborn_cnt,xtot |
2791 | 623 | $ ,bpower,cpower,tiny | 623 | $ ,bpower,cpower,tiny |
2792 | 624 | data xnoborn_cnt /0d0/ | 624 | data xnoborn_cnt /0d0/ |
2793 | 625 | integer inoborn_cnt,i | 625 | integer inoborn_cnt,i |
2794 | @@ -694,7 +694,7 @@ | |||
2795 | 694 | if(wgtcpower.ne.cpowerinput.and.dabs(cpower+1d0).gt.tiny)then | 694 | if(wgtcpower.ne.cpowerinput.and.dabs(cpower+1d0).gt.tiny)then |
2796 | 695 | write(*,*)'Inconsistency in the computation of cpower', | 695 | write(*,*)'Inconsistency in the computation of cpower', |
2797 | 696 | # wgtcpower,cpowerinput | 696 | # wgtcpower,cpowerinput |
2799 | 697 | write(*,*)'Check value in reweight0.inc' | 697 | write(*,*)'Check value in extra_weights.f' |
2800 | 698 | stop | 698 | stop |
2801 | 699 | endif | 699 | endif |
2802 | 700 | firsttime=.false. | 700 | firsttime=.false. |
2803 | @@ -732,11 +732,10 @@ | |||
2804 | 732 | enhance=0d0 | 732 | enhance=0d0 |
2805 | 733 | endif | 733 | endif |
2806 | 734 | endif | 734 | endif |
2807 | 735 | call unweight_function(p_born,unwgtfun) | ||
2808 | 736 | call set_cms_stuff(0) | 735 | call set_cms_stuff(0) |
2809 | 737 | c f_* multiplication factors for Born and nbody | 736 | c f_* multiplication factors for Born and nbody |
2810 | 738 | f_b=jac_cnt(0)*xinorm_ev/(min(xiimax_ev,xiBSVcut_used)*shat/(16 | 737 | f_b=jac_cnt(0)*xinorm_ev/(min(xiimax_ev,xiBSVcut_used)*shat/(16 |
2812 | 739 | $ *pi**2))*enhance*unwgtfun *fkssymmetryfactorBorn*vegas_wgt | 738 | $ *pi**2))*enhance*fkssymmetryfactorBorn*vegas_wgt |
2813 | 740 | f_nb=f_b | 739 | f_nb=f_b |
2814 | 741 | call cpu_time(tAfter) | 740 | call cpu_time(tAfter) |
2815 | 742 | tf_nb=tf_nb+(tAfter-tBefore) | 741 | tf_nb=tf_nb+(tAfter-tBefore) |
2816 | @@ -753,7 +752,7 @@ | |||
2817 | 753 | include 'fks_powers.inc' | 752 | include 'fks_powers.inc' |
2818 | 754 | include 'coupl.inc' | 753 | include 'coupl.inc' |
2819 | 755 | include 'timing_variables.inc' | 754 | include 'timing_variables.inc' |
2821 | 756 | double precision unwgtfun,vegas_wgt,enhance,xnoborn_cnt,xtot | 755 | double precision vegas_wgt,enhance,xnoborn_cnt,xtot |
2822 | 757 | & ,prefact,prefact_cnt_ssc,prefact_deg,prefact_c,prefact_coll | 756 | & ,prefact,prefact_cnt_ssc,prefact_deg,prefact_c,prefact_coll |
2823 | 758 | & ,jac_ev,pi,prefact_cnt_ssc_c,prefact_coll_c,prefact_deg_slxi | 757 | & ,jac_ev,pi,prefact_cnt_ssc_c,prefact_coll_c,prefact_deg_slxi |
2824 | 759 | & ,prefact_deg_sxi,zero | 758 | & ,prefact_deg_sxi,zero |
2825 | @@ -845,11 +844,10 @@ | |||
2826 | 845 | enhance=0d0 | 844 | enhance=0d0 |
2827 | 846 | endif | 845 | endif |
2828 | 847 | endif | 846 | endif |
2829 | 848 | call unweight_function(p_born,unwgtfun) | ||
2830 | 849 | prefact=xinorm_ev/xi_i_fks_ev/(1-y_ij_fks_ev) | 847 | prefact=xinorm_ev/xi_i_fks_ev/(1-y_ij_fks_ev) |
2831 | 850 | 848 | ||
2832 | 851 | c f_* multiplication factors for real-emission, soft counter, ... etc. | 849 | c f_* multiplication factors for real-emission, soft counter, ... etc. |
2834 | 852 | f_r=prefact*jac_ev*enhance*unwgtfun*fkssymmetryfactor*vegas_wgt | 850 | f_r=prefact*jac_ev*enhance*fkssymmetryfactor*vegas_wgt |
2835 | 853 | f_MC_S=f_r | 851 | f_MC_S=f_r |
2836 | 854 | f_MC_H=f_r | 852 | f_MC_H=f_r |
2837 | 855 | if (.not.nocntevents) then | 853 | if (.not.nocntevents) then |
2838 | @@ -857,9 +855,9 @@ | |||
2839 | 857 | & log(xicut_used/min(xiimax_ev,xiScut_used))/(1 | 855 | & log(xicut_used/min(xiimax_ev,xiScut_used))/(1 |
2840 | 858 | & -y_ij_fks_ev) | 856 | & -y_ij_fks_ev) |
2841 | 859 | f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)*enhance | 857 | f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)*enhance |
2843 | 860 | $ *unwgtfun*fkssymmetryfactor*vegas_wgt | 858 | $ *fkssymmetryfactor*vegas_wgt |
2844 | 861 | f_s_MC_S=prefact*jac_cnt(0)*enhance | 859 | f_s_MC_S=prefact*jac_cnt(0)*enhance |
2846 | 862 | $ *unwgtfun*fkssymmetryfactor*vegas_wgt | 860 | $ *fkssymmetryfactor*vegas_wgt |
2847 | 863 | f_s_MC_H=f_s_MC_S | 861 | f_s_MC_H=f_s_MC_S |
2848 | 864 | 862 | ||
2849 | 865 | if (pmass(j_fks).eq.0d0) then | 863 | if (pmass(j_fks).eq.0d0) then |
2850 | @@ -867,9 +865,9 @@ | |||
2851 | 867 | prefact_coll=xinorm_cnt(1)/xi_i_fks_cnt(1)*log(delta_used | 865 | prefact_coll=xinorm_cnt(1)/xi_i_fks_cnt(1)*log(delta_used |
2852 | 868 | $ /deltaS)/deltaS | 866 | $ /deltaS)/deltaS |
2853 | 869 | f_c=(prefact_c+prefact_coll)*jac_cnt(1) | 867 | f_c=(prefact_c+prefact_coll)*jac_cnt(1) |
2855 | 870 | $ *enhance*unwgtfun*fkssymmetryfactor*vegas_wgt | 868 | $ *enhance*fkssymmetryfactor*vegas_wgt |
2856 | 871 | f_c_MC_S=prefact_c*jac_cnt(1) | 869 | f_c_MC_S=prefact_c*jac_cnt(1) |
2858 | 872 | $ *enhance*unwgtfun*fkssymmetryfactor*vegas_wgt | 870 | $ *enhance*fkssymmetryfactor*vegas_wgt |
2859 | 873 | f_c_MC_H=f_c_MC_S | 871 | f_c_MC_H=f_c_MC_S |
2860 | 874 | 872 | ||
2861 | 875 | call set_cms_stuff(1) | 873 | call set_cms_stuff(1) |
2862 | @@ -881,12 +879,12 @@ | |||
2863 | 881 | $ *log(xicut_used/min(xiimax_cnt(1),xiScut_used)) | 879 | $ *log(xicut_used/min(xiimax_cnt(1),xiScut_used)) |
2864 | 882 | $ *log(delta_used/deltaS)/deltaS | 880 | $ *log(delta_used/deltaS)/deltaS |
2865 | 883 | f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))*enhance | 881 | f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))*enhance |
2867 | 884 | $ *unwgtfun*fkssymmetryfactorDeg*vegas_wgt | 882 | $ *fkssymmetryfactorDeg*vegas_wgt |
2868 | 885 | f_sc=(prefact_c+prefact_coll+prefact_cnt_ssc_c | 883 | f_sc=(prefact_c+prefact_coll+prefact_cnt_ssc_c |
2870 | 886 | & +prefact_coll_c)*jac_cnt(2)*enhance*unwgtfun | 884 | & +prefact_coll_c)*jac_cnt(2)*enhance |
2871 | 887 | & *fkssymmetryfactorDeg*vegas_wgt | 885 | & *fkssymmetryfactorDeg*vegas_wgt |
2872 | 888 | f_sc_MC_S=prefact_c*jac_cnt(2) | 886 | f_sc_MC_S=prefact_c*jac_cnt(2) |
2874 | 889 | $ *enhance*unwgtfun*fkssymmetryfactor*vegas_wgt | 887 | $ *enhance*fkssymmetryfactor*vegas_wgt |
2875 | 890 | f_sc_MC_H=f_sc_MC_S | 888 | f_sc_MC_H=f_sc_MC_S |
2876 | 891 | 889 | ||
2877 | 892 | call set_cms_stuff(2) | 890 | call set_cms_stuff(2) |
2878 | @@ -898,13 +896,13 @@ | |||
2879 | 898 | & -log(min(xiimax_cnt(1),xiScut_used))**2 )*1/(2.d0 | 896 | & -log(min(xiimax_cnt(1),xiScut_used))**2 )*1/(2.d0 |
2880 | 899 | & *deltaS) | 897 | & *deltaS) |
2881 | 900 | f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))*enhance | 898 | f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))*enhance |
2883 | 901 | & *unwgtfun*fkssymmetryfactorDeg*vegas_wgt | 899 | & *fkssymmetryfactorDeg*vegas_wgt |
2884 | 902 | f_dsc(2)=prefact_deg_sxi*jac_cnt(2)/(shat/(32*pi**2)) | 900 | f_dsc(2)=prefact_deg_sxi*jac_cnt(2)/(shat/(32*pi**2)) |
2886 | 903 | & *enhance*unwgtfun*fkssymmetryfactorDeg*vegas_wgt | 901 | & *enhance*fkssymmetryfactorDeg*vegas_wgt |
2887 | 904 | f_dsc(3)=prefact_deg_slxi*jac_cnt(2)/(shat/(32*pi**2)) | 902 | f_dsc(3)=prefact_deg_slxi*jac_cnt(2)/(shat/(32*pi**2)) |
2889 | 905 | & *enhance*unwgtfun*fkssymmetryfactorDeg*vegas_wgt | 903 | & *enhance*fkssymmetryfactorDeg*vegas_wgt |
2890 | 906 | f_dsc(4)=( prefact_deg+prefact_deg_sxi )*jac_cnt(2)/(shat | 904 | f_dsc(4)=( prefact_deg+prefact_deg_sxi )*jac_cnt(2)/(shat |
2892 | 907 | & /(32*pi**2))*enhance*unwgtfun*fkssymmetryfactorDeg | 905 | & /(32*pi**2))*enhance*fkssymmetryfactorDeg |
2893 | 908 | & *vegas_wgt | 906 | & *vegas_wgt |
2894 | 909 | else | 907 | else |
2895 | 910 | f_c=0d0 | 908 | f_c=0d0 |
2896 | @@ -940,7 +938,7 @@ | |||
2897 | 940 | 938 | ||
2898 | 941 | 939 | ||
2899 | 942 | subroutine add_wgt(type,wgt1,wgt2,wgt3) | 940 | subroutine add_wgt(type,wgt1,wgt2,wgt3) |
2901 | 943 | c Adds a contribution to the list in c_weight.inc. 'type' sets the type | 941 | c Adds a contribution to the list in weight_lines. 'type' sets the type |
2902 | 944 | c of the contribution and wgt1..wgt3 are the coefficients multiplying | 942 | c of the contribution and wgt1..wgt3 are the coefficients multiplying |
2903 | 945 | c the logs. The arguments are: | 943 | c the logs. The arguments are: |
2904 | 946 | c type=1 : real-emission | 944 | c type=1 : real-emission |
2905 | @@ -997,7 +995,7 @@ | |||
2906 | 997 | c corresponding to this contribution: wgt_ME_tree. This weight does | 995 | c corresponding to this contribution: wgt_ME_tree. This weight does |
2907 | 998 | c include the 'ngluon' correction factor for the Born. | 996 | c include the 'ngluon' correction factor for the Born. |
2908 | 999 | c | 997 | c |
2910 | 1000 | c Not set in this subroutine, but included in the c_weights common block | 998 | c Not set in this subroutine, but included in the weight_lines module |
2911 | 1001 | c are the | 999 | c are the |
2912 | 1002 | c wgts(iwgt,icontr) : weights including scale/PDFs/logs. These are | 1000 | c wgts(iwgt,icontr) : weights including scale/PDFs/logs. These are |
2913 | 1003 | c normalised so that they can be used directly to compute cross | 1001 | c normalised so that they can be used directly to compute cross |
2914 | @@ -1016,16 +1014,16 @@ | |||
2915 | 1016 | c parton_iproc(iproc,icontr) : value of the PDF for the iproc | 1014 | c parton_iproc(iproc,icontr) : value of the PDF for the iproc |
2916 | 1017 | c contribution | 1015 | c contribution |
2917 | 1018 | c parton_pdg(nexternal,iproc,icontr) : value of the PDG codes for | 1016 | c parton_pdg(nexternal,iproc,icontr) : value of the PDG codes for |
2919 | 1019 | c the iproc contribution | 1017 | c the iproc contribution |
2920 | 1018 | use weight_lines | ||
2921 | 1019 | use extra_weights | ||
2922 | 1020 | implicit none | 1020 | implicit none |
2923 | 1021 | include 'nexternal.inc' | 1021 | include 'nexternal.inc' |
2924 | 1022 | include 'run.inc' | 1022 | include 'run.inc' |
2925 | 1023 | include 'genps.inc' | 1023 | include 'genps.inc' |
2926 | 1024 | include 'coupl.inc' | 1024 | include 'coupl.inc' |
2927 | 1025 | include 'fks_info.inc' | 1025 | include 'fks_info.inc' |
2928 | 1026 | include 'c_weight.inc' | ||
2929 | 1027 | include 'q_es.inc' | 1026 | include 'q_es.inc' |
2930 | 1028 | include 'reweight0.inc' | ||
2931 | 1029 | integer type,i,j | 1027 | integer type,i,j |
2932 | 1030 | double precision wgt1,wgt2,wgt3 | 1028 | double precision wgt1,wgt2,wgt3 |
2933 | 1031 | integer nFKSprocess | 1029 | integer nFKSprocess |
2934 | @@ -1054,11 +1052,7 @@ | |||
2935 | 1054 | if (wgt2.ne.wgt2) return | 1052 | if (wgt2.ne.wgt2) return |
2936 | 1055 | if (wgt3.ne.wgt3) return | 1053 | if (wgt3.ne.wgt3) return |
2937 | 1056 | icontr=icontr+1 | 1054 | icontr=icontr+1 |
2943 | 1057 | if (icontr.gt.max_contr) then | 1055 | call weight_lines_allocated(nexternal,icontr,max_wgt,max_iproc) |
2939 | 1058 | write (*,*) 'ERROR in add_wgt: too many contributions' | ||
2940 | 1059 | & ,max_contr | ||
2941 | 1060 | stop 1 | ||
2942 | 1061 | endif | ||
2944 | 1062 | itype(icontr)=type | 1056 | itype(icontr)=type |
2945 | 1063 | wgt(1,icontr)=wgt1 | 1057 | wgt(1,icontr)=wgt1 |
2946 | 1064 | wgt(2,icontr)=wgt2 | 1058 | wgt(2,icontr)=wgt2 |
2947 | @@ -1133,12 +1127,12 @@ | |||
2948 | 1133 | end | 1127 | end |
2949 | 1134 | 1128 | ||
2950 | 1135 | subroutine include_veto_multiplier | 1129 | subroutine include_veto_multiplier |
2951 | 1130 | use weight_lines | ||
2952 | 1131 | use extra_weights | ||
2953 | 1136 | implicit none | 1132 | implicit none |
2954 | 1137 | c Multiply all the weights by the NNLL-NLO jet veto Sudakov factors, | 1133 | c Multiply all the weights by the NNLL-NLO jet veto Sudakov factors, |
2955 | 1138 | c i.e., the term on the 2nd line of Eq.(20) of arXiv:1412.8408. | 1134 | c i.e., the term on the 2nd line of Eq.(20) of arXiv:1412.8408. |
2956 | 1139 | include 'nexternal.inc' | 1135 | include 'nexternal.inc' |
2957 | 1140 | include 'c_weight.inc' | ||
2958 | 1141 | include 'reweight.inc' | ||
2959 | 1142 | integer i,j | 1136 | integer i,j |
2960 | 1143 | if (H1_factor_virt.ne.0d0) then | 1137 | if (H1_factor_virt.ne.0d0) then |
2961 | 1144 | call compute_veto_multiplier(H1_factor_virt,1d0,1d0 | 1138 | call compute_veto_multiplier(H1_factor_virt,1d0,1d0 |
2962 | @@ -1158,10 +1152,10 @@ | |||
2963 | 1158 | c dependence and saves the weights in the wgts() array. The weights in | 1152 | c dependence and saves the weights in the wgts() array. The weights in |
2964 | 1159 | c this array are now correctly normalised to compute the cross section | 1153 | c this array are now correctly normalised to compute the cross section |
2965 | 1160 | c or to fill histograms. | 1154 | c or to fill histograms. |
2966 | 1155 | use weight_lines | ||
2967 | 1161 | implicit none | 1156 | implicit none |
2968 | 1162 | include 'nexternal.inc' | 1157 | include 'nexternal.inc' |
2969 | 1163 | include 'run.inc' | 1158 | include 'run.inc' |
2970 | 1164 | include 'c_weight.inc' | ||
2971 | 1165 | include 'coupl.inc' | 1159 | include 'coupl.inc' |
2972 | 1166 | include 'timing_variables.inc' | 1160 | include 'timing_variables.inc' |
2973 | 1167 | include 'genps.inc' | 1161 | include 'genps.inc' |
2974 | @@ -1191,14 +1185,11 @@ | |||
2975 | 1191 | q2fact(2)=mu2_f | 1185 | q2fact(2)=mu2_f |
2976 | 1192 | c call the PDFs | 1186 | c call the PDFs |
2977 | 1193 | xlum = dlum() | 1187 | xlum = dlum() |
2982 | 1194 | if (iproc.gt.max_iproc) then | 1188 | iwgt=1 |
2983 | 1195 | write (*,*) 'ERROR iproc too large',iproc,max_iproc | 1189 | call weight_lines_allocated(nexternal,max_contr,iwgt,iproc) |
2980 | 1196 | stop 1 | ||
2981 | 1197 | endif | ||
2984 | 1198 | c set_pdg_codes fills the niproc, parton_iproc, parton_pdg and parton_pdg_uborn | 1190 | c set_pdg_codes fills the niproc, parton_iproc, parton_pdg and parton_pdg_uborn |
2985 | 1199 | call set_pdg_codes(iproc,pd,nFKSprocess,i) | 1191 | call set_pdg_codes(iproc,pd,nFKSprocess,i) |
2986 | 1200 | c iwgt=1 is the central value (i.e. no scale/PDF reweighting). | 1192 | c iwgt=1 is the central value (i.e. no scale/PDF reweighting). |
2987 | 1201 | iwgt=1 | ||
2988 | 1202 | wgt_wo_pdf=(wgt(1,i) + wgt(2,i)*log(mu2_r/mu2_q) + wgt(3,i) | 1193 | wgt_wo_pdf=(wgt(1,i) + wgt(2,i)*log(mu2_r/mu2_q) + wgt(3,i) |
2989 | 1203 | & *log(mu2_f/mu2_q))*g_strong(i)**QCDpower(i) | 1194 | & *log(mu2_f/mu2_q))*g_strong(i)**QCDpower(i) |
2990 | 1204 | & *rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r)) | 1195 | & *rwgt_muR_dep_fac(sqrt(mu2_r),sqrt(mu2_r)) |
2991 | @@ -1221,12 +1212,123 @@ | |||
2992 | 1221 | return | 1212 | return |
2993 | 1222 | end | 1213 | end |
2994 | 1223 | 1214 | ||
2995 | 1215 | subroutine include_bias_wgt | ||
2996 | 1216 | c Include the weight from the bias_wgt_function to all the contributions | ||
2997 | 1217 | c in icontr. This only changes the weight of the central value (after | ||
2998 | 1218 | c inclusion of alphaS and parton luminosity). Both for 'wgts(1,icontr)' | ||
2999 | 1219 | c as well as the the 'parton_iproc(1:niproc(icontr),icontr)', since | ||
3000 | 1220 | c these are the ones used in MINT as well as for unweighting. Also the | ||
3001 | 1221 | c 'virt_wgt_mint' and 'born_wgt_mint' are updated. Furthermore, to | ||
3002 | 1222 | c include the weight also in the 'wgt' array that contain the | ||
3003 | 1223 | c coefficients for PDF and scale computations. | ||
3004 | 1224 | use weight_lines | ||
3005 | 1225 | implicit none | ||
3006 | 1226 | integer i,j | ||
3007 | 1227 | double precision bias | ||
3008 | 1228 | character*7 event_norm | ||
3009 | 1229 | common /event_normalisation/event_norm | ||
3010 | 1230 | double precision virt_wgt_mint,born_wgt_mint | ||
3011 | 1231 | common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint | ||
3012 | 1232 | c Set the bias_wgt to 1 in case we do not have to do any biassing | ||
3013 | 1233 | if (event_norm(1:4).ne.'bias') then | ||
3014 | 1234 | do i=1,icontr | ||
3015 | 1235 | bias_wgt(i)=1d0 | ||
3016 | 1236 | enddo | ||
3017 | 1237 | return | ||
3018 | 1238 | endif | ||
3019 | 1239 | c loop over all contributions | ||
3020 | 1240 | do i=1,icontr | ||
3021 | 1241 | if (itype(i).eq.1) then | ||
3022 | 1242 | ! use (n+1)-body momenta for the real emission. Pick the | ||
3023 | 1243 | ! first IPROC for parton PDGs. | ||
3024 | 1244 | call bias_weight_function(momenta_m(0,1,2,i),parton_pdg(1,1 | ||
3025 | 1245 | $ ,i),bias) | ||
3026 | 1246 | else | ||
3027 | 1247 | ! use n-body momenta for all the other contributions. Pick | ||
3028 | 1248 | ! the first IPROC for parton PDGs. | ||
3029 | 1249 | call bias_weight_function(momenta_m(0,1,1,i),parton_pdg(1,1 | ||
3030 | 1250 | $ ,i),bias) | ||
3031 | 1251 | endif | ||
3032 | 1252 | bias_wgt(i)=bias | ||
3033 | 1253 | c Update the weights: | ||
3034 | 1254 | wgts(1,i)=wgts(1,i)*bias_wgt(i) | ||
3035 | 1255 | do j=1,niproc(i) | ||
3036 | 1256 | parton_iproc(j,i)=parton_iproc(j,i)*bias_wgt(i) | ||
3037 | 1257 | enddo | ||
3038 | 1258 | do j=1,3 | ||
3039 | 1259 | wgt(j,i)=wgt(j,i)*bias_wgt(i) | ||
3040 | 1260 | enddo | ||
3041 | 1261 | if (itype(i).eq.14) then | ||
3042 | 1262 | virt_wgt_mint=virt_wgt_mint*bias_wgt(i) | ||
3043 | 1263 | born_wgt_mint=born_wgt_mint*bias_wgt(i) | ||
3044 | 1264 | endif | ||
3045 | 1265 | enddo | ||
3046 | 1266 | return | ||
3047 | 1267 | end | ||
3048 | 1268 | |||
3049 | 1269 | subroutine include_inverse_bias_wgt(inv_bias) | ||
3050 | 1270 | c Update the inverse of the bias in the event weight. All information in | ||
3051 | 1271 | c the rwgt_lines is NOT updated. | ||
3052 | 1272 | use weight_lines | ||
3053 | 1273 | use extra_weights | ||
3054 | 1274 | implicit none | ||
3055 | 1275 | include 'genps.inc' | ||
3056 | 1276 | include 'nFKSconfigs.inc' | ||
3057 | 1277 | integer i,ict,ipr,ii | ||
3058 | 1278 | double precision wgt_num,wgt_denom,inv_bias | ||
3059 | 1279 | character*7 event_norm | ||
3060 | 1280 | common /event_normalisation/event_norm | ||
3061 | 1281 | integer iproc_save(fks_configs),eto(maxproc,fks_configs) | ||
3062 | 1282 | $ ,etoi(maxproc,fks_configs),maxproc_found | ||
3063 | 1283 | common/cproc_combination/iproc_save,eto,etoi,maxproc_found | ||
3064 | 1284 | logical Hevents | ||
3065 | 1285 | common/SHevents/Hevents | ||
3066 | 1286 | if (event_norm(1:4).ne.'bias') then | ||
3067 | 1287 | inv_bias=1d0 | ||
3068 | 1288 | return | ||
3069 | 1289 | endif | ||
3070 | 1290 | wgt_num=0d0 | ||
3071 | 1291 | wgt_denom=0d0 | ||
3072 | 1292 | do i=1,icontr_sum(0,icontr_picked) | ||
3073 | 1293 | ict=icontr_sum(i,icontr_picked) | ||
3074 | 1294 | if (bias_wgt(ict).eq.0d0) then | ||
3075 | 1295 | write (*,*) "ERROR in include_inverse_bias_wgt: "/ | ||
3076 | 1296 | $ /"bias_wgt is equal to zero",ict,bias_wgt | ||
3077 | 1297 | stop 1 | ||
3078 | 1298 | endif | ||
3079 | 1299 | c for all the rwgt_lines, remove the bias-wgt contribution from the | ||
3080 | 1300 | c weights there. Note that the wgtref (also written in the event file) | ||
3081 | 1301 | c keeps its contribution from the bias_wgt. | ||
3082 | 1302 | if (.not. Hevents) then | ||
3083 | 1303 | ipr=eto(etoi(iproc_picked,nFKS(ict)),nFKS(ict)) | ||
3084 | 1304 | do ii=1,iproc_save(nFKS(ict)) | ||
3085 | 1305 | if (eto(ii,nFKS(ict)).ne.ipr) cycle | ||
3086 | 1306 | wgt_denom=wgt_denom+parton_iproc(ii,ict) | ||
3087 | 1307 | wgt_num=wgt_num+parton_iproc(ii,ict)/bias_wgt(ict) | ||
3088 | 1308 | enddo | ||
3089 | 1309 | else | ||
3090 | 1310 | ipr=iproc_picked | ||
3091 | 1311 | wgt_denom=wgt_denom+parton_iproc(ipr,ict) | ||
3092 | 1312 | wgt_num=wgt_num+parton_iproc(ipr,ict)/bias_wgt(ict) | ||
3093 | 1313 | endif | ||
3094 | 1314 | enddo | ||
3095 | 1315 | if (abs((wgtref-wgt_denom)/(wgtref+wgt_denom)).gt.1d-10) then | ||
3096 | 1316 | write (*,*) "ERROR in include_inverse_bias_wgt: "/ | ||
3097 | 1317 | $ /"reference weight not equal to recomputed weight",wgtref | ||
3098 | 1318 | $ ,wgt_denom | ||
3099 | 1319 | stop 1 | ||
3100 | 1320 | endif | ||
3101 | 1321 | c update the event weight to be written in the file | ||
3102 | 1322 | inv_bias=wgt_num/wgt_denom | ||
3103 | 1323 | return | ||
3104 | 1324 | end | ||
3105 | 1325 | |||
3106 | 1224 | 1326 | ||
3107 | 1225 | subroutine set_pdg_codes(iproc,pd,iFKS,ict) | 1327 | subroutine set_pdg_codes(iproc,pd,iFKS,ict) |
3108 | 1328 | use weight_lines | ||
3109 | 1226 | implicit none | 1329 | implicit none |
3110 | 1227 | include 'nexternal.inc' | 1330 | include 'nexternal.inc' |
3111 | 1228 | include 'genps.inc' | 1331 | include 'genps.inc' |
3112 | 1229 | include 'c_weight.inc' | ||
3113 | 1230 | include 'fks_info.inc' | 1332 | include 'fks_info.inc' |
3114 | 1231 | integer j,k,iproc,ict,iFKS | 1333 | integer j,k,iproc,ict,iFKS |
3115 | 1232 | double precision pd(0:maxproc),conv | 1334 | double precision pd(0:maxproc),conv |
3116 | @@ -1274,14 +1376,13 @@ | |||
3117 | 1274 | 1376 | ||
3118 | 1275 | 1377 | ||
3119 | 1276 | subroutine reweight_scale | 1378 | subroutine reweight_scale |
3121 | 1277 | c Use the saved c_weight info to perform scale reweighting. Extends the | 1379 | c Use the saved weight_lines info to perform scale reweighting. Extends the |
3122 | 1278 | c wgts() array to include the weights. | 1380 | c wgts() array to include the weights. |
3123 | 1381 | use weight_lines | ||
3124 | 1382 | use extra_weights | ||
3125 | 1279 | implicit none | 1383 | implicit none |
3126 | 1280 | include 'nexternal.inc' | 1384 | include 'nexternal.inc' |
3127 | 1281 | include 'run.inc' | 1385 | include 'run.inc' |
3128 | 1282 | include 'c_weight.inc' | ||
3129 | 1283 | include 'reweight.inc' | ||
3130 | 1284 | include 'reweightNLO.inc' | ||
3131 | 1285 | include 'timing_variables.inc' | 1386 | include 'timing_variables.inc' |
3132 | 1286 | integer i,kr,kf,iwgt_save,dd | 1387 | integer i,kr,kf,iwgt_save,dd |
3133 | 1287 | double precision xlum(maxscales),dlum,pi,mu2_r(maxscales),c_mu2_r | 1388 | double precision xlum(maxscales),dlum,pi,mu2_r(maxscales),c_mu2_r |
3134 | @@ -1298,7 +1399,7 @@ | |||
3135 | 1298 | if (icontr.eq.0) return | 1399 | if (icontr.eq.0) return |
3136 | 1299 | c currently we have 'iwgt' weights in the wgts() array. | 1400 | c currently we have 'iwgt' weights in the wgts() array. |
3137 | 1300 | iwgt_save=iwgt | 1401 | iwgt_save=iwgt |
3139 | 1301 | c loop over all the contributions in the c_weights common block | 1402 | c loop over all the contributions in the weight lines module |
3140 | 1302 | do i=1,icontr | 1403 | do i=1,icontr |
3141 | 1303 | iwgt=iwgt_save | 1404 | iwgt=iwgt_save |
3142 | 1304 | nFKSprocess=nFKS(i) | 1405 | nFKSprocess=nFKS(i) |
3143 | @@ -1328,11 +1429,8 @@ | |||
3144 | 1328 | do kr=1,nint(scalevarR(0)) | 1429 | do kr=1,nint(scalevarR(0)) |
3145 | 1329 | if ((.not. lscalevar(dd)) .and. kr.ne.1) exit | 1430 | if ((.not. lscalevar(dd)) .and. kr.ne.1) exit |
3146 | 1330 | iwgt=iwgt+1 ! increment the iwgt for the wgts() array | 1431 | iwgt=iwgt+1 ! increment the iwgt for the wgts() array |
3152 | 1331 | if (iwgt.gt.max_wgt) then | 1432 | call weight_lines_allocated(nexternal,max_contr,iwgt |
3153 | 1332 | write (*,*) 'ERROR too many weights in '/ | 1433 | $ ,max_iproc) |
3149 | 1333 | $ /'reweight_scale',iwgt,max_wgt | ||
3150 | 1334 | stop 1 | ||
3151 | 1335 | endif | ||
3154 | 1336 | c add the weights to the array | 1434 | c add the weights to the array |
3155 | 1337 | wgts(iwgt,i)=xlum(kf) * (wgt(1,i)+wgt(2,i) | 1435 | wgts(iwgt,i)=xlum(kf) * (wgt(1,i)+wgt(2,i) |
3156 | 1338 | $ *log(mu2_r(kr)/mu2_q)+wgt(3,i)*log(mu2_f(kf) | 1436 | $ *log(mu2_r(kr)/mu2_q)+wgt(3,i)*log(mu2_f(kf) |
3157 | @@ -1349,15 +1447,14 @@ | |||
3158 | 1349 | end | 1447 | end |
3159 | 1350 | 1448 | ||
3160 | 1351 | subroutine reweight_scale_NNLL | 1449 | subroutine reweight_scale_NNLL |
3162 | 1352 | c Use the saved c_weight info to perform scale reweighting. Extends the | 1450 | c Use the saved weight lines info to perform scale reweighting. Extends the |
3163 | 1353 | c wgts() array to include the weights. Special for the NNLL+NLO jet-veto | 1451 | c wgts() array to include the weights. Special for the NNLL+NLO jet-veto |
3164 | 1354 | c computations (ickkw.eq.-1). | 1452 | c computations (ickkw.eq.-1). |
3165 | 1453 | use weight_lines | ||
3166 | 1454 | use extra_weights | ||
3167 | 1355 | implicit none | 1455 | implicit none |
3168 | 1356 | include 'nexternal.inc' | 1456 | include 'nexternal.inc' |
3169 | 1357 | include 'run.inc' | 1457 | include 'run.inc' |
3170 | 1358 | include 'c_weight.inc' | ||
3171 | 1359 | include 'reweight.inc' | ||
3172 | 1360 | include 'reweightNLO.inc' | ||
3173 | 1361 | include 'timing_variables.inc' | 1458 | include 'timing_variables.inc' |
3174 | 1362 | integer i,ks,kh,iwgt_save | 1459 | integer i,ks,kh,iwgt_save |
3175 | 1363 | double precision xlum(maxscales),dlum,pi,mu2_r(maxscales) | 1460 | double precision xlum(maxscales),dlum,pi,mu2_r(maxscales) |
3176 | @@ -1394,7 +1491,7 @@ | |||
3177 | 1394 | endif | 1491 | endif |
3178 | 1395 | enddo | 1492 | enddo |
3179 | 1396 | enddo | 1493 | enddo |
3181 | 1397 | c loop over all the contributions in the c_weights common block | 1494 | c loop over all the contributions in the weight lines module |
3182 | 1398 | do i=1,icontr | 1495 | do i=1,icontr |
3183 | 1399 | iwgt=iwgt_save | 1496 | iwgt=iwgt_save |
3184 | 1400 | nFKSprocess=nFKS(i) | 1497 | nFKSprocess=nFKS(i) |
3185 | @@ -1414,11 +1511,8 @@ | |||
3186 | 1414 | q2fact(2)=mu2_f(ks) | 1511 | q2fact(2)=mu2_f(ks) |
3187 | 1415 | xlum(ks) = dlum() | 1512 | xlum(ks) = dlum() |
3188 | 1416 | iwgt=iwgt+1 ! increment the iwgt for the wgts() array | 1513 | iwgt=iwgt+1 ! increment the iwgt for the wgts() array |
3194 | 1417 | if (iwgt.gt.max_wgt) then | 1514 | call weight_lines_allocated(nexternal,max_contr,iwgt |
3195 | 1418 | write (*,*) 'ERROR too many weights in reweight_scale' | 1515 | $ ,max_iproc) |
3191 | 1419 | & ,iwgt,max_wgt | ||
3192 | 1420 | stop 1 | ||
3193 | 1421 | endif | ||
3196 | 1422 | c add the weights to the array | 1516 | c add the weights to the array |
3197 | 1423 | if (itype(i).ne.7) then | 1517 | if (itype(i).ne.7) then |
3198 | 1424 | wgts(iwgt,i)=xlum(ks) * (wgt(1,i)+wgt(2,i) | 1518 | wgts(iwgt,i)=xlum(ks) * (wgt(1,i)+wgt(2,i) |
3199 | @@ -1445,14 +1539,13 @@ | |||
3200 | 1445 | end | 1539 | end |
3201 | 1446 | 1540 | ||
3202 | 1447 | subroutine reweight_pdf | 1541 | subroutine reweight_pdf |
3204 | 1448 | c Use the saved c_weight info to perform PDF reweighting. Extends the | 1542 | c Use the saved weight_lines info to perform PDF reweighting. Extends the |
3205 | 1449 | c wgts() array to include the weights. | 1543 | c wgts() array to include the weights. |
3206 | 1544 | use weight_lines | ||
3207 | 1545 | use extra_weights | ||
3208 | 1450 | implicit none | 1546 | implicit none |
3209 | 1451 | include 'nexternal.inc' | 1547 | include 'nexternal.inc' |
3210 | 1452 | include 'run.inc' | 1548 | include 'run.inc' |
3211 | 1453 | include 'c_weight.inc' | ||
3212 | 1454 | include 'reweight.inc' | ||
3213 | 1455 | include 'reweightNLO.inc' | ||
3214 | 1456 | include 'timing_variables.inc' | 1549 | include 'timing_variables.inc' |
3215 | 1457 | integer n,i,nn | 1550 | integer n,i,nn |
3216 | 1458 | double precision xlum,dlum,pi,mu2_r,mu2_f,mu2_q,rwgt_muR_dep_fac,g | 1551 | double precision xlum,dlum,pi,mu2_r,mu2_f,mu2_q,rwgt_muR_dep_fac,g |
3217 | @@ -1470,11 +1563,8 @@ | |||
3218 | 1470 | c allows for better caching of the PDFs | 1563 | c allows for better caching of the PDFs |
3219 | 1471 | do n=0,nmemPDF(nn) | 1564 | do n=0,nmemPDF(nn) |
3220 | 1472 | iwgt=iwgt+1 | 1565 | iwgt=iwgt+1 |
3226 | 1473 | if (iwgt.gt.max_wgt) then | 1566 | call weight_lines_allocated(nexternal,max_contr,iwgt |
3227 | 1474 | write (*,*) 'ERROR too many weights in reweight_pdf',iwgt | 1567 | $ ,max_iproc) |
3223 | 1475 | & ,max_wgt | ||
3224 | 1476 | stop 1 | ||
3225 | 1477 | endif | ||
3228 | 1478 | call InitPDFm(nn,n) | 1568 | call InitPDFm(nn,n) |
3229 | 1479 | do i=1,icontr | 1569 | do i=1,icontr |
3230 | 1480 | nFKSprocess=nFKS(i) | 1570 | nFKSprocess=nFKS(i) |
3231 | @@ -1508,9 +1598,9 @@ | |||
3232 | 1508 | c that there is an unique PS configuration: at most one Born, one real | 1598 | c that there is an unique PS configuration: at most one Born, one real |
3233 | 1509 | c and one set of counter terms. Among other things, this means that one | 1599 | c and one set of counter terms. Among other things, this means that one |
3234 | 1510 | c must do MC over FKS directories. | 1600 | c must do MC over FKS directories. |
3235 | 1601 | use weight_lines | ||
3236 | 1511 | implicit none | 1602 | implicit none |
3237 | 1512 | include 'nexternal.inc' | 1603 | include 'nexternal.inc' |
3238 | 1513 | include 'c_weight.inc' | ||
3239 | 1514 | include 'appl_common.inc' | 1604 | include 'appl_common.inc' |
3240 | 1515 | include 'nFKSconfigs.inc' | 1605 | include 'nFKSconfigs.inc' |
3241 | 1516 | include 'genps.inc' | 1606 | include 'genps.inc' |
3242 | @@ -1606,9 +1696,9 @@ | |||
3243 | 1606 | c the pdg_uborn (the PDG codes for the underlying Born process) the PDG | 1696 | c the pdg_uborn (the PDG codes for the underlying Born process) the PDG |
3244 | 1607 | c codes of i_fks and j_fks are combined to give the PDG code of the | 1697 | c codes of i_fks and j_fks are combined to give the PDG code of the |
3245 | 1608 | c mother and the extra (n+1) parton is given the PDG code of the gluon. | 1698 | c mother and the extra (n+1) parton is given the PDG code of the gluon. |
3246 | 1699 | use weight_lines | ||
3247 | 1609 | implicit none | 1700 | implicit none |
3248 | 1610 | include 'nexternal.inc' | 1701 | include 'nexternal.inc' |
3249 | 1611 | include 'c_weight.inc' | ||
3250 | 1612 | include 'fks_info.inc' | 1702 | include 'fks_info.inc' |
3251 | 1613 | include 'genps.inc' | 1703 | include 'genps.inc' |
3252 | 1614 | integer k,ict,iFKS | 1704 | integer k,ict,iFKS |
3253 | @@ -1651,9 +1741,9 @@ | |||
3254 | 1651 | subroutine get_wgt_nbody(sig) | 1741 | subroutine get_wgt_nbody(sig) |
3255 | 1652 | c Sums all the central weights that contribution to the nbody cross | 1742 | c Sums all the central weights that contribution to the nbody cross |
3256 | 1653 | c section | 1743 | c section |
3257 | 1744 | use weight_lines | ||
3258 | 1654 | implicit none | 1745 | implicit none |
3259 | 1655 | include 'nexternal.inc' | 1746 | include 'nexternal.inc' |
3260 | 1656 | include 'c_weight.inc' | ||
3261 | 1657 | double precision sig | 1747 | double precision sig |
3262 | 1658 | integer i | 1748 | integer i |
3263 | 1659 | sig=0d0 | 1749 | sig=0d0 |
3264 | @@ -1670,9 +1760,9 @@ | |||
3265 | 1670 | subroutine get_wgt_no_nbody(sig) | 1760 | subroutine get_wgt_no_nbody(sig) |
3266 | 1671 | c Sums all the central weights that contribution to the cross section | 1761 | c Sums all the central weights that contribution to the cross section |
3267 | 1672 | c excluding the nbody contributions. | 1762 | c excluding the nbody contributions. |
3268 | 1763 | use weight_lines | ||
3269 | 1673 | implicit none | 1764 | implicit none |
3270 | 1674 | include 'nexternal.inc' | 1765 | include 'nexternal.inc' |
3271 | 1675 | include 'c_weight.inc' | ||
3272 | 1676 | double precision sig | 1766 | double precision sig |
3273 | 1677 | integer i | 1767 | integer i |
3274 | 1678 | sig=0d0 | 1768 | sig=0d0 |
3275 | @@ -1688,20 +1778,20 @@ | |||
3276 | 1688 | 1778 | ||
3277 | 1689 | subroutine fill_plots | 1779 | subroutine fill_plots |
3278 | 1690 | c Calls the analysis routine (which fill plots) for all the | 1780 | c Calls the analysis routine (which fill plots) for all the |
3280 | 1691 | c contributions in the c_weight common block. Instead of really calling | 1781 | c contributions in the weight_lines module. Instead of really calling |
3281 | 1692 | c it for all, it first checks if weights can be summed (i.e. they have | 1782 | c it for all, it first checks if weights can be summed (i.e. they have |
3282 | 1693 | c the same PDG codes and the same momenta) before calling the analysis | 1783 | c the same PDG codes and the same momenta) before calling the analysis |
3283 | 1694 | c to greatly reduce the calls to the analysis routines. | 1784 | c to greatly reduce the calls to the analysis routines. |
3284 | 1785 | use weight_lines | ||
3285 | 1786 | use extra_weights | ||
3286 | 1695 | implicit none | 1787 | implicit none |
3287 | 1696 | include 'nexternal.inc' | 1788 | include 'nexternal.inc' |
3288 | 1697 | include 'c_weight.inc' | ||
3289 | 1698 | include 'reweight0.inc' | ||
3290 | 1699 | include 'timing_variables.inc' | 1789 | include 'timing_variables.inc' |
3291 | 1700 | integer i,ii,j,max_weight | 1790 | integer i,ii,j,max_weight |
3292 | 1701 | logical momenta_equal,pdg_equal | 1791 | logical momenta_equal,pdg_equal |
3293 | 1702 | external momenta_equal,pdg_equal | 1792 | external momenta_equal,pdg_equal |
3296 | 1703 | parameter (max_weight=maxscales*maxscales+maxpdfs+1) | 1793 | double precision,allocatable :: www(:) |
3297 | 1704 | double precision www(max_weight) | 1794 | save max_weight |
3298 | 1705 | call cpu_time(tBefore) | 1795 | call cpu_time(tBefore) |
3299 | 1706 | if (icontr.eq.0) return | 1796 | if (icontr.eq.0) return |
3300 | 1707 | c fill the plots_wgts. Check if we can sum weights together before | 1797 | c fill the plots_wgts. Check if we can sum weights together before |
3301 | @@ -1739,10 +1829,14 @@ | |||
3302 | 1739 | enddo | 1829 | enddo |
3303 | 1740 | do i=1,icontr | 1830 | do i=1,icontr |
3304 | 1741 | if (plot_wgts(1,i).ne.0d0) then | 1831 | if (plot_wgts(1,i).ne.0d0) then |
3309 | 1742 | if (iwgt.gt.max_weight) then | 1832 | if (.not.allocated(www)) then |
3310 | 1743 | write (*,*) 'ERROR too many weights in fill_plots',iwgt | 1833 | allocate(www(iwgt)) |
3311 | 1744 | & ,max_weight | 1834 | max_weight=iwgt |
3312 | 1745 | stop 1 | 1835 | elseif(iwgt.ne.max_weight) then |
3313 | 1836 | write (*,*) 'Error in fill_plots (fks_singular.f): '/ | ||
3314 | 1837 | $ /'number of weights should not vary between PS '/ | ||
3315 | 1838 | $ /'points',iwgt,max_weight | ||
3316 | 1839 | stop | ||
3317 | 1746 | endif | 1840 | endif |
3318 | 1747 | do j=1,iwgt | 1841 | do j=1,iwgt |
3319 | 1748 | www(j)=plot_wgts(j,i) | 1842 | www(j)=plot_wgts(j,i) |
3320 | @@ -1758,19 +1852,32 @@ | |||
3321 | 1758 | 1852 | ||
3322 | 1759 | subroutine fill_mint_function(f) | 1853 | subroutine fill_mint_function(f) |
3323 | 1760 | c Fills the function that is returned to the MINT integrator | 1854 | c Fills the function that is returned to the MINT integrator |
3324 | 1855 | use weight_lines | ||
3325 | 1761 | implicit none | 1856 | implicit none |
3326 | 1762 | include 'nexternal.inc' | 1857 | include 'nexternal.inc' |
3327 | 1763 | include 'c_weight.inc' | ||
3328 | 1764 | include 'mint.inc' | 1858 | include 'mint.inc' |
3329 | 1765 | integer i | 1859 | integer i |
3331 | 1766 | double precision f(nintegrals),sigint | 1860 | double precision f(nintegrals),sigint,bias |
3332 | 1767 | double precision virt_wgt_mint,born_wgt_mint | 1861 | double precision virt_wgt_mint,born_wgt_mint |
3333 | 1768 | common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint | 1862 | common /virt_born_wgt_mint/virt_wgt_mint,born_wgt_mint |
3334 | 1769 | double precision virtual_over_born | 1863 | double precision virtual_over_born |
3335 | 1770 | common /c_vob/ virtual_over_born | 1864 | common /c_vob/ virtual_over_born |
3336 | 1865 | character*7 event_norm | ||
3337 | 1866 | common /event_normalisation/event_norm | ||
3338 | 1771 | sigint=0d0 | 1867 | sigint=0d0 |
3339 | 1772 | do i=1,icontr | 1868 | do i=1,icontr |
3341 | 1773 | sigint=sigint+wgts(1,i) | 1869 | if (event_norm(1:4).ne.'bias') then |
3342 | 1870 | sigint=sigint+wgts(1,i) | ||
3343 | 1871 | else | ||
3344 | 1872 | if (itype(i).eq.1) then | ||
3345 | 1873 | call bias_weight_function(momenta_m(0,1,2,i),parton_pdg(1 | ||
3346 | 1874 | $ ,1,i),bias) | ||
3347 | 1875 | else | ||
3348 | 1876 | call bias_weight_function(momenta_m(0,1,1,i),parton_pdg(1 | ||
3349 | 1877 | $ ,1,i),bias) | ||
3350 | 1878 | endif | ||
3351 | 1879 | sigint=sigint+wgts(1,i)*bias | ||
3352 | 1880 | endif | ||
3353 | 1774 | enddo | 1881 | enddo |
3354 | 1775 | f(1)=abs(sigint) | 1882 | f(1)=abs(sigint) |
3355 | 1776 | f(2)=sigint | 1883 | f(2)=sigint |
3356 | @@ -1786,10 +1893,10 @@ | |||
3357 | 1786 | c Includes the shape function from the MC counter terms in the shower | 1893 | c Includes the shape function from the MC counter terms in the shower |
3358 | 1787 | c starting scale. This function needs to be called (at least) once per | 1894 | c starting scale. This function needs to be called (at least) once per |
3359 | 1788 | c FKS configuration that is included in the current PS point. | 1895 | c FKS configuration that is included in the current PS point. |
3360 | 1896 | use weight_lines | ||
3361 | 1789 | implicit none | 1897 | implicit none |
3362 | 1790 | include 'nexternal.inc' | 1898 | include 'nexternal.inc' |
3363 | 1791 | include 'run.inc' | 1899 | include 'run.inc' |
3364 | 1792 | include 'c_weight.inc' | ||
3365 | 1793 | include 'nFKSconfigs.inc' | 1900 | include 'nFKSconfigs.inc' |
3366 | 1794 | integer i,iFKS,Hevents,izero,mohdr | 1901 | integer i,iFKS,Hevents,izero,mohdr |
3367 | 1795 | double precision ddum(6),p(0:3,nexternal) | 1902 | double precision ddum(6),p(0:3,nexternal) |
3368 | @@ -1847,9 +1954,9 @@ | |||
3369 | 1847 | c the MC counter terms for the H-events FKS configuration by FKS | 1954 | c the MC counter terms for the H-events FKS configuration by FKS |
3370 | 1848 | c configuration, while for the S-events also contributions from the | 1955 | c configuration, while for the S-events also contributions from the |
3371 | 1849 | c various FKS configurations can be summed together. | 1956 | c various FKS configurations can be summed together. |
3372 | 1957 | use weight_lines | ||
3373 | 1850 | implicit none | 1958 | implicit none |
3374 | 1851 | include 'nexternal.inc' | 1959 | include 'nexternal.inc' |
3375 | 1852 | include 'c_weight.inc' | ||
3376 | 1853 | include 'genps.inc' | 1960 | include 'genps.inc' |
3377 | 1854 | include 'nFKSconfigs.inc' | 1961 | include 'nFKSconfigs.inc' |
3378 | 1855 | include 'fks_info.inc' | 1962 | include 'fks_info.inc' |
3379 | @@ -1953,9 +2060,9 @@ | |||
3380 | 1953 | c necessarily the same for all of these summed FKS configurations). Take | 2060 | c necessarily the same for all of these summed FKS configurations). Take |
3381 | 1954 | c the weighted average over the FKS configurations as the shower scale | 2061 | c the weighted average over the FKS configurations as the shower scale |
3382 | 1955 | c for the summed contribution. | 2062 | c for the summed contribution. |
3383 | 2063 | use weight_lines | ||
3384 | 1956 | implicit none | 2064 | implicit none |
3385 | 1957 | include 'nexternal.inc' | 2065 | include 'nexternal.inc' |
3386 | 1958 | include 'c_weight.inc' | ||
3387 | 1959 | include 'nFKSconfigs.inc' | 2066 | include 'nFKSconfigs.inc' |
3388 | 1960 | integer i,j,ict | 2067 | integer i,j,ict |
3389 | 1961 | double precision tmp_wgt(fks_configs),showerscale(fks_configs) | 2068 | double precision tmp_wgt(fks_configs),showerscale(fks_configs) |
3390 | @@ -2009,9 +2116,9 @@ | |||
3391 | 2009 | subroutine fill_mint_function_NLOPS(f,n1body_wgt) | 2116 | subroutine fill_mint_function_NLOPS(f,n1body_wgt) |
3392 | 2010 | c Fills the function that is returned to the MINT integrator. Depending | 2117 | c Fills the function that is returned to the MINT integrator. Depending |
3393 | 2011 | c on the imode we should or should not include the virtual corrections. | 2118 | c on the imode we should or should not include the virtual corrections. |
3394 | 2119 | use weight_lines | ||
3395 | 2012 | implicit none | 2120 | implicit none |
3396 | 2013 | include 'nexternal.inc' | 2121 | include 'nexternal.inc' |
3397 | 2014 | include 'c_weight.inc' | ||
3398 | 2015 | include 'mint.inc' | 2122 | include 'mint.inc' |
3399 | 2016 | integer i,j,ict | 2123 | integer i,j,ict |
3400 | 2017 | double precision f(nintegrals),sigint,sigint1,sigint_ABS | 2124 | double precision f(nintegrals),sigint,sigint1,sigint_ABS |
3401 | @@ -2099,9 +2206,9 @@ | |||
3402 | 2099 | subroutine pick_unweight_contr(iFKS_picked) | 2206 | subroutine pick_unweight_contr(iFKS_picked) |
3403 | 2100 | c Randomly pick (weighted by the ABS values) the contribution to a given | 2207 | c Randomly pick (weighted by the ABS values) the contribution to a given |
3404 | 2101 | c PS point that should be written in the event file. | 2208 | c PS point that should be written in the event file. |
3405 | 2209 | use weight_lines | ||
3406 | 2102 | implicit none | 2210 | implicit none |
3407 | 2103 | include 'nexternal.inc' | 2211 | include 'nexternal.inc' |
3408 | 2104 | include 'c_weight.inc' | ||
3409 | 2105 | include 'genps.inc' | 2212 | include 'genps.inc' |
3410 | 2106 | include 'nFKSconfigs.inc' | 2213 | include 'nFKSconfigs.inc' |
3411 | 2107 | include 'fks_info.inc' | 2214 | include 'fks_info.inc' |
3412 | @@ -2179,19 +2286,21 @@ | |||
3413 | 2179 | c Fills the lines, n_ctr_str, to be written in an event file with the | 2286 | c Fills the lines, n_ctr_str, to be written in an event file with the |
3414 | 2180 | c (internal) information to perform scale and/or PDF reweighting. All | 2287 | c (internal) information to perform scale and/or PDF reweighting. All |
3415 | 2181 | c information is available in each line to do the reweighting, apart | 2288 | c information is available in each line to do the reweighting, apart |
3417 | 2182 | c from the momenta: these are put in the momenta_str_l() array, and a | 2289 | c from the momenta: these are put in the momenta_str() array, and a |
3418 | 2183 | c label in each of the n_ctr_str refers to a corresponding set of | 2290 | c label in each of the n_ctr_str refers to a corresponding set of |
3420 | 2184 | c momenta in the momenta_str_l() array. | 2291 | c momenta in the momenta_str() array. |
3421 | 2292 | use weight_lines | ||
3422 | 2293 | use extra_weights | ||
3423 | 2185 | implicit none | 2294 | implicit none |
3424 | 2186 | include 'nexternal.inc' | 2295 | include 'nexternal.inc' |
3425 | 2187 | include 'c_weight.inc' | ||
3426 | 2188 | include 'reweight0.inc' | ||
3427 | 2189 | include 'genps.inc' | 2296 | include 'genps.inc' |
3428 | 2190 | include 'nFKSconfigs.inc' | 2297 | include 'nFKSconfigs.inc' |
3429 | 2191 | include 'fks_info.inc' | 2298 | include 'fks_info.inc' |
3430 | 2192 | integer k,i,ii,j,jj,ict,ipr,momenta_conf(2) | 2299 | integer k,i,ii,j,jj,ict,ipr,momenta_conf(2) |
3431 | 2193 | logical momenta_equal,found | 2300 | logical momenta_equal,found |
3433 | 2194 | double precision conv,momenta_str_l(0:3,nexternal,max_n_ctr) | 2301 | double precision conv |
3434 | 2302 | double precision,allocatable :: temp3(:,:,:) | ||
3435 | 2303 | character(len=1024),allocatable :: ctemp(:) | ||
3436 | 2195 | external momenta_equal | 2304 | external momenta_equal |
3437 | 2196 | character*512 procid,str_temp | 2305 | character*512 procid,str_temp |
3438 | 2197 | parameter (conv=389379660d0) ! conversion to picobarns | 2306 | parameter (conv=389379660d0) ! conversion to picobarns |
3439 | @@ -2200,15 +2309,17 @@ | |||
3440 | 2200 | common/cproc_combination/iproc_save,eto,etoi,maxproc_found | 2309 | common/cproc_combination/iproc_save,eto,etoi,maxproc_found |
3441 | 2201 | logical Hevents | 2310 | logical Hevents |
3442 | 2202 | common/SHevents/Hevents | 2311 | common/SHevents/Hevents |
3443 | 2312 | if (.not.allocated(momenta_str)) allocate(momenta_str(0:3 | ||
3444 | 2313 | $ ,max_mext,max_mom_str)) | ||
3445 | 2203 | wgtref=unwgt(iproc_picked,icontr_picked) | 2314 | wgtref=unwgt(iproc_picked,icontr_picked) |
3446 | 2204 | n_ctr_found=0 | 2315 | n_ctr_found=0 |
3447 | 2205 | n_mom_conf=0 | 2316 | n_mom_conf=0 |
3448 | 2206 | c Loop over all the contributions in the picked contribution (the latter | 2317 | c Loop over all the contributions in the picked contribution (the latter |
3450 | 2207 | c is chosen in the pick_unweight_cont() subroutine) | 2318 | c is chosen in the pick_unweight_contr() subroutine) |
3451 | 2208 | do i=1,icontr_sum(0,icontr_picked) | 2319 | do i=1,icontr_sum(0,icontr_picked) |
3452 | 2209 | ict=icontr_sum(i,icontr_picked) | 2320 | ict=icontr_sum(i,icontr_picked) |
3453 | 2210 | c Check if the current set of momenta are already available in the | 2321 | c Check if the current set of momenta are already available in the |
3455 | 2211 | c momenta_str_l array. If not, add it. | 2322 | c momenta_str array. If not, add it. |
3456 | 2212 | found=.false. | 2323 | found=.false. |
3457 | 2213 | do k=1,2 | 2324 | do k=1,2 |
3458 | 2214 | do j=1,n_mom_conf | 2325 | do j=1,n_mom_conf |
3459 | @@ -2216,7 +2327,7 @@ | |||
3460 | 2216 | momenta_conf(k)=0 | 2327 | momenta_conf(k)=0 |
3461 | 2217 | cycle | 2328 | cycle |
3462 | 2218 | endif | 2329 | endif |
3464 | 2219 | if (momenta_equal(momenta_str_l(0,1,j), | 2330 | if (momenta_equal(momenta_str(0,1,j), |
3465 | 2220 | & momenta_m(0,1,k,ict))) then | 2331 | & momenta_m(0,1,k,ict))) then |
3466 | 2221 | momenta_conf(k)=j | 2332 | momenta_conf(k)=j |
3467 | 2222 | found=.true. | 2333 | found=.true. |
3468 | @@ -2225,12 +2336,20 @@ | |||
3469 | 2225 | enddo | 2336 | enddo |
3470 | 2226 | if (.not. found) then | 2337 | if (.not. found) then |
3471 | 2227 | n_mom_conf=n_mom_conf+1 | 2338 | n_mom_conf=n_mom_conf+1 |
3472 | 2339 | if (n_mom_conf.gt.max_mom_str .or. nexternal.gt.max_mext) | ||
3473 | 2340 | $ then | ||
3474 | 2341 | allocate(temp3(0:3,max(nexternal,max_mext) | ||
3475 | 2342 | $ ,max(n_mom_conf,max_mom_str))) | ||
3476 | 2343 | temp3(0:3,1:min(nexternal,max_mext) | ||
3477 | 2344 | $ ,1:min(max_mom_str,n_mom_conf))=momenta_str | ||
3478 | 2345 | call move_alloc(temp3,momenta_str) | ||
3479 | 2346 | max_mom_str=max(n_mom_conf,max_mom_str) | ||
3480 | 2347 | max_mext=max(nexternal,max_mext) | ||
3481 | 2348 | endif | ||
3482 | 2228 | do ii=1,nexternal | 2349 | do ii=1,nexternal |
3483 | 2229 | do jj=0,3 | 2350 | do jj=0,3 |
3484 | 2230 | momenta_str(jj,ii,n_mom_conf)= | 2351 | momenta_str(jj,ii,n_mom_conf)= |
3485 | 2231 | & momenta_m(jj,ii,k,ict) | 2352 | & momenta_m(jj,ii,k,ict) |
3486 | 2232 | momenta_str_l(jj,ii,n_mom_conf)= | ||
3487 | 2233 | & momenta_m(jj,ii,k,ict) | ||
3488 | 2234 | enddo | 2353 | enddo |
3489 | 2235 | enddo | 2354 | enddo |
3490 | 2236 | momenta_conf(k)=n_mom_conf | 2355 | momenta_conf(k)=n_mom_conf |
3491 | @@ -2244,6 +2363,15 @@ | |||
3492 | 2244 | if (eto(ii,nFKS(ict)).ne.ipr) cycle | 2363 | if (eto(ii,nFKS(ict)).ne.ipr) cycle |
3493 | 2245 | n_ctr_found=n_ctr_found+1 | 2364 | n_ctr_found=n_ctr_found+1 |
3494 | 2246 | 2365 | ||
3495 | 2366 | if (.not.allocated(n_ctr_str)) | ||
3496 | 2367 | $ allocate(n_ctr_str(max_n_ctr)) | ||
3497 | 2368 | if (n_ctr_found.gt.max_n_ctr) then | ||
3498 | 2369 | allocate(ctemp(n_ctr_found)) | ||
3499 | 2370 | ctemp(1:max_n_ctr)=n_ctr_str | ||
3500 | 2371 | call move_alloc(ctemp,n_ctr_str) | ||
3501 | 2372 | max_n_ctr=n_ctr_found | ||
3502 | 2373 | endif | ||
3503 | 2374 | |||
3504 | 2247 | if (nincoming.eq.2) then | 2375 | if (nincoming.eq.2) then |
3505 | 2248 | write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)') | 2376 | write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)') |
3506 | 2249 | & (wgt(j,ict)*conv,j=1,3),(wgt_me_tree(j,ict),j=1,2), | 2377 | & (wgt(j,ict)*conv,j=1,3),(wgt_me_tree(j,ict),j=1,2), |
3507 | @@ -2264,8 +2392,7 @@ | |||
3508 | 2264 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' | 2392 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' |
3509 | 2265 | & //trim(adjustl(procid)) | 2393 | & //trim(adjustl(procid)) |
3510 | 2266 | 2394 | ||
3513 | 2267 | write (str_temp, | 2395 | write (str_temp,30) |
3512 | 2268 | & '(i2,6(1x,d14.8),6(1x,i2),1x,i8,1x,d18.12)') | ||
3514 | 2269 | & QCDpower(ict), | 2396 | & QCDpower(ict), |
3515 | 2270 | & (bjx(j,ict),j=1,2), | 2397 | & (bjx(j,ict),j=1,2), |
3516 | 2271 | & (scales2(j,ict),j=1,3), | 2398 | & (scales2(j,ict),j=1,3), |
3517 | @@ -2276,7 +2403,8 @@ | |||
3518 | 2276 | & fks_i_d(nFKS(ict)), | 2403 | & fks_i_d(nFKS(ict)), |
3519 | 2277 | & fks_j_d(nFKS(ict)), | 2404 | & fks_j_d(nFKS(ict)), |
3520 | 2278 | & parton_pdg_uborn(fks_j_d(nFKS(ict)),ii,ict), | 2405 | & parton_pdg_uborn(fks_j_d(nFKS(ict)),ii,ict), |
3522 | 2279 | & parton_iproc(ii,ict) | 2406 | & parton_iproc(ii,ict), |
3523 | 2407 | & bias_wgt(ict) | ||
3524 | 2280 | n_ctr_str(n_ctr_found) = | 2408 | n_ctr_str(n_ctr_found) = |
3525 | 2281 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' | 2409 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' |
3526 | 2282 | & //trim(adjustl(str_temp)) | 2410 | & //trim(adjustl(str_temp)) |
3527 | @@ -2286,6 +2414,15 @@ | |||
3528 | 2286 | ipr=iproc_picked | 2414 | ipr=iproc_picked |
3529 | 2287 | n_ctr_found=n_ctr_found+1 | 2415 | n_ctr_found=n_ctr_found+1 |
3530 | 2288 | 2416 | ||
3531 | 2417 | if (.not.allocated(n_ctr_str)) | ||
3532 | 2418 | $ allocate(n_ctr_str(max_n_ctr)) | ||
3533 | 2419 | if (n_ctr_found.gt.max_n_ctr) then | ||
3534 | 2420 | allocate(ctemp(n_ctr_found)) | ||
3535 | 2421 | ctemp(1:max_n_ctr)=n_ctr_str | ||
3536 | 2422 | call move_alloc(ctemp,n_ctr_str) | ||
3537 | 2423 | max_n_ctr=n_ctr_found | ||
3538 | 2424 | endif | ||
3539 | 2425 | |||
3540 | 2289 | if (nincoming.eq.2) then | 2426 | if (nincoming.eq.2) then |
3541 | 2290 | write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)') | 2427 | write (n_ctr_str(n_ctr_found),'(5(1x,d18.12),1x,i2)') |
3542 | 2291 | & (wgt(j,ict)*conv,j=1,3),(wgt_me_tree(j,ict),j=1,2), | 2428 | & (wgt(j,ict)*conv,j=1,3),(wgt_me_tree(j,ict),j=1,2), |
3543 | @@ -2306,7 +2443,7 @@ | |||
3544 | 2306 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' | 2443 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' |
3545 | 2307 | & //trim(adjustl(procid)) | 2444 | & //trim(adjustl(procid)) |
3546 | 2308 | 2445 | ||
3548 | 2309 | write (str_temp,'(i2,6(1x,d14.8),6(1x,i2),1x,i8,1x,d18.12)') | 2446 | write (str_temp,30) |
3549 | 2310 | & QCDpower(ict), | 2447 | & QCDpower(ict), |
3550 | 2311 | & (bjx(j,ict),j=1,2), | 2448 | & (bjx(j,ict),j=1,2), |
3551 | 2312 | & (scales2(j,ict),j=1,3), | 2449 | & (scales2(j,ict),j=1,3), |
3552 | @@ -2317,18 +2454,17 @@ | |||
3553 | 2317 | & fks_i_d(nFKS(ict)), | 2454 | & fks_i_d(nFKS(ict)), |
3554 | 2318 | & fks_j_d(nFKS(ict)), | 2455 | & fks_j_d(nFKS(ict)), |
3555 | 2319 | & parton_pdg_uborn(fks_j_d(nFKS(ict)),ipr,ict), | 2456 | & parton_pdg_uborn(fks_j_d(nFKS(ict)),ipr,ict), |
3557 | 2320 | & parton_iproc(ipr,ict) | 2457 | & parton_iproc(ipr,ict), |
3558 | 2458 | & bias_wgt(ict) | ||
3559 | 2321 | n_ctr_str(n_ctr_found) = | 2459 | n_ctr_str(n_ctr_found) = |
3560 | 2322 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' | 2460 | & trim(adjustl(n_ctr_str(n_ctr_found)))//' ' |
3561 | 2323 | & //trim(adjustl(str_temp)) | 2461 | & //trim(adjustl(str_temp)) |
3562 | 2324 | 2462 | ||
3563 | 2325 | 2463 | ||
3564 | 2326 | endif | 2464 | endif |
3565 | 2327 | if (n_ctr_found.ge.max_n_ctr) then | ||
3566 | 2328 | write (*,*) 'ERROR: too many contributions in <rwgt>' | ||
3567 | 2329 | stop1 | ||
3568 | 2330 | endif | ||
3569 | 2331 | enddo | 2465 | enddo |
3570 | 2466 | return | ||
3571 | 2467 | 30 format(i2,6(1x,d14.8),6(1x,i2),1x,i8,1x,d18.12,1x,d18.12) | ||
3572 | 2332 | end | 2468 | end |
3573 | 2333 | 2469 | ||
3574 | 2334 | 2470 | ||
3575 | @@ -2878,9 +3014,6 @@ | |||
3576 | 2878 | double complex xij_aor | 3014 | double complex xij_aor |
3577 | 2879 | common/cxij_aor/xij_aor | 3015 | common/cxij_aor/xij_aor |
3578 | 2880 | 3016 | ||
3579 | 2881 | logical rotategranny | ||
3580 | 2882 | common/crotategranny/rotategranny | ||
3581 | 2883 | |||
3582 | 2884 | double precision cthbe,sthbe,cphibe,sphibe | 3017 | double precision cthbe,sthbe,cphibe,sphibe |
3583 | 2885 | common/cbeangles/cthbe,sthbe,cphibe,sphibe | 3018 | common/cbeangles/cthbe,sthbe,cphibe,sphibe |
3584 | 2886 | 3019 | ||
3585 | @@ -2918,20 +3051,7 @@ | |||
3586 | 2918 | E_i_fks = p(0,i_fks) | 3051 | E_i_fks = p(0,i_fks) |
3587 | 2919 | z = 1d0 - E_i_fks/(E_i_fks+E_j_fks) | 3052 | z = 1d0 - E_i_fks/(E_i_fks+E_j_fks) |
3588 | 2920 | t = z * shat/4d0 | 3053 | t = z * shat/4d0 |
3603 | 2921 | if(rotategranny .and. nexternal-1.ne.3 .and. nincoming.eq.2)then | 3054 | call sborn(p_born,wgt1) |
3590 | 2922 | c Exclude 2->1 (at the Born level) processes: matrix elements are | ||
3591 | 2923 | c independent of the PS point, but non-zero helicity configurations | ||
3592 | 2924 | c might flip when rotating the momenta. | ||
3593 | 2925 | do i=1,nexternal-1 | ||
3594 | 2926 | call trp_rotate_invar(p_born(0,i),p_born_rot(0,i), | ||
3595 | 2927 | # cthbe,sthbe,cphibe,sphibe) | ||
3596 | 2928 | enddo | ||
3597 | 2929 | CalculatedBorn=.false. | ||
3598 | 2930 | call sborn(p_born_rot,wgt1) | ||
3599 | 2931 | CalculatedBorn=.false. | ||
3600 | 2932 | else | ||
3601 | 2933 | call sborn(p_born,wgt1) | ||
3602 | 2934 | endif | ||
3604 | 2935 | call AP_reduced(j_type,i_type,t,z,ap) | 3055 | call AP_reduced(j_type,i_type,t,z,ap) |
3605 | 2936 | if (abs(j_type).eq.3 .and. i_type.eq.8) then | 3056 | if (abs(j_type).eq.3 .and. i_type.eq.8) then |
3606 | 2937 | Q=0d0 | 3057 | Q=0d0 |
3607 | @@ -2945,10 +3065,6 @@ | |||
3608 | 2945 | pi(i)=p_i_fks_ev(i) | 3065 | pi(i)=p_i_fks_ev(i) |
3609 | 2946 | pj(i)=p(i,j_fks) | 3066 | pj(i)=p(i,j_fks) |
3610 | 2947 | enddo | 3067 | enddo |
3611 | 2948 | if(rotategranny)then | ||
3612 | 2949 | call trp_rotate_invar(pi,pi,cthbe,sthbe,cphibe,sphibe) | ||
3613 | 2950 | call trp_rotate_invar(pj,pj,cthbe,sthbe,cphibe,sphibe) | ||
3614 | 2951 | endif | ||
3615 | 2952 | CALL IXXXSO(pi ,ZERO ,+1,+1,W1) | 3068 | CALL IXXXSO(pi ,ZERO ,+1,+1,W1) |
3616 | 2953 | CALL OXXXSO(pj ,ZERO ,-1,+1,W2) | 3069 | CALL OXXXSO(pj ,ZERO ,-1,+1,W2) |
3617 | 2954 | CALL IXXXSO(pi ,ZERO ,-1,+1,W3) | 3070 | CALL IXXXSO(pi ,ZERO ,-1,+1,W3) |
3618 | @@ -2963,13 +3079,8 @@ | |||
3619 | 2963 | endif | 3079 | endif |
3620 | 2964 | c Insert the extra factor due to Madgraph convention for polarization vectors | 3080 | c Insert the extra factor due to Madgraph convention for polarization vectors |
3621 | 2965 | imother_fks=min(i_fks,j_fks) | 3081 | imother_fks=min(i_fks,j_fks) |
3629 | 2966 | if(rotategranny)then | 3082 | call getaziangles(p_born(0,imother_fks), |
3630 | 2967 | call getaziangles(p_born_rot(0,imother_fks), | 3083 | # cphi_mother,sphi_mother) |
3624 | 2968 | # cphi_mother,sphi_mother) | ||
3625 | 2969 | else | ||
3626 | 2970 | call getaziangles(p_born(0,imother_fks), | ||
3627 | 2971 | # cphi_mother,sphi_mother) | ||
3628 | 2972 | endif | ||
3631 | 2973 | wgt1(2) = -(cphi_mother-ximag*sphi_mother)**2 * | 3084 | wgt1(2) = -(cphi_mother-ximag*sphi_mother)**2 * |
3632 | 2974 | # wgt1(2) * azifact | 3085 | # wgt1(2) * azifact |
3633 | 2975 | call Qterms_reduced_timelike(j_type, i_type, t, z, Q) | 3086 | call Qterms_reduced_timelike(j_type, i_type, t, z, Q) |
3634 | @@ -3040,24 +3151,7 @@ | |||
3635 | 3040 | c Thus, an extra factor z (implicit in the flux of the reduced Born | 3151 | c Thus, an extra factor z (implicit in the flux of the reduced Born |
3636 | 3041 | c in FKS) has to be inserted here | 3152 | c in FKS) has to be inserted here |
3637 | 3042 | t = z*shat/4d0 | 3153 | t = z*shat/4d0 |
3656 | 3043 | if(j_fks.eq.2 .and. nexternal-1.ne.3 .and. nincoming.eq.2)then | 3154 | call sborn(p_born,wgt1) |
3639 | 3044 | c Rotation according to innerpin.m. Use rotate_invar() if a more | ||
3640 | 3045 | c general rotation is needed. | ||
3641 | 3046 | c Exclude 2->1 (at the Born level) processes: matrix elements are | ||
3642 | 3047 | c independent of the PS point, but non-zero helicity configurations | ||
3643 | 3048 | c might flip when rotating the momenta. | ||
3644 | 3049 | do i=1,nexternal-1 | ||
3645 | 3050 | p_born_rot(0,i)=p_born(0,i) | ||
3646 | 3051 | p_born_rot(1,i)=-p_born(1,i) | ||
3647 | 3052 | p_born_rot(2,i)=p_born(2,i) | ||
3648 | 3053 | p_born_rot(3,i)=-p_born(3,i) | ||
3649 | 3054 | enddo | ||
3650 | 3055 | CalculatedBorn=.false. | ||
3651 | 3056 | call sborn(p_born_rot,wgt1) | ||
3652 | 3057 | CalculatedBorn=.false. | ||
3653 | 3058 | else | ||
3654 | 3059 | call sborn(p_born,wgt1) | ||
3655 | 3060 | endif | ||
3657 | 3061 | call AP_reduced(m_type,i_type,t,z,ap) | 3155 | call AP_reduced(m_type,i_type,t,z,ap) |
3658 | 3062 | if (abs(m_type).eq.3) then | 3156 | if (abs(m_type).eq.3) then |
3659 | 3063 | Q=0d0 | 3157 | Q=0d0 |
3660 | @@ -3071,14 +3165,6 @@ | |||
3661 | 3071 | pi(i)=p_i_fks_ev(i) | 3165 | pi(i)=p_i_fks_ev(i) |
3662 | 3072 | pj(i)=p(i,j_fks) | 3166 | pj(i)=p(i,j_fks) |
3663 | 3073 | enddo | 3167 | enddo |
3664 | 3074 | if(j_fks.eq.2 .and. nincoming.eq.2)then | ||
3665 | 3075 | c Rotation according to innerpin.m. Use rotate_invar() if a more | ||
3666 | 3076 | c general rotation is needed | ||
3667 | 3077 | pi(1)=-pi(1) | ||
3668 | 3078 | pi(3)=-pi(3) | ||
3669 | 3079 | pj(1)=-pj(1) | ||
3670 | 3080 | pj(3)=-pj(3) | ||
3671 | 3081 | endif | ||
3672 | 3082 | CALL IXXXSO(pi ,ZERO ,+1,+1,W1) | 3168 | CALL IXXXSO(pi ,ZERO ,+1,+1,W1) |
3673 | 3083 | CALL OXXXSO(pj ,ZERO ,-1,+1,W2) | 3169 | CALL OXXXSO(pj ,ZERO ,-1,+1,W2) |
3674 | 3084 | CALL IXXXSO(pi ,ZERO ,-1,+1,W3) | 3170 | CALL IXXXSO(pi ,ZERO ,-1,+1,W3) |
3675 | @@ -3092,13 +3178,8 @@ | |||
3676 | 3092 | azifact=Wij_angle/Wij_recta | 3178 | azifact=Wij_angle/Wij_recta |
3677 | 3093 | endif | 3179 | endif |
3678 | 3094 | c Insert the extra factor due to Madgraph convention for polarization vectors | 3180 | c Insert the extra factor due to Madgraph convention for polarization vectors |
3686 | 3095 | if(j_fks.eq.2 .and. nincoming.eq.2)then | 3181 | cphi_mother=1.d0 |
3687 | 3096 | cphi_mother=-1.d0 | 3182 | sphi_mother=0.d0 |
3681 | 3097 | sphi_mother=0.d0 | ||
3682 | 3098 | else | ||
3683 | 3099 | cphi_mother=1.d0 | ||
3684 | 3100 | sphi_mother=0.d0 | ||
3685 | 3101 | endif | ||
3688 | 3102 | wgt1(2) = -(cphi_mother+ximag*sphi_mother)**2 * | 3183 | wgt1(2) = -(cphi_mother+ximag*sphi_mother)**2 * |
3689 | 3103 | # wgt1(2) * dconjg(azifact) | 3184 | # wgt1(2) * dconjg(azifact) |
3690 | 3104 | call Qterms_reduced_spacelike(m_type, i_type, t, z, Q) | 3185 | call Qterms_reduced_spacelike(m_type, i_type, t, z, Q) |
3691 | @@ -3508,13 +3589,13 @@ | |||
3692 | 3508 | 3589 | ||
3693 | 3509 | subroutine sreal_deg(p,xi_i_fks,y_ij_fks, | 3590 | subroutine sreal_deg(p,xi_i_fks,y_ij_fks, |
3694 | 3510 | # collrem_xi,collrem_lxi) | 3591 | # collrem_xi,collrem_lxi) |
3695 | 3592 | use extra_weights | ||
3696 | 3511 | implicit none | 3593 | implicit none |
3697 | 3512 | include "genps.inc" | 3594 | include "genps.inc" |
3698 | 3513 | include 'nexternal.inc' | 3595 | include 'nexternal.inc' |
3699 | 3514 | include "coupl.inc" | 3596 | include "coupl.inc" |
3700 | 3515 | include 'q_es.inc' | 3597 | include 'q_es.inc' |
3701 | 3516 | include "run.inc" | 3598 | include "run.inc" |
3702 | 3517 | include 'reweight.inc' | ||
3703 | 3518 | 3599 | ||
3704 | 3519 | double precision p(0:3,nexternal),collrem_xi,collrem_lxi | 3600 | double precision p(0:3,nexternal),collrem_xi,collrem_lxi |
3705 | 3520 | double precision xi_i_fks,y_ij_fks | 3601 | double precision xi_i_fks,y_ij_fks |
3706 | @@ -3679,8 +3760,6 @@ | |||
3707 | 3679 | include "run.inc" | 3760 | include "run.inc" |
3708 | 3680 | include "nexternal.inc" | 3761 | include "nexternal.inc" |
3709 | 3681 | integer j_fks | 3762 | integer j_fks |
3710 | 3682 | double precision dlum | ||
3711 | 3683 | external dlum | ||
3712 | 3684 | double precision zhw_used,xi_i_fks,xlum_mc_fact | 3763 | double precision zhw_used,xi_i_fks,xlum_mc_fact |
3713 | 3685 | double precision xbjrk_ev(2),xbjrk_cnt(2,-2:2) | 3764 | double precision xbjrk_ev(2),xbjrk_cnt(2,-2:2) |
3714 | 3686 | common/cbjorkenx/xbjrk_ev,xbjrk_cnt | 3765 | common/cbjorkenx/xbjrk_ev,xbjrk_cnt |
3715 | @@ -3808,15 +3887,6 @@ | |||
3716 | 3808 | endif | 3887 | endif |
3717 | 3809 | if(.not.pass)i_momcmp_count=i_momcmp_count +1 | 3888 | if(.not.pass)i_momcmp_count=i_momcmp_count +1 |
3718 | 3810 | c | 3889 | c |
3719 | 3811 | if(jac_cnt(0).gt.0.d0.and.jac.gt.0.d0) | ||
3720 | 3812 | # call p_ev_vs_cnt(izero,i_fks,j_fks,p,p1_cnt, | ||
3721 | 3813 | # p_i_fks_ev,p_i_fks_cnt, | ||
3722 | 3814 | # xi_i_fks_ev,y_ij_fks_ev) | ||
3723 | 3815 | if(jac_cnt(1).gt.0.d0.and.jac.gt.0.d0) | ||
3724 | 3816 | # call p_ev_vs_cnt(ione,i_fks,j_fks,p,p1_cnt, | ||
3725 | 3817 | # p_i_fks_ev,p_i_fks_cnt, | ||
3726 | 3818 | # xi_i_fks_ev,y_ij_fks_ev) | ||
3727 | 3819 | c | ||
3728 | 3820 | return | 3890 | return |
3729 | 3821 | end | 3891 | end |
3730 | 3822 | 3892 | ||
3731 | @@ -3915,72 +3985,6 @@ | |||
3732 | 3915 | end | 3985 | end |
3733 | 3916 | 3986 | ||
3734 | 3917 | 3987 | ||
3735 | 3918 | subroutine xmcompare_fsr(verbose,inum,iden,i_fks,j_fks,p,p1_cnt) | ||
3736 | 3919 | implicit none | ||
3737 | 3920 | include 'genps.inc' | ||
3738 | 3921 | include 'nexternal.inc' | ||
3739 | 3922 | logical verbose | ||
3740 | 3923 | integer inum,iden,i_fks,j_fks,iunit,ipart,i | ||
3741 | 3924 | double precision tiny,xnum,xden,xrat | ||
3742 | 3925 | double precision p(0:3,-max_branch:max_particles) | ||
3743 | 3926 | double precision p1_cnt(0:3,nexternal,-2:2) | ||
3744 | 3927 | parameter (iunit=6) | ||
3745 | 3928 | parameter (tiny=1.d-4) | ||
3746 | 3929 | c | ||
3747 | 3930 | do ipart=1,nexternal | ||
3748 | 3931 | do i=0,3 | ||
3749 | 3932 | xnum=p1_cnt(i,ipart,inum) | ||
3750 | 3933 | xden=p1_cnt(i,ipart,iden) | ||
3751 | 3934 | if(verbose)then | ||
3752 | 3935 | if(i.eq.0)then | ||
3753 | 3936 | write(iunit,*)' ' | ||
3754 | 3937 | write(iunit,*)'part=',ipart | ||
3755 | 3938 | endif | ||
3756 | 3939 | call xprintout(iunit,xnum,xden) | ||
3757 | 3940 | else | ||
3758 | 3941 | if(ipart.ne.i_fks.and.ipart.ne.j_fks)then | ||
3759 | 3942 | if(xden.ne.0.d0)then | ||
3760 | 3943 | xrat=abs(1-xnum/xden) | ||
3761 | 3944 | else | ||
3762 | 3945 | xrat=abs(xnum) | ||
3763 | 3946 | endif | ||
3764 | 3947 | if(xrat.gt.tiny)then | ||
3765 | 3948 | write(*,*)'Kinematics of counterevents' | ||
3766 | 3949 | write(*,*)inum,iden | ||
3767 | 3950 | write(*,*)'is different. Particle:',ipart | ||
3768 | 3951 | stop | ||
3769 | 3952 | endif | ||
3770 | 3953 | endif | ||
3771 | 3954 | endif | ||
3772 | 3955 | enddo | ||
3773 | 3956 | enddo | ||
3774 | 3957 | do i=0,3 | ||
3775 | 3958 | xnum=p1_cnt(i,i_fks,inum)+p1_cnt(i,j_fks,inum) | ||
3776 | 3959 | xden=p1_cnt(i,i_fks,iden)+p1_cnt(i,j_fks,iden) | ||
3777 | 3960 | if(verbose)then | ||
3778 | 3961 | if(i.eq.0)then | ||
3779 | 3962 | write(iunit,*)' ' | ||
3780 | 3963 | write(iunit,*)'part=i+j' | ||
3781 | 3964 | endif | ||
3782 | 3965 | call xprintout(iunit,xnum,xden) | ||
3783 | 3966 | else | ||
3784 | 3967 | if(xden.ne.0.d0)then | ||
3785 | 3968 | xrat=abs(1-xnum/xden) | ||
3786 | 3969 | else | ||
3787 | 3970 | xrat=abs(xnum) | ||
3788 | 3971 | endif | ||
3789 | 3972 | if(xrat.gt.tiny)then | ||
3790 | 3973 | write(*,*)'Kinematics of counterevents' | ||
3791 | 3974 | write(*,*)inum,iden | ||
3792 | 3975 | write(*,*)'is different. Particle i+j' | ||
3793 | 3976 | stop | ||
3794 | 3977 | endif | ||
3795 | 3978 | endif | ||
3796 | 3979 | enddo | ||
3797 | 3980 | return | ||
3798 | 3981 | end | ||
3799 | 3982 | |||
3800 | 3983 | |||
3801 | 3984 | subroutine xprintout(iunit,xv,xlim) | 3988 | subroutine xprintout(iunit,xv,xlim) |
3802 | 3985 | implicit real*8(a-h,o-z) | 3989 | implicit real*8(a-h,o-z) |
3803 | 3986 | c | 3990 | c |
3804 | @@ -3993,70 +3997,6 @@ | |||
3805 | 3993 | end | 3997 | end |
3806 | 3994 | 3998 | ||
3807 | 3995 | 3999 | ||
3808 | 3996 | subroutine p_ev_vs_cnt(icnt,i_fks,j_fks,p,p1_cnt, | ||
3809 | 3997 | # p_i_fks_ev,p_i_fks_cnt, | ||
3810 | 3998 | # xi_i_fks_ev,y_ij_fks_ev) | ||
3811 | 3999 | implicit none | ||
3812 | 4000 | include 'genps.inc' | ||
3813 | 4001 | include 'nexternal.inc' | ||
3814 | 4002 | integer icnt,i_fks,j_fks,ipart,i | ||
3815 | 4003 | double precision p(0:3,-max_branch:max_particles) | ||
3816 | 4004 | double precision p1_cnt(0:3,nexternal,-2:2) | ||
3817 | 4005 | double precision p_i_fks_ev(0:3),p_i_fks_cnt(0:3,-2:2) | ||
3818 | 4006 | double precision xi_i_fks_ev,y_ij_fks_ev,tiny | ||
3819 | 4007 | double precision rat(0:3,nexternal+3),den(0:3,nexternal+3) | ||
3820 | 4008 | integer maxrat | ||
3821 | 4009 | c | ||
3822 | 4010 | c This routine is obsolete; the convergence checks are done elsewhere | ||
3823 | 4011 | return | ||
3824 | 4012 | |||
3825 | 4013 | do ipart=1,nexternal | ||
3826 | 4014 | do i=0,3 | ||
3827 | 4015 | den(i,ipart)=p1_cnt(i,ipart,icnt) | ||
3828 | 4016 | if(den(i,ipart).ne.0.d0)then | ||
3829 | 4017 | rat(i,ipart)=p(i,ipart)/den(i,ipart) | ||
3830 | 4018 | else | ||
3831 | 4019 | rat(i,ipart)=p(i,ipart) | ||
3832 | 4020 | endif | ||
3833 | 4021 | enddo | ||
3834 | 4022 | enddo | ||
3835 | 4023 | c | ||
3836 | 4024 | do i=0,3 | ||
3837 | 4025 | den(i,nexternal+1)=p1_cnt(i,i_fks,icnt)+p1_cnt(i,j_fks,icnt) | ||
3838 | 4026 | if(den(i,nexternal+1).ne.0.d0)then | ||
3839 | 4027 | rat(i,nexternal+1)=(p(i,i_fks)+p(i,j_fks))/den(i,nexternal+1) | ||
3840 | 4028 | else | ||
3841 | 4029 | rat(i,nexternal+1)=p(i,i_fks)+p(i,j_fks) | ||
3842 | 4030 | endif | ||
3843 | 4031 | enddo | ||
3844 | 4032 | c | ||
3845 | 4033 | if(icnt.eq.0)then | ||
3846 | 4034 | tiny=4*xi_i_fks_ev | ||
3847 | 4035 | maxrat=nexternal+3 | ||
3848 | 4036 | do i=0,3 | ||
3849 | 4037 | den(i,nexternal+2)=p_i_fks_cnt(i,0) | ||
3850 | 4038 | if(den(i,nexternal+2).ne.0.d0)then | ||
3851 | 4039 | rat(i,nexternal+2)=p_i_fks_ev(i)/den(i,nexternal+2) | ||
3852 | 4040 | else | ||
3853 | 4041 | rat(i,nexternal+2)=p_i_fks_ev(i) | ||
3854 | 4042 | endif | ||
3855 | 4043 | enddo | ||
3856 | 4044 | do i=0,3 | ||
3857 | 4045 | den(i,nexternal+3)=p_i_fks_cnt(i,0) | ||
3858 | 4046 | if(den(i,nexternal+3).ne.0.d0)then | ||
3859 | 4047 | rat(i,nexternal+3)=p(i,i_fks)/den(i,nexternal+3) | ||
3860 | 4048 | else | ||
3861 | 4049 | rat(i,nexternal+3)=p(i,i_fks) | ||
3862 | 4050 | endif | ||
3863 | 4051 | enddo | ||
3864 | 4052 | else | ||
3865 | 4053 | tiny=2*sqrt(1-y_ij_fks_ev) | ||
3866 | 4054 | maxrat=nexternal+1 | ||
3867 | 4055 | endif | ||
3868 | 4056 | c | ||
3869 | 4057 | return | ||
3870 | 4058 | end | ||
3871 | 4059 | |||
3872 | 4060 | 4000 | ||
3873 | 4061 | c The following has been derived with minor modifications from the | 4001 | c The following has been derived with minor modifications from the |
3874 | 4062 | c analogous routine written for VBF | 4002 | c analogous routine written for VBF |
3875 | @@ -4213,183 +4153,8 @@ | |||
3876 | 4213 | 4153 | ||
3877 | 4214 | 4154 | ||
3878 | 4215 | 4155 | ||
3879 | 4216 | |||
3880 | 4217 | subroutine checksij(xsijvc,xsijlvc,xsijlim, | ||
3881 | 4218 | # xsumvc,xsumlvc,xsumlim, | ||
3882 | 4219 | # check,checkl,tolerance, | ||
3883 | 4220 | # iflag,imax,iev,ki,kk,ll, | ||
3884 | 4221 | # i_fks,j_fks,ilim,iret) | ||
3885 | 4222 | c Analogous to checkres. Relevant to S functions | ||
3886 | 4223 | implicit none | ||
3887 | 4224 | real*8 xsijvc(15),xsijlvc,xsumvc(15),xsumlvc,check(15),checkl | ||
3888 | 4225 | real*8 xsijlim,xsumlim,tolerance | ||
3889 | 4226 | real*8 xsecvc(15),xseclvc | ||
3890 | 4227 | real*8 ckc(15),rckc(15),rat | ||
3891 | 4228 | logical found | ||
3892 | 4229 | integer iflag,imax,iev,ki,kk,ll,i_fks,j_fks,ilim,iret,ithrs, | ||
3893 | 4230 | # istop,iwrite,i,imin,icount,itype | ||
3894 | 4231 | parameter (ithrs=3) | ||
3895 | 4232 | parameter (istop=0) | ||
3896 | 4233 | parameter (iwrite=1) | ||
3897 | 4234 | c | ||
3898 | 4235 | if(imax.gt.15)then | ||
3899 | 4236 | write(6,*)'Error in checksij: imax is too large',imax | ||
3900 | 4237 | stop | ||
3901 | 4238 | endif | ||
3902 | 4239 | itype=1 | ||
3903 | 4240 | iret=0 | ||
3904 | 4241 | 100 continue | ||
3905 | 4242 | if(itype.eq.1)then | ||
3906 | 4243 | do i=1,imax | ||
3907 | 4244 | xsecvc(i)=xsijvc(i) | ||
3908 | 4245 | enddo | ||
3909 | 4246 | xseclvc=xsijlvc | ||
3910 | 4247 | elseif(itype.eq.2)then | ||
3911 | 4248 | do i=1,imax | ||
3912 | 4249 | xsecvc(i)=xsumvc(i) | ||
3913 | 4250 | enddo | ||
3914 | 4251 | xseclvc=xsumlvc | ||
3915 | 4252 | else | ||
3916 | 4253 | write(6,*)'Error in checksij: itype=',itype | ||
3917 | 4254 | stop | ||
3918 | 4255 | endif | ||
3919 | 4256 | do i=1,imax | ||
3920 | 4257 | if(xseclvc.eq.0.d0)then | ||
3921 | 4258 | ckc(i)=abs(xsecvc(i)) | ||
3922 | 4259 | else | ||
3923 | 4260 | ckc(i)=abs(xsecvc(i)/xseclvc-1.d0) | ||
3924 | 4261 | endif | ||
3925 | 4262 | enddo | ||
3926 | 4263 | if(iflag.eq.0)then | ||
3927 | 4264 | rat=8.d0 | ||
3928 | 4265 | elseif(iflag.eq.1)then | ||
3929 | 4266 | rat=2.d0 | ||
3930 | 4267 | else | ||
3931 | 4268 | write(6,*)'Error in checksij: iflag=',iflag | ||
3932 | 4269 | write(6,*)' Must be 0 for soft, 1 for collinear' | ||
3933 | 4270 | stop | ||
3934 | 4271 | endif | ||
3935 | 4272 | c | ||
3936 | 4273 | i=1 | ||
3937 | 4274 | dowhile(ckc(i).gt.0.1d0) | ||
3938 | 4275 | i=i+1 | ||
3939 | 4276 | enddo | ||
3940 | 4277 | imin=i | ||
3941 | 4278 | do i=imin,imax-1 | ||
3942 | 4279 | if(ckc(i+1).gt.1.d-8)then | ||
3943 | 4280 | c If this condition is replaced by .eq.0, the test will fail if the series | ||
3944 | 4281 | c is made of elements all equal to the limit | ||
3945 | 4282 | rckc(i)=ckc(i)/ckc(i+1) | ||
3946 | 4283 | else | ||
3947 | 4284 | c Element #i+1 of series equal to the limit, so it must pass the test | ||
3948 | 4285 | rckc(i)=rat*1.1d0 | ||
3949 | 4286 | endif | ||
3950 | 4287 | enddo | ||
3951 | 4288 | icount=0 | ||
3952 | 4289 | i=imin | ||
3953 | 4290 | dowhile(icount.lt.ithrs.and.i.lt.imax) | ||
3954 | 4291 | if(rckc(i).gt.rat)then | ||
3955 | 4292 | icount=icount+1 | ||
3956 | 4293 | else | ||
3957 | 4294 | icount=0 | ||
3958 | 4295 | endif | ||
3959 | 4296 | i=i+1 | ||
3960 | 4297 | enddo | ||
3961 | 4298 | c | ||
3962 | 4299 | if(icount.ne.ithrs)then | ||
3963 | 4300 | iret=iret+itype | ||
3964 | 4301 | if(istop.eq.1)then | ||
3965 | 4302 | write(6,*)'Test failed',iflag | ||
3966 | 4303 | write(6,*)'Event #',iev | ||
3967 | 4304 | stop | ||
3968 | 4305 | endif | ||
3969 | 4306 | endif | ||
3970 | 4307 | if(itype.eq.1.and.ki.eq.1.and.iflag.eq.0)then | ||
3971 | 4308 | itype=2 | ||
3972 | 4309 | goto 100 | ||
3973 | 4310 | endif | ||
3974 | 4311 | c | ||
3975 | 4312 | if(ki.eq.1.and.ilim.eq.1)then | ||
3976 | 4313 | found=.false. | ||
3977 | 4314 | i=0 | ||
3978 | 4315 | do while ((.not.found).and.i.lt.imax) | ||
3979 | 4316 | i=i+1 | ||
3980 | 4317 | if(abs(check(i)-1.d0).gt.tolerance)then | ||
3981 | 4318 | found=.true. | ||
3982 | 4319 | itype=4 | ||
3983 | 4320 | endif | ||
3984 | 4321 | enddo | ||
3985 | 4322 | if(.not.found)then | ||
3986 | 4323 | if(abs(checkl-1.d0).gt.tolerance)itype=4 | ||
3987 | 4324 | endif | ||
3988 | 4325 | if(itype.eq.4)iret=iret+itype | ||
3989 | 4326 | endif | ||
3990 | 4327 | c | ||
3991 | 4328 | if( iwrite.eq.1 .and. | ||
3992 | 4329 | # iret.eq.1 .or.(iret.gt.1.and.ki.eq.1) )then | ||
3993 | 4330 | if(iret.gt.7)then | ||
3994 | 4331 | write(6,*)'Error in checksij: iret=',iret | ||
3995 | 4332 | stop | ||
3996 | 4333 | endif | ||
3997 | 4334 | write(77,*)' ' | ||
3998 | 4335 | if(iflag.eq.0)then | ||
3999 | 4336 | write(77,*)'Soft #',iev | ||
4000 | 4337 | elseif(iflag.eq.1)then | ||
4001 | 4338 | write(77,*)'Collinear #',iev | ||
4002 | 4339 | endif | ||
4003 | 4340 | write(77,*)'iret:',iret | ||
4004 | 4341 | write(77,*)'i_fks,j_fks:',i_fks,j_fks | ||
4005 | 4342 | if(iret.eq.1.or.iret.eq.3.or.iret.eq.5.or.iret.eq.7)then | ||
4006 | 4343 | write(77,*)'S_kl' | ||
4007 | 4344 | write(77,*)'k,kk,ll',ki,kk,ll | ||
4008 | 4345 | do i=1,imax | ||
4009 | 4346 | call xprintout(77,xsijvc(i),xsijlvc) | ||
4010 | 4347 | enddo | ||
4011 | 4348 | endif | ||
4012 | 4349 | if(iret.eq.2.or.iret.eq.3.or.iret.eq.6.or.iret.eq.7)then | ||
4013 | 4350 | write(77,*)'sum of S' | ||
4014 | 4351 | do i=1,imax | ||
4015 | 4352 | call xprintout(77,xsumvc(i),xsumlvc) | ||
4016 | 4353 | enddo | ||
4017 | 4354 | endif | ||
4018 | 4355 | if(iret.eq.4.or.iret.eq.5.or.iret.eq.6.or.iret.eq.7)then | ||
4019 | 4356 | write(77,*)'check to one' | ||
4020 | 4357 | do i=1,imax | ||
4021 | 4358 | call xprintout(77,check(i),checkl) | ||
4022 | 4359 | enddo | ||
4023 | 4360 | endif | ||
4024 | 4361 | endif | ||
4025 | 4362 | c | ||
4026 | 4363 | if(ilim.eq.1)then | ||
4027 | 4364 | if( abs(xsijlvc-xsijlim).gt.1.d-6 .and. | ||
4028 | 4365 | # xsijlim.ne.-1.d0 )iret=iret+10 | ||
4029 | 4366 | if( abs(xsumlvc-xsumlim).gt.1.d-6 .and. | ||
4030 | 4367 | # xsumlim.ne.-1.d0 .and. iflag.eq.0)iret=iret+20 | ||
4031 | 4368 | if(iwrite.eq.1.and.iret.ge.10)then | ||
4032 | 4369 | write(77,*)' ' | ||
4033 | 4370 | if(iflag.eq.0)then | ||
4034 | 4371 | write(77,*)'Soft #',iev | ||
4035 | 4372 | elseif(iflag.eq.1)then | ||
4036 | 4373 | write(77,*)'Collinear #',iev | ||
4037 | 4374 | endif | ||
4038 | 4375 | write(77,*)'iret:',iret | ||
4039 | 4376 | write(77,*)'i_fks,j_fks:',i_fks,j_fks | ||
4040 | 4377 | if((iret.ge.10.and.iret.lt.20).or.iret.ge.30)then | ||
4041 | 4378 | write(77,*)'limit of S_kl' | ||
4042 | 4379 | write(77,*)'k,kk,ll',ki,kk,ll | ||
4043 | 4380 | write(77,*)xsijlvc,xsijlim | ||
4044 | 4381 | endif | ||
4045 | 4382 | if(iret.ge.20)then | ||
4046 | 4383 | write(77,*)'limit of sum_j S_ij' | ||
4047 | 4384 | write(77,*)xsumlvc,xsumlim | ||
4048 | 4385 | endif | ||
4049 | 4386 | endif | ||
4050 | 4387 | endif | ||
4051 | 4388 | return | ||
4052 | 4389 | end | ||
4053 | 4390 | |||
4054 | 4391 | |||
4055 | 4392 | subroutine bornsoftvirtual(p,bsv_wgt,virt_wgt,born_wgt) | 4156 | subroutine bornsoftvirtual(p,bsv_wgt,virt_wgt,born_wgt) |
4056 | 4157 | use extra_weights | ||
4057 | 4393 | implicit none | 4158 | implicit none |
4058 | 4394 | include "genps.inc" | 4159 | include "genps.inc" |
4059 | 4395 | include 'nexternal.inc' | 4160 | include 'nexternal.inc' |
4060 | @@ -4401,7 +4166,6 @@ | |||
4061 | 4401 | common /c_fks_inc/fks_j_from_i,particle_type,pdg_type | 4166 | common /c_fks_inc/fks_j_from_i,particle_type,pdg_type |
4062 | 4402 | include "run.inc" | 4167 | include "run.inc" |
4063 | 4403 | include "fks_powers.inc" | 4168 | include "fks_powers.inc" |
4064 | 4404 | include 'reweight.inc' | ||
4065 | 4405 | include "mint.inc" | 4169 | include "mint.inc" |
4066 | 4406 | double precision p(0:3,nexternal),bsv_wgt,born_wgt,avv_wgt | 4170 | double precision p(0:3,nexternal),bsv_wgt,born_wgt,avv_wgt |
4067 | 4407 | double precision pp(0:3,nexternal) | 4171 | double precision pp(0:3,nexternal) |
4068 | @@ -4755,10 +4519,6 @@ | |||
4069 | 4755 | double precision bpower,born_wgt | 4519 | double precision bpower,born_wgt |
4070 | 4756 | double complex wgt1(2) | 4520 | double complex wgt1(2) |
4071 | 4757 | 4521 | ||
4072 | 4758 | integer isum_hel | ||
4073 | 4759 | logical multi_channel | ||
4074 | 4760 | common/to_matrix/isum_hel, multi_channel | ||
4075 | 4761 | integer isum_hel_orig | ||
4076 | 4762 | integer i_fks,j_fks | 4522 | integer i_fks,j_fks |
4077 | 4763 | common/fks_indices/i_fks,j_fks | 4523 | common/fks_indices/i_fks,j_fks |
4078 | 4764 | 4524 | ||
4079 | @@ -4767,13 +4527,6 @@ | |||
4080 | 4767 | 4527 | ||
4081 | 4768 | double precision tiny | 4528 | double precision tiny |
4082 | 4769 | parameter (tiny=1d-6) | 4529 | parameter (tiny=1d-6) |
4083 | 4770 | |||
4084 | 4771 | c Make sure that we sum over helicities (such that we do get a | ||
4085 | 4772 | c non-zero Born) | ||
4086 | 4773 | isum_hel_orig = isum_hel | ||
4087 | 4774 | isum_hel=0 | ||
4088 | 4775 | call get_helicity(i_fks,j_fks) | ||
4089 | 4776 | |||
4090 | 4777 | calculatedBorn=.false. | 4530 | calculatedBorn=.false. |
4091 | 4778 | call sborn(p_born,wgt1) | 4531 | call sborn(p_born,wgt1) |
4092 | 4779 | c Born contribution: | 4532 | c Born contribution: |
4093 | @@ -4815,7 +4568,6 @@ | |||
4094 | 4815 | c nothing funny happens later on | 4568 | c nothing funny happens later on |
4095 | 4816 | g=g/10d0 | 4569 | g=g/10d0 |
4096 | 4817 | call update_as_param() | 4570 | call update_as_param() |
4097 | 4818 | isum_hel=isum_hel_orig | ||
4098 | 4819 | calculatedBorn=.false. | 4571 | calculatedBorn=.false. |
4099 | 4820 | call sborn(p_born,wgt1) | 4572 | call sborn(p_born,wgt1) |
4100 | 4821 | 4573 | ||
4101 | @@ -4825,25 +4577,21 @@ | |||
4102 | 4825 | c This function computes the power of a muR-dependent factor which | 4577 | c This function computes the power of a muR-dependent factor which |
4103 | 4826 | c is stored in cpower. You need to modify it when you try to | 4578 | c is stored in cpower. You need to modify it when you try to |
4104 | 4827 | c reweight your cross section with a muR-dependent factor | 4579 | c reweight your cross section with a muR-dependent factor |
4106 | 4828 | c (runfac=1 in reweight0.inc) | 4580 | c (runfac=1 in extra_weights.f) |
4107 | 4829 | c Note: The implementation below only works for the Bottom Yukawa in | 4581 | c Note: The implementation below only works for the Bottom Yukawa in |
4108 | 4830 | c the SM where "GC_33" contains the Yukawa, for other models | 4582 | c the SM where "GC_33" contains the Yukawa, for other models |
4109 | 4831 | c or general muR-dependent factors you need to change GC_33 | 4583 | c or general muR-dependent factors you need to change GC_33 |
4110 | 4832 | c to the corresponding coupling. | 4584 | c to the corresponding coupling. |
4111 | 4833 | subroutine compute_cpower(p_born,cpower) | 4585 | subroutine compute_cpower(p_born,cpower) |
4112 | 4586 | use extra_weights | ||
4113 | 4834 | implicit none | 4587 | implicit none |
4114 | 4835 | include "nexternal.inc" | 4588 | include "nexternal.inc" |
4115 | 4836 | include "coupl.inc" | 4589 | include "coupl.inc" |
4116 | 4837 | include 'reweight.inc' | ||
4117 | 4838 | 4590 | ||
4118 | 4839 | double precision p_born(0:3,nexternal-1) | 4591 | double precision p_born(0:3,nexternal-1) |
4119 | 4840 | double precision cpower,born_wgt | 4592 | double precision cpower,born_wgt |
4120 | 4841 | double complex wgt1(2) | 4593 | double complex wgt1(2) |
4121 | 4842 | 4594 | ||
4122 | 4843 | integer isum_hel | ||
4123 | 4844 | logical multi_channel | ||
4124 | 4845 | common/to_matrix/isum_hel, multi_channel | ||
4125 | 4846 | integer isum_hel_orig | ||
4126 | 4847 | integer i_fks,j_fks | 4595 | integer i_fks,j_fks |
4127 | 4848 | common/fks_indices/i_fks,j_fks | 4596 | common/fks_indices/i_fks,j_fks |
4128 | 4849 | 4597 | ||
4129 | @@ -4859,12 +4607,6 @@ | |||
4130 | 4859 | 4607 | ||
4131 | 4860 | c The following is relevant for a muR-dependent bottom-mass in Yukawa. | 4608 | c The following is relevant for a muR-dependent bottom-mass in Yukawa. |
4132 | 4861 | c$$$ | 4609 | c$$$ |
4133 | 4862 | c$$$c Make sure that we sum over helicities (such that we do get a | ||
4134 | 4863 | c$$$c non-zero Born) | ||
4135 | 4864 | c$$$ isum_hel_orig = isum_hel | ||
4136 | 4865 | c$$$ isum_hel=0 | ||
4137 | 4866 | c$$$ call get_helicity(i_fks,j_fks) | ||
4138 | 4867 | c$$$ | ||
4139 | 4868 | c$$$ calculatedBorn=.false. | 4610 | c$$$ calculatedBorn=.false. |
4140 | 4869 | c$$$ call sborn(p_born,wgt1) | 4611 | c$$$ call sborn(p_born,wgt1) |
4141 | 4870 | c$$$c Born contribution: | 4612 | c$$$c Born contribution: |
4142 | @@ -4900,7 +4642,7 @@ | |||
4143 | 4900 | c$$$ cpower=dble(nint(cpower)) | 4642 | c$$$ cpower=dble(nint(cpower)) |
4144 | 4901 | c$$$ write(*,*)'cpower is', cpower | 4643 | c$$$ write(*,*)'cpower is', cpower |
4145 | 4902 | c$$$c Check consistency with value used in reweighting | 4644 | c$$$c Check consistency with value used in reweighting |
4147 | 4903 | c$$$c$$$ if( (doreweight.or.doNLOreweight) .and. | 4645 | c$$$c$$$ if( doreweight .and. |
4148 | 4904 | c$$$c$$$ & abs(cpower-wgtcpower).gt.tiny )then | 4646 | c$$$c$$$ & abs(cpower-wgtcpower).gt.tiny )then |
4149 | 4905 | c$$$c$$$ write(*,*)'Error in compute_cpower' | 4647 | c$$$c$$$ write(*,*)'Error in compute_cpower' |
4150 | 4906 | c$$$c$$$ write(*,*)'cpower(s) are:',cpower,wgtcpower | 4648 | c$$$c$$$ write(*,*)'cpower(s) are:',cpower,wgtcpower |
4151 | @@ -4911,7 +4653,6 @@ | |||
4152 | 4911 | c$$$c Change couplings back and recompute the Born to make sure that | 4653 | c$$$c Change couplings back and recompute the Born to make sure that |
4153 | 4912 | c$$$c nothing funny happens later on | 4654 | c$$$c nothing funny happens later on |
4154 | 4913 | c$$$ GC_33 = GC_33 / 10d0 | 4655 | c$$$ GC_33 = GC_33 / 10d0 |
4155 | 4914 | c$$$ isum_hel=isum_hel_orig | ||
4156 | 4915 | c$$$ calculatedBorn=.false. | 4656 | c$$$ calculatedBorn=.false. |
4157 | 4916 | c$$$ call sborn(p_born,wgt1) | 4657 | c$$$ call sborn(p_born,wgt1) |
4158 | 4917 | c$$$ | 4658 | c$$$ |
4159 | @@ -5348,73 +5089,9 @@ | |||
4160 | 5348 | end | 5089 | end |
4161 | 5349 | 5090 | ||
4162 | 5350 | 5091 | ||
4163 | 5351 | function m1l_finite_CDR(p,born) | ||
4164 | 5352 | c Returns the finite part of virtual contribution, according to the | ||
4165 | 5353 | c definitions given in (B.1) and (B.2). This function must include | ||
4166 | 5354 | c the factor as/(2*pi) | ||
4167 | 5355 | implicit none | ||
4168 | 5356 | include "genps.inc" | ||
4169 | 5357 | include 'nexternal.inc' | ||
4170 | 5358 | c include "fks.inc" | ||
4171 | 5359 | integer fks_j_from_i(nexternal,0:nexternal) | ||
4172 | 5360 | & ,particle_type(nexternal),pdg_type(nexternal) | ||
4173 | 5361 | common /c_fks_inc/fks_j_from_i,particle_type,pdg_type | ||
4174 | 5362 | include 'coupl.inc' | ||
4175 | 5363 | include 'q_es.inc' | ||
4176 | 5364 | double precision p(0:3,nexternal-1),m1l_finite_CDR,born | ||
4177 | 5365 | double precision CF,pi,aso2pi,shat,dot,xlgq2os | ||
4178 | 5366 | parameter (CF=4d0/3d0) | ||
4179 | 5367 | parameter (pi=3.1415926535897932385d0) | ||
4180 | 5368 | c | ||
4181 | 5369 | aso2pi=g**2/(8*pi**2) | ||
4182 | 5370 | c This is relevant to e+e- --> qqbar | ||
4183 | 5371 | shat=2d0*dot(p(0,1),p(0,2)) | ||
4184 | 5372 | xlgq2os=log(QES2/shat) | ||
4185 | 5373 | m1l_finite_CDR=-aso2pi*CF*(xlgq2os**2+3*xlgq2os-pi**2+8.d0)*born | ||
4186 | 5374 | return | ||
4187 | 5375 | end | ||
4188 | 5376 | |||
4189 | 5377 | |||
4190 | 5378 | function m1l_W_finite_CDR(p,born) | ||
4191 | 5379 | c Returns the finite part of virtual contribution, according to the | ||
4192 | 5380 | c definitions given in (B.1) and (B.2). This function must include | ||
4193 | 5381 | c the factor as/(2*pi) | ||
4194 | 5382 | implicit none | ||
4195 | 5383 | include "genps.inc" | ||
4196 | 5384 | include 'nexternal.inc' | ||
4197 | 5385 | c include "fks.inc" | ||
4198 | 5386 | integer fks_j_from_i(nexternal,0:nexternal) | ||
4199 | 5387 | & ,particle_type(nexternal),pdg_type(nexternal) | ||
4200 | 5388 | common /c_fks_inc/fks_j_from_i,particle_type,pdg_type | ||
4201 | 5389 | include 'coupl.inc' | ||
4202 | 5390 | include 'q_es.inc' | ||
4203 | 5391 | double precision p(0:3,nexternal-1),m1l_W_finite_CDR,born | ||
4204 | 5392 | double precision CF,pi,aso2pi,shat,dot,xlgq2os | ||
4205 | 5393 | parameter (CF=4d0/3d0) | ||
4206 | 5394 | parameter (pi=3.1415926535897932385d0) | ||
4207 | 5395 | c | ||
4208 | 5396 | aso2pi=g**2/(8*pi**2) | ||
4209 | 5397 | shat=2d0*dot(p(0,1),p(0,2)) | ||
4210 | 5398 | xlgq2os=log(QES2/shat) | ||
4211 | 5399 | |||
4212 | 5400 | c This is relevant to qqbar -> W | ||
4213 | 5401 | m1l_W_finite_CDR=aso2pi*CF*(-xlgq2os**2-3d0*xlgq2os+pi**2-8d0) | ||
4214 | 5402 | m1l_W_finite_CDR=m1l_W_finite_CDR*born | ||
4215 | 5403 | |||
4216 | 5404 | c This is relevant to gg -> H | ||
4217 | 5405 | c$$$ m1l_W_finite_CDR=aso2pi*(-3d0*xlgq2os**2+11d0+3d0*pi**2) | ||
4218 | 5406 | c$$$ m1l_W_finite_CDR=m1l_W_finite_CDR*born | ||
4219 | 5407 | |||
4220 | 5408 | c This is relevant to bbbar -> H | ||
4221 | 5409 | c$$$ m1l_W_finite_CDR=aso2pi | ||
4222 | 5410 | c$$$ f * (-4d0/3d0*xlgq2os**2 | ||
4223 | 5411 | c$$$ f -8d0/3d0+(16d0/3d0+8d0/3d0)*pi**2/6d0) | ||
4224 | 5412 | c$$$ m1l_W_finite_CDR=m1l_W_finite_CDR*born | ||
4225 | 5413 | return | ||
4226 | 5414 | end | ||
4227 | 5415 | |||
4228 | 5416 | |||
4229 | 5417 | subroutine setfksfactor(match_to_shower) | 5092 | subroutine setfksfactor(match_to_shower) |
4230 | 5093 | use weight_lines | ||
4231 | 5094 | use extra_weights | ||
4232 | 5418 | implicit none | 5095 | implicit none |
4233 | 5419 | 5096 | ||
4234 | 5420 | include 'mint.inc' | 5097 | include 'mint.inc' |
4235 | @@ -5449,11 +5126,9 @@ | |||
4236 | 5449 | include 'nexternal.inc' | 5126 | include 'nexternal.inc' |
4237 | 5450 | include 'fks_powers.inc' | 5127 | include 'fks_powers.inc' |
4238 | 5451 | include 'nFKSconfigs.inc' | 5128 | include 'nFKSconfigs.inc' |
4239 | 5452 | include 'c_weight.inc' | ||
4240 | 5453 | integer fks_j_from_i(nexternal,0:nexternal) | 5129 | integer fks_j_from_i(nexternal,0:nexternal) |
4241 | 5454 | & ,particle_type(nexternal),pdg_type(nexternal) | 5130 | & ,particle_type(nexternal),pdg_type(nexternal) |
4242 | 5455 | common /c_fks_inc/fks_j_from_i,particle_type,pdg_type | 5131 | common /c_fks_inc/fks_j_from_i,particle_type,pdg_type |
4243 | 5456 | include 'reweight0.inc' | ||
4244 | 5457 | include 'run.inc' | 5132 | include 'run.inc' |
4245 | 5458 | INTEGER NFKSPROCESS | 5133 | INTEGER NFKSPROCESS |
4246 | 5459 | COMMON/C_NFKSPROCESS/NFKSPROCESS | 5134 | COMMON/C_NFKSPROCESS/NFKSPROCESS |
4247 | @@ -5473,8 +5148,6 @@ | |||
4248 | 5473 | common /cdelta_used/delta_used | 5148 | common /cdelta_used/delta_used |
4249 | 5474 | double precision xiScut_used,xiBSVcut_used | 5149 | double precision xiScut_used,xiBSVcut_used |
4250 | 5475 | common /cxiScut_used/xiScut_used,xiBSVcut_used | 5150 | common /cxiScut_used/xiScut_used,xiBSVcut_used |
4251 | 5476 | logical rotategranny | ||
4252 | 5477 | common/crotategranny/rotategranny | ||
4253 | 5478 | double precision diagramsymmetryfactor_save(maxchannels) | 5151 | double precision diagramsymmetryfactor_save(maxchannels) |
4254 | 5479 | save diagramsymmetryfactor_save | 5152 | save diagramsymmetryfactor_save |
4255 | 5480 | double precision diagramsymmetryfactor | 5153 | double precision diagramsymmetryfactor |
4256 | @@ -5511,10 +5184,6 @@ | |||
4257 | 5511 | integer i_type,j_type,m_type | 5184 | integer i_type,j_type,m_type |
4258 | 5512 | common/cparticle_types/i_type,j_type,m_type | 5185 | common/cparticle_types/i_type,j_type,m_type |
4259 | 5513 | 5186 | ||
4260 | 5514 | c The value of rotategranny may be superseded later if phase space | ||
4261 | 5515 | c parametrization allows it | ||
4262 | 5516 | rotategranny=.false. | ||
4263 | 5517 | |||
4264 | 5518 | softtest=.false. | 5187 | softtest=.false. |
4265 | 5519 | colltest=.false. | 5188 | colltest=.false. |
4266 | 5520 | fold=0 | 5189 | fold=0 |
4267 | @@ -5691,6 +5360,8 @@ | |||
4268 | 5691 | c Compute the identical particle symmetry factor that is in the | 5360 | c Compute the identical particle symmetry factor that is in the |
4269 | 5692 | c Born matrix elements. | 5361 | c Born matrix elements. |
4270 | 5693 | iden_born_FKS(nFKSprocess)=1 | 5362 | iden_born_FKS(nFKSprocess)=1 |
4271 | 5363 | call weight_lines_allocated(nexternal,max_contr,max_wgt | ||
4272 | 5364 | $ ,max_iproc) | ||
4273 | 5694 | call set_pdg(0,nFKSprocess) | 5365 | call set_pdg(0,nFKSprocess) |
4274 | 5695 | do i=1,nexternal | 5366 | do i=1,nexternal |
4275 | 5696 | iden(i)=1 | 5367 | iden(i)=1 |
4276 | @@ -5800,349 +5471,12 @@ | |||
4277 | 5800 | end | 5471 | end |
4278 | 5801 | 5472 | ||
4279 | 5802 | 5473 | ||
4280 | 5803 | subroutine get_helicity(i_fks,j_fks) | ||
4281 | 5804 | implicit none | ||
4282 | 5805 | include "nexternal.inc" | ||
4283 | 5806 | include "born_nhel.inc" | ||
4284 | 5807 | include "madfks_mcatnlo.inc" | ||
4285 | 5808 | integer NHEL(nexternal,max_bhel*2),IHEL | ||
4286 | 5809 | chel include "helicities.inc" | ||
4287 | 5810 | include 'nFKSconfigs.inc' | ||
4288 | 5811 | double precision hel_fac | ||
4289 | 5812 | integer get_hel,skip(fks_configs) | ||
4290 | 5813 | common/cBorn/hel_fac,get_hel,skip | ||
4291 | 5814 | logical calculatedBorn | ||
4292 | 5815 | common/ccalculatedBorn/calculatedBorn | ||
4293 | 5816 | integer hel_wgt,hel_wgt_born,hel_wgt_real | ||
4294 | 5817 | integer nhelreal(nexternal,4),goodhelreal(4) | ||
4295 | 5818 | integer nhelrealall(nexternal,max_bhel*2) | ||
4296 | 5819 | common /c_nhelreal/ nhelreal,nhelrealall,goodhelreal,hel_wgt_real | ||
4297 | 5820 | integer nhelborn(nexternal-1,2),goodhelborn(2) | ||
4298 | 5821 | integer nhelbornall(nexternal-1,max_bhel) | ||
4299 | 5822 | common /c_nhelborn/ nhelborn,nhelbornall,goodhelborn,hel_wgt_born | ||
4300 | 5823 | |||
4301 | 5824 | integer isum_hel | ||
4302 | 5825 | logical multi_channel | ||
4303 | 5826 | common/to_matrix/isum_hel, multi_channel | ||
4304 | 5827 | |||
4305 | 5828 | integer i,nexthel,j,i_fks,j_fks,ngood,k | ||
4306 | 5829 | data nexthel /0/ | ||
4307 | 5830 | data ngood /0/ | ||
4308 | 5831 | logical done,firsttime,all_set,chckr | ||
4309 | 5832 | data firsttime/.true./ | ||
4310 | 5833 | integer goodhelr(0:4,max_bhel/2),goodhelb(0:2,max_bhel/2) | ||
4311 | 5834 | save goodhelr,goodhelb,all_set,chckr | ||
4312 | 5835 | double precision rnd,ran2 | ||
4313 | 5836 | external ran2 | ||
4314 | 5837 | |||
4315 | 5838 | character*4 abrv | ||
4316 | 5839 | common /to_abrv/ abrv | ||
4317 | 5840 | logical Hevents | ||
4318 | 5841 | common/SHevents/Hevents | ||
4319 | 5842 | logical usexinteg,mint | ||
4320 | 5843 | common/cusexinteg/usexinteg,mint | ||
4321 | 5844 | |||
4322 | 5845 | c Do not change these two lines, because ./bin/compile_madfks.sh might | ||
4323 | 5846 | c need to change them automatically | ||
4324 | 5847 | logical HelSum | ||
4325 | 5848 | parameter (HelSum=.true.) | ||
4326 | 5849 | |||
4327 | 5850 | c************ | ||
4328 | 5851 | c goodhelr=2, real emission matrix element not yet calculated | ||
4329 | 5852 | c for this helicity | ||
4330 | 5853 | c goodhelr=1, real emission matrix element calculated and non-zero | ||
4331 | 5854 | c goodhelr=0, real emission matrix element calculated and zero, | ||
4332 | 5855 | c so can be skipped next time. | ||
4333 | 5856 | c************ | ||
4334 | 5857 | if (HelSum) return | ||
4335 | 5858 | |||
4336 | 5859 | if (isum_hel.ne.0) then ! MC over helicities | ||
4337 | 5860 | c First, set the goodhelr and goodhelb to their starting values | ||
4338 | 5861 | if (firsttime) then | ||
4339 | 5862 | if ((mint .and. (.not.Hevents) .and. (abrv(1:2).eq.'vi' .or. | ||
4340 | 5863 | & abrv.eq.'born' .or. abrv.eq.'grid' .or. | ||
4341 | 5864 | & (.not.UseSudakov))) .or. (.not.mint .and. (abrv.eq.'born' | ||
4342 | 5865 | & .or. abrv.eq.'grid' .or. abrv(1:2).eq.'vi'))) then | ||
4343 | 5866 | c if computing only the Born diagrams, should not | ||
4344 | 5867 | c consider real emission helicities | ||
4345 | 5868 | chckr=.false. | ||
4346 | 5869 | else | ||
4347 | 5870 | chckr=.true. | ||
4348 | 5871 | endif | ||
4349 | 5872 | do i=1,fks_configs | ||
4350 | 5873 | skip(i)=1 | ||
4351 | 5874 | enddo | ||
4352 | 5875 | c read from file if possible | ||
4353 | 5876 | open(unit=65,file='goodhel.dat',status='old',err=532) | ||
4354 | 5877 | all_set=.true. | ||
4355 | 5878 | do j=0,4 | ||
4356 | 5879 | read (65,*,err=532) (goodhelr(j,i),i=1,max_bhel/2) | ||
4357 | 5880 | enddo | ||
4358 | 5881 | do j=0,2 | ||
4359 | 5882 | read (65,*,err=532) (goodhelb(j,i),i=1,max_bhel/2) | ||
4360 | 5883 | enddo | ||
4361 | 5884 | read(65,*,err=532) hel_wgt | ||
4362 | 5885 | hel_wgt_born=hel_wgt | ||
4363 | 5886 | hel_wgt_real=hel_wgt | ||
4364 | 5887 | do i=1,max_bhel/2 | ||
4365 | 5888 | if ((chckr .and. | ||
4366 | 5889 | & (goodhelb(0,i).eq.2 .or. goodhelr(0,i).eq.2)) .or. | ||
4367 | 5890 | & (.not.chckr.and.goodhelb(0,i).eq.2)) all_set=.false. | ||
4368 | 5891 | enddo | ||
4369 | 5892 | close(65) | ||
4370 | 5893 | goto 533 | ||
4371 | 5894 | c if file does not exist or has wrong format, set all to 2 | ||
4372 | 5895 | 532 close(65) | ||
4373 | 5896 | write (*,*) 'Good helicities not found in file' | ||
4374 | 5897 | all_set=.false. | ||
4375 | 5898 | do j=0,4 | ||
4376 | 5899 | do i=1,max_bhel/2 | ||
4377 | 5900 | goodhelr(j,i)=2 | ||
4378 | 5901 | enddo | ||
4379 | 5902 | enddo | ||
4380 | 5903 | do j=0,2 | ||
4381 | 5904 | do i=1,max_bhel/2 | ||
4382 | 5905 | goodhelb(j,i)=2 | ||
4383 | 5906 | enddo | ||
4384 | 5907 | enddo | ||
4385 | 5908 | hel_wgt=max_bhel/2 | ||
4386 | 5909 | hel_wgt_born=hel_wgt | ||
4387 | 5910 | hel_wgt_real=hel_wgt | ||
4388 | 5911 | 533 continue | ||
4389 | 5912 | firsttime=.false. | ||
4390 | 5913 | goto 534 ! no previous event, so skip to the next helicity | ||
4391 | 5914 | endif | ||
4392 | 5915 | |||
4393 | 5916 | c From previous event, check if there is an update | ||
4394 | 5917 | if (.not.all_set) then | ||
4395 | 5918 | c real emission | ||
4396 | 5919 | if(goodhelr(0,ngood).eq.2) then | ||
4397 | 5920 | if ( goodhelreal(1).eq.0 .and. | ||
4398 | 5921 | & goodhelreal(2).eq.0 .and. | ||
4399 | 5922 | & goodhelreal(3).eq.0 .and. | ||
4400 | 5923 | & goodhelreal(4).eq.0 ) then | ||
4401 | 5924 | do j=0,4 | ||
4402 | 5925 | goodhelr(j,ngood)=0 | ||
4403 | 5926 | enddo | ||
4404 | 5927 | elseif( goodhelreal(1).le.1 .and. | ||
4405 | 5928 | & goodhelreal(2).le.1 .and. | ||
4406 | 5929 | & goodhelreal(3).le.1 .and. | ||
4407 | 5930 | & goodhelreal(4).le.1 ) then | ||
4408 | 5931 | goodhelr(0,ngood)=1 | ||
4409 | 5932 | do j=1,4 | ||
4410 | 5933 | goodhelr(j,ngood)=goodhelreal(j) | ||
4411 | 5934 | enddo | ||
4412 | 5935 | elseif (.not.(goodhelreal(1).eq.2 .and. | ||
4413 | 5936 | & goodhelreal(2).eq.2 .and. | ||
4414 | 5937 | & goodhelreal(2).eq.2 .and. | ||
4415 | 5938 | & goodhelreal(2).eq.2) ) then | ||
4416 | 5939 | write (*,*) 'Error #2 in get_helicities', | ||
4417 | 5940 | & ngood,(goodhelr(j,ngood),j=0,4) | ||
4418 | 5941 | stop | ||
4419 | 5942 | endif | ||
4420 | 5943 | endif | ||
4421 | 5944 | c Born and counter events | ||
4422 | 5945 | if(goodhelb(0,ngood).eq.2) then | ||
4423 | 5946 | if ( goodhelborn(1).eq.0 .and. | ||
4424 | 5947 | & goodhelborn(2).eq.0 ) then | ||
4425 | 5948 | do j=0,2 | ||
4426 | 5949 | goodhelb(j,ngood)=0 | ||
4427 | 5950 | enddo | ||
4428 | 5951 | elseif( goodhelborn(1).le.1 .and. | ||
4429 | 5952 | & goodhelborn(2).le.1 ) then | ||
4430 | 5953 | goodhelb(0,ngood)=1 | ||
4431 | 5954 | do j=1,2 | ||
4432 | 5955 | goodhelb(j,ngood)=goodhelborn(j) | ||
4433 | 5956 | enddo | ||
4434 | 5957 | elseif (.not.(goodhelborn(1).eq.2 .and. | ||
4435 | 5958 | & goodhelborn(2).eq.2) ) then | ||
4436 | 5959 | write (*,*) 'Error #3 in get_helicities', | ||
4437 | 5960 | & nexthel,(goodhelb(j,ngood),j=0,2) | ||
4438 | 5961 | stop | ||
4439 | 5962 | endif | ||
4440 | 5963 | endif | ||
4441 | 5964 | |||
4442 | 5965 | c Calculate new hel_wgt | ||
4443 | 5966 | hel_wgt=0 | ||
4444 | 5967 | do i=1,max_bhel/2 | ||
4445 | 5968 | if((chckr .and. | ||
4446 | 5969 | & (goodhelb(0,i).ge.1.or.goodhelr(0,i).ge.1)) .or. | ||
4447 | 5970 | & (.not.chckr .and. goodhelb(0,i).ge.1)) then | ||
4448 | 5971 | hel_wgt=hel_wgt+1 | ||
4449 | 5972 | endif | ||
4450 | 5973 | enddo | ||
4451 | 5974 | hel_wgt_born=hel_wgt | ||
4452 | 5975 | hel_wgt_real=hel_wgt | ||
4453 | 5976 | |||
4454 | 5977 | c check if all have been set, if so -> write to file | ||
4455 | 5978 | all_set=.true. | ||
4456 | 5979 | do i=1,max_bhel/2 | ||
4457 | 5980 | if ((chckr .and. | ||
4458 | 5981 | & (goodhelb(0,i).eq.2 .or. goodhelr(0,i).eq.2)) .or. | ||
4459 | 5982 | & (.not.chckr.and.goodhelb(0,i).eq.2)) all_set=.false. | ||
4460 | 5983 | enddo | ||
4461 | 5984 | if (all_set) then | ||
4462 | 5985 | write (*,*) 'All good helicities have been found.',hel_wgt | ||
4463 | 5986 | open(unit=65,file='goodhel.dat',status='unknown') | ||
4464 | 5987 | do j=0,4 | ||
4465 | 5988 | write (65,*) (goodhelr(j,i),i=1,max_bhel/2) | ||
4466 | 5989 | enddo | ||
4467 | 5990 | do j=0,2 | ||
4468 | 5991 | write (65,*) (goodhelb(j,i),i=1,max_bhel/2) | ||
4469 | 5992 | enddo | ||
4470 | 5993 | write(65,*) hel_wgt | ||
4471 | 5994 | close(65) | ||
4472 | 5995 | endif | ||
4473 | 5996 | else | ||
4474 | 5997 | do i=1,4 | ||
4475 | 5998 | if (goodhelr(i,ngood).ne.goodhelreal(i)) then | ||
4476 | 5999 | write (*,*)'Error #4 in get_helicities',i,ngood | ||
4477 | 6000 | stop | ||
4478 | 6001 | endif | ||
4479 | 6002 | enddo | ||
4480 | 6003 | do i=1,2 | ||
4481 | 6004 | if (goodhelb(i,ngood).ne.goodhelborn(i)) then | ||
4482 | 6005 | write (*,*)'Error #5 in get_helicities',i,ngood | ||
4483 | 6006 | stop | ||
4484 | 6007 | endif | ||
4485 | 6008 | enddo | ||
4486 | 6009 | endif | ||
4487 | 6010 | |||
4488 | 6011 | c Get the next helicity | ||
4489 | 6012 | 534 continue | ||
4490 | 6013 | done=.false. | ||
4491 | 6014 | do while (.not.done) | ||
4492 | 6015 | if (nexthel.eq.max_bhel*2) nexthel=0 | ||
4493 | 6016 | nexthel=nexthel+1 | ||
4494 | 6017 | if(nhel(i_fks,nexthel).eq.1.and.nhel(j_fks,nexthel).eq.1) then | ||
4495 | 6018 | if (ngood.eq.max_bhel/2) ngood=0 | ||
4496 | 6019 | ngood=ngood+1 | ||
4497 | 6020 | if((chckr .and. | ||
4498 | 6021 | & (goodhelr(0,ngood).ge.1.or.goodhelb(0,ngood).ge.1)).or. | ||
4499 | 6022 | & (.not.chckr .and. goodhelb(0,ngood).ge.1)) then | ||
4500 | 6023 | c Using random number to see if we have to go to the next. | ||
4501 | 6024 | c Probably this is an overkill, but have to make sure that there is | ||
4502 | 6025 | c no bias considering the *semi*-random numbers from VEGAS. | ||
4503 | 6026 | rnd=ran2() | ||
4504 | 6027 | if (rnd.le.1d0/dble(hel_wgt)) then | ||
4505 | 6028 | done=.true. | ||
4506 | 6029 | endif | ||
4507 | 6030 | endif | ||
4508 | 6031 | endif | ||
4509 | 6032 | enddo | ||
4510 | 6033 | |||
4511 | 6034 | do i=1,nexternal | ||
4512 | 6035 | if (i.eq.i_fks) then | ||
4513 | 6036 | nhelreal(i,1)=1 | ||
4514 | 6037 | nhelreal(i,2)=1 | ||
4515 | 6038 | nhelreal(i,3)=-1 | ||
4516 | 6039 | nhelreal(i,4)=-1 | ||
4517 | 6040 | elseif (i.eq.j_fks) then | ||
4518 | 6041 | nhelreal(i,1)=1 | ||
4519 | 6042 | nhelreal(i,2)=-1 | ||
4520 | 6043 | nhelreal(i,3)=1 | ||
4521 | 6044 | nhelreal(i,4)=-1 | ||
4522 | 6045 | else | ||
4523 | 6046 | nhelreal(i,1)=nhel(i,nexthel) | ||
4524 | 6047 | nhelreal(i,2)=nhel(i,nexthel) | ||
4525 | 6048 | nhelreal(i,3)=nhel(i,nexthel) | ||
4526 | 6049 | nhelreal(i,4)=nhel(i,nexthel) | ||
4527 | 6050 | endif | ||
4528 | 6051 | enddo | ||
4529 | 6052 | do j=1,4 | ||
4530 | 6053 | goodhelreal(j)=goodhelr(j,ngood) | ||
4531 | 6054 | enddo | ||
4532 | 6055 | |||
4533 | 6056 | do i=1,nexternal-1 | ||
4534 | 6057 | if (i.eq.min(i_fks,j_fks)) then | ||
4535 | 6058 | nhelborn(i,1)=1 | ||
4536 | 6059 | nhelborn(i,2)=-1 | ||
4537 | 6060 | elseif(i.lt.max(i_fks,j_fks)) then | ||
4538 | 6061 | nhelborn(i,1)=nhel(i,nexthel) | ||
4539 | 6062 | nhelborn(i,2)=nhel(i,nexthel) | ||
4540 | 6063 | else | ||
4541 | 6064 | nhelborn(i,1)=nhel(i+1,nexthel) | ||
4542 | 6065 | nhelborn(i,2)=nhel(i+1,nexthel) | ||
4543 | 6066 | endif | ||
4544 | 6067 | enddo | ||
4545 | 6068 | do j=1,2 | ||
4546 | 6069 | goodhelborn(j)=goodhelb(j,ngood) | ||
4547 | 6070 | enddo | ||
4548 | 6071 | |||
4549 | 6072 | else !isum_hel is zero, sum explicitly over helicities | ||
4550 | 6073 | |||
4551 | 6074 | do i=1,nexternal | ||
4552 | 6075 | do j=1,max_bhel*2 | ||
4553 | 6076 | nhelrealall(i,j)=nhel(i,j) | ||
4554 | 6077 | enddo | ||
4555 | 6078 | enddo | ||
4556 | 6079 | do i=1,nexternal-1 | ||
4557 | 6080 | k=0 | ||
4558 | 6081 | do j=1,max_bhel*2 | ||
4559 | 6082 | if (nhel(i_fks,j).eq.-1) then | ||
4560 | 6083 | k=k+1 | ||
4561 | 6084 | if (i.lt.i_fks) then | ||
4562 | 6085 | nhelbornall(i,k)=nhel(i,j) | ||
4563 | 6086 | elseif(i.ge.i_fks) then | ||
4564 | 6087 | nhelbornall(i,k)=nhel(i+1,j) | ||
4565 | 6088 | endif | ||
4566 | 6089 | endif | ||
4567 | 6090 | enddo | ||
4568 | 6091 | enddo | ||
4569 | 6092 | |||
4570 | 6093 | endif | ||
4571 | 6094 | return | ||
4572 | 6095 | end | ||
4573 | 6096 | |||
4574 | 6097 | function get_ptrel(pp,i_fks,j_fks) | ||
4575 | 6098 | implicit none | ||
4576 | 6099 | include 'nexternal.inc' | ||
4577 | 6100 | double precision get_ptrel,pp(0:3,nexternal) | ||
4578 | 6101 | integer i_fks,j_fks | ||
4579 | 6102 | double precision tmp,psum(3) | ||
4580 | 6103 | integer i | ||
4581 | 6104 | c | ||
4582 | 6105 | if(j_fks.le.2)then | ||
4583 | 6106 | tmp=sqrt(pp(1,i_fks)**2+pp(2,i_fks)**2) | ||
4584 | 6107 | else | ||
4585 | 6108 | do i=1,3 | ||
4586 | 6109 | psum(i)=pp(i,i_fks)+pp(i,j_fks) | ||
4587 | 6110 | enddo | ||
4588 | 6111 | tmp=( pp(2,i_fks)*psum(1)-pp(1,i_fks)*psum(2) )**2+ | ||
4589 | 6112 | # ( pp(3,i_fks)*psum(1)-pp(1,i_fks)*psum(3) )**2+ | ||
4590 | 6113 | # ( pp(3,i_fks)*psum(2)-pp(2,i_fks)*psum(3) )**2 | ||
4591 | 6114 | if(tmp.ne.0.d0)tmp=sqrt( tmp/ | ||
4592 | 6115 | # (psum(1)**2+psum(2)**2+psum(3)**2) ) | ||
4593 | 6116 | endif | ||
4594 | 6117 | get_ptrel=tmp | ||
4595 | 6118 | return | ||
4596 | 6119 | end | ||
4597 | 6120 | |||
4598 | 6121 | |||
4599 | 6122 | |||
4600 | 6123 | FUNCTION FK88RANDOM(SEED) | ||
4601 | 6124 | * ----------------- | ||
4602 | 6125 | * Ref.: K. Park and K.W. Miller, Comm. of the ACM 31 (1988) p.1192 | ||
4603 | 6126 | * Use seed = 1 as first value. | ||
4604 | 6127 | * | ||
4605 | 6128 | IMPLICIT INTEGER(A-Z) | ||
4606 | 6129 | REAL*8 MINV,FK88RANDOM | ||
4607 | 6130 | SAVE | ||
4608 | 6131 | PARAMETER(M=2147483647,A=16807,Q=127773,R=2836) | ||
4609 | 6132 | PARAMETER(MINV=0.46566128752458d-09) | ||
4610 | 6133 | HI = SEED/Q | ||
4611 | 6134 | LO = MOD(SEED,Q) | ||
4612 | 6135 | SEED = A*LO - R*HI | ||
4613 | 6136 | IF(SEED.LE.0) SEED = SEED + M | ||
4614 | 6137 | FK88RANDOM = SEED*MINV | ||
4615 | 6138 | END | ||
4616 | 6139 | |||
4617 | 6140 | 5474 | ||
4618 | 6141 | subroutine set_mu_central(ic,dd,c_mu2_r,c_mu2_f) | 5475 | subroutine set_mu_central(ic,dd,c_mu2_r,c_mu2_f) |
4619 | 5476 | use weight_lines | ||
4620 | 5477 | use extra_weights | ||
4621 | 6142 | implicit none | 5478 | implicit none |
4622 | 6143 | include 'nexternal.inc' | 5479 | include 'nexternal.inc' |
4623 | 6144 | include 'c_weight.inc' | ||
4624 | 6145 | include 'reweight0.inc' | ||
4625 | 6146 | include 'run.inc' | 5480 | include 'run.inc' |
4626 | 6147 | integer ic,dd,i,j | 5481 | integer ic,dd,i,j |
4627 | 6148 | double precision c_mu2_r,c_mu2_f,muR,muF,pp(0:3,nexternal) | 5482 | double precision c_mu2_r,c_mu2_f,muR,muF,pp(0:3,nexternal) |
4628 | 6149 | 5483 | ||
4629 | === modified file 'Template/NLO/SubProcesses/genps_fks.f' | |||
4630 | --- Template/NLO/SubProcesses/genps_fks.f 2017-05-16 14:24:36 +0000 | |||
4631 | +++ Template/NLO/SubProcesses/genps_fks.f 2017-08-16 21:26:30 +0000 | |||
4632 | @@ -2,8 +2,6 @@ | |||
4633 | 2 | implicit none | 2 | implicit none |
4634 | 3 | include 'genps.inc' | 3 | include 'genps.inc' |
4635 | 4 | include 'nexternal.inc' | 4 | include 'nexternal.inc' |
4636 | 5 | c Timing profile statistics | ||
4637 | 6 | include 'timing_variables.inc' | ||
4638 | 7 | integer ndim,iconfig | 5 | integer ndim,iconfig |
4639 | 8 | double precision wgt,x(99),p(0:3,nexternal) | 6 | double precision wgt,x(99),p(0:3,nexternal) |
4640 | 9 | integer iforest(2,-max_branch:-1,lmaxconfigs) | 7 | integer iforest(2,-max_branch:-1,lmaxconfigs) |
4641 | @@ -32,8 +30,6 @@ | |||
4642 | 32 | include 'coupl.inc' | 30 | include 'coupl.inc' |
4643 | 33 | include 'born_props.inc' | 31 | include 'born_props.inc' |
4644 | 34 | c | 32 | c |
4645 | 35 | call cpu_time(tBefore) | ||
4646 | 36 | c | ||
4647 | 37 | this_config=iconfig | 33 | this_config=iconfig |
4648 | 38 | iconf=iconfig | 34 | iconf=iconfig |
4649 | 39 | iconfig0=iconfig | 35 | iconfig0=iconfig |
4650 | @@ -56,8 +52,6 @@ | |||
4651 | 56 | enddo | 52 | enddo |
4652 | 57 | wgt=wgt*jac | 53 | wgt=wgt*jac |
4653 | 58 | c | 54 | c |
4654 | 59 | call cpu_time(tAfter) | ||
4655 | 60 | tGenPS = tGenPS + (tAfter-tBefore) | ||
4656 | 61 | return | 55 | return |
4657 | 62 | end | 56 | end |
4658 | 63 | 57 | ||
4659 | @@ -313,8 +307,7 @@ | |||
4660 | 313 | c | 307 | c |
4661 | 314 | c Start by generating all the invariant masses of the s-channels | 308 | c Start by generating all the invariant masses of the s-channels |
4662 | 315 | call generate_inv_mass_sch(ns_channel,itree,m,sqrtshat_born | 309 | call generate_inv_mass_sch(ns_channel,itree,m,sqrtshat_born |
4665 | 316 | $ ,totmass,qwidth,qmass,cBW,cBW_level,cBW_mass,cBW_width,s,x | 310 | $ ,totmass,qwidth,qmass,cBW,cBW_mass,cBW_width,s,x,xjac0,pass) |
4664 | 317 | $ ,xjac0,pass) | ||
4666 | 318 | if (.not.pass) goto 222 | 311 | if (.not.pass) goto 222 |
4667 | 319 | c If only s-channels, also set the p1+p2 s-channel | 312 | c If only s-channels, also set the p1+p2 s-channel |
4668 | 320 | if (nt_channel .eq. 0 .and. nincoming .eq. 2) then | 313 | if (nt_channel .eq. 0 .and. nincoming .eq. 2) then |
4669 | @@ -1215,7 +1208,7 @@ | |||
4670 | 1215 | integer icountevts,i_fks,j_fks | 1208 | integer icountevts,i_fks,j_fks |
4671 | 1216 | double precision xbjrk_born(2),tau_born,ycm_born,ycmhat,shat_born | 1209 | double precision xbjrk_born(2),tau_born,ycm_born,ycmhat,shat_born |
4672 | 1217 | & ,phi_i_fks,xpswgt,xjac,xiimax,xinorm,xp(0:3,nexternal),stot | 1210 | & ,phi_i_fks,xpswgt,xjac,xiimax,xinorm,xp(0:3,nexternal),stot |
4674 | 1218 | & ,x(2) ,y_ij_fks | 1211 | & ,x(2),y_ij_fks |
4675 | 1219 | double precision shat,sqrtshat,tau,ycm,xbjrk(2),p_i_fks(0:3) | 1212 | double precision shat,sqrtshat,tau,ycm,xbjrk(2),p_i_fks(0:3) |
4676 | 1220 | logical pass | 1213 | logical pass |
4677 | 1221 | c common blocks | 1214 | c common blocks |
4678 | @@ -1575,40 +1568,6 @@ | |||
4679 | 1575 | return | 1568 | return |
4680 | 1576 | end | 1569 | end |
4681 | 1577 | 1570 | ||
4682 | 1578 | |||
4683 | 1579 | function bwfunc(s,xm02,gah) | ||
4684 | 1580 | c Returns the Breit Wigner function, normalized in such a way that | ||
4685 | 1581 | c its integral in the range (-inf,inf) is one | ||
4686 | 1582 | implicit none | ||
4687 | 1583 | real*8 bwfunc,s,xm02,gah | ||
4688 | 1584 | real*8 pi,xm0 | ||
4689 | 1585 | parameter (pi=3.1415926535897932d0) | ||
4690 | 1586 | c | ||
4691 | 1587 | xm0=sqrt(xm02) | ||
4692 | 1588 | bwfunc=xm0*gah/(pi*((s-xm02)**2+xm02*gah**2)) | ||
4693 | 1589 | return | ||
4694 | 1590 | end | ||
4695 | 1591 | |||
4696 | 1592 | |||
4697 | 1593 | function xbwmass3(t,xm02,ga,bwdelf,bwfmmn) | ||
4698 | 1594 | c Returns the boson mass squared, given 0<t<1, the nominal mass (xm0), | ||
4699 | 1595 | c and the mass range (implicit in bwdelf and bwfmmn). This function | ||
4700 | 1596 | c is the inverse of F(M^2), where | ||
4701 | 1597 | c F(M^2)=\int_{xmlow2}^{M^2} ds BW(sqrt(s),M0,Ga) | ||
4702 | 1598 | c BW(M,M0,Ga)=M0 Ga/pi 1/((M^2-M0^2)^2+M0^2 Ga^2 | ||
4703 | 1599 | c and therefore eats up the Breit-Wigner when changing integration | ||
4704 | 1600 | c variable M^2 --> t | ||
4705 | 1601 | implicit none | ||
4706 | 1602 | real*8 xbwmass3,t,xm02,ga,bwdelf,bwfmmn | ||
4707 | 1603 | real*8 pi,xm0 | ||
4708 | 1604 | parameter (pi=3.1415926535897932d0) | ||
4709 | 1605 | c | ||
4710 | 1606 | xm0=sqrt(xm02) | ||
4711 | 1607 | xbwmass3=xm02+xm0*ga*tan(pi*bwdelf*t-bwfmmn) | ||
4712 | 1608 | return | ||
4713 | 1609 | end | ||
4714 | 1610 | |||
4715 | 1611 | |||
4716 | 1612 | subroutine gentcms(pa,pb,t,phi,m1,m2,p1,pr,jac) | 1571 | subroutine gentcms(pa,pb,t,phi,m1,m2,p1,pr,jac) |
4717 | 1613 | c************************************************************************* | 1572 | c************************************************************************* |
4718 | 1614 | c Generates 4 momentum for particle 1, and remainder pr | 1573 | c Generates 4 momentum for particle 1, and remainder pr |
4719 | @@ -1774,21 +1733,10 @@ | |||
4720 | 1774 | subroutine generate_tau_BW(stot,idim,x,mass,width,cBW,BWmass | 1733 | subroutine generate_tau_BW(stot,idim,x,mass,width,cBW,BWmass |
4721 | 1775 | $ ,BWwidth,tau,jac) | 1734 | $ ,BWwidth,tau,jac) |
4722 | 1776 | implicit none | 1735 | implicit none |
4738 | 1777 | real*8 pi | 1736 | integer cBW,idim |
4739 | 1778 | parameter (pi=3.1415926535897932d0) | 1737 | double precision stot,x,tau,jac,mass,width,BWmass(-1:1),BWwidth( |
4740 | 1779 | integer nsamp | 1738 | $ -1:1),s_mass,s |
4741 | 1780 | parameter (nsamp=1) | 1739 | double precision smax,smin |
4727 | 1781 | include 'run.inc' | ||
4728 | 1782 | include 'genps.inc' | ||
4729 | 1783 | integer cBW,icount,idim | ||
4730 | 1784 | data icount /0/ | ||
4731 | 1785 | double precision stot,x,tau,jac,mass,width,m,w,a,b,BWmass(-1:1) | ||
4732 | 1786 | $ ,BWwidth(-1:1),s,s_mass | ||
4733 | 1787 | double precision smax,smin,xm02,stemp,bwmdpl,bwmdmn,bwfmpl,bwfmmn | ||
4734 | 1788 | double precision bwdelf,xbwmass3,bwfunc,x0 | ||
4735 | 1789 | external xmwmass3,bwfunc | ||
4736 | 1790 | double precision tau_Born_lower_bound_save | ||
4737 | 1791 | $ ,tau_lower_bound_resonance_save,tau_lower_bound_save | ||
4742 | 1792 | double precision tau_Born_lower_bound,tau_lower_bound_resonance | 1740 | double precision tau_Born_lower_bound,tau_lower_bound_resonance |
4743 | 1793 | & ,tau_lower_bound | 1741 | & ,tau_lower_bound |
4744 | 1794 | common/ctau_lower_bound/tau_Born_lower_bound | 1742 | common/ctau_lower_bound/tau_Born_lower_bound |
4745 | @@ -1815,18 +1763,15 @@ | |||
4746 | 1815 | 1763 | ||
4747 | 1816 | 1764 | ||
4748 | 1817 | subroutine generate_tau(stot,idim,x,tau,jac) | 1765 | subroutine generate_tau(stot,idim,x,tau,jac) |
4754 | 1818 | double precision x,tau,jac | 1766 | implicit none |
4755 | 1819 | double precision roH,roHs,fract,ximax0,ximin0,tmp,fract1,fract2 | 1767 | integer idim |
4756 | 1820 | & ,roHj,stot,s,dum,dum3(-1:1),smin,smax,s_mass | 1768 | double precision x,tau,jac,smin,smax,s_mass,s,tiny,dum,dum3(-1:1) |
4757 | 1821 | integer nsamp,idim | 1769 | $ ,stot |
4758 | 1822 | parameter (nsamp=1) | 1770 | parameter (tiny=1d-8) |
4759 | 1823 | double precision tau_Born_lower_bound,tau_lower_bound_resonance | 1771 | double precision tau_Born_lower_bound,tau_lower_bound_resonance |
4762 | 1824 | & ,tau_lower_bound,tiny | 1772 | $ ,tau_lower_bound |
4761 | 1825 | parameter (tiny=1d-8) | ||
4763 | 1826 | common/ctau_lower_bound/tau_Born_lower_bound | 1773 | common/ctau_lower_bound/tau_Born_lower_bound |
4767 | 1827 | & ,tau_lower_bound_resonance,tau_lower_bound | 1774 | $ ,tau_lower_bound_resonance,tau_lower_bound |
4765 | 1828 | character*4 abrv | ||
4766 | 1829 | common /to_abrv/ abrv | ||
4768 | 1830 | smin=tau_born_lower_bound*stot | 1775 | smin=tau_born_lower_bound*stot |
4769 | 1831 | smax=stot | 1776 | smax=stot |
4770 | 1832 | s_mass=tau_lower_bound_resonance*stot | 1777 | s_mass=tau_lower_bound_resonance*stot |
4771 | @@ -1887,11 +1832,8 @@ | |||
4772 | 1887 | 1832 | ||
4773 | 1888 | 1833 | ||
4774 | 1889 | subroutine generate_inv_mass_sch(ns_channel,itree,m,sqrtshat_born | 1834 | subroutine generate_inv_mass_sch(ns_channel,itree,m,sqrtshat_born |
4777 | 1890 | $ ,totmass,qwidth,qmass,cBW,cBW_level,cBW_mass,cBW_width,s,x | 1835 | $ ,totmass,qwidth,qmass,cBW,cBW_mass,cBW_width,s,x,xjac0,pass) |
4776 | 1891 | $ ,xjac0,pass) | ||
4778 | 1892 | implicit none | 1836 | implicit none |
4779 | 1893 | real*8 pi | ||
4780 | 1894 | parameter (pi=3.1415926535897932d0) | ||
4781 | 1895 | include 'genps.inc' | 1837 | include 'genps.inc' |
4782 | 1896 | include 'nexternal.inc' | 1838 | include 'nexternal.inc' |
4783 | 1897 | integer ns_channel | 1839 | integer ns_channel |
4784 | @@ -1901,18 +1843,12 @@ | |||
4785 | 1901 | double precision sqrtshat_born,totmass,xjac0 | 1843 | double precision sqrtshat_born,totmass,xjac0 |
4786 | 1902 | integer itree(2,-max_branch:-1) | 1844 | integer itree(2,-max_branch:-1) |
4787 | 1903 | integer i,j,ii,order(-nexternal:0) | 1845 | integer i,j,ii,order(-nexternal:0) |
4792 | 1904 | double precision smin,smax,xm02,bwmdpl,bwmdmn,bwfmpl,bwfmmn,bwdelf | 1846 | double precision smin,smax,totalmass |
4789 | 1905 | & ,totalmass,tmp,ximin0,ximax0 | ||
4790 | 1906 | double precision xbwmass3,bwfunc | ||
4791 | 1907 | external xbwmass3,bwfunc | ||
4793 | 1908 | logical pass | 1847 | logical pass |
4801 | 1909 | integer cBW_level_max,cBW(-nexternal:-1),cBW_level(-nexternal:-1) | 1848 | integer cBW(-nexternal:-1) |
4802 | 1910 | double precision cBW_mass(-1:1,-nexternal:-1), | 1849 | double precision cBW_mass(-1:1,-nexternal:-1),cBW_width(-1:1, |
4803 | 1911 | & cBW_width(-1:1,-nexternal:-1) | 1850 | $ -nexternal:-1) |
4804 | 1912 | double precision b(-1:1),x0 | 1851 | double precision s_mass(-nexternal:nexternal) |
4798 | 1913 | double precision s_mass(-nexternal:nexternal),xi,fract,vol_new | ||
4799 | 1914 | $ ,shat,x_new | ||
4800 | 1915 | parameter (fract=0.1d0) | ||
4805 | 1916 | common/to_phase_space_s_channel/s_mass | 1852 | common/to_phase_space_s_channel/s_mass |
4806 | 1917 | pass=.true. | 1853 | pass=.true. |
4807 | 1918 | totalmass=totmass | 1854 | totalmass=totmass |
4808 | @@ -2233,9 +2169,8 @@ | |||
4809 | 2233 | include 'nexternal.inc' | 2169 | include 'nexternal.inc' |
4810 | 2234 | double precision p_born(0:3,nexternal-1),xmrec2,shat_born | 2170 | double precision p_born(0:3,nexternal-1),xmrec2,shat_born |
4811 | 2235 | logical pass | 2171 | logical pass |
4815 | 2236 | integer imother | 2172 | integer imother,i |
4816 | 2237 | integer i | 2173 | double precision recoilbar(0:3),dot |
4814 | 2238 | double precision recoilbar(0:3),dot,tmp | ||
4817 | 2239 | external dot | 2174 | external dot |
4818 | 2240 | pass=.true. | 2175 | pass=.true. |
4819 | 2241 | do i=0,3 | 2176 | do i=0,3 |
4820 | @@ -2280,15 +2215,10 @@ | |||
4821 | 2280 | c itype=6: Conflicting BW on both sides | 2215 | c itype=6: Conflicting BW on both sides |
4822 | 2281 | c | 2216 | c |
4823 | 2282 | implicit none | 2217 | implicit none |
4824 | 2283 | include 'nexternal.inc' | ||
4825 | 2284 | include 'run.inc' ! ebeam | ||
4826 | 2285 | c ARGUMENTS | ||
4827 | 2286 | integer itype,idim | 2218 | integer itype,idim |
4828 | 2287 | double precision x,smin,smax,s_mass,qmass,qwidth,cBW_mass(-1:1) | 2219 | double precision x,smin,smax,s_mass,qmass,qwidth,cBW_mass(-1:1) |
4829 | 2288 | $ ,cBW_width(-1:1),jac,s | 2220 | $ ,cBW_width(-1:1),jac,s |
4833 | 2289 | c LOCAL | 2221 | double precision fract,A,B,C,D,E,F,G,bs(-1:1),maxi,mini |
4831 | 2290 | double precision tmp,vol_new,x_min,x_max,x_new,fract,x_mass,xg,A | ||
4832 | 2291 | $ ,B,C,D,E,F,G,bs(-1:1),maxi,mini | ||
4834 | 2292 | integer j | 2222 | integer j |
4835 | 2293 | c | 2223 | c |
4836 | 2294 | if (itype.eq.1) then | 2224 | if (itype.eq.1) then |
4837 | 2295 | 2225 | ||
4838 | === modified file 'Template/NLO/SubProcesses/handling_lhe_events.f' | |||
4839 | --- Template/NLO/SubProcesses/handling_lhe_events.f 2016-11-03 15:21:05 +0000 | |||
4840 | +++ Template/NLO/SubProcesses/handling_lhe_events.f 2017-08-16 21:26:30 +0000 | |||
4841 | @@ -1,14 +1,4 @@ | |||
4842 | 1 | c Utility routines for LHEF. Originally taken from collect_events.f | 1 | c Utility routines for LHEF. Originally taken from collect_events.f |
4843 | 2 | c | ||
4844 | 3 | c Note: the routines read_lhef_event and write_lhef_event use the common | ||
4845 | 4 | c blocks in reweight0.inc, relevant to reweight information. This is | ||
4846 | 5 | c independent of the process, and in particular of process-related | ||
4847 | 6 | c parameters such as nexternal, which is replaced here by (its supposed) | ||
4848 | 7 | c upper bound maxparticles. The arrays which have one dimension defined | ||
4849 | 8 | c by maxparticles may have a correspondence with process-specific ones, | ||
4850 | 9 | c and the dimensions of the latter are typically defined by nexternal. | ||
4851 | 10 | c Hence, one may need an explicit copy of one onto the other | ||
4852 | 11 | c | ||
4853 | 12 | 2 | ||
4854 | 13 | block data | 3 | block data |
4855 | 14 | integer event_id | 4 | integer event_id |
4856 | @@ -20,9 +10,9 @@ | |||
4857 | 20 | end | 10 | end |
4858 | 21 | 11 | ||
4859 | 22 | subroutine write_lhef_header(ifile,nevents,MonteCarlo) | 12 | subroutine write_lhef_header(ifile,nevents,MonteCarlo) |
4860 | 13 | use extra_weights | ||
4861 | 23 | implicit none | 14 | implicit none |
4862 | 24 | include 'run.inc' | 15 | include 'run.inc' |
4863 | 25 | include 'reweight0.inc' | ||
4864 | 26 | integer idwgt,kk,ii,jj,nn,n | 16 | integer idwgt,kk,ii,jj,nn,n |
4865 | 27 | integer ifile,nevents | 17 | integer ifile,nevents |
4866 | 28 | character*10 MonteCarlo | 18 | character*10 MonteCarlo |
4867 | @@ -114,6 +104,7 @@ | |||
4868 | 114 | 104 | ||
4869 | 115 | 105 | ||
4870 | 116 | subroutine write_lhef_header_banner(ifile,nevents,MonteCarlo,path) | 106 | subroutine write_lhef_header_banner(ifile,nevents,MonteCarlo,path) |
4871 | 107 | use extra_weights | ||
4872 | 117 | implicit none | 108 | implicit none |
4873 | 118 | integer ifile, i, idwgt, nevents,iseed,ii,jj,kk,nn,n | 109 | integer ifile, i, idwgt, nevents,iseed,ii,jj,kk,nn,n |
4874 | 119 | double precision mcmass(-16:21) | 110 | double precision mcmass(-16:21) |
4875 | @@ -135,7 +126,6 @@ | |||
4876 | 135 | character*150 buffer,buffer_lc,buffer2 | 126 | character*150 buffer,buffer_lc,buffer2 |
4877 | 136 | integer event_id | 127 | integer event_id |
4878 | 137 | common /c_event_id/ event_id | 128 | common /c_event_id/ event_id |
4879 | 138 | include 'reweight_all.inc' | ||
4880 | 139 | 129 | ||
4881 | 140 | c Set the event_id to 0. If 0 or positive, this value will be update | 130 | c Set the event_id to 0. If 0 or positive, this value will be update |
4882 | 141 | c in write_lhe_event. It is set to -99 through a block data | 131 | c in write_lhe_event. It is set to -99 through a block data |
4883 | @@ -297,8 +287,8 @@ | |||
4884 | 297 | 287 | ||
4885 | 298 | 288 | ||
4886 | 299 | subroutine read_lhef_header(ifile,nevents,MonteCarlo) | 289 | subroutine read_lhef_header(ifile,nevents,MonteCarlo) |
4887 | 290 | use extra_weights | ||
4888 | 300 | implicit none | 291 | implicit none |
4889 | 301 | include 'reweight0.inc' | ||
4890 | 302 | include './run.inc' | 292 | include './run.inc' |
4891 | 303 | logical already_found | 293 | logical already_found |
4892 | 304 | integer ifile,nevents,i,ii,ii2,iistr,itemp | 294 | integer ifile,nevents,i,ii,ii2,iistr,itemp |
4893 | @@ -435,8 +425,8 @@ | |||
4894 | 435 | c Avoid overloading read_lhef_header, meant to be used in utilities | 425 | c Avoid overloading read_lhef_header, meant to be used in utilities |
4895 | 436 | subroutine read_lhef_header_full(ifile,nevents,itempsc,itempPDF, | 426 | subroutine read_lhef_header_full(ifile,nevents,itempsc,itempPDF, |
4896 | 437 | # MonteCarlo) | 427 | # MonteCarlo) |
4897 | 428 | use extra_weights | ||
4898 | 438 | implicit none | 429 | implicit none |
4899 | 439 | include 'reweight0.inc' | ||
4900 | 440 | include 'run.inc' | 430 | include 'run.inc' |
4901 | 441 | logical already_found | 431 | logical already_found |
4902 | 442 | integer ifile,nevents,i,ii,ii2,iistr,ipart,itempsc,itempPDF | 432 | integer ifile,nevents,i,ii,ii2,iistr,ipart,itempsc,itempPDF |
4903 | @@ -652,6 +642,7 @@ | |||
4904 | 652 | subroutine write_lhef_event(ifile, | 642 | subroutine write_lhef_event(ifile, |
4905 | 653 | # NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP, | 643 | # NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP, |
4906 | 654 | # IDUP,ISTUP,MOTHUP,ICOLUP,PUP,VTIMUP,SPINUP,buff) | 644 | # IDUP,ISTUP,MOTHUP,ICOLUP,PUP,VTIMUP,SPINUP,buff) |
4907 | 645 | use extra_weights | ||
4908 | 655 | implicit none | 646 | implicit none |
4909 | 656 | INTEGER NUP,IDPRUP,IDUP(*),ISTUP(*),MOTHUP(2,*),ICOLUP(2,*) | 647 | INTEGER NUP,IDPRUP,IDUP(*),ISTUP(*),MOTHUP(2,*),ICOLUP(2,*) |
4910 | 657 | DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP, | 648 | DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP, |
4911 | @@ -669,7 +660,6 @@ | |||
4912 | 669 | common/c_i_process/i_process | 660 | common/c_i_process/i_process |
4913 | 670 | integer nattr,npNLO,npLO | 661 | integer nattr,npNLO,npLO |
4914 | 671 | common/event_attributes/nattr,npNLO,npLO | 662 | common/event_attributes/nattr,npNLO,npLO |
4915 | 672 | include 'reweight_all.inc' | ||
4916 | 673 | include './run.inc' | 663 | include './run.inc' |
4917 | 674 | include 'unlops.inc' | 664 | include 'unlops.inc' |
4918 | 675 | c if event_id is zero or positive (that means that there was a call | 665 | c if event_id is zero or positive (that means that there was a call |
4919 | @@ -824,6 +814,7 @@ | |||
4920 | 824 | subroutine read_lhef_event(ifile, | 814 | subroutine read_lhef_event(ifile, |
4921 | 825 | # NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP, | 815 | # NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP, |
4922 | 826 | # IDUP,ISTUP,MOTHUP,ICOLUP,PUP,VTIMUP,SPINUP,buff) | 816 | # IDUP,ISTUP,MOTHUP,ICOLUP,PUP,VTIMUP,SPINUP,buff) |
4923 | 817 | use extra_weights | ||
4924 | 827 | implicit none | 818 | implicit none |
4925 | 828 | INTEGER NUP,IDPRUP,IDUP(*),ISTUP(*),MOTHUP(2,*),ICOLUP(2,*) | 819 | INTEGER NUP,IDPRUP,IDUP(*),ISTUP(*),MOTHUP(2,*),ICOLUP(2,*) |
4926 | 829 | DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP, | 820 | DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP, |
4927 | @@ -842,7 +833,6 @@ | |||
4928 | 842 | common/c_i_process/i_process | 833 | common/c_i_process/i_process |
4929 | 843 | integer nattr,npNLO,npLO | 834 | integer nattr,npNLO,npLO |
4930 | 844 | common/event_attributes/nattr,npNLO,npLO | 835 | common/event_attributes/nattr,npNLO,npLO |
4931 | 845 | include 'reweight_all.inc' | ||
4932 | 846 | include 'unlops.inc' | 836 | include 'unlops.inc' |
4933 | 847 | include 'run.inc' | 837 | include 'run.inc' |
4934 | 848 | c | 838 | c |
4935 | @@ -876,11 +866,27 @@ | |||
4936 | 876 | if(jwgtinfo.eq.-5 .or. jwgtinfo.eq.-9) then | 866 | if(jwgtinfo.eq.-5 .or. jwgtinfo.eq.-9) then |
4937 | 877 | read(ifile,'(a)')string | 867 | read(ifile,'(a)')string |
4938 | 878 | read(ifile,*) wgtref,n_ctr_found,n_mom_conf,wgtcpower | 868 | read(ifile,*) wgtref,n_ctr_found,n_mom_conf,wgtcpower |
4939 | 869 | if (.not.allocated(momenta_str)) allocate(momenta_str(0:3 | ||
4940 | 870 | $ ,max_mext,max_mom_str)) | ||
4941 | 871 | if (n_mom_conf.gt.max_mom_str .or. mexternal.gt.max_mext) | ||
4942 | 872 | $ then | ||
4943 | 873 | deallocate(momenta_str) | ||
4944 | 874 | max_mom_str=max(n_mom_conf,max_mom_str) | ||
4945 | 875 | max_mext=max(mexternal,max_mext) | ||
4946 | 876 | allocate(momenta_str(0:3,max_mext,max_mom_str)) | ||
4947 | 877 | endif | ||
4948 | 879 | do i=1,n_mom_conf | 878 | do i=1,n_mom_conf |
4949 | 880 | do j=1,mexternal | 879 | do j=1,mexternal |
4950 | 881 | read (ifile,*) (momenta_str(ii,j,i),ii=0,3) | 880 | read (ifile,*) (momenta_str(ii,j,i),ii=0,3) |
4951 | 882 | enddo | 881 | enddo |
4952 | 883 | enddo | 882 | enddo |
4953 | 883 | if (.not.allocated(n_ctr_str)) | ||
4954 | 884 | $ allocate(n_ctr_str(max_n_ctr)) | ||
4955 | 885 | if (n_ctr_found.gt.max_n_ctr) then | ||
4956 | 886 | deallocate(n_ctr_str) | ||
4957 | 887 | max_n_ctr=n_ctr_found | ||
4958 | 888 | allocate(n_ctr_str(max_n_ctr)) | ||
4959 | 889 | endif | ||
4960 | 884 | do i=1,n_ctr_found | 890 | do i=1,n_ctr_found |
4961 | 885 | read (ifile,'(a)') n_ctr_str(i) | 891 | read (ifile,'(a)') n_ctr_str(i) |
4962 | 886 | enddo | 892 | enddo |
4963 | @@ -955,6 +961,7 @@ | |||
4964 | 955 | subroutine read_lhef_event_catch(ifile, | 961 | subroutine read_lhef_event_catch(ifile, |
4965 | 956 | # NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP, | 962 | # NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP, |
4966 | 957 | # IDUP,ISTUP,MOTHUP,ICOLUP,PUP,VTIMUP,SPINUP,buff) | 963 | # IDUP,ISTUP,MOTHUP,ICOLUP,PUP,VTIMUP,SPINUP,buff) |
4967 | 964 | use extra_weights | ||
4968 | 958 | implicit none | 965 | implicit none |
4969 | 959 | INTEGER NUP,IDPRUP,IDUP(*),ISTUP(*),MOTHUP(2,*),ICOLUP(2,*) | 966 | INTEGER NUP,IDPRUP,IDUP(*),ISTUP(*),MOTHUP(2,*),ICOLUP(2,*) |
4970 | 960 | DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP, | 967 | DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP, |
4971 | @@ -973,7 +980,6 @@ | |||
4972 | 973 | common/c_i_process/i_process | 980 | common/c_i_process/i_process |
4973 | 974 | integer nattr,npNLO,npLO | 981 | integer nattr,npNLO,npLO |
4974 | 975 | common/event_attributes/nattr,npNLO,npLO | 982 | common/event_attributes/nattr,npNLO,npLO |
4975 | 976 | include 'reweight_all.inc' | ||
4976 | 977 | include 'unlops.inc' | 983 | include 'unlops.inc' |
4977 | 978 | include 'run.inc' | 984 | include 'run.inc' |
4978 | 979 | c | 985 | c |
4979 | @@ -1008,23 +1014,39 @@ | |||
4980 | 1008 | enddo | 1014 | enddo |
4981 | 1009 | read(ifile,'(a)')buff | 1015 | read(ifile,'(a)')buff |
4982 | 1010 | if(buff(1:1).eq.'#')then | 1016 | if(buff(1:1).eq.'#')then |
4984 | 1011 | read(buff,*)ch1,iSorH_lhe,ifks_lhe,jfks_lhe, | 1017 | read(buff,*)ch1,iSorH_lhe,ifks_lhe,jfks_lhe, |
4985 | 1012 | # fksfather_lhe,ipartner_lhe, | 1018 | # fksfather_lhe,ipartner_lhe, |
4986 | 1013 | # scale1_lhe,scale2_lhe, | 1019 | # scale1_lhe,scale2_lhe, |
4987 | 1014 | # jwgtinfo,mexternal,iwgtnumpartn, | 1020 | # jwgtinfo,mexternal,iwgtnumpartn, |
4988 | 1015 | # wgtcentral,wgtmumin,wgtmumax,wgtpdfmin,wgtpdfmax | 1021 | # wgtcentral,wgtmumin,wgtmumax,wgtpdfmin,wgtpdfmax |
4989 | 1016 | if(jwgtinfo.eq.-5 .or. jwgtinfo.eq.-9) then | ||
4990 | 1017 | read(ifile,'(a)')string | ||
4991 | 1018 | read(ifile,*) wgtref,n_ctr_found,n_mom_conf,wgtcpower | ||
4992 | 1019 | do i=1,n_mom_conf | ||
4993 | 1020 | do j=1,mexternal | ||
4994 | 1021 | read (ifile,*) (momenta_str(ii,j,i),ii=0,3) | ||
4995 | 1022 | enddo | ||
4996 | 1023 | enddo | ||
4997 | 1024 | do i=1,n_ctr_found | ||
4998 | 1025 | read (ifile,'(a)') n_ctr_str(i) | ||
4999 | 1026 | enddo | ||
5000 | 1027 | read(ifile,'(a)')string |
Hi Olivier,
> I would actually propose to call it 2.6.0 since this version includes a
> lot of new features.
I think we have advertised a few times that 2.6.0 would contain
EW corrections, so I personally prefer 2.5.6 (not a vry strong
feeling; I'll be happy to go with the majority).
Concerning the review: after the MS bug, I've kept on testing the NLO
bias stuff with cases more involved than single V, and I didn't
find any issues.
Cheers, Stefano.
>
> Cheers,
>
> Olivier
> --
> The attached diff has been truncated due to its size.
> Your team MadTeam is requested to review the proposed merge of lp:~mg5core1/mg5amcnlo/2.5.6 into lp:mg5amcnlo.
>