use systematics.py to compute PDF systematics

Asked by Davide Zuliani

Dear experts,

I would like to compute PDF systematics on a lhe file. I would like to do it after the generation, therefore I'm using the systematics.py script.
I do the following inside the process folder:

./bin/madevent systematics run_01 reweight.lhe --pdf=244800

but it fails saying

Command "systematics run_01 reweight.lhe --pdf=244800" interrupted with error:
AttributeError : 'NoneType' object has no attribute 'set'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/run_01_tag_2_debug.log'.
Please attach this file to your report.

The error is

Traceback (most recent call last):
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1544, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1493, in onecmd_orig
    return func(arg, **opt)
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/common_run_interface.py", line 1929, in do_systematics
    out = self.do_systematics(line)
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/common_run_interface.py", line 1874, in do_systematics
    systematics.call_systematics([input, output] + opts,
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/systematics.py", line 1273, in call_systematics
    obj = Systematics(input, output, log=log, **opts)
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/systematics.py", line 282, in __init__
    self.log( "# Events generated with PDF: %s (%s)" %(self.orig_pdf.set().name,self.orig_pdf.lhapdfID ))
AttributeError: 'NoneType' object has no attribute 'set'

If instead, I do ./bin/madevent systematics run_01 reweight.lhe --pdf='errorset', the error is

Traceback (most recent call last):
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1544, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1493, in onecmd_orig
    return func(arg, **opt)
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/common_run_interface.py", line 1962, in do_systematics
    sys_obj.print_cross_sections(all_cross, nb_event, result_file)
  File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/systematics.py", line 500, in print_cross_sections
    to_print.append(all_cross[i])
IndexError: list index out of range

Any idea of what could be my mistake?

Thanks in advance.

Cheers,
Davide

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

The first error is likely a lhapdf error.
Either that the pdf set is not recognised by lhapdf or something like that.
Could check if lhapdf has downloaded the pdf set?

For the second error, I guess that the issue is created by the previous crash but I'm not sure.

Cheers,

Olivier

> On 9 Mar 2023, at 12:55, Davide Zuliani <email address hidden> wrote:
>
> New question #705774 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/705774
>
> Dear experts,
>
> I would like to compute PDF systematics on a lhe file. I would like to do it after the generation, therefore I'm using the systematics.py script.
> I do the following inside the process folder:
>
> ./bin/madevent systematics run_01 reweight.lhe --pdf=244800
>
> but it fails saying
>
> Command "systematics run_01 reweight.lhe --pdf=244800" interrupted with error:
> AttributeError : 'NoneType' object has no attribute 'set'
> Please report this bug on https://bugs.launchpad.net/mg5amcnlo
> More information is found in '/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/run_01_tag_2_debug.log'.
> Please attach this file to your report.
>
> The error is
>
> Traceback (most recent call last):
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1544, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1493, in onecmd_orig
> return func(arg, **opt)
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/common_run_interface.py", line 1929, in do_systematics
> out = self.do_systematics(line)
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/common_run_interface.py", line 1874, in do_systematics
> systematics.call_systematics([input, output] + opts,
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/systematics.py", line 1273, in call_systematics
> obj = Systematics(input, output, log=log, **opts)
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/systematics.py", line 282, in __init__
> self.log( "# Events generated with PDF: %s (%s)" %(self.orig_pdf.set().name,self.orig_pdf.lhapdfID ))
> AttributeError: 'NoneType' object has no attribute 'set'
>
>
> If instead, I do ./bin/madevent systematics run_01 reweight.lhe --pdf='errorset', the error is
>
> Traceback (most recent call last):
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1544, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/extended_cmd.py", line 1493, in onecmd_orig
> return func(arg, **opt)
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/common_run_interface.py", line 1962, in do_systematics
> sys_obj.print_cross_sections(all_cross, nb_event, result_file)
> File "/home/zuliani/madgraph_3.3.1/MG5_aMC_v3_3_1/w_wj_wjj_wjjj_LO/bin/internal/systematics.py", line 500, in print_cross_sections
> to_print.append(all_cross[i])
> IndexError: list index out of range
>
>
> Any idea of what could be my mistake?
>
> Thanks in advance.
>
>
> Cheers,
> Davide
>
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Davide Zuliani (davzuliani) said :
#2

Lhapdf has correctly downloaded the pdf set, I can even use it during the generation process.

Cheers,
Davide

Can you help with this problem?

Provide an answer of your own, or ask Davide Zuliani for more information if necessary.

To post a message you must log in.