ATLAS Offline Software
Loading...
Searching...
No Matches
MadGraphPDFSettings.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from enum import Enum
4
5class MadGraphPDFSets(Enum):
6 """Enum-class to store strongly-typed PDF sets for MadGraph
7 CA configuration fragments."""
8
9 NNPDF30NLOnf4 = "NNPDF30NLOnf4"
10
12 """Return a new PDF-setting dictionary for this preset."""
13 if self is MadGraphPDFSets.NNPDF30NLOnf4:
14 return {
15 # NNPDF nf 4 not available as Hessian PDF
16 "central_pdf": 260400, # NNPDF30_nlo_as_0118_nf_4
17 "pdf_variations": [260400, 93700], # NNPDF30_nlo_as_0118_nf_4 + PDF4LHC21_40_pdfas_nf4
18 "alternative_pdfs": [
19 266400, # NNPDF30_nlo_as_0119_nf_4
20 265400, # NNPDF30_nlo_as_0117_nf_4
21 261400, # NNPDF30_nnlo_as_0118_nf_4
22 28300, # MSHT20nnlo_nf4
23 27700, # MSHT20nlo_nf4
24 320900, # NNPDF31_nnlo_as_0118_nf_4
25 320500, # NNPDF31_nlo_as_0118_nf_4
26 334300, # NNPDF40_nnlo_as_01180_nf_4
27 334700, # NNPDF40_nlo_as_01180_nf_4
28 13191, # CT14nlo_NF4
29 25510, # MMHT2014nlo68clas118_nf4
30 # no CT18 nf4 PDFs available
31 ],
32 "scale_variations": [0.5, 1.0, 2.0],
33 }
34 raise ValueError(f"Unsupported MadGraphPDFSets value: {self}")
35
36
37def get_pdf_set(pdf_set):
38 """Return the MadGraph PDF setting for a strongly-typed preset."""
39 if not isinstance(pdf_set, MadGraphPDFSets):
40 raise TypeError(
41 f"pdf_set must be a MadGraphPDFSets value, got {type(pdf_set).__name__}."
42 )
43 return pdf_set.get_pdf_set_from_enum()