ATLAS Offline Software
Z.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaCommon import Logging
4 from ..powheg_V1 import PowhegV1
5 
6 
7 logger = Logging.logging.getLogger("PowhegControl")
8 
9 
10 class Z(PowhegV1):
11  """! Default Powheg configuration for single Z-boson production.
12 
13  Create a configurable object with all applicable Powheg options.
14 
15  @author James Robinson <james.robinson@cern.ch>
16  """
17 
18  def __init__(self, base_directory, **kwargs):
19  """! Constructor: all process options are set here.
20 
21  @param base_directory: path to PowhegBox code.
22  @param kwargs dictionary of arguments from Generate_tf.
23  """
24  super(Z, self).__init__(base_directory, "Z", **kwargs)
25 
26  # Add parameter validation functions
27  self.validation_functions.append("validate_decays")
28 
29 
30  self.allowed_decay_modes = ["z > e+ e-", "z > mu+ mu-", "z > tau+ tau-", "z > ve ve~", "z > vm vm~", "z > vt vt~"]
31 
32  # Add all keywords for this process, overriding defaults if required
33  self.add_keyword("alphaem")
34  self.add_keyword("bmass_lhe")
35  self.add_keyword("bornktmin")
36  self.add_keyword("bornonly")
37  self.add_keyword("bornsuppfact")
38  self.add_keyword("bornzerodamp")
39  self.add_keyword("bottomthr")
40  self.add_keyword("bottomthrpdf")
41  self.add_keyword("btlscalect")
42  self.add_keyword("btlscalereal")
43  self.add_keyword("charmthr")
44  self.add_keyword("charmthrpdf")
45  self.add_keyword("check_bad_st1")
46  self.add_keyword("check_bad_st2")
47  self.add_keyword("cmass_lhe")
48  self.add_keyword("colltest")
49  self.add_keyword("facscfact", self.default_scales[0])
50  self.add_keyword("flg_debug")
51  self.add_keyword("foldcsi", 5)
52  self.add_keyword("foldphi", 2)
53  self.add_keyword("foldy", 2)
54  self.add_keyword("hdamp")
55  self.add_keyword("hfact")
56  self.add_keyword("icsimax")
57  self.add_keyword("ih1")
58  self.add_keyword("ih2")
59  self.add_keyword("itmx1", 5)
60  self.add_keyword("itmx2", 2)
61  self.add_keyword("iupperfsr")
62  self.add_keyword("iupperisr")
63  self.add_keyword("iymax")
64  self.add_keyword("lhans1", self.default_PDFs)
65  self.add_keyword("lhans2", self.default_PDFs)
66  self.add_keyword("manyseeds")
67  self.add_keyword("mass_high", 2.0 * list(self.parameters_by_name("beam_energy"))[0].value)
68  self.add_keyword("mass_low", 60.0)
69  self.add_keyword("masswindow_high")
70  self.add_keyword("masswindow_low")
71  self.add_keyword("ncall1", 40000)
72  self.add_keyword("ncall2", 70000)
73  self.add_keyword("nubound", 10000)
74  self.add_keyword("par_2gsupp")
75  self.add_keyword("par_diexp")
76  self.add_keyword("par_dijexp")
77  self.add_keyword("pdfreweight")
78  self.add_keyword("ptsqmin")
79  self.add_keyword("ptsupp")
80  self.add_keyword("radregion")
81  self.add_keyword("rand1")
82  self.add_keyword("rand2")
83  self.add_keyword("renscfact", self.default_scales[1])
84  self.add_keyword("running_width")
85  self.add_keyword("runningscale")
86  self.add_keyword("smartsig")
87  self.add_keyword("softtest")
88  self.add_keyword("sthw2")
89  self.add_keyword("testplots")
90  self.add_keyword("testsuda")
91  self.add_keyword("ubsigmadetails")
92  self.add_keyword("use-old-grid")
93  self.add_keyword("use-old-ubound")
94  self.add_keyword("vdecaymode", self.allowed_decay_modes[0], name="decay_mode")
95  self.add_keyword("withdamp")
96  self.add_keyword("withnegweights")
97  self.add_keyword("withsubtr")
98  self.add_keyword("Wmass")
99  self.add_keyword("Wwidth")
100  self.add_keyword("xupbound")
101  self.add_keyword("Zmass")
102  self.add_keyword("Zwidth")
103 
104  def validate_decays(self):
105  """! Validate vdecaymode keyword."""
106  self.expose() # convenience call to simplify syntax
107  self.check_decay_mode(self.decay_mode, self.allowed_decay_modes)
108  # Calculate appropriate decay mode numbers
109  __decay_mode_lookup = {"e+ e-": 1, "mu+ mu-": 2, "tau+ tau-": 3, "ve ve~": 4, "vm vm~": 5, "vt vt~": 6}
110  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.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
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
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_V1.PowhegV1
Base class for PowhegBox V1 processes.
Definition: powheg_V1.py:6
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
python.processes.powheg.Z.Z.allowed_decay_modes
allowed_decay_modes
List of allowed decay modes.
Definition: Z.py:30
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.processes.powheg.Z.Z.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: Z.py:18
python.processes.powheg_base.PowhegBase.default_PDFs
def default_PDFs(self)
Default PDFs for this process.
Definition: powheg_base.py:241
python.processes.powheg.Z.Z
Default Powheg configuration for single Z-boson production.
Definition: Z.py:10
python.processes.powheg.Z.Z.validate_decays
def validate_decays(self)
Validate vdecaymode keyword.
Definition: Z.py:104
Trk::split
@ split
Definition: LayerMaterialProperties.h:38