Merge lp:~mg5core1/mg5amcnlo/2.7.3 into lp:mg5amcnlo/lts
- 2.7.3
- Merge into series2.0
Status: | Merged |
---|---|
Merged at revision: | 288 |
Proposed branch: | lp:~mg5core1/mg5amcnlo/2.7.3 |
Merge into: | lp:mg5amcnlo/lts |
Diff against target: |
12761 lines (+4246/-1996) 162 files modified
MadSpin/decay.py (+11/-4) MadSpin/interface_madspin.py (+29/-21) Template/Common/Cards/madspin_card_default.dat (+1/-1) Template/LO/Cards/run_card.dat (+2/-1) Template/LO/Source/PDF/PhotonFlux.f (+2/-1) Template/LO/Source/PDF/makefile (+7/-2) Template/LO/Source/PDF/pdf_lhapdf62.cc (+1569/-0) Template/LO/Source/dsample.f (+2/-2) Template/LO/SubProcesses/cuts.f (+2/-2) Template/LO/SubProcesses/genps.f (+13/-5) Template/LO/SubProcesses/reweight.f (+6/-0) Template/LO/SubProcesses/unwgt.f (+23/-11) Template/LO/bin/internal/merge.pl (+2/-2) Template/LO/bin/internal/restore_data (+13/-3) Template/NLO/MCatNLO/include/LHEF.h (+1/-1) Template/NLO/SubProcesses/cuts.f (+2/-2) Template/loop_material/StandAlone/SubProcesses/MadLoopCommons.inc (+41/-9) UpdateNotes.txt (+19/-0) VERSION (+2/-2) aloha/create_aloha.py (+1/-1) aloha/template_files/aloha_functions_loop.f (+2/-2) bin/mg5_aMC (+9/-1) madgraph/core/base_objects.py (+22/-9) madgraph/core/diagram_generation.py (+3/-2) madgraph/core/helas_objects.py (+12/-1) madgraph/interface/amcatnlo_run_interface.py (+8/-2) madgraph/interface/common_run_interface.py (+63/-15) madgraph/interface/extended_cmd.py (+4/-0) madgraph/interface/madevent_interface.py (+65/-24) madgraph/interface/madgraph_interface.py (+36/-15) madgraph/interface/master_interface.py (+2/-0) madgraph/interface/reweight_interface.py (+99/-82) madgraph/iolibs/export_v4.py (+58/-5) madgraph/iolibs/file_writers.py (+16/-7) madgraph/iolibs/template_files/madevent_symmetry.f (+1/-1) madgraph/loop/loop_exporters.py (+40/-1) madgraph/madevent/gen_crossxhtml.py (+3/-0) madgraph/madevent/gen_ximprove.py (+18/-6) madgraph/various/banner.py (+3/-4) madgraph/various/lhe_parser.py (+13/-4) madgraph/various/misc.py (+7/-4) madgraph/various/process_checks.py (+1/-1) models/model_reader.py (+5/-0) tests/acceptance_tests/test_cmd_reweight.py (+20/-8) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%COLLIER_interface.f (+13/-12) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%CT_interface.f (+2/-2) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f (+4/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%check_sa_born_splitOrders.f (+2/-2) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f (+49/-43) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f (+6/-5) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%polynomial.f (+4/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%COLLIER_interface.f (+13/-12) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%CT_interface.f (+2/-2) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f (+4/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%check_sa_born_splitOrders.f (+2/-2) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f (+49/-43) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f (+6/-5) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%polynomial.f (+4/-4) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f (+12/-10) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f (+4/-4) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f (+56/-49) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+56/-49) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f (+56/-49) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+56/-49) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+56/-49) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f (+56/-49) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f (+56/-49) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f (+56/-49) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%MadLoopCommons.f (+42/-9) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%COLLIER_interface.f (+15/-14) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%CT_interface.f (+10/-10) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f (+10/-10) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%check_sa_born_splitOrders.f (+2/-2) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f (+56/-49) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_compute_loop_coefs.f (+12/-9) tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%polynomial.f (+14/-12) tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f (+4/-4) tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f (+4/-4) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%COLLIER_interface.f (+15/-14) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%CT_interface.f (+6/-6) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%born_matrix.f (+8/-8) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%check_sa_born_splitOrders.f (+2/-2) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f (+56/-49) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_compute_loop_coefs.f (+12/-9) tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%polynomial.f (+14/-12) tests/input_files/IOTestsComparison/TestMadWeight/modification_to_cuts/cuts.f (+2/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f (+8/-8) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%mp_input.inc (+5/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%mp_intparam_definition.inc (+6/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f (+15/-10) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_num.f (+6/-6) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/mp_born_amps_and_wfs.f (+6/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%model_functions.f (+8/-8) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_couplings2.f (+6/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+28/-27) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+12/-8) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f (+15/-10) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_num.f (+6/-6) tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/mp_born_amps_and_wfs.f (+6/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f (+8/-8) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%mp_input.inc (+5/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%mp_intparam_definition.inc (+6/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/CT_interface.f (+6/-6) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f (+56/-49) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_compute_loop_coefs.f (+12/-9) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/polynomial.f (+14/-12) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%model_functions.f (+8/-8) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_couplings2.f (+6/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_input.inc (+28/-27) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%mp_intparam_definition.inc (+12/-8) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/CT_interface.f (+14/-14) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_CT_calls_1.f (+2/-2) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f (+56/-49) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_compute_loop_coefs.f (+12/-9) tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/polynomial.f (+14/-12) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%model_functions.f (+8/-8) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_input.inc (+21/-20) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%mp_intparam_definition.inc (+6/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f (+15/-10) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_num.f (+6/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/mp_born_amps_and_wfs.f (+6/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f (+15/-10) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_num.f (+6/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/mp_born_amps_and_wfs.f (+6/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%model_functions.f (+8/-8) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_couplings2.f (+3/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_input.inc (+18/-18) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+9/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f (+15/-10) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_num.f (+6/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/mp_born_amps_and_wfs.f (+6/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/CT_interface.f (+6/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f (+56/-49) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_compute_loop_coefs.f (+12/-9) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/polynomial.f (+14/-12) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%model_functions.f (+8/-8) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_couplings2.f (+3/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_input.inc (+18/-18) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%mp_intparam_definition.inc (+9/-6) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/CT_interface.f (+10/-10) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/TIR_interface.f (+5/-4) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f (+2/-2) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f (+56/-49) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_compute_loop_coefs.f (+12/-9) tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/polynomial.f (+14/-12) tests/parallel_tests/compare_with_old_mg5_version.py (+1/-1) tests/time_db (+264/-263) vendor/IREGI/src/mis_warp.f90 (+1/-1) |
To merge this branch: | bzr merge lp:~mg5core1/mg5amcnlo/2.7.3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MadTeam | Pending | ||
Review via email: mp+385288@code.launchpad.net |
Commit message
I think that this is time to merge this. (and then update one by one our four release with those fixes).
Description of the change
Rikkert Frederix (frederix) wrote : | # |
Olivier Mattelaer (olivier-mattelaer) wrote : | # |
The four versions are
2.7.2
2.7.2.py3
3.0.2
3.0.2.py3
I guess that we should soon be able to drop the non ".py3" branches (Remember that they do support python2.7, but that's a discussion for our meeting).
Cheers,
Olivier
marco zaro (marco-zaro) wrote : | # |
Hi Olivier,
the py3 versions can be still run with python2?
If so, I agree we can drop the others (we should remember to upgrade all the various plugins to py3)…
Cheers,
Marco
> On 8 Jun 2020, at 18:03, Olivier Mattelaer <email address hidden> wrote:
>
> The four versions are
>
> 2.7.2
> 2.7.2.py3
> 3.0.2
> 3.0.2.py3
>
> I guess that we should soon be able to drop the non ".py3" branches (Remember that they do support python2.7, but that's a discussion for our meeting).
>
> Cheers,
>
> Olivier
> --
> https:/
> Your team mg5core1 is subscribed to branch lp:~mg5core1/mg5amcnlo/2.7.3.
Olivier Mattelaer (olivier-mattelaer) wrote : | # |
Yes,
the releases:
>> 2.7.2 and 3.02
can run with python 2.6 and 2.7
while
>> 2.7.2.py3 and 3.0.2.py3
can run with python 2.7, 3.7 and 3.8
Cheers,
Olivier
> On 8 Jun 2020, at 18:09, marco zaro <email address hidden> wrote:
>
> Hi Olivier,
> the py3 versions can be still run with python2?
> If so, I agree we can drop the others (we should remember to upgrade all the various plugins to py3)…
>
> Cheers,
>
> Marco
>
>> On 8 Jun 2020, at 18:03, Olivier Mattelaer <email address hidden> wrote:
>>
>> The four versions are
>>
>> 2.7.2
>> 2.7.2.py3
>> 3.0.2
>> 3.0.2.py3
>>
>> I guess that we should soon be able to drop the non ".py3" branches (Remember that they do support python2.7, but that's a discussion for our meeting).
>>
>> Cheers,
>>
>> Olivier
>> --
>> https:/
>> Your team mg5core1 is subscribed to branch lp:~mg5core1/mg5amcnlo/2.7.3.
>
>
> --
> https:/
> Your team mg5core1 is subscribed to branch lp:~mg5core1/mg5amcnlo/2.7.3.
- 331. By olivier-mattelaer
-
fix numerical stability issue for T-channel
- 332. By olivier-mattelaer
-
add the install option for the MadSTR plugin
- 333. By olivier-mattelaer
-
allow new function for standalone f2py mode
- 334. By olivier-mattelaer
-
fix an issue with alphas runninng
- 335. By olivier-mattelaer
-
fix gcc version issue
- 336. By olivier-mattelaer
-
fix a bug introduce in the wrong merging of feature for increase numerical stability
- 337. By olivier-mattelaer
-
change default lhef version for merge.pl (from 1 to 3)
- 338. By olivier-mattelaer
-
change a comment referencing a wrong parameter
- 339. By olivier-mattelaer
-
add global_
order_coupling option for MadSPin - 340. By olivier-mattelaer
-
fix an issue for auto width when the path contains a equal sign
- 341. By olivier-mattelaer
-
merge with rwgt_fix to support multi-thread reweighting
- 342. By olivier-mattelaer
-
remove a debug raise Exception that should not have been committed
Rikkert Frederix (frederix) wrote : | # |
Hi Olivier,
I just learned that python 2.7 was released in July 2010 -- that's 10 years ago! I think it's okay to assume that users have upgraded from 2.6 to 2.7 (if they do not want to use 3.X).
Cheers,
Rikkert
- 343. By olivier-mattelaer
-
fix an issue for gridpack in readonly
- 344. By olivier-mattelaer
-
fixing a test for one-loop reweighting (change rwgt model without card now use default model param)
- 345. By olivier-mattelaer
-
1. Fixing some iotest (changing of the fortranwriter)
2. changing diagram filter function at LO
3. fixing some issue with re-weighting - 346. By olivier-mattelaer
-
update tests
- 347. By olivier-mattelaer
-
update version/update note for release
Preview Diff
1 | === modified file 'MadSpin/decay.py' | |||
2 | --- MadSpin/decay.py 2020-01-08 14:13:32 +0000 | |||
3 | +++ MadSpin/decay.py 2020-06-21 12:17:46 +0000 | |||
4 | @@ -544,7 +544,7 @@ | |||
5 | 544 | # record the mass for the reshuffling phase, | 544 | # record the mass for the reshuffling phase, |
6 | 545 | # in case the point passes the reweighting creteria | 545 | # in case the point passes the reweighting creteria |
7 | 546 | tree[tag]["mass"] = m | 546 | tree[tag]["mass"] = m |
9 | 547 | #update the weigth of the phase-space point | 547 | #update the weight of the phase-space point |
10 | 548 | weight=weight*jac | 548 | weight=weight*jac |
11 | 549 | # for checking conservation of energy | 549 | # for checking conservation of energy |
12 | 550 | mass_sum -= m | 550 | mass_sum -= m |
13 | @@ -2749,7 +2749,7 @@ | |||
14 | 2749 | for proc in processes: | 2749 | for proc in processes: |
15 | 2750 | if not proc.strip().startswith(('add','generate')): | 2750 | if not proc.strip().startswith(('add','generate')): |
16 | 2751 | proc = 'add process %s' % proc | 2751 | proc = 'add process %s' % proc |
18 | 2752 | commandline += self.get_proc_with_decay(proc, decay_text, mgcmd._curr_model) | 2752 | commandline += self.get_proc_with_decay(proc, decay_text, mgcmd._curr_model, self.options) |
19 | 2753 | 2753 | ||
20 | 2754 | commandline = commandline.replace('add process', 'generate',1) | 2754 | commandline = commandline.replace('add process', 'generate',1) |
21 | 2755 | logger.info(commandline) | 2755 | logger.info(commandline) |
22 | @@ -2835,7 +2835,7 @@ | |||
23 | 2835 | # assert decay.shell_string() in self.all_decay | 2835 | # assert decay.shell_string() in self.all_decay |
24 | 2836 | 2836 | ||
25 | 2837 | @staticmethod | 2837 | @staticmethod |
27 | 2838 | def get_proc_with_decay(proc, decay_text, model): | 2838 | def get_proc_with_decay(proc, decay_text, model, msoptions=None): |
28 | 2839 | 2839 | ||
29 | 2840 | commands = [] | 2840 | commands = [] |
30 | 2841 | if '[' in proc: | 2841 | if '[' in proc: |
31 | @@ -2880,6 +2880,13 @@ | |||
32 | 2880 | else: | 2880 | else: |
33 | 2881 | baseproc = new_proc | 2881 | baseproc = new_proc |
34 | 2882 | proc_nb = '' | 2882 | proc_nb = '' |
35 | 2883 | |||
36 | 2884 | if msoptions and msoptions['global_order_coupling']: | ||
37 | 2885 | if '@' in proc_nb: | ||
38 | 2886 | proc_nb += " %s" % msoptions['global_order_coupling'] | ||
39 | 2887 | else: | ||
40 | 2888 | proc_nb += " @0 %s" % msoptions['global_order_coupling'] | ||
41 | 2889 | |||
42 | 2883 | nb_comma = baseproc.count(',') | 2890 | nb_comma = baseproc.count(',') |
43 | 2884 | if nb_comma == 0: | 2891 | if nb_comma == 0: |
44 | 2885 | commands.append("%s, %s %s %s" % (baseproc, decay_text, proc_nb, options)) | 2892 | commands.append("%s, %s %s %s" % (baseproc, decay_text, proc_nb, options)) |
45 | @@ -3087,7 +3094,7 @@ | |||
46 | 3087 | for production in self.all_ME.values(): | 3094 | for production in self.all_ME.values(): |
47 | 3088 | decay_set.add(production['decaying']) | 3095 | decay_set.add(production['decaying']) |
48 | 3089 | 3096 | ||
50 | 3090 | numberev = self.options['Nevents_for_max_weigth'] # number of events | 3097 | numberev = self.options['Nevents_for_max_weight'] # number of events |
51 | 3091 | numberps = self.options['max_weight_ps_point'] # number of phase pace points per event | 3098 | numberps = self.options['max_weight_ps_point'] # number of phase pace points per event |
52 | 3092 | 3099 | ||
53 | 3093 | logger.info(' ') | 3100 | logger.info(' ') |
54 | 3094 | 3101 | ||
55 | === modified file 'MadSpin/interface_madspin.py' | |||
56 | --- MadSpin/interface_madspin.py 2020-02-25 14:05:36 +0000 | |||
57 | +++ MadSpin/interface_madspin.py 2020-06-21 12:17:46 +0000 | |||
58 | @@ -60,14 +60,14 @@ | |||
59 | 60 | 60 | ||
60 | 61 | self.add_param("max_weight", -1) | 61 | self.add_param("max_weight", -1) |
61 | 62 | self.add_param('curr_dir', os.path.realpath(os.getcwd())) | 62 | self.add_param('curr_dir', os.path.realpath(os.getcwd())) |
63 | 63 | self.add_param('Nevents_for_max_weigth', 0) | 63 | self.add_param('Nevents_for_max_weight', 0) |
64 | 64 | self.add_param("max_weight_ps_point", 400) | 64 | self.add_param("max_weight_ps_point", 400) |
65 | 65 | self.add_param('BW_cut', -1) | 65 | self.add_param('BW_cut', -1) |
66 | 66 | self.add_param('nb_sigma', 0.) | 66 | self.add_param('nb_sigma', 0.) |
67 | 67 | self.add_param('ms_dir', '') | 67 | self.add_param('ms_dir', '') |
68 | 68 | self.add_param('max_running_process', 100) | 68 | self.add_param('max_running_process', 100) |
69 | 69 | self.add_param('onlyhelicity', False) | 69 | self.add_param('onlyhelicity', False) |
71 | 70 | self.add_param('spinmode', "madspin", allowed=['madspin','none','onshell']) | 70 | self.add_param('spinmode', "madspin", allowed=['full','madspin','none','onshell']) |
72 | 71 | self.add_param('use_old_dir', False, comment='should be use only for faster debugging') | 71 | self.add_param('use_old_dir', False, comment='should be use only for faster debugging') |
73 | 72 | self.add_param('run_card', '' , comment='define cut for spinmode==none. Path to run_card to use') | 72 | self.add_param('run_card', '' , comment='define cut for spinmode==none. Path to run_card to use') |
74 | 73 | self.add_param('fixed_order', False, comment='to activate fixed order handling of counter-event') | 73 | self.add_param('fixed_order', False, comment='to activate fixed order handling of counter-event') |
75 | @@ -76,6 +76,7 @@ | |||
76 | 76 | self.add_param('new_wgt', 'cross-section' ,allowed=['cross-section', 'BR'], comment="if not consistent number of particles, choose what to do for the weight. (BR: means local according to number of part, cross use the force cross-section") | 76 | self.add_param('new_wgt', 'cross-section' ,allowed=['cross-section', 'BR'], comment="if not consistent number of particles, choose what to do for the weight. (BR: means local according to number of part, cross use the force cross-section") |
77 | 77 | self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner']) | 77 | self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner']) |
78 | 78 | self.add_param('frame_id', 6) | 78 | self.add_param('frame_id', 6) |
79 | 79 | self.add_param('global_order_coupling', '') | ||
80 | 79 | 80 | ||
81 | 80 | ############################################################################ | 81 | ############################################################################ |
82 | 81 | ## Special post-processing of the options ## | 82 | ## Special post-processing of the options ## |
83 | @@ -137,8 +138,8 @@ | |||
84 | 137 | 138 | ||
85 | 138 | self.decay = madspin.decay_misc() | 139 | self.decay = madspin.decay_misc() |
86 | 139 | self.model = None | 140 | self.model = None |
89 | 140 | self.mode = "madspin" # can be flat/bridge change the way the decay is done. | 141 | #self.mode = "madspin" # can be flat/bridge change the way the decay is done. |
90 | 141 | # note amc@nlo does not support bridge. | 142 | # # note amc@nlo does not support bridge. |
91 | 142 | 143 | ||
92 | 143 | self.options = MadSpinOptions() | 144 | self.options = MadSpinOptions() |
93 | 144 | 145 | ||
94 | @@ -227,10 +228,10 @@ | |||
95 | 227 | 228 | ||
96 | 228 | if 'mgruncard' in self.banner: | 229 | if 'mgruncard' in self.banner: |
97 | 229 | run_card = self.banner.charge_card('run_card') | 230 | run_card = self.banner.charge_card('run_card') |
99 | 230 | if not self.options['Nevents_for_max_weigth']: | 231 | if not self.options['Nevents_for_max_weight']: |
100 | 231 | nevents = run_card['nevents'] | 232 | nevents = run_card['nevents'] |
101 | 232 | N_weight = max([75, int(3*nevents**(1/3))]) | 233 | N_weight = max([75, int(3*nevents**(1/3))]) |
103 | 233 | self.options['Nevents_for_max_weigth'] = N_weight | 234 | self.options['Nevents_for_max_weight'] = N_weight |
104 | 234 | N_sigma = max(4.5, math.log(nevents,7.7)) | 235 | N_sigma = max(4.5, math.log(nevents,7.7)) |
105 | 235 | self.options['nb_sigma'] = N_sigma | 236 | self.options['nb_sigma'] = N_sigma |
106 | 236 | if self.options['BW_cut'] == -1: | 237 | if self.options['BW_cut'] == -1: |
107 | @@ -242,8 +243,8 @@ | |||
108 | 242 | else: | 243 | else: |
109 | 243 | self.options['frame_id'] = 6 | 244 | self.options['frame_id'] = 6 |
110 | 244 | else: | 245 | else: |
113 | 245 | if not self.options['Nevents_for_max_weigth']: | 246 | if not self.options['Nevents_for_max_weight']: |
114 | 246 | self.options['Nevents_for_max_weigth'] = 75 | 247 | self.options['Nevents_for_max_weight'] = 75 |
115 | 247 | self.options['nb_sigma'] = 4.5 | 248 | self.options['nb_sigma'] = 4.5 |
116 | 248 | if self.options['BW_cut'] == -1: | 249 | if self.options['BW_cut'] == -1: |
117 | 249 | self.options['BW_cut'] = 15.0 | 250 | self.options['BW_cut'] = 15.0 |
118 | @@ -314,7 +315,7 @@ | |||
119 | 314 | key = line.split()[1] | 315 | key = line.split()[1] |
120 | 315 | if key in self.multiparticles_ms: | 316 | if key in self.multiparticles_ms: |
121 | 316 | del self.multiparticles_ms[key] | 317 | del self.multiparticles_ms[key] |
123 | 317 | elif line.startswith('set'): | 318 | elif line.startswith('set') and not line.startswith('set gauge'): |
124 | 318 | self.mg5cmd.exec_cmd(line, printcmd=False, precmd=False, postcmd=False) | 319 | self.mg5cmd.exec_cmd(line, printcmd=False, precmd=False, postcmd=False) |
125 | 319 | elif line.startswith('import model'): | 320 | elif line.startswith('import model'): |
126 | 320 | if model_name in line: | 321 | if model_name in line: |
127 | @@ -458,7 +459,7 @@ | |||
128 | 458 | raise self.InvalidCmd('second argument should be a path to a existing directory') | 459 | raise self.InvalidCmd('second argument should be a path to a existing directory') |
129 | 459 | 460 | ||
130 | 460 | elif args[0] == "spinmode": | 461 | elif args[0] == "spinmode": |
132 | 461 | if args[1].lower() not in ["full", "onshell", "none"]: | 462 | if args[1].lower() not in ["full", "onshell", "none", "madspin"]: |
133 | 462 | raise self.InvalidCmd("spinmode can only take one of those 3 value: full/onshell/none") | 463 | raise self.InvalidCmd("spinmode can only take one of those 3 value: full/onshell/none") |
134 | 463 | 464 | ||
135 | 464 | elif args[0] == "run_card": | 465 | elif args[0] == "run_card": |
136 | @@ -471,6 +472,8 @@ | |||
137 | 471 | arg, value = data.split("=") | 472 | arg, value = data.split("=") |
138 | 472 | args.append(arg) | 473 | args.append(arg) |
139 | 473 | args.append(value) | 474 | args.append(value) |
140 | 475 | elif args[0] == 'Nevents_for_max_weigth': | ||
141 | 476 | args[0] = 'Nevents_for_max_weight' | ||
142 | 474 | 477 | ||
143 | 475 | def do_set(self, line): | 478 | def do_set(self, line): |
144 | 476 | """ add one of the options """ | 479 | """ add one of the options """ |
145 | @@ -1204,7 +1207,6 @@ | |||
146 | 1204 | run_card = self.run_card | 1207 | run_card = self.run_card |
147 | 1205 | else: | 1208 | else: |
148 | 1206 | run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat")) | 1209 | run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat")) |
149 | 1207 | |||
150 | 1208 | run_card["iseed"] = self.options['seed'] | 1210 | run_card["iseed"] = self.options['seed'] |
151 | 1209 | run_card['gridpack'] = True | 1211 | run_card['gridpack'] = True |
152 | 1210 | run_card['systematics_program'] = 'False' | 1212 | run_card['systematics_program'] = 'False' |
153 | @@ -1213,6 +1215,7 @@ | |||
154 | 1213 | param_card = self.banner['slha'] | 1215 | param_card = self.banner['slha'] |
155 | 1214 | open(pjoin(decay_dir, "Cards", "param_card.dat"),"w").write(param_card) | 1216 | open(pjoin(decay_dir, "Cards", "param_card.dat"),"w").write(param_card) |
156 | 1215 | self.options['seed'] += 1 | 1217 | self.options['seed'] += 1 |
157 | 1218 | self.seed = self.options['seed'] | ||
158 | 1216 | # actually creation | 1219 | # actually creation |
159 | 1217 | me5_cmd.exec_cmd("generate_events run_01 -f") | 1220 | me5_cmd.exec_cmd("generate_events run_01 -f") |
160 | 1218 | if output_width: | 1221 | if output_width: |
161 | @@ -1222,9 +1225,11 @@ | |||
162 | 1222 | width *= me5_cmd.results.current['cross'] | 1225 | width *= me5_cmd.results.current['cross'] |
163 | 1223 | me5_cmd.exec_cmd("exit") | 1226 | me5_cmd.exec_cmd("exit") |
164 | 1224 | #remove pointless informat | 1227 | #remove pointless informat |
168 | 1225 | misc.call(["rm", "Cards", "bin", 'Source', 'SubProcesses'], cwd=decay_dir) | 1228 | if not os.path.exists(pjoin(decay_dir, 'run.sh')): |
169 | 1226 | misc.call(['tar', '-xzpvf', 'run_01_gridpack.tar.gz'], cwd=decay_dir) | 1229 | devnull = open('/dev/null','w') |
170 | 1227 | 1230 | misc.call(["rm", "Cards", "bin", 'Source', 'SubProcesses'], cwd=decay_dir,stdout=devnull, stderr=-2) | |
171 | 1231 | misc.call(['tar', '-xzpvf', 'run_01_gridpack.tar.gz'], cwd=decay_dir,stdout=devnull, stderr=-2) | ||
172 | 1232 | devnull.close() | ||
173 | 1228 | # Now generate the events | 1233 | # Now generate the events |
174 | 1229 | if not self.options['ms_dir']: | 1234 | if not self.options['ms_dir']: |
175 | 1230 | if decay_dir in self.me_int: | 1235 | if decay_dir in self.me_int: |
176 | @@ -1364,7 +1369,7 @@ | |||
177 | 1364 | 1369 | ||
178 | 1365 | 1370 | ||
179 | 1366 | # 2. Generate the events requested | 1371 | # 2. Generate the events requested |
181 | 1367 | nevents_for_max = self.options['Nevents_for_max_weigth'] | 1372 | nevents_for_max = self.options['Nevents_for_max_weight'] |
182 | 1368 | if nevents_for_max == 0 : | 1373 | if nevents_for_max == 0 : |
183 | 1369 | nevents_for_max = 75 | 1374 | nevents_for_max = 75 |
184 | 1370 | nevents_for_max *= self.options['max_weight_ps_point'] | 1375 | nevents_for_max *= self.options['max_weight_ps_point'] |
185 | @@ -1460,8 +1465,8 @@ | |||
186 | 1460 | production, counterevt= production[0], production[1:] | 1465 | production, counterevt= production[0], production[1:] |
187 | 1461 | if curr_event and self.efficiency and curr_event % 10 == 0 and float(str(curr_event)[1:]) ==0: | 1466 | if curr_event and self.efficiency and curr_event % 10 == 0 and float(str(curr_event)[1:]) ==0: |
188 | 1462 | logger.info("decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start)) | 1467 | logger.info("decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start)) |
191 | 1463 | else: | 1468 | #else: |
192 | 1464 | logger.info("next event [%s]", time.time()-start) | 1469 | # logger.info("next event [%s]", time.time()-start) |
193 | 1465 | while 1: | 1470 | while 1: |
194 | 1466 | nb_try +=1 | 1471 | nb_try +=1 |
195 | 1467 | decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event) | 1472 | decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event) |
196 | @@ -1559,7 +1564,7 @@ | |||
197 | 1559 | if self.options['ms_dir'] and os.path.exists(pjoin(self.options['ms_dir'], 'max_wgt')): | 1564 | if self.options['ms_dir'] and os.path.exists(pjoin(self.options['ms_dir'], 'max_wgt')): |
198 | 1560 | return float(open(pjoin(self.options['ms_dir'], 'max_wgt'),'r').read()) | 1565 | return float(open(pjoin(self.options['ms_dir'], 'max_wgt'),'r').read()) |
199 | 1561 | 1566 | ||
201 | 1562 | nevents = self.options['Nevents_for_max_weigth'] | 1567 | nevents = self.options['Nevents_for_max_weight'] |
202 | 1563 | if nevents == 0 : | 1568 | if nevents == 0 : |
203 | 1564 | nevents = 75 | 1569 | nevents = 75 |
204 | 1565 | 1570 | ||
205 | @@ -1700,7 +1705,7 @@ | |||
206 | 1700 | decay_text.append('(%s)' % decay) | 1705 | decay_text.append('(%s)' % decay) |
207 | 1701 | else: | 1706 | else: |
208 | 1702 | decay_text.append(decay) | 1707 | decay_text.append(decay) |
210 | 1703 | processes_decay.append(decay) | 1708 | processes_decay.append(decay) |
211 | 1704 | decay_text = ', '.join(decay_text) | 1709 | decay_text = ', '.join(decay_text) |
212 | 1705 | processes += [] | 1710 | processes += [] |
213 | 1706 | 1711 | ||
214 | @@ -1715,12 +1720,15 @@ | |||
215 | 1715 | except ValueError: | 1720 | except ValueError: |
216 | 1716 | raise MadSpinError, 'MadSpin didn\'t allow order restriction after the @ comment: \"%s\" not valid' % proc_nb | 1721 | raise MadSpinError, 'MadSpin didn\'t allow order restriction after the @ comment: \"%s\" not valid' % proc_nb |
217 | 1717 | proc_nb = '@ %i' % proc_nb | 1722 | proc_nb = '@ %i' % proc_nb |
218 | 1723 | if self.options['global_order_coupling']: | ||
219 | 1724 | proc_nb = '%s %s' % (proc_nb, self.options['global_order_coupling']) | ||
220 | 1718 | else: | 1725 | else: |
222 | 1719 | proc_nb = '' | 1726 | if self.options['global_order_coupling']: |
223 | 1727 | proc_nb = '@0 %s ' % self.options['global_order_coupling'] | ||
224 | 1720 | 1728 | ||
225 | 1721 | rwgt_interface.ReweightInterface.get_LO_definition_from_NLO() | 1729 | rwgt_interface.ReweightInterface.get_LO_definition_from_NLO() |
226 | 1722 | 1730 | ||
228 | 1723 | 1731 | raise Exception | |
229 | 1724 | 1732 | ||
230 | 1725 | if __name__ == '__main__': | 1733 | if __name__ == '__main__': |
231 | 1726 | 1734 | ||
232 | 1727 | 1735 | ||
233 | === modified file 'Template/Common/Cards/madspin_card_default.dat' | |||
234 | --- Template/Common/Cards/madspin_card_default.dat 2017-01-13 09:56:03 +0000 | |||
235 | +++ Template/Common/Cards/madspin_card_default.dat 2020-06-21 12:17:46 +0000 | |||
236 | @@ -14,7 +14,7 @@ | |||
237 | 14 | #Some options (uncomment to apply) | 14 | #Some options (uncomment to apply) |
238 | 15 | # | 15 | # |
239 | 16 | # set seed 1 | 16 | # set seed 1 |
241 | 17 | # set Nevents_for_max_weigth 75 # number of events for the estimate of the max. weight | 17 | # set Nevents_for_max_weight 75 # number of events for the estimate of the max. weight |
242 | 18 | # set BW_cut 15 # cut on how far the particle can be off-shell | 18 | # set BW_cut 15 # cut on how far the particle can be off-shell |
243 | 19 | # set spinmode onshell # Use one of the madspin special mode | 19 | # set spinmode onshell # Use one of the madspin special mode |
244 | 20 | set max_weight_ps_point 400 # number of PS to estimate the maximum for each event | 20 | set max_weight_ps_point 400 # number of PS to estimate the maximum for each event |
245 | 21 | 21 | ||
246 | === modified file 'Template/LO/Cards/run_card.dat' | |||
247 | --- Template/LO/Cards/run_card.dat 2020-01-10 20:02:44 +0000 | |||
248 | +++ Template/LO/Cards/run_card.dat 2020-06-21 12:17:46 +0000 | |||
249 | @@ -165,7 +165,8 @@ | |||
250 | 165 | %(mmnl)s = mmnl ! min invariant mass for all letpons (l+- and vl) | 165 | %(mmnl)s = mmnl ! min invariant mass for all letpons (l+- and vl) |
251 | 166 | %(mmnlmax)s = mmnlmax ! max invariant mass for all letpons (l+- and vl) | 166 | %(mmnlmax)s = mmnlmax ! max invariant mass for all letpons (l+- and vl) |
252 | 167 | #IF(LL)# #********************************************************************* | 167 | #IF(LL)# #********************************************************************* |
254 | 168 | #IF(LL)# # Minimum and maximum pt for 4-momenta sum of leptons * | 168 | #IF(LL)# # Minimum and maximum pt for 4-momenta sum of leptons / neutrino * |
255 | 169 | #IF(LL)# # for pair of lepton includes only same flavor, opposite charge | ||
256 | 169 | #IF(LL)# #********************************************************************* | 170 | #IF(LL)# #********************************************************************* |
257 | 170 | %(ptllmin)s = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl) | 171 | %(ptllmin)s = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl) |
258 | 171 | %(ptllmax)s = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl) | 172 | %(ptllmax)s = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl) |
259 | 172 | 173 | ||
260 | === modified file 'Template/LO/Source/PDF/PhotonFlux.f' | |||
261 | --- Template/LO/Source/PDF/PhotonFlux.f 2019-12-04 21:34:25 +0000 | |||
262 | +++ Template/LO/Source/PDF/PhotonFlux.f 2020-06-21 12:17:46 +0000 | |||
263 | @@ -1,7 +1,8 @@ | |||
264 | 1 | c/* ********************************************************* */ | 1 | c/* ********************************************************* */ |
265 | 2 | c/* Equivalent photon approximation structure function. * */ | 2 | c/* Equivalent photon approximation structure function. * */ |
266 | 3 | c/* V.M.Budnev et al., Phys.Rep. 15C (1975) 181 * */ | ||
267 | 3 | c/* Improved Weizsaecker-Williams formula * */ | 4 | c/* Improved Weizsaecker-Williams formula * */ |
269 | 4 | c/* V.M.Budnev et al., Phys.Rep. 15C (1975) 181 * */ | 5 | c/* http://inspirehep.net/record/359425 * */ |
270 | 5 | c/* ********************************************************* */ | 6 | c/* ********************************************************* */ |
271 | 6 | c provided by Tomasz Pierzchala - UCL | 7 | c provided by Tomasz Pierzchala - UCL |
272 | 7 | 8 | ||
273 | 8 | 9 | ||
274 | === modified file 'Template/LO/Source/PDF/makefile' | |||
275 | --- Template/LO/Source/PDF/makefile 2018-01-26 23:06:46 +0000 | |||
276 | +++ Template/LO/Source/PDF/makefile 2020-06-21 12:17:46 +0000 | |||
277 | @@ -12,9 +12,14 @@ | |||
278 | 12 | 12 | ||
279 | 13 | ifdef lhapdf | 13 | ifdef lhapdf |
280 | 14 | ifeq ($(lhapdfversion),5) | 14 | ifeq ($(lhapdfversion),5) |
282 | 15 | PDF = pdfwrap_lhapdf.o pdf_lhapdf.o pdg2pdf_lhapdf.o opendata.o PhotonFlux.o | 15 | $(error Bad lhadpfversion version 6 is now required) |
283 | 16 | else | 16 | else |
285 | 17 | PDF = pdfwrap_lhapdf.o pdf_lhapdf6.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o | 17 | ifeq ($(lhapdfsubversion),1) # 6.1.X |
286 | 18 | PDF = pdfwrap_lhapdf.o pdf_lhapdf6.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o | ||
287 | 19 | else # 6.2.X | ||
288 | 20 | CXXFLAGS+=-std=c++11 | ||
289 | 21 | PDF = pdfwrap_lhapdf.o pdf_lhapdf62.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o | ||
290 | 22 | endif | ||
291 | 18 | endif | 23 | endif |
292 | 19 | else | 24 | else |
293 | 20 | PDF = Ctq6Pdf.o pdfwrap.o opendata.o pdf.o PhotonFlux.o pdg2pdf.o NNPDFDriver.o | 25 | PDF = Ctq6Pdf.o pdfwrap.o opendata.o pdf.o PhotonFlux.o pdg2pdf.o NNPDFDriver.o |
294 | 21 | 26 | ||
295 | === added file 'Template/LO/Source/PDF/pdf_lhapdf62.cc' | |||
296 | --- Template/LO/Source/PDF/pdf_lhapdf62.cc 1970-01-01 00:00:00 +0000 | |||
297 | +++ Template/LO/Source/PDF/pdf_lhapdf62.cc 2020-06-21 12:17:46 +0000 | |||
298 | @@ -0,0 +1,1569 @@ | |||
299 | 1 | // -*- C++ -*- | ||
300 | 2 | // | ||
301 | 3 | // This file is part of LHAPDF | ||
302 | 4 | // Copyright (C) 2012-2016 The LHAPDF collaboration (see AUTHORS for details) | ||
303 | 5 | // | ||
304 | 6 | #include "LHAPDF/PDF.h" | ||
305 | 7 | #include "LHAPDF/PDFSet.h" | ||
306 | 8 | #include "LHAPDF/PDFIndex.h" | ||
307 | 9 | #include "LHAPDF/Factories.h" | ||
308 | 10 | #include "LHAPDF/Utils.h" | ||
309 | 11 | #include "LHAPDF/Paths.h" | ||
310 | 12 | #include "LHAPDF/Version.h" | ||
311 | 13 | #include "LHAPDF/LHAGlue.h" | ||
312 | 14 | #include <cstring> | ||
313 | 15 | |||
314 | 16 | using namespace std; | ||
315 | 17 | |||
316 | 18 | |||
317 | 19 | // We have to create and initialise some common blocks here for backwards compatibility | ||
318 | 20 | struct w50512 { | ||
319 | 21 | double qcdl4, qcdl5; | ||
320 | 22 | }; | ||
321 | 23 | w50512 w50512_; | ||
322 | 24 | |||
323 | 25 | struct w50513 { | ||
324 | 26 | double xmin, xmax, q2min, q2max; | ||
325 | 27 | }; | ||
326 | 28 | w50513 w50513_; | ||
327 | 29 | |||
328 | 30 | struct lhapdfr { | ||
329 | 31 | double qcdlha4, qcdlha5; | ||
330 | 32 | int nfllha; | ||
331 | 33 | }; | ||
332 | 34 | lhapdfr lhapdfr_; | ||
333 | 35 | |||
334 | 36 | |||
335 | 37 | |||
336 | 38 | namespace { //< Unnamed namespace to restrict visibility to this file | ||
337 | 39 | |||
338 | 40 | |||
339 | 41 | /// @brief PDF object storage here is a smart pointer to ensure deletion of created PDFs | ||
340 | 42 | typedef std::shared_ptr<LHAPDF::PDF> PDFPtr; | ||
341 | 43 | |||
342 | 44 | |||
343 | 45 | /// @brief A struct for handling the active PDFs for the Fortran interface. | ||
344 | 46 | /// | ||
345 | 47 | /// We operate in a string-based way, since maybe there will be sets with names, but no | ||
346 | 48 | /// index entry in pdfsets.index. | ||
347 | 49 | /// | ||
348 | 50 | /// @todo Can we avoid the strings and just work via the LHAPDF ID and factory construction? | ||
349 | 51 | /// | ||
350 | 52 | /// Smart pointers are used in the native map used for PDF member storage so | ||
351 | 53 | /// that they auto-delete if the PDFSetHandler that holds them goes out of | ||
352 | 54 | /// scope (i.e. is overwritten). | ||
353 | 55 | struct PDFSetHandler { | ||
354 | 56 | |||
355 | 57 | /// Default constructor | ||
356 | 58 | /// | ||
357 | 59 | /// It'll be stored in a map so we need one of these... | ||
358 | 60 | PDFSetHandler() : currentmem(0) | ||
359 | 61 | { } | ||
360 | 62 | |||
361 | 63 | /// Constructor from a PDF set name | ||
362 | 64 | /// | ||
363 | 65 | /// @note If the set name contains a member specification, i.e. myname/2, | ||
364 | 66 | /// that member rather than the central one will be initialised and made | ||
365 | 67 | /// current. | ||
366 | 68 | PDFSetHandler(const string& name) { | ||
367 | 69 | pair<string, int> set_mem = LHAPDF::lookupPDF(name); | ||
368 | 70 | // First check that the lookup was successful, i.e. it was a valid ID for the LHAPDF6 set collection | ||
369 | 71 | if (set_mem.first.empty() || set_mem.second < 0) | ||
370 | 72 | throw LHAPDF::UserError("Could not find a valid PDF with string = " + name); | ||
371 | 73 | // Try to load this PDF | ||
372 | 74 | setname = set_mem.first; | ||
373 | 75 | loadMember(set_mem.second); | ||
374 | 76 | } | ||
375 | 77 | |||
376 | 78 | /// Constructor from a PDF set's LHAPDF ID code | ||
377 | 79 | /// | ||
378 | 80 | /// @note The set member given by the ID (rather than the central one) will | ||
379 | 81 | /// be initialised and made current. | ||
380 | 82 | PDFSetHandler(int lhaid) { | ||
381 | 83 | pair<string,int> set_mem = LHAPDF::lookupPDF(lhaid); | ||
382 | 84 | // First check that the lookup was successful, i.e. it was a valid ID for the LHAPDF6 set collection | ||
383 | 85 | if (set_mem.first.empty() || set_mem.second < 0) | ||
384 | 86 | throw LHAPDF::UserError("Could not find a valid PDF with LHAPDF ID = " + LHAPDF::to_str(lhaid)); | ||
385 | 87 | // Try to load this PDF | ||
386 | 88 | setname = set_mem.first; | ||
387 | 89 | loadMember(set_mem.second); | ||
388 | 90 | } | ||
389 | 91 | |||
390 | 92 | /// @brief Load a new PDF member, set it to be active | ||
391 | 93 | /// | ||
392 | 94 | /// If it's already loaded, the existing object will not be reloaded. | ||
393 | 95 | void loadMember(int mem) { | ||
394 | 96 | if (mem < 0) | ||
395 | 97 | throw LHAPDF::UserError("Tried to load a negative PDF member ID: " + LHAPDF::to_str(mem) + " in set " + setname); | ||
396 | 98 | if (members.find(mem) == members.end()) | ||
397 | 99 | members[mem] = PDFPtr(LHAPDF::mkPDF(setname, mem)); | ||
398 | 100 | currentmem = mem; | ||
399 | 101 | //return members[mem]; | ||
400 | 102 | } | ||
401 | 103 | |||
402 | 104 | /// Actively delete a PDF member to save memory, set the active member to be the next available, or 0 | ||
403 | 105 | void unloadMember(int mem) { | ||
404 | 106 | members.erase(mem); | ||
405 | 107 | const int nextmem = (!members.empty()) ? members.begin()->first : 0; | ||
406 | 108 | loadMember(nextmem); | ||
407 | 109 | } | ||
408 | 110 | |||
409 | 111 | /// @brief Get a PDF member, making it active | ||
410 | 112 | /// | ||
411 | 113 | /// Non-const because it can secretly load the member. Not that constness | ||
412 | 114 | /// matters in a Fortran interface utility function! | ||
413 | 115 | const PDFPtr member(int mem) { | ||
414 | 116 | loadMember(mem); | ||
415 | 117 | return members.find(mem)->second; | ||
416 | 118 | } | ||
417 | 119 | |||
418 | 120 | /// Get the currently active PDF member | ||
419 | 121 | /// | ||
420 | 122 | /// Non-const because it can secretly load the member. Not that constness | ||
421 | 123 | /// matters in a Fortran interface utility function! | ||
422 | 124 | const PDFPtr activeMember() { | ||
423 | 125 | return member(currentmem); | ||
424 | 126 | } | ||
425 | 127 | |||
426 | 128 | /// Get the currently active PDF member | ||
427 | 129 | /// | ||
428 | 130 | /// Non-const because it can secretly load the member. Not that constness | ||
429 | 131 | /// matters in a Fortran interface utility function! | ||
430 | 132 | void setActiveMember(int mem) { | ||
431 | 133 | loadMember(mem); | ||
432 | 134 | } | ||
433 | 135 | |||
434 | 136 | /// The currently active member in this set | ||
435 | 137 | int currentmem; | ||
436 | 138 | |||
437 | 139 | /// Name of this set | ||
438 | 140 | string setname; | ||
439 | 141 | |||
440 | 142 | /// Map of pointers to selected member PDFs | ||
441 | 143 | /// | ||
442 | 144 | // /// It's mutable so that a "const" member-getting operation can implicitly | ||
443 | 145 | // /// load a new PDF object. Good idea / bad idea? Disabled for now. | ||
444 | 146 | // mutable map<int, PDFPtr> members; | ||
445 | 147 | map<int, PDFPtr> members; | ||
446 | 148 | }; | ||
447 | 149 | |||
448 | 150 | |||
449 | 151 | /// Collection of active sets | ||
450 | 152 | static map<int, PDFSetHandler> ACTIVESETS; | ||
451 | 153 | |||
452 | 154 | /// The currently active set | ||
453 | 155 | int CURRENTSET = 0; | ||
454 | 156 | |||
455 | 157 | } | ||
456 | 158 | |||
457 | 159 | |||
458 | 160 | |||
459 | 161 | string lhaglue_get_current_pdf(int nset) { | ||
460 | 162 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
461 | 163 | return "NONE"; | ||
462 | 164 | CURRENTSET = nset; | ||
463 | 165 | return ACTIVESETS[nset].activeMember()->set().name() + " (" + | ||
464 | 166 | LHAPDF::to_str(ACTIVESETS[nset].activeMember()->lhapdfID()) + ")"; | ||
465 | 167 | } | ||
466 | 168 | |||
467 | 169 | |||
468 | 170 | |||
469 | 171 | namespace { | ||
470 | 172 | |||
471 | 173 | |||
472 | 174 | /// C-string -> Fortran-string converter | ||
473 | 175 | /// | ||
474 | 176 | /// Credit: https://stackoverflow.com/questions/10163485/passing-char-arrays-from-c-to-fortran | ||
475 | 177 | void cstr_to_fstr(const char* cstring, char* fstring, std::size_t fstring_len) { | ||
476 | 178 | std::size_t inlen = std::strlen(cstring); | ||
477 | 179 | std::size_t cpylen = std::min(inlen, fstring_len); | ||
478 | 180 | // TODO: truncation error or warning | ||
479 | 181 | //if (inlen > fstring_len) FOOOOO(); | ||
480 | 182 | std::copy(cstring, cstring+cpylen, fstring); | ||
481 | 183 | std::fill(fstring+cpylen, fstring+fstring_len, ' '); | ||
482 | 184 | } | ||
483 | 185 | |||
484 | 186 | |||
485 | 187 | /// C++-string -> Fortran-string converter | ||
486 | 188 | void ccstr_to_fstr(const string& ccstring, char* fstring, std::size_t fstring_len) { | ||
487 | 189 | const char* cstring = ccstring.c_str(); | ||
488 | 190 | cstr_to_fstr(cstring, fstring, fstring_len); | ||
489 | 191 | } | ||
490 | 192 | |||
491 | 193 | |||
492 | 194 | /// Fortran-string -> C++-string converter | ||
493 | 195 | string fstr_to_ccstr(const char* fstring, const std::size_t fstring_len, bool spcpad=false) { | ||
494 | 196 | // Allocate space for an equivalent C-string (with an extra terminating null byte) | ||
495 | 197 | char* s = new char[fstring_len+1]; | ||
496 | 198 | // Copy all characters and add the terminating null byte | ||
497 | 199 | strncpy(s, fstring, fstring_len); | ||
498 | 200 | s[fstring_len] = '\0'; | ||
499 | 201 | // Replace all trailing spaces with null bytes unless explicitly stopped | ||
500 | 202 | if (!spcpad) { | ||
501 | 203 | for (int i = fstring_len-1; i >= 0; --i) { | ||
502 | 204 | if (s[i] != ' ') break; | ||
503 | 205 | s[i] = '\0'; | ||
504 | 206 | } | ||
505 | 207 | } | ||
506 | 208 | string rtn(s); //< copy the result to a C++ string | ||
507 | 209 | delete[] s; //< clean up the dynamic array | ||
508 | 210 | return rtn; | ||
509 | 211 | } | ||
510 | 212 | |||
511 | 213 | |||
512 | 214 | } | ||
513 | 215 | |||
514 | 216 | |||
515 | 217 | extern "C" { | ||
516 | 218 | |||
517 | 219 | |||
518 | 220 | // NEW FORTRAN INTERFACE FUNCTIONS | ||
519 | 221 | |||
520 | 222 | /// Get the LHAPDF library version as a string | ||
521 | 223 | void lhapdf_getversion_(char* s, size_t len) { | ||
522 | 224 | cstr_to_fstr(LHAPDF_VERSION, s, len); | ||
523 | 225 | } | ||
524 | 226 | |||
525 | 227 | |||
526 | 228 | /// List of available PDF sets, returned as a space-separated string | ||
527 | 229 | void lhapdf_getpdfsetlist_(char* s, size_t len) { | ||
528 | 230 | string liststr; | ||
529 | 231 | for (const string& setname : LHAPDF::availablePDFSets()) { | ||
530 | 232 | if (!liststr.empty()) liststr += " "; | ||
531 | 233 | liststr += setname; | ||
532 | 234 | } | ||
533 | 235 | ccstr_to_fstr(liststr, s, len); | ||
534 | 236 | } | ||
535 | 237 | |||
536 | 238 | |||
537 | 239 | /// Get PDF data path (colon-separated if there is more than one element) | ||
538 | 240 | void lhapdf_getdatapath_(char* s, size_t len) { | ||
539 | 241 | string pathstr; | ||
540 | 242 | for (const string& path : LHAPDF::paths()) { | ||
541 | 243 | if (!pathstr.empty()) pathstr += ":"; | ||
542 | 244 | pathstr += path; | ||
543 | 245 | } | ||
544 | 246 | ccstr_to_fstr(pathstr, s, len); | ||
545 | 247 | } | ||
546 | 248 | |||
547 | 249 | /// Set PDF data path(s) | ||
548 | 250 | void lhapdf_setdatapath_(const char* s, size_t len) { | ||
549 | 251 | LHAPDF::setPaths(fstr_to_ccstr(s, len)); | ||
550 | 252 | } | ||
551 | 253 | |||
552 | 254 | /// Prepend to PDF data path | ||
553 | 255 | void lhapdf_prependdatapath_(const char* s, size_t len) { | ||
554 | 256 | LHAPDF::pathsPrepend(fstr_to_ccstr(s, len)); | ||
555 | 257 | } | ||
556 | 258 | |||
557 | 259 | /// Append to PDF data path | ||
558 | 260 | void lhapdf_appenddatapath_(const char* s, size_t len) { | ||
559 | 261 | LHAPDF::pathsAppend(fstr_to_ccstr(s, len)); | ||
560 | 262 | } | ||
561 | 263 | |||
562 | 264 | |||
563 | 265 | //------------------ | ||
564 | 266 | |||
565 | 267 | |||
566 | 268 | void lhapdf_initpdfset_byname_(const int& nset, const char* name, int namelength) { | ||
567 | 269 | const string cname = fstr_to_ccstr(name, namelength); | ||
568 | 270 | ACTIVESETS[nset] = PDFSetHandler(cname); | ||
569 | 271 | CURRENTSET = nset; | ||
570 | 272 | } | ||
571 | 273 | |||
572 | 274 | void lhapdf_initpdfset_byid_(const int& nset, const int& lhaid) { | ||
573 | 275 | ACTIVESETS[nset] = PDFSetHandler(lhaid); | ||
574 | 276 | CURRENTSET = nset; | ||
575 | 277 | } | ||
576 | 278 | |||
577 | 279 | void lhapdf_delpdfset_(const int& nset) { | ||
578 | 280 | ACTIVESETS.erase(nset); | ||
579 | 281 | CURRENTSET = 0; | ||
580 | 282 | } | ||
581 | 283 | |||
582 | 284 | void lhapdf_delpdf_(const int& nset, const int& nmem) { | ||
583 | 285 | CURRENTSET = nset; | ||
584 | 286 | ACTIVESETS[CURRENTSET].unloadMember(nmem); | ||
585 | 287 | } | ||
586 | 288 | |||
587 | 289 | |||
588 | 290 | //------------------ | ||
589 | 291 | |||
590 | 292 | |||
591 | 293 | void lhapdf_hasflavor(const int& nset, const int& nmem, const int& pid, int& rtn) { | ||
592 | 294 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
593 | 295 | throw LHAPDF::UserError("Trying to use set slot " + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
594 | 296 | rtn = ACTIVESETS[nset].member(nmem)->hasFlavor(pid) ? 1 : 0; | ||
595 | 297 | // Update current set focus | ||
596 | 298 | CURRENTSET = nset; | ||
597 | 299 | } | ||
598 | 300 | |||
599 | 301 | |||
600 | 302 | void lhapdf_xfxq2_(const int& nset, const int& nmem, const int& pid, const double& x, const double& q2, double& xf) { | ||
601 | 303 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
602 | 304 | throw LHAPDF::UserError("Trying to use set slot " + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
603 | 305 | try { | ||
604 | 306 | xf = ACTIVESETS[nset].member(nmem)->xfxQ2(pid, x, q2); | ||
605 | 307 | } catch (const exception& e) { | ||
606 | 308 | xf = 0; | ||
607 | 309 | } | ||
608 | 310 | // Update current set focus | ||
609 | 311 | CURRENTSET = nset; | ||
610 | 312 | } | ||
611 | 313 | |||
612 | 314 | void lhapdf_xfxq_(const int& nset, const int& nmem, const int& pid, const double& x, const double& q, double& xf) { | ||
613 | 315 | const double q2 = q*q; | ||
614 | 316 | lhapdf_xfxq2_(nset, nmem, pid, x, q2, xf); | ||
615 | 317 | } | ||
616 | 318 | |||
617 | 319 | |||
618 | 320 | void lhapdf_xfxq2_stdpartons_(const int& nset, const int& nmem, const int& pid, const double& x, const double& q2, double* xfs) { | ||
619 | 321 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
620 | 322 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
621 | 323 | // Evaluate for the 13 LHAPDF5 standard partons (-6..6) | ||
622 | 324 | for (size_t i = 0; i < 13; ++i) { | ||
623 | 325 | try { | ||
624 | 326 | xfs[i] = ACTIVESETS[nset].member(nmem)->xfxQ2(i-6, x, q2); | ||
625 | 327 | } catch (const exception& e) { | ||
626 | 328 | xfs[i] = 0; | ||
627 | 329 | } | ||
628 | 330 | } | ||
629 | 331 | // Update current set focus | ||
630 | 332 | CURRENTSET = nset; | ||
631 | 333 | } | ||
632 | 334 | |||
633 | 335 | void lhapdf_xfxq_stdpartons_(const int& nset, const int& nmem, const int& pid, const double& x, const double& q, double* xfs) { | ||
634 | 336 | const double q2 = q*q; | ||
635 | 337 | lhapdf_xfxq2_stdpartons_(nset, nmem, pid, x, q2, xfs); | ||
636 | 338 | } | ||
637 | 339 | |||
638 | 340 | |||
639 | 341 | //----------------- | ||
640 | 342 | |||
641 | 343 | |||
642 | 344 | /// Get the alpha_s order for the set | ||
643 | 345 | void lhapdf_getorderas_(const int& nset, const int& nmem, int& oas) { | ||
644 | 346 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
645 | 347 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
646 | 348 | oas = ACTIVESETS[nset].member(nmem)->info().get_entry_as<int>("AlphaS_OrderQCD"); | ||
647 | 349 | // Update current set focus | ||
648 | 350 | CURRENTSET = nset; | ||
649 | 351 | } | ||
650 | 352 | |||
651 | 353 | /// Get the alpha_s(Q2) value for set nset | ||
652 | 354 | void lhapdf_alphasq2_(const int& nset, const int& nmem, const double& q2, double& alphas) { | ||
653 | 355 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
654 | 356 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
655 | 357 | alphas = ACTIVESETS[nset].member(nmem)->alphasQ2(q2); | ||
656 | 358 | // Update current set focus | ||
657 | 359 | CURRENTSET = nset; | ||
658 | 360 | } | ||
659 | 361 | |||
660 | 362 | /// Get the alpha_s(Q) value for set nset | ||
661 | 363 | /// @todo Return value rather than return arg? Can we do that elsewhere, too, e.g. single-value PDF xf functions? | ||
662 | 364 | void lhapdf_alphasq_(const int& nset, const int& nmem, const double& q, double& alphas) { | ||
663 | 365 | const double q2 = q*q; | ||
664 | 366 | lhapdf_alphasq2_(nset, nmem, q2, alphas); | ||
665 | 367 | } | ||
666 | 368 | |||
667 | 369 | |||
668 | 370 | // Metadata functions | ||
669 | 371 | |||
670 | 372 | // /// Get the number of error members in the set (with special treatment for single member sets) | ||
671 | 373 | // void numberpdfm_(const int& nset, int& numpdf) { | ||
672 | 374 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
673 | 375 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
674 | 376 | // // Set equal to the number of members for the requested set | ||
675 | 377 | // numpdf= ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("NumMembers"); | ||
676 | 378 | // // Update current set focus | ||
677 | 379 | // CURRENTSET = nset; | ||
678 | 380 | // } | ||
679 | 381 | |||
680 | 382 | // /// Get the max number of active flavours | ||
681 | 383 | // void getnfm_(const int& nset, int& nf) { | ||
682 | 384 | // //nf = ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("AlphaS_NumFlavors"); | ||
683 | 385 | // nf = ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("NumFlavors"); | ||
684 | 386 | // // Update current set focus | ||
685 | 387 | // CURRENTSET = nset; | ||
686 | 388 | // } | ||
687 | 389 | |||
688 | 390 | // /// Get nf'th quark mass | ||
689 | 391 | // void getqmassm_(const int& nset, const int& nf, double& mass) { | ||
690 | 392 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
691 | 393 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
692 | 394 | // if (nf*nf == 1) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MDown"); | ||
693 | 395 | // else if (nf*nf == 4) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MUp"); | ||
694 | 396 | // else if (nf*nf == 9) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MStrange"); | ||
695 | 397 | // else if (nf*nf == 16) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MCharm"); | ||
696 | 398 | // else if (nf*nf == 25) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MBottom"); | ||
697 | 399 | // else if (nf*nf == 36) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MTop"); | ||
698 | 400 | // else throw LHAPDF::UserError("Trying to get quark mass for invalid quark ID #" + LHAPDF::to_str(nf)); | ||
699 | 401 | // // Update current set focus | ||
700 | 402 | // CURRENTSET = nset; | ||
701 | 403 | // } | ||
702 | 404 | |||
703 | 405 | // /// Get the nf'th quark threshold | ||
704 | 406 | // void getthresholdm_(const int& nset, const int& nf, double& Q) { | ||
705 | 407 | // try { | ||
706 | 408 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
707 | 409 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
708 | 410 | // if (nf*nf == 1) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdDown"); | ||
709 | 411 | // else if (nf*nf == 4) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdUp"); | ||
710 | 412 | // else if (nf*nf == 9) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdStrange"); | ||
711 | 413 | // else if (nf*nf == 16) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdCharm"); | ||
712 | 414 | // else if (nf*nf == 25) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdBottom"); | ||
713 | 415 | // else if (nf*nf == 36) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdTop"); | ||
714 | 416 | // //else throw LHAPDF::UserError("Trying to get quark threshold for invalid quark ID #" + LHAPDF::to_str(nf)); | ||
715 | 417 | // } catch (...) { | ||
716 | 418 | // getqmassm_(nset, nf, Q); | ||
717 | 419 | // } | ||
718 | 420 | // // Update current set focus | ||
719 | 421 | // CURRENTSET = nset; | ||
720 | 422 | // } | ||
721 | 423 | |||
722 | 424 | // void getxminm_(const int& nset, const int& nmem, double& xmin) { | ||
723 | 425 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
724 | 426 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
725 | 427 | // const int activemem = ACTIVESETS[nset].currentmem; | ||
726 | 428 | // ACTIVESETS[nset].loadMember(nmem); | ||
727 | 429 | // xmin = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMin"); | ||
728 | 430 | // ACTIVESETS[nset].loadMember(activemem); | ||
729 | 431 | // // Update current set focus | ||
730 | 432 | // CURRENTSET = nset; | ||
731 | 433 | // } | ||
732 | 434 | |||
733 | 435 | // void getxmaxm_(const int& nset, const int& nmem, double& xmax) { | ||
734 | 436 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
735 | 437 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
736 | 438 | // const int activemem = ACTIVESETS[nset].currentmem; | ||
737 | 439 | // ACTIVESETS[nset].loadMember(nmem); | ||
738 | 440 | // xmax = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMax"); | ||
739 | 441 | // ACTIVESETS[nset].loadMember(activemem); | ||
740 | 442 | // // Update current set focus | ||
741 | 443 | // CURRENTSET = nset; | ||
742 | 444 | // } | ||
743 | 445 | |||
744 | 446 | // void getq2minm_(const int& nset, const int& nmem, double& q2min) { | ||
745 | 447 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
746 | 448 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
747 | 449 | // const int activemem = ACTIVESETS[nset].currentmem; | ||
748 | 450 | // ACTIVESETS[nset].loadMember(nmem); | ||
749 | 451 | // q2min = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMin")); | ||
750 | 452 | // ACTIVESETS[nset].loadMember(activemem); | ||
751 | 453 | // // Update current set focus | ||
752 | 454 | // CURRENTSET = nset; | ||
753 | 455 | // } | ||
754 | 456 | |||
755 | 457 | // void getq2maxm_(const int& nset, const int& nmem, double& q2max) { | ||
756 | 458 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
757 | 459 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
758 | 460 | // const int activemem = ACTIVESETS[nset].currentmem; | ||
759 | 461 | // ACTIVESETS[nset].loadMember(nmem); | ||
760 | 462 | // q2max = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMax")); | ||
761 | 463 | // ACTIVESETS[nset].loadMember(activemem); | ||
762 | 464 | // // Update current set focus | ||
763 | 465 | // CURRENTSET = nset; | ||
764 | 466 | // } | ||
765 | 467 | |||
766 | 468 | // void getminmaxm_(const int& nset, const int& nmem, double& xmin, double& xmax, double& q2min, double& q2max) { | ||
767 | 469 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
768 | 470 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
769 | 471 | // const int activemem = ACTIVESETS[nset].currentmem; | ||
770 | 472 | // ACTIVESETS[nset].loadMember(nmem); | ||
771 | 473 | // xmin = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMin"); | ||
772 | 474 | // xmax = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMax"); | ||
773 | 475 | // q2min = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMin")); | ||
774 | 476 | // q2max = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMax")); | ||
775 | 477 | // ACTIVESETS[nset].loadMember(activemem); | ||
776 | 478 | // // Update current set focus | ||
777 | 479 | // CURRENTSET = nset; | ||
778 | 480 | // } | ||
779 | 481 | |||
780 | 482 | |||
781 | 483 | // /// Backwards compatibility functions for LHAPDF5 calculations of | ||
782 | 484 | // /// PDF uncertainties and PDF correlations (G. Watt, March 2014). | ||
783 | 485 | |||
784 | 486 | // // subroutine GetPDFUncTypeM(nset,lMonteCarlo,lSymmetric) | ||
785 | 487 | // void getpdfunctypem_(const int& nset, int& lmontecarlo, int& lsymmetric) { | ||
786 | 488 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
787 | 489 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
788 | 490 | // const string errorType = ACTIVESETS[nset].activeMember()->set().errorType(); | ||
789 | 491 | // if (errorType == "replicas") { // Monte Carlo PDF sets | ||
790 | 492 | // lmontecarlo = 1; | ||
791 | 493 | // lsymmetric = 1; | ||
792 | 494 | // } else if (errorType == "symmhessian") { // symmetric eigenvector PDF sets | ||
793 | 495 | // lmontecarlo = 0; | ||
794 | 496 | // lsymmetric = 1; | ||
795 | 497 | // } else { // default: assume asymmetric Hessian eigenvector PDF sets | ||
796 | 498 | // lmontecarlo = 0; | ||
797 | 499 | // lsymmetric = 0; | ||
798 | 500 | // } | ||
799 | 501 | // // Update current set focus | ||
800 | 502 | // CURRENTSET = nset; | ||
801 | 503 | // } | ||
802 | 504 | // // subroutine GetPDFUncType(lMonteCarlo,lSymmetric) | ||
803 | 505 | // void getpdfunctype_(int& lmontecarlo, int& lsymmetric) { | ||
804 | 506 | // int nset1 = 1; | ||
805 | 507 | // getpdfunctypem_(nset1, lmontecarlo, lsymmetric); | ||
806 | 508 | // } | ||
807 | 509 | |||
808 | 510 | |||
809 | 511 | // // subroutine GetPDFuncertaintyM(nset,values,central,errplus,errminus,errsym) | ||
810 | 512 | // void getpdfuncertaintym_(const int& nset, const double* values, double& central, double& errplus, double& errminus, double& errsymm) { | ||
811 | 513 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
812 | 514 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
813 | 515 | // const size_t nmem = ACTIVESETS[nset].activeMember()->set().size()-1; | ||
814 | 516 | // const vector<double> vecvalues(values, values + nmem + 1); | ||
815 | 517 | // LHAPDF::PDFUncertainty err = ACTIVESETS[nset].activeMember()->set().uncertainty(vecvalues, -1); | ||
816 | 518 | // central = err.central; | ||
817 | 519 | // errplus = err.errplus; | ||
818 | 520 | // errminus = err.errminus; | ||
819 | 521 | // errsymm = err.errsymm; | ||
820 | 522 | // // Update current set focus | ||
821 | 523 | // CURRENTSET = nset; | ||
822 | 524 | // } | ||
823 | 525 | // // subroutine GetPDFuncertainty(values,central,errplus,errminus,errsym) | ||
824 | 526 | // void getpdfuncertainty_(const double* values, double& central, double& errplus, double& errminus, double& errsymm) { | ||
825 | 527 | // int nset1 = 1; | ||
826 | 528 | // getpdfuncertaintym_(nset1, values, central, errplus, errminus, errsymm); | ||
827 | 529 | // } | ||
828 | 530 | |||
829 | 531 | |||
830 | 532 | // // subroutine GetPDFcorrelationM(nset,valuesA,valuesB,correlation) | ||
831 | 533 | // void getpdfcorrelationm_(const int& nset, const double* valuesA, const double* valuesB, double& correlation) { | ||
832 | 534 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
833 | 535 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
834 | 536 | // const size_t nmem = ACTIVESETS[nset].activeMember()->set().size()-1; | ||
835 | 537 | // const vector<double> vecvaluesA(valuesA, valuesA + nmem + 1); | ||
836 | 538 | // const vector<double> vecvaluesB(valuesB, valuesB + nmem + 1); | ||
837 | 539 | // correlation = ACTIVESETS[nset].activeMember()->set().correlation(vecvaluesA,vecvaluesB); | ||
838 | 540 | // // Update current set focus | ||
839 | 541 | // CURRENTSET = nset; | ||
840 | 542 | // } | ||
841 | 543 | // // subroutine GetPDFcorrelation(valuesA,valuesB,correlation) | ||
842 | 544 | // void getpdfcorrelation_(const double* valuesA, const double* valuesB, double& correlation) { | ||
843 | 545 | // int nset1 = 1; | ||
844 | 546 | // getpdfcorrelationm_(nset1, valuesA, valuesB, correlation); | ||
845 | 547 | // } | ||
846 | 548 | |||
847 | 549 | |||
848 | 550 | |||
849 | 551 | |||
850 | 552 | |||
851 | 553 | ////////////////// | ||
852 | 554 | |||
853 | 555 | // LHAPDF5 / PDFLIB COMPATIBILITY INTERFACE FUNCTIONS | ||
854 | 556 | |||
855 | 557 | |||
856 | 558 | // System-level info | ||
857 | 559 | |||
858 | 560 | /// LHAPDF library version | ||
859 | 561 | void getlhapdfversion_(char* s, size_t len) { | ||
860 | 562 | // strncpy(s, LHAPDF_VERSION, len); | ||
861 | 563 | cstr_to_fstr(LHAPDF_VERSION, s, len); | ||
862 | 564 | } | ||
863 | 565 | |||
864 | 566 | |||
865 | 567 | /// Does nothing, only provided for backward compatibility | ||
866 | 568 | void lhaprint_(int& a) { } | ||
867 | 569 | |||
868 | 570 | |||
869 | 571 | /// Set LHAPDF parameters | ||
870 | 572 | /// | ||
871 | 573 | /// @note Only the verbosity parameters have any effect: PDF behaviour is not | ||
872 | 574 | /// controlled globally in LHAPDF6. | ||
873 | 575 | void setlhaparm_(const char* par, int parlength) { | ||
874 | 576 | const string cpar = LHAPDF::to_upper(fstr_to_ccstr(par, parlength)); | ||
875 | 577 | if (cpar == "NOSTAT" || cpar == "16") { | ||
876 | 578 | cerr << "WARNING: Fortran call to control LHAPDF statistics collection has no effect" << endl; | ||
877 | 579 | } else if (cpar == "LHAPDF" || cpar == "17") { | ||
878 | 580 | cerr << "WARNING: Fortran call to globally control alpha_s calculation has no effect" << endl; | ||
879 | 581 | } else if (cpar == "EXTRAPOLATE" || cpar == "18") { | ||
880 | 582 | cerr << "WARNING: Fortran call to globally control PDF extrapolation has no effect" << endl; | ||
881 | 583 | } else if (cpar == "SILENT" || cpar == "LOWKEY") { | ||
882 | 584 | LHAPDF::setVerbosity(0); | ||
883 | 585 | } else if (cpar == "19") { | ||
884 | 586 | LHAPDF::setVerbosity(1); | ||
885 | 587 | } | ||
886 | 588 | } | ||
887 | 589 | /// Get LHAPDF parameters -- does nothing in LHAPDF6! | ||
888 | 590 | void getlhaparm_(int dummy, char* par, int parlength) { | ||
889 | 591 | cstr_to_fstr("", par, parlength); | ||
890 | 592 | } | ||
891 | 593 | |||
892 | 594 | |||
893 | 595 | /// Return a dummy max number of sets (there is no limitation now) | ||
894 | 596 | void getmaxnumsets_(int& nmax) { | ||
895 | 597 | nmax = 1000; | ||
896 | 598 | } | ||
897 | 599 | |||
898 | 600 | |||
899 | 601 | /// Set PDF data path | ||
900 | 602 | void setpdfpath_(const char* s, size_t len) { | ||
901 | 603 | /// @todo Works? Need to check C-string copying, null termination | ||
902 | 604 | char s2[1024]; | ||
903 | 605 | s2[len] = '\0'; | ||
904 | 606 | strncpy(s2, s, len); | ||
905 | 607 | LHAPDF::pathsPrepend(s2); | ||
906 | 608 | } | ||
907 | 609 | |||
908 | 610 | /// Get PDF data path (colon-separated if there is more than one element) | ||
909 | 611 | void getdatapath_(char* s, size_t len) { | ||
910 | 612 | /// @todo Works? Need to check Fortran string return, string macro treatment, etc. | ||
911 | 613 | string pathstr; | ||
912 | 614 | for (const string& path : LHAPDF::paths()) { | ||
913 | 615 | if (!pathstr.empty()) pathstr += ":"; | ||
914 | 616 | pathstr += path; | ||
915 | 617 | } | ||
916 | 618 | // strncpy(s, pathstr.c_str(), len); | ||
917 | 619 | cstr_to_fstr(pathstr.c_str(), s, len); | ||
918 | 620 | } | ||
919 | 621 | |||
920 | 622 | |||
921 | 623 | // PDF initialisation and focus-switching | ||
922 | 624 | |||
923 | 625 | /// Load a PDF set | ||
924 | 626 | /// | ||
925 | 627 | /// @todo Does this version actually take a *path*? What to do? | ||
926 | 628 | void initpdfsetm_(const int& nset, const char* setpath, int setpathlength) { | ||
927 | 629 | // Strip file extension for backward compatibility | ||
928 | 630 | string fullp = string(setpath, setpathlength); | ||
929 | 631 | // Remove trailing whitespace | ||
930 | 632 | fullp.erase( std::remove_if( fullp.begin(), fullp.end(), ::isspace ), fullp.end() ); | ||
931 | 633 | // Use only items after the last / | ||
932 | 634 | const string pap = LHAPDF::dirname(fullp); | ||
933 | 635 | const string p = LHAPDF::basename(fullp); | ||
934 | 636 | // Prepend path to search area | ||
935 | 637 | LHAPDF::pathsPrepend(pap); | ||
936 | 638 | // Handle extensions | ||
937 | 639 | string path = LHAPDF::file_extn(p).empty() ? p : LHAPDF::file_stem(p); | ||
938 | 640 | /// @note We correct the misnamed CTEQ6L1/CTEQ6ll set name as a backward compatibility special case. | ||
939 | 641 | if (LHAPDF::to_lower(path) == "cteq6ll") path = "cteq6l1"; | ||
940 | 642 | // Create the PDF set with index nset | ||
941 | 643 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
942 | 644 | if (path != ACTIVESETS[nset].setname) | ||
943 | 645 | ACTIVESETS[nset] = PDFSetHandler(path); ///< @todo Will be wrong if a structured path is given | ||
944 | 646 | CURRENTSET = nset; | ||
945 | 647 | } | ||
946 | 648 | /// Load a PDF set (non-multiset version) | ||
947 | 649 | void initpdfset_(const char* setpath, int setpathlength) { | ||
948 | 650 | int nset1 = 1; | ||
949 | 651 | initpdfsetm_(nset1, setpath, setpathlength); | ||
950 | 652 | } | ||
951 | 653 | |||
952 | 654 | |||
953 | 655 | /// Load a PDF set by name | ||
954 | 656 | void initpdfsetbynamem_(const int& nset, const char* setname, int setnamelength) { | ||
955 | 657 | // Truncate input to size setnamelength | ||
956 | 658 | string p = setname; | ||
957 | 659 | p.erase(setnamelength, std::string::npos); | ||
958 | 660 | // Strip file extension for backward compatibility | ||
959 | 661 | string name = LHAPDF::file_extn(p).empty() ? p : LHAPDF::file_stem(p); | ||
960 | 662 | // Remove trailing whitespace | ||
961 | 663 | name.erase( std::remove_if( name.begin(), name.end(), ::isspace ), name.end() ); | ||
962 | 664 | /// @note We correct the misnamed CTEQ6L1/CTEQ6ll set name as a backward compatibility special case. | ||
963 | 665 | if (LHAPDF::to_lower(name) == "cteq6ll") name = "cteq6l1"; | ||
964 | 666 | // Create the PDF set with index nset | ||
965 | 667 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
966 | 668 | if (name != ACTIVESETS[nset].setname) | ||
967 | 669 | ACTIVESETS[nset] = PDFSetHandler(name); | ||
968 | 670 | // Update current set focus | ||
969 | 671 | CURRENTSET = nset; | ||
970 | 672 | } | ||
971 | 673 | /// Load a PDF set by name (non-multiset version) | ||
972 | 674 | void initpdfsetbyname_(const char* setname, int setnamelength) { | ||
973 | 675 | int nset1 = 1; | ||
974 | 676 | initpdfsetbynamem_(nset1, setname, setnamelength); | ||
975 | 677 | } | ||
976 | 678 | |||
977 | 679 | |||
978 | 680 | /// Load a PDF in current set | ||
979 | 681 | void initpdfm_(const int& nset, const int& nmember) { | ||
980 | 682 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
981 | 683 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
982 | 684 | ACTIVESETS[nset].loadMember(nmember); | ||
983 | 685 | // Update current set focus | ||
984 | 686 | CURRENTSET = nset; | ||
985 | 687 | } | ||
986 | 688 | /// Load a PDF in current set (non-multiset version) | ||
987 | 689 | void initpdf_(const int& nmember) { | ||
988 | 690 | int nset1 = 1; | ||
989 | 691 | initpdfm_(nset1, nmember); | ||
990 | 692 | } | ||
991 | 693 | |||
992 | 694 | |||
993 | 695 | /// Get the current set number (i.e. allocation slot index) | ||
994 | 696 | void getnset_(int& nset) { | ||
995 | 697 | nset = CURRENTSET; | ||
996 | 698 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
997 | 699 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
998 | 700 | } | ||
999 | 701 | |||
1000 | 702 | /// Explicitly set the current set number (i.e. allocation slot index) | ||
1001 | 703 | void setnset_(const int& nset) { | ||
1002 | 704 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1003 | 705 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1004 | 706 | CURRENTSET = nset; | ||
1005 | 707 | } | ||
1006 | 708 | |||
1007 | 709 | |||
1008 | 710 | /// Get the current member number in slot nset | ||
1009 | 711 | void getnmem_(int& nset, int& nmem) { | ||
1010 | 712 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1011 | 713 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1012 | 714 | nmem = ACTIVESETS[nset].currentmem; | ||
1013 | 715 | // Update current set focus | ||
1014 | 716 | CURRENTSET = nset; | ||
1015 | 717 | } | ||
1016 | 718 | |||
1017 | 719 | /// Set the current member number in slot nset | ||
1018 | 720 | void setnmem_(const int& nset, const int& nmem) { | ||
1019 | 721 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1020 | 722 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + | ||
1021 | 723 | LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1022 | 724 | ACTIVESETS[nset].loadMember(nmem); | ||
1023 | 725 | // Update current set focus | ||
1024 | 726 | CURRENTSET = nset; | ||
1025 | 727 | } | ||
1026 | 728 | |||
1027 | 729 | |||
1028 | 730 | |||
1029 | 731 | // PDF evolution functions | ||
1030 | 732 | |||
1031 | 733 | // NEW BY MZ to evolve one single parton | ||
1032 | 734 | |||
1033 | 735 | /// Get xf(x) values for common partons from current PDF | ||
1034 | 736 | void evolvepartm_(const int& nset, const int& ipart, const double& x, const double& q, double& fxq) { | ||
1035 | 737 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1036 | 738 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1037 | 739 | int ipart_copy; // this is to deal with photons, which are labeled 7 in MG5aMC | ||
1038 | 740 | ipart_copy = ipart; | ||
1039 | 741 | if (ipart==7) ipart_copy = 22; | ||
1040 | 742 | try { | ||
1041 | 743 | fxq = ACTIVESETS[nset].activeMember()->xfxQ(ipart_copy, x, q); | ||
1042 | 744 | } catch (const exception& e) { | ||
1043 | 745 | fxq = 0; | ||
1044 | 746 | } | ||
1045 | 747 | // Update current set focus | ||
1046 | 748 | CURRENTSET = nset; | ||
1047 | 749 | } | ||
1048 | 750 | /// Get xf(x) values for common partons from current PDF (non-multiset version) | ||
1049 | 751 | void evolvepart_( const int& ipart, const double& x, const double& q, double& fxq) { | ||
1050 | 752 | int nset1 = 1; | ||
1051 | 753 | evolvepartm_(nset1, ipart, x, q, fxq); | ||
1052 | 754 | } | ||
1053 | 755 | |||
1054 | 756 | /// Get xf(x) values for common partons from current PDF | ||
1055 | 757 | void evolvepdfm_(const int& nset, const double& x, const double& q, double* fxq) { | ||
1056 | 758 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1057 | 759 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1058 | 760 | // Evaluate for the 13 LHAPDF5 standard partons (-6..6) | ||
1059 | 761 | for (size_t i = 0; i < 13; ++i) { | ||
1060 | 762 | try { | ||
1061 | 763 | fxq[i] = ACTIVESETS[nset].activeMember()->xfxQ(i-6, x, q); | ||
1062 | 764 | } catch (const exception& e) { | ||
1063 | 765 | fxq[i] = 0; | ||
1064 | 766 | } | ||
1065 | 767 | } | ||
1066 | 768 | // Update current set focus | ||
1067 | 769 | CURRENTSET = nset; | ||
1068 | 770 | } | ||
1069 | 771 | /// Get xf(x) values for common partons from current PDF (non-multiset version) | ||
1070 | 772 | void evolvepdf_(const double& x, const double& q, double* fxq) { | ||
1071 | 773 | int nset1 = 1; | ||
1072 | 774 | evolvepdfm_(nset1, x, q, fxq); | ||
1073 | 775 | } | ||
1074 | 776 | |||
1075 | 777 | |||
1076 | 778 | /// Determine if the current PDF has a photon flavour (historically only MRST2004QED) | ||
1077 | 779 | /// @todo Function rather than subroutine? | ||
1078 | 780 | /// @note There is no multiset version. has_photon will respect the current set slot. | ||
1079 | 781 | bool has_photon_() { | ||
1080 | 782 | return ACTIVESETS[CURRENTSET].activeMember()->hasFlavor(22); | ||
1081 | 783 | } | ||
1082 | 784 | |||
1083 | 785 | |||
1084 | 786 | /// Get xfx values from current PDF, including an extra photon flavour | ||
1085 | 787 | void evolvepdfphotonm_(const int& nset, const double& x, const double& q, double* fxq, double& photonfxq) { | ||
1086 | 788 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1087 | 789 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1088 | 790 | // First evaluate the "normal" partons | ||
1089 | 791 | evolvepdfm_(nset, x, q, fxq); | ||
1090 | 792 | // Then evaluate the photon flavor (historically only for MRST2004QED) | ||
1091 | 793 | try { | ||
1092 | 794 | photonfxq = ACTIVESETS[nset].activeMember()->xfxQ(22, x, q); | ||
1093 | 795 | } catch (const exception& e) { | ||
1094 | 796 | photonfxq = 0; | ||
1095 | 797 | } | ||
1096 | 798 | // Update current set focus | ||
1097 | 799 | CURRENTSET = nset; | ||
1098 | 800 | } | ||
1099 | 801 | /// Get xfx values from current PDF, including an extra photon flavour (non-multiset version) | ||
1100 | 802 | void evolvepdfphoton_(const double& x, const double& q, double* fxq, double& photonfxq) { | ||
1101 | 803 | int nset1 = 1; | ||
1102 | 804 | evolvepdfphotonm_(nset1, x, q, fxq, photonfxq); | ||
1103 | 805 | } | ||
1104 | 806 | |||
1105 | 807 | |||
1106 | 808 | /// Get xf(x) values for common partons from a photon PDF | ||
1107 | 809 | void evolvepdfpm_(const int& nset, const double& x, const double& q, const double& p2, const int& ip2, double& fxq) { | ||
1108 | 810 | // Update current set focus | ||
1109 | 811 | CURRENTSET = nset; | ||
1110 | 812 | throw LHAPDF::NotImplementedError("Photon structure functions are not yet supported in LHAPDF6"); | ||
1111 | 813 | } | ||
1112 | 814 | /// Get xf(x) values for common partons from a photon PDF (non-multiset version) | ||
1113 | 815 | void evolvepdfp_(const double& x, const double& q, const double& p2, const int& ip2, double& fxq) { | ||
1114 | 816 | int nset1 = 1; | ||
1115 | 817 | evolvepdfpm_(nset1, x, q, p2, ip2, fxq); | ||
1116 | 818 | } | ||
1117 | 819 | |||
1118 | 820 | |||
1119 | 821 | // alpha_s evolution | ||
1120 | 822 | |||
1121 | 823 | /// Get the alpha_s order for the set | ||
1122 | 824 | void getorderasm_(const int& nset, int& oas) { | ||
1123 | 825 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1124 | 826 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1125 | 827 | // Set equal to the number of members for the requested set | ||
1126 | 828 | oas = ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("AlphaS_OrderQCD"); | ||
1127 | 829 | // Update current set focus | ||
1128 | 830 | CURRENTSET = nset; | ||
1129 | 831 | } | ||
1130 | 832 | /// Get the alpha_s order for the set (non-multiset version) | ||
1131 | 833 | void getorderas_(int& oas) { | ||
1132 | 834 | int nset1 = 1; | ||
1133 | 835 | getorderasm_(nset1, oas); | ||
1134 | 836 | } | ||
1135 | 837 | |||
1136 | 838 | |||
1137 | 839 | /// Get the alpha_s(Q) value for set nset | ||
1138 | 840 | double alphaspdfm_(const int& nset, const double& Q){ | ||
1139 | 841 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1140 | 842 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1141 | 843 | return ACTIVESETS[nset].activeMember()->alphasQ(Q); | ||
1142 | 844 | // Update current set focus | ||
1143 | 845 | CURRENTSET = nset; | ||
1144 | 846 | } | ||
1145 | 847 | /// Get the alpha_s(Q) value for the set (non-multiset version) | ||
1146 | 848 | double alphaspdf_(const double& Q){ | ||
1147 | 849 | int nset1 = 1; | ||
1148 | 850 | return alphaspdfm_(nset1, Q); | ||
1149 | 851 | } | ||
1150 | 852 | |||
1151 | 853 | |||
1152 | 854 | // Metadata functions | ||
1153 | 855 | |||
1154 | 856 | /// Get the number of error members in the set | ||
1155 | 857 | void numberpdfm_(const int& nset, int& numpdf) { | ||
1156 | 858 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1157 | 859 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1158 | 860 | // Set equal to the number of members for the requested set | ||
1159 | 861 | numpdf= ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("NumMembers"); | ||
1160 | 862 | // Reproduce old LHAPDF v5 behaviour, i.e. subtract 1 | ||
1161 | 863 | numpdf -= 1; | ||
1162 | 864 | // Update current set focus | ||
1163 | 865 | CURRENTSET = nset; | ||
1164 | 866 | } | ||
1165 | 867 | /// Get the number of error members in the set (non-multiset version) | ||
1166 | 868 | void numberpdf_(int& numpdf) { | ||
1167 | 869 | int nset1 = 1; | ||
1168 | 870 | numberpdfm_(nset1, numpdf); | ||
1169 | 871 | } | ||
1170 | 872 | |||
1171 | 873 | |||
1172 | 874 | /// Get the max number of active flavours | ||
1173 | 875 | void getnfm_(const int& nset, int& nf) { | ||
1174 | 876 | //nf = ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("AlphaS_NumFlavors"); | ||
1175 | 877 | nf = ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("NumFlavors"); | ||
1176 | 878 | // Update current set focus | ||
1177 | 879 | CURRENTSET = nset; | ||
1178 | 880 | } | ||
1179 | 881 | /// Get the max number of active flavours (non-multiset version) | ||
1180 | 882 | void getnf_(int& nf) { | ||
1181 | 883 | int nset1 = 1; | ||
1182 | 884 | getnfm_(nset1, nf); | ||
1183 | 885 | } | ||
1184 | 886 | |||
1185 | 887 | |||
1186 | 888 | /// Get nf'th quark mass | ||
1187 | 889 | void getqmassm_(const int& nset, const int& nf, double& mass) { | ||
1188 | 890 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1189 | 891 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1190 | 892 | if (nf*nf == 1) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MDown"); | ||
1191 | 893 | else if (nf*nf == 4) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MUp"); | ||
1192 | 894 | else if (nf*nf == 9) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MStrange"); | ||
1193 | 895 | else if (nf*nf == 16) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MCharm"); | ||
1194 | 896 | else if (nf*nf == 25) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MBottom"); | ||
1195 | 897 | else if (nf*nf == 36) mass = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("MTop"); | ||
1196 | 898 | else throw LHAPDF::UserError("Trying to get quark mass for invalid quark ID #" + LHAPDF::to_str(nf)); | ||
1197 | 899 | // Update current set focus | ||
1198 | 900 | CURRENTSET = nset; | ||
1199 | 901 | } | ||
1200 | 902 | /// Get nf'th quark mass (non-multiset version) | ||
1201 | 903 | void getqmass_(const int& nf, double& mass) { | ||
1202 | 904 | int nset1 = 1; | ||
1203 | 905 | getqmassm_(nset1, nf, mass); | ||
1204 | 906 | } | ||
1205 | 907 | |||
1206 | 908 | |||
1207 | 909 | /// Get the nf'th quark threshold | ||
1208 | 910 | void getthresholdm_(const int& nset, const int& nf, double& Q) { | ||
1209 | 911 | try { | ||
1210 | 912 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1211 | 913 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1212 | 914 | if (nf*nf == 1) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdDown"); | ||
1213 | 915 | else if (nf*nf == 4) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdUp"); | ||
1214 | 916 | else if (nf*nf == 9) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdStrange"); | ||
1215 | 917 | else if (nf*nf == 16) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdCharm"); | ||
1216 | 918 | else if (nf*nf == 25) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdBottom"); | ||
1217 | 919 | else if (nf*nf == 36) Q = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("ThresholdTop"); | ||
1218 | 920 | //else throw LHAPDF::UserError("Trying to get quark threshold for invalid quark ID #" + LHAPDF::to_str(nf)); | ||
1219 | 921 | } catch (...) { | ||
1220 | 922 | getqmassm_(nset, nf, Q); | ||
1221 | 923 | } | ||
1222 | 924 | // Update current set focus | ||
1223 | 925 | CURRENTSET = nset; | ||
1224 | 926 | } | ||
1225 | 927 | /// Get the nf'th quark threshold | ||
1226 | 928 | void getthreshold_(const int& nf, double& Q) { | ||
1227 | 929 | int nset1 = 1; | ||
1228 | 930 | getthresholdm_(nset1, nf, Q); | ||
1229 | 931 | } | ||
1230 | 932 | |||
1231 | 933 | |||
1232 | 934 | /// Print PDF set's description to stdout | ||
1233 | 935 | void getdescm_(const int& nset) { | ||
1234 | 936 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1235 | 937 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1236 | 938 | cout << ACTIVESETS[nset].activeMember()->description() << endl; | ||
1237 | 939 | // Update current set focus | ||
1238 | 940 | CURRENTSET = nset; | ||
1239 | 941 | } | ||
1240 | 942 | void getdesc_() { | ||
1241 | 943 | int nset1 = 1; | ||
1242 | 944 | getdescm_(nset1); | ||
1243 | 945 | } | ||
1244 | 946 | |||
1245 | 947 | |||
1246 | 948 | void getxminm_(const int& nset, const int& nmem, double& xmin) { | ||
1247 | 949 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1248 | 950 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1249 | 951 | const int activemem = ACTIVESETS[nset].currentmem; | ||
1250 | 952 | ACTIVESETS[nset].loadMember(nmem); | ||
1251 | 953 | xmin = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMin"); | ||
1252 | 954 | ACTIVESETS[nset].loadMember(activemem); | ||
1253 | 955 | // Update current set focus | ||
1254 | 956 | CURRENTSET = nset; | ||
1255 | 957 | } | ||
1256 | 958 | void getxmin_(const int& nmem, double& xmin) { | ||
1257 | 959 | int nset1 = 1; | ||
1258 | 960 | getxminm_(nset1, nmem, xmin); | ||
1259 | 961 | } | ||
1260 | 962 | |||
1261 | 963 | |||
1262 | 964 | void getxmaxm_(const int& nset, const int& nmem, double& xmax) { | ||
1263 | 965 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1264 | 966 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1265 | 967 | const int activemem = ACTIVESETS[nset].currentmem; | ||
1266 | 968 | ACTIVESETS[nset].loadMember(nmem); | ||
1267 | 969 | xmax = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMax"); | ||
1268 | 970 | ACTIVESETS[nset].loadMember(activemem); | ||
1269 | 971 | // Update current set focus | ||
1270 | 972 | CURRENTSET = nset; | ||
1271 | 973 | } | ||
1272 | 974 | void getxmax_(const int& nmem, double& xmax) { | ||
1273 | 975 | int nset1 = 1; | ||
1274 | 976 | getxmaxm_(nset1, nmem, xmax); | ||
1275 | 977 | } | ||
1276 | 978 | |||
1277 | 979 | |||
1278 | 980 | void getq2minm_(const int& nset, const int& nmem, double& q2min) { | ||
1279 | 981 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1280 | 982 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1281 | 983 | const int activemem = ACTIVESETS[nset].currentmem; | ||
1282 | 984 | ACTIVESETS[nset].loadMember(nmem); | ||
1283 | 985 | q2min = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMin")); | ||
1284 | 986 | ACTIVESETS[nset].loadMember(activemem); | ||
1285 | 987 | // Update current set focus | ||
1286 | 988 | CURRENTSET = nset; | ||
1287 | 989 | } | ||
1288 | 990 | void getq2min_(const int& nmem, double& q2min) { | ||
1289 | 991 | int nset1 = 1; | ||
1290 | 992 | getq2minm_(nset1, nmem, q2min); | ||
1291 | 993 | } | ||
1292 | 994 | |||
1293 | 995 | |||
1294 | 996 | void getq2maxm_(const int& nset, const int& nmem, double& q2max) { | ||
1295 | 997 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1296 | 998 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1297 | 999 | const int activemem = ACTIVESETS[nset].currentmem; | ||
1298 | 1000 | ACTIVESETS[nset].loadMember(nmem); | ||
1299 | 1001 | q2max = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMax")); | ||
1300 | 1002 | ACTIVESETS[nset].loadMember(activemem); | ||
1301 | 1003 | // Update current set focus | ||
1302 | 1004 | CURRENTSET = nset; | ||
1303 | 1005 | } | ||
1304 | 1006 | void getq2max_(const int& nmem, double& q2max) { | ||
1305 | 1007 | int nset1 = 1; | ||
1306 | 1008 | getq2maxm_(nset1, nmem, q2max); | ||
1307 | 1009 | } | ||
1308 | 1010 | |||
1309 | 1011 | |||
1310 | 1012 | void getminmaxm_(const int& nset, const int& nmem, double& xmin, double& xmax, double& q2min, double& q2max) { | ||
1311 | 1013 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1312 | 1014 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1313 | 1015 | const int activemem = ACTIVESETS[nset].currentmem; | ||
1314 | 1016 | ACTIVESETS[nset].loadMember(nmem); | ||
1315 | 1017 | xmin = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMin"); | ||
1316 | 1018 | xmax = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMax"); | ||
1317 | 1019 | q2min = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMin")); | ||
1318 | 1020 | q2max = LHAPDF::sqr(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMax")); | ||
1319 | 1021 | ACTIVESETS[nset].loadMember(activemem); | ||
1320 | 1022 | // Update current set focus | ||
1321 | 1023 | CURRENTSET = nset; | ||
1322 | 1024 | } | ||
1323 | 1025 | void getminmax_(const int& nmem, double& xmin, double& xmax, double& q2min, double& q2max) { | ||
1324 | 1026 | int nset1 = 1; | ||
1325 | 1027 | getminmaxm_(nset1, nmem, xmin, xmax, q2min, q2max); | ||
1326 | 1028 | } | ||
1327 | 1029 | |||
1328 | 1030 | |||
1329 | 1031 | |||
1330 | 1032 | void getlam4m_(const int& nset, const int& nmem, double& qcdl4) { | ||
1331 | 1033 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1332 | 1034 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1333 | 1035 | CURRENTSET = nset; | ||
1334 | 1036 | ACTIVESETS[nset].loadMember(nmem); | ||
1335 | 1037 | qcdl4 = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("AlphaS_Lambda4", -1.0); | ||
1336 | 1038 | } | ||
1337 | 1039 | void getlam4_(const int& nmem, double& qcdl4) { | ||
1338 | 1040 | int nset1 = 1; | ||
1339 | 1041 | getlam4m_(nset1, nmem, qcdl4); | ||
1340 | 1042 | } | ||
1341 | 1043 | |||
1342 | 1044 | |||
1343 | 1045 | void getlam5m_(const int& nset, const int& nmem, double& qcdl5) { | ||
1344 | 1046 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1345 | 1047 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1346 | 1048 | CURRENTSET = nset; | ||
1347 | 1049 | ACTIVESETS[nset].loadMember(nmem); | ||
1348 | 1050 | qcdl5 = ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("AlphaS_Lambda5", -1.0); | ||
1349 | 1051 | } | ||
1350 | 1052 | void getlam5_(const int& nmem, double& qcdl5) { | ||
1351 | 1053 | int nset1 = 1; | ||
1352 | 1054 | getlam5m_(nset1, nmem, qcdl5); | ||
1353 | 1055 | } | ||
1354 | 1056 | |||
1355 | 1057 | |||
1356 | 1058 | |||
1357 | 1059 | |||
1358 | 1060 | |||
1359 | 1061 | /// Backwards compatibility functions for LHAPDF5 calculations of | ||
1360 | 1062 | /// PDF uncertainties and PDF correlations (G. Watt, March 2014). | ||
1361 | 1063 | |||
1362 | 1064 | // subroutine GetPDFUncTypeM(nset,lMonteCarlo,lSymmetric) | ||
1363 | 1065 | void getpdfunctypem_(const int& nset, int& lmontecarlo, int& lsymmetric) { | ||
1364 | 1066 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1365 | 1067 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1366 | 1068 | const string errorType = ACTIVESETS[nset].activeMember()->set().errorType(); | ||
1367 | 1069 | if (LHAPDF::startswith(errorType, "replicas")) { // Monte Carlo PDF sets | ||
1368 | 1070 | lmontecarlo = 1; | ||
1369 | 1071 | lsymmetric = 1; | ||
1370 | 1072 | } else if (LHAPDF::startswith(errorType, "symmhessian")) { // symmetric eigenvector PDF sets | ||
1371 | 1073 | lmontecarlo = 0; | ||
1372 | 1074 | lsymmetric = 1; | ||
1373 | 1075 | } else { // default: assume asymmetric Hessian eigenvector PDF sets | ||
1374 | 1076 | lmontecarlo = 0; | ||
1375 | 1077 | lsymmetric = 0; | ||
1376 | 1078 | } | ||
1377 | 1079 | // Update current set focus | ||
1378 | 1080 | CURRENTSET = nset; | ||
1379 | 1081 | } | ||
1380 | 1082 | // subroutine GetPDFUncType(lMonteCarlo,lSymmetric) | ||
1381 | 1083 | void getpdfunctype_(int& lmontecarlo, int& lsymmetric) { | ||
1382 | 1084 | int nset1 = 1; | ||
1383 | 1085 | getpdfunctypem_(nset1, lmontecarlo, lsymmetric); | ||
1384 | 1086 | } | ||
1385 | 1087 | |||
1386 | 1088 | |||
1387 | 1089 | // subroutine GetPDFuncertaintyM(nset,values,central,errplus,errminus,errsym) | ||
1388 | 1090 | void getpdfuncertaintym_(const int& nset, const double* values, double& central, double& errplus, double& errminus, double& errsymm) { | ||
1389 | 1091 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1390 | 1092 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1391 | 1093 | const size_t nmem = ACTIVESETS[nset].activeMember()->set().size()-1; | ||
1392 | 1094 | const vector<double> vecvalues(values, values + nmem + 1); | ||
1393 | 1095 | LHAPDF::PDFUncertainty err = ACTIVESETS[nset].activeMember()->set().uncertainty(vecvalues, -1); | ||
1394 | 1096 | central = err.central; | ||
1395 | 1097 | // For a combined set, the PDF and parameter variation uncertainties will be added in quadrature. | ||
1396 | 1098 | errplus = err.errplus; | ||
1397 | 1099 | errminus = err.errminus; | ||
1398 | 1100 | errsymm = err.errsymm; | ||
1399 | 1101 | // Update current set focus | ||
1400 | 1102 | CURRENTSET = nset; | ||
1401 | 1103 | } | ||
1402 | 1104 | // subroutine GetPDFuncertainty(values,central,errplus,errminus,errsym) | ||
1403 | 1105 | void getpdfuncertainty_(const double* values, double& central, double& errplus, double& errminus, double& errsymm) { | ||
1404 | 1106 | int nset1 = 1; | ||
1405 | 1107 | getpdfuncertaintym_(nset1, values, central, errplus, errminus, errsymm); | ||
1406 | 1108 | } | ||
1407 | 1109 | |||
1408 | 1110 | |||
1409 | 1111 | // subroutine GetPDFcorrelationM(nset,valuesA,valuesB,correlation) | ||
1410 | 1112 | void getpdfcorrelationm_(const int& nset, const double* valuesA, const double* valuesB, double& correlation) { | ||
1411 | 1113 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1412 | 1114 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1413 | 1115 | const size_t nmem = ACTIVESETS[nset].activeMember()->set().size()-1; | ||
1414 | 1116 | const vector<double> vecvaluesA(valuesA, valuesA + nmem + 1); | ||
1415 | 1117 | const vector<double> vecvaluesB(valuesB, valuesB + nmem + 1); | ||
1416 | 1118 | correlation = ACTIVESETS[nset].activeMember()->set().correlation(vecvaluesA,vecvaluesB); | ||
1417 | 1119 | // Update current set focus | ||
1418 | 1120 | CURRENTSET = nset; | ||
1419 | 1121 | } | ||
1420 | 1122 | // subroutine GetPDFcorrelation(valuesA,valuesB,correlation) | ||
1421 | 1123 | void getpdfcorrelation_(const double* valuesA, const double* valuesB, double& correlation) { | ||
1422 | 1124 | int nset1 = 1; | ||
1423 | 1125 | getpdfcorrelationm_(nset1, valuesA, valuesB, correlation); | ||
1424 | 1126 | } | ||
1425 | 1127 | |||
1426 | 1128 | |||
1427 | 1129 | /////////////////////////////////////// | ||
1428 | 1130 | |||
1429 | 1131 | |||
1430 | 1132 | /// REALLY OLD PDFLIB COMPATIBILITY FUNCTIONS | ||
1431 | 1133 | |||
1432 | 1134 | /// PDFLIB initialisation function | ||
1433 | 1135 | void pdfset_(const char* par, const double* value, int parlength) { | ||
1434 | 1136 | |||
1435 | 1137 | string my_par(par), message; | ||
1436 | 1138 | int id; | ||
1437 | 1139 | // Identify the calling program (yuck!) | ||
1438 | 1140 | if (my_par.find("NPTYPE") != string::npos) { | ||
1439 | 1141 | message = "==== LHAPDF6 USING PYTHIA-TYPE LHAGLUE INTERFACE ===="; | ||
1440 | 1142 | // Take PDF ID from value[2] | ||
1441 | 1143 | id = value[2]+1000*value[1]; | ||
1442 | 1144 | } else if (my_par.find("HWLHAPDF") != string::npos) { | ||
1443 | 1145 | message = "==== LHAPDF6 USING HERWIG-TYPE LHAGLUE INTERFACE ===="; | ||
1444 | 1146 | // Take PDF ID from value[0] | ||
1445 | 1147 | id = value[0]; | ||
1446 | 1148 | } else if (my_par.find("DEFAULT") != string::npos) { | ||
1447 | 1149 | message = "==== LHAPDF6 USING DEFAULT-TYPE LHAGLUE INTERFACE ===="; | ||
1448 | 1150 | // Take PDF ID from value[0] | ||
1449 | 1151 | id = value[0]; | ||
1450 | 1152 | } else { | ||
1451 | 1153 | message = "==== LHAPDF6 USING PDFLIB-TYPE LHAGLUE INTERFACE ===="; | ||
1452 | 1154 | // Take PDF ID from value[2] | ||
1453 | 1155 | id = value[2]+1000*value[1]; | ||
1454 | 1156 | } | ||
1455 | 1157 | pair<string, int> set_id = LHAPDF::lookupPDF(id); | ||
1456 | 1158 | if (set_id.first != ACTIVESETS[1].setname || set_id.second != ACTIVESETS[1].currentmem) { | ||
1457 | 1159 | if (LHAPDF::verbosity() > 0) cout << message << endl; | ||
1458 | 1160 | ACTIVESETS[1] = PDFSetHandler(id); | ||
1459 | 1161 | } | ||
1460 | 1162 | |||
1461 | 1163 | CURRENTSET = 1; | ||
1462 | 1164 | |||
1463 | 1165 | // Extract parameters for common blocks (with sensible fallback values) | ||
1464 | 1166 | PDFPtr pdf = ACTIVESETS[1].activeMember(); | ||
1465 | 1167 | w50513_.xmin = pdf->info().get_entry_as<double>("XMin", 0.0); | ||
1466 | 1168 | w50513_.xmax = pdf->info().get_entry_as<double>("XMax", 1.0); | ||
1467 | 1169 | w50513_.q2min = LHAPDF::sqr(pdf->info().get_entry_as<double>("QMin", 1.0)); | ||
1468 | 1170 | w50513_.q2max = LHAPDF::sqr(pdf->info().get_entry_as<double>("QMax", 1.0e5)); | ||
1469 | 1171 | w50512_.qcdl4 = pdf->info().get_entry_as<double>("AlphaS_Lambda4", 0.0); | ||
1470 | 1172 | w50512_.qcdl5 = pdf->info().get_entry_as<double>("AlphaS_Lambda5", 0.0); | ||
1471 | 1173 | lhapdfr_.qcdlha4 = pdf->info().get_entry_as<double>("AlphaS_Lambda4", 0.0); | ||
1472 | 1174 | lhapdfr_.qcdlha5 = pdf->info().get_entry_as<double>("AlphaS_Lambda5", 0.0); | ||
1473 | 1175 | lhapdfr_.nfllha = 4; | ||
1474 | 1176 | // Activate legacy/compatibility LHAPDF5-type behaviour re. broken Lambda values | ||
1475 | 1177 | if (pdf->info().get_entry_as<bool>("Pythia6LambdaV5Compat", true)) { | ||
1476 | 1178 | w50512_.qcdl4 = 0.192; | ||
1477 | 1179 | w50512_.qcdl5 = 0.192; | ||
1478 | 1180 | lhapdfr_.qcdlha4 = 0.192; | ||
1479 | 1181 | lhapdfr_.qcdlha5 = 0.192; | ||
1480 | 1182 | } | ||
1481 | 1183 | } | ||
1482 | 1184 | |||
1483 | 1185 | /// PDFLIB nucleon structure function querying | ||
1484 | 1186 | void structm_(const double& x, const double& q, | ||
1485 | 1187 | double& upv, double& dnv, double& usea, double& dsea, | ||
1486 | 1188 | double& str, double& chm, double& bot, double& top, double& glu) { | ||
1487 | 1189 | CURRENTSET = 1; | ||
1488 | 1190 | /// Fill (partial) parton return variables | ||
1489 | 1191 | PDFPtr pdf = ACTIVESETS[1].activeMember(); | ||
1490 | 1192 | dsea = pdf->xfxQ(-1, x, q); | ||
1491 | 1193 | usea = pdf->xfxQ(-2, x, q); | ||
1492 | 1194 | dnv = pdf->xfxQ(1, x, q) - dsea; | ||
1493 | 1195 | upv = pdf->xfxQ(2, x, q) - usea; | ||
1494 | 1196 | str = pdf->xfxQ(3, x, q); | ||
1495 | 1197 | chm = (pdf->hasFlavor(4)) ? pdf->xfxQ(4, x, q) : 0; | ||
1496 | 1198 | bot = (pdf->hasFlavor(5)) ? pdf->xfxQ(5, x, q) : 0; | ||
1497 | 1199 | top = (pdf->hasFlavor(6)) ? pdf->xfxQ(6, x, q) : 0; | ||
1498 | 1200 | glu = pdf->xfxQ(21, x, q); | ||
1499 | 1201 | } | ||
1500 | 1202 | |||
1501 | 1203 | /// PDFLIB photon structure function querying | ||
1502 | 1204 | void structp_(const double& x, const double& q2, const double& p2, const double& ip2, | ||
1503 | 1205 | double& upv, double& dnv, double& usea, double& dsea, | ||
1504 | 1206 | double& str, double& chm, double& bot, double& top, double& glu) { | ||
1505 | 1207 | throw LHAPDF::NotImplementedError("Photon structure functions are not yet supported"); | ||
1506 | 1208 | } | ||
1507 | 1209 | |||
1508 | 1210 | /// PDFLIB statistics on PDF under/overflows | ||
1509 | 1211 | void pdfsta_() { | ||
1510 | 1212 | /// @note Can't do anything... | ||
1511 | 1213 | } | ||
1512 | 1214 | |||
1513 | 1215 | |||
1514 | 1216 | } | ||
1515 | 1217 | |||
1516 | 1218 | |||
1517 | 1219 | // LHAPDF namespace C++ compatibility code | ||
1518 | 1220 | #ifdef ENABLE_LHAGLUE_CXX | ||
1519 | 1221 | |||
1520 | 1222 | |||
1521 | 1223 | void LHAPDF::setVerbosity(LHAPDF::Verbosity noiselevel) { | ||
1522 | 1224 | LHAPDF::setVerbosity((int) noiselevel); | ||
1523 | 1225 | } | ||
1524 | 1226 | |||
1525 | 1227 | void LHAPDF::setPDFPath(const string& path) { | ||
1526 | 1228 | pathsPrepend(path); | ||
1527 | 1229 | } | ||
1528 | 1230 | |||
1529 | 1231 | string LHAPDF::pdfsetsPath() { | ||
1530 | 1232 | return paths()[0]; | ||
1531 | 1233 | } | ||
1532 | 1234 | |||
1533 | 1235 | int LHAPDF::numberPDF() { | ||
1534 | 1236 | int nmem; | ||
1535 | 1237 | numberpdf_(nmem); | ||
1536 | 1238 | return nmem; | ||
1537 | 1239 | } | ||
1538 | 1240 | int LHAPDF::numberPDF(int nset) { | ||
1539 | 1241 | int nmem; | ||
1540 | 1242 | numberpdfm_(nset,nmem); | ||
1541 | 1243 | return nmem; | ||
1542 | 1244 | } | ||
1543 | 1245 | |||
1544 | 1246 | void LHAPDF::initPDF( int memset) { | ||
1545 | 1247 | int nset1 = 1; | ||
1546 | 1248 | initpdfm_(nset1, memset); | ||
1547 | 1249 | } | ||
1548 | 1250 | void LHAPDF::initPDF(int nset, int memset) { | ||
1549 | 1251 | initpdfm_(nset, memset); | ||
1550 | 1252 | } | ||
1551 | 1253 | |||
1552 | 1254 | |||
1553 | 1255 | double LHAPDF::xfx(double x, double Q, int fl) { | ||
1554 | 1256 | vector<double> r(13); | ||
1555 | 1257 | evolvepdf_(x, Q, &r[0]); | ||
1556 | 1258 | return r[fl+6]; | ||
1557 | 1259 | } | ||
1558 | 1260 | double LHAPDF::xfx(int nset, double x, double Q, int fl) { | ||
1559 | 1261 | vector<double> r(13); | ||
1560 | 1262 | evolvepdfm_(nset, x, Q, &r[0]); | ||
1561 | 1263 | return r[fl+6]; | ||
1562 | 1264 | } | ||
1563 | 1265 | |||
1564 | 1266 | vector<double> LHAPDF::xfx(double x, double Q) { | ||
1565 | 1267 | vector<double> r(13); | ||
1566 | 1268 | evolvepdf_(x, Q, &r[0]); | ||
1567 | 1269 | return r; | ||
1568 | 1270 | } | ||
1569 | 1271 | vector<double> LHAPDF::xfx(int nset, double x, double Q) { | ||
1570 | 1272 | vector<double> r(13); | ||
1571 | 1273 | evolvepdfm_(nset, x, Q, &r[0]); | ||
1572 | 1274 | return r; | ||
1573 | 1275 | } | ||
1574 | 1276 | |||
1575 | 1277 | void LHAPDF::xfx(double x, double Q, double* results) { | ||
1576 | 1278 | evolvepdf_(x, Q, results); | ||
1577 | 1279 | } | ||
1578 | 1280 | void LHAPDF::xfx(int nset, double x, double Q, double* results) { | ||
1579 | 1281 | evolvepdfm_(nset, x, Q, results); | ||
1580 | 1282 | } | ||
1581 | 1283 | |||
1582 | 1284 | |||
1583 | 1285 | vector<double> LHAPDF::xfxphoton(double x, double Q) { | ||
1584 | 1286 | vector<double> r(13); | ||
1585 | 1287 | double mphoton; | ||
1586 | 1288 | evolvepdfphoton_(x, Q, &r[0], mphoton); | ||
1587 | 1289 | r.push_back(mphoton); | ||
1588 | 1290 | return r; | ||
1589 | 1291 | } | ||
1590 | 1292 | vector<double> LHAPDF::xfxphoton(int nset, double x, double Q) { | ||
1591 | 1293 | vector<double> r(13); | ||
1592 | 1294 | double mphoton; | ||
1593 | 1295 | evolvepdfphotonm_(nset, x, Q, &r[0], mphoton); | ||
1594 | 1296 | r.push_back(mphoton); | ||
1595 | 1297 | return r; | ||
1596 | 1298 | } | ||
1597 | 1299 | |||
1598 | 1300 | void LHAPDF::xfxphoton(double x, double Q, double* results) { | ||
1599 | 1301 | evolvepdfphoton_(x, Q, results, results[13]); | ||
1600 | 1302 | } | ||
1601 | 1303 | void LHAPDF::xfxphoton(int nset, double x, double Q, double* results) { | ||
1602 | 1304 | evolvepdfphotonm_(nset, x, Q, results, results[13]); | ||
1603 | 1305 | } | ||
1604 | 1306 | |||
1605 | 1307 | double LHAPDF::xfxphoton(double x, double Q, int fl) { | ||
1606 | 1308 | vector<double> r(13); | ||
1607 | 1309 | double mphoton; | ||
1608 | 1310 | evolvepdfphoton_(x, Q, &r[0], mphoton); | ||
1609 | 1311 | if (fl == 7) return mphoton; | ||
1610 | 1312 | return r[fl+6]; | ||
1611 | 1313 | } | ||
1612 | 1314 | double LHAPDF::xfxphoton(int nset, double x, double Q, int fl) { | ||
1613 | 1315 | vector<double> r(13); | ||
1614 | 1316 | double mphoton; | ||
1615 | 1317 | evolvepdfphotonm_(nset, x, Q, &r[0], mphoton); | ||
1616 | 1318 | if ( fl == 7 ) return mphoton; | ||
1617 | 1319 | return r[fl+6]; | ||
1618 | 1320 | } | ||
1619 | 1321 | |||
1620 | 1322 | |||
1621 | 1323 | void LHAPDF::initPDFSet(const string& filename, int nmem) { | ||
1622 | 1324 | initPDFSet(1,filename, nmem); | ||
1623 | 1325 | } | ||
1624 | 1326 | |||
1625 | 1327 | void LHAPDF::initPDFSet(int nset, const string& filename, int nmem) { | ||
1626 | 1328 | initPDFSetByName(nset,filename); | ||
1627 | 1329 | ACTIVESETS[nset].loadMember(nmem); | ||
1628 | 1330 | CURRENTSET = nset; | ||
1629 | 1331 | } | ||
1630 | 1332 | |||
1631 | 1333 | |||
1632 | 1334 | void LHAPDF::initPDFSet(const string& filename, SetType type, int nmem) { | ||
1633 | 1335 | // silently ignore type | ||
1634 | 1336 | initPDFSet(1,filename, nmem); | ||
1635 | 1337 | } | ||
1636 | 1338 | |||
1637 | 1339 | void LHAPDF::initPDFSet(int nset, const string& filename, SetType type, int nmem) { | ||
1638 | 1340 | // silently ignore type | ||
1639 | 1341 | initPDFSetByName(nset,filename); | ||
1640 | 1342 | ACTIVESETS[nset].loadMember(nmem); | ||
1641 | 1343 | CURRENTSET = nset; | ||
1642 | 1344 | } | ||
1643 | 1345 | |||
1644 | 1346 | void LHAPDF::initPDFSet(int nset, int setid, int nmem) { | ||
1645 | 1347 | pair<string, int> set_id = LHAPDF::lookupPDF(setid+nmem); | ||
1646 | 1348 | if (set_id.second != nmem) | ||
1647 | 1349 | throw LHAPDF::UserError("Inconsistent member numbers: " + LHAPDF::to_str(set_id.second) + " != " + LHAPDF::to_str(nmem)); | ||
1648 | 1350 | if (set_id.first != ACTIVESETS[nset].setname || nmem != ACTIVESETS[nset].currentmem) | ||
1649 | 1351 | ACTIVESETS[nset] = PDFSetHandler(setid+nmem); | ||
1650 | 1352 | CURRENTSET = nset; | ||
1651 | 1353 | } | ||
1652 | 1354 | |||
1653 | 1355 | void LHAPDF::initPDFSet(int setid, int nmem) { | ||
1654 | 1356 | initPDFSet(1,setid,nmem); | ||
1655 | 1357 | } | ||
1656 | 1358 | |||
1657 | 1359 | #define SIZE 999 | ||
1658 | 1360 | void LHAPDF::initPDFSetByName(const string& filename) { | ||
1659 | 1361 | std::cout << "initPDFSetByName: " << filename << std::endl; | ||
1660 | 1362 | char cfilename[SIZE+1]; | ||
1661 | 1363 | strncpy(cfilename, filename.c_str(), SIZE); | ||
1662 | 1364 | initpdfsetbyname_(cfilename, filename.length()); | ||
1663 | 1365 | } | ||
1664 | 1366 | |||
1665 | 1367 | void LHAPDF::initPDFSetByName(int nset, const string& filename) { | ||
1666 | 1368 | char cfilename[SIZE+1]; | ||
1667 | 1369 | strncpy(cfilename, filename.c_str(), SIZE); | ||
1668 | 1370 | initpdfsetbynamem_(nset, cfilename, filename.length()); | ||
1669 | 1371 | } | ||
1670 | 1372 | |||
1671 | 1373 | void LHAPDF::initPDFSetByName(const string& filename, SetType type) { | ||
1672 | 1374 | //silently ignore type | ||
1673 | 1375 | std::cout << "initPDFSetByName: " << filename << std::endl; | ||
1674 | 1376 | char cfilename[SIZE+1]; | ||
1675 | 1377 | strncpy(cfilename, filename.c_str(), SIZE); | ||
1676 | 1378 | initpdfsetbyname_(cfilename, filename.length()); | ||
1677 | 1379 | } | ||
1678 | 1380 | |||
1679 | 1381 | void LHAPDF::initPDFSetByName(int nset, const string& filename, SetType type) { | ||
1680 | 1382 | //silently ignore type | ||
1681 | 1383 | char cfilename[SIZE+1]; | ||
1682 | 1384 | strncpy(cfilename, filename.c_str(), SIZE); | ||
1683 | 1385 | initpdfsetbynamem_(nset, cfilename, filename.length()); | ||
1684 | 1386 | } | ||
1685 | 1387 | |||
1686 | 1388 | |||
1687 | 1389 | void LHAPDF::getDescription() { | ||
1688 | 1390 | getDescription(1); | ||
1689 | 1391 | } | ||
1690 | 1392 | |||
1691 | 1393 | void LHAPDF::getDescription(int nset) { | ||
1692 | 1394 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1693 | 1395 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1694 | 1396 | cout << ACTIVESETS[nset].activeMember()->set().description() << endl; | ||
1695 | 1397 | } | ||
1696 | 1398 | |||
1697 | 1399 | |||
1698 | 1400 | double LHAPDF::alphasPDF(double Q) { | ||
1699 | 1401 | return LHAPDF::alphasPDF(1, Q) ; | ||
1700 | 1402 | } | ||
1701 | 1403 | |||
1702 | 1404 | double LHAPDF::alphasPDF(int nset, double Q) { | ||
1703 | 1405 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1704 | 1406 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1705 | 1407 | CURRENTSET = nset; | ||
1706 | 1408 | // return alphaS for the requested set | ||
1707 | 1409 | return ACTIVESETS[nset].activeMember()->alphasQ(Q); | ||
1708 | 1410 | } | ||
1709 | 1411 | |||
1710 | 1412 | |||
1711 | 1413 | bool LHAPDF::hasPhoton(){ | ||
1712 | 1414 | return has_photon_(); | ||
1713 | 1415 | } | ||
1714 | 1416 | |||
1715 | 1417 | |||
1716 | 1418 | int LHAPDF::getOrderAlphaS() { | ||
1717 | 1419 | return LHAPDF::getOrderAlphaS(1) ; | ||
1718 | 1420 | } | ||
1719 | 1421 | |||
1720 | 1422 | int LHAPDF::getOrderAlphaS(int nset) { | ||
1721 | 1423 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1722 | 1424 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1723 | 1425 | CURRENTSET = nset; | ||
1724 | 1426 | // return alphaS Order for the requested set | ||
1725 | 1427 | return ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("AlphaS_OrderQCD", -1); | ||
1726 | 1428 | } | ||
1727 | 1429 | |||
1728 | 1430 | |||
1729 | 1431 | int LHAPDF::getOrderPDF() { | ||
1730 | 1432 | return LHAPDF::getOrderPDF(1) ; | ||
1731 | 1433 | } | ||
1732 | 1434 | |||
1733 | 1435 | int LHAPDF::getOrderPDF(int nset) { | ||
1734 | 1436 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1735 | 1437 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1736 | 1438 | CURRENTSET = nset; | ||
1737 | 1439 | // return PDF order for the requested set | ||
1738 | 1440 | return ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("OrderQCD", -1); | ||
1739 | 1441 | } | ||
1740 | 1442 | |||
1741 | 1443 | |||
1742 | 1444 | double LHAPDF::getLam4(int nmem) { | ||
1743 | 1445 | return LHAPDF::getLam4(1, nmem) ; | ||
1744 | 1446 | } | ||
1745 | 1447 | |||
1746 | 1448 | double LHAPDF::getLam4(int nset, int nmem) { | ||
1747 | 1449 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1748 | 1450 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1749 | 1451 | // CURRENTSET = nset; | ||
1750 | 1452 | // ACTIVESETS[nset].loadMember(nmem); | ||
1751 | 1453 | // return ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("AlphaS_Lambda4", -1.0); | ||
1752 | 1454 | double qcdl4; | ||
1753 | 1455 | getlam4m_(nset, nmem, qcdl4); | ||
1754 | 1456 | return qcdl4; | ||
1755 | 1457 | } | ||
1756 | 1458 | |||
1757 | 1459 | |||
1758 | 1460 | double LHAPDF::getLam5(int nmem) { | ||
1759 | 1461 | return LHAPDF::getLam5(1, nmem) ; | ||
1760 | 1462 | } | ||
1761 | 1463 | |||
1762 | 1464 | double LHAPDF::getLam5(int nset, int nmem) { | ||
1763 | 1465 | // if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1764 | 1466 | // throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1765 | 1467 | // CURRENTSET = nset; | ||
1766 | 1468 | // ACTIVESETS[nset].loadMember(nmem); | ||
1767 | 1469 | // return ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("AlphaS_Lambda5", -1.0); | ||
1768 | 1470 | double qcdl5; | ||
1769 | 1471 | getlam5m_(nset, nmem, qcdl5); | ||
1770 | 1472 | return qcdl5; | ||
1771 | 1473 | } | ||
1772 | 1474 | |||
1773 | 1475 | |||
1774 | 1476 | int LHAPDF::getNf() { | ||
1775 | 1477 | return LHAPDF::getNf(1) ; | ||
1776 | 1478 | } | ||
1777 | 1479 | |||
1778 | 1480 | int LHAPDF::getNf(int nset) { | ||
1779 | 1481 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1780 | 1482 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1781 | 1483 | CURRENTSET = nset; | ||
1782 | 1484 | // return alphaS Order for the requested set | ||
1783 | 1485 | return ACTIVESETS[nset].activeMember()->info().get_entry_as<int>("NumFlavors"); | ||
1784 | 1486 | } | ||
1785 | 1487 | |||
1786 | 1488 | |||
1787 | 1489 | double LHAPDF::getXmin(int nmem) { | ||
1788 | 1490 | return LHAPDF::getXmin(1, nmem) ; | ||
1789 | 1491 | } | ||
1790 | 1492 | |||
1791 | 1493 | double LHAPDF::getXmin(int nset, int nmem) { | ||
1792 | 1494 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1793 | 1495 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1794 | 1496 | CURRENTSET = nset; | ||
1795 | 1497 | // return alphaS Order for the requested set | ||
1796 | 1498 | ACTIVESETS[nset].loadMember(nmem); | ||
1797 | 1499 | return ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMin"); | ||
1798 | 1500 | } | ||
1799 | 1501 | |||
1800 | 1502 | double LHAPDF::getXmax(int nmem) { | ||
1801 | 1503 | return LHAPDF::getXmax(1, nmem) ; | ||
1802 | 1504 | } | ||
1803 | 1505 | |||
1804 | 1506 | double LHAPDF::getXmax(int nset, int nmem) { | ||
1805 | 1507 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1806 | 1508 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1807 | 1509 | CURRENTSET = nset; | ||
1808 | 1510 | // return alphaS Order for the requested set | ||
1809 | 1511 | ACTIVESETS[nset].loadMember(nmem); | ||
1810 | 1512 | return ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("XMax"); | ||
1811 | 1513 | } | ||
1812 | 1514 | |||
1813 | 1515 | double LHAPDF::getQ2min(int nmem) { | ||
1814 | 1516 | return LHAPDF::getQ2min(1, nmem) ; | ||
1815 | 1517 | } | ||
1816 | 1518 | |||
1817 | 1519 | double LHAPDF::getQ2min(int nset, int nmem) { | ||
1818 | 1520 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1819 | 1521 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1820 | 1522 | CURRENTSET = nset; | ||
1821 | 1523 | // return alphaS Order for the requested set | ||
1822 | 1524 | ACTIVESETS[nset].loadMember(nmem); | ||
1823 | 1525 | return pow(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMin"),2); | ||
1824 | 1526 | } | ||
1825 | 1527 | |||
1826 | 1528 | double LHAPDF::getQ2max(int nmem) { | ||
1827 | 1529 | return LHAPDF::getQ2max(1,nmem) ; | ||
1828 | 1530 | } | ||
1829 | 1531 | |||
1830 | 1532 | double LHAPDF::getQ2max(int nset, int nmem) { | ||
1831 | 1533 | if (ACTIVESETS.find(nset) == ACTIVESETS.end()) | ||
1832 | 1534 | throw LHAPDF::UserError("Trying to use LHAGLUE set #" + LHAPDF::to_str(nset) + " but it is not initialised"); | ||
1833 | 1535 | CURRENTSET = nset; | ||
1834 | 1536 | // return alphaS Order for the requested set | ||
1835 | 1537 | ACTIVESETS[nset].loadMember(nmem); | ||
1836 | 1538 | return pow(ACTIVESETS[nset].activeMember()->info().get_entry_as<double>("QMax"),2); | ||
1837 | 1539 | } | ||
1838 | 1540 | |||
1839 | 1541 | double LHAPDF::getQMass(int nf) { | ||
1840 | 1542 | return LHAPDF::getQMass(1, nf) ; | ||
1841 | 1543 | } | ||
1842 | 1544 | |||
1843 | 1545 | double LHAPDF::getQMass(int nset, int nf) { | ||
1844 | 1546 | double mass; | ||
1845 | 1547 | getqmassm_(nset, nf, mass); | ||
1846 | 1548 | return mass; | ||
1847 | 1549 | } | ||
1848 | 1550 | |||
1849 | 1551 | double LHAPDF::getThreshold(int nf) { | ||
1850 | 1552 | return LHAPDF::getThreshold(1, nf) ; | ||
1851 | 1553 | } | ||
1852 | 1554 | |||
1853 | 1555 | double LHAPDF::getThreshold(int nset, int nf) { | ||
1854 | 1556 | double thres; | ||
1855 | 1557 | getthresholdm_(nset, nf, thres); | ||
1856 | 1558 | return thres; | ||
1857 | 1559 | } | ||
1858 | 1560 | |||
1859 | 1561 | void LHAPDF::usePDFMember(int member) { | ||
1860 | 1562 | initpdf_(member); | ||
1861 | 1563 | } | ||
1862 | 1564 | |||
1863 | 1565 | void LHAPDF::usePDFMember(int nset, int member) { | ||
1864 | 1566 | initpdfm_(nset, member); | ||
1865 | 1567 | } | ||
1866 | 1568 | |||
1867 | 1569 | #endif // ENABLE_LHAGLUE_CXX | ||
1868 | 0 | 1570 | ||
1869 | === modified file 'Template/LO/Source/dsample.f' | |||
1870 | --- Template/LO/Source/dsample.f 2020-01-20 14:53:46 +0000 | |||
1871 | +++ Template/LO/Source/dsample.f 2020-06-21 12:17:46 +0000 | |||
1872 | @@ -141,7 +141,7 @@ | |||
1873 | 141 | fx =0d0 | 141 | fx =0d0 |
1874 | 142 | wgt=0d0 | 142 | wgt=0d0 |
1875 | 143 | endif | 143 | endif |
1877 | 144 | call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result | 144 | call sample_put_point(wgt,x(1),iter,ipole) !Store result |
1878 | 145 | endif | 145 | endif |
1879 | 146 | if (wgt .ne. 0d0) kevent=kevent+1 | 146 | if (wgt .ne. 0d0) kevent=kevent+1 |
1880 | 147 | c | 147 | c |
1881 | @@ -318,7 +318,7 @@ | |||
1882 | 318 | endif | 318 | endif |
1883 | 319 | 319 | ||
1884 | 320 | if (nzoom .le. 0) then | 320 | if (nzoom .le. 0) then |
1886 | 321 | call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result | 321 | call sample_put_point(wgt,x(1),iter,ipole) !Store result |
1887 | 322 | else | 322 | else |
1888 | 323 | nzoom = nzoom -1 | 323 | nzoom = nzoom -1 |
1889 | 324 | ievent=ievent-1 | 324 | ievent=ievent-1 |
1890 | 325 | 325 | ||
1891 | === modified file 'Template/LO/SubProcesses/cuts.f' | |||
1892 | --- Template/LO/SubProcesses/cuts.f 2019-07-30 13:51:02 +0000 | |||
1893 | +++ Template/LO/SubProcesses/cuts.f 2020-06-21 12:17:46 +0000 | |||
1894 | @@ -1394,10 +1394,10 @@ | |||
1895 | 1394 | C | 1394 | C |
1896 | 1395 | 2 IF (N.EQ.1) RETURN | 1395 | 2 IF (N.EQ.1) RETURN |
1897 | 1396 | IF (MODE) 10,20,30 | 1396 | IF (MODE) 10,20,30 |
1899 | 1397 | 10 CALL SORTTI (A,INDEX,N) | 1397 | 10 STOP 5 ! CALL SORTTI (A,INDEX,N) |
1900 | 1398 | GO TO 40 | 1398 | GO TO 40 |
1901 | 1399 | C | 1399 | C |
1903 | 1400 | 20 CALL SORTTC(A,INDEX,N) | 1400 | 20 STOP 5 ! CALL SSORTTC(A,INDEX,N) |
1904 | 1401 | GO TO 40 | 1401 | GO TO 40 |
1905 | 1402 | C | 1402 | C |
1906 | 1403 | 30 CALL SORTTF (A,INDEX,N) | 1403 | 30 CALL SORTTF (A,INDEX,N) |
1907 | 1404 | 1404 | ||
1908 | === modified file 'Template/LO/SubProcesses/genps.f' | |||
1909 | --- Template/LO/SubProcesses/genps.f 2019-09-26 11:09:58 +0000 | |||
1910 | +++ Template/LO/SubProcesses/genps.f 2020-06-21 12:17:46 +0000 | |||
1911 | @@ -666,7 +666,8 @@ | |||
1912 | 666 | c data nerr/0/ | 666 | c data nerr/0/ |
1913 | 667 | double precision smin,smax,totmass,totmassin,xa2,xb2,wgt | 667 | double precision smin,smax,totmass,totmassin,xa2,xb2,wgt |
1914 | 668 | double precision costh,phi,tmin,tmax,t | 668 | double precision costh,phi,tmin,tmax,t |
1916 | 669 | double precision ma2,mb2,m12,mn2,s1 | 669 | double precision ma2,mb2,m12,mn2,s1, mi2 |
1917 | 670 | double precision tmass(-max_branch:-1) | ||
1918 | 670 | c | 671 | c |
1919 | 671 | c External | 672 | c External |
1920 | 672 | c | 673 | c |
1921 | @@ -864,7 +865,7 @@ | |||
1922 | 864 | c and not to be block by numerical inacuracy | 865 | c and not to be block by numerical inacuracy |
1923 | 865 | c tmax = max(tmax,0d0) !This line if want really t freedom | 866 | c tmax = max(tmax,0d0) !This line if want really t freedom |
1924 | 866 | call sample_get_x(wgt,x(-ibranch),-ibranch,iconfig, | 867 | call sample_get_x(wgt,x(-ibranch),-ibranch,iconfig, |
1926 | 867 | $ 0, -tmin/stot) | 868 | $ 0d0, -tmin/stot) |
1927 | 868 | t = stot*(-x(-ibranch)) | 869 | t = stot*(-x(-ibranch)) |
1928 | 869 | 870 | ||
1929 | 870 | else | 871 | else |
1930 | @@ -893,7 +894,14 @@ | |||
1931 | 893 | c pa+pb -> p1+ p2; t=(pa-p1)**2; pr = pa-p1 | 894 | c pa+pb -> p1+ p2; t=(pa-p1)**2; pr = pa-p1 |
1932 | 894 | c gentcms(pa,pb,t,phi,m1,m2,p1,pr) | 895 | c gentcms(pa,pb,t,phi,m1,m2,p1,pr) |
1933 | 895 | c | 896 | c |
1935 | 896 | call gentcms(p(0,itree(1,ibranch)),p(0,2),t,phi, | 897 | |
1936 | 898 | if (itree(1,ibranch).gt.-ns_channel-1)then | ||
1937 | 899 | mi2 = m(itree(1,ibranch))**2 | ||
1938 | 900 | else | ||
1939 | 901 | mi2 = tmass(itree(1,ibranch)) | ||
1940 | 902 | endif | ||
1941 | 903 | tmass(ibranch) = t | ||
1942 | 904 | call gentcms(p(0,itree(1,ibranch)),p(0,2),t,phi, mi2, | ||
1943 | 897 | & m(itree(2,ibranch)),m(ibranch-1),p(0,itree(2,ibranch)), | 905 | & m(itree(2,ibranch)),m(ibranch-1),p(0,itree(2,ibranch)), |
1944 | 898 | & p(0,ibranch),jac) | 906 | & p(0,ibranch),jac) |
1945 | 899 | 907 | ||
1946 | @@ -1002,7 +1010,7 @@ | |||
1947 | 1002 | endif | 1010 | endif |
1948 | 1003 | end | 1011 | end |
1949 | 1004 | 1012 | ||
1951 | 1005 | subroutine gentcms(pa,pb,t,phi,m1,m2,p1,pr,jac) | 1013 | subroutine gentcms(pa,pb,t,phi,ma2,m1,m2,p1,pr,jac) |
1952 | 1006 | c************************************************************************* | 1014 | c************************************************************************* |
1953 | 1007 | c Generates 4 momentum for particle 1, and remainder pr | 1015 | c Generates 4 momentum for particle 1, and remainder pr |
1954 | 1008 | c given the values t, and phi | 1016 | c given the values t, and phi |
1955 | @@ -1038,7 +1046,7 @@ | |||
1956 | 1038 | ptotm(i) = ptot(i) | 1046 | ptotm(i) = ptot(i) |
1957 | 1039 | endif | 1047 | endif |
1958 | 1040 | enddo | 1048 | enddo |
1960 | 1041 | ma2 = dot(pa,pa) | 1049 | c ma2 = dot(pa,pa) |
1961 | 1042 | c | 1050 | c |
1962 | 1043 | c determine magnitude of p1 in cms frame (from dhelas routine mom2cx) | 1051 | c determine magnitude of p1 in cms frame (from dhelas routine mom2cx) |
1963 | 1044 | c | 1052 | c |
1964 | 1045 | 1053 | ||
1965 | === modified file 'Template/LO/SubProcesses/reweight.f' | |||
1966 | --- Template/LO/SubProcesses/reweight.f 2020-03-08 20:49:57 +0000 | |||
1967 | +++ Template/LO/SubProcesses/reweight.f 2020-06-21 12:17:46 +0000 | |||
1968 | @@ -417,6 +417,12 @@ | |||
1969 | 417 | ipart(1,imo)=ipart(1,ida2) | 417 | ipart(1,imo)=ipart(1,ida2) |
1970 | 418 | ipart(2,imo)=ipart(1,ida1) | 418 | ipart(2,imo)=ipart(1,ida1) |
1971 | 419 | endif | 419 | endif |
1972 | 420 | else if (abs(get_color(idmo)).eq.8.and.abs(get_color(idda1)).eq.1.and.abs(get_color(idda2)).eq.8)then | ||
1973 | 421 | ipart(1,imo)=ipart(1,ida2) | ||
1974 | 422 | ipart(2,imo)=ipart(2,ida2) | ||
1975 | 423 | else if (abs(get_color(idmo)).eq.8.and.abs(get_color(idda1)).eq.8.and.abs(get_color(idda2)).eq.1)then | ||
1976 | 424 | ipart(1,imo)=ipart(1,ida1) | ||
1977 | 425 | ipart(2,imo)=ipart(2,ida1) | ||
1978 | 420 | else | 426 | else |
1979 | 421 | write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2) | 427 | write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2) |
1980 | 422 | write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale" | 428 | write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale" |
1981 | 423 | 429 | ||
1982 | === modified file 'Template/LO/SubProcesses/unwgt.f' | |||
1983 | --- Template/LO/SubProcesses/unwgt.f 2018-06-20 11:54:42 +0000 | |||
1984 | +++ Template/LO/SubProcesses/unwgt.f 2020-06-21 12:17:46 +0000 | |||
1985 | @@ -478,7 +478,8 @@ | |||
1986 | 478 | double precision beta, get_betaz | 478 | double precision beta, get_betaz |
1987 | 479 | double precision ebi(0:3), ebo(0:3) | 479 | double precision ebi(0:3), ebo(0:3) |
1988 | 480 | double precision ptcltmp(nexternal), pdum(0:3) | 480 | double precision ptcltmp(nexternal), pdum(0:3) |
1990 | 481 | 481 | integer beam_number | |
1991 | 482 | |||
1992 | 482 | integer idup(nexternal,maxproc,maxsproc) | 483 | integer idup(nexternal,maxproc,maxsproc) |
1993 | 483 | integer mothup(2,nexternal) | 484 | integer mothup(2,nexternal) |
1994 | 484 | integer icolup(2,nexternal,maxflow,maxsproc) | 485 | integer icolup(2,nexternal,maxflow,maxsproc) |
1995 | @@ -705,31 +706,42 @@ | |||
1996 | 705 | else | 706 | else |
1997 | 706 | write(s_buff(3), '(a)') '<asrwt>0</asrwt>' | 707 | write(s_buff(3), '(a)') '<asrwt>0</asrwt>' |
1998 | 707 | endif | 708 | endif |
2000 | 708 | if(n_pdfrw(1).gt.0)then | 709 | beam_number = 1 |
2001 | 710 | if (flip) then | ||
2002 | 711 | beam_number =2 | ||
2003 | 712 | endif | ||
2004 | 713 | |||
2005 | 714 | if(n_pdfrw(1).gt.0.and.abs(lpp(1)).eq.1)then | ||
2006 | 709 | if(2*n_pdfrw(1).lt.10) then | 715 | if(2*n_pdfrw(1).lt.10) then |
2008 | 710 | write(cfmt,'(a,I1,a,I1,a)') '(a,I3,', | 716 | write(cfmt,'(a,I1,a,I1,a)') '(a,I1,a,I3,', |
2009 | 711 | $ n_pdfrw(1),'I9,',2*n_pdfrw(1),'E15.8,a)' | 717 | $ n_pdfrw(1),'I9,',2*n_pdfrw(1),'E15.8,a)' |
2010 | 712 | else | 718 | else |
2012 | 713 | write(cfmt,'(a,I1,a,I2,a)') '(a,I3,', | 719 | write(cfmt,'(a,I1,a,I2,a)') '(a,I1,a,I3,', |
2013 | 714 | $ n_pdfrw(1),'I9,',2*n_pdfrw(1),'E15.8,a)' | 720 | $ n_pdfrw(1),'I9,',2*n_pdfrw(1),'E15.8,a)' |
2014 | 715 | endif | 721 | endif |
2016 | 716 | write(s_buff(4), cfmt) '<pdfrwt beam="1">', | 722 | |
2017 | 723 | write(s_buff(4), cfmt) '<pdfrwt beam="', beam_number, '">', | ||
2018 | 717 | $ n_pdfrw(1),(i_pdgpdf(i,1),i=1,n_pdfrw(1)), | 724 | $ n_pdfrw(1),(i_pdgpdf(i,1),i=1,n_pdfrw(1)), |
2019 | 718 | $ (s_xpdf(i,1),i=1,n_pdfrw(1)), | 725 | $ (s_xpdf(i,1),i=1,n_pdfrw(1)), |
2020 | 719 | $ (s_qpdf(i,1),i=1,n_pdfrw(1)), | 726 | $ (s_qpdf(i,1),i=1,n_pdfrw(1)), |
2021 | 720 | $ '</pdfrwt>' | 727 | $ '</pdfrwt>' |
2022 | 721 | else | 728 | else |
2026 | 722 | write(s_buff(4), '(a)') '<pdfrwt beam="1">0</pdfrwt>' | 729 | write(s_buff(4), '(a,I1,a)') '<pdfrwt beam="', |
2027 | 723 | endif | 730 | $ beam_number,'">0</pdfrwt>' |
2028 | 724 | if(n_pdfrw(2).gt.0)then | 731 | endif |
2029 | 732 | beam_number = 2 | ||
2030 | 733 | if (flip) then | ||
2031 | 734 | beam_number = 1 | ||
2032 | 735 | endif | ||
2033 | 736 | if(n_pdfrw(2).gt.0.and.abs(lpp(2)).eq.1)then | ||
2034 | 725 | if(2*n_pdfrw(2).lt.10) then | 737 | if(2*n_pdfrw(2).lt.10) then |
2036 | 726 | write(cfmt,'(a,I1,a,I1,a)') '(a,I3,', | 738 | write(cfmt,'(a,I1,a,I1,a)') '(a,I1,a,I3,', |
2037 | 727 | $ n_pdfrw(2),'I9,',2*n_pdfrw(2),'E15.8,a)' | 739 | $ n_pdfrw(2),'I9,',2*n_pdfrw(2),'E15.8,a)' |
2038 | 728 | else | 740 | else |
2040 | 729 | write(cfmt,'(a,I1,a,I2,a)') '(a,I3,', | 741 | write(cfmt,'(a,I1,a,I2,a)') '(a,I1,a,I3,', |
2041 | 730 | $ n_pdfrw(2),'I9,',2*n_pdfrw(2),'E15.8,a)' | 742 | $ n_pdfrw(2),'I9,',2*n_pdfrw(2),'E15.8,a)' |
2042 | 731 | endif | 743 | endif |
2044 | 732 | write(s_buff(5), cfmt) '<pdfrwt beam="2">', | 744 | write(s_buff(5), cfmt) '<pdfrwt beam="',beam_number,'">', |
2045 | 733 | $ n_pdfrw(2),(i_pdgpdf(i,2),i=1,n_pdfrw(2)), | 745 | $ n_pdfrw(2),(i_pdgpdf(i,2),i=1,n_pdfrw(2)), |
2046 | 734 | $ (s_xpdf(i,2),i=1,n_pdfrw(2)), | 746 | $ (s_xpdf(i,2),i=1,n_pdfrw(2)), |
2047 | 735 | $ (s_qpdf(i,2),i=1,n_pdfrw(2)), | 747 | $ (s_qpdf(i,2),i=1,n_pdfrw(2)), |
2048 | 736 | 748 | ||
2049 | === modified file 'Template/LO/bin/internal/merge.pl' | |||
2050 | --- Template/LO/bin/internal/merge.pl 2014-08-07 12:08:24 +0000 | |||
2051 | +++ Template/LO/bin/internal/merge.pl 2020-06-21 12:17:46 +0000 | |||
2052 | @@ -52,8 +52,8 @@ | |||
2053 | 52 | # Keep track if we are in the init block or not | 52 | # Keep track if we are in the init block or not |
2054 | 53 | $initblock = 0; | 53 | $initblock = 0; |
2055 | 54 | 54 | ||
2058 | 55 | # LHE version extracted from current file ; 1 by default | 55 | # LHE version extracted from current file ; 3 by default |
2059 | 56 | $lhe_version = 1.0; | 56 | $lhe_version = 3.0; |
2060 | 57 | 57 | ||
2061 | 58 | while (1) { | 58 | while (1) { |
2062 | 59 | $gzbytes = $gzin->gzreadline($gzline); | 59 | $gzbytes = $gzin->gzreadline($gzline); |
2063 | 60 | 60 | ||
2064 | === modified file 'Template/LO/bin/internal/restore_data' | |||
2065 | --- Template/LO/bin/internal/restore_data 2011-06-29 14:15:21 +0000 | |||
2066 | +++ Template/LO/bin/internal/restore_data 2020-06-21 12:17:46 +0000 | |||
2067 | @@ -30,13 +30,21 @@ | |||
2068 | 30 | exit | 30 | exit |
2069 | 31 | fi | 31 | fi |
2070 | 32 | 32 | ||
2073 | 33 | 33 | if [[ -e $1_results.dat ]]; then | |
2074 | 34 | cp $1_results.dat results.dat >& /dev/null | 34 | cp $1_results.dat results.dat >& /dev/null |
2075 | 35 | else | ||
2076 | 36 | cp results.dat $1_results.dat >& /dev/null | ||
2077 | 37 | fi | ||
2078 | 38 | |||
2079 | 35 | for i in `cat subproc.mg` ; do | 39 | for i in `cat subproc.mg` ; do |
2080 | 36 | cd $i | 40 | cd $i |
2081 | 37 | echo $i | 41 | echo $i |
2082 | 38 | rm -f ftn25 ftn26 >& /dev/null | 42 | rm -f ftn25 ftn26 >& /dev/null |
2084 | 39 | cp $1_results.dat results.dat >& /dev/null | 43 | if [[ -e $1_results.dat ]]; then |
2085 | 44 | cp $1_results.dat results.dat >& /dev/null | ||
2086 | 45 | else | ||
2087 | 46 | cp results.dat $1_results.dat >& /dev/null | ||
2088 | 47 | fi | ||
2089 | 40 | for k in G* ; do | 48 | for k in G* ; do |
2090 | 41 | if [[ ! -d $k ]]; then | 49 | if [[ ! -d $k ]]; then |
2091 | 42 | continue | 50 | continue |
2092 | @@ -45,6 +53,8 @@ | |||
2093 | 45 | for j in $1_results.dat ; do | 53 | for j in $1_results.dat ; do |
2094 | 46 | if [[ -e $j ]] ; then | 54 | if [[ -e $j ]] ; then |
2095 | 47 | cp $j results.dat | 55 | cp $j results.dat |
2096 | 56 | else | ||
2097 | 57 | cp results.dat $j | ||
2098 | 48 | fi | 58 | fi |
2099 | 49 | done | 59 | done |
2100 | 50 | for j in $1_ftn26.gz ; do | 60 | for j in $1_ftn26.gz ; do |
2101 | 51 | 61 | ||
2102 | === modified file 'Template/NLO/MCatNLO/include/LHEF.h' | |||
2103 | --- Template/NLO/MCatNLO/include/LHEF.h 2014-10-31 07:52:06 +0000 | |||
2104 | +++ Template/NLO/MCatNLO/include/LHEF.h 2020-06-21 12:17:46 +0000 | |||
2105 | @@ -1971,7 +1971,7 @@ | |||
2106 | 1971 | * Used internally to read a single line from the stream. | 1971 | * Used internally to read a single line from the stream. |
2107 | 1972 | */ | 1972 | */ |
2108 | 1973 | bool getline() { | 1973 | bool getline() { |
2110 | 1974 | return ( std::getline(file, currentLine) ); | 1974 | return ( (bool) std::getline(file, currentLine) ); |
2111 | 1975 | } | 1975 | } |
2112 | 1976 | 1976 | ||
2113 | 1977 | protected: | 1977 | protected: |
2114 | 1978 | 1978 | ||
2115 | === modified file 'Template/NLO/SubProcesses/cuts.f' | |||
2116 | --- Template/NLO/SubProcesses/cuts.f 2017-11-17 16:07:39 +0000 | |||
2117 | +++ Template/NLO/SubProcesses/cuts.f 2020-06-21 12:17:46 +0000 | |||
2118 | @@ -553,10 +553,10 @@ | |||
2119 | 553 | C | 553 | C |
2120 | 554 | 2 IF (N.EQ.1) RETURN | 554 | 2 IF (N.EQ.1) RETURN |
2121 | 555 | IF (MODE) 10,20,30 | 555 | IF (MODE) 10,20,30 |
2123 | 556 | 10 CALL SORTTI (A,INDEX,N) | 556 | 10 STOP 5 ! CALL SORTTI (A,INDEX,N) |
2124 | 557 | GO TO 40 | 557 | GO TO 40 |
2125 | 558 | C | 558 | C |
2127 | 559 | 20 CALL SORTTC(A,INDEX,N) | 559 | 20 STOP 5 ! CALL SORTTC(A,INDEX,N) |
2128 | 560 | GO TO 40 | 560 | GO TO 40 |
2129 | 561 | C | 561 | C |
2130 | 562 | 30 CALL SORTTF (A,INDEX,N) | 562 | 30 CALL SORTTF (A,INDEX,N) |
2131 | 563 | 563 | ||
2132 | === removed directory 'Template/RWGTNLO' | |||
2133 | === removed file 'Template/RWGTNLO/__init__.py' | |||
2134 | === removed file 'Template/RWGTNLO/alfas.inc' | |||
2135 | === removed file 'Template/RWGTNLO/alfas_functions_lhapdf.f' | |||
2136 | === removed file 'Template/RWGTNLO/makefile' | |||
2137 | === removed file 'Template/RWGTNLO/rwgt.f' | |||
2138 | === removed file 'Template/RWGTNLO/setrun.f' | |||
2139 | === removed file 'Template/RWGTNLO/timing_variables.inc' | |||
2140 | === modified file 'Template/loop_material/StandAlone/SubProcesses/MadLoopCommons.inc' | |||
2141 | --- Template/loop_material/StandAlone/SubProcesses/MadLoopCommons.inc 2016-11-21 21:05:57 +0000 | |||
2142 | +++ Template/loop_material/StandAlone/SubProcesses/MadLoopCommons.inc 2020-06-21 12:17:46 +0000 | |||
2143 | @@ -141,7 +141,8 @@ | |||
2144 | 141 | 141 | ||
2145 | 142 | character(512) path | 142 | character(512) path |
2146 | 143 | character(512) dummy | 143 | character(512) dummy |
2148 | 144 | 144 | character(512) epath ! path of the executable | |
2149 | 145 | integer pos | ||
2150 | 145 | character(512) prefix,fpath | 146 | character(512) prefix,fpath |
2151 | 146 | character(17) nameToCheck | 147 | character(17) nameToCheck |
2152 | 147 | parameter (nameToCheck='MadLoopParams.dat') | 148 | parameter (nameToCheck='MadLoopParams.dat') |
2153 | @@ -185,11 +186,42 @@ | |||
2154 | 185 | close(1) | 186 | close(1) |
2155 | 186 | prefix='../MadLoop5_resources/' | 187 | prefix='../MadLoop5_resources/' |
2156 | 187 | call joinPath(prefix,nameToCheck,fpath) | 188 | call joinPath(prefix,nameToCheck,fpath) |
2162 | 188 | OPEN(1, FILE=fpath, ERR=66, STATUS='OLD',ACTION='READ') | 189 | OPEN(1, FILE=fpath, ERR=3, STATUS='OLD',ACTION='READ') |
2163 | 189 | MLPath=prefix | 190 | MLPath=prefix |
2164 | 190 | goto 10 | 191 | goto 10 |
2165 | 191 | 66 continue | 192 | 3 continue |
2166 | 192 | close(1) | 193 | close(1) |
2167 | 194 | c | ||
2168 | 195 | c Try to automatically find the path from the executable location | ||
2169 | 196 | c particularly usefull in gridpack readonly mode | ||
2170 | 197 | c | ||
2171 | 198 | call getarg(0,path) !path is the PATH to the madevent executable (either global or from launching directory) | ||
2172 | 199 | pos = index(path,'/',.true.) | ||
2173 | 200 | prefix = path(:pos) | ||
2174 | 201 | call joinPath(prefix,nameToCheck,fpath) | ||
2175 | 202 | write(*,*) 'test', fpath | ||
2176 | 203 | OPEN(1, FILE=fpath, ERR=4, STATUS='OLD',ACTION='READ') | ||
2177 | 204 | MLPath=prefix | ||
2178 | 205 | goto 10 | ||
2179 | 206 | 4 continue | ||
2180 | 207 | close(1) | ||
2181 | 208 | prefix= prefix // '/MadLoop5_resources/' | ||
2182 | 209 | call joinPath(prefix,nameToCheck,fpath) | ||
2183 | 210 | write(*,*) 'test', fpath | ||
2184 | 211 | OPEN(1, FILE=fpath, ERR=5, STATUS='OLD',ACTION='READ') | ||
2185 | 212 | MLPath=prefix | ||
2186 | 213 | goto 10 | ||
2187 | 214 | 5 continue | ||
2188 | 215 | close(1) | ||
2189 | 216 | prefix= path(:pos) // '/../MadLoop5_resources/' | ||
2190 | 217 | call joinPath(prefix,nameToCheck,fpath) | ||
2191 | 218 | write(*,*) 'test', fpath | ||
2192 | 219 | OPEN(1, FILE=fpath, ERR=6, STATUS='OLD',ACTION='READ') | ||
2193 | 220 | MLPath=prefix | ||
2194 | 221 | goto 10 | ||
2195 | 222 | 6 continue | ||
2196 | 223 | close(1) | ||
2197 | 224 | |||
2198 | 193 | c We could not automatically find the auxiliary files | 225 | c We could not automatically find the auxiliary files |
2199 | 194 | write(*,*) '===' | 226 | write(*,*) '===' |
2200 | 195 | write(*,*) 'ERROR: MadLoop5 could not automatically find the file MadLoopParams.dat.' | 227 | write(*,*) 'ERROR: MadLoop5 could not automatically find the file MadLoopParams.dat.' |
2201 | @@ -215,9 +247,9 @@ | |||
2202 | 215 | 247 | ||
2203 | 216 | C Check that the FilePath set is correct | 248 | C Check that the FilePath set is correct |
2204 | 217 | call joinPath(MLPath,nameToCheck,fpath) | 249 | call joinPath(MLPath,nameToCheck,fpath) |
2206 | 218 | OPEN(1, FILE=fpath, ERR=3, STATUS='OLD',ACTION='READ') | 250 | OPEN(1, FILE=fpath, ERR=33, STATUS='OLD',ACTION='READ') |
2207 | 219 | goto 11 | 251 | goto 11 |
2209 | 220 | 3 continue | 252 | 33 continue |
2210 | 221 | close(1) | 253 | close(1) |
2211 | 222 | write(*,*) '===' | 254 | write(*,*) '===' |
2212 | 223 | write(*,*) 'ERROR: The MadLoop5 auxiliary files could not be found in ',MLPath | 255 | write(*,*) 'ERROR: The MadLoop5 auxiliary files could not be found in ',MLPath |
2213 | @@ -606,7 +638,7 @@ | |||
2214 | 606 | IMPLICIT NONE | 638 | IMPLICIT NONE |
2215 | 607 | INTEGER MAXNREF_EVALS | 639 | INTEGER MAXNREF_EVALS |
2216 | 608 | PARAMETER (MAXNREF_EVALS=100) | 640 | PARAMETER (MAXNREF_EVALS=100) |
2218 | 609 | INTEGER, DIMENSION(MAXNREF_EVALS), INTENT(IN) :: x | 641 | Double Precision, DIMENSION(MAXNREF_EVALS), INTENT(IN) :: x |
2219 | 610 | INTEGER, INTENT(IN) :: mStart, mEnd | 642 | INTEGER, INTENT(IN) :: mStart, mEnd |
2220 | 611 | INTEGER :: Minimum | 643 | INTEGER :: Minimum |
2221 | 612 | INTEGER :: Location | 644 | INTEGER :: Location |
2222 | 613 | 645 | ||
2223 | === modified file 'UpdateNotes.txt' | |||
2224 | --- UpdateNotes.txt 2020-03-17 07:12:13 +0000 | |||
2225 | +++ UpdateNotes.txt 2020-06-21 12:17:46 +0000 | |||
2226 | @@ -1,5 +1,24 @@ | |||
2227 | 1 | Update notes for MadGraph5_aMC@NLO (in reverse time order) | 1 | Update notes for MadGraph5_aMC@NLO (in reverse time order) |
2228 | 2 | 2 | ||
2229 | 3 | 2.7.3(21/06/20) | ||
2230 | 4 | OM: Fixing some bug for read-only LO gridpacks (wrong cross-section and shape when generating events). | ||
2231 | 5 | Thanks to Congqiao Li for this | ||
2232 | 6 | OM: Allowing loop-induced process to run on LO gridpack with read-only mode. | ||
2233 | 7 | Thanks to Congqiao Li for this | ||
2234 | 8 | OM: Fix a bug in the longitudinal polarization for off-shell effect, leading to deviation at large invariant mass. | ||
2235 | 9 | OM: Adding more option to the run_card for fine tuning phase-space integration steps | ||
2236 | 10 | All are hidden by default: | ||
2237 | 11 | - hard_survey [default=1]: request for more points in survey (and subsequent refine) | ||
2238 | 12 | - second_refine_treshold [default=1.5]: forbid second refine if cross section after first refine is | ||
2239 | 13 | is smaller than cross-section of the survey times such treshold | ||
2240 | 14 | OM: new command for the editions of the cards: | ||
2241 | 15 | - set nodecay: remove all decay line from the madspin_card | ||
2242 | 16 | - set BLOCKNAME all VALUE: set all entry of the param_card "BLOCKNAME" to VALUE | ||
2243 | 17 | - edit CARDNAME --comment_line='<regular_expression>' : new syntax to comment all lines of a card | ||
2244 | 18 | that are matching a given regular expression | ||
2245 | 19 | OM: For Mac only, when running in script mode, MG5aMC will now prevent the computer to go to idle sleep. | ||
2246 | 20 | You can prevent this by running with the '-s' option. like ./bin/mg5_aMC -s PATH_TO_CMD | ||
2247 | 21 | |||
2248 | 3 | 2.7.2(17/03/20) | 22 | 2.7.2(17/03/20) |
2249 | 4 | OM: Fix a Bug in pythia8 running on Ubuntu 18.04.4 machine | 23 | OM: Fix a Bug in pythia8 running on Ubuntu 18.04.4 machine |
2250 | 5 | OM: Speed up standalone_cpp code by changing compilation flag | 24 | OM: Speed up standalone_cpp code by changing compilation flag |
2251 | 6 | 25 | ||
2252 | === modified file 'VERSION' | |||
2253 | --- VERSION 2020-03-17 07:12:13 +0000 | |||
2254 | +++ VERSION 2020-06-21 12:17:46 +0000 | |||
2255 | @@ -1,5 +1,5 @@ | |||
2258 | 1 | version = 2.7.2 | 1 | version = 2.7.3 |
2259 | 2 | date = 2020-03-17 | 2 | date = 2020-06-21 |
2260 | 3 | 3 | ||
2261 | 4 | 4 | ||
2262 | 5 | 5 | ||
2263 | 6 | 6 | ||
2264 | === modified file 'aloha/create_aloha.py' | |||
2265 | --- aloha/create_aloha.py 2020-01-09 16:39:38 +0000 | |||
2266 | +++ aloha/create_aloha.py 2020-06-21 12:17:46 +0000 | |||
2267 | @@ -443,7 +443,7 @@ | |||
2268 | 443 | denominator = propagator.denominator | 443 | denominator = propagator.denominator |
2269 | 444 | elif propa == "1L": | 444 | elif propa == "1L": |
2270 | 445 | numerator = "EPSL(1,id) * EPSL(2,id)" | 445 | numerator = "EPSL(1,id) * EPSL(2,id)" |
2272 | 446 | denominator = "-1*PVec(-2,id)*PVec(-2,id)*Mass(id)**2 * (P(-1,id)**2 - Mass(id) * Mass(id) + complex(0,1) * Mass(id) * Width(id))" | 446 | denominator = "-1*PVec(-2,id)*PVec(-2,id)*P(-3,id)*P(-3,id) * (P(-1,id)**2 - Mass(id) * Mass(id) + complex(0,1) * Mass(id) * Width(id))" |
2273 | 447 | elif propa == "1T": | 447 | elif propa == "1T": |
2274 | 448 | numerator = "-1*PVec(-2,id)*PVec(-2,id) * EPST2(1,id)*EPST2(2,id) + EPST1(1,id)*EPST1(2,id)" | 448 | numerator = "-1*PVec(-2,id)*PVec(-2,id) * EPST2(1,id)*EPST2(2,id) + EPST1(1,id)*EPST1(2,id)" |
2275 | 449 | denominator = "PVec(-2,id)*PVec(-2,id) * PT(-3,id)*PT(-3,id) * (P(-1,id)**2 - Mass(id) * Mass(id) + complex(0,1) * Mass(id) * Width(id))" | 449 | denominator = "PVec(-2,id)*PVec(-2,id) * PT(-3,id)*PT(-3,id) * (P(-1,id)**2 - Mass(id) * Mass(id) + complex(0,1) * Mass(id) * Width(id))" |
2276 | 450 | 450 | ||
2277 | === modified file 'aloha/template_files/aloha_functions_loop.f' | |||
2278 | --- aloha/template_files/aloha_functions_loop.f 2016-01-27 01:59:42 +0000 | |||
2279 | +++ aloha/template_files/aloha_functions_loop.f 2020-06-21 12:17:46 +0000 | |||
2280 | @@ -2298,7 +2298,7 @@ | |||
2281 | 2298 | COMPLEX*16 Q(0:3) | 2298 | COMPLEX*16 Q(0:3) |
2282 | 2299 | INTEGER CFIG,J | 2299 | INTEGER CFIG,J |
2283 | 2300 | LOGICAL SCD | 2300 | LOGICAL SCD |
2285 | 2301 | COMPLEX*16 M | 2301 | double precision M |
2286 | 2302 | COMPLEX*16 W(20) | 2302 | COMPLEX*16 W(20) |
2287 | 2303 | 2303 | ||
2288 | 2304 | IF (CFIG.EQ.1) THEN | 2304 | IF (CFIG.EQ.1) THEN |
2289 | @@ -2558,7 +2558,7 @@ | |||
2290 | 2558 | COMPLEX*16 Q(0:3) | 2558 | COMPLEX*16 Q(0:3) |
2291 | 2559 | INTEGER CFIG | 2559 | INTEGER CFIG |
2292 | 2560 | LOGICAL SCD | 2560 | LOGICAL SCD |
2294 | 2561 | COMPLEX*16 M | 2561 | double precision M |
2295 | 2562 | COMPLEX*16 W(20) | 2562 | COMPLEX*16 W(20) |
2296 | 2563 | 2563 | ||
2297 | 2564 | IF (CFIG.EQ.1) THEN | 2564 | IF (CFIG.EQ.1) THEN |
2298 | 2565 | 2565 | ||
2299 | === modified file 'bin/mg5_aMC' | |||
2300 | --- bin/mg5_aMC 2019-05-05 18:53:50 +0000 | |||
2301 | +++ bin/mg5_aMC 2020-06-21 12:17:46 +0000 | |||
2302 | @@ -49,7 +49,8 @@ | |||
2303 | 49 | help='force to launch debug mode') | 49 | help='force to launch debug mode') |
2304 | 50 | parser.add_option("-m", "--mode", dest="plugin", | 50 | parser.add_option("-m", "--mode", dest="plugin", |
2305 | 51 | help="Define some additional command provide by a PLUGIN") | 51 | help="Define some additional command provide by a PLUGIN") |
2307 | 52 | 52 | parser.add_option("-s", "--nocaffeinate", action="store_false", default=True, dest='nosleep', | |
2308 | 53 | help='For mac user, forbids to use caffeinate when running with a script') | ||
2309 | 53 | (options, args) = parser.parse_args() | 54 | (options, args) = parser.parse_args() |
2310 | 54 | if len(args) == 0: | 55 | if len(args) == 0: |
2311 | 55 | args = '' | 56 | args = '' |
2312 | @@ -66,6 +67,9 @@ | |||
2313 | 66 | import logging.config | 67 | import logging.config |
2314 | 67 | import madgraph.interface.coloring_logging | 68 | import madgraph.interface.coloring_logging |
2315 | 68 | 69 | ||
2316 | 70 | if ' ' in os.getcwd(): | ||
2317 | 71 | logging.warning("Path does contains spaces. We advise that you change your current path to avoid to have space in the path.") | ||
2318 | 72 | |||
2319 | 69 | try: | 73 | try: |
2320 | 70 | import readline | 74 | import readline |
2321 | 71 | except ImportError: | 75 | except ImportError: |
2322 | @@ -157,6 +161,10 @@ | |||
2323 | 157 | # Call the cmd interface main loop | 161 | # Call the cmd interface main loop |
2324 | 158 | try: | 162 | try: |
2325 | 159 | if options.file or args: | 163 | if options.file or args: |
2326 | 164 | if sys.platform == "darwin" and options.nosleep: | ||
2327 | 165 | logging.getLogger('madgraph').warning("launching caffeinate to prevent idle sleep when MG5aMC is running. Run './bin/mg5_aMC -s' to prevent this.") | ||
2328 | 166 | pid = os.getpid() | ||
2329 | 167 | subprocess.Popen(['caffeinate', '-i', '-w', str(pid)]) | ||
2330 | 160 | # They are an input file | 168 | # They are an input file |
2331 | 161 | if args: | 169 | if args: |
2332 | 162 | input_file = os.path.realpath(args[0]) | 170 | input_file = os.path.realpath(args[0]) |
2333 | 163 | 171 | ||
2334 | === modified file 'madgraph/core/base_objects.py' | |||
2335 | --- madgraph/core/base_objects.py 2020-03-04 20:39:24 +0000 | |||
2336 | +++ madgraph/core/base_objects.py 2020-06-21 12:17:46 +0000 | |||
2337 | @@ -3484,18 +3484,31 @@ | |||
2338 | 3484 | final.sort() | 3484 | final.sort() |
2339 | 3485 | return (tuple(initial), tuple(final)) | 3485 | return (tuple(initial), tuple(final)) |
2340 | 3486 | 3486 | ||
2342 | 3487 | def get_final_ids_after_decay(self): | 3487 | def get_initial_final_ids_after_decay(self, max_depth=-1): |
2343 | 3488 | """return a tuple of two tuple containing the id of the initial/final | ||
2344 | 3489 | state particles. Each list is ordered""" | ||
2345 | 3490 | |||
2346 | 3491 | initial = [l.get('id') for l in self.get('legs')\ | ||
2347 | 3492 | if not l.get('state')] | ||
2348 | 3493 | final = self.get_final_ids_after_decay(max_depth=max_depth) | ||
2349 | 3494 | initial.sort() | ||
2350 | 3495 | final.sort() | ||
2351 | 3496 | return (tuple(initial), tuple(final)) | ||
2352 | 3497 | |||
2353 | 3498 | |||
2354 | 3499 | def get_final_ids_after_decay(self, max_depth=-1): | ||
2355 | 3488 | """Give the pdg code of the process including decay""" | 3500 | """Give the pdg code of the process including decay""" |
2356 | 3489 | 3501 | ||
2357 | 3490 | finals = self.get_final_ids() | 3502 | finals = self.get_final_ids() |
2366 | 3491 | for proc in self.get('decay_chains'): | 3503 | if max_depth !=0 : |
2367 | 3492 | init = proc.get_initial_ids()[0] | 3504 | for proc in self.get('decay_chains'): |
2368 | 3493 | #while 1: | 3505 | init = proc.get_initial_ids()[0] |
2369 | 3494 | try: | 3506 | #while 1: |
2370 | 3495 | pos = finals.index(init) | 3507 | try: |
2371 | 3496 | except: | 3508 | pos = finals.index(init) |
2372 | 3497 | break | 3509 | except: |
2373 | 3498 | finals[pos] = proc.get_final_ids_after_decay() | 3510 | break |
2374 | 3511 | finals[pos] = proc.get_final_ids_after_decay(max_depth-1) | ||
2375 | 3499 | output = [] | 3512 | output = [] |
2376 | 3500 | for d in finals: | 3513 | for d in finals: |
2377 | 3501 | if isinstance(d, list): | 3514 | if isinstance(d, list): |
2378 | 3502 | 3515 | ||
2379 | === modified file 'madgraph/core/diagram_generation.py' | |||
2380 | --- madgraph/core/diagram_generation.py 2019-05-13 20:41:22 +0000 | |||
2381 | +++ madgraph/core/diagram_generation.py 2020-06-21 12:17:46 +0000 | |||
2382 | @@ -896,7 +896,7 @@ | |||
2383 | 896 | fcts=['remove_diag']) | 896 | fcts=['remove_diag']) |
2384 | 897 | else: | 897 | else: |
2385 | 898 | #example and simple tests | 898 | #example and simple tests |
2387 | 899 | def remove_diag(diag): | 899 | def remove_diag(diag, model=None): |
2388 | 900 | for vertex in diag['vertices']: #last | 900 | for vertex in diag['vertices']: #last |
2389 | 901 | if vertex['id'] == 0: #special final vertex | 901 | if vertex['id'] == 0: #special final vertex |
2390 | 902 | continue | 902 | continue |
2391 | @@ -907,8 +907,9 @@ | |||
2392 | 907 | 907 | ||
2393 | 908 | res = diag_list.__class__() | 908 | res = diag_list.__class__() |
2394 | 909 | nb_removed = 0 | 909 | nb_removed = 0 |
2395 | 910 | model = self['process']['model'] | ||
2396 | 910 | for diag in diag_list: | 911 | for diag in diag_list: |
2398 | 911 | if remove_diag(diag): | 912 | if remove_diag(diag, model): |
2399 | 912 | nb_removed +=1 | 913 | nb_removed +=1 |
2400 | 913 | else: | 914 | else: |
2401 | 914 | res.append(diag) | 915 | res.append(diag) |
2402 | 915 | 916 | ||
2403 | === modified file 'madgraph/core/helas_objects.py' | |||
2404 | --- madgraph/core/helas_objects.py 2020-03-09 09:27:32 +0000 | |||
2405 | +++ madgraph/core/helas_objects.py 2020-06-21 12:17:46 +0000 | |||
2406 | @@ -5871,6 +5871,7 @@ | |||
2407 | 5871 | # Identical matrix element found | 5871 | # Identical matrix element found |
2408 | 5872 | other_processes = identified_matrix_elements[me_index].\ | 5872 | other_processes = identified_matrix_elements[me_index].\ |
2409 | 5873 | get('processes') | 5873 | get('processes') |
2410 | 5874 | |||
2411 | 5874 | other_processes.append(cls.reorder_process(\ | 5875 | other_processes.append(cls.reorder_process(\ |
2412 | 5875 | amplitude.get('process'), | 5876 | amplitude.get('process'), |
2413 | 5876 | permutations[me_index], | 5877 | permutations[me_index], |
2414 | @@ -5911,14 +5912,24 @@ | |||
2415 | 5911 | """Reorder the legs in the process according to the difference | 5912 | """Reorder the legs in the process according to the difference |
2416 | 5912 | between org_perm and proc_perm""" | 5913 | between org_perm and proc_perm""" |
2417 | 5913 | 5914 | ||
2418 | 5915 | |||
2419 | 5916 | |||
2420 | 5914 | leglist = base_objects.LegList(\ | 5917 | leglist = base_objects.LegList(\ |
2421 | 5915 | [copy.copy(process.get('legs_with_decays')[i]) for i in \ | 5918 | [copy.copy(process.get('legs_with_decays')[i]) for i in \ |
2422 | 5916 | diagram_generation.DiagramTag.reorder_permutation(\ | 5919 | diagram_generation.DiagramTag.reorder_permutation(\ |
2423 | 5917 | proc_perm, org_perm)]) | 5920 | proc_perm, org_perm)]) |
2424 | 5918 | new_proc = copy.copy(process) | 5921 | new_proc = copy.copy(process) |
2425 | 5922 | if org_perm == proc_perm: | ||
2426 | 5923 | return new_proc | ||
2427 | 5924 | |||
2428 | 5925 | if len(org_perm) != len(process.get('legs_with_decays')): | ||
2429 | 5926 | raise Exception, "issue on symmetry between process" | ||
2430 | 5927 | |||
2431 | 5919 | new_proc.set('legs_with_decays', leglist) | 5928 | new_proc.set('legs_with_decays', leglist) |
2433 | 5920 | 5929 | ||
2434 | 5921 | if not new_proc.get('decay_chains'): | 5930 | if not new_proc.get('decay_chains'): |
2435 | 5922 | new_proc.set('legs', leglist) | 5931 | new_proc.set('legs', leglist) |
2436 | 5932 | assert len(process.get('legs')) == len(leglist) | ||
2437 | 5923 | 5933 | ||
2438 | 5934 | |||
2439 | 5924 | return new_proc | 5935 | return new_proc |
2440 | 5925 | 5936 | ||
2441 | === modified file 'madgraph/interface/amcatnlo_run_interface.py' | |||
2442 | --- madgraph/interface/amcatnlo_run_interface.py 2020-03-07 20:56:41 +0000 | |||
2443 | +++ madgraph/interface/amcatnlo_run_interface.py 2020-06-21 12:17:46 +0000 | |||
2444 | @@ -174,7 +174,13 @@ | |||
2445 | 174 | logger.warning(msg % compiler) | 174 | logger.warning(msg % compiler) |
2446 | 175 | else: | 175 | else: |
2447 | 176 | curr_version = misc.get_gfortran_version(compiler) | 176 | curr_version = misc.get_gfortran_version(compiler) |
2449 | 177 | if not ''.join(curr_version.split('.')) >= '46': | 177 | curr_version = curr_version.split('.') |
2450 | 178 | if len(curr_version) == 1: | ||
2451 | 179 | curr_version.append(0) | ||
2452 | 180 | |||
2453 | 181 | if int(curr_version[0]) < 5: | ||
2454 | 182 | if int(curr_version[0]) == 4 and int(curr_version[1]) > 5: | ||
2455 | 183 | return | ||
2456 | 178 | if block: | 184 | if block: |
2457 | 179 | raise aMCatNLOError(msg % (compiler + ' ' + curr_version)) | 185 | raise aMCatNLOError(msg % (compiler + ' ' + curr_version)) |
2458 | 180 | else: | 186 | else: |
2459 | @@ -2785,7 +2791,7 @@ | |||
2460 | 2785 | """Sums all the plots in the HwU format.""" | 2791 | """Sums all the plots in the HwU format.""" |
2461 | 2786 | logger.debug('Combining HwU plots.') | 2792 | logger.debug('Combining HwU plots.') |
2462 | 2787 | 2793 | ||
2464 | 2788 | command = [] | 2794 | command = [sys.executable] |
2465 | 2789 | command.append(pjoin(self.me_dir, 'bin', 'internal','histograms.py')) | 2795 | command.append(pjoin(self.me_dir, 'bin', 'internal','histograms.py')) |
2466 | 2790 | for job in jobs: | 2796 | for job in jobs: |
2467 | 2791 | if job['dirname'].endswith('.HwU'): | 2797 | if job['dirname'].endswith('.HwU'): |
2468 | 2792 | 2798 | ||
2469 | === modified file 'madgraph/interface/common_run_interface.py' | |||
2470 | --- madgraph/interface/common_run_interface.py 2020-03-04 09:57:24 +0000 | |||
2471 | +++ madgraph/interface/common_run_interface.py 2020-06-21 12:17:46 +0000 | |||
2472 | @@ -1036,7 +1036,11 @@ | |||
2473 | 1036 | out = ask(question, '0', possible_answer, timeout=int(1.5*timeout), | 1036 | out = ask(question, '0', possible_answer, timeout=int(1.5*timeout), |
2474 | 1037 | path_msg='enter path', ask_class = AskforEditCard, | 1037 | path_msg='enter path', ask_class = AskforEditCard, |
2475 | 1038 | cards=cards, mode=mode, **opt) | 1038 | cards=cards, mode=mode, **opt) |
2477 | 1039 | 1039 | if 'return_instance' in opt and opt['return_instance']: | |
2478 | 1040 | out, cmd = out | ||
2479 | 1041 | if 'return_instance' in opt and opt['return_instance']: | ||
2480 | 1042 | return (out, cmd) | ||
2481 | 1043 | return out | ||
2482 | 1040 | 1044 | ||
2483 | 1041 | @staticmethod | 1045 | @staticmethod |
2484 | 1042 | def detect_card_type(path): | 1046 | def detect_card_type(path): |
2485 | @@ -2836,8 +2840,8 @@ | |||
2486 | 2836 | reco_output = pjoin(self.me_dir, | 2840 | reco_output = pjoin(self.me_dir, |
2487 | 2837 | 'MA5_%s_ANALYSIS%s_%d'%(mode.upper(),MA5_runtag,i+1)) | 2841 | 'MA5_%s_ANALYSIS%s_%d'%(mode.upper(),MA5_runtag,i+1)) |
2488 | 2838 | # Look for either a root or .lhe.gz output | 2842 | # Look for either a root or .lhe.gz output |
2491 | 2839 | reco_event_file = misc.glob('*.lhe.gz',pjoin(reco_output,'Output','_reco_events','lheEvents0_%d'%MA5_run_number))+\ | 2843 | reco_event_file = misc.glob('*.lhe.gz',pjoin(reco_output,'Output','SAF','_reco_events','lheEvents0_%d'%MA5_run_number))+\ |
2492 | 2840 | misc.glob('*.root',pjoin(reco_output,'Output','_reco_events', 'RecoEvents0_%d'%MA5_run_number)) | 2844 | misc.glob('*.root',pjoin(reco_output,'Output','SAF','_reco_events', 'RecoEvents0_%d'%MA5_run_number)) |
2493 | 2841 | if len(reco_event_file)==0: | 2845 | if len(reco_event_file)==0: |
2494 | 2842 | raise MadGraph5Error, "MadAnalysis5 failed to produce the "+\ | 2846 | raise MadGraph5Error, "MadAnalysis5 failed to produce the "+\ |
2495 | 2843 | "reconstructed event file for reconstruction '%s'."%MA5_runtag[6:] | 2847 | "reconstructed event file for reconstruction '%s'."%MA5_runtag[6:] |
2496 | @@ -2852,7 +2856,7 @@ | |||
2497 | 2852 | parent_dir_name = os.path.basename(os.path.dirname(reco_event_file)) | 2856 | parent_dir_name = os.path.basename(os.path.dirname(reco_event_file)) |
2498 | 2853 | files.ln(pjoin(self.me_dir,'HTML',self.run_name, | 2857 | files.ln(pjoin(self.me_dir,'HTML',self.run_name, |
2499 | 2854 | '%s_MA5_%s_ANALYSIS%s_%d'%(self.run_tag,mode.upper(), | 2858 | '%s_MA5_%s_ANALYSIS%s_%d'%(self.run_tag,mode.upper(), |
2501 | 2855 | MA5_runtag,i+1),'Output','_reco_events',parent_dir_name,links_created[-1]), | 2859 | MA5_runtag,i+1),'Output','SAF','_reco_events',parent_dir_name,links_created[-1]), |
2502 | 2856 | pjoin(self.me_dir,'Events',self.run_name)) | 2860 | pjoin(self.me_dir,'Events',self.run_name)) |
2503 | 2857 | 2861 | ||
2504 | 2858 | logger.info("MadAnalysis5 successfully completed the reconstruction "+ | 2862 | logger.info("MadAnalysis5 successfully completed the reconstruction "+ |
2505 | @@ -3328,7 +3332,7 @@ | |||
2506 | 3328 | if mass and abs(width/mass) < 1e-12: | 3332 | if mass and abs(width/mass) < 1e-12: |
2507 | 3329 | if hasattr(interface, 'run_card') and isinstance(interface.run_card, banner_mod.RunCardLO): | 3333 | if hasattr(interface, 'run_card') and isinstance(interface.run_card, banner_mod.RunCardLO): |
2508 | 3330 | if interface.run_card['small_width_treatment'] < 1e-12: | 3334 | if interface.run_card['small_width_treatment'] < 1e-12: |
2510 | 3331 | logger.error('The width of particle %s is too small for an s-channel resonance (%s) and the small_width_paramer is too small to prevent numerical issues. If you have this particle in an s-channel, this is likely to create numerical instabilities .', param.lhacode[0], width) | 3335 | logger.error('The width of particle %s is too small for an s-channel resonance (%s) and the small_width_treatment parameter is too small to prevent numerical issues. If you have this particle in an s-channel, this is likely to create numerical instabilities .', param.lhacode[0], width) |
2511 | 3332 | else: | 3336 | else: |
2512 | 3333 | logger.error('The width of particle %s is too small for an s-channel resonance (%s). If you have this particle in an s-channel, this is likely to create numerical instabilities .', param.lhacode[0], width) | 3337 | logger.error('The width of particle %s is too small for an s-channel resonance (%s). If you have this particle in an s-channel, this is likely to create numerical instabilities .', param.lhacode[0], width) |
2513 | 3334 | if CommonRunCmd.sleep_for_error: | 3338 | if CommonRunCmd.sleep_for_error: |
2514 | @@ -4098,6 +4102,18 @@ | |||
2515 | 4098 | if not require_local and (os.path.exists(pjoin(pdfsets_dir, pdfset)) or \ | 4102 | if not require_local and (os.path.exists(pjoin(pdfsets_dir, pdfset)) or \ |
2516 | 4099 | os.path.isdir(pjoin(pdfsets_dir, pdfset))): | 4103 | os.path.isdir(pjoin(pdfsets_dir, pdfset))): |
2517 | 4100 | continue | 4104 | continue |
2518 | 4105 | if not require_local: | ||
2519 | 4106 | if 'LHAPDF_DATA_PATH' in os.environ: | ||
2520 | 4107 | found = False | ||
2521 | 4108 | for path in os.environ['LHAPDF_DATA_PATH'].split(":"): | ||
2522 | 4109 | if (os.path.exists(pjoin(path, pdfset)) or \ | ||
2523 | 4110 | os.path.isdir(pjoin(path, pdfset))): | ||
2524 | 4111 | found =True | ||
2525 | 4112 | break | ||
2526 | 4113 | if found: | ||
2527 | 4114 | continue | ||
2528 | 4115 | |||
2529 | 4116 | |||
2530 | 4101 | #check that the pdfset is not already there | 4117 | #check that the pdfset is not already there |
2531 | 4102 | elif not os.path.exists(pjoin(self.me_dir, 'lib', 'PDFsets', pdfset)) and \ | 4118 | elif not os.path.exists(pjoin(self.me_dir, 'lib', 'PDFsets', pdfset)) and \ |
2532 | 4103 | not os.path.isdir(pjoin(self.me_dir, 'lib', 'PDFsets', pdfset)): | 4119 | not os.path.isdir(pjoin(self.me_dir, 'lib', 'PDFsets', pdfset)): |
2533 | @@ -4309,7 +4325,7 @@ | |||
2534 | 4309 | stdout = subprocess.PIPE).stdout.read().strip() | 4325 | stdout = subprocess.PIPE).stdout.read().strip() |
2535 | 4310 | except OSError, error: | 4326 | except OSError, error: |
2536 | 4311 | if error.errno == 2: | 4327 | if error.errno == 2: |
2538 | 4312 | raise Exception, 'lhapdf executable (%s) is not found on your system. Please install it and/or indicate the path to the correct executable in input/mg5_configuration.txt' % self.options['lhapdf'] | 4328 | raise Exception, 'lhapdf executable (%s) is not found on your system. Please install it and/or indicate the path to the correct executable in input/mg5_configuration.txt' % lhapdf_config |
2539 | 4313 | else: | 4329 | else: |
2540 | 4314 | raise | 4330 | raise |
2541 | 4315 | 4331 | ||
2542 | @@ -4495,7 +4511,12 @@ | |||
2543 | 4495 | self.modified_card = set() #set of cards not in sync with filesystem | 4511 | self.modified_card = set() #set of cards not in sync with filesystem |
2544 | 4496 | # need to sync them before editing/leaving | 4512 | # need to sync them before editing/leaving |
2545 | 4497 | self.init_from_banner(from_banner, banner) | 4513 | self.init_from_banner(from_banner, banner) |
2547 | 4498 | 4514 | self.writting_card = True | |
2548 | 4515 | if 'write_file' in opt: | ||
2549 | 4516 | if not opt['write_file']: | ||
2550 | 4517 | self.writting_card = False | ||
2551 | 4518 | self.param_consistency = False | ||
2552 | 4519 | |||
2553 | 4499 | #update default path by custom one if specify in cards | 4520 | #update default path by custom one if specify in cards |
2554 | 4500 | for card in cards: | 4521 | for card in cards: |
2555 | 4501 | if os.path.exists(card) and os.path.sep in cards: | 4522 | if os.path.exists(card) and os.path.sep in cards: |
2556 | @@ -4773,10 +4794,12 @@ | |||
2557 | 4773 | return [] | 4794 | return [] |
2558 | 4774 | 4795 | ||
2559 | 4775 | self.special_shortcut.update({ | 4796 | self.special_shortcut.update({ |
2561 | 4776 | 'spinmode':([str], ['add madspin_card --before_line="launch" set spinmode %(0)s']) | 4797 | 'spinmode':([str], ['add madspin_card --before_line="launch" set spinmode %(0)s']), |
2562 | 4798 | 'nodecay':([], ['edit madspin_card --comment_line="decay"']) | ||
2563 | 4777 | }) | 4799 | }) |
2564 | 4778 | self.special_shortcut_help.update({ | 4800 | self.special_shortcut_help.update({ |
2566 | 4779 | 'spinmode' : 'full|none|onshell. Choose the mode of madspin.\n - full: spin-correlation and off-shell effect\n - onshell: only spin-correlation,]\n - none: no spin-correlation and not offshell effects.' | 4801 | 'spinmode' : 'full|none|onshell. Choose the mode of madspin.\n - full: spin-correlation and off-shell effect\n - onshell: only spin-correlation,]\n - none: no spin-correlation and not offshell effects.', |
2567 | 4802 | 'nodecay': 'remove all decay previously defined in madspin', | ||
2568 | 4780 | }) | 4803 | }) |
2569 | 4781 | return [] | 4804 | return [] |
2570 | 4782 | 4805 | ||
2571 | @@ -5241,7 +5264,7 @@ | |||
2572 | 5241 | def do_set(self, line): | 5264 | def do_set(self, line): |
2573 | 5242 | """ edit the value of one parameter in the card""" | 5265 | """ edit the value of one parameter in the card""" |
2574 | 5243 | 5266 | ||
2576 | 5244 | 5267 | ||
2577 | 5245 | args = self.split_arg(line) | 5268 | args = self.split_arg(line) |
2578 | 5246 | 5269 | ||
2579 | 5247 | 5270 | ||
2580 | @@ -5504,7 +5527,7 @@ | |||
2581 | 5504 | try: | 5527 | try: |
2582 | 5505 | key = tuple([int(i) for i in args[start+1:-1]]) | 5528 | key = tuple([int(i) for i in args[start+1:-1]]) |
2583 | 5506 | except ValueError: | 5529 | except ValueError: |
2585 | 5507 | if args[start] == 'decay' and args[start+1:-1] == ['all']: | 5530 | if args[start+1:-1] == ['all']: |
2586 | 5508 | for key in self.param_card[args[start]].param_dict: | 5531 | for key in self.param_card[args[start]].param_dict: |
2587 | 5509 | if (args[start], key) in self.restricted_value: | 5532 | if (args[start], key) in self.restricted_value: |
2588 | 5510 | continue | 5533 | continue |
2589 | @@ -5965,8 +5988,9 @@ | |||
2590 | 5965 | self.do_set('shower_card extrapaths None ') | 5988 | self.do_set('shower_card extrapaths None ') |
2591 | 5966 | 5989 | ||
2592 | 5967 | # ensure that all cards are in sync | 5990 | # ensure that all cards are in sync |
2595 | 5968 | for key in list(self.modified_card): | 5991 | if self.writting_card: |
2596 | 5969 | self.write_card(key) | 5992 | for key in list(self.modified_card): |
2597 | 5993 | self.write_card(key) | ||
2598 | 5970 | 5994 | ||
2599 | 5971 | 5995 | ||
2600 | 5972 | def reask(self, *args, **opt): | 5996 | def reask(self, *args, **opt): |
2601 | @@ -6092,7 +6116,8 @@ | |||
2602 | 6092 | self.run_card.write(self.paths['run'], self.paths['run_default']) | 6116 | self.run_card.write(self.paths['run'], self.paths['run_default']) |
2603 | 6093 | 6117 | ||
2604 | 6094 | def write_card_param(self): | 6118 | def write_card_param(self): |
2606 | 6095 | """ write the param_card """ | 6119 | """ write the param_card """ |
2607 | 6120 | |||
2608 | 6096 | self.param_card.write(self.paths['param']) | 6121 | self.param_card.write(self.paths['param']) |
2609 | 6097 | 6122 | ||
2610 | 6098 | @staticmethod | 6123 | @staticmethod |
2611 | @@ -6477,6 +6502,7 @@ | |||
2612 | 6477 | logger.info( ' --before_line="<regular-expression>" write the line before the first line matching the regular expression') | 6502 | logger.info( ' --before_line="<regular-expression>" write the line before the first line matching the regular expression') |
2613 | 6478 | logger.info( ' --replace_line="<regular-expression>" replace the line matching the regular expression') | 6503 | logger.info( ' --replace_line="<regular-expression>" replace the line matching the regular expression') |
2614 | 6479 | logger.info( ' --clean remove all previously existing line in the file') | 6504 | logger.info( ' --clean remove all previously existing line in the file') |
2615 | 6505 | logger.info( ' --comment_line="<regular-expression>" comment all lines matching the regular expression') | ||
2616 | 6480 | logger.info('') | 6506 | logger.info('') |
2617 | 6481 | logger.info(' Note: all regular-expression will be prefixed by ^\s*') | 6507 | logger.info(' Note: all regular-expression will be prefixed by ^\s*') |
2618 | 6482 | logger.info('') | 6508 | logger.info('') |
2619 | @@ -6622,7 +6648,29 @@ | |||
2620 | 6622 | logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % | 6648 | logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % |
2621 | 6623 | (old_line, posline, card, new_line ),'$MG:BOLD') | 6649 | (old_line, posline, card, new_line ),'$MG:BOLD') |
2622 | 6624 | self.last_editline_pos = posline | 6650 | self.last_editline_pos = posline |
2624 | 6625 | 6651 | ||
2625 | 6652 | elif args[1].startswith('--comment_line='): | ||
2626 | 6653 | # catch the line/regular expression and replace the associate line | ||
2627 | 6654 | # if no line match go to check if args[2] has other instruction starting with -- | ||
2628 | 6655 | text = open(path).read() | ||
2629 | 6656 | split = text.split('\n') | ||
2630 | 6657 | search_pattern=r'''comment_line=(?P<quote>["'])(?:(?=(\\?))\2.)*?\1''' | ||
2631 | 6658 | pattern = '^\s*' + re.search(search_pattern, line).group()[14:-1] | ||
2632 | 6659 | nb_mod = 0 | ||
2633 | 6660 | for posline,l in enumerate(split): | ||
2634 | 6661 | if re.search(pattern, l): | ||
2635 | 6662 | split[posline] = '#%s' % l | ||
2636 | 6663 | nb_mod +=1 | ||
2637 | 6664 | logger.info("Commenting line \"%s\" [line %d of %s]" % | ||
2638 | 6665 | (l, posline, card ),'$MG:BOLD') | ||
2639 | 6666 | # overwrite the previous line | ||
2640 | 6667 | if not nb_mod: | ||
2641 | 6668 | logger.warning('no line commented (no line matching)') | ||
2642 | 6669 | ff = open(path,'w') | ||
2643 | 6670 | ff.write('\n'.join(split)) | ||
2644 | 6671 | |||
2645 | 6672 | self.last_editline_pos = posline | ||
2646 | 6673 | |||
2647 | 6626 | 6674 | ||
2648 | 6627 | elif args[1].startswith('--before_line='): | 6675 | elif args[1].startswith('--before_line='): |
2649 | 6628 | # catch the line/regular expression and write before that line | 6676 | # catch the line/regular expression and write before that line |
2650 | 6629 | 6677 | ||
2651 | === modified file 'madgraph/interface/extended_cmd.py' | |||
2652 | --- madgraph/interface/extended_cmd.py 2020-02-25 14:05:36 +0000 | |||
2653 | +++ madgraph/interface/extended_cmd.py 2020-06-21 12:17:46 +0000 | |||
2654 | @@ -2586,6 +2586,8 @@ | |||
2655 | 2586 | elif line in 'auto': | 2586 | elif line in 'auto': |
2656 | 2587 | self.switch['dynamical'] = True | 2587 | self.switch['dynamical'] = True |
2657 | 2588 | return super(ControlSwitch, self).default(line) | 2588 | return super(ControlSwitch, self).default(line) |
2658 | 2589 | elif line.startswith('set ') and not hasattr(self.__class__, 'do_set'): | ||
2659 | 2590 | raise NotValidInput('unknow command: %s. Did you mean \"%s\"' % (line, line[4:])) | ||
2660 | 2589 | elif raise_error: | 2591 | elif raise_error: |
2661 | 2590 | raise NotValidInput('unknow command: %s' % line) | 2592 | raise NotValidInput('unknow command: %s' % line) |
2662 | 2591 | else: | 2593 | else: |
2663 | @@ -2601,6 +2603,8 @@ | |||
2664 | 2601 | getattr(self, 'ans_%s' % base)(value) | 2603 | getattr(self, 'ans_%s' % base)(value) |
2665 | 2602 | elif base in self.switch: | 2604 | elif base in self.switch: |
2666 | 2603 | self.set_switch(base, value) | 2605 | self.set_switch(base, value) |
2667 | 2606 | elif line.startswith('set ') and not hasattr(self.__class__, 'do_set'): | ||
2668 | 2607 | raise NotValidInput('Not valid command: %s. Did you mean \"%s\"' % (line, line[4:])) | ||
2669 | 2604 | elif raise_error: | 2608 | elif raise_error: |
2670 | 2605 | raise NotValidInput('Not valid command: %s' % line) | 2609 | raise NotValidInput('Not valid command: %s' % line) |
2671 | 2606 | else: | 2610 | else: |
2672 | 2607 | 2611 | ||
2673 | === modified file 'madgraph/interface/madevent_interface.py' | |||
2674 | --- madgraph/interface/madevent_interface.py 2020-03-16 08:37:10 +0000 | |||
2675 | +++ madgraph/interface/madevent_interface.py 2020-06-21 12:17:46 +0000 | |||
2676 | @@ -797,7 +797,7 @@ | |||
2677 | 797 | 797 | ||
2678 | 798 | self.allowed_madspin = [] | 798 | self.allowed_madspin = [] |
2679 | 799 | if 'MadSpin' in self.available_module: | 799 | if 'MadSpin' in self.available_module: |
2681 | 800 | self.allowed_madspin = ['OFF',"ON",'onshell'] | 800 | self.allowed_madspin = ['OFF',"ON",'onshell',"full"] |
2682 | 801 | return self.allowed_madspin | 801 | return self.allowed_madspin |
2683 | 802 | 802 | ||
2684 | 803 | def check_value_madspin(self, value): | 803 | def check_value_madspin(self, value): |
2685 | @@ -834,7 +834,7 @@ | |||
2686 | 834 | if value == 'onshell': | 834 | if value == 'onshell': |
2687 | 835 | return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] | 835 | return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] |
2688 | 836 | elif value in ['full', 'madspin']: | 836 | elif value in ['full', 'madspin']: |
2690 | 837 | return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode madspin"] | 837 | return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode full"] |
2691 | 838 | elif value == 'none': | 838 | elif value == 'none': |
2692 | 839 | return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] | 839 | return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] |
2693 | 840 | else: | 840 | else: |
2694 | @@ -1291,7 +1291,6 @@ | |||
2695 | 1291 | raise self.InvalidCmd('No run_name currently define. Unable to run refine') | 1291 | raise self.InvalidCmd('No run_name currently define. Unable to run refine') |
2696 | 1292 | 1292 | ||
2697 | 1293 | if len(args) > 2: | 1293 | if len(args) > 2: |
2698 | 1294 | self.help_refine() | ||
2699 | 1295 | raise self.InvalidCmd('Too many argument for refine command') | 1294 | raise self.InvalidCmd('Too many argument for refine command') |
2700 | 1296 | else: | 1295 | else: |
2701 | 1297 | try: | 1296 | try: |
2702 | @@ -2497,7 +2496,8 @@ | |||
2703 | 2497 | postcmd=False) | 2496 | postcmd=False) |
2704 | 2498 | self.exec_cmd('combine_events', postcmd=False) | 2497 | self.exec_cmd('combine_events', postcmd=False) |
2705 | 2499 | self.exec_cmd('store_events', postcmd=False) | 2498 | self.exec_cmd('store_events', postcmd=False) |
2707 | 2500 | self.exec_cmd('decay_events -from_cards', postcmd=False) | 2499 | with misc.TMP_variable(self, 'run_name', self.run_name): |
2708 | 2500 | self.exec_cmd('decay_events -from_cards', postcmd=False) | ||
2709 | 2501 | self.exec_cmd('create_gridpack', postcmd=False) | 2501 | self.exec_cmd('create_gridpack', postcmd=False) |
2710 | 2502 | else: | 2502 | else: |
2711 | 2503 | # Regular run mode | 2503 | # Regular run mode |
2712 | @@ -2526,7 +2526,8 @@ | |||
2713 | 2526 | 2526 | ||
2714 | 2527 | #we can bypass the following if scan and first result is zero | 2527 | #we can bypass the following if scan and first result is zero |
2715 | 2528 | if not bypass_run: | 2528 | if not bypass_run: |
2717 | 2529 | self.exec_cmd('refine %s' % nb_event, postcmd=False) | 2529 | self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) |
2718 | 2530 | , postcmd=False) | ||
2719 | 2530 | 2531 | ||
2720 | 2531 | self.exec_cmd('combine_events', postcmd=False,printcmd=False) | 2532 | self.exec_cmd('combine_events', postcmd=False,printcmd=False) |
2721 | 2532 | self.print_results_in_shell(self.results.current) | 2533 | self.print_results_in_shell(self.results.current) |
2722 | @@ -2882,7 +2883,7 @@ | |||
2723 | 2882 | particle = 0 | 2883 | particle = 0 |
2724 | 2883 | # Read BRs for this decay | 2884 | # Read BRs for this decay |
2725 | 2884 | line = param_card[line_number] | 2885 | line = param_card[line_number] |
2727 | 2885 | while line.startswith('#') or line.startswith(' '): | 2886 | while re.search('^(#|\s|\d)', line): |
2728 | 2886 | line = param_card.pop(line_number) | 2887 | line = param_card.pop(line_number) |
2729 | 2887 | if not particle or line.startswith('#'): | 2888 | if not particle or line.startswith('#'): |
2730 | 2888 | line=param_card[line_number] | 2889 | line=param_card[line_number] |
2731 | @@ -3354,7 +3355,7 @@ | |||
2732 | 3354 | if float(self.run_card['mmjj']) > 0.01 * (float(self.run_card['ebeam1'])+float(self.run_card['ebeam2'])): | 3355 | if float(self.run_card['mmjj']) > 0.01 * (float(self.run_card['ebeam1'])+float(self.run_card['ebeam2'])): |
2733 | 3355 | self.pass_in_difficult_integration_mode() | 3356 | self.pass_in_difficult_integration_mode() |
2734 | 3356 | elif self.run_card['hard_survey']: | 3357 | elif self.run_card['hard_survey']: |
2736 | 3357 | self.pass_in_difficult_integration_mode() | 3358 | self.pass_in_difficult_integration_mode(self.run_card['hard_survey']) |
2737 | 3358 | 3359 | ||
2738 | 3359 | jobs, P_zero_result = ajobcreator.launch() | 3360 | jobs, P_zero_result = ajobcreator.launch() |
2739 | 3360 | # Check if all or only some fails | 3361 | # Check if all or only some fails |
2740 | @@ -3382,24 +3383,26 @@ | |||
2741 | 3382 | self.update_status('End survey', 'parton', makehtml=False) | 3383 | self.update_status('End survey', 'parton', makehtml=False) |
2742 | 3383 | 3384 | ||
2743 | 3384 | ############################################################################ | 3385 | ############################################################################ |
2745 | 3385 | def pass_in_difficult_integration_mode(self): | 3386 | def pass_in_difficult_integration_mode(self, rate=1): |
2746 | 3386 | """be more secure for the integration to not miss it due to strong cut""" | 3387 | """be more secure for the integration to not miss it due to strong cut""" |
2747 | 3387 | 3388 | ||
2748 | 3388 | # improve survey options if default | 3389 | # improve survey options if default |
2749 | 3389 | if self.opts['points'] == self._survey_options['points'][1]: | 3390 | if self.opts['points'] == self._survey_options['points'][1]: |
2751 | 3390 | self.opts['points'] = 3 * self._survey_options['points'][1] | 3391 | self.opts['points'] = (rate+2) * self._survey_options['points'][1] |
2752 | 3391 | if self.opts['iterations'] == self._survey_options['iterations'][1]: | 3392 | if self.opts['iterations'] == self._survey_options['iterations'][1]: |
2754 | 3392 | self.opts['iterations'] = 2 + self._survey_options['iterations'][1] | 3393 | self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] |
2755 | 3393 | if self.opts['accuracy'] == self._survey_options['accuracy'][1]: | 3394 | if self.opts['accuracy'] == self._survey_options['accuracy'][1]: |
2757 | 3394 | self.opts['accuracy'] = self._survey_options['accuracy'][1]/3 | 3395 | self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) |
2758 | 3395 | 3396 | ||
2759 | 3396 | # Modify run_config.inc in order to improve the refine | 3397 | # Modify run_config.inc in order to improve the refine |
2760 | 3397 | conf_path = pjoin(self.me_dir, 'Source','run_config.inc') | 3398 | conf_path = pjoin(self.me_dir, 'Source','run_config.inc') |
2761 | 3398 | files.cp(conf_path, conf_path + '.bk') | 3399 | files.cp(conf_path, conf_path + '.bk') |
2762 | 3399 | # | 3400 | # |
2763 | 3400 | text = open(conf_path).read() | 3401 | text = open(conf_path).read() |
2766 | 3401 | text = re.sub('''\(min_events = \d+\)''', '''(min_events = 7500 )''', text) | 3402 | min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) |
2767 | 3402 | text = re.sub('''\(max_events = \d+\)''', '''(max_events = 40000 )''', text) | 3403 | |
2768 | 3404 | text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) | ||
2769 | 3405 | text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) | ||
2770 | 3403 | fsock = open(conf_path, 'w') | 3406 | fsock = open(conf_path, 'w') |
2771 | 3404 | fsock.write(text) | 3407 | fsock.write(text) |
2772 | 3405 | fsock.close() | 3408 | fsock.close() |
2773 | @@ -3415,6 +3418,18 @@ | |||
2774 | 3415 | devnull = open(os.devnull, 'w') | 3418 | devnull = open(os.devnull, 'w') |
2775 | 3416 | self.nb_refine += 1 | 3419 | self.nb_refine += 1 |
2776 | 3417 | args = self.split_arg(line) | 3420 | args = self.split_arg(line) |
2777 | 3421 | treshold=None | ||
2778 | 3422 | for a in args: | ||
2779 | 3423 | if a.startswith('--treshold='): | ||
2780 | 3424 | treshold = float(a.split('=',1)[1]) | ||
2781 | 3425 | old_xsec = self.results.current['prev_cross'] | ||
2782 | 3426 | new_xsec = self.results.current['cross'] | ||
2783 | 3427 | if old_xsec > new_xsec * treshold: | ||
2784 | 3428 | logger.info('No need for second refine due to stability of cross-section') | ||
2785 | 3429 | return | ||
2786 | 3430 | else: | ||
2787 | 3431 | args.remove(a) | ||
2788 | 3432 | break | ||
2789 | 3418 | # Check argument's validity | 3433 | # Check argument's validity |
2790 | 3419 | self.check_refine(args) | 3434 | self.check_refine(args) |
2791 | 3420 | 3435 | ||
2792 | @@ -3471,8 +3486,7 @@ | |||
2793 | 3471 | cross, error = x_improve.update_html() #update html results for survey | 3486 | cross, error = x_improve.update_html() #update html results for survey |
2794 | 3472 | if cross == 0: | 3487 | if cross == 0: |
2795 | 3473 | return | 3488 | return |
2798 | 3474 | logger.info("Current estimate of cross-section: %s +- %s" % (cross, error)) | 3489 | logger.info("- Current estimate of cross-section: %s +- %s" % (cross, error)) |
2797 | 3475 | |||
2799 | 3476 | if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): | 3490 | if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): |
2800 | 3477 | # Non splitted mode is based on writting ajob so need to track them | 3491 | # Non splitted mode is based on writting ajob so need to track them |
2801 | 3478 | # Splitted mode handle the cluster submition internally. | 3492 | # Splitted mode handle the cluster submition internally. |
2802 | @@ -3811,6 +3825,17 @@ | |||
2803 | 3811 | self.update_status('Creating gridpack', level='parton') | 3825 | self.update_status('Creating gridpack', level='parton') |
2804 | 3812 | # compile gen_ximprove | 3826 | # compile gen_ximprove |
2805 | 3813 | misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) | 3827 | misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) |
2806 | 3828 | |||
2807 | 3829 | Gdir = self.get_Gdir() | ||
2808 | 3830 | Pdir = set([os.path.dirname(G) for G in Gdir]) | ||
2809 | 3831 | for P in Pdir: | ||
2810 | 3832 | allG = misc.glob('G*', path=P) | ||
2811 | 3833 | for G in allG: | ||
2812 | 3834 | if pjoin(P, G) not in Gdir: | ||
2813 | 3835 | logger.debug('removing %s', pjoin(P,G)) | ||
2814 | 3836 | shutil.rmtree(pjoin(P,G)) | ||
2815 | 3837 | |||
2816 | 3838 | |||
2817 | 3814 | args = self.split_arg(line) | 3839 | args = self.split_arg(line) |
2818 | 3815 | self.check_combine_events(args) | 3840 | self.check_combine_events(args) |
2819 | 3816 | if not self.run_tag: self.run_tag = 'tag_1' | 3841 | if not self.run_tag: self.run_tag = 'tag_1' |
2820 | @@ -4668,7 +4693,7 @@ | |||
2821 | 4668 | devnull.close() | 4693 | devnull.close() |
2822 | 4669 | if pid == 0: | 4694 | if pid == 0: |
2823 | 4670 | misc.call('head -n -1 %s | tail -n +%d > %s/tmpfile' % | 4695 | misc.call('head -n -1 %s | tail -n +%d > %s/tmpfile' % |
2825 | 4671 | (hepmc_file, n_head, os.path.dirname(hepmc_file)), shell=True) | 4696 | (hepmc_file, n_head+1, os.path.dirname(hepmc_file)), shell=True) |
2826 | 4672 | misc.call(['mv', 'tmpfile', os.path.basename(hepmc_file)], cwd=os.path.dirname(hepmc_file)) | 4697 | misc.call(['mv', 'tmpfile', os.path.basename(hepmc_file)], cwd=os.path.dirname(hepmc_file)) |
2827 | 4673 | elif sys.platform == 'darwin': | 4698 | elif sys.platform == 'darwin': |
2828 | 4674 | # sed on MAC has slightly different synthax than on | 4699 | # sed on MAC has slightly different synthax than on |
2829 | @@ -5967,10 +5992,16 @@ | |||
2830 | 5967 | 5992 | ||
2831 | 5968 | eradir = self.options['exrootanalysis_path'] | 5993 | eradir = self.options['exrootanalysis_path'] |
2832 | 5969 | totar = False | 5994 | totar = False |
2833 | 5995 | torm = False | ||
2834 | 5970 | if input.endswith('.gz'): | 5996 | if input.endswith('.gz'): |
2838 | 5971 | misc.gunzip(input, keep=True) | 5997 | if not os.path.exists(input) and os.path.exists(input[:-3]): |
2839 | 5972 | totar = True | 5998 | totar = True |
2840 | 5973 | input = input[:-3] | 5999 | input = input[:-3] |
2841 | 6000 | else: | ||
2842 | 6001 | misc.gunzip(input, keep=True) | ||
2843 | 6002 | totar = False | ||
2844 | 6003 | torm = True | ||
2845 | 6004 | input = input[:-3] | ||
2846 | 5974 | 6005 | ||
2847 | 5975 | try: | 6006 | try: |
2848 | 5976 | misc.call(['%s/ExRootLHEFConverter' % eradir, | 6007 | misc.call(['%s/ExRootLHEFConverter' % eradir, |
2849 | @@ -5982,12 +6013,13 @@ | |||
2850 | 5982 | if totar: | 6013 | if totar: |
2851 | 5983 | if os.path.exists('%s.gz' % input): | 6014 | if os.path.exists('%s.gz' % input): |
2852 | 5984 | try: | 6015 | try: |
2854 | 5985 | os.remove(input) | 6016 | os.remove('%s.gz' % input) |
2855 | 5986 | except: | 6017 | except: |
2856 | 5987 | pass | 6018 | pass |
2857 | 5988 | else: | 6019 | else: |
2858 | 5989 | misc.gzip(input) | 6020 | misc.gzip(input) |
2860 | 5990 | 6021 | if torm: | |
2861 | 6022 | os.remove(input) | ||
2862 | 5991 | 6023 | ||
2863 | 5992 | def run_syscalc(self, mode='parton', event_path=None, output=None): | 6024 | def run_syscalc(self, mode='parton', event_path=None, output=None): |
2864 | 5993 | """create the syscalc output""" | 6025 | """create the syscalc output""" |
2865 | @@ -6458,7 +6490,10 @@ | |||
2866 | 6458 | os.chdir(self.me_dir) | 6490 | os.chdir(self.me_dir) |
2867 | 6459 | else: | 6491 | else: |
2868 | 6460 | for line in open(pjoin(self.me_dir,'SubProcesses','subproc.mg')): | 6492 | for line in open(pjoin(self.me_dir,'SubProcesses','subproc.mg')): |
2870 | 6461 | os.mkdir(line.strip()) | 6493 | p = line.strip() |
2871 | 6494 | os.mkdir(p) | ||
2872 | 6495 | files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), | ||
2873 | 6496 | pjoin(p, 'symfact.dat')) | ||
2874 | 6462 | 6497 | ||
2875 | 6463 | 6498 | ||
2876 | 6464 | def launch(self, nb_event, seed): | 6499 | def launch(self, nb_event, seed): |
2877 | @@ -6472,6 +6507,12 @@ | |||
2878 | 6472 | misc.call([pjoin(self.me_dir,'bin','internal','restore_data'), | 6507 | misc.call([pjoin(self.me_dir,'bin','internal','restore_data'), |
2879 | 6473 | 'default'], cwd=self.me_dir) | 6508 | 'default'], cwd=self.me_dir) |
2880 | 6474 | 6509 | ||
2881 | 6510 | if self.run_card['python_seed'] == -2: | ||
2882 | 6511 | import random | ||
2883 | 6512 | random.seed(seed) | ||
2884 | 6513 | elif self.run_card['python_seed'] > 0: | ||
2885 | 6514 | import random | ||
2886 | 6515 | random.seed(self.run_card['python_seed']) | ||
2887 | 6475 | # 2) Run the refine for the grid | 6516 | # 2) Run the refine for the grid |
2888 | 6476 | self.update_status('Generating Events', level=None) | 6517 | self.update_status('Generating Events', level=None) |
2889 | 6477 | #misc.call([pjoin(self.me_dir,'bin','refine4grid'), | 6518 | #misc.call([pjoin(self.me_dir,'bin','refine4grid'), |
2890 | @@ -6649,11 +6690,11 @@ | |||
2891 | 6649 | sum_axsec += result.get('axsec')*gscalefact[Gdir] | 6690 | sum_axsec += result.get('axsec')*gscalefact[Gdir] |
2892 | 6650 | 6691 | ||
2893 | 6651 | if len(AllEvent) >= 80: #perform a partial unweighting | 6692 | if len(AllEvent) >= 80: #perform a partial unweighting |
2895 | 6652 | AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), | 6693 | AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), |
2896 | 6653 | get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) | 6694 | get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) |
2897 | 6654 | AllEvent = lhe_parser.MultiEventFile() | 6695 | AllEvent = lhe_parser.MultiEventFile() |
2898 | 6655 | AllEvent.banner = self.banner | 6696 | AllEvent.banner = self.banner |
2900 | 6656 | AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), | 6697 | AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), |
2901 | 6657 | sum_xsec, | 6698 | sum_xsec, |
2902 | 6658 | math.sqrt(sum(x**2 for x in sum_xerru)), | 6699 | math.sqrt(sum(x**2 for x in sum_xerru)), |
2903 | 6659 | sum_axsec) | 6700 | sum_axsec) |
2904 | 6660 | 6701 | ||
2905 | === modified file 'madgraph/interface/madgraph_interface.py' | |||
2906 | --- madgraph/interface/madgraph_interface.py 2020-03-06 20:47:59 +0000 | |||
2907 | +++ madgraph/interface/madgraph_interface.py 2020-06-21 12:17:46 +0000 | |||
2908 | @@ -459,7 +459,7 @@ | |||
2909 | 459 | logger.info(" -d: specify other MG/ME directory") | 459 | logger.info(" -d: specify other MG/ME directory") |
2910 | 460 | logger.info(" -noclean: no cleaning performed in \"path\".") | 460 | logger.info(" -noclean: no cleaning performed in \"path\".") |
2911 | 461 | logger.info(" -nojpeg: no jpeg diagrams will be generated.") | 461 | logger.info(" -nojpeg: no jpeg diagrams will be generated.") |
2913 | 462 | logger.info(" -noeps: no jpeg and eps diagrams will be generated.") | 462 | logger.info(" --noeps=True: no jpeg and eps diagrams will be generated.") |
2914 | 463 | logger.info(" -name: the postfix of the main file in pythia8 mode.") | 463 | logger.info(" -name: the postfix of the main file in pythia8 mode.") |
2915 | 464 | logger.info(" Examples:",'$MG:color:GREEN') | 464 | logger.info(" Examples:",'$MG:color:GREEN') |
2916 | 465 | logger.info(" output",'$MG:color:GREEN') | 465 | logger.info(" output",'$MG:color:GREEN') |
2917 | @@ -530,6 +530,11 @@ | |||
2918 | 530 | logger.info(" > Except for the 'gauge' test, all checks above are also") | 530 | logger.info(" > Except for the 'gauge' test, all checks above are also") |
2919 | 531 | logger.info(" available for loop processes with ML5 ('virt=' mode)") | 531 | logger.info(" available for loop processes with ML5 ('virt=' mode)") |
2920 | 532 | logger.info("Example: check full p p > j j",'$MG:color:GREEN') | 532 | logger.info("Example: check full p p > j j",'$MG:color:GREEN') |
2921 | 533 | logger.info("Using leshouches file as input",'$MG:color:GREEN') | ||
2922 | 534 | logger.info(" use the option --events=PATH") | ||
2923 | 535 | logger.info(" zipped file are not supported") | ||
2924 | 536 | logger.info(" to loop over the file use the option --skip_evt=X") | ||
2925 | 537 | logger.info("") | ||
2926 | 533 | logger.info("Options for loop processes only:",'$MG:BOLD') | 538 | logger.info("Options for loop processes only:",'$MG:BOLD') |
2927 | 534 | logger.info("o timing:",'$MG:color:GREEN') | 539 | logger.info("o timing:",'$MG:color:GREEN') |
2928 | 535 | logger.info(" Generate and output a process and returns detailed") | 540 | logger.info(" Generate and output a process and returns detailed") |
2929 | @@ -926,7 +931,9 @@ | |||
2930 | 926 | '--helicity':'-1','--seed':'-1','--collier_cache':'-1', | 931 | '--helicity':'-1','--seed':'-1','--collier_cache':'-1', |
2931 | 927 | '--collier_req_acc':'auto', | 932 | '--collier_req_acc':'auto', |
2932 | 928 | '--collier_internal_stability_test':'False', | 933 | '--collier_internal_stability_test':'False', |
2934 | 929 | '--collier_mode':'1'} | 934 | '--collier_mode':'1', |
2935 | 935 | '--events': None, | ||
2936 | 936 | '--skip_evt':0} | ||
2937 | 930 | 937 | ||
2938 | 931 | if args[0] in ['cms'] or args[0].lower()=='cmsoptions': | 938 | if args[0] in ['cms'] or args[0].lower()=='cmsoptions': |
2939 | 932 | # increase the default energy to 5000 | 939 | # increase the default energy to 5000 |
2940 | @@ -1075,7 +1082,7 @@ | |||
2941 | 1075 | 1082 | ||
2942 | 1076 | if '[' in process and '{' in process: | 1083 | if '[' in process and '{' in process: |
2943 | 1077 | valid = False | 1084 | valid = False |
2945 | 1078 | if 'noborn' in process: | 1085 | if 'noborn' in process or 'sqrvirt' in process: |
2946 | 1079 | valid = True | 1086 | valid = True |
2947 | 1080 | else: | 1087 | else: |
2948 | 1081 | raise self.InvalidCmd('Polarization restriction can not be used for NLO processes') | 1088 | raise self.InvalidCmd('Polarization restriction can not be used for NLO processes') |
2949 | @@ -1670,7 +1677,7 @@ | |||
2950 | 1670 | continue | 1677 | continue |
2951 | 1671 | elif not '=' in arg: | 1678 | elif not '=' in arg: |
2952 | 1672 | raise self.InvalidCmd('Options required an equal (and then the value)') | 1679 | raise self.InvalidCmd('Options required an equal (and then the value)') |
2954 | 1673 | arg, value = arg.split('=') | 1680 | arg, value = arg.split('=',1) |
2955 | 1674 | if arg[2:] not in options: | 1681 | if arg[2:] not in options: |
2956 | 1675 | raise self.InvalidCmd('%s not valid options' % arg) | 1682 | raise self.InvalidCmd('%s not valid options' % arg) |
2957 | 1676 | options[arg[2:]] = value | 1683 | options[arg[2:]] = value |
2958 | @@ -2832,7 +2839,7 @@ | |||
2959 | 2832 | _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner'] | 2839 | _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner'] |
2960 | 2833 | _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis', | 2840 | _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis', |
2961 | 2834 | 'update', 'Golem95', 'QCDLoop', 'maddm', 'maddump', | 2841 | 'update', 'Golem95', 'QCDLoop', 'maddm', 'maddump', |
2963 | 2835 | 'looptools'] | 2842 | 'looptools', 'MadSTR'] |
2964 | 2836 | 2843 | ||
2965 | 2837 | # The targets below are installed using the HEPToolsInstaller.py script | 2844 | # The targets below are installed using the HEPToolsInstaller.py script |
2966 | 2838 | _advanced_install_opts = ['pythia8','zlib','boost','lhapdf6','lhapdf5','collier', | 2845 | _advanced_install_opts = ['pythia8','zlib','boost','lhapdf6','lhapdf5','collier', |
2967 | @@ -3869,6 +3876,15 @@ | |||
2968 | 3869 | option = args[i].split('=') | 3876 | option = args[i].split('=') |
2969 | 3870 | if option[0] =='--energy': | 3877 | if option[0] =='--energy': |
2970 | 3871 | options['energy']=float(option[1]) | 3878 | options['energy']=float(option[1]) |
2971 | 3879 | elif option[0] == '--events' and option[1]: | ||
2972 | 3880 | if option[1] == 'None': | ||
2973 | 3881 | options['events'] = None | ||
2974 | 3882 | elif not os.path.exists(option[1]): | ||
2975 | 3883 | raise Exception, 'path %s does not exists' % option[1] | ||
2976 | 3884 | else: | ||
2977 | 3885 | options['events'] = option[1] | ||
2978 | 3886 | elif option[0] == '--skip_evt': | ||
2979 | 3887 | options['skip_evt']=int(option[1]) | ||
2980 | 3872 | elif option[0]=='--split_orders': | 3888 | elif option[0]=='--split_orders': |
2981 | 3873 | options['split_orders']=int(option[1]) | 3889 | options['split_orders']=int(option[1]) |
2982 | 3874 | elif option[0]=='--helicity': | 3890 | elif option[0]=='--helicity': |
2983 | @@ -5615,7 +5631,7 @@ | |||
2984 | 5615 | #self.do_define(line) | 5631 | #self.do_define(line) |
2985 | 5616 | self.exec_cmd('define %s' % line, printcmd=False, precmd=True) | 5632 | self.exec_cmd('define %s' % line, printcmd=False, precmd=True) |
2986 | 5617 | except self.InvalidCmd, why: | 5633 | except self.InvalidCmd, why: |
2988 | 5618 | logger_stderr.warning('impossible to set default multiparticles %s because %s' % | 5634 | logger.warning('impossible to set default multiparticles %s because %s' % |
2989 | 5619 | (line.split()[0],why)) | 5635 | (line.split()[0],why)) |
2990 | 5620 | if self.history[-1] == 'define %s' % line.strip(): | 5636 | if self.history[-1] == 'define %s' % line.strip(): |
2991 | 5621 | self.history.pop(-1) | 5637 | self.history.pop(-1) |
2992 | @@ -5985,7 +6001,7 @@ | |||
2993 | 5985 | # Return true for successful installation | 6001 | # Return true for successful installation |
2994 | 5986 | return True | 6002 | return True |
2995 | 5987 | 6003 | ||
2997 | 5988 | install_plugin = ['maddm', 'maddump'] | 6004 | install_plugin = ['maddm', 'maddump', 'MadSTR'] |
2998 | 5989 | install_ad = {'pythia-pgs':['arXiv:0603175'], | 6005 | install_ad = {'pythia-pgs':['arXiv:0603175'], |
2999 | 5990 | 'Delphes':['arXiv:1307.6346'], | 6006 | 'Delphes':['arXiv:1307.6346'], |
3000 | 5991 | 'Delphes2':['arXiv:0903.2225'], | 6007 | 'Delphes2':['arXiv:0903.2225'], |
3001 | @@ -6003,7 +6019,8 @@ | |||
3002 | 6003 | 'collier':['arXiv:1604.06792'], | 6019 | 'collier':['arXiv:1604.06792'], |
3003 | 6004 | 'oneloop':['arXiv:1007.4716'], | 6020 | 'oneloop':['arXiv:1007.4716'], |
3004 | 6005 | 'maddm':['arXiv:1804.00444'], | 6021 | 'maddm':['arXiv:1804.00444'], |
3006 | 6006 | 'maddump':['arXiv:1812.06771']} | 6022 | 'maddump':['arXiv:1812.06771'], |
3007 | 6023 | 'MadSTR':['arXiv:1612.00440']} | ||
3008 | 6007 | 6024 | ||
3009 | 6008 | install_server = ['http://madgraph.phys.ucl.ac.be/package_info.dat', | 6025 | install_server = ['http://madgraph.phys.ucl.ac.be/package_info.dat', |
3010 | 6009 | 'http://madgraph.physics.illinois.edu/package_info.dat'] | 6026 | 'http://madgraph.physics.illinois.edu/package_info.dat'] |
3011 | @@ -6129,7 +6146,10 @@ | |||
3012 | 6129 | name = args[0] | 6146 | name = args[0] |
3013 | 6130 | if args[0] == 'MadAnalysis4': | 6147 | if args[0] == 'MadAnalysis4': |
3014 | 6131 | args[0] = 'MadAnalysis' | 6148 | args[0] = 'MadAnalysis' |
3016 | 6132 | 6149 | elif args[0] in ['madstr', 'madSTR']: | |
3017 | 6150 | args[0] = 'MadSTR' | ||
3018 | 6151 | name = 'MadSTR' | ||
3019 | 6152 | |||
3020 | 6133 | if args[0] in self._advanced_install_opts: | 6153 | if args[0] in self._advanced_install_opts: |
3021 | 6134 | # Now launch the advanced installation of the tool args[0] | 6154 | # Now launch the advanced installation of the tool args[0] |
3022 | 6135 | # path['HEPToolsInstaller'] is the online adress where to downlaod | 6155 | # path['HEPToolsInstaller'] is the online adress where to downlaod |
3023 | @@ -6352,6 +6372,7 @@ | |||
3024 | 6352 | cwd = os.path.join(MG5DIR, name)) | 6372 | cwd = os.path.join(MG5DIR, name)) |
3025 | 6353 | else: | 6373 | else: |
3026 | 6354 | status = misc.call(['make']+make_flags, cwd = os.path.join(MG5DIR, name)) | 6374 | status = misc.call(['make']+make_flags, cwd = os.path.join(MG5DIR, name)) |
3027 | 6375 | devnull.close() | ||
3028 | 6355 | else: | 6376 | else: |
3029 | 6356 | try: | 6377 | try: |
3030 | 6357 | misc.compile(['clean'], mode='', cwd = os.path.join(MG5DIR, name)) | 6378 | misc.compile(['clean'], mode='', cwd = os.path.join(MG5DIR, name)) |
3031 | @@ -6400,18 +6421,18 @@ | |||
3032 | 6400 | 6421 | ||
3033 | 6401 | if sys.platform == "darwin": | 6422 | if sys.platform == "darwin": |
3034 | 6402 | logger.info('Downloading TD for Mac') | 6423 | logger.info('Downloading TD for Mac') |
3036 | 6403 | target = 'http://madgraph.phys.ucl.ac.be/Downloads/td_mac_intel.tar.gz' | 6424 | target = 'https://home.fnal.gov/~parke/TD/td_mac_intel64.tar.gz' |
3037 | 6404 | misc.wget(target, 'td.tgz', cwd=pjoin(MG5DIR,'td')) | 6425 | misc.wget(target, 'td.tgz', cwd=pjoin(MG5DIR,'td')) |
3038 | 6405 | misc.call(['tar', '-xzpvf', 'td.tgz'], | 6426 | misc.call(['tar', '-xzpvf', 'td.tgz'], |
3039 | 6406 | cwd=pjoin(MG5DIR,'td')) | 6427 | cwd=pjoin(MG5DIR,'td')) |
3041 | 6407 | files.mv(MG5DIR + '/td/td_mac_intel',MG5DIR+'/td/td') | 6428 | files.mv(MG5DIR + '/td/td_intel_mac64',MG5DIR+'/td/td') |
3042 | 6408 | else: | 6429 | else: |
3043 | 6409 | if sys.maxsize > 2**32: | 6430 | if sys.maxsize > 2**32: |
3044 | 6410 | logger.info('Downloading TD for Linux 64 bit') | 6431 | logger.info('Downloading TD for Linux 64 bit') |
3049 | 6411 | target = 'http://madgraph.phys.ucl.ac.be/Downloads/td64/td' | 6432 | target = 'https://home.fnal.gov/~parke/TD/td_linux_64bit.tar.gz' |
3050 | 6412 | logger.warning('''td program (needed by MadAnalysis) is not compile for 64 bit computer. | 6433 | #logger.warning('''td program (needed by MadAnalysis) is not compile for 64 bit computer. |
3051 | 6413 | In 99% of the case, this is perfectly fine. If you do not have plot, please follow | 6434 | #In 99% of the case, this is perfectly fine. If you do not have plot, please follow |
3052 | 6414 | instruction in https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/TopDrawer .''') | 6435 | #instruction in https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/TopDrawer .''') |
3053 | 6415 | else: | 6436 | else: |
3054 | 6416 | logger.info('Downloading TD for Linux 32 bit') | 6437 | logger.info('Downloading TD for Linux 32 bit') |
3055 | 6417 | target = 'http://madgraph.phys.ucl.ac.be/Downloads/td' | 6438 | target = 'http://madgraph.phys.ucl.ac.be/Downloads/td' |
3056 | 6418 | 6439 | ||
3057 | === modified file 'madgraph/interface/master_interface.py' | |||
3058 | --- madgraph/interface/master_interface.py 2019-09-26 14:06:19 +0000 | |||
3059 | +++ madgraph/interface/master_interface.py 2020-06-21 12:17:46 +0000 | |||
3060 | @@ -215,6 +215,8 @@ | |||
3061 | 215 | elif nlo_mode in ['virt', 'sqrvirt']: | 215 | elif nlo_mode in ['virt', 'sqrvirt']: |
3062 | 216 | self.change_principal_cmd('MadLoop', allow_switch) | 216 | self.change_principal_cmd('MadLoop', allow_switch) |
3063 | 217 | elif nlo_mode == 'noborn': | 217 | elif nlo_mode == 'noborn': |
3064 | 218 | if self.current_interface == "MadGraph": | ||
3065 | 219 | allow_switch = True | ||
3066 | 218 | self.change_principal_cmd('MadLoop', allow_switch) | 220 | self.change_principal_cmd('MadLoop', allow_switch) |
3067 | 219 | self.cmd.validate_model(self, loop_type=nlo_mode, | 221 | self.cmd.validate_model(self, loop_type=nlo_mode, |
3068 | 220 | coupling_type=orders) | 222 | coupling_type=orders) |
3069 | 221 | 223 | ||
3070 | === modified file 'madgraph/interface/reweight_interface.py' | |||
3071 | --- madgraph/interface/reweight_interface.py 2020-01-15 18:23:15 +0000 | |||
3072 | +++ madgraph/interface/reweight_interface.py 2020-06-21 12:17:46 +0000 | |||
3073 | @@ -58,7 +58,7 @@ | |||
3074 | 58 | nb_f2py_module = 0 # each time the process/model is changed this number is modified to | 58 | nb_f2py_module = 0 # each time the process/model is changed this number is modified to |
3075 | 59 | # forced the python module to re-create an executable | 59 | # forced the python module to re-create an executable |
3076 | 60 | 60 | ||
3078 | 61 | lhapdf = None | 61 | #lhapdf = None |
3079 | 62 | 62 | ||
3080 | 63 | 63 | ||
3081 | 64 | class ReweightInterface(extended_cmd.Cmd): | 64 | class ReweightInterface(extended_cmd.Cmd): |
3082 | @@ -688,7 +688,8 @@ | |||
3083 | 688 | for i,card in enumerate(param_card_iterator): | 688 | for i,card in enumerate(param_card_iterator): |
3084 | 689 | if self.options['rwgt_name']: | 689 | if self.options['rwgt_name']: |
3085 | 690 | self.options['rwgt_name'] = '%s_%s' % (self.options['rwgt_name'].rsplit('_',1)[0], i+1) | 690 | self.options['rwgt_name'] = '%s_%s' % (self.options['rwgt_name'].rsplit('_',1)[0], i+1) |
3087 | 691 | card.write(pjoin(rw_dir, 'Cards', 'param_card.dat')) | 691 | self.new_param_card = card |
3088 | 692 | #card.write(pjoin(rw_dir, 'Cards', 'param_card.dat')) | ||
3089 | 692 | self.exec_cmd("launch --keep_card", printcmd=False, precmd=True) | 693 | self.exec_cmd("launch --keep_card", printcmd=False, precmd=True) |
3090 | 693 | 694 | ||
3091 | 694 | self.options['rwgt_name'] = None | 695 | self.options['rwgt_name'] = None |
3092 | @@ -708,24 +709,23 @@ | |||
3093 | 708 | 709 | ||
3094 | 709 | 710 | ||
3095 | 710 | if not '--keep_card' in args: | 711 | if not '--keep_card' in args: |
3096 | 711 | ff = open(pjoin(rw_dir,'Cards', 'param_card.dat'), 'w') | ||
3097 | 712 | ff.write(self.banner['slha']) | ||
3098 | 713 | ff.close() | ||
3099 | 714 | if self.has_nlo and self.rwgt_mode != "LO": | 712 | if self.has_nlo and self.rwgt_mode != "LO": |
3100 | 715 | rwdir_virt = rw_dir.replace('rw_me', 'rw_mevirt') | 713 | rwdir_virt = rw_dir.replace('rw_me', 'rw_mevirt') |
3109 | 716 | files.ln(ff.name, starting_dir=pjoin(rwdir_virt, 'Cards')) | 714 | |
3110 | 717 | ff = open(pjoin(path_me, 'rw_me','Cards', 'param_card_orig.dat'), 'w') | 715 | out, cmd = common_run_interface.CommonRunCmd.ask_edit_card_static(cards=['param_card.dat'], |
3111 | 718 | ff.write(self.banner['slha']) | 716 | ask=self.ask, pwd=rw_dir, first_cmd=self.stored_line, |
3112 | 719 | ff.close() | 717 | write_file=False, return_instance=True |
3113 | 720 | if self.has_nlo and self.rwgt_mode != "LO": | 718 | ) |
3106 | 721 | files.ln(ff.name, starting_dir=pjoin(path_me, 'rw_mevirt', 'Cards')) | ||
3107 | 722 | cmd = common_run_interface.CommonRunCmd.ask_edit_card_static(cards=['param_card.dat'], | ||
3108 | 723 | ask=self.ask, pwd=rw_dir, first_cmd=self.stored_line) | ||
3114 | 724 | self.stored_line = None | 719 | self.stored_line = None |
3116 | 725 | 720 | card = cmd.param_card | |
3117 | 721 | new_card = card.write() | ||
3118 | 722 | elif self.new_param_card: | ||
3119 | 723 | new_card = self.new_param_card.write() | ||
3120 | 724 | else: | ||
3121 | 725 | new_card = open(pjoin(rw_dir, 'Cards', 'param_card.dat')).read() | ||
3122 | 726 | |||
3123 | 726 | # check for potential scan in the new card | 727 | # check for potential scan in the new card |
3126 | 727 | new_card = open(pjoin(rw_dir, 'Cards', 'param_card.dat')).read() | 728 | pattern_scan = re.compile(r'''^(decay)?[\s\d]*scan''', re.I+re.M) |
3125 | 728 | pattern_scan = re.compile(r'''^[\s\d]*scan''', re.I+re.M) | ||
3127 | 729 | param_card_iterator = [] | 729 | param_card_iterator = [] |
3128 | 730 | if pattern_scan.search(new_card): | 730 | if pattern_scan.search(new_card): |
3129 | 731 | try: | 731 | try: |
3130 | @@ -744,11 +744,19 @@ | |||
3131 | 744 | param_card_iterator = main_card | 744 | param_card_iterator = main_card |
3132 | 745 | first_card = param_card_iterator.next(autostart=True) | 745 | first_card = param_card_iterator.next(autostart=True) |
3133 | 746 | new_card = first_card.write() | 746 | new_card = first_card.write() |
3137 | 747 | first_card.write(pjoin(rw_dir, 'Cards', 'param_card.dat')) | 747 | self.new_param_card = first_card |
3138 | 748 | 748 | #first_card.write(pjoin(rw_dir, 'Cards', 'param_card.dat')) | |
3139 | 749 | # check if "Auto" is present for a width parameter | 749 | |
3140 | 750 | # check if "Auto" is present for a width parameter) | ||
3141 | 750 | tmp_card = new_card.lower().split('block',1)[1] | 751 | tmp_card = new_card.lower().split('block',1)[1] |
3142 | 751 | if "auto" in tmp_card: | 752 | if "auto" in tmp_card: |
3143 | 753 | if param_card_iterator: | ||
3144 | 754 | first_card.write(pjoin(rw_dir, 'Cards', 'param_card.dat')) | ||
3145 | 755 | else: | ||
3146 | 756 | ff = open(pjoin(rw_dir, 'Cards', 'param_card.dat'),'w') | ||
3147 | 757 | ff.write(new_card) | ||
3148 | 758 | ff.close() | ||
3149 | 759 | |||
3150 | 752 | self.mother.check_param_card(pjoin(rw_dir, 'Cards', 'param_card.dat')) | 760 | self.mother.check_param_card(pjoin(rw_dir, 'Cards', 'param_card.dat')) |
3151 | 753 | new_card = open(pjoin(rw_dir, 'Cards', 'param_card.dat')).read() | 761 | new_card = open(pjoin(rw_dir, 'Cards', 'param_card.dat')).read() |
3152 | 754 | 762 | ||
3153 | @@ -795,6 +803,7 @@ | |||
3154 | 795 | # add the reweighting in the banner information: | 803 | # add the reweighting in the banner information: |
3155 | 796 | #starts by computing the difference in the cards. | 804 | #starts by computing the difference in the cards. |
3156 | 797 | s_orig = self.banner['slha'] | 805 | s_orig = self.banner['slha'] |
3157 | 806 | self.orig_param_card_text = s_orig | ||
3158 | 798 | s_new = new_card | 807 | s_new = new_card |
3159 | 799 | self.new_param_card = check_param_card.ParamCard(s_new.splitlines()) | 808 | self.new_param_card = check_param_card.ParamCard(s_new.splitlines()) |
3160 | 800 | 809 | ||
3161 | @@ -866,15 +875,25 @@ | |||
3162 | 866 | else: | 875 | else: |
3163 | 867 | tag_name = 'rwgt_%s' % rewgtid | 876 | tag_name = 'rwgt_%s' % rewgtid |
3164 | 868 | 877 | ||
3165 | 878 | |||
3166 | 869 | #initialise module. | 879 | #initialise module. |
3167 | 870 | for (path,tag), module in self.f2pylib.items(): | 880 | for (path,tag), module in self.f2pylib.items(): |
3168 | 871 | with misc.chdir(pjoin(os.path.dirname(rw_dir), path)): | 881 | with misc.chdir(pjoin(os.path.dirname(rw_dir), path)): |
3169 | 872 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | 882 | with misc.stdchannel_redirected(sys.stdout, os.devnull): |
3170 | 873 | if 'second' in path or tag == 3: | 883 | if 'second' in path or tag == 3: |
3172 | 874 | module.initialise(pjoin(rw_dir, 'Cards', 'param_card.dat')) | 884 | param_card = self.new_param_card |
3173 | 875 | else: | 885 | else: |
3175 | 876 | module.initialise(pjoin(path_me, 'rw_me', 'Cards', 'param_card_orig.dat')) | 886 | param_card = check_param_card.ParamCard(self.orig_param_card_text) |
3176 | 887 | |||
3177 | 888 | for block in param_card: | ||
3178 | 877 | 889 | ||
3179 | 890 | for param in param_card[block]: | ||
3180 | 891 | lhacode = param.lhacode | ||
3181 | 892 | value = param.value | ||
3182 | 893 | name = '%s_%s' % (block.upper(), '_'.join([str(i) for i in lhacode])) | ||
3183 | 894 | module.change_para(name, value) | ||
3184 | 895 | module.update_all_coup() | ||
3185 | 896 | |||
3186 | 878 | return param_card_iterator, tag_name | 897 | return param_card_iterator, tag_name |
3187 | 879 | 898 | ||
3188 | 880 | 899 | ||
3189 | @@ -961,8 +980,10 @@ | |||
3190 | 961 | def calculate_weight(self, event): | 980 | def calculate_weight(self, event): |
3191 | 962 | """space defines where to find the calculator (in multicore)""" | 981 | """space defines where to find the calculator (in multicore)""" |
3192 | 963 | 982 | ||
3195 | 964 | global lhapdf | 983 | if not hasattr(self,'pdf'): |
3196 | 965 | 984 | lhapdf = misc.import_python_lhapdf(self.mg5cmd.options['lhapdf']) | |
3197 | 985 | self.pdf = lhapdf.mkPDF(self.banner.run_card.get_lhapdf_id()) | ||
3198 | 986 | |||
3199 | 966 | if self.has_nlo and self.rwgt_mode != "LO": | 987 | if self.has_nlo and self.rwgt_mode != "LO": |
3200 | 967 | return self.calculate_nlo_weight(event) | 988 | return self.calculate_nlo_weight(event) |
3201 | 968 | 989 | ||
3202 | @@ -1075,19 +1096,20 @@ | |||
3203 | 1075 | 1096 | ||
3204 | 1076 | base_wgt.append(c_wgt.pwgt[:3]) | 1097 | base_wgt.append(c_wgt.pwgt[:3]) |
3205 | 1077 | 1098 | ||
3210 | 1078 | #change the ordering to the fortran one: | 1099 | |
3211 | 1079 | scales2 = self.invert_momenta(scales2) | 1100 | orig_wgt_check, partial_check = self.combine_wgt_local(scales2, pdg, bjx, base_wgt, gs, qcdpower, self.pdf) |
3212 | 1080 | pdg = self.invert_momenta(pdg) | 1101 | #change the ordering to the fortran one: |
3213 | 1081 | bjx = self.invert_momenta(bjx) | 1102 | #scales2_i = self.invert_momenta(scales2) |
3214 | 1103 | #pdg_i = self.invert_momenta(pdg) | ||
3215 | 1104 | #bjx_i = self.invert_momenta(bjx) | ||
3216 | 1082 | # re-compute original weight to reduce numerical inacurracy | 1105 | # re-compute original weight to reduce numerical inacurracy |
3220 | 1083 | base_wgt = self.invert_momenta(base_wgt) | 1106 | #base_wgt_i = self.invert_momenta(base_wgt) |
3221 | 1084 | 1107 | #orig_wgt_check, partial_check = self.combine_wgt(scales2_i, pdg_i, bjx_i, base_wgt_i, gs, qcdpower, 1., 1.) | |
3219 | 1085 | orig_wgt_check, partial_check = self.combine_wgt(scales2, pdg, bjx, base_wgt, gs, qcdpower, 1., 1.) | ||
3222 | 1086 | 1108 | ||
3223 | 1087 | if '_nlo' in type_nlo: | 1109 | if '_nlo' in type_nlo: |
3225 | 1088 | wgt = self.invert_momenta(wgt_virt) | 1110 | #wgt = self.invert_momenta(wgt_virt) |
3226 | 1089 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | 1111 | with misc.stdchannel_redirected(sys.stdout, os.devnull): |
3228 | 1090 | new_out, partial = self.combine_wgt(scales2, pdg, bjx, wgt, gs, qcdpower, 1., 1.) | 1112 | new_out, partial = self.combine_wgt_local(scales2, pdg, bjx, wgt_virt, gs, qcdpower, self.pdf) |
3229 | 1091 | # try to correct for precision issue | 1113 | # try to correct for precision issue |
3230 | 1092 | avg = [partial_check[i]/ref_wgts[i] for i in range(len(ref_wgts))] | 1114 | avg = [partial_check[i]/ref_wgts[i] for i in range(len(ref_wgts))] |
3231 | 1093 | out = sum(partial[i]/avg[i] if 0.85<avg[i]<1.15 else 0 \ | 1115 | out = sum(partial[i]/avg[i] if 0.85<avg[i]<1.15 else 0 \ |
3232 | @@ -1096,9 +1118,9 @@ | |||
3233 | 1096 | 1118 | ||
3234 | 1097 | 1119 | ||
3235 | 1098 | if '_tree' in type_nlo: | 1120 | if '_tree' in type_nlo: |
3237 | 1099 | wgt = self.invert_momenta(wgt_tree) | 1121 | #wgt = self.invert_momenta(wgt_tree) |
3238 | 1100 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | 1122 | with misc.stdchannel_redirected(sys.stdout, os.devnull): |
3240 | 1101 | out, partial = self.combine_wgt(scales2, pdg, bjx, wgt, gs, qcdpower, 1., 1.) | 1123 | out, partial = self.combine_wgt_local(scales2, pdg, bjx, wgt_tree, gs, qcdpower, self.pdf) |
3241 | 1102 | # try to correct for precision issue | 1124 | # try to correct for precision issue |
3242 | 1103 | avg = [partial_check[i]/ref_wgts[i] for i in range(len(ref_wgts))] | 1125 | avg = [partial_check[i]/ref_wgts[i] for i in range(len(ref_wgts))] |
3243 | 1104 | new_out = sum(partial[i]/avg[i] if 0.85<avg[i]<1.15 else partial[i] \ | 1126 | new_out = sum(partial[i]/avg[i] if 0.85<avg[i]<1.15 else partial[i] \ |
3244 | @@ -1126,7 +1148,25 @@ | |||
3245 | 1126 | assert not to_write | 1148 | assert not to_write |
3246 | 1127 | assert not wgt_tree | 1149 | assert not wgt_tree |
3247 | 1128 | return final_weight | 1150 | return final_weight |
3248 | 1151 | |||
3249 | 1152 | |||
3250 | 1153 | def combine_wgt_local(self, scale2s, pdgs, bjxs, base_wgts, gss, qcdpowers, pdf): | ||
3251 | 1154 | |||
3252 | 1155 | wgt = 0. | ||
3253 | 1156 | wgts = [] | ||
3254 | 1157 | for (scale2, pdg, bjx, base_wgt, gs, qcdpower) in zip(scale2s, pdgs, bjxs, base_wgts, gss, qcdpowers): | ||
3255 | 1158 | Q2, mur2, muf2 = scale2 #Q2 is Ellis-Sexton scale | ||
3256 | 1159 | #misc.sprint(Q2, mur2, muf2, base_wgt, gs, qcdpower) | ||
3257 | 1160 | pdf1 = pdf.xfxQ2(pdg[0], bjx[0], muf2)/bjx[0] | ||
3258 | 1161 | pdf2 = pdf.xfxQ2(pdg[1], bjx[1], muf2)/bjx[1] | ||
3259 | 1162 | alphas = pdf.alphasQ2(mur2) | ||
3260 | 1163 | tmp = base_wgt[0] + base_wgt[1] * math.log(mur2/Q2) + base_wgt[2] * math.log(muf2/Q2) | ||
3261 | 1164 | tmp *= gs**qcdpower*pdf1*pdf2 | ||
3262 | 1165 | wgt += tmp | ||
3263 | 1166 | wgts.append(tmp) | ||
3264 | 1167 | return wgt, wgts | ||
3265 | 1129 | 1168 | ||
3266 | 1169 | |||
3267 | 1130 | 1170 | ||
3268 | 1131 | @staticmethod | 1171 | @staticmethod |
3269 | 1132 | def invert_momenta(p): | 1172 | def invert_momenta(p): |
3270 | @@ -1450,10 +1490,9 @@ | |||
3271 | 1450 | commandline = re.sub('@\s*\d+', '', commandline) | 1490 | commandline = re.sub('@\s*\d+', '', commandline) |
3272 | 1451 | # deactivate golem since it creates troubles | 1491 | # deactivate golem since it creates troubles |
3273 | 1452 | old_options = dict(mgcmd.options) | 1492 | old_options = dict(mgcmd.options) |
3276 | 1453 | if mgcmd.options['golem'] or mgcmd.options['pjfry']: | 1493 | if mgcmd.options['golem']: |
3277 | 1454 | logger.info(" When doing NLO reweighting, MG5aMC cannot use the loop reduction algorithms Golem and/or PJFry++") | 1494 | logger.info(" When doing NLO reweighting, MG5aMC cannot use the loop reduction algorithms Golem") |
3278 | 1455 | mgcmd.options['golem'] = None | 1495 | mgcmd.options['golem'] = None |
3279 | 1456 | mgcmd.options['pjfry'] = None | ||
3280 | 1457 | commandline = commandline.replace('add process', 'generate',1) | 1496 | commandline = commandline.replace('add process', 'generate',1) |
3281 | 1458 | logger.info(commandline) | 1497 | logger.info(commandline) |
3282 | 1459 | mgcmd.exec_cmd(commandline, precmd=True) | 1498 | mgcmd.exec_cmd(commandline, precmd=True) |
3283 | @@ -1462,22 +1501,10 @@ | |||
3284 | 1462 | 1501 | ||
3285 | 1463 | #put back golem to original value | 1502 | #put back golem to original value |
3286 | 1464 | mgcmd.options['golem'] = old_options['golem'] | 1503 | mgcmd.options['golem'] = old_options['golem'] |
3287 | 1465 | mgcmd.options['pjfry'] = old_options['pjfry'] | ||
3288 | 1466 | # update make_opts | 1504 | # update make_opts |
3298 | 1467 | m_opts = {} | 1505 | if not mgcmd.options['lhapdf']: |
3290 | 1468 | if mgcmd.options['lhapdf']: | ||
3291 | 1469 | #lhapdfversion = subprocess.Popen([mgcmd.options['lhapdf'], '--version'], | ||
3292 | 1470 | # stdout = subprocess.PIPE).stdout.read().strip()[0] | ||
3293 | 1471 | m_opts['lhapdf'] = True | ||
3294 | 1472 | m_opts['f2pymode'] = True | ||
3295 | 1473 | m_opts['lhapdfversion'] = 5 # 6 always fail on my computer since 5 is compatible but slower always use 5 | ||
3296 | 1474 | m_opts['llhapdf'] = self.mother.get_lhapdf_libdir() | ||
3297 | 1475 | else: | ||
3299 | 1476 | raise Exception, "NLO reweighting requires LHAPDF to work correctly" | 1506 | raise Exception, "NLO reweighting requires LHAPDF to work correctly" |
3300 | 1477 | 1507 | ||
3301 | 1478 | path = pjoin(path_me,data['paths'][1], 'Source', 'make_opts') | ||
3302 | 1479 | common_run_interface.CommonRunCmd.update_make_opts_full(path, m_opts) | ||
3303 | 1480 | logger.info('Done %.4g' % (time.time()-start)) | ||
3304 | 1481 | 1508 | ||
3305 | 1482 | 1509 | ||
3306 | 1483 | # Download LHAPDF SET | 1510 | # Download LHAPDF SET |
3307 | @@ -1635,7 +1662,7 @@ | |||
3308 | 1635 | elif has_nlo and 'NLO' in self.rwgt_mode: | 1662 | elif has_nlo and 'NLO' in self.rwgt_mode: |
3309 | 1636 | self.create_standalone_virt_directory(data, second) | 1663 | self.create_standalone_virt_directory(data, second) |
3310 | 1637 | 1664 | ||
3312 | 1638 | if not second: | 1665 | if False:#not second: |
3313 | 1639 | #compile the module to combine the weight | 1666 | #compile the module to combine the weight |
3314 | 1640 | misc.compile(cwd=pjoin(path_me, data['paths'][1], 'Source')) | 1667 | misc.compile(cwd=pjoin(path_me, data['paths'][1], 'Source')) |
3315 | 1641 | #link it | 1668 | #link it |
3316 | @@ -1666,8 +1693,7 @@ | |||
3317 | 1666 | commandline='import model loop_sm;generate g g > e+ ve [virt=QCD]' | 1693 | commandline='import model loop_sm;generate g g > e+ ve [virt=QCD]' |
3318 | 1667 | # deactivate golem since it creates troubles | 1694 | # deactivate golem since it creates troubles |
3319 | 1668 | old_options = dict(mgcmd.options) | 1695 | old_options = dict(mgcmd.options) |
3322 | 1669 | mgcmd.options['golem'] = None | 1696 | mgcmd.options['golem'] = None |
3321 | 1670 | mgcmd.options['pjfry'] = None | ||
3323 | 1671 | commandline = commandline.replace('add process', 'generate',1) | 1697 | commandline = commandline.replace('add process', 'generate',1) |
3324 | 1672 | logger.info(commandline) | 1698 | logger.info(commandline) |
3325 | 1673 | mgcmd.exec_cmd(commandline, precmd=True) | 1699 | mgcmd.exec_cmd(commandline, precmd=True) |
3326 | @@ -1675,41 +1701,30 @@ | |||
3327 | 1675 | mgcmd.exec_cmd(commandline, precmd=True) | 1701 | mgcmd.exec_cmd(commandline, precmd=True) |
3328 | 1676 | #put back golem to original value | 1702 | #put back golem to original value |
3329 | 1677 | mgcmd.options['golem'] = old_options['golem'] | 1703 | mgcmd.options['golem'] = old_options['golem'] |
3330 | 1678 | mgcmd.options['pjfry'] = old_options['pjfry'] | ||
3331 | 1679 | # update make_opts | 1704 | # update make_opts |
3341 | 1680 | m_opts = {} | 1705 | if not mgcmd.options['lhapdf']: |
3333 | 1681 | if mgcmd.options['lhapdf']: | ||
3334 | 1682 | #lhapdfversion = subprocess.Popen([mgcmd.options['lhapdf'], '--version'], | ||
3335 | 1683 | # stdout = subprocess.PIPE).stdout.read().strip()[0] | ||
3336 | 1684 | m_opts['lhapdf'] = True | ||
3337 | 1685 | m_opts['f2pymode'] = True | ||
3338 | 1686 | m_opts['lhapdfversion'] = 5 # 6 always fail on my computer since 5 is compatible but slower always use 5 | ||
3339 | 1687 | m_opts['llhapdf'] = self.mother.get_lhapdf_libdir() | ||
3340 | 1688 | else: | ||
3342 | 1689 | raise Exception, "NLO_tree reweighting requires LHAPDF to work correctly" | 1706 | raise Exception, "NLO_tree reweighting requires LHAPDF to work correctly" |
3343 | 1690 | 1707 | ||
3344 | 1691 | path = pjoin(path_me,data['paths'][1], 'Source', 'make_opts') | ||
3345 | 1692 | common_run_interface.CommonRunCmd.update_make_opts_full(path, m_opts) | ||
3346 | 1693 | logger.info('Done %.4g' % (time.time()-start)) | ||
3347 | 1694 | |||
3348 | 1695 | # Download LHAPDF SET | 1708 | # Download LHAPDF SET |
3349 | 1696 | common_run_interface.CommonRunCmd.install_lhapdf_pdfset_static(\ | 1709 | common_run_interface.CommonRunCmd.install_lhapdf_pdfset_static(\ |
3350 | 1697 | mgcmd.options['lhapdf'], None, self.banner.run_card.get_lhapdf_id()) | 1710 | mgcmd.options['lhapdf'], None, self.banner.run_card.get_lhapdf_id()) |
3351 | 1698 | 1711 | ||
3352 | 1699 | #compile the module to combine the weight | 1712 | #compile the module to combine the weight |
3366 | 1700 | misc.compile(cwd=pjoin(path_me, data['paths'][1], 'Source')) | 1713 | if False: |
3367 | 1701 | #link it | 1714 | #use python module instead |
3368 | 1702 | with misc.chdir(pjoin(path_me)): | 1715 | misc.compile(cwd=pjoin(path_me, data['paths'][1], 'Source')) |
3369 | 1703 | if path_me not in sys.path: | 1716 | #link it |
3370 | 1704 | sys.path.insert(0, path_me) | 1717 | with misc.chdir(pjoin(path_me)): |
3371 | 1705 | mymod = __import__('%s.Source.rwgt2py' % data['paths'][1], globals(), locals(), [],-1) | 1718 | if path_me not in sys.path: |
3372 | 1706 | mymod = mymod.Source.rwgt2py | 1719 | sys.path.insert(0, path_me) |
3373 | 1707 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | 1720 | mymod = __import__('%s.Source.rwgt2py' % data['paths'][1], globals(), locals(), [],-1) |
3374 | 1708 | mymod.initialise([self.banner.run_card['lpp1'], | 1721 | mymod = mymod.Source.rwgt2py |
3375 | 1709 | self.banner.run_card['lpp2']], | 1722 | with misc.stdchannel_redirected(sys.stdout, os.devnull): |
3376 | 1710 | self.banner.run_card.get_lhapdf_id()) | 1723 | mymod.initialise([self.banner.run_card['lpp1'], |
3377 | 1711 | self.combine_wgt = mymod.get_wgt | 1724 | self.banner.run_card['lpp2']], |
3378 | 1712 | 1725 | self.banner.run_card.get_lhapdf_id()) | |
3379 | 1726 | self.combine_wgt = mymod.get_wgt | ||
3380 | 1727 | |||
3381 | 1713 | 1728 | ||
3382 | 1714 | # 6. If we need a new model/process------------------------------------- | 1729 | # 6. If we need a new model/process------------------------------------- |
3383 | 1715 | if (self.second_model or self.second_process or self.dedicated_path) and not second : | 1730 | if (self.second_model or self.second_process or self.dedicated_path) and not second : |
3384 | @@ -1895,6 +1910,7 @@ | |||
3385 | 1895 | to_save['has_nlo'] = self.has_nlo | 1910 | to_save['has_nlo'] = self.has_nlo |
3386 | 1896 | to_save['rwgt_mode'] = self.rwgt_mode | 1911 | to_save['rwgt_mode'] = self.rwgt_mode |
3387 | 1897 | to_save['rwgt_name'] = self.options['rwgt_name'] | 1912 | to_save['rwgt_name'] = self.options['rwgt_name'] |
3388 | 1913 | to_save['allow_missing_finalstate'] = self.options['allow_missing_finalstate'] | ||
3389 | 1898 | 1914 | ||
3390 | 1899 | name = pjoin(self.rwgt_dir, 'rw_me', 'rwgt.pkl') | 1915 | name = pjoin(self.rwgt_dir, 'rw_me', 'rwgt.pkl') |
3391 | 1900 | save_load_object.save_to_file(name, to_save) | 1916 | save_load_object.save_to_file(name, to_save) |
3392 | @@ -1910,7 +1926,7 @@ | |||
3393 | 1910 | 'rwgt_name': None} | 1926 | 'rwgt_name': None} |
3394 | 1911 | if keep_name: | 1927 | if keep_name: |
3395 | 1912 | self.options['rwgt_name'] = obj['rwgt_name'] | 1928 | self.options['rwgt_name'] = obj['rwgt_name'] |
3397 | 1913 | 1929 | self.options['allow_missing_finalstate'] = obj['allow_missing_finalstate'] | |
3398 | 1914 | old_rwgt = obj['rwgt_dir'] | 1930 | old_rwgt = obj['rwgt_dir'] |
3399 | 1915 | 1931 | ||
3400 | 1916 | # path to fortran executable | 1932 | # path to fortran executable |
3401 | @@ -1933,7 +1949,8 @@ | |||
3402 | 1933 | if not self.rwgt_mode: | 1949 | if not self.rwgt_mode: |
3403 | 1934 | self.rwgt_mode = obj['rwgt_mode'] | 1950 | self.rwgt_mode = obj['rwgt_mode'] |
3404 | 1935 | logger.info("mode set to %s" % self.rwgt_mode) | 1951 | logger.info("mode set to %s" % self.rwgt_mode) |
3406 | 1936 | if self.has_nlo and 'NLO' in self.rwgt_mode: | 1952 | if False:#self.has_nlo and 'NLO' in self.rwgt_mode: |
3407 | 1953 | #use python version | ||
3408 | 1937 | path = pjoin(obj['rwgt_dir'], 'rw_mevirt','Source') | 1954 | path = pjoin(obj['rwgt_dir'], 'rw_mevirt','Source') |
3409 | 1938 | sys.path.insert(0, path) | 1955 | sys.path.insert(0, path) |
3410 | 1939 | try: | 1956 | try: |
3411 | 1940 | 1957 | ||
3412 | === modified file 'madgraph/iolibs/export_v4.py' | |||
3413 | --- madgraph/iolibs/export_v4.py 2020-03-10 15:07:48 +0000 | |||
3414 | +++ madgraph/iolibs/export_v4.py 2020-06-21 12:17:46 +0000 | |||
3415 | @@ -12,7 +12,6 @@ | |||
3416 | 12 | # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch | 12 | # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch |
3417 | 13 | # | 13 | # |
3418 | 14 | ################################################################################ | 14 | ################################################################################ |
3419 | 15 | from madgraph.iolibs.helas_call_writers import HelasCallWriter | ||
3420 | 16 | """Methods and classes to export matrix elements to v4 format.""" | 15 | """Methods and classes to export matrix elements to v4 format.""" |
3421 | 17 | 16 | ||
3422 | 18 | import copy | 17 | import copy |
3423 | @@ -881,7 +880,7 @@ | |||
3424 | 881 | # Make sure aloha is in quadruple precision if needed | 880 | # Make sure aloha is in quadruple precision if needed |
3425 | 882 | old_aloha_mp=aloha.mp_precision | 881 | old_aloha_mp=aloha.mp_precision |
3426 | 883 | aloha.mp_precision=self.opt['mp'] | 882 | aloha.mp_precision=self.opt['mp'] |
3428 | 884 | 883 | self.model = model | |
3429 | 885 | # create the MODEL | 884 | # create the MODEL |
3430 | 886 | write_dir=pjoin(self.dir_path, 'Source', 'MODEL') | 885 | write_dir=pjoin(self.dir_path, 'Source', 'MODEL') |
3431 | 887 | model_builder = UFO_model_to_mg4(model, write_dir, self.opt + self.proc_characteristic) | 886 | model_builder = UFO_model_to_mg4(model, write_dir, self.opt + self.proc_characteristic) |
3432 | @@ -2035,7 +2034,7 @@ | |||
3433 | 2035 | open(pjoin(self.dir_path,'__init__.py'),'w') | 2034 | open(pjoin(self.dir_path,'__init__.py'),'w') |
3434 | 2036 | open(pjoin(self.dir_path,'SubProcesses','__init__.py'),'w') | 2035 | open(pjoin(self.dir_path,'SubProcesses','__init__.py'),'w') |
3435 | 2037 | 2036 | ||
3437 | 2038 | if 'mode' in self.opt and self.opt['mode'] == "reweight": | 2037 | if False:#'mode' in self.opt and self.opt['mode'] == "reweight": |
3438 | 2039 | #add the module to hande the NLO weight | 2038 | #add the module to hande the NLO weight |
3439 | 2040 | files.copytree(pjoin(MG5DIR, 'Template', 'RWGTNLO'), | 2039 | files.copytree(pjoin(MG5DIR, 'Template', 'RWGTNLO'), |
3440 | 2041 | pjoin(self.dir_path, 'Source')) | 2040 | pjoin(self.dir_path, 'Source')) |
3441 | @@ -2043,7 +2042,7 @@ | |||
3442 | 2043 | pjoin(self.dir_path, 'Source', 'PDF')) | 2042 | pjoin(self.dir_path, 'Source', 'PDF')) |
3443 | 2044 | self.write_pdf_opendata() | 2043 | self.write_pdf_opendata() |
3444 | 2045 | 2044 | ||
3446 | 2046 | if self.prefix_info: | 2045 | if self.prefix_info: |
3447 | 2047 | self.write_f2py_splitter() | 2046 | self.write_f2py_splitter() |
3448 | 2048 | self.write_f2py_makefile() | 2047 | self.write_f2py_makefile() |
3449 | 2049 | self.write_f2py_check_sa(matrix_elements, | 2048 | self.write_f2py_check_sa(matrix_elements, |
3450 | @@ -2100,6 +2099,34 @@ | |||
3451 | 2100 | CALL SETPARA(PATH) !first call to setup the paramaters | 2099 | CALL SETPARA(PATH) !first call to setup the paramaters |
3452 | 2101 | RETURN | 2100 | RETURN |
3453 | 2102 | END | 2101 | END |
3454 | 2102 | |||
3455 | 2103 | |||
3456 | 2104 | subroutine CHANGE_PARA(name, value) | ||
3457 | 2105 | implicit none | ||
3458 | 2106 | CF2PY intent(in) :: name | ||
3459 | 2107 | CF2PY intent(in) :: value | ||
3460 | 2108 | |||
3461 | 2109 | character*512 name | ||
3462 | 2110 | double precision value | ||
3463 | 2111 | |||
3464 | 2112 | include '../Source/MODEL/input.inc' | ||
3465 | 2113 | include '../Source/MODEL/coupl.inc' | ||
3466 | 2114 | |||
3467 | 2115 | SELECT CASE (name) | ||
3468 | 2116 | %(parameter_setup)s | ||
3469 | 2117 | CASE DEFAULT | ||
3470 | 2118 | write(*,*) 'no parameter matching', name, value | ||
3471 | 2119 | END SELECT | ||
3472 | 2120 | |||
3473 | 2121 | return | ||
3474 | 2122 | end | ||
3475 | 2123 | |||
3476 | 2124 | subroutine update_all_coup() | ||
3477 | 2125 | implicit none | ||
3478 | 2126 | call coup() | ||
3479 | 2127 | return | ||
3480 | 2128 | end | ||
3481 | 2129 | |||
3482 | 2103 | 2130 | ||
3483 | 2104 | subroutine get_pdg_order(PDG) | 2131 | subroutine get_pdg_order(PDG) |
3484 | 2105 | IMPLICIT NONE | 2132 | IMPLICIT NONE |
3485 | @@ -2154,20 +2181,46 @@ | |||
3486 | 2154 | if min_nexternal != max_nexternal: | 2181 | if min_nexternal != max_nexternal: |
3487 | 2155 | text.append('endif') | 2182 | text.append('endif') |
3488 | 2156 | 2183 | ||
3489 | 2184 | params = self.get_model_parameter(self.model) | ||
3490 | 2185 | parameter_setup =[] | ||
3491 | 2186 | for key, var in params.items(): | ||
3492 | 2187 | parameter_setup.append(' CASE ("%s")\n %s = value' | ||
3493 | 2188 | % (key, var)) | ||
3494 | 2189 | |||
3495 | 2157 | formatting = {'python_information':'\n'.join(info), | 2190 | formatting = {'python_information':'\n'.join(info), |
3496 | 2158 | 'smatrixhel': '\n'.join(text), | 2191 | 'smatrixhel': '\n'.join(text), |
3497 | 2159 | 'maxpart': max_nexternal, | 2192 | 'maxpart': max_nexternal, |
3498 | 2160 | 'nb_me': len(allids), | 2193 | 'nb_me': len(allids), |
3499 | 2161 | 'pdgs': ','.join(str(pdg[i]) if i<len(pdg) else '0' | 2194 | 'pdgs': ','.join(str(pdg[i]) if i<len(pdg) else '0' |
3500 | 2162 | for i in range(max_nexternal) for pdg in allids), | 2195 | for i in range(max_nexternal) for pdg in allids), |
3502 | 2163 | 'prefix':'\',\''.join(allprefix) | 2196 | 'prefix':'\',\''.join(allprefix), |
3503 | 2197 | 'parameter_setup': '\n'.join(parameter_setup), | ||
3504 | 2164 | } | 2198 | } |
3505 | 2165 | formatting['lenprefix'] = len(formatting['prefix']) | 2199 | formatting['lenprefix'] = len(formatting['prefix']) |
3506 | 2166 | text = template % formatting | 2200 | text = template % formatting |
3507 | 2167 | fsock = writers.FortranWriter(pjoin(self.dir_path, 'SubProcesses', 'all_matrix.f'),'w') | 2201 | fsock = writers.FortranWriter(pjoin(self.dir_path, 'SubProcesses', 'all_matrix.f'),'w') |
3508 | 2168 | fsock.writelines(text) | 2202 | fsock.writelines(text) |
3509 | 2169 | fsock.close() | 2203 | fsock.close() |
3510 | 2204 | |||
3511 | 2205 | def get_model_parameter(self, model): | ||
3512 | 2206 | """ returns all the model parameter | ||
3513 | 2207 | """ | ||
3514 | 2208 | params = {} | ||
3515 | 2209 | for p in model.get('parameters')[('external',)]: | ||
3516 | 2210 | name = p.name | ||
3517 | 2211 | nopref = name[4:] if name.startswith('mdl_') else name | ||
3518 | 2212 | params[nopref] = name | ||
3519 | 2170 | 2213 | ||
3520 | 2214 | block = p.lhablock | ||
3521 | 2215 | lha = '_'.join([str(i) for i in p.lhacode]) | ||
3522 | 2216 | params['%s_%s' % (block.upper(), lha)] = name | ||
3523 | 2217 | |||
3524 | 2218 | return params | ||
3525 | 2219 | |||
3526 | 2220 | |||
3527 | 2221 | |||
3528 | 2222 | |||
3529 | 2223 | |||
3530 | 2171 | def write_f2py_check_sa(self, matrix_element, writer): | 2224 | def write_f2py_check_sa(self, matrix_element, writer): |
3531 | 2172 | """ Write the general check_sa.py in SubProcesses that calls all processes successively.""" | 2225 | """ Write the general check_sa.py in SubProcesses that calls all processes successively.""" |
3532 | 2173 | # To be implemented. It is just an example file, i.e. not crucial. | 2226 | # To be implemented. It is just an example file, i.e. not crucial. |
3533 | 2174 | 2227 | ||
3534 | === modified file 'madgraph/iolibs/file_writers.py' | |||
3535 | --- madgraph/iolibs/file_writers.py 2018-05-03 09:00:52 +0000 | |||
3536 | +++ madgraph/iolibs/file_writers.py 2020-06-21 12:17:46 +0000 | |||
3537 | @@ -342,19 +342,28 @@ | |||
3538 | 342 | columns. Split in preferential order according to | 342 | columns. Split in preferential order according to |
3539 | 343 | split_characters, and start each new line with line_start.""" | 343 | split_characters, and start each new line with line_start.""" |
3540 | 344 | 344 | ||
3544 | 345 | res_lines = [line] | 345 | def get_split_index(line, max_length, max_split, split_characters): |
3542 | 346 | |||
3543 | 347 | while len(res_lines[-1]) > self.line_length: | ||
3545 | 348 | split_at = 0 | 346 | split_at = 0 |
3546 | 349 | for character in split_characters: | 347 | for character in split_characters: |
3549 | 350 | index = res_lines[-1][(self.line_length - self.max_split): \ | 348 | index = line[(max_length - max_split): \ |
3550 | 351 | self.line_length].rfind(character) | 349 | max_length].rfind(character) |
3551 | 352 | if index >= 0: | 350 | if index >= 0: |
3553 | 353 | split_at_tmp = self.line_length - self.max_split + index | 351 | split_at_tmp = max_length - max_split + index |
3554 | 354 | if split_at_tmp > split_at: | 352 | if split_at_tmp > split_at: |
3555 | 355 | split_at = split_at_tmp | 353 | split_at = split_at_tmp |
3556 | 354 | return split_at | ||
3557 | 355 | |||
3558 | 356 | |||
3559 | 357 | res_lines = [line] | ||
3560 | 358 | |||
3561 | 359 | while len(res_lines[-1]) > self.line_length: | ||
3562 | 360 | split_at = get_split_index(res_lines[-1], self.line_length, | ||
3563 | 361 | self.max_split, split_characters) | ||
3564 | 356 | if split_at == 0: | 362 | if split_at == 0: |
3566 | 357 | split_at = self.line_length | 363 | split_at = get_split_index(res_lines[-1], self.line_length, |
3567 | 364 | self.max_split + 30, split_characters) | ||
3568 | 365 | if split_at == 0: | ||
3569 | 366 | split_at = self.line_length | ||
3570 | 358 | 367 | ||
3571 | 359 | newline = res_lines[-1][split_at:] | 368 | newline = res_lines[-1][split_at:] |
3572 | 360 | nquotes = self.count_number_of_quotes(newline) | 369 | nquotes = self.count_number_of_quotes(newline) |
3573 | 361 | 370 | ||
3574 | === modified file 'madgraph/iolibs/template_files/madevent_symmetry.f' | |||
3575 | --- madgraph/iolibs/template_files/madevent_symmetry.f 2018-03-16 12:13:34 +0000 | |||
3576 | +++ madgraph/iolibs/template_files/madevent_symmetry.f 2020-06-21 12:17:46 +0000 | |||
3577 | @@ -103,7 +103,7 @@ | |||
3578 | 103 | if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0 | 103 | if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0 |
3579 | 104 | if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0 | 104 | if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0 |
3580 | 105 | if (mass_ion(1).ge.0d0) m1 = mass_ion(1) | 105 | if (mass_ion(1).ge.0d0) m1 = mass_ion(1) |
3582 | 106 | if (mass_ion(2).ge.0d0) m1 = mass_ion(2) | 106 | if (mass_ion(2).ge.0d0) m2 = mass_ion(2) |
3583 | 107 | if(ebeam(1).lt.m1.and.lpp(1).ne.9) ebeam(1)=m1 | 107 | if(ebeam(1).lt.m1.and.lpp(1).ne.9) ebeam(1)=m1 |
3584 | 108 | if(ebeam(2).lt.m2.and.lpp(2).ne.9) ebeam(2)=m2 | 108 | if(ebeam(2).lt.m2.and.lpp(2).ne.9) ebeam(2)=m2 |
3585 | 109 | pi1(0)=ebeam(1) | 109 | pi1(0)=ebeam(1) |
3586 | 110 | 110 | ||
3587 | === modified file 'madgraph/loop/loop_exporters.py' | |||
3588 | --- madgraph/loop/loop_exporters.py 2019-06-05 11:03:48 +0000 | |||
3589 | +++ madgraph/loop/loop_exporters.py 2020-06-21 12:17:46 +0000 | |||
3590 | @@ -297,6 +297,36 @@ | |||
3591 | 297 | RETURN | 297 | RETURN |
3592 | 298 | END | 298 | END |
3593 | 299 | 299 | ||
3594 | 300 | subroutine CHANGE_PARA(name, value) | ||
3595 | 301 | implicit none | ||
3596 | 302 | CF2PY intent(in) :: name | ||
3597 | 303 | CF2PY intent(in) :: value | ||
3598 | 304 | |||
3599 | 305 | character*512 name | ||
3600 | 306 | double precision value | ||
3601 | 307 | |||
3602 | 308 | include '../Source/MODEL/input.inc' | ||
3603 | 309 | include '../Source/MODEL/coupl.inc' | ||
3604 | 310 | include '../Source/MODEL/mp_coupl.inc' | ||
3605 | 311 | include '../Source/MODEL/mp_input.inc' | ||
3606 | 312 | |||
3607 | 313 | SELECT CASE (name) | ||
3608 | 314 | %(parameter_setup)s | ||
3609 | 315 | CASE DEFAULT | ||
3610 | 316 | write(*,*) 'no parameter matching', name | ||
3611 | 317 | END SELECT | ||
3612 | 318 | |||
3613 | 319 | return | ||
3614 | 320 | end | ||
3615 | 321 | |||
3616 | 322 | subroutine update_all_coup() | ||
3617 | 323 | implicit none | ||
3618 | 324 | call coup() | ||
3619 | 325 | call printout() | ||
3620 | 326 | return | ||
3621 | 327 | end | ||
3622 | 328 | |||
3623 | 329 | |||
3624 | 300 | SUBROUTINE SET_MADLOOP_PATH(PATH) | 330 | SUBROUTINE SET_MADLOOP_PATH(PATH) |
3625 | 301 | C Routine to set the path of the folder 'MadLoop5_resources' to MadLoop | 331 | C Routine to set the path of the folder 'MadLoop5_resources' to MadLoop |
3626 | 302 | CHARACTER(512) PATH | 332 | CHARACTER(512) PATH |
3627 | @@ -377,6 +407,14 @@ | |||
3628 | 377 | #close the function | 407 | #close the function |
3629 | 378 | if min_nexternal != max_nexternal: | 408 | if min_nexternal != max_nexternal: |
3630 | 379 | text.append('endif') | 409 | text.append('endif') |
3631 | 410 | |||
3632 | 411 | params = self.get_model_parameter(self.model) | ||
3633 | 412 | parameter_setup =[] | ||
3634 | 413 | for key, var in params.items(): | ||
3635 | 414 | parameter_setup.append(' CASE ("%s")\n %s = value\n MP__%s = value' | ||
3636 | 415 | % (key, var, var)) | ||
3637 | 416 | |||
3638 | 417 | |||
3639 | 380 | 418 | ||
3640 | 381 | formatting = {'python_information':'\n'.join(info), | 419 | formatting = {'python_information':'\n'.join(info), |
3641 | 382 | 'smatrixhel': '\n'.join(text), | 420 | 'smatrixhel': '\n'.join(text), |
3642 | @@ -385,7 +423,8 @@ | |||
3643 | 385 | 'pdgs': ','.join([str(pdg[i]) if i<len(pdg) else '0' | 423 | 'pdgs': ','.join([str(pdg[i]) if i<len(pdg) else '0' |
3644 | 386 | for i in range(max_nexternal) \ | 424 | for i in range(max_nexternal) \ |
3645 | 387 | for pdg in allids]), | 425 | for pdg in allids]), |
3647 | 388 | 'prefix':'\',\''.join(allprefix) | 426 | 'prefix':'\',\''.join(allprefix), |
3648 | 427 | 'parameter_setup': '\n'.join(parameter_setup), | ||
3649 | 389 | } | 428 | } |
3650 | 390 | 429 | ||
3651 | 391 | 430 | ||
3652 | 392 | 431 | ||
3653 | === modified file 'madgraph/madevent/gen_crossxhtml.py' | |||
3654 | --- madgraph/madevent/gen_crossxhtml.py 2018-05-25 09:13:24 +0000 | |||
3655 | +++ madgraph/madevent/gen_crossxhtml.py 2020-06-21 12:17:46 +0000 | |||
3656 | @@ -375,6 +375,9 @@ | |||
3657 | 375 | run[name] = int(value) | 375 | run[name] = int(value) |
3658 | 376 | elif name in ['run_mode','run_statistics']: | 376 | elif name in ['run_mode','run_statistics']: |
3659 | 377 | run[name] = value | 377 | run[name] = value |
3660 | 378 | elif name == 'cross' and run[name] != 0: | ||
3661 | 379 | run['prev_' + name] = run[name] | ||
3662 | 380 | run[name] = float(value) | ||
3663 | 378 | else: | 381 | else: |
3664 | 379 | run[name] = float(value) | 382 | run[name] = float(value) |
3665 | 380 | 383 | ||
3666 | 381 | 384 | ||
3667 | === modified file 'madgraph/madevent/gen_ximprove.py' | |||
3668 | --- madgraph/madevent/gen_ximprove.py 2020-02-25 14:05:36 +0000 | |||
3669 | +++ madgraph/madevent/gen_ximprove.py 2020-06-21 12:17:46 +0000 | |||
3670 | @@ -108,6 +108,10 @@ | |||
3671 | 108 | self.splitted_grid = self.run_card['survey_splitting'] | 108 | self.splitted_grid = self.run_card['survey_splitting'] |
3672 | 109 | if self.run_card['survey_nchannel_per_job'] != -1: | 109 | if self.run_card['survey_nchannel_per_job'] != -1: |
3673 | 110 | self.combining_job = self.run_card['survey_nchannel_per_job'] | 110 | self.combining_job = self.run_card['survey_nchannel_per_job'] |
3674 | 111 | elif self.run_card['hard_survey'] > 1: | ||
3675 | 112 | self.combining_job = 1 | ||
3676 | 113 | |||
3677 | 114 | |||
3678 | 111 | 115 | ||
3679 | 112 | self.splitted_Pdir = {} | 116 | self.splitted_Pdir = {} |
3680 | 113 | self.splitted_for_dir = lambda x,y: self.splitted_grid | 117 | self.splitted_for_dir = lambda x,y: self.splitted_grid |
3681 | @@ -971,7 +975,7 @@ | |||
3682 | 971 | super(gen_ximprove_v4, self).__init__(cmd, opt) | 975 | super(gen_ximprove_v4, self).__init__(cmd, opt) |
3683 | 972 | 976 | ||
3684 | 973 | if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: | 977 | if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: |
3686 | 974 | self.increase_precision() | 978 | self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) |
3687 | 975 | 979 | ||
3688 | 976 | def reset_multijob(self): | 980 | def reset_multijob(self): |
3689 | 977 | 981 | ||
3690 | @@ -986,15 +990,23 @@ | |||
3691 | 986 | f.write('%i\n' % nb_split) | 990 | f.write('%i\n' % nb_split) |
3692 | 987 | f.close() | 991 | f.close() |
3693 | 988 | 992 | ||
3698 | 989 | def increase_precision(self): | 993 | def increase_precision(self, rate=3): |
3699 | 990 | 994 | misc.sprint(rate) | |
3700 | 991 | self.max_event_in_iter = 20000 | 995 | if rate < 3: |
3701 | 992 | self.min_events = 7500 | 996 | self.max_event_in_iter = 20000 |
3702 | 997 | self.min_events = 7500 | ||
3703 | 998 | self.gen_events_security = 1.3 | ||
3704 | 999 | else: | ||
3705 | 1000 | rate = rate -2 | ||
3706 | 1001 | self.max_event_in_iter = int((rate+1) * 10000) | ||
3707 | 1002 | self.min_events = int(rate+2) * 2500 | ||
3708 | 1003 | self.gen_events_security = 1 + 0.1 * (rate+2) | ||
3709 | 1004 | |||
3710 | 993 | if int(self.nhel) == 1: | 1005 | if int(self.nhel) == 1: |
3711 | 994 | self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) | 1006 | self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) |
3712 | 995 | self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) | 1007 | self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) |
3713 | 996 | 1008 | ||
3715 | 997 | self.gen_events_security = 1.3 | 1009 | |
3716 | 998 | 1010 | ||
3717 | 999 | alphabet = "abcdefghijklmnopqrstuvwxyz" | 1011 | alphabet = "abcdefghijklmnopqrstuvwxyz" |
3718 | 1000 | def get_job_for_event(self): | 1012 | def get_job_for_event(self): |
3719 | 1001 | 1013 | ||
3720 | === modified file 'madgraph/various/banner.py' | |||
3721 | --- madgraph/various/banner.py 2020-03-08 20:49:57 +0000 | |||
3722 | +++ madgraph/various/banner.py 2020-06-21 12:17:46 +0000 | |||
3723 | @@ -3091,7 +3091,8 @@ | |||
3724 | 3091 | self.add_param('issgridfile', '', hidden=True) | 3091 | self.add_param('issgridfile', '', hidden=True) |
3725 | 3092 | #job handling of the survey/ refine | 3092 | #job handling of the survey/ refine |
3726 | 3093 | self.add_param('job_strategy', 0, hidden=True, include=False, allowed=[0,1,2], comment='see appendix of 1507.00020 (page 26)') | 3093 | self.add_param('job_strategy', 0, hidden=True, include=False, allowed=[0,1,2], comment='see appendix of 1507.00020 (page 26)') |
3728 | 3094 | self.add_param('hard_survey', False, hidden=True, include=False, comment='force to have better estimate of the integral at survey for difficult mode like VBF') | 3094 | self.add_param('hard_survey', 0, hidden=True, include=False, comment='force to have better estimate of the integral at survey for difficult mode like VBF') |
3729 | 3095 | self.add_param("second_refine_treshold", 0.9, hidden=True, include=False, comment="set a treshold to bypass the use of a second refine. if the ratio of cross-section after survey by the one of the first refine is above the treshold, the second refine will not be done.") | ||
3730 | 3095 | self.add_param('survey_splitting', -1, hidden=True, include=False, comment="for loop-induced control how many core are used at survey for the computation of a single iteration.") | 3096 | self.add_param('survey_splitting', -1, hidden=True, include=False, comment="for loop-induced control how many core are used at survey for the computation of a single iteration.") |
3731 | 3096 | self.add_param('survey_nchannel_per_job', 2, hidden=True, include=False, comment="control how many Channel are integrated inside a single job on cluster/multicore") | 3097 | self.add_param('survey_nchannel_per_job', 2, hidden=True, include=False, comment="control how many Channel are integrated inside a single job on cluster/multicore") |
3732 | 3097 | self.add_param('refine_evt_by_job', -1, hidden=True, include=False, comment="control the maximal number of events for the first iteration of the refine (larger means less jobs)") | 3098 | self.add_param('refine_evt_by_job', -1, hidden=True, include=False, comment="control the maximal number of events for the first iteration of the refine (larger means less jobs)") |
3733 | @@ -3195,8 +3196,6 @@ | |||
3734 | 3195 | if self['mmjj'] > self['xqcut']: | 3196 | if self['mmjj'] > self['xqcut']: |
3735 | 3196 | logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') | 3197 | logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') |
3736 | 3197 | self['mmjj'] = 0.0 | 3198 | self['mmjj'] = 0.0 |
3737 | 3198 | |||
3738 | 3199 | |||
3739 | 3200 | 3199 | ||
3740 | 3201 | # check validity of the pdf set | 3200 | # check validity of the pdf set |
3741 | 3202 | if self['pdlabel'] == 'lhapdf': | 3201 | if self['pdlabel'] == 'lhapdf': |
3742 | @@ -4067,7 +4066,7 @@ | |||
3743 | 4067 | super(RunCardNLO, self).check_validity() | 4066 | super(RunCardNLO, self).check_validity() |
3744 | 4068 | 4067 | ||
3745 | 4069 | # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' | 4068 | # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' |
3747 | 4070 | if self['lpp1']!=1 or self['lpp2']!=1: | 4069 | if abs(self['lpp1'])!=1 or abs(self['lpp2'])!=1: |
3748 | 4071 | if self['lpp1'] == 1 or self['lpp2']==1: | 4070 | if self['lpp1'] == 1 or self['lpp2']==1: |
3749 | 4072 | raise InvalidRunCard('Process like Deep Inelastic scattering not supported at NLO accuracy.') | 4071 | raise InvalidRunCard('Process like Deep Inelastic scattering not supported at NLO accuracy.') |
3750 | 4073 | 4072 | ||
3751 | 4074 | 4073 | ||
3752 | === modified file 'madgraph/various/lhe_parser.py' | |||
3753 | --- madgraph/various/lhe_parser.py 2020-01-09 23:14:56 +0000 | |||
3754 | +++ madgraph/various/lhe_parser.py 2020-06-21 12:17:46 +0000 | |||
3755 | @@ -1449,8 +1449,8 @@ | |||
3756 | 1449 | if not hasattr(Event, 'loweight_pattern'): | 1449 | if not hasattr(Event, 'loweight_pattern'): |
3757 | 1450 | Event.loweight_pattern = re.compile('''<rscale>\s*(?P<nqcd>\d+)\s+(?P<ren_scale>[\d.e+-]+)\s*</rscale>\s*\n\s* | 1450 | Event.loweight_pattern = re.compile('''<rscale>\s*(?P<nqcd>\d+)\s+(?P<ren_scale>[\d.e+-]+)\s*</rscale>\s*\n\s* |
3758 | 1451 | <asrwt>\s*(?P<asrwt>[\s\d.+-e]+)\s*</asrwt>\s*\n\s* | 1451 | <asrwt>\s*(?P<asrwt>[\s\d.+-e]+)\s*</asrwt>\s*\n\s* |
3761 | 1452 | <pdfrwt\s+beam=["']?1["']?\>\s*(?P<beam1>[\s\d.e+-]*)\s*</pdfrwt>\s*\n\s* | 1452 | <pdfrwt\s+beam=["']?(?P<idb1>1|2)["']?\>\s*(?P<beam1>[\s\d.e+-]*)\s*</pdfrwt>\s*\n\s* |
3762 | 1453 | <pdfrwt\s+beam=["']?2["']?\>\s*(?P<beam2>[\s\d.e+-]*)\s*</pdfrwt>\s*\n\s* | 1453 | <pdfrwt\s+beam=["']?(?P<idb2>1|2)["']?\>\s*(?P<beam2>[\s\d.e+-]*)\s*</pdfrwt>\s*\n\s* |
3763 | 1454 | <totfact>\s*(?P<totfact>[\d.e+-]*)\s*</totfact> | 1454 | <totfact>\s*(?P<totfact>[\d.e+-]*)\s*</totfact> |
3764 | 1455 | ''',re.X+re.I+re.M) | 1455 | ''',re.X+re.I+re.M) |
3765 | 1456 | 1456 | ||
3766 | @@ -1468,13 +1468,22 @@ | |||
3767 | 1468 | self.loweight['asrwt'] =[float(x) for x in info.group('asrwt').split()[1:]] | 1468 | self.loweight['asrwt'] =[float(x) for x in info.group('asrwt').split()[1:]] |
3768 | 1469 | self.loweight['tot_fact'] = float(info.group('totfact')) | 1469 | self.loweight['tot_fact'] = float(info.group('totfact')) |
3769 | 1470 | 1470 | ||
3771 | 1471 | args = info.group('beam1').split() | 1471 | if info.group('idb1') == info.group('idb2'): |
3772 | 1472 | raise Exception, '%s not parsed'% text | ||
3773 | 1473 | |||
3774 | 1474 | if info.group('idb1') =="1": | ||
3775 | 1475 | args = info.group('beam1').split() | ||
3776 | 1476 | else: | ||
3777 | 1477 | args = info.group('beam2').split() | ||
3778 | 1472 | npdf = int(args[0]) | 1478 | npdf = int(args[0]) |
3779 | 1473 | self.loweight['n_pdfrw1'] = npdf | 1479 | self.loweight['n_pdfrw1'] = npdf |
3780 | 1474 | self.loweight['pdf_pdg_code1'] = [int(i) for i in args[1:1+npdf]] | 1480 | self.loweight['pdf_pdg_code1'] = [int(i) for i in args[1:1+npdf]] |
3781 | 1475 | self.loweight['pdf_x1'] = [float(i) for i in args[1+npdf:1+2*npdf]] | 1481 | self.loweight['pdf_x1'] = [float(i) for i in args[1+npdf:1+2*npdf]] |
3782 | 1476 | self.loweight['pdf_q1'] = [float(i) for i in args[1+2*npdf:1+3*npdf]] | 1482 | self.loweight['pdf_q1'] = [float(i) for i in args[1+2*npdf:1+3*npdf]] |
3784 | 1477 | args = info.group('beam2').split() | 1483 | if info.group('idb2') =="2": |
3785 | 1484 | args = info.group('beam2').split() | ||
3786 | 1485 | else: | ||
3787 | 1486 | args = info.group('beam1').split() | ||
3788 | 1478 | npdf = int(args[0]) | 1487 | npdf = int(args[0]) |
3789 | 1479 | self.loweight['n_pdfrw2'] = npdf | 1488 | self.loweight['n_pdfrw2'] = npdf |
3790 | 1480 | self.loweight['pdf_pdg_code2'] = [int(i) for i in args[1:1+npdf]] | 1489 | self.loweight['pdf_pdg_code2'] = [int(i) for i in args[1:1+npdf]] |
3791 | 1481 | 1490 | ||
3792 | === modified file 'madgraph/various/misc.py' | |||
3793 | --- madgraph/various/misc.py 2020-01-08 14:13:32 +0000 | |||
3794 | +++ madgraph/various/misc.py 2020-06-21 12:17:46 +0000 | |||
3795 | @@ -488,7 +488,7 @@ | |||
3796 | 488 | error_text += "In general this means that your computer is not able to compile." | 488 | error_text += "In general this means that your computer is not able to compile." |
3797 | 489 | if sys.platform == "darwin": | 489 | if sys.platform == "darwin": |
3798 | 490 | error_text += "Note that MacOSX doesn\'t have gmake/gfortan install by default.\n" | 490 | error_text += "Note that MacOSX doesn\'t have gmake/gfortan install by default.\n" |
3800 | 491 | error_text += "Xcode3 contains those required programs" | 491 | error_text += "Xcode contains gmake. For gfortran we advise: http://hpc.sourceforge.net/" |
3801 | 492 | raise MadGraph5Error, error_text | 492 | raise MadGraph5Error, error_text |
3802 | 493 | 493 | ||
3803 | 494 | if p.returncode: | 494 | if p.returncode: |
3804 | @@ -539,7 +539,7 @@ | |||
3805 | 539 | p = Popen([compiler, '-dumpversion'], stdout=subprocess.PIPE, | 539 | p = Popen([compiler, '-dumpversion'], stdout=subprocess.PIPE, |
3806 | 540 | stderr=subprocess.PIPE) | 540 | stderr=subprocess.PIPE) |
3807 | 541 | output, error = p.communicate() | 541 | output, error = p.communicate() |
3809 | 542 | version_finder=re.compile(r"(?P<version>(\d.)*\d)") | 542 | version_finder=re.compile(r"(?P<version>\d[\d.]*)") |
3810 | 543 | version = version_finder.search(output).group('version') | 543 | version = version_finder.search(output).group('version') |
3811 | 544 | return version | 544 | return version |
3812 | 545 | except Exception: | 545 | except Exception: |
3813 | @@ -1772,7 +1772,8 @@ | |||
3814 | 1772 | import random | 1772 | import random |
3815 | 1773 | msg = choices[random.randint(0,len(choices)-2)] | 1773 | msg = choices[random.randint(0,len(choices)-2)] |
3816 | 1774 | EasterEgg.message_aprilfirst[msgtype].remove(msg) | 1774 | EasterEgg.message_aprilfirst[msgtype].remove(msg) |
3818 | 1775 | 1775 | else: | |
3819 | 1776 | return | ||
3820 | 1776 | elif msgtype=='loading' and date in self.special_banner: | 1777 | elif msgtype=='loading' and date in self.special_banner: |
3821 | 1777 | self.change_banner(date) | 1778 | self.change_banner(date) |
3822 | 1778 | return | 1779 | return |
3823 | @@ -2065,7 +2066,9 @@ | |||
3824 | 2065 | logger.warning("Failed to access python version of LHAPDF: "\ | 2066 | logger.warning("Failed to access python version of LHAPDF: "\ |
3825 | 2066 | "If the python interface to LHAPDF is available on your system, try "\ | 2067 | "If the python interface to LHAPDF is available on your system, try "\ |
3826 | 2067 | "adding its location to the PYTHONPATH environment variable and the"\ | 2068 | "adding its location to the PYTHONPATH environment variable and the"\ |
3828 | 2068 | "LHAPDF library location to LD_LIBRARY_PATH (linux) or DYLD_LIBRARY_PATH (mac os x).") | 2069 | "LHAPDF library location to LD_LIBRARY_PATH (linux) or DYLD_LIBRARY_PATH (mac os x)."\ |
3829 | 2070 | "The required LD_LIBRARY_PATH is "+ lhapdf_libdir | ||
3830 | 2071 | ) | ||
3831 | 2069 | 2072 | ||
3832 | 2070 | if use_lhapdf: | 2073 | if use_lhapdf: |
3833 | 2071 | python_lhapdf = lhapdf | 2074 | python_lhapdf = lhapdf |
3834 | 2072 | 2075 | ||
3835 | === modified file 'madgraph/various/process_checks.py' | |||
3836 | --- madgraph/various/process_checks.py 2019-03-01 08:53:21 +0000 | |||
3837 | +++ madgraph/various/process_checks.py 2020-06-21 12:17:46 +0000 | |||
3838 | @@ -375,7 +375,7 @@ | |||
3839 | 375 | else: | 375 | else: |
3840 | 376 | energy = options['energy'] | 376 | energy = options['energy'] |
3841 | 377 | events = options['events'] | 377 | events = options['events'] |
3843 | 378 | to_skip = 0 | 378 | to_skip = options['skip_evt'] |
3844 | 379 | 379 | ||
3845 | 380 | if not (isinstance(process, base_objects.Process) and \ | 380 | if not (isinstance(process, base_objects.Process) and \ |
3846 | 381 | isinstance(energy, (float,int))): | 381 | isinstance(energy, (float,int))): |
3847 | 382 | 382 | ||
3848 | === modified file 'models/model_reader.py' | |||
3849 | --- models/model_reader.py 2018-06-20 08:18:36 +0000 | |||
3850 | +++ models/model_reader.py 2020-06-21 12:17:46 +0000 | |||
3851 | @@ -181,6 +181,11 @@ | |||
3852 | 181 | value = 0.0 | 181 | value = 0.0 |
3853 | 182 | else: | 182 | else: |
3854 | 183 | raise | 183 | raise |
3855 | 184 | except OverflowError, err: | ||
3856 | 185 | if scale < 1: | ||
3857 | 186 | value = 0.0 | ||
3858 | 187 | else: | ||
3859 | 188 | raise | ||
3860 | 184 | exec("locals()[\'%s\'] = %s" % (parameter_dict[block][pid].name, | 189 | exec("locals()[\'%s\'] = %s" % (parameter_dict[block][pid].name, |
3861 | 185 | value)) | 190 | value)) |
3862 | 186 | parameter_dict[block][pid].value = float(value) | 191 | parameter_dict[block][pid].value = float(value) |
3863 | 187 | 192 | ||
3864 | === modified file 'tests/acceptance_tests/test_cmd_reweight.py' | |||
3865 | --- tests/acceptance_tests/test_cmd_reweight.py 2018-06-01 12:14:52 +0000 | |||
3866 | +++ tests/acceptance_tests/test_cmd_reweight.py 2020-06-21 12:17:46 +0000 | |||
3867 | @@ -136,16 +136,22 @@ | |||
3868 | 136 | ff.close() | 136 | ff.close() |
3869 | 137 | 137 | ||
3870 | 138 | 138 | ||
3873 | 139 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | 139 | if logger.level <= 10: |
3874 | 140 | me_cmd.run_cmd('reweight run_01 --from_cards') | 140 | me_cmd.run_cmd('reweight run_01 --from_cards') |
3875 | 141 | else: | ||
3876 | 142 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | ||
3877 | 143 | me_cmd.run_cmd('reweight run_01 --from_cards') | ||
3878 | 141 | 144 | ||
3879 | 142 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'unweighted_events.lhe.gz')) | 145 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'unweighted_events.lhe.gz')) |
3880 | 143 | 146 | ||
3882 | 144 | solutions = [12.905371, 12.271068, 12.271753, 12.436969, 12.330121, 12.441459, 12.290359, 12.406486, 12.352107, 11.862291, 12.346005, 12.603302, 12.483697, 12.597262, 12.352434, 11.841136, 12.559252, 12.693822, 12.073114, 12.080773, 12.088188, 12.169921, 12.36124, 12.620677, 12.641769] | 147 | #solutions = [12.905371, 12.271068, 12.271753, 12.436969, 12.330121, 12.441459, 12.290359, 12.406486, 12.352107, 11.862291, 12.346005, 12.603302, 12.483697, 12.597262, 12.352434, 11.841136, 12.559252, 12.693822, 12.073114, 12.080773, 12.088188, 12.169921, 12.36124, 12.620677, 12.641769] |
3883 | 148 | solutions = [14.288834, 13.551237, 13.564131, 13.745311, 13.620339, 13.750088, 13.611093, 13.709763, 13.670902, 13.071603, 13.658932, 13.939627, 13.827959, 13.932638, 13.669482, 13.045913, 13.888161, 14.045136, 13.319103, 13.327884, 13.336799, 13.430042, 13.658435, 13.959817, 13.984111] | ||
3884 | 149 | #solutions = [] | ||
3885 | 145 | for i,event in enumerate(lhe): | 150 | for i,event in enumerate(lhe): |
3886 | 146 | 151 | ||
3887 | 147 | rwgt_data = event.parse_reweight() | 152 | rwgt_data = event.parse_reweight() |
3888 | 148 | #solutions.append(rwgt_data['rwgt_1']) | 153 | #solutions.append(rwgt_data['rwgt_1']) |
3889 | 154 | #continue | ||
3890 | 149 | self.assertTrue('rwgt_1' in rwgt_data) | 155 | self.assertTrue('rwgt_1' in rwgt_data) |
3891 | 150 | self.assertTrue(misc.equal(rwgt_data['rwgt_1'], solutions[i])) | 156 | self.assertTrue(misc.equal(rwgt_data['rwgt_1'], solutions[i])) |
3892 | 151 | #misc.sprint(solutions) | 157 | #misc.sprint(solutions) |
3893 | @@ -239,7 +245,8 @@ | |||
3894 | 239 | if 1: #with misc.stdchannel_redirected(sys.stdout, os.devnull): | 245 | if 1: #with misc.stdchannel_redirected(sys.stdout, os.devnull): |
3895 | 240 | me_cmd.run_cmd('reweight run_01 --from_cards') | 246 | me_cmd.run_cmd('reweight run_01 --from_cards') |
3896 | 241 | 247 | ||
3898 | 242 | solutions = [41.511565, 41.930505, 41.511565, 41.511565, 41.586169, 41.511565, 41.511565, 41.511565, 41.511565, 42.046806, 41.511565, 44.164503, 41.511565, -41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.778368, 41.511565, 42.05448, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.115494, 41.511854, 41.511567, 41.511565, 42.00028, 42.120605, 41.514867, -41.511565, 41.511565, 45.125706, 41.511565, 42.180208, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.997509, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.513926, 41.511565, 41.882499, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 47.532736, 41.511565, 41.809063, 41.511565, 41.511565, 41.511565, 41.927695, 41.511565, 41.511565, 41.555692, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, -41.511565, 41.511565, 42.029675, 41.725129, 41.511565, 41.511565, 41.511778, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.050439, 41.511565, 41.511565, 41.511565, -41.511565, 42.071105, 41.511565, 41.511565] | 248 | #solutions = [41.511565, 41.930505, 41.511565, 41.511565, 41.586169, 41.511565, 41.511565, 41.511565, 41.511565, 42.046806, 41.511565, 44.164503, 41.511565, -41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.778368, 41.511565, 42.05448, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.115494, 41.511854, 41.511567, 41.511565, 42.00028, 42.120605, 41.514867, -41.511565, 41.511565, 45.125706, 41.511565, 42.180208, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.997509, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.513926, 41.511565, 41.882499, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 47.532736, 41.511565, 41.809063, 41.511565, 41.511565, 41.511565, 41.927695, 41.511565, 41.511565, 41.555692, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, -41.511565, 41.511565, 42.029675, 41.725129, 41.511565, 41.511565, 41.511778, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.050439, 41.511565, 41.511565, 41.511565, -41.511565, 42.071105, 41.511565, 41.511565] |
3899 | 249 | solutions = [41.511565, 41.75164, 41.511565, 41.511565, 41.557009, 41.511565, 41.511565, 41.511565, 41.511565, 41.759881, 41.511565, 44.717244, 41.511565, -41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.041827, 41.511565, 41.663092, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.920917, 41.511736, 41.511566, 41.511565, 205.29791, 42.538389, 41.513573, -41.511565, 41.511565, 44.650974, 41.511565, 42.549187, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.431553, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.513265, 41.511565, 43.902643, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 8853.0397, 41.511565, 333.38491, 41.511565, 41.511565, 41.511565, 75.701362, 41.511565, 41.511565, 41.54695, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, -41.511565, 41.511565, 41.454923, 41.53984, 41.511565, 41.511565, 41.511743, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.732627, 41.511565, 41.511565, 41.511565, -41.511565, 41.395865, 41.511565, 41.511565] | ||
3900 | 243 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'rwgt_events_tree_rwgt_1.lhe.gz')) | 250 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'rwgt_events_tree_rwgt_1.lhe.gz')) |
3901 | 244 | lhe_orig = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz')) | 251 | lhe_orig = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz')) |
3902 | 245 | from itertools import izip | 252 | from itertools import izip |
3903 | @@ -249,9 +256,9 @@ | |||
3904 | 249 | i+=1 | 256 | i+=1 |
3905 | 250 | rwgt_data = event_orig.parse_reweight() | 257 | rwgt_data = event_orig.parse_reweight() |
3906 | 251 | #solutions.append(rwgt_data['rwgt_1_tree']) | 258 | #solutions.append(rwgt_data['rwgt_1_tree']) |
3907 | 259 | #continue | ||
3908 | 252 | self.assertTrue('rwgt_1_tree' in rwgt_data) | 260 | self.assertTrue('rwgt_1_tree' in rwgt_data) |
3909 | 253 | self.assertEqual(event.wgt, rwgt_data['rwgt_1_tree']) | 261 | self.assertEqual(event.wgt, rwgt_data['rwgt_1_tree']) |
3910 | 254 | #misc.sprint(abs(event.wgt)) | ||
3911 | 255 | self.assertTrue(misc.equal(event.wgt, solutions[i])) | 262 | self.assertTrue(misc.equal(event.wgt, solutions[i])) |
3912 | 256 | nlo1 = event.parse_nlo_weight() | 263 | nlo1 = event.parse_nlo_weight() |
3913 | 257 | nlo2 = event_orig.parse_nlo_weight() | 264 | nlo2 = event_orig.parse_nlo_weight() |
3914 | @@ -259,6 +266,7 @@ | |||
3915 | 259 | self.assertNotEqual(nlo1.total_wgt, nlo2.total_wgt) | 266 | self.assertNotEqual(nlo1.total_wgt, nlo2.total_wgt) |
3916 | 260 | 267 | ||
3917 | 261 | #misc.sprint(solutions) | 268 | #misc.sprint(solutions) |
3918 | 269 | #raise Exception | ||
3919 | 262 | 270 | ||
3920 | 263 | def test_loop_improved_reweighting(self): | 271 | def test_loop_improved_reweighting(self): |
3921 | 264 | """ check identical re-weighting in ttbar | 272 | """ check identical re-weighting in ttbar |
3922 | @@ -281,8 +289,11 @@ | |||
3923 | 281 | ff.write(cmd_lines) | 289 | ff.write(cmd_lines) |
3924 | 282 | ff.close() | 290 | ff.close() |
3925 | 283 | 291 | ||
3927 | 284 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | 292 | if logger.level <=10: |
3928 | 285 | me_cmd.run_cmd('reweight run_01 --from_cards') | 293 | me_cmd.run_cmd('reweight run_01 --from_cards') |
3929 | 294 | else: | ||
3930 | 295 | with misc.stdchannel_redirected(sys.stdout, os.devnull): | ||
3931 | 296 | me_cmd.run_cmd('reweight run_01 --from_cards') | ||
3932 | 286 | 297 | ||
3933 | 287 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz')) | 298 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz')) |
3934 | 288 | lhe2= lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'rwgt_events_tree_rwgt_1.lhe.gz')) | 299 | lhe2= lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'rwgt_events_tree_rwgt_1.lhe.gz')) |
3935 | @@ -335,11 +346,12 @@ | |||
3936 | 335 | self.assertTrue(misc.equal(rwgt_data['NAME_1'], solutions2[i])) | 346 | self.assertTrue(misc.equal(rwgt_data['NAME_1'], solutions2[i])) |
3937 | 336 | 347 | ||
3938 | 337 | 348 | ||
3940 | 338 | def test_nlo_reweighting_comb(self): | 349 | def old_test_nlo_reweighting_comb(self): |
3941 | 339 | """check that nlo reweighting is working. | 350 | """check that nlo reweighting is working. |
3942 | 340 | The main point is to check the recombination of the weights | 351 | The main point is to check the recombination of the weights |
3943 | 341 | Since the rest should be either checked by the lhe_parser class | 352 | Since the rest should be either checked by the lhe_parser class |
3945 | 342 | or by the various check of the standalone checks | 353 | or by the various check of the standalone checks. |
3946 | 354 | This way of combining weights is now outdated | ||
3947 | 343 | """ | 355 | """ |
3948 | 344 | 356 | ||
3949 | 345 | # create a reweight directory | 357 | # create a reweight directory |
3950 | 346 | 358 | ||
3951 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%COLLIER_interface.f' | |||
3952 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%COLLIER_interface.f 2016-08-07 07:16:07 +0000 | |||
3953 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%COLLIER_interface.f 2020-06-21 12:17:46 +0000 | |||
3954 | @@ -164,8 +164,9 @@ | |||
3955 | 164 | IF (NCALLS_IN_CACHE(I).NE.-1.AND..NOT. ( NCOLLIERCALLS(I) | 164 | IF (NCALLS_IN_CACHE(I).NE.-1.AND..NOT. ( NCOLLIERCALLS(I) |
3956 | 165 | $ .EQ.NCALLS_IN_CACHE(I).OR. ( CTMODERUN.EQ. | 165 | $ .EQ.NCALLS_IN_CACHE(I).OR. ( CTMODERUN.EQ. |
3957 | 166 | $ -1.AND..NOT.COLLIERUSEINTERNALSTABILITYTEST.AND.NROTATIONS | 166 | $ -1.AND..NOT.COLLIERUSEINTERNALSTABILITYTEST.AND.NROTATIONS |
3960 | 167 | $_DP.GT.0.AND.MOD(NCALLS_IN_CACHE(I),2).EQ.0.AND.(NCALLS_IN_CACHE( | 167 | $_DP.GT.0.AND.MOD(NCALLS_IN_CACHE(I),2) |
3961 | 168 | $I)/2).EQ.NCOLLIERCALLS(I) ) ) ) THEN | 168 | $ .EQ.0.AND.(NCALLS_IN_CACHE(I)/2).EQ.NCOLLIERCALLS(I) ) ) ) |
3962 | 169 | $ THEN | ||
3963 | 169 | WRITE(*,*) 'WARNING: A consistency check in MadLoop' | 170 | WRITE(*,*) 'WARNING: A consistency check in MadLoop' |
3964 | 170 | $ //' failed and, for safety, forced MadLoop to' | 171 | $ //' failed and, for safety, forced MadLoop to' |
3965 | 171 | $ //' reinitialize the global cache of COLLIER. Report' | 172 | $ //' reinitialize the global cache of COLLIER. Report' |
3966 | @@ -256,8 +257,8 @@ | |||
3967 | 256 | C The expression below is like taking the absolute value | 257 | C The expression below is like taking the absolute value |
3968 | 257 | C when summing errors linearly | 258 | C when summing errors linearly |
3969 | 258 | C TIRCOEFSERRORS(I,K)=(TIR_COEFS_ERROR(CURR_RANK,ID)/MaxC | 259 | C TIRCOEFSERRORS(I,K)=(TIR_COEFS_ERROR(CURR_RANK,ID)/MaxC |
3972 | 259 | C oefForRank(CURR_RANK))*DCMPLX( ABS(DBLE(TIRCOEFS(I,K))) | 260 | C oefForRank(CURR_RANK))*DCMPLX( |
3973 | 260 | C ,ABS(DIMAG(TIRCOEFS(I,K))) ) | 261 | C ABS(DBLE(TIRCOEFS(I,K))),ABS(DIMAG(TIRCOEFS(I,K))) ) |
3974 | 261 | C But empirically, I observed that retaining the | 262 | C But empirically, I observed that retaining the |
3975 | 262 | C original complex phase leads to slightly more | 263 | C original complex phase leads to slightly more |
3976 | 263 | C accurate estimates | 264 | C accurate estimates |
3977 | @@ -479,8 +480,8 @@ | |||
3978 | 479 | C The expression below is like taking the absolute value | 480 | C The expression below is like taking the absolute value |
3979 | 480 | C when summing errors linearly | 481 | C when summing errors linearly |
3980 | 481 | C TIRCOEFSERRORS(I,K)=(TNtenerr(CURR_RANK)/MaxCoefForRank(C | 482 | C TIRCOEFSERRORS(I,K)=(TNtenerr(CURR_RANK)/MaxCoefForRank(C |
3983 | 482 | C URR_RANK))*DCMPLX( ABS(DBLE(TIRCOEFS(I,K))),ABS(DIMAG(TIR | 483 | C URR_RANK))*DCMPLX( |
3984 | 483 | C COEFS(I,K))) ) | 484 | C ABS(DBLE(TIRCOEFS(I,K))),ABS(DIMAG(TIRCOEFS(I,K))) ) |
3985 | 484 | C But empirically, I observed that retaining the original | 485 | C But empirically, I observed that retaining the original |
3986 | 485 | C complex phase leads to slightly more accurate estimates | 486 | C complex phase leads to slightly more accurate estimates |
3987 | 486 | TIRCOEFSERRORS(I,K)=(TNTENERR(CURR_RANK) | 487 | TIRCOEFSERRORS(I,K)=(TNTENERR(CURR_RANK) |
3988 | @@ -592,8 +593,8 @@ | |||
3989 | 592 | 593 | ||
3990 | 593 | C The common blocks below are to retrieve the necessary | 594 | C The common blocks below are to retrieve the necessary |
3991 | 594 | C information about | 595 | C information about |
3994 | 595 | C MadLoop running mode and store it in the sCOLLIER_CACHE_RELEVANT_ | 596 | C MadLoop running mode and store it in the |
3995 | 596 | C PARAMS common block. | 597 | C sCOLLIER_CACHE_RELEVANT_PARAMS common block. |
3996 | 597 | 598 | ||
3997 | 598 | INCLUDE 'MadLoopParams.inc' | 599 | INCLUDE 'MadLoopParams.inc' |
3998 | 599 | INCLUDE 'unique_id.inc' | 600 | INCLUDE 'unique_id.inc' |
3999 | @@ -662,8 +663,8 @@ | |||
4000 | 662 | USERHEL_BU = USERHEL | 663 | USERHEL_BU = USERHEL |
4001 | 663 | SQSO_TARGET_BU = SQSO_TARGET | 664 | SQSO_TARGET_BU = SQSO_TARGET |
4002 | 664 | COLLIERMODE_BU = COLLIERMODE | 665 | COLLIERMODE_BU = COLLIERMODE |
4005 | 665 | COLLIERUSEINTERNALSTABILITYTEST_BU = COLLIERUSEINTERNALSTABILIT | 666 | COLLIERUSEINTERNALSTABILITYTEST_BU = |
4006 | 666 | $YTEST | 667 | $ COLLIERUSEINTERNALSTABILITYTEST |
4007 | 667 | CTMODERUN_BU = CTMODERUN | 668 | CTMODERUN_BU = CTMODERUN |
4008 | 668 | CALL SWITCHONCACHE_CLL((UNIQUE_ID-1)*4+1) | 669 | CALL SWITCHONCACHE_CLL((UNIQUE_ID-1)*4+1) |
4009 | 669 | COLLIER_CACHE_ACTIVE = 1 | 670 | COLLIER_CACHE_ACTIVE = 1 |
4010 | @@ -710,8 +711,8 @@ | |||
4011 | 710 | USERHEL_BU = USERHEL | 711 | USERHEL_BU = USERHEL |
4012 | 711 | SQSO_TARGET_BU = SQSO_TARGET | 712 | SQSO_TARGET_BU = SQSO_TARGET |
4013 | 712 | COLLIERMODE_BU = COLLIERMODE | 713 | COLLIERMODE_BU = COLLIERMODE |
4016 | 713 | COLLIERUSEINTERNALSTABILITYTEST_BU = COLLIERUSEINTERNALSTABILIT | 714 | COLLIERUSEINTERNALSTABILITYTEST_BU = |
4017 | 714 | $YTEST | 715 | $ COLLIERUSEINTERNALSTABILITYTEST |
4018 | 715 | CTMODERUN_BU = CTMODERUN | 716 | CTMODERUN_BU = CTMODERUN |
4019 | 716 | IF (COLLIERGLOBALCACHE.EQ.-1) THEN | 717 | IF (COLLIERGLOBALCACHE.EQ.-1) THEN |
4020 | 717 | CALL INITCACHESYSTEM_CLL(N_CACHES*NPROCS,MAXNEXTERNAL) | 718 | CALL INITCACHESYSTEM_CLL(N_CACHES*NPROCS,MAXNEXTERNAL) |
4021 | 718 | 719 | ||
4022 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%CT_interface.f' | |||
4023 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%CT_interface.f 2016-08-07 07:16:07 +0000 | |||
4024 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%CT_interface.f 2020-06-21 12:17:46 +0000 | |||
4025 | @@ -663,8 +663,8 @@ | |||
4026 | 663 | C Determine it uses qp or not | 663 | C Determine it uses qp or not |
4027 | 664 | DOING_QP = (CTMODE.GE.4) | 664 | DOING_QP = (CTMODE.GE.4) |
4028 | 665 | 665 | ||
4031 | 666 | IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED).OR.GOODAMP(SQUAREDSOIND | 666 | IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED) |
4032 | 667 | $EX,LOOPNUM)) THEN | 667 | $ .OR.GOODAMP(SQUAREDSOINDEX,LOOPNUM)) THEN |
4033 | 668 | WE(1)=W1 | 668 | WE(1)=W1 |
4034 | 669 | WE(2)=W2 | 669 | WE(2)=W2 |
4035 | 670 | WE(3)=W3 | 670 | WE(3)=W3 |
4036 | 671 | 671 | ||
4037 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f' | |||
4038 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f 2018-11-08 22:24:49 +0000 | |||
4039 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f 2020-06-21 12:17:46 +0000 | |||
4040 | @@ -54,8 +54,8 @@ | |||
4041 | 54 | INTEGER LAST_LIB_USED | 54 | INTEGER LAST_LIB_USED |
4042 | 55 | DATA LAST_LIB_USED/-1/ | 55 | DATA LAST_LIB_USED/-1/ |
4043 | 56 | 56 | ||
4046 | 57 | COMPLEX*16 TIRCOEFS(0:LOOPMAXCOEFS-1,3),TIRCOEFSERRORS(0:LOOPMAXC | 57 | COMPLEX*16 TIRCOEFS(0:LOOPMAXCOEFS-1,3) |
4047 | 58 | $OEFS-1,3) | 58 | $ ,TIRCOEFSERRORS(0:LOOPMAXCOEFS-1,3) |
4048 | 59 | COMPLEX*16 PJCOEFS(0:LOOPMAXCOEFS-1,3) | 59 | COMPLEX*16 PJCOEFS(0:LOOPMAXCOEFS-1,3) |
4049 | 60 | C | 60 | C |
4050 | 61 | C EXTERNAL FUNCTIONS | 61 | C EXTERNAL FUNCTIONS |
4051 | @@ -398,8 +398,9 @@ | |||
4052 | 398 | C | 398 | C |
4053 | 399 | INCLUDE 'MadLoopParams.inc' | 399 | INCLUDE 'MadLoopParams.inc' |
4054 | 400 | INCLUDE 'process_info.inc' | 400 | INCLUDE 'process_info.inc' |
4057 | 401 | C Change the list 'LOOPLIBS_QPAVAILABLE' in loop_matrix_standalone. | 401 | C Change the list 'LOOPLIBS_QPAVAILABLE' in |
4058 | 402 | C inc to change the list of QPTools availables | 402 | C loop_matrix_standalone.inc to change the list of QPTools |
4059 | 403 | C availables | ||
4060 | 403 | LOGICAL QP_TOOLS_AVAILABLE | 404 | LOGICAL QP_TOOLS_AVAILABLE |
4061 | 404 | INTEGER INDEX_QP_TOOLS(QP_NLOOPLIB+1) | 405 | INTEGER INDEX_QP_TOOLS(QP_NLOOPLIB+1) |
4062 | 405 | COMMON/LOOP_TOOLS/QP_TOOLS_AVAILABLE,INDEX_QP_TOOLS | 406 | COMMON/LOOP_TOOLS/QP_TOOLS_AVAILABLE,INDEX_QP_TOOLS |
4063 | 406 | 407 | ||
4064 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f' | |||
4065 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f 2018-05-18 12:22:47 +0000 | |||
4066 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f 2020-06-21 12:17:46 +0000 | |||
4067 | @@ -461,8 +461,8 @@ | |||
4068 | 461 | C BEGIN CODE | 461 | C BEGIN CODE |
4069 | 462 | C | 462 | C |
4070 | 463 | DO I=1,NSO | 463 | DO I=1,NSO |
4073 | 464 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I)+AMPSPLITORDERS(ORDERI | 464 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I) |
4074 | 465 | $NDEXB,I) | 465 | $ +AMPSPLITORDERS(ORDERINDEXB,I) |
4075 | 466 | ENDDO | 466 | ENDDO |
4076 | 467 | SQSOINDEX=SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) | 467 | SQSOINDEX=SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) |
4077 | 468 | END | 468 | END |
4078 | @@ -556,8 +556,8 @@ | |||
4079 | 556 | RETURN | 556 | RETURN |
4080 | 557 | ENDIF | 557 | ENDIF |
4081 | 558 | 558 | ||
4084 | 559 | WRITE(*,*) 'ERROR:: Stopping function GET_SQUARED_ORDERS_FOR_SOIN' | 559 | WRITE(*,*) 'ERROR:: Stopping function' |
4085 | 560 | $ //'DEX' | 560 | $ //' GET_SQUARED_ORDERS_FOR_SOINDEX' |
4086 | 561 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX | 561 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX |
4087 | 562 | STOP | 562 | STOP |
4088 | 563 | 563 | ||
4089 | 564 | 564 | ||
4090 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%check_sa_born_splitOrders.f' | |||
4091 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%check_sa_born_splitOrders.f 2016-03-31 10:53:12 +0000 | |||
4092 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%check_sa_born_splitOrders.f 2020-06-21 12:17:46 +0000 | |||
4093 | @@ -170,8 +170,8 @@ | |||
4094 | 170 | C CALL SMATRIX(P,MATELEM) | 170 | C CALL SMATRIX(P,MATELEM) |
4095 | 171 | C | 171 | C |
4096 | 172 | C write (*,*) "-------------------------------------------------" | 172 | C write (*,*) "-------------------------------------------------" |
4099 | 173 | C write (*,*) "Matrix element = ", MATELEM, " GeV^",-(2*nexternal-8) | 173 | C write (*,*) "Matrix element = ", MATELEM, " |
4100 | 174 | C | 174 | C GeV^",-(2*nexternal-8) |
4101 | 175 | C write (*,*) "-------------------------------------------------" | 175 | C write (*,*) "-------------------------------------------------" |
4102 | 176 | 176 | ||
4103 | 177 | END | 177 | END |
4104 | 178 | 178 | ||
4105 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f' | |||
4106 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2018-11-08 22:24:49 +0000 | |||
4107 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2020-06-21 12:17:46 +0000 | |||
4108 | @@ -78,8 +78,8 @@ | |||
4109 | 78 | INTEGER NSQUAREDSOP1 | 78 | INTEGER NSQUAREDSOP1 |
4110 | 79 | PARAMETER (NSQUAREDSOP1=NSQUAREDSO+1) | 79 | PARAMETER (NSQUAREDSOP1=NSQUAREDSO+1) |
4111 | 80 | C The total number of loop reduction libraries | 80 | C The total number of loop reduction libraries |
4114 | 81 | C At present, there are only CutTools,PJFry++,IREGI,Golem95,Samurai | 81 | C At present, there are only |
4115 | 82 | C , Ninja and COLLIER | 82 | C CutTools,PJFry++,IREGI,Golem95,Samurai, Ninja and COLLIER |
4116 | 83 | INTEGER NLOOPLIB | 83 | INTEGER NLOOPLIB |
4117 | 84 | PARAMETER (NLOOPLIB=7) | 84 | PARAMETER (NLOOPLIB=7) |
4118 | 85 | C Only CutTools or possibly Ninja (if installed with qp support) | 85 | C Only CutTools or possibly Ninja (if installed with qp support) |
4119 | @@ -404,14 +404,15 @@ | |||
4120 | 404 | C reading the parameters | 404 | C reading the parameters |
4121 | 405 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, | 405 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4122 | 406 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 406 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4125 | 407 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, COLLIER_IR_POLE_COMPU | 407 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, |
4126 | 408 | $TATION_CHOICE | 408 | $ COLLIER_IR_POLE_COMPUTATION_CHOICE |
4127 | 409 | DATA FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION | 409 | DATA FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION |
4128 | 410 | $ ,FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION/.FALSE.,.FALSE./ | 410 | $ ,FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION/.FALSE.,.FALSE./ |
4133 | 411 | COMMON/COLLIERPOLESFORCEDCHOICE/FORCED_CHOICE_OF_COLLIER_UV_POLE_ | 411 | COMMON/COLLIERPOLESFORCEDCHOICE |
4134 | 412 | $COMPUTATION, FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 412 | $ /FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4135 | 413 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE,COLLIER_IR_POLE_COMPUTATION_ | 413 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4136 | 414 | $CHOICE | 414 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE |
4137 | 415 | $ ,COLLIER_IR_POLE_COMPUTATION_CHOICE | ||
4138 | 415 | 416 | ||
4139 | 416 | C This variable controls the general initialization which is | 417 | C This variable controls the general initialization which is |
4140 | 417 | C *common* between all MadLoop SubProcesses. | 418 | C *common* between all MadLoop SubProcesses. |
4141 | @@ -880,8 +881,8 @@ | |||
4142 | 880 | $ +P(2,2))**2-(P(3,1)+P(3,2))**2)) | 881 | $ +P(2,2))**2-(P(3,1)+P(3,2))**2)) |
4143 | 881 | 882 | ||
4144 | 882 | CTCALL_REQ_SO_DONE=.FALSE. | 883 | CTCALL_REQ_SO_DONE=.FALSE. |
4147 | 883 | FILTER_SO = (.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.(SQSO_TARG | 884 | FILTER_SO = (.NOT.CHECKPHASE) |
4148 | 884 | $ET.NE.-1) | 885 | $ .AND.HELDOUBLECHECKED.AND.(SQSO_TARGET.NE.-1) |
4149 | 885 | 886 | ||
4150 | 886 | DO I=1,NLOOPGROUPS | 887 | DO I=1,NLOOPGROUPS |
4151 | 887 | DO J=0,LOOPMAXCOEFS-1 | 888 | DO J=0,LOOPMAXCOEFS-1 |
4152 | @@ -920,13 +921,14 @@ | |||
4153 | 920 | ENDIF | 921 | ENDIF |
4154 | 921 | 922 | ||
4155 | 922 | DO H=1,NCOMB | 923 | DO H=1,NCOMB |
4159 | 923 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1).AND.(CHECKPHASE.OR.( | 924 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1) |
4160 | 924 | $.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H).GT.-HELOFFSET.AND.GOODHEL(H) | 925 | $ .AND.(CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H) |
4161 | 925 | $ .NE.0)))) THEN | 926 | $ .GT.-HELOFFSET.AND.GOODHEL(H).NE.0)))) THEN |
4162 | 926 | 927 | ||
4163 | 927 | C Handle the possible requirement of specific polarizations | 928 | C Handle the possible requirement of specific polarizations |
4166 | 928 | IF ((.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.POLARIZATIONS( | 929 | IF ((.NOT.CHECKPHASE) |
4167 | 929 | $0,0).EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | 930 | $ .AND.HELDOUBLECHECKED.AND.POLARIZATIONS(0,0) |
4168 | 931 | $ .EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | ||
4169 | 930 | CYCLE | 932 | CYCLE |
4170 | 931 | ENDIF | 933 | ENDIF |
4171 | 932 | 934 | ||
4172 | @@ -1164,8 +1166,8 @@ | |||
4173 | 1164 | C Of course if it is one, then we do not need to do | 1166 | C Of course if it is one, then we do not need to do |
4174 | 1165 | C anything (because with HELINITSTARTOVER=.FALSE. we only | 1167 | C anything (because with HELINITSTARTOVER=.FALSE. we only |
4175 | 1166 | C support exactly identical Hels.) | 1168 | C support exactly identical Hels.) |
4178 | 1167 | IF(GOODHEL(HELPICKED).GT.-HELOFFSET.AND.GOODHEL(HELPICKED) | 1169 | IF(GOODHEL(HELPICKED).GT. |
4179 | 1168 | $ .NE.1) THEN | 1170 | $ -HELOFFSET.AND.GOODHEL(HELPICKED).NE.1) THEN |
4180 | 1169 | NEWHELREF=-1 | 1171 | NEWHELREF=-1 |
4181 | 1170 | DO H=1,NCOMB | 1172 | DO H=1,NCOMB |
4182 | 1171 | IF (GOODHEL(H).EQ.(-HELOFFSET-HELPICKED)) THEN | 1173 | IF (GOODHEL(H).EQ.(-HELOFFSET-HELPICKED)) THEN |
4183 | @@ -1359,16 +1361,18 @@ | |||
4184 | 1359 | 1361 | ||
4185 | 1360 | CTMODE=BASIC_CT_MODE | 1362 | CTMODE=BASIC_CT_MODE |
4186 | 1361 | 1363 | ||
4189 | 1362 | IF(.NOT.EVAL_DONE(3).AND. ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE | 1364 | IF(.NOT.EVAL_DONE(3).AND. |
4190 | 1363 | $.1).OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.1)) ) THEN | 1365 | $ ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE.1) |
4191 | 1366 | $ .OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.1)) ) THEN | ||
4192 | 1364 | EVAL_DONE(3)=.TRUE. | 1367 | EVAL_DONE(3)=.TRUE. |
4193 | 1365 | CALL ROTATE_PS(PS,P,1) | 1368 | CALL ROTATE_PS(PS,P,1) |
4194 | 1366 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,1) | 1369 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,1) |
4195 | 1367 | GOTO 200 | 1370 | GOTO 200 |
4196 | 1368 | ENDIF | 1371 | ENDIF |
4197 | 1369 | 1372 | ||
4200 | 1370 | IF(.NOT.EVAL_DONE(4).AND. ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE | 1373 | IF(.NOT.EVAL_DONE(4).AND. |
4201 | 1371 | $.2).OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.2)) ) THEN | 1374 | $ ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE.2) |
4202 | 1375 | $ .OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.2)) ) THEN | ||
4203 | 1372 | EVAL_DONE(4)=.TRUE. | 1376 | EVAL_DONE(4)=.TRUE. |
4204 | 1373 | CALL ROTATE_PS(PS,P,2) | 1377 | CALL ROTATE_PS(PS,P,2) |
4205 | 1374 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,2) | 1378 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,2) |
4206 | @@ -1924,8 +1928,8 @@ | |||
4207 | 1924 | C When using COLLIER with the internal stability test, the first | 1928 | C When using COLLIER with the internal stability test, the first |
4208 | 1925 | C evaluation is typically more reliable so we do not want to | 1929 | C evaluation is typically more reliable so we do not want to |
4209 | 1926 | C use the average but rather the first evaluation. | 1930 | C use the average but rather the first evaluation. |
4212 | 1927 | IF (MLREDUCTIONLIB(I_LIB).EQ.7.AND.COLLIERUSEINTERNALSTABILITYT | 1931 | IF (MLREDUCTIONLIB(I_LIB) |
4213 | 1928 | $EST) THEN | 1932 | $ .EQ.7.AND.COLLIERUSEINTERNALSTABILITYTEST) THEN |
4214 | 1929 | DO I=1,3 | 1933 | DO I=1,3 |
4215 | 1930 | ESTIMATE(I,K) = FULLLIST(I,K,1) | 1934 | ESTIMATE(I,K) = FULLLIST(I,K,1) |
4216 | 1931 | ENDDO | 1935 | ENDDO |
4217 | @@ -2070,8 +2074,8 @@ | |||
4218 | 2070 | 1009 CONTINUE | 2074 | 1009 CONTINUE |
4219 | 2071 | ENDDO | 2075 | ENDDO |
4220 | 2072 | 2076 | ||
4223 | 2073 | WRITE(*,*) 'ERROR:: Stopping function ML5SOINDEX_FOR_SQUARED_ORDE' | 2077 | WRITE(*,*) 'ERROR:: Stopping function' |
4224 | 2074 | $ //'RS' | 2078 | $ //' ML5SOINDEX_FOR_SQUARED_ORDERS' |
4225 | 2075 | WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO) | 2079 | WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO) |
4226 | 2076 | STOP | 2080 | STOP |
4227 | 2077 | 2081 | ||
4228 | @@ -2170,8 +2174,8 @@ | |||
4229 | 2170 | C BEGIN CODE | 2174 | C BEGIN CODE |
4230 | 2171 | C | 2175 | C |
4231 | 2172 | DO I=1,NSO | 2176 | DO I=1,NSO |
4234 | 2173 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I)+AMPSPLITORDERS(ORDERI | 2177 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I) |
4235 | 2174 | $NDEXB,I) | 2178 | $ +AMPSPLITORDERS(ORDERINDEXB,I) |
4236 | 2175 | ENDDO | 2179 | ENDDO |
4237 | 2176 | ML5SQSOINDEX=ML5SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) | 2180 | ML5SQSOINDEX=ML5SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) |
4238 | 2177 | END | 2181 | END |
4239 | @@ -2209,8 +2213,8 @@ | |||
4240 | 2209 | RETURN | 2213 | RETURN |
4241 | 2210 | ENDIF | 2214 | ENDIF |
4242 | 2211 | 2215 | ||
4245 | 2212 | WRITE(*,*) 'ERROR:: Stopping function ML5GET_SQUARED_ORDERS_FOR_S' | 2216 | WRITE(*,*) 'ERROR:: Stopping function' |
4246 | 2213 | $ //'OINDEX' | 2217 | $ //' ML5GET_SQUARED_ORDERS_FOR_SOINDEX' |
4247 | 2214 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX | 2218 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX |
4248 | 2215 | STOP | 2219 | STOP |
4249 | 2216 | 2220 | ||
4250 | @@ -2249,8 +2253,8 @@ | |||
4251 | 2249 | RETURN | 2253 | RETURN |
4252 | 2250 | ENDIF | 2254 | ENDIF |
4253 | 2251 | 2255 | ||
4256 | 2252 | WRITE(*,*) 'ERROR:: Stopping function ML5GET_ORDERS_FOR_AMPSOINDE' | 2256 | WRITE(*,*) 'ERROR:: Stopping function' |
4257 | 2253 | $ //'X' | 2257 | $ //' ML5GET_ORDERS_FOR_AMPSOINDEX' |
4258 | 2254 | WRITE(*,*) 'Could not find amplitude split orders index ',SOINDEX | 2258 | WRITE(*,*) 'Could not find amplitude split orders index ',SOINDEX |
4259 | 2255 | STOP | 2259 | STOP |
4260 | 2256 | 2260 | ||
4261 | @@ -2315,12 +2319,13 @@ | |||
4262 | 2315 | 2319 | ||
4263 | 2316 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, | 2320 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4264 | 2317 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2321 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4271 | 2318 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, COLLIER_IR_POLE_COMPU | 2322 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, |
4272 | 2319 | $TATION_CHOICE | 2323 | $ COLLIER_IR_POLE_COMPUTATION_CHOICE |
4273 | 2320 | COMMON/COLLIERPOLESFORCEDCHOICE/FORCED_CHOICE_OF_COLLIER_UV_POLE_ | 2324 | COMMON/COLLIERPOLESFORCEDCHOICE |
4274 | 2321 | $COMPUTATION, FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2325 | $ /FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4275 | 2322 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE,COLLIER_IR_POLE_COMPUTATION_ | 2326 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4276 | 2323 | $CHOICE | 2327 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE |
4277 | 2328 | $ ,COLLIER_IR_POLE_COMPUTATION_CHOICE | ||
4278 | 2324 | 2329 | ||
4279 | 2325 | COLLIERCOMPUTEUVPOLES = ONOFF | 2330 | COLLIERCOMPUTEUVPOLES = ONOFF |
4280 | 2326 | C This is just so that if we read the param again, we don't | 2331 | C This is just so that if we read the param again, we don't |
4281 | @@ -2342,12 +2347,13 @@ | |||
4282 | 2342 | 2347 | ||
4283 | 2343 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, | 2348 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4284 | 2344 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2349 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4291 | 2345 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, COLLIER_IR_POLE_COMPU | 2350 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, |
4292 | 2346 | $TATION_CHOICE | 2351 | $ COLLIER_IR_POLE_COMPUTATION_CHOICE |
4293 | 2347 | COMMON/COLLIERPOLESFORCEDCHOICE/FORCED_CHOICE_OF_COLLIER_UV_POLE_ | 2352 | COMMON/COLLIERPOLESFORCEDCHOICE |
4294 | 2348 | $COMPUTATION, FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2353 | $ /FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4295 | 2349 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE,COLLIER_IR_POLE_COMPUTATION_ | 2354 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4296 | 2350 | $CHOICE | 2355 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE |
4297 | 2356 | $ ,COLLIER_IR_POLE_COMPUTATION_CHOICE | ||
4298 | 2351 | 2357 | ||
4299 | 2352 | COLLIERCOMPUTEIRPOLES = ONOFF | 2358 | COLLIERCOMPUTEIRPOLES = ONOFF |
4300 | 2353 | C This is just so that if we read the param again, we don't | 2359 | C This is just so that if we read the param again, we don't |
4301 | 2354 | 2360 | ||
4302 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f' | |||
4303 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f 2017-07-07 10:47:20 +0000 | |||
4304 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f 2020-06-21 12:17:46 +0000 | |||
4305 | @@ -268,13 +268,14 @@ | |||
4306 | 268 | 268 | ||
4307 | 269 | DPW_COPIED = .FALSE. | 269 | DPW_COPIED = .FALSE. |
4308 | 270 | DO H=1,NCOMB | 270 | DO H=1,NCOMB |
4312 | 271 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1).AND.(CHECKPHASE.OR.( | 271 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1) |
4313 | 272 | $.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H).GT.-HELOFFSET.AND.GOODHEL(H) | 272 | $ .AND.(CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H) |
4314 | 273 | $ .NE.0)))) THEN | 273 | $ .GT.-HELOFFSET.AND.GOODHEL(H).NE.0)))) THEN |
4315 | 274 | 274 | ||
4316 | 275 | C Handle the possible requirement of specific polarizations | 275 | C Handle the possible requirement of specific polarizations |
4319 | 276 | IF ((.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.POLARIZATIONS( | 276 | IF ((.NOT.CHECKPHASE) |
4320 | 277 | $0,0).EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | 277 | $ .AND.HELDOUBLECHECKED.AND.POLARIZATIONS(0,0) |
4321 | 278 | $ .EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | ||
4322 | 278 | CYCLE | 279 | CYCLE |
4323 | 279 | ENDIF | 280 | ENDIF |
4324 | 280 | 281 | ||
4325 | 281 | 282 | ||
4326 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%polynomial.f' | |||
4327 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%polynomial.f 2016-04-06 18:45:52 +0000 | |||
4328 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%polynomial.f 2020-06-21 12:17:46 +0000 | |||
4329 | @@ -113,8 +113,8 @@ | |||
4330 | 113 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO | 113 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO |
4331 | 114 | $ ,KIND=8) | 114 | $ ,KIND=8) |
4332 | 115 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 | 115 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 |
4335 | 116 | CONST(ML5SOINDEX_FOR_BORN_AMP(I))=CONST(ML5SOINDEX_FOR_BORN_AMP | 116 | CONST(ML5SOINDEX_FOR_BORN_AMP(I)) |
4336 | 117 | $(I))+CFTOT*CONJG(AMP(I)) | 117 | $ =CONST(ML5SOINDEX_FOR_BORN_AMP(I))+CFTOT*CONJG(AMP(I)) |
4337 | 118 | ENDDO | 118 | ENDDO |
4338 | 119 | 119 | ||
4339 | 120 | DO I=1,NAMPSO | 120 | DO I=1,NAMPSO |
4340 | @@ -232,8 +232,8 @@ | |||
4341 | 232 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO | 232 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO |
4342 | 233 | $ ,KIND=16) | 233 | $ ,KIND=16) |
4343 | 234 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 | 234 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 |
4346 | 235 | CONST(ML5SOINDEX_FOR_BORN_AMP(I))=CONST(ML5SOINDEX_FOR_BORN_AMP | 235 | CONST(ML5SOINDEX_FOR_BORN_AMP(I)) |
4347 | 236 | $(I))+CFTOT*CONJG(AMP(I)) | 236 | $ =CONST(ML5SOINDEX_FOR_BORN_AMP(I))+CFTOT*CONJG(AMP(I)) |
4348 | 237 | ENDDO | 237 | ENDDO |
4349 | 238 | 238 | ||
4350 | 239 | DO I=1,NAMPSO | 239 | DO I=1,NAMPSO |
4351 | 240 | 240 | ||
4352 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%COLLIER_interface.f' | |||
4353 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%COLLIER_interface.f 2016-08-07 07:16:07 +0000 | |||
4354 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%COLLIER_interface.f 2020-06-21 12:17:46 +0000 | |||
4355 | @@ -164,8 +164,9 @@ | |||
4356 | 164 | IF (NCALLS_IN_CACHE(I).NE.-1.AND..NOT. ( NCOLLIERCALLS(I) | 164 | IF (NCALLS_IN_CACHE(I).NE.-1.AND..NOT. ( NCOLLIERCALLS(I) |
4357 | 165 | $ .EQ.NCALLS_IN_CACHE(I).OR. ( CTMODERUN.EQ. | 165 | $ .EQ.NCALLS_IN_CACHE(I).OR. ( CTMODERUN.EQ. |
4358 | 166 | $ -1.AND..NOT.COLLIERUSEINTERNALSTABILITYTEST.AND.NROTATIONS | 166 | $ -1.AND..NOT.COLLIERUSEINTERNALSTABILITYTEST.AND.NROTATIONS |
4361 | 167 | $_DP.GT.0.AND.MOD(NCALLS_IN_CACHE(I),2).EQ.0.AND.(NCALLS_IN_CACHE( | 167 | $_DP.GT.0.AND.MOD(NCALLS_IN_CACHE(I),2) |
4362 | 168 | $I)/2).EQ.NCOLLIERCALLS(I) ) ) ) THEN | 168 | $ .EQ.0.AND.(NCALLS_IN_CACHE(I)/2).EQ.NCOLLIERCALLS(I) ) ) ) |
4363 | 169 | $ THEN | ||
4364 | 169 | WRITE(*,*) 'WARNING: A consistency check in MadLoop' | 170 | WRITE(*,*) 'WARNING: A consistency check in MadLoop' |
4365 | 170 | $ //' failed and, for safety, forced MadLoop to' | 171 | $ //' failed and, for safety, forced MadLoop to' |
4366 | 171 | $ //' reinitialize the global cache of COLLIER. Report' | 172 | $ //' reinitialize the global cache of COLLIER. Report' |
4367 | @@ -256,8 +257,8 @@ | |||
4368 | 256 | C The expression below is like taking the absolute value | 257 | C The expression below is like taking the absolute value |
4369 | 257 | C when summing errors linearly | 258 | C when summing errors linearly |
4370 | 258 | C TIRCOEFSERRORS(I,K)=(TIR_COEFS_ERROR(CURR_RANK,ID)/MaxC | 259 | C TIRCOEFSERRORS(I,K)=(TIR_COEFS_ERROR(CURR_RANK,ID)/MaxC |
4373 | 259 | C oefForRank(CURR_RANK))*DCMPLX( ABS(DBLE(TIRCOEFS(I,K))) | 260 | C oefForRank(CURR_RANK))*DCMPLX( |
4374 | 260 | C ,ABS(DIMAG(TIRCOEFS(I,K))) ) | 261 | C ABS(DBLE(TIRCOEFS(I,K))),ABS(DIMAG(TIRCOEFS(I,K))) ) |
4375 | 261 | C But empirically, I observed that retaining the | 262 | C But empirically, I observed that retaining the |
4376 | 262 | C original complex phase leads to slightly more | 263 | C original complex phase leads to slightly more |
4377 | 263 | C accurate estimates | 264 | C accurate estimates |
4378 | @@ -479,8 +480,8 @@ | |||
4379 | 479 | C The expression below is like taking the absolute value | 480 | C The expression below is like taking the absolute value |
4380 | 480 | C when summing errors linearly | 481 | C when summing errors linearly |
4381 | 481 | C TIRCOEFSERRORS(I,K)=(TNtenerr(CURR_RANK)/MaxCoefForRank(C | 482 | C TIRCOEFSERRORS(I,K)=(TNtenerr(CURR_RANK)/MaxCoefForRank(C |
4384 | 482 | C URR_RANK))*DCMPLX( ABS(DBLE(TIRCOEFS(I,K))),ABS(DIMAG(TIR | 483 | C URR_RANK))*DCMPLX( |
4385 | 483 | C COEFS(I,K))) ) | 484 | C ABS(DBLE(TIRCOEFS(I,K))),ABS(DIMAG(TIRCOEFS(I,K))) ) |
4386 | 484 | C But empirically, I observed that retaining the original | 485 | C But empirically, I observed that retaining the original |
4387 | 485 | C complex phase leads to slightly more accurate estimates | 486 | C complex phase leads to slightly more accurate estimates |
4388 | 486 | TIRCOEFSERRORS(I,K)=(TNTENERR(CURR_RANK) | 487 | TIRCOEFSERRORS(I,K)=(TNTENERR(CURR_RANK) |
4389 | @@ -592,8 +593,8 @@ | |||
4390 | 592 | 593 | ||
4391 | 593 | C The common blocks below are to retrieve the necessary | 594 | C The common blocks below are to retrieve the necessary |
4392 | 594 | C information about | 595 | C information about |
4395 | 595 | C MadLoop running mode and store it in the sCOLLIER_CACHE_RELEVANT_ | 596 | C MadLoop running mode and store it in the |
4396 | 596 | C PARAMS common block. | 597 | C sCOLLIER_CACHE_RELEVANT_PARAMS common block. |
4397 | 597 | 598 | ||
4398 | 598 | INCLUDE 'MadLoopParams.inc' | 599 | INCLUDE 'MadLoopParams.inc' |
4399 | 599 | INCLUDE 'unique_id.inc' | 600 | INCLUDE 'unique_id.inc' |
4400 | @@ -662,8 +663,8 @@ | |||
4401 | 662 | USERHEL_BU = USERHEL | 663 | USERHEL_BU = USERHEL |
4402 | 663 | SQSO_TARGET_BU = SQSO_TARGET | 664 | SQSO_TARGET_BU = SQSO_TARGET |
4403 | 664 | COLLIERMODE_BU = COLLIERMODE | 665 | COLLIERMODE_BU = COLLIERMODE |
4406 | 665 | COLLIERUSEINTERNALSTABILITYTEST_BU = COLLIERUSEINTERNALSTABILIT | 666 | COLLIERUSEINTERNALSTABILITYTEST_BU = |
4407 | 666 | $YTEST | 667 | $ COLLIERUSEINTERNALSTABILITYTEST |
4408 | 667 | CTMODERUN_BU = CTMODERUN | 668 | CTMODERUN_BU = CTMODERUN |
4409 | 668 | CALL SWITCHONCACHE_CLL((UNIQUE_ID-1)*4+1) | 669 | CALL SWITCHONCACHE_CLL((UNIQUE_ID-1)*4+1) |
4410 | 669 | COLLIER_CACHE_ACTIVE = 1 | 670 | COLLIER_CACHE_ACTIVE = 1 |
4411 | @@ -710,8 +711,8 @@ | |||
4412 | 710 | USERHEL_BU = USERHEL | 711 | USERHEL_BU = USERHEL |
4413 | 711 | SQSO_TARGET_BU = SQSO_TARGET | 712 | SQSO_TARGET_BU = SQSO_TARGET |
4414 | 712 | COLLIERMODE_BU = COLLIERMODE | 713 | COLLIERMODE_BU = COLLIERMODE |
4417 | 713 | COLLIERUSEINTERNALSTABILITYTEST_BU = COLLIERUSEINTERNALSTABILIT | 714 | COLLIERUSEINTERNALSTABILITYTEST_BU = |
4418 | 714 | $YTEST | 715 | $ COLLIERUSEINTERNALSTABILITYTEST |
4419 | 715 | CTMODERUN_BU = CTMODERUN | 716 | CTMODERUN_BU = CTMODERUN |
4420 | 716 | IF (COLLIERGLOBALCACHE.EQ.-1) THEN | 717 | IF (COLLIERGLOBALCACHE.EQ.-1) THEN |
4421 | 717 | CALL INITCACHESYSTEM_CLL(N_CACHES*NPROCS,MAXNEXTERNAL) | 718 | CALL INITCACHESYSTEM_CLL(N_CACHES*NPROCS,MAXNEXTERNAL) |
4422 | 718 | 719 | ||
4423 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%CT_interface.f' | |||
4424 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%CT_interface.f 2016-08-07 07:16:07 +0000 | |||
4425 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%CT_interface.f 2020-06-21 12:17:46 +0000 | |||
4426 | @@ -663,8 +663,8 @@ | |||
4427 | 663 | C Determine it uses qp or not | 663 | C Determine it uses qp or not |
4428 | 664 | DOING_QP = (CTMODE.GE.4) | 664 | DOING_QP = (CTMODE.GE.4) |
4429 | 665 | 665 | ||
4432 | 666 | IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED).OR.GOODAMP(SQUAREDSOIND | 666 | IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED) |
4433 | 667 | $EX,LOOPNUM)) THEN | 667 | $ .OR.GOODAMP(SQUAREDSOINDEX,LOOPNUM)) THEN |
4434 | 668 | WE(1)=W1 | 668 | WE(1)=W1 |
4435 | 669 | WE(2)=W2 | 669 | WE(2)=W2 |
4436 | 670 | WE(3)=W3 | 670 | WE(3)=W3 |
4437 | 671 | 671 | ||
4438 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f' | |||
4439 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f 2018-11-08 22:24:49 +0000 | |||
4440 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f 2020-06-21 12:17:46 +0000 | |||
4441 | @@ -54,8 +54,8 @@ | |||
4442 | 54 | INTEGER LAST_LIB_USED | 54 | INTEGER LAST_LIB_USED |
4443 | 55 | DATA LAST_LIB_USED/-1/ | 55 | DATA LAST_LIB_USED/-1/ |
4444 | 56 | 56 | ||
4447 | 57 | COMPLEX*16 TIRCOEFS(0:LOOPMAXCOEFS-1,3),TIRCOEFSERRORS(0:LOOPMAXC | 57 | COMPLEX*16 TIRCOEFS(0:LOOPMAXCOEFS-1,3) |
4448 | 58 | $OEFS-1,3) | 58 | $ ,TIRCOEFSERRORS(0:LOOPMAXCOEFS-1,3) |
4449 | 59 | COMPLEX*16 PJCOEFS(0:LOOPMAXCOEFS-1,3) | 59 | COMPLEX*16 PJCOEFS(0:LOOPMAXCOEFS-1,3) |
4450 | 60 | C | 60 | C |
4451 | 61 | C EXTERNAL FUNCTIONS | 61 | C EXTERNAL FUNCTIONS |
4452 | @@ -398,8 +398,9 @@ | |||
4453 | 398 | C | 398 | C |
4454 | 399 | INCLUDE 'MadLoopParams.inc' | 399 | INCLUDE 'MadLoopParams.inc' |
4455 | 400 | INCLUDE 'process_info.inc' | 400 | INCLUDE 'process_info.inc' |
4458 | 401 | C Change the list 'LOOPLIBS_QPAVAILABLE' in loop_matrix_standalone. | 401 | C Change the list 'LOOPLIBS_QPAVAILABLE' in |
4459 | 402 | C inc to change the list of QPTools availables | 402 | C loop_matrix_standalone.inc to change the list of QPTools |
4460 | 403 | C availables | ||
4461 | 403 | LOGICAL QP_TOOLS_AVAILABLE | 404 | LOGICAL QP_TOOLS_AVAILABLE |
4462 | 404 | INTEGER INDEX_QP_TOOLS(QP_NLOOPLIB+1) | 405 | INTEGER INDEX_QP_TOOLS(QP_NLOOPLIB+1) |
4463 | 405 | COMMON/LOOP_TOOLS/QP_TOOLS_AVAILABLE,INDEX_QP_TOOLS | 406 | COMMON/LOOP_TOOLS/QP_TOOLS_AVAILABLE,INDEX_QP_TOOLS |
4464 | 406 | 407 | ||
4465 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f' | |||
4466 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f 2018-05-18 12:22:47 +0000 | |||
4467 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f 2020-06-21 12:17:46 +0000 | |||
4468 | @@ -461,8 +461,8 @@ | |||
4469 | 461 | C BEGIN CODE | 461 | C BEGIN CODE |
4470 | 462 | C | 462 | C |
4471 | 463 | DO I=1,NSO | 463 | DO I=1,NSO |
4474 | 464 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I)+AMPSPLITORDERS(ORDERI | 464 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I) |
4475 | 465 | $NDEXB,I) | 465 | $ +AMPSPLITORDERS(ORDERINDEXB,I) |
4476 | 466 | ENDDO | 466 | ENDDO |
4477 | 467 | SQSOINDEX=SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) | 467 | SQSOINDEX=SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) |
4478 | 468 | END | 468 | END |
4479 | @@ -556,8 +556,8 @@ | |||
4480 | 556 | RETURN | 556 | RETURN |
4481 | 557 | ENDIF | 557 | ENDIF |
4482 | 558 | 558 | ||
4485 | 559 | WRITE(*,*) 'ERROR:: Stopping function GET_SQUARED_ORDERS_FOR_SOIN' | 559 | WRITE(*,*) 'ERROR:: Stopping function' |
4486 | 560 | $ //'DEX' | 560 | $ //' GET_SQUARED_ORDERS_FOR_SOINDEX' |
4487 | 561 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX | 561 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX |
4488 | 562 | STOP | 562 | STOP |
4489 | 563 | 563 | ||
4490 | 564 | 564 | ||
4491 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%check_sa_born_splitOrders.f' | |||
4492 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%check_sa_born_splitOrders.f 2016-03-31 10:53:12 +0000 | |||
4493 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%check_sa_born_splitOrders.f 2020-06-21 12:17:46 +0000 | |||
4494 | @@ -170,8 +170,8 @@ | |||
4495 | 170 | C CALL SMATRIX(P,MATELEM) | 170 | C CALL SMATRIX(P,MATELEM) |
4496 | 171 | C | 171 | C |
4497 | 172 | C write (*,*) "-------------------------------------------------" | 172 | C write (*,*) "-------------------------------------------------" |
4500 | 173 | C write (*,*) "Matrix element = ", MATELEM, " GeV^",-(2*nexternal-8) | 173 | C write (*,*) "Matrix element = ", MATELEM, " |
4501 | 174 | C | 174 | C GeV^",-(2*nexternal-8) |
4502 | 175 | C write (*,*) "-------------------------------------------------" | 175 | C write (*,*) "-------------------------------------------------" |
4503 | 176 | 176 | ||
4504 | 177 | END | 177 | END |
4505 | 178 | 178 | ||
4506 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f' | |||
4507 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2018-11-08 22:24:49 +0000 | |||
4508 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2020-06-21 12:17:46 +0000 | |||
4509 | @@ -78,8 +78,8 @@ | |||
4510 | 78 | INTEGER NSQUAREDSOP1 | 78 | INTEGER NSQUAREDSOP1 |
4511 | 79 | PARAMETER (NSQUAREDSOP1=NSQUAREDSO+1) | 79 | PARAMETER (NSQUAREDSOP1=NSQUAREDSO+1) |
4512 | 80 | C The total number of loop reduction libraries | 80 | C The total number of loop reduction libraries |
4515 | 81 | C At present, there are only CutTools,PJFry++,IREGI,Golem95,Samurai | 81 | C At present, there are only |
4516 | 82 | C , Ninja and COLLIER | 82 | C CutTools,PJFry++,IREGI,Golem95,Samurai, Ninja and COLLIER |
4517 | 83 | INTEGER NLOOPLIB | 83 | INTEGER NLOOPLIB |
4518 | 84 | PARAMETER (NLOOPLIB=7) | 84 | PARAMETER (NLOOPLIB=7) |
4519 | 85 | C Only CutTools or possibly Ninja (if installed with qp support) | 85 | C Only CutTools or possibly Ninja (if installed with qp support) |
4520 | @@ -404,14 +404,15 @@ | |||
4521 | 404 | C reading the parameters | 404 | C reading the parameters |
4522 | 405 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, | 405 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4523 | 406 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 406 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4526 | 407 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, COLLIER_IR_POLE_COMPU | 407 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, |
4527 | 408 | $TATION_CHOICE | 408 | $ COLLIER_IR_POLE_COMPUTATION_CHOICE |
4528 | 409 | DATA FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION | 409 | DATA FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION |
4529 | 410 | $ ,FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION/.FALSE.,.FALSE./ | 410 | $ ,FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION/.FALSE.,.FALSE./ |
4534 | 411 | COMMON/COLLIERPOLESFORCEDCHOICE/FORCED_CHOICE_OF_COLLIER_UV_POLE_ | 411 | COMMON/COLLIERPOLESFORCEDCHOICE |
4535 | 412 | $COMPUTATION, FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 412 | $ /FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4536 | 413 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE,COLLIER_IR_POLE_COMPUTATION_ | 413 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4537 | 414 | $CHOICE | 414 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE |
4538 | 415 | $ ,COLLIER_IR_POLE_COMPUTATION_CHOICE | ||
4539 | 415 | 416 | ||
4540 | 416 | C This variable controls the general initialization which is | 417 | C This variable controls the general initialization which is |
4541 | 417 | C *common* between all MadLoop SubProcesses. | 418 | C *common* between all MadLoop SubProcesses. |
4542 | @@ -880,8 +881,8 @@ | |||
4543 | 880 | $ +P(2,2))**2-(P(3,1)+P(3,2))**2)) | 881 | $ +P(2,2))**2-(P(3,1)+P(3,2))**2)) |
4544 | 881 | 882 | ||
4545 | 882 | CTCALL_REQ_SO_DONE=.FALSE. | 883 | CTCALL_REQ_SO_DONE=.FALSE. |
4548 | 883 | FILTER_SO = (.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.(SQSO_TARG | 884 | FILTER_SO = (.NOT.CHECKPHASE) |
4549 | 884 | $ET.NE.-1) | 885 | $ .AND.HELDOUBLECHECKED.AND.(SQSO_TARGET.NE.-1) |
4550 | 885 | 886 | ||
4551 | 886 | DO I=1,NLOOPGROUPS | 887 | DO I=1,NLOOPGROUPS |
4552 | 887 | DO J=0,LOOPMAXCOEFS-1 | 888 | DO J=0,LOOPMAXCOEFS-1 |
4553 | @@ -920,13 +921,14 @@ | |||
4554 | 920 | ENDIF | 921 | ENDIF |
4555 | 921 | 922 | ||
4556 | 922 | DO H=1,NCOMB | 923 | DO H=1,NCOMB |
4560 | 923 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1).AND.(CHECKPHASE.OR.( | 924 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1) |
4561 | 924 | $.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H).GT.-HELOFFSET.AND.GOODHEL(H) | 925 | $ .AND.(CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H) |
4562 | 925 | $ .NE.0)))) THEN | 926 | $ .GT.-HELOFFSET.AND.GOODHEL(H).NE.0)))) THEN |
4563 | 926 | 927 | ||
4564 | 927 | C Handle the possible requirement of specific polarizations | 928 | C Handle the possible requirement of specific polarizations |
4567 | 928 | IF ((.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.POLARIZATIONS( | 929 | IF ((.NOT.CHECKPHASE) |
4568 | 929 | $0,0).EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | 930 | $ .AND.HELDOUBLECHECKED.AND.POLARIZATIONS(0,0) |
4569 | 931 | $ .EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | ||
4570 | 930 | CYCLE | 932 | CYCLE |
4571 | 931 | ENDIF | 933 | ENDIF |
4572 | 932 | 934 | ||
4573 | @@ -1164,8 +1166,8 @@ | |||
4574 | 1164 | C Of course if it is one, then we do not need to do | 1166 | C Of course if it is one, then we do not need to do |
4575 | 1165 | C anything (because with HELINITSTARTOVER=.FALSE. we only | 1167 | C anything (because with HELINITSTARTOVER=.FALSE. we only |
4576 | 1166 | C support exactly identical Hels.) | 1168 | C support exactly identical Hels.) |
4579 | 1167 | IF(GOODHEL(HELPICKED).GT.-HELOFFSET.AND.GOODHEL(HELPICKED) | 1169 | IF(GOODHEL(HELPICKED).GT. |
4580 | 1168 | $ .NE.1) THEN | 1170 | $ -HELOFFSET.AND.GOODHEL(HELPICKED).NE.1) THEN |
4581 | 1169 | NEWHELREF=-1 | 1171 | NEWHELREF=-1 |
4582 | 1170 | DO H=1,NCOMB | 1172 | DO H=1,NCOMB |
4583 | 1171 | IF (GOODHEL(H).EQ.(-HELOFFSET-HELPICKED)) THEN | 1173 | IF (GOODHEL(H).EQ.(-HELOFFSET-HELPICKED)) THEN |
4584 | @@ -1359,16 +1361,18 @@ | |||
4585 | 1359 | 1361 | ||
4586 | 1360 | CTMODE=BASIC_CT_MODE | 1362 | CTMODE=BASIC_CT_MODE |
4587 | 1361 | 1363 | ||
4590 | 1362 | IF(.NOT.EVAL_DONE(3).AND. ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE | 1364 | IF(.NOT.EVAL_DONE(3).AND. |
4591 | 1363 | $.1).OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.1)) ) THEN | 1365 | $ ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE.1) |
4592 | 1366 | $ .OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.1)) ) THEN | ||
4593 | 1364 | EVAL_DONE(3)=.TRUE. | 1367 | EVAL_DONE(3)=.TRUE. |
4594 | 1365 | CALL ROTATE_PS(PS,P,1) | 1368 | CALL ROTATE_PS(PS,P,1) |
4595 | 1366 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,1) | 1369 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,1) |
4596 | 1367 | GOTO 200 | 1370 | GOTO 200 |
4597 | 1368 | ENDIF | 1371 | ENDIF |
4598 | 1369 | 1372 | ||
4601 | 1370 | IF(.NOT.EVAL_DONE(4).AND. ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE | 1373 | IF(.NOT.EVAL_DONE(4).AND. |
4602 | 1371 | $.2).OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.2)) ) THEN | 1374 | $ ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE.2) |
4603 | 1375 | $ .OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.2)) ) THEN | ||
4604 | 1372 | EVAL_DONE(4)=.TRUE. | 1376 | EVAL_DONE(4)=.TRUE. |
4605 | 1373 | CALL ROTATE_PS(PS,P,2) | 1377 | CALL ROTATE_PS(PS,P,2) |
4606 | 1374 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,2) | 1378 | IF (DOING_QP_EVALS) CALL MP_ROTATE_PS(MP_PS,MP_P,2) |
4607 | @@ -1924,8 +1928,8 @@ | |||
4608 | 1924 | C When using COLLIER with the internal stability test, the first | 1928 | C When using COLLIER with the internal stability test, the first |
4609 | 1925 | C evaluation is typically more reliable so we do not want to | 1929 | C evaluation is typically more reliable so we do not want to |
4610 | 1926 | C use the average but rather the first evaluation. | 1930 | C use the average but rather the first evaluation. |
4613 | 1927 | IF (MLREDUCTIONLIB(I_LIB).EQ.7.AND.COLLIERUSEINTERNALSTABILITYT | 1931 | IF (MLREDUCTIONLIB(I_LIB) |
4614 | 1928 | $EST) THEN | 1932 | $ .EQ.7.AND.COLLIERUSEINTERNALSTABILITYTEST) THEN |
4615 | 1929 | DO I=1,3 | 1933 | DO I=1,3 |
4616 | 1930 | ESTIMATE(I,K) = FULLLIST(I,K,1) | 1934 | ESTIMATE(I,K) = FULLLIST(I,K,1) |
4617 | 1931 | ENDDO | 1935 | ENDDO |
4618 | @@ -2070,8 +2074,8 @@ | |||
4619 | 2070 | 1009 CONTINUE | 2074 | 1009 CONTINUE |
4620 | 2071 | ENDDO | 2075 | ENDDO |
4621 | 2072 | 2076 | ||
4624 | 2073 | WRITE(*,*) 'ERROR:: Stopping function ML5SOINDEX_FOR_SQUARED_ORDE' | 2077 | WRITE(*,*) 'ERROR:: Stopping function' |
4625 | 2074 | $ //'RS' | 2078 | $ //' ML5SOINDEX_FOR_SQUARED_ORDERS' |
4626 | 2075 | WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO) | 2079 | WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO) |
4627 | 2076 | STOP | 2080 | STOP |
4628 | 2077 | 2081 | ||
4629 | @@ -2170,8 +2174,8 @@ | |||
4630 | 2170 | C BEGIN CODE | 2174 | C BEGIN CODE |
4631 | 2171 | C | 2175 | C |
4632 | 2172 | DO I=1,NSO | 2176 | DO I=1,NSO |
4635 | 2173 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I)+AMPSPLITORDERS(ORDERI | 2177 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I) |
4636 | 2174 | $NDEXB,I) | 2178 | $ +AMPSPLITORDERS(ORDERINDEXB,I) |
4637 | 2175 | ENDDO | 2179 | ENDDO |
4638 | 2176 | ML5SQSOINDEX=ML5SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) | 2180 | ML5SQSOINDEX=ML5SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) |
4639 | 2177 | END | 2181 | END |
4640 | @@ -2209,8 +2213,8 @@ | |||
4641 | 2209 | RETURN | 2213 | RETURN |
4642 | 2210 | ENDIF | 2214 | ENDIF |
4643 | 2211 | 2215 | ||
4646 | 2212 | WRITE(*,*) 'ERROR:: Stopping function ML5GET_SQUARED_ORDERS_FOR_S' | 2216 | WRITE(*,*) 'ERROR:: Stopping function' |
4647 | 2213 | $ //'OINDEX' | 2217 | $ //' ML5GET_SQUARED_ORDERS_FOR_SOINDEX' |
4648 | 2214 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX | 2218 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX |
4649 | 2215 | STOP | 2219 | STOP |
4650 | 2216 | 2220 | ||
4651 | @@ -2249,8 +2253,8 @@ | |||
4652 | 2249 | RETURN | 2253 | RETURN |
4653 | 2250 | ENDIF | 2254 | ENDIF |
4654 | 2251 | 2255 | ||
4657 | 2252 | WRITE(*,*) 'ERROR:: Stopping function ML5GET_ORDERS_FOR_AMPSOINDE' | 2256 | WRITE(*,*) 'ERROR:: Stopping function' |
4658 | 2253 | $ //'X' | 2257 | $ //' ML5GET_ORDERS_FOR_AMPSOINDEX' |
4659 | 2254 | WRITE(*,*) 'Could not find amplitude split orders index ',SOINDEX | 2258 | WRITE(*,*) 'Could not find amplitude split orders index ',SOINDEX |
4660 | 2255 | STOP | 2259 | STOP |
4661 | 2256 | 2260 | ||
4662 | @@ -2315,12 +2319,13 @@ | |||
4663 | 2315 | 2319 | ||
4664 | 2316 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, | 2320 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4665 | 2317 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2321 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4672 | 2318 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, COLLIER_IR_POLE_COMPU | 2322 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, |
4673 | 2319 | $TATION_CHOICE | 2323 | $ COLLIER_IR_POLE_COMPUTATION_CHOICE |
4674 | 2320 | COMMON/COLLIERPOLESFORCEDCHOICE/FORCED_CHOICE_OF_COLLIER_UV_POLE_ | 2324 | COMMON/COLLIERPOLESFORCEDCHOICE |
4675 | 2321 | $COMPUTATION, FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2325 | $ /FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4676 | 2322 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE,COLLIER_IR_POLE_COMPUTATION_ | 2326 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4677 | 2323 | $CHOICE | 2327 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE |
4678 | 2328 | $ ,COLLIER_IR_POLE_COMPUTATION_CHOICE | ||
4679 | 2324 | 2329 | ||
4680 | 2325 | COLLIERCOMPUTEUVPOLES = ONOFF | 2330 | COLLIERCOMPUTEUVPOLES = ONOFF |
4681 | 2326 | C This is just so that if we read the param again, we don't | 2331 | C This is just so that if we read the param again, we don't |
4682 | @@ -2342,12 +2347,13 @@ | |||
4683 | 2342 | 2347 | ||
4684 | 2343 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, | 2348 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4685 | 2344 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2349 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4692 | 2345 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, COLLIER_IR_POLE_COMPU | 2350 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, |
4693 | 2346 | $TATION_CHOICE | 2351 | $ COLLIER_IR_POLE_COMPUTATION_CHOICE |
4694 | 2347 | COMMON/COLLIERPOLESFORCEDCHOICE/FORCED_CHOICE_OF_COLLIER_UV_POLE_ | 2352 | COMMON/COLLIERPOLESFORCEDCHOICE |
4695 | 2348 | $COMPUTATION, FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 2353 | $ /FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4696 | 2349 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE,COLLIER_IR_POLE_COMPUTATION_ | 2354 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4697 | 2350 | $CHOICE | 2355 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE |
4698 | 2356 | $ ,COLLIER_IR_POLE_COMPUTATION_CHOICE | ||
4699 | 2351 | 2357 | ||
4700 | 2352 | COLLIERCOMPUTEIRPOLES = ONOFF | 2358 | COLLIERCOMPUTEIRPOLES = ONOFF |
4701 | 2353 | C This is just so that if we read the param again, we don't | 2359 | C This is just so that if we read the param again, we don't |
4702 | 2354 | 2360 | ||
4703 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f' | |||
4704 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f 2017-07-07 10:47:20 +0000 | |||
4705 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f 2020-06-21 12:17:46 +0000 | |||
4706 | @@ -268,13 +268,14 @@ | |||
4707 | 268 | 268 | ||
4708 | 269 | DPW_COPIED = .FALSE. | 269 | DPW_COPIED = .FALSE. |
4709 | 270 | DO H=1,NCOMB | 270 | DO H=1,NCOMB |
4713 | 271 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1).AND.(CHECKPHASE.OR.( | 271 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1) |
4714 | 272 | $.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H).GT.-HELOFFSET.AND.GOODHEL(H) | 272 | $ .AND.(CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H) |
4715 | 273 | $ .NE.0)))) THEN | 273 | $ .GT.-HELOFFSET.AND.GOODHEL(H).NE.0)))) THEN |
4716 | 274 | 274 | ||
4717 | 275 | C Handle the possible requirement of specific polarizations | 275 | C Handle the possible requirement of specific polarizations |
4720 | 276 | IF ((.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.POLARIZATIONS( | 276 | IF ((.NOT.CHECKPHASE) |
4721 | 277 | $0,0).EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | 277 | $ .AND.HELDOUBLECHECKED.AND.POLARIZATIONS(0,0) |
4722 | 278 | $ .EQ.0.AND.(.NOT.IS_HEL_SELECTED(H))) THEN | ||
4723 | 278 | CYCLE | 279 | CYCLE |
4724 | 279 | ENDIF | 280 | ENDIF |
4725 | 280 | 281 | ||
4726 | 281 | 282 | ||
4727 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%polynomial.f' | |||
4728 | --- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%polynomial.f 2016-04-06 18:45:52 +0000 | |||
4729 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%polynomial.f 2020-06-21 12:17:46 +0000 | |||
4730 | @@ -113,8 +113,8 @@ | |||
4731 | 113 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO | 113 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO |
4732 | 114 | $ ,KIND=8) | 114 | $ ,KIND=8) |
4733 | 115 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 | 115 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 |
4736 | 116 | CONST(ML5SOINDEX_FOR_BORN_AMP(I))=CONST(ML5SOINDEX_FOR_BORN_AMP | 116 | CONST(ML5SOINDEX_FOR_BORN_AMP(I)) |
4737 | 117 | $(I))+CFTOT*CONJG(AMP(I)) | 117 | $ =CONST(ML5SOINDEX_FOR_BORN_AMP(I))+CFTOT*CONJG(AMP(I)) |
4738 | 118 | ENDDO | 118 | ENDDO |
4739 | 119 | 119 | ||
4740 | 120 | DO I=1,NAMPSO | 120 | DO I=1,NAMPSO |
4741 | @@ -232,8 +232,8 @@ | |||
4742 | 232 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO | 232 | CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO |
4743 | 233 | $ ,KIND=16) | 233 | $ ,KIND=16) |
4744 | 234 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 | 234 | IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1 |
4747 | 235 | CONST(ML5SOINDEX_FOR_BORN_AMP(I))=CONST(ML5SOINDEX_FOR_BORN_AMP | 235 | CONST(ML5SOINDEX_FOR_BORN_AMP(I)) |
4748 | 236 | $(I))+CFTOT*CONJG(AMP(I)) | 236 | $ =CONST(ML5SOINDEX_FOR_BORN_AMP(I))+CFTOT*CONJG(AMP(I)) |
4749 | 237 | ENDDO | 237 | ENDDO |
4750 | 238 | 238 | ||
4751 | 239 | DO I=1,NAMPSO | 239 | DO I=1,NAMPSO |
4752 | 240 | 240 | ||
4753 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f' | |||
4754 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2019-09-26 11:09:58 +0000 | |||
4755 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2020-06-21 12:17:46 +0000 | |||
4756 | @@ -142,11 +142,13 @@ | |||
4757 | 142 | 142 | ||
4758 | 143 | ! If the helicity grid status is 0, this means that it is not yet initialized. | 143 | ! If the helicity grid status is 0, this means that it is not yet initialized. |
4759 | 144 | ! If HEL_PICKED==-1, this means that calls to other matrix<i> where in initialization mode as well for the helicity. | 144 | ! If HEL_PICKED==-1, this means that calls to other matrix<i> where in initialization mode as well for the helicity. |
4762 | 145 | IF ((ISHEL(IMIRROR).EQ.0.AND.ISUM_HEL.EQ.0).OR.(DS_GET_DIM_STATUS | 145 | IF ((ISHEL(IMIRROR).EQ.0.AND.ISUM_HEL.EQ.0) |
4763 | 146 | $('Helicity').EQ.0).OR.(HEL_PICKED.EQ.-1)) THEN | 146 | $ .OR.(DS_GET_DIM_STATUS('Helicity').EQ.0).OR.(HEL_PICKED.EQ.-1)) |
4764 | 147 | $ THEN | ||
4765 | 147 | DO I=1,NCOMB | 148 | DO I=1,NCOMB |
4768 | 148 | IF (GOODHEL(I,IMIRROR) .OR. NTRY(IMIRROR).LE.MAXTRIES.OR.(ISU | 149 | IF (GOODHEL(I,IMIRROR) .OR. NTRY(IMIRROR) |
4769 | 149 | $M_HEL.NE.0).OR.THIS_NTRY(IMIRROR).LE.2) THEN | 150 | $ .LE.MAXTRIES.OR.(ISUM_HEL.NE.0).OR.THIS_NTRY(IMIRROR).LE.2) |
4770 | 151 | $ THEN | ||
4771 | 150 | T=MATRIX1(P ,NHEL(1,I),JC(1)) | 152 | T=MATRIX1(P ,NHEL(1,I),JC(1)) |
4772 | 151 | DO JJ=1,NINCOMING | 153 | DO JJ=1,NINCOMING |
4773 | 152 | IF(POL(JJ).NE.1D0.AND.NHEL(JJ,I).EQ.INT(SIGN(1D0,POL(JJ)) | 154 | IF(POL(JJ).NE.1D0.AND.NHEL(JJ,I).EQ.INT(SIGN(1D0,POL(JJ)) |
4774 | @@ -174,8 +176,8 @@ | |||
4775 | 174 | HEL_JACOBIAN = 1.0D0 | 176 | HEL_JACOBIAN = 1.0D0 |
4776 | 175 | ! We don't want to re-update the helicity grid if it was already updated by another matrix<i>, so we make sure that the reference grid is empty. | 177 | ! We don't want to re-update the helicity grid if it was already updated by another matrix<i>, so we make sure that the reference grid is empty. |
4777 | 176 | REF_HELICITY_GRID = DS_GET_DIMENSION(REF_GRID,'Helicity') | 178 | REF_HELICITY_GRID = DS_GET_DIMENSION(REF_GRID,'Helicity') |
4780 | 177 | IF((DS_GET_DIM_STATUS('Helicity').EQ.1).AND.(REF_HELICITY_GRI | 179 | IF((DS_GET_DIM_STATUS('Helicity').EQ.1) |
4781 | 178 | $D%%N_TOT_ENTRIES.EQ.0)) THEN | 180 | $ .AND.(REF_HELICITY_GRID%%N_TOT_ENTRIES.EQ.0)) THEN |
4782 | 179 | ! If we finished the initialization we can update the grid so as to start sampling over it. | 181 | ! If we finished the initialization we can update the grid so as to start sampling over it. |
4783 | 180 | ! However the grid will now be filled by dsample with different kind of weights (including pdf, flux, etc...) so by setting the grid_mode of the reference grid to 'initialization' we make sure it will be overwritten (as opposed to 'combined') by the running grid at the next update. | 182 | ! However the grid will now be filled by dsample with different kind of weights (including pdf, flux, etc...) so by setting the grid_mode of the reference grid to 'initialization' we make sure it will be overwritten (as opposed to 'combined') by the running grid at the next update. |
4784 | 181 | CALL DS_UPDATE_GRID('Helicity') | 183 | CALL DS_UPDATE_GRID('Helicity') |
4785 | @@ -436,8 +438,8 @@ | |||
4786 | 436 | C BEGIN CODE | 438 | C BEGIN CODE |
4787 | 437 | C | 439 | C |
4788 | 438 | DO I=1,NSO | 440 | DO I=1,NSO |
4791 | 439 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I)+AMPSPLITORDERS(ORDERI | 441 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I) |
4792 | 440 | $NDEXB,I) | 442 | $ +AMPSPLITORDERS(ORDERINDEXB,I) |
4793 | 441 | ENDDO | 443 | ENDDO |
4794 | 442 | SQSOINDEX1=SOINDEX_FOR_SQUARED_ORDERS1(SQORDERS) | 444 | SQSOINDEX1=SOINDEX_FOR_SQUARED_ORDERS1(SQORDERS) |
4795 | 443 | END | 445 | END |
4796 | @@ -531,8 +533,8 @@ | |||
4797 | 531 | RETURN | 533 | RETURN |
4798 | 532 | ENDIF | 534 | ENDIF |
4799 | 533 | 535 | ||
4802 | 534 | WRITE(*,*) 'ERROR:: Stopping function GET_SQUARED_ORDERS_FOR_SOIN' | 536 | WRITE(*,*) 'ERROR:: Stopping function' |
4803 | 535 | $ //'DEX1' | 537 | $ //' GET_SQUARED_ORDERS_FOR_SOINDEX1' |
4804 | 536 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX | 538 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX |
4805 | 537 | STOP | 539 | STOP |
4806 | 538 | 540 | ||
4807 | 539 | 541 | ||
4808 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f' | |||
4809 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2019-09-26 11:09:58 +0000 | |||
4810 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2020-06-21 12:17:46 +0000 | |||
4811 | @@ -387,8 +387,8 @@ | |||
4812 | 387 | C BEGIN CODE | 387 | C BEGIN CODE |
4813 | 388 | C | 388 | C |
4814 | 389 | DO I=1,NSO | 389 | DO I=1,NSO |
4817 | 390 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I)+AMPSPLITORDERS(ORDERI | 390 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I) |
4818 | 391 | $NDEXB,I) | 391 | $ +AMPSPLITORDERS(ORDERINDEXB,I) |
4819 | 392 | ENDDO | 392 | ENDDO |
4820 | 393 | SQSOINDEX=SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) | 393 | SQSOINDEX=SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) |
4821 | 394 | END | 394 | END |
4822 | @@ -482,8 +482,8 @@ | |||
4823 | 482 | RETURN | 482 | RETURN |
4824 | 483 | ENDIF | 483 | ENDIF |
4825 | 484 | 484 | ||
4828 | 485 | WRITE(*,*) 'ERROR:: Stopping function GET_SQUARED_ORDERS_FOR_SOIN' | 485 | WRITE(*,*) 'ERROR:: Stopping function' |
4829 | 486 | $ //'DEX' | 486 | $ //' GET_SQUARED_ORDERS_FOR_SOINDEX' |
4830 | 487 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX | 487 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX |
4831 | 488 | STOP | 488 | STOP |
4832 | 489 | 489 | ||
4833 | 490 | 490 | ||
4834 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f' | |||
4835 | --- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2018-05-25 09:13:24 +0000 | |||
4836 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2020-06-21 12:17:46 +0000 | |||
4837 | @@ -83,8 +83,8 @@ | |||
4838 | 83 | INTEGER NSQUAREDSOP1 | 83 | INTEGER NSQUAREDSOP1 |
4839 | 84 | PARAMETER (NSQUAREDSOP1=NSQUAREDSO+1) | 84 | PARAMETER (NSQUAREDSOP1=NSQUAREDSO+1) |
4840 | 85 | C The total number of loop reduction libraries | 85 | C The total number of loop reduction libraries |
4843 | 86 | C At present, there are only CutTools,PJFry++,IREGI,Golem95,Samurai | 86 | C At present, there are only |
4844 | 87 | C , Ninja and COLLIER | 87 | C CutTools,PJFry++,IREGI,Golem95,Samurai, Ninja and COLLIER |
4845 | 88 | INTEGER NLOOPLIB | 88 | INTEGER NLOOPLIB |
4846 | 89 | PARAMETER (NLOOPLIB=7) | 89 | PARAMETER (NLOOPLIB=7) |
4847 | 90 | C Only CutTools or possibly Ninja (if installed with qp support) | 90 | C Only CutTools or possibly Ninja (if installed with qp support) |
4848 | @@ -411,14 +411,15 @@ | |||
4849 | 411 | C reading the parameters | 411 | C reading the parameters |
4850 | 412 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, | 412 | LOGICAL FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4851 | 413 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 413 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4854 | 414 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, COLLIER_IR_POLE_COMPU | 414 | LOGICAL COLLIER_UV_POLE_COMPUTATION_CHOICE, |
4855 | 415 | $TATION_CHOICE | 415 | $ COLLIER_IR_POLE_COMPUTATION_CHOICE |
4856 | 416 | DATA FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION | 416 | DATA FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION |
4857 | 417 | $ ,FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION/.FALSE.,.FALSE./ | 417 | $ ,FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION/.FALSE.,.FALSE./ |
4862 | 418 | COMMON/ML5_0_COLLIERPOLESFORCEDCHOICE/FORCED_CHOICE_OF_COLLIER_UV | 418 | COMMON/ML5_0_COLLIERPOLESFORCEDCHOICE |
4863 | 419 | $_POLE_COMPUTATION, FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION | 419 | $ /FORCED_CHOICE_OF_COLLIER_UV_POLE_COMPUTATION, |
4864 | 420 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE,COLLIER_IR_POLE_COMPUTATION_ | 420 | $ FORCED_CHOICE_OF_COLLIER_IR_POLE_COMPUTATION |
4865 | 421 | $CHOICE | 421 | $ ,COLLIER_UV_POLE_COMPUTATION_CHOICE |
4866 | 422 | $ ,COLLIER_IR_POLE_COMPUTATION_CHOICE | ||
4867 | 422 | 423 | ||
4868 | 423 | C This variable controls the general initialization which is | 424 | C This variable controls the general initialization which is |
4869 | 424 | C *common* between all MadLoop SubProcesses. | 425 | C *common* between all MadLoop SubProcesses. |
4870 | @@ -888,8 +889,8 @@ | |||
4871 | 888 | $ +P(2,2))**2-(P(3,1)+P(3,2))**2)) | 889 | $ +P(2,2))**2-(P(3,1)+P(3,2))**2)) |
4872 | 889 | 890 | ||
4873 | 890 | CTCALL_REQ_SO_DONE=.FALSE. | 891 | CTCALL_REQ_SO_DONE=.FALSE. |
4876 | 891 | FILTER_SO = (.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.(SQSO_TARG | 892 | FILTER_SO = (.NOT.CHECKPHASE) |
4877 | 892 | $ET.NE.-1) | 893 | $ .AND.HELDOUBLECHECKED.AND.(SQSO_TARGET.NE.-1) |
4878 | 893 | 894 | ||
4879 | 894 | DO I=1,NLOOPGROUPS | 895 | DO I=1,NLOOPGROUPS |
4880 | 895 | DO J=0,LOOPMAXCOEFS-1 | 896 | DO J=0,LOOPMAXCOEFS-1 |
4881 | @@ -928,13 +929,14 @@ | |||
4882 | 928 | ENDIF | 929 | ENDIF |
4883 | 929 | 930 | ||
4884 | 930 | DO H=1,NCOMB | 931 | DO H=1,NCOMB |
4888 | 931 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1).AND.(CHECKPHASE.OR.( | 932 | IF ((HELPICKED.EQ.H).OR.((HELPICKED.EQ.-1) |
4889 | 932 | $.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H).GT.-HELOFFSET.AND.GOODHEL(H) | 933 | $ .AND.(CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED).OR.(GOODHEL(H) |
4890 | 933 | $ .NE.0)))) THEN | 934 | $ .GT.-HELOFFSET.AND.GOODHEL(H).NE.0)))) THEN |
4891 | 934 | 935 | ||
4892 | 935 | C Handle the possible requirement of specific polarizations | 936 | C Handle the possible requirement of specific polarizations |
4895 | 936 | IF ((.NOT.CHECKPHASE).AND.HELDOUBLECHECKED.AND.POLARIZATIONS( | 937 | IF ((.NOT.CHECKPHASE) |
4896 | 937 | $0,0).EQ.0.AND.(.NOT.ML5_0_IS_HEL_SELECTED(H))) THEN | 938 | $ .AND.HELDOUBLECHECKED.AND.POLARIZATIONS(0,0) |
4897 | 939 | $ .EQ.0.AND.(.NOT.ML5_0_IS_HEL_SELECTED(H))) THEN | ||
4898 | 938 | CYCLE | 940 | CYCLE |
4899 | 939 | ENDIF | 941 | ENDIF |
4900 | 940 | 942 | ||
4901 | @@ -975,8 +977,9 @@ | |||
4902 | 975 | DO I=1,NCTAMPS | 977 | DO I=1,NCTAMPS |
4903 | 976 | CFTOT=DCMPLX(CF_N(I,J)/DBLE(ABS(CF_D(I,J))),0.0D0) | 978 | CFTOT=DCMPLX(CF_N(I,J)/DBLE(ABS(CF_D(I,J))),0.0D0) |
4904 | 977 | IF(CF_D(I,J).LT.0) CFTOT=CFTOT*IMAG1 | 979 | IF(CF_D(I,J).LT.0) CFTOT=CFTOT*IMAG1 |
4907 | 978 | ITEMP = ML5_0_ML5SQSOINDEX(ML5_0_ML5SOINDEX_FOR_LOOP_AMP( | 980 | ITEMP = |
4908 | 979 | $I),ML5_0_ML5SOINDEX_FOR_BORN_AMP(J)) | 981 | $ ML5_0_ML5SQSOINDEX(ML5_0_ML5SOINDEX_FOR_LOOP_AMP(I) |
4909 | 982 | $ ,ML5_0_ML5SOINDEX_FOR_BORN_AMP(J)) | ||
4910 | 980 | IF (.NOT.FILTER_SO.OR.SQSO_TARGET.EQ.ITEMP) THEN | 983 | IF (.NOT.FILTER_SO.OR.SQSO_TARGET.EQ.ITEMP) THEN |
4911 | 981 | DO K=1,3 | 984 | DO K=1,3 |
4912 | 982 | TEMP2 = DBLE(CFTOT*AMPL(K,I)*CTEMP) | 985 | TEMP2 = DBLE(CFTOT*AMPL(K,I)*CTEMP) |
4913 | @@ -1102,8 +1105,8 @@ | |||
4914 | 1102 | IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN | 1105 | IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN |
4915 | 1103 | C Make sure that that no polarization constraint filters out | 1106 | C Make sure that that no polarization constraint filters out |
4916 | 1104 | C this helicity | 1107 | C this helicity |
4919 | 1105 | IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK | 1108 | IF (POLARIZATIONS(0,0).EQ. |
4920 | 1106 | $ED)) THEN | 1109 | $ -1.OR.ML5_0_IS_HEL_SELECTED(HELPICKED)) THEN |
4921 | 1107 | C TO KEEP TRACK OF THE FINAL ANSWER TO BE RETURNED DURING | 1110 | C TO KEEP TRACK OF THE FINAL ANSWER TO BE RETURNED DURING |
4922 | 1108 | C CHECK PHASE | 1111 | C CHECK PHASE |
4923 | 1109 | DO I=0,NSQUAREDSO | 1112 | DO I=0,NSQUAREDSO |
4924 | @@ -1194,8 +1197,8 @@ | |||
4925 | 1194 | C Of course if it is one, then we do not need to do | 1197 | C Of course if it is one, then we do not need to do |
4926 | 1195 | C anything (because with HELINITSTARTOVER=.FALSE. we only | 1198 | C anything (because with HELINITSTARTOVER=.FALSE. we only |
4927 | 1196 | C support exactly identical Hels.) | 1199 | C support exactly identical Hels.) |
4930 | 1197 | IF(GOODHEL(HELPICKED).GT.-HELOFFSET.AND.GOODHEL(HELPICKED) | 1200 | IF(GOODHEL(HELPICKED).GT. |
4931 | 1198 | $ .NE.1) THEN | 1201 | $ -HELOFFSET.AND.GOODHEL(HELPICKED).NE.1) THEN |
4932 | 1199 | NEWHELREF=-1 | 1202 | NEWHELREF=-1 |
4933 | 1200 | DO H=1,NCOMB | 1203 | DO H=1,NCOMB |
4934 | 1201 | IF (GOODHEL(H).EQ.(-HELOFFSET-HELPICKED)) THEN | 1204 | IF (GOODHEL(H).EQ.(-HELOFFSET-HELPICKED)) THEN |
4935 | @@ -1389,16 +1392,18 @@ | |||
4936 | 1389 | 1392 | ||
4937 | 1390 | CTMODE=BASIC_CT_MODE | 1393 | CTMODE=BASIC_CT_MODE |
4938 | 1391 | 1394 | ||
4941 | 1392 | IF(.NOT.EVAL_DONE(3).AND. ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE | 1395 | IF(.NOT.EVAL_DONE(3).AND. |
4942 | 1393 | $.1).OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.1)) ) THEN | 1396 | $ ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE.1) |
4943 | 1397 | $ .OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.1)) ) THEN | ||
4944 | 1394 | EVAL_DONE(3)=.TRUE. | 1398 | EVAL_DONE(3)=.TRUE. |
4945 | 1395 | CALL ML5_0_ROTATE_PS(PS,P,1) | 1399 | CALL ML5_0_ROTATE_PS(PS,P,1) |
4946 | 1396 | IF (DOING_QP_EVALS) CALL ML5_0_MP_ROTATE_PS(MP_PS,MP_P,1) | 1400 | IF (DOING_QP_EVALS) CALL ML5_0_MP_ROTATE_PS(MP_PS,MP_P,1) |
4947 | 1397 | GOTO 200 | 1401 | GOTO 200 |
4948 | 1398 | ENDIF | 1402 | ENDIF |
4949 | 1399 | 1403 | ||
4952 | 1400 | IF(.NOT.EVAL_DONE(4).AND. ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE | 1404 | IF(.NOT.EVAL_DONE(4).AND. |
4953 | 1401 | $.2).OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.2)) ) THEN | 1405 | $ ((DOING_QP_EVALS.AND.NROTATIONS_QP.GE.2) |
4954 | 1406 | $ .OR.((.NOT.DOING_QP_EVALS).AND.NROTATIONS_DP.GE.2)) ) THEN | ||
4955 | 1402 | EVAL_DONE(4)=.TRUE. | 1407 | EVAL_DONE(4)=.TRUE. |
4956 | 1403 | CALL ML5_0_ROTATE_PS(PS,P,2) | 1408 | CALL ML5_0_ROTATE_PS(PS,P,2) |
4957 | 1404 | IF (DOING_QP_EVALS) CALL ML5_0_MP_ROTATE_PS(MP_PS,MP_P,2) | 1409 | IF (DOING_QP_EVALS) CALL ML5_0_MP_ROTATE_PS(MP_PS,MP_P,2) |
4958 | @@ -1957,8 +1962,8 @@ | |||
4959 | 1957 | C When using COLLIER with the internal stability test, the first | 1962 | C When using COLLIER with the internal stability test, the first |
4960 | 1958 | C evaluation is typically more reliable so we do not want to | 1963 | C evaluation is typically more reliable so we do not want to |
4961 | 1959 | C use the average but rather the first evaluation. | 1964 | C use the average but rather the first evaluation. |
4964 | 1960 | IF (MLREDUCTIONLIB(I_LIB).EQ.7.AND.COLLIERUSEINTERNALSTABILITYT | 1965 | IF (MLREDUCTIONLIB(I_LIB) |
4965 | 1961 | $EST) THEN | 1966 | $ .EQ.7.AND.COLLIERUSEINTERNALSTABILITYTEST) THEN |
4966 | 1962 | DO I=1,3 | 1967 | DO I=1,3 |
4967 | 1963 | ESTIMATE(I,K) = FULLLIST(I,K,1) | 1968 | ESTIMATE(I,K) = FULLLIST(I,K,1) |
4968 | 1964 | ENDDO | 1969 | ENDDO |
4969 | @@ -2105,8 +2110,8 @@ | |||
4970 | 2105 | 1009 CONTINUE | 2110 | 1009 CONTINUE |
4971 | 2106 | ENDDO | 2111 | ENDDO |
4972 | 2107 | 2112 | ||
4975 | 2108 | WRITE(*,*) 'ERROR:: Stopping function ML5_0_ML5SOINDEX_FOR_SQUARE' | 2113 | WRITE(*,*) 'ERROR:: Stopping function' |
4976 | 2109 | $ //'D_ORDERS' | 2114 | $ //' ML5_0_ML5SOINDEX_FOR_SQUARED_ORDERS' |
4977 | 2110 | WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO) | 2115 | WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO) |
4978 | 2111 | STOP | 2116 | STOP |
4979 | 2112 | 2117 | ||
4980 | @@ -2233,8 +2238,8 @@ | |||
4981 | 2233 | C BEGIN CODE | 2238 | C BEGIN CODE |
4982 | 2234 | C | 2239 | C |
4983 | 2235 | DO I=1,NSO | 2240 | DO I=1,NSO |
4986 | 2236 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I)+AMPSPLITORDERS(ORDERI | 2241 | SQORDERS(I)=AMPSPLITORDERS(ORDERINDEXA,I) |
4987 | 2237 | $NDEXB,I) | 2242 | $ +AMPSPLITORDERS(ORDERINDEXB,I) |
4988 | 2238 | ENDDO | 2243 | ENDDO |
4989 | 2239 | ML5_0_ML5SQSOINDEX=ML5_0_ML5SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) | 2244 | ML5_0_ML5SQSOINDEX=ML5_0_ML5SOINDEX_FOR_SQUARED_ORDERS(SQORDERS) |
4990 | 2240 | END | 2245 | END |
4991 | @@ -2273,8 +2278,8 @@ | |||
4992 | 2273 | RETURN | 2278 | RETURN |
4993 | 2274 | ENDIF | 2279 | ENDIF |
4994 | 2275 | 2280 | ||
4997 | 2276 | WRITE(*,*) 'ERROR:: Stopping function ML5_0_ML5GET_SQUARED_ORDERS' | 2281 | WRITE(*,*) 'ERROR:: Stopping function' |
4998 | 2277 | $ //'_FOR_SOINDEX' | 2282 | $ //' ML5_0_ML5GET_SQUARED_ORDERS_FOR_SOINDEX' |
4999 | 2278 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX | 2283 | WRITE(*,*) 'Could not find squared orders index ',SOINDEX |
5000 | 2279 | STOP | 2284 | STOP |
Wait... we have four different releases of our code? Shouldn't we try to get those in line? B.t.w., what's the 4th release: there is the 2.7.2, 3.0.1 and python3, right? Note that PY8meetsMG5aMC_ release has not been released: that is still very much a development branch that is being made ready to be merged with 2.7.2 or 2.7.3.
Best,
Rikkert