ATLAS Offline Software
powheg_RES.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 from .powheg_base import PowhegBase
4 import glob
5 
6 
8  """! Base class for PowhegBox RES processes.
9 
10  All RES processes inherit from this class.
11 
12  @author James Robinson <james.robinson@cern.ch>
13  """
14 
15  def __init__(self, base_directory, executable_name, **kwargs):
16  """! Constructor.
17 
18  @param base_directory path to PowhegBox code.
19  @param executable_name folder containing appropriate PowhegBox executable.
20  @param is_LO True if this is a leading-order process.
21  @param warning_output list of patterns which if found in the output will be treated as warning in the log.
22  @param error_output list of patterns which if found in the output will be treated as error in the log.
23  @param info_output list of patterns which if found in the output will be treated as info in the log.
24  """
25  super(PowhegRES, self).__init__(base_directory, "POWHEG-BOX-RES", executable_name, warning_output = [], info_output = [], error_output = [], **kwargs)
26 
27  @property
28  def default_PDFs(self):
29  """! Default PDFs for this process."""
30  __PDF_list = list(range(260000, 260101)) # NNPDF30_nlo_as_0118 central with eigensets
31  __PDF_list += [266000, 265000] # NNPDF30_nlo_as_0119 and NNPDF30_nlo_as_0117
32  __PDF_list += [303200] # NNPDF30_nnlo_as_0118_hessian
33  __PDF_list += [27400, 27100] # MSHT20nnlo_as118, MSHT20nlo_as118
34  __PDF_list += [14000, 14400] # CT18NNLO, CT18NLO
35  __PDF_list += [304400, 304200] # NNPDF31_nnlo_as_0118_hessian, NNPDF31_nlo_as_0118_hessian
36  __PDF_list += [331500, 331100] # NNPDF40_nnlo_as_01180_hessian, NNPDF40_nlo_as_01180
37  __PDF_list += [14200, 14300, 14100] # CT18ANNLO, CT18XNNLO and CT18ZNNLO
38  __PDF_list += list(range(93300, 93343)) # PDF4LHC21_40_pdfas with eigensets
39  return __PDF_list
40 
41  @property
42  def default_scales(self):
43  """! Default scale variations for this process."""
44  return [[1.0, 1.0, 1.0, 0.5, 0.5, 2.0, 2.0],\
45  [1.0, 0.5, 2.0, 0.5, 1.0, 1.0, 2.0]]
46 
47  @property
48  def files_for_cleanup(self):
49  """! Wildcarded list of files created by this process that can be deleted."""
50  return [
51  "allborn_equiv",
52  "FlavRegList",
53  "mint*.top",
54  "parameters.ol",
55  "pwg*.top",
56  "pwgboundviolations*.dat",
57  "pwgcounters*.dat",
58  "pwgseeds.dat",
59  "pwhg_checklimits",
60  "sigreal_btl0_equiv",
61  "sigregular_equiv",
62  "sigvirtual_equiv"
63  ]
64 
65 
66  @property
68  """! Wildcarded list of integration files that might be created by this process."""
69  return [
70  "pwg*upb*.dat",
71  "pwg*xgrid*.dat",
72  "pwgfullgrid*.dat",
73  "pwggrid*.dat",
74  "pwgubound*.dat",
75  "pwg*stat.dat",
76  ]
77 
78  @property
80  """! Wildcarded list of integration files that are needed for this process."""
81  return self.integration_file_names
82 
83  @property
84  def powheg_version(self):
85  """! Version of PowhegBox process."""
86  return "RES"
87 
88  def stage_is_completed(self, stage):
89  """! Set whether the specified POWHEG-BOX generation stage is complete."""
90  if stage == 1:
91  required_files = ["pwg*xgrid*.dat"]
92  elif stage == 2:
93  required_files = ["pwg*upb*.dat", "pwggrid*.dat"]
94  elif stage == 3:
95  required_files = ["pwgfullgrid*.dat", "pwgubound*.dat"]
96  else:
97  return False
98 
99  # Check that required files have been found
100  for required_file in required_files:
101  if not glob.glob(required_file):
102  return False
103  return True
python.processes.powheg_base.PowhegBase
Base class for PowhegBox processes.
Definition: powheg_base.py:14
python.processes.powheg_base.PowhegBase.integration_file_names
def integration_file_names(self)
Wildcarded list of integration files that might be created by this process.
Definition: powheg_base.py:223
python.processes.powheg_RES.PowhegRES.__init__
def __init__(self, base_directory, executable_name, **kwargs)
Constructor.
Definition: powheg_RES.py:15
python.processes.powheg_RES.PowhegRES.default_PDFs
def default_PDFs(self)
Default PDFs for this process.
Definition: powheg_RES.py:28
python.processes.powheg_RES.PowhegRES.default_scales
def default_scales(self)
Default scale variations for this process.
Definition: powheg_RES.py:42
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.processes.powheg_RES.PowhegRES.powheg_version
def powheg_version(self)
Version of PowhegBox process.
Definition: powheg_RES.py:84
python.processes.powheg_RES.PowhegRES.files_for_cleanup
def files_for_cleanup(self)
Wildcarded list of files created by this process that can be deleted.
Definition: powheg_RES.py:48
python.processes.powheg_RES.PowhegRES.mandatory_integration_file_names
def mandatory_integration_file_names(self)
Wildcarded list of integration files that are needed for this process.
Definition: powheg_RES.py:79
python.processes.powheg_RES.PowhegRES.integration_file_names
def integration_file_names(self)
Wildcarded list of integration files that might be created by this process.
Definition: powheg_RES.py:67
python.processes.powheg_RES.PowhegRES
Base class for PowhegBox RES processes.
Definition: powheg_RES.py:7
python.processes.powheg_RES.PowhegRES.stage_is_completed
def stage_is_completed(self, stage)
Set whether the specified POWHEG-BOX generation stage is complete.
Definition: powheg_RES.py:88