ATLAS Offline Software
W.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 W(PowhegV1):
11  """! Default Powheg configuration for single W-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(W, self).__init__(base_directory, "W", **kwargs)
25  self.is_reweightable = True
26 
27  # Add parameter validation functions
28  self.validation_functions.append("validate_decays")
29 
30 
31  self.allowed_decay_modes = ["w- > e- ve~", "w- > mu- vm~", "w- > tau- vt~", "w+ > e+ ve", "w+ > mu+ vm", "w+ > tau+ vt"]
32 
33  # Add all keywords for this process, overriding defaults if required
34  self.add_keyword("alphaem")
35  self.add_keyword("bmass_lhe")
36  self.add_keyword("bornktmin")
37  self.add_keyword("bornonly")
38  self.add_keyword("bornsuppfact")
39  self.add_keyword("bornzerodamp")
40  self.add_keyword("bottomthr")
41  self.add_keyword("bottomthrpdf")
42  self.add_keyword("btlscalect")
43  self.add_keyword("btlscalereal")
44  self.add_keyword("charmthr")
45  self.add_keyword("charmthrpdf")
46  self.add_keyword("check_bad_st1")
47  self.add_keyword("check_bad_st2")
48  self.add_keyword("CKM_Vcb")
49  self.add_keyword("CKM_Vcd")
50  self.add_keyword("CKM_Vcs")
51  self.add_keyword("CKM_Vtb")
52  self.add_keyword("CKM_Vtd")
53  self.add_keyword("CKM_Vts")
54  self.add_keyword("CKM_Vub")
55  self.add_keyword("CKM_Vud")
56  self.add_keyword("CKM_Vus")
57  self.add_keyword("cmass_lhe")
58  self.add_keyword("colltest")
59  self.add_keyword("facscfact", self.default_scales[0])
60  self.add_keyword("flg_debug")
61  self.add_keyword("foldcsi")
62  self.add_keyword("foldphi")
63  self.add_keyword("foldy")
64  self.add_keyword("hdamp")
65  self.add_keyword("hfact")
66  self.add_keyword("icsimax")
67  self.add_keyword("idvecbos", hidden=True)
68  self.add_keyword("ih1")
69  self.add_keyword("ih2")
70  self.add_keyword("itmx1", 2)
71  self.add_keyword("itmx2", 4)
72  self.add_keyword("iupperfsr")
73  self.add_keyword("iupperisr")
74  self.add_keyword("iymax")
75  self.add_keyword("lhans1", self.default_PDFs)
76  self.add_keyword("lhans2", self.default_PDFs)
77  self.add_keyword("manyseeds")
78  self.add_keyword("mass_high", 2.0 * list(self.parameters_by_name("beam_energy"))[0].value)
79  self.add_keyword("mass_low", 2.5)
80  self.add_keyword("masswindow_high")
81  self.add_keyword("masswindow_low")
82  self.add_keyword("ncall1", 60000)
83  self.add_keyword("ncall2", 80000)
84  self.add_keyword("nubound", 15000)
85  self.add_keyword("par_2gsupp")
86  self.add_keyword("par_diexp")
87  self.add_keyword("par_dijexp")
88  self.add_keyword("pdfreweight")
89  self.add_keyword("ptsqmin")
90  self.add_keyword("ptsupp")
91  self.add_keyword("radregion")
92  self.add_keyword("rand1")
93  self.add_keyword("rand2")
94  self.add_keyword("renscfact", self.default_scales[1])
95  self.add_keyword("running_width")
96  self.add_keyword("runningscale")
97  self.add_keyword("smartsig")
98  self.add_keyword("softtest")
99  self.add_keyword("sthw2")
100  self.add_keyword("testplots")
101  self.add_keyword("testsuda")
102  self.add_keyword("ubsigmadetails")
103  self.add_keyword("use-old-grid")
104  self.add_keyword("use-old-ubound")
105  self.add_keyword("vdecaymode", list(self.allowed_decay_modes)[0], name="decay_mode")
106  self.add_keyword("withdamp", 1)
107  self.add_keyword("withnegweights")
108  self.add_keyword("withsubtr")
109  self.add_keyword("Wmass")
110  self.add_keyword("Wwidth")
111  self.add_keyword("xupbound")
112  self.add_keyword("Zmass")
113  self.add_keyword("Zwidth")
114 
115  def validate_decays(self):
116  """! Validate idvecbos and vdecaymode keywords."""
117  self.expose() # convenience call to simplify syntax
118  self.check_decay_mode(self.decay_mode, self.allowed_decay_modes)
119  # Calculate appropriate decay mode numbers
120  list(self.parameters_by_keyword("idvecbos"))[0].value = 24 * [-1, +1][self.decay_mode.startswith("w+")]
121  __decay_mode_lookup = {"e- ve~": 1, "mu- vm~": 2, "tau- vt~": 3, "e+ ve": 1, "mu+ vm": 2, "tau+ vt": 3}
122  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.W.W
Default Powheg configuration for single W-boson production.
Definition: W.py:10
python.processes.powheg.W.W.is_reweightable
is_reweightable
Definition: W.py:25
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.W.W.allowed_decay_modes
allowed_decay_modes
List of allowed decay modes.
Definition: W.py:31
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.W.W.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: W.py:18
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.processes.powheg_base.PowhegBase.default_PDFs
def default_PDFs(self)
Default PDFs for this process.
Definition: powheg_base.py:241
python.processes.powheg.W.W.validate_decays
def validate_decays(self)
Validate idvecbos and vdecaymode keywords.
Definition: W.py:115
Trk::split
@ split
Definition: LayerMaterialProperties.h:38