![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
3 from AthenaCommon
import Logging
4 from ..powheg_V2
import PowhegV2
7 logger = Logging.logging.getLogger(
"PowhegControl")
11 """! Default Powheg configuration for gluon-fusion Higgs boson production with quark mass and EW effects.
13 Create a configurable object with all applicable Powheg options.
15 @author James Robinson <james.robinson@cern.ch>
19 """! Constructor: all process options are set here.
21 @param base_directory: path to PowhegBox code.
22 @param kwargs dictionary of arguments from Generate_tf.
24 super(ggF_HH, self).
__init__(base_directory,
"ggHH", **kwargs)
33 os.environ[
"PYTHONPATH"] +=
":" + os.environ[
"PWD"]
37 lhapdf_python_path =
"/cvmfs/sft.cern.ch/lcg/releases/LCG_101/MCGenerators/lhapdf/6.3.0/x86_64-centos7-gcc8-opt/lib/python3.9/site-packages"
38 os.environ[
"PYTHONPATH"] +=
":" + lhapdf_python_path
40 logger.info(
'PYTHONPATH is now:\n{}'.
format(os.environ[
"PYTHONPATH"]))
74 self.
add_keyword(
"fixedscale", description=
"Set renormalisation and factorisation scales to 2*m_H")
162 """! Creates the .grid file needed by this process."""
163 """! This function calls a python script provided by the authors, which is linked to the local directory."""
164 """! The code of this function is adapted from the script ${POWHEGPATH}/POWHEG-BOX-V2/ggHH/testrun/run.sh"""
167 logger.info(
'Now attempting to link locally the files needed by this Powheg process')
169 os.system(
"ln -s " + os.environ[
"POWHEGPATH"] +
"/POWHEG-BOX-V2/ggHH/Virtual/events.cdf events.cdf")
170 os.system(
"ln -s " + os.environ[
"POWHEGPATH"] +
"/POWHEG-BOX-V2/ggHH/Virtual/creategrid.py creategrid.py")
171 os.system(
"for grid in " + os.environ[
"POWHEGPATH"] +
"/POWHEG-BOX-V2/ggHH/Virtual/Virt_full_*E*.grid; do ln -s $grid ${grid##*/}; done")
173 logger.error(
'Impossible to link the needed files locally')
177 py_path_save = os.environ[
"PYTHONPATH"]
178 py_path_temp = os.environ[
"LHAPDF_INSTAL_PATH"] +
"/lib/python3.9/site-packages" +
":" + py_path_save
179 os.environ[
"PYTHONPATH"] = py_path_temp
180 logger.debug(f
'Temporarily setting PYTHONPATH to:\n{py_path_temp}')
184 chhh_str = f
'{list(self.parameters_by_keyword("chhh"))[0].value:+.4E}'
185 ct_str = f
'{list(self.parameters_by_keyword("ct"))[0].value:+.4E}'
186 ctt_str = f
'{list(self.parameters_by_keyword("ctt"))[0].value:+.4E}'
187 cggh_str = f
'{list(self.parameters_by_keyword("cggh"))[0].value:+.4E}'
188 cgghh_str = f
'{list(self.parameters_by_keyword("cgghh"))[0].value:+.4E}'
189 grid_file_name = f
'Virt_full_{chhh_str}_{ct_str}_{ctt_str}_{cggh_str}_{cgghh_str}.grid'
191 logger.info(
'Now trying to use creategrid.py to create the Virt_full_*.grid file')
192 logger.info(f
'File name: {grid_file_name}')
193 logger.info(f
'Parameters are: chhh={chhh_str}, ct={ct_str}, ctt={ctt_str}, cggh={cggh_str}, cgghh={cgghh_str}')
197 pythoncmd=f
"import creategrid as cg; cg.combinegrids('{grid_file_name}', {chhh_str}, {ct_str}, {ctt_str}, {cggh_str}, {cgghh_str})"
198 os.system(
"python3 -c \""+pythoncmd+
"\"")
200 logger.error(
'Impossible to use creategrid.py to create the Virt_full_*.grid file')
204 os.environ[
"PYTHONPATH"] = py_path_save
205 logger.debug(f
'Setting PYTHONPATH back to:\n{py_path_save}')
207 logger.info(
'Although the produced Virt_full_*.grid file now exists in the local directory, Powheg will later try to find it in all directories contained in $PYTHONPATH. This will produce several "not found" info messages which can safely be ignored.')
def expose(self)
Add all names to the interface of this object.
Default Powheg configuration for gluon-fusion Higgs boson production with quark mass and EW effects.
def create_grid_file(self)
Creates the .grid file needed by this process.
def default_scales(self)
Default scale variations for this process.
def add_keyword(self, keyword, value=None, name=None, frozen=None, hidden=None, description=None, **kwargs)
Register configurable parameter that is exposed to the user.
validation_functions
List of validation functions to run before preparing runcard.
def default_PDFs(self)
Default PDFs for this process.
Base class for PowhegBox V2 processes.
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.