Using individual PDF replicas

Asked by Cameron Voisey on 2019-09-26

Dear developers,

I am wondering whether one can specify that they wish to use just one PDF replica at the level of the MadGraph runcard? I am using MG5_aMC_v2_6_6 with LHAPDF 6.2.1. To give a specific example, I am executing the following script with ./bin/mg5_aMC, which loads the full NNPDF31_nlo_as_0118 set and works without any issue:

generate p p > l- l+
output testdir
set pdlabel lhapdf
set lhaid 303400 # NNPDF31_nlo_as_0118
set use_syst False

However, if I change the penultimate line to 'set lhaid 303401', i.e. I would like to use replica 1 of this PDF set, I get the following error:

Error detected in "generate_events run_01"
write debug file /store/DAMTP/cv331/MG5_aMC_v2_6_6/test/run_01_tag_1_debug.log
If you need help with this issue please contact us on
MadGraph5Error : lhaid 303401 not valid input number for the current lhapdf

Is there some other way to specify a specific replica?

Many thanks,

Question information

English Edit question
MadGraph5_aMC@NLO Edit question
No assignee Edit question
Last query:
Last reply:


I actually do not know, what we typically do is to use the systematics package to re-weight the sample generated with 303400.
This is actually done by default (if you have lhapdf installed with the python support for your current python version).
But I guess that this is not good enough for you.



Hi Olivier,

Thanks for your quick response. Yes, I am aware of this feature for calculating PDF uncertainties and I have used it before. However, I would like to produce events for different replicas because I would like to be able to plot an observable separately for each replica. Is there any way that you can think of to do this?


The LHEF file follow the version 3 convention which contains all the information to plot each of the replica individually.
So you have the information already is up to your analysis code to do the correct plot actually.



Okay, thanks very much for your help with this.


Can you help with this problem?

Provide an answer of your own, or ask Cameron Voisey for more information if necessary.

To post a message you must log in.