![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 Timothée Theveneaux-Pelzer <tpelzer@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_SMEFT, self).
__init__(base_directory,
"ggHH_SMEFT", **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"]))
85 self.
add_keyword(
"fixedscale", description=
"Set renormalisation and factorisation scales to 2*m_H")
177 """! Creates the .grid file needed by this process."""
178 """! This function calls a python script provided by the authors, which is linked to the local directory."""
179 """! The code of this function is adapted from the script ${POWHEGPATH}/POWHEG-BOX-V2/ggHH/testrun/run.sh"""
182 logger.info(
'Now attempting to link locally the files needed by this Powheg process')
184 os.system(
"ln -s " + os.environ[
"POWHEGPATH"] +
"/POWHEG-BOX-V2/ggHH_SMEFT/Virtual/events.cdf events.cdf")
185 os.system(
"ln -s " + os.environ[
"POWHEGPATH"] +
"/POWHEG-BOX-V2/ggHH_SMEFT/Virtual/creategrid.py creategrid.py")
186 os.system(
"ln -s " + os.environ[
"POWHEGPATH"] +
"/POWHEG-BOX-V2/ggHH_SMEFT/shell/warmup_smeft.py warmup_smeft.py")
187 os.system(
"for grid in " + os.environ[
"POWHEGPATH"] +
"/POWHEG-BOX-V2/ggHH_SMEFT/Virtual/Virt_full_*E*.grid; do ln -s $grid ${grid##*/}; done")
189 logger.error(
'Impossible to link the needed files locally')
193 py_path_save = os.environ[
"PYTHONPATH"]
194 py_path_temp = os.environ[
"LHAPDF_INSTAL_PATH"] +
"/lib/python3.9/site-packages" +
":" + py_path_save
195 os.environ[
"PYTHONPATH"] = py_path_temp
196 logger.debug(f
'Temporarily setting PYTHONPATH to:\n{py_path_temp}')
202 if usesmeft_str ==
"0":
206 EFTcount_str = f
'{EFTcount:+n}'
209 renfac_str = f
'{renfact[0]:+.2f}' if type(renfact)
is list
else f
'{renfact:+.2f}'
211 lhapdfid_str =
str(lhapdfid[0])
if type(lhapdfid)
is list
else str(lhapdfid)
213 if usesmeft_str ==
"1":
214 GF_str = f
'{list(self.parameters_by_keyword("gfermi"))[0].value:+.4E}'
215 Lambda_str = f
'{list(self.parameters_by_keyword("Lambda"))[0].value:+.4E}'
216 CHbox_str = f
'{list(self.parameters_by_keyword("CHbox"))[0].value:+.4E}'
217 CHD_str = f
'{list(self.parameters_by_keyword("CHD"))[0].value:+.4E}'
218 CH_str = f
'{list(self.parameters_by_keyword("CH"))[0].value:+.4E}'
219 CuH_str = f
'{list(self.parameters_by_keyword("CuH"))[0].value:+.4E}'
220 CHG_str = f
'{list(self.parameters_by_keyword("CHG"))[0].value:+.4E}'
222 logger.info(
'Now trying to use warmup_smeft.py to create the Virt_full_*.grid file')
223 logger.info(f
'Parameters are: GF={GF_str}, Lambda={Lambda_str}, CHbox={CHbox_str}, CHD={CHD_str}, CH={CH_str}, CuH={CuH_str}, CHG={CHG_str}, EFTcount={EFTcount_str}, usesmeft={usesmeft_str}, lhapdfid={lhapdfid_str}, renfac={renfac_str}')
227 pythoncmd=f
"import warmup_smeft as ws; ws.combinegrids_smeft({Lambda_str}, {CHbox_str}, {CHD_str}, {CH_str}, {CuH_str}, {CHG_str}, {GF_str}, {EFTcount_str}, {usesmeft_str}, {lhapdfid_str}, {renfac_str})"
228 os.system(
"python3 -c \""+pythoncmd+
"\"")
230 logger.error(
'Impossible to use warmup_smeft.py to create the Virt_full_*.grid file')
234 chhh_str = f
'{list(self.parameters_by_keyword("chhh"))[0].value:+.4E}'
235 ct_str = f
'{list(self.parameters_by_keyword("ct"))[0].value:+.4E}'
236 ctt_str = f
'{list(self.parameters_by_keyword("ctt"))[0].value:+.4E}'
237 cggh_str = f
'{list(self.parameters_by_keyword("cggh"))[0].value:+.4E}'
238 cgghh_str = f
'{list(self.parameters_by_keyword("cgghh"))[0].value:+.4E}'
239 grid_file_name = f
'Virt_full_{chhh_str}_{ct_str}_{ctt_str}_{cggh_str}_{cgghh_str}-HEFT{EFTcount_str}.grid'
241 logger.info(
'Now trying to use creategrid.py to create the Virt_full_*.grid file')
242 logger.info(f
'File name: {grid_file_name}')
243 logger.info(f
'Parameters are: chhh={chhh_str}, ct={ct_str}, ctt={ctt_str}, cggh={cggh_str}, cgghh={cgghh_str}, EFTcount={EFTcount_str}, usesmeft={usesmeft_str}, lhapdfid={lhapdfid_str}, renfac={renfac_str}')
247 pythoncmd=f
"import creategrid as cg; cg.combinegrids('{grid_file_name}', {chhh_str}, {ct_str}, {ctt_str}, {cggh_str}, {cgghh_str}, {EFTcount_str}, {lhapdfid_str}, {renfac_str})"
248 os.system(
"python3 -c \""+pythoncmd+
"\"")
250 logger.error(
'Impossible to use creategrid.py to create the Virt_full_*.grid file')
254 os.environ[
"PYTHONPATH"] = py_path_save
255 logger.debug(f
'Setting PYTHONPATH back to:\n{py_path_save}')
257 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.
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
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.
def parameters_by_keyword(self, keyword)
Retrieve all parameters that use a given keyword.
validation_functions
List of validation functions to run before preparing runcard.
Default Powheg configuration for gluon-fusion Higgs boson production with quark mass and EW effects.
def default_PDFs(self)
Default PDFs for this process.
Base class for PowhegBox V2 processes.
def create_grid_file(self)
Creates the .grid file needed by this process.