ATLAS Offline Software
Z_EW.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 import os
4 from AthenaCommon import Logging
5 from ..external import ExternalPHOTOS
6 from ..powheg_V2 import PowhegV2
7 
8 
9 logger = Logging.logging.getLogger("PowhegControl")
10 
11 
12 class Z_EW(PowhegV2):
13  """! Default Powheg configuration for single Z-boson production with electroweak corrections.
14 
15  Create a configurable object with all applicable Powheg options.
16 
17  @author James Robinson <james.robinson@cern.ch>
18  """
19 
20  def __init__(self, base_directory, **kwargs):
21  """! Constructor: all process options are set here.
22 
23  @param base_directory: path to PowhegBox code.
24  @param kwargs dictionary of arguments from Generate_tf.
25  """
26  super(Z_EW, self).__init__(base_directory, "Z_ew-BMNNPV", **kwargs)
27 
28  # Add algorithms to the sequence
29  self.add_algorithm(ExternalPHOTOS(os.path.split(self.executable)[0], "main-PHOTOS-lhef"))
30 
31  # Add parameter validation functions
32  self.validation_functions.append("validate_decays")
33 
34 
35  self.allowed_decay_modes = ["z > e+ e-", "z > mu+ mu-", "z > tau+ tau-"]
36 
37  # Add all keywords for this process, overriding defaults if required
38  self.add_keyword("alphaem_z")
39  self.add_keyword("alphaem")
40  self.add_keyword("bmass_lhe")
41  self.add_keyword("Bmass")
42  self.add_keyword("bornktmin")
43  self.add_keyword("bornonly")
44  self.add_keyword("bornsuppfact")
45  self.add_keyword("bornzerodamp")
46  self.add_keyword("bottomthr")
47  self.add_keyword("bottomthrpdf")
48  self.add_keyword("btildeborn")
49  self.add_keyword("btildecoll")
50  self.add_keyword("btildereal")
51  self.add_keyword("btildevirt")
52  self.add_keyword("btlscalect")
53  self.add_keyword("btlscalereal")
54  self.add_keyword("charmthr")
55  self.add_keyword("charmthrpdf")
56  self.add_keyword("check_bad_st1")
57  self.add_keyword("check_bad_st2")
58  self.add_keyword("clobberlhe")
59  self.add_keyword("cmass_lhe")
60  self.add_keyword("Cmass")
61  self.add_keyword("colltest")
62  self.add_keyword("complexmasses")
63  self.add_keyword("compress_lhe")
64  self.add_keyword("compress_upb")
65  self.add_keyword("compute_rwgt")
66  self.add_keyword("Dmass")
67  self.add_keyword("doublefsr")
68  self.add_keyword("Elmass")
69  self.add_keyword("emalpharunning")
70  self.add_keyword("evenmaxrat")
71  self.add_keyword("ew_ho_only")
72  self.add_keyword("ew_ho")
73  self.add_keyword("facscfact", self.default_scales[0])
74  self.add_keyword("fastbtlbound")
75  self.add_keyword("fixedgrid")
76  self.add_keyword("flg_debug")
77  self.add_keyword("foldcsi", 5)
78  self.add_keyword("foldphi", 2)
79  self.add_keyword("foldy", 5)
80  self.add_keyword("fullrwgt")
81  self.add_keyword("fullrwgtmode")
82  self.add_keyword("gmu")
83  self.add_keyword("hdamp")
84  self.add_keyword("hfact")
85  self.add_keyword("Hmass")
86  self.add_keyword("Hwidth")
87  self.add_keyword("icsimax")
88  self.add_keyword("iftopinloop")
89  self.add_keyword("ih1")
90  self.add_keyword("ih2")
91  self.add_keyword("itmx1", 5)
92  self.add_keyword("itmx1rm")
93  self.add_keyword("itmx2", 6)
94  self.add_keyword("itmx2rm")
95  self.add_keyword("iupperfsr")
96  self.add_keyword("iupperisr")
97  self.add_keyword("iymax")
98  self.add_keyword("kt2minqed")
99  self.add_keyword("lepaslight")
100  self.add_keyword("lhans1", self.default_PDFs)
101  self.add_keyword("lhans2", self.default_PDFs)
102  self.add_keyword("lhapdf6maxsets")
103  self.add_keyword("lhrwgt_descr")
104  self.add_keyword("lhrwgt_group_combine")
105  self.add_keyword("lhrwgt_group_name")
106  self.add_keyword("lhrwgt_id")
107  self.add_keyword("LOevents")
108  self.add_keyword("manyseeds")
109  self.add_keyword("mass_high", 2.0 * list(self.parameters_by_name("beam_energy"))[0].value)
110  self.add_keyword("mass_low", 10.0)
111  self.add_keyword("max_io_bufsize")
112  self.add_keyword("maxseeds")
113  self.add_keyword("minlo")
114  self.add_keyword("mintupbratlim")
115  self.add_keyword("mintupbxless")
116  self.add_keyword("Mumass")
117  self.add_keyword("ncall1", 10000)
118  self.add_keyword("ncall1rm")
119  self.add_keyword("ncall2", 30000)
120  self.add_keyword("ncall2rm")
121  self.add_keyword("ncallfrominput")
122  self.add_keyword("new_damp")
123  self.add_keyword("nnlops")
124  self.add_keyword("no_ew")
125  self.add_keyword("no_strong")
126  self.add_keyword("noevents")
127  self.add_keyword("novirtual")
128  self.add_keyword("nubound", 40000)
129  self.add_keyword("olddij")
130  self.add_keyword("par_2gsupp")
131  self.add_keyword("par_diexp")
132  self.add_keyword("par_dijexp")
133  self.add_keyword("parallelstage")
134  self.add_keyword("pdfreweight", 0)
135  self.add_keyword("photoninduced")
136  self.add_keyword("phsp_Zm")
137  self.add_keyword("phsp_Zw")
138  self.add_keyword("powhegv2opt")
139  self.add_keyword("ptsqmin")
140  self.add_keyword("ptsupp")
141  self.add_keyword("QED-only")
142  self.add_keyword("quadrupleprec")
143  self.add_keyword("radregion")
144  self.add_keyword("rand1")
145  self.add_keyword("rand2")
146  self.add_keyword("renscfact", self.default_scales[1])
147  self.add_keyword("resc_em_alpha")
148  self.add_keyword("runningscale")
149  self.add_keyword("rwl_add")
150  self.add_keyword("rwl_file")
151  self.add_keyword("rwl_format_rwgt")
152  self.add_keyword("rwl_group_events")
153  self.add_keyword("s2eff")
154  self.add_keyword("use-s2effin")
155  self.add_keyword("scheme")
156  self.add_keyword("SI_inputfile")
157  self.add_keyword("SI_kt2minqed")
158  self.add_keyword("SI_maxshowerevents")
159  self.add_keyword("SI_no_tworadevents")
160  self.add_keyword("skipextratests")
161  self.add_keyword("smartsig")
162  self.add_keyword("Smass")
163  self.add_keyword("softtest")
164  self.add_keyword("stage2init")
165  self.add_keyword("storeinfo_rwgt")
166  self.add_keyword("storemintupb")
167  self.add_keyword("Taumass")
168  self.add_keyword("testplots")
169  self.add_keyword("testsuda")
170  self.add_keyword("Tmass")
171  self.add_keyword("ubexcess_correct")
172  self.add_keyword("ubsigmadetails")
173  self.add_keyword("Umass")
174  self.add_keyword("use-old-grid")
175  self.add_keyword("use-old-ubound")
176  self.add_keyword("vdecaymode", self.allowed_decay_modes[0], name="decay_mode")
177  self.add_keyword("weak-only")
178  self.add_keyword("withdamp")
179  self.add_keyword("withnegweights")
180  self.add_keyword("withsubtr")
181  self.add_keyword("Wmass")
182  self.add_keyword("Wwidth")
183  self.add_keyword("xgriditeration")
184  self.add_keyword("xupbound", 4)
185  self.add_keyword("Zmass")
186  self.add_keyword("Zwidth")
187 
188  def validate_decays(self):
189  """! Validate vdecaymode keyword and check that 'no_ew' is compatible with 'PHOTOS_enabled'."""
190  # If PHOTOS is disabled but EW effects are on, any subsequent PHOTOS process will have to run in vetoed mode which is not supported
191  if not list(self.externals["PHOTOS"].parameters_by_keyword("PHOTOS_enabled"))[0].value and list(self.parameters_by_keyword("no_ew"))[0].value == 0:
192  logger.error("Attempting to run with native PHOTOS disabled but with EW corrections on.")
193  logger.error("This would require any later PHOTOS generation to run in vetoed mode.")
194  logger.error("Please change 'PHOTOS_enabled' and/or 'no_ew' in your jobOptions.")
195  raise ValueError("Incompatible options. Please change 'PHOTOS_enabled' and/or 'no_ew' in your jobOptions.")
196  # Check that PHOTOS executable exists
197  if not os.path.isfile(self.externals["PHOTOS"].executable):
198  logger.error("Attempting to configure native PHOTOS but executable not found at {0}".format(self.externals["PHOTOS"].executable))
199  logger.error("Please consider changing 'PHOTOS_enabled' in your jobOptions")
200  raise IOError("Could not find PHOTOS executable: {0}".format(self.externals["PHOTOS"].executable))
201  self.expose() # convenience call to simplify syntax
202  self.check_decay_mode(self.decay_mode, self.allowed_decay_modes)
203  # Calculate appropriate decay mode numbers
204  __decay_mode_lookup = {"e+ e-": 11, "mu+ mu-": 13, "tau+ tau-": 15}
205  list(self.parameters_by_keyword("vdecaymode"))[0].value = __decay_mode_lookup[self.decay_mode.split("> ")[1]]
python.processes.configurable.Configurable.expose
def expose(self)
Add all names to the interface of this object.
Definition: configurable.py:46
python.processes.powheg_base.PowhegBase.add_algorithm
def add_algorithm(self, alg_or_process)
Add an algorithm or external process to the sequence.
Definition: powheg_base.py:208
vtune_athena.format
format
Definition: vtune_athena.py:14
python.processes.configurable.Configurable.parameters_by_name
def parameters_by_name(self, name)
Retrieve all parameters that use a given name.
Definition: configurable.py:64
python.processes.powheg_base.PowhegBase.default_scales
def default_scales(self)
Default scale variations for this process.
Definition: powheg_base.py:246
python.processes.configurable.Configurable.add_keyword
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.
Definition: configurable.py:21
python.processes.external.external_photos.ExternalPHOTOS
Class for running external PHOTOS process.
Definition: external_photos.py:10
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.processes.powheg.Z_EW.Z_EW.validate_decays
def validate_decays(self)
Validate vdecaymode keyword and check that 'no_ew' is compatible with 'PHOTOS_enabled'.
Definition: Z_EW.py:188
python.processes.configurable.Configurable.parameters_by_keyword
def parameters_by_keyword(self, keyword)
Retrieve all parameters that use a given keyword.
Definition: configurable.py:57
python.processes.powheg.Z_EW.Z_EW.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: Z_EW.py:20
python.processes.powheg.Z_EW.Z_EW
Default Powheg configuration for single Z-boson production with electroweak corrections.
Definition: Z_EW.py:12
python.processes.powheg_base.PowhegBase.validation_functions
validation_functions
List of validation functions to run before preparing runcard.
Definition: powheg_base.py:179
python.processes.powheg_base.PowhegBase.check_decay_mode
def check_decay_mode(self, decay_mode, allowed_decay_modes=None)
Check whether a decay mode is allowed an raise an exception if it is not.
Definition: powheg_base.py:283
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.processes.powheg_base.PowhegBase.externals
externals
List of external processes to schedule.
Definition: powheg_base.py:176
python.processes.powheg_base.PowhegBase.default_PDFs
def default_PDFs(self)
Default PDFs for this process.
Definition: powheg_base.py:241
python.processes.powheg_V2.PowhegV2
Base class for PowhegBox V2 processes.
Definition: powheg_V2.py:6
python.processes.powheg_base.PowhegBase.executable
executable
Powheg executable that will be used.
Definition: powheg_base.py:154
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
python.processes.powheg.Z_EW.Z_EW.allowed_decay_modes
allowed_decay_modes
List of allowed decay modes.
Definition: Z_EW.py:35