ATLAS Offline Software
WZ.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_V2 import PowhegV2
5 
6 
7 logger = Logging.logging.getLogger("PowhegControl")
8 
9 
10 class WZ(PowhegV2):
11  """! Default Powheg configuration for W-boson and Z-boson production including interference for identical leptons.
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(WZ, self).__init__(base_directory, "WZ", **kwargs)
25 
26  # Add parameter validation functions
27  self.validation_functions.append("validate_decays")
28 
29 
30  self.allowed_decay_modes = ["w z > e ve e+ e-", "w z > e ve mu+ mu-", "w z > e ve tau+ tau-", "w z > j j j j",
31  "w z > j j l+ l-", "w z > j j v v~", "w z > l v j j", "w z > l v l+ l-",
32  "w z > l v v v~", "w z > mu vm e+ e-", "w z > mu vm mu+ mu-",
33  "w z > mu vm tau+ tau-", "w z > tau vt e+ e-", "w z > tau vt mu+ mu-",
34  "w z > tau vt tau+ tau-", "w- z > e- ve~ e+ e-", "w- z > e- ve~ mu+ mu-",
35  "w- z > e- ve~ tau+ tau-", "w- z > mu- vm~ e+ e-", "w- z > mu- vm~ mu+ mu-",
36  "w- z > mu- vm~ tau+ tau-", "w- z > tau- vt~ e+ e-", "w- z > tau- vt~ mu+ mu-",
37  "w- z > tau- vt~ tau+ tau-", "w+ z > e+ ve e+ e-", "w+ z > e+ ve mu+ mu-",
38  "w+ z > e+ ve tau+ tau-", "w+ z > mu+ vm e+ e-", "w+ z > mu+ vm mu+ mu-",
39  "w+ z > mu+ vm tau+ tau-", "w+ z > tau+ vt e+ e-", "w+ z > tau+ vt mu+ mu-",
40  "w+ z > tau+ vt tau+ tau-"]
41 
42  # Add all keywords for this process, overriding defaults if required
43  self.add_keyword("alphas_from_lhapdf")
44  self.add_keyword("bornktmin")
45  self.add_keyword("bornonly")
46  self.add_keyword("bornsuppfact")
47  self.add_keyword("bornzerodamp")
48  self.add_keyword("bottomthr")
49  self.add_keyword("bottomthrpdf")
50  self.add_keyword("btildeborn")
51  self.add_keyword("btildecoll")
52  self.add_keyword("btildereal")
53  self.add_keyword("btildevirt")
54  self.add_keyword("btlscalect")
55  self.add_keyword("btlscalereal")
56  self.add_keyword("charmthr")
57  self.add_keyword("charmthrpdf")
58  self.add_keyword("check_bad_st1")
59  self.add_keyword("check_bad_st2")
60  self.add_keyword("clobberlhe")
61  self.add_keyword("colltest")
62  self.add_keyword("compress_lhe")
63  self.add_keyword("compress_upb")
64  self.add_keyword("compute_rwgt")
65  self.add_keyword("delg1_g")
66  self.add_keyword("delg1_z")
67  self.add_keyword("delk_g")
68  self.add_keyword("delk_z")
69  self.add_keyword("diagCKM")
70  self.add_keyword("doublefsr")
71  self.add_keyword("dronly")
72  self.add_keyword("evenmaxrat")
73  self.add_keyword("facscfact", self.default_scales[0])
74  self.add_keyword("fastbtlbound")
75  self.add_keyword("fixedgrid")
76  self.add_keyword("fixedscale")
77  self.add_keyword("flg_debug")
78  self.add_keyword("foldcsi")
79  self.add_keyword("foldphi")
80  self.add_keyword("foldy")
81  self.add_keyword("fullrwgt")
82  self.add_keyword("fullrwgtmode")
83  self.add_keyword("hdamp")
84  self.add_keyword("hfact")
85  self.add_keyword("icsimax")
86  self.add_keyword("ih1")
87  self.add_keyword("ih2")
88  self.add_keyword("itmx1", 4)
89  self.add_keyword("itmx1rm")
90  self.add_keyword("itmx2", 5)
91  self.add_keyword("itmx2rm")
92  self.add_keyword("iupperfsr")
93  self.add_keyword("iupperisr")
94  self.add_keyword("iymax")
95  self.add_keyword("lambda_g")
96  self.add_keyword("lambda_z")
97  self.add_keyword("lhans1", self.default_PDFs)
98  self.add_keyword("lhans2", self.default_PDFs)
99  self.add_keyword("lhapdf6maxsets")
100  self.add_keyword("lhrwgt_descr")
101  self.add_keyword("lhrwgt_group_combine")
102  self.add_keyword("lhrwgt_group_name")
103  self.add_keyword("lhrwgt_id")
104  self.add_keyword("LOevents")
105  self.add_keyword("manyseeds")
106  self.add_keyword("max_io_bufsize")
107  self.add_keyword("maxseeds")
108  self.add_keyword("minlo")
109  self.add_keyword("mintupbratlim")
110  self.add_keyword("mintupbxless")
111  self.add_keyword("mllmin", 20.0)
112  self.add_keyword("ncall1", 400000)
113  self.add_keyword("ncall1rm")
114  self.add_keyword("ncall2", 1000000)
115  self.add_keyword("ncall2rm")
116  self.add_keyword("ncallfrominput")
117  self.add_keyword("noevents")
118  self.add_keyword("novirtual")
119  self.add_keyword("nubound", 1000000)
120  self.add_keyword("olddij")
121  self.add_keyword("par_2gsupp")
122  self.add_keyword("par_diexp")
123  self.add_keyword("par_dijexp")
124  self.add_keyword("parallelstage")
125  self.add_keyword("pdfreweight")
126  self.add_keyword("ptsqmin")
127  self.add_keyword("ptsupp")
128  self.add_keyword("radregion")
129  self.add_keyword("rand1")
130  self.add_keyword("rand2")
131  self.add_keyword("renscfact", self.default_scales[1])
132  self.add_keyword("runningwidth")
133  self.add_keyword("rwl_add")
134  self.add_keyword("rwl_file")
135  self.add_keyword("rwl_format_rwgt")
136  self.add_keyword("rwl_group_events")
137  self.add_keyword("skipextratests")
138  self.add_keyword("smartsig")
139  self.add_keyword("softtest")
140  self.add_keyword("stage2init")
141  self.add_keyword("storeinfo_rwgt")
142  self.add_keyword("storemintupb")
143  self.add_keyword("testplots")
144  self.add_keyword("testsuda")
145  self.add_keyword("tevscale")
146  self.add_keyword("ubexcess_correct")
147  self.add_keyword("ubsigmadetails")
148  self.add_keyword("use-old-grid")
149  self.add_keyword("use-old-ubound")
150  self.add_keyword("withdamp", 1)
151  self.add_keyword("withinterference")
152  self.add_keyword("withnegweights")
153  self.add_keyword("withsubtr")
154  self.add_keyword("WmZevee", self.allowed_decay_modes[0], name="decay_mode", hidden=False)
155  self.add_keyword("WmZevmumu")
156  self.add_keyword("WmZevtautau")
157  self.add_keyword("WmZmuvee")
158  self.add_keyword("WmZmuvmumu")
159  self.add_keyword("WmZmuvtautau")
160  self.add_keyword("WmZtauvee")
161  self.add_keyword("WmZtauvmumu")
162  self.add_keyword("WmZtauvtautau")
163  self.add_keyword("WpZevee")
164  self.add_keyword("WpZevmumu")
165  self.add_keyword("WpZevtautau")
166  self.add_keyword("WpZmuvee")
167  self.add_keyword("WpZmuvmumu")
168  self.add_keyword("WpZmuvtautau")
169  self.add_keyword("WpZtauvee")
170  self.add_keyword("WpZtauvmumu")
171  self.add_keyword("WpZtauvtautau")
172  self.add_keyword("WZevee")
173  self.add_keyword("WZevmumu")
174  self.add_keyword("WZevtautau")
175  self.add_keyword("WZlvll")
176  self.add_keyword("WZlvqq")
177  self.add_keyword("WZlvvv")
178  self.add_keyword("WZmuvee")
179  self.add_keyword("WZmuvmumu")
180  self.add_keyword("WZmuvtautau")
181  self.add_keyword("WZqqll")
182  self.add_keyword("WZqqqq")
183  self.add_keyword("WZqqvv")
184  self.add_keyword("WZtauvee")
185  self.add_keyword("WZtauvmumu")
186  self.add_keyword("WZtauvtautau")
187  self.add_keyword("xgriditeration")
188  self.add_keyword("xupbound", 10)
189  self.add_keyword("zerowidth")
190 
191  def validate_decays(self):
192  """! Validate the various decay mode keywords."""
193  # See https://docs.google.com/spreadsheets/d/1Aa7FwB74ppHbXles5LyHrKGlvUFi5PxbZC-Mrc3Lz90 for meanings
194  self.expose() # convenience call to simplify syntax
195  self.check_decay_mode(self.decay_mode, self.allowed_decay_modes)
196  # Enable appropriate decay mode
197  list(self.parameters_by_keyword("WmZevee"))[0].value = 0 # disable the one used as a proxy for decay mode
198  __decay_mode_lookup = {"w z > e ve e+ e-": "WZevee",
199  "w z > e ve mu+ mu-": "WZevmumu",
200  "w z > e ve tau+ tau-": "WZevtautau",
201  "w z > j j j j": "WZqqqq",
202  "w z > j j l+ l-": "WZqqll",
203  "w z > j j v v~": "WZqqvv",
204  "w z > l v j j": "WZlvqq",
205  "w z > l v l+ l-": "WZlvll",
206  "w z > l v v v~": "WZlvvv",
207  "w z > mu vm e+ e-": "WZmuvee",
208  "w z > mu vm mu+ mu-": "WZmuvmumu",
209  "w z > mu vm tau+ tau-": "WZmuvtautau",
210  "w z > tau vt e+ e-": "WZtauvee",
211  "w z > tau vt mu+ mu-": "WZtauvmumu",
212  "w z > tau vt tau+ tau-": "WZtauvtautau",
213  "w- z > e- ve~ e+ e-": "WmZevee",
214  "w- z > e- ve~ mu+ mu-": "WmZevmumu",
215  "w- z > e- ve~ tau+ tau-": "WmZevtautau",
216  "w- z > mu- vm~ e+ e-": "WmZmuvee",
217  "w- z > mu- vm~ mu+ mu-": "WmZmuvmumu",
218  "w- z > mu- vm~ tau+ tau-": "WmZmuvtautau",
219  "w- z > tau- vt~ e+ e-": "WmZtauvee",
220  "w- z > tau- vt~ mu+ mu-": "WmZtauvmumu",
221  "w- z > tau- vt~ tau+ tau-": "WmZtauvtautau",
222  "w+ z > e+ ve e+ e-": "WpZevee",
223  "w+ z > e+ ve mu+ mu-": "WpZevmumu",
224  "w+ z > e+ ve tau+ tau-": "WpZevtautau",
225  "w+ z > mu+ vm e+ e-": "WpZmuvee",
226  "w+ z > mu+ vm mu+ mu-": "WpZmuvmumu",
227  "w+ z > mu+ vm tau+ tau-": "WpZmuvtautau",
228  "w+ z > tau+ vt e+ e-": "WpZtauvee",
229  "w+ z > tau+ vt mu+ mu-": "WpZtauvmumu",
230  "w+ z > tau+ vt tau+ tau-": "WpZtauvtautau"}
231  list(self.parameters_by_keyword(__decay_mode_lookup[self.decay_mode]))[0].value = 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.WZ.WZ.validate_decays
def validate_decays(self)
Validate the various decay mode keywords.
Definition: WZ.py:191
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.powheg.WZ.WZ.allowed_decay_modes
allowed_decay_modes
List of allowed decay modes.
Definition: WZ.py:30
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.WZ.WZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: WZ.py:18
python.processes.powheg.WZ.WZ
Default Powheg configuration for W-boson and Z-boson production including interference for identical ...
Definition: WZ.py:10
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.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