ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
PowhegControl
python
processes
powheg
fourtops.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3
from
...
import
Logging
4
from
...parameters
import
powheg_atlas_common
5
from
..powheg_V2
import
PowhegV2
6
from
..external
import
ExternalMadSpin
7
8
9
logger = Logging.logging.getLogger(
"PowhegControl"
)
10
11
12
# Dictionary to convert the PowhegControl decay mode names to the appropriate
13
# decay mode numbers understood by Powheg
14
_decay_mode_lookup = {
15
"t t~ t t~ > all [MadSpin]"
:
"00000"
,
# switch off decays in Powheg and let MadSpin handle them!
16
"t t~ t t~ > all"
:
"44444"
,
# all decays
17
"t t~ t t~ > 4l"
:
"44400"
,
# exactly 4 leptons
18
"t t~ t t~ > 3l4l"
:
"4"
,
# at least 3 leptons
19
"t t~ t t~ > 2lSS"
:
"3"
,
# exactly 2 leptons, same sign
20
"t t~ t t~ > 2lOS"
:
"2"
,
# exactly 2 leptons, opposite sign
21
"t t~ t t~ > 1l"
:
"1"
,
# exactly 1 lepton
22
"t t~ t t~ > allhad"
:
"00044"
,
# fully-hadronic
23
"t t~ t t~ > undecayed"
:
"00000"
# undecayed (e.g. to produce a lhe file)
24
}
25
_signature_lookup = [
"4"
,
"3"
,
"2"
,
"1"
]
# these values are for the 4tops-specific #decay_signature keyword
26
27
class
fourtops
(
PowhegV2
):
28
"""! Default Powheg configuration for 4 tops production.
29
30
Create a configurable object with all applicable Powheg options.
31
32
@author James Robinson <tpelzer@cern.ch>
33
"""
34
35
def
__init__
(self, base_directory, **kwargs):
36
"""! Constructor: all process options are set here.
37
38
@param base_directory: path to PowhegBox code.
39
@param kwargs dictionary of arguments from Generate_tf.
40
"""
41
super(fourtops, self).
__init__
(base_directory,
"fourtops"
, **kwargs)
42
43
# Add algorithms to the sequence
44
self.
add_algorithm
(
ExternalMadSpin
(process=
"generate p p > t t~ t t~ [QCD]"
))
45
46
# Add parameter validation functions
47
self.
validation_functions
.append(
"validate_decays"
)
48
49
# List of allowed decay modes
50
# (The sorting of the list is just to increase readability when it's printed)
51
self.
allowed_decay_modes
= sorted(_decay_mode_lookup.keys())
52
53
# Add all keywords for this process, overriding defaults if required
54
self.
add_keyword
(
"bmass_lhe"
)
55
self.
add_keyword
(
"bornktmin"
, 5.0)
56
self.
add_keyword
(
"bornonly"
)
57
self.
add_keyword
(
"bornsuppfact"
)
58
self.
add_keyword
(
"bornzerodamp"
)
59
self.
add_keyword
(
"bottomthr"
)
60
self.
add_keyword
(
"bottomthrpdf"
)
61
self.
add_keyword
(
"btildeborn"
)
62
self.
add_keyword
(
"btildecoll"
)
63
self.
add_keyword
(
"btildereal"
)
64
self.
add_keyword
(
"btildevirt"
)
65
self.
add_keyword
(
"btlscalect"
)
66
self.
add_keyword
(
"btlscalereal"
)
67
self.
add_keyword
(
"charmthr"
)
68
self.
add_keyword
(
"charmthrpdf"
)
69
self.
add_keyword
(
"check_bad_st1"
)
70
self.
add_keyword
(
"check_bad_st2"
)
71
self.
add_keyword
(
"clobberlhe"
)
72
self.
add_keyword
(
"cmass_lhe"
)
73
self.
add_keyword
(
"colltest"
)
74
self.
add_keyword
(
"compress_lhe"
)
75
self.
add_keyword
(
"compress_upb"
)
76
self.
add_keyword
(
"compute_rwgt"
)
77
self.
add_keyword
(
"correlations"
, 1)
78
self.
add_keyword
(
"dampscfact"
, 1.0)
79
self.
add_keyword
(
"decay_signature"
,
"0"
)
80
self.
add_keyword
(
"doublefsr"
)
81
self.
add_keyword
(
"dynamic_hdamp"
, 1)
82
self.
add_keyword
(
"evenmaxrat"
)
83
self.
add_keyword
(
"ewborn"
)
84
self.
add_keyword
(
"facscfact"
, self.
default_scales
[0])
85
self.
add_keyword
(
"fastbtlbound"
)
86
self.
add_keyword
(
"fixedgrid"
)
87
self.
add_keyword
(
"fixedscale"
)
88
self.
add_keyword
(
"flg_debug"
)
89
self.
add_keyword
(
"foldcsi"
)
90
self.
add_keyword
(
"foldphi"
)
91
self.
add_keyword
(
"foldy"
)
92
self.
add_keyword
(
"fullrwgt"
)
93
self.
add_keyword
(
"fullrwgtmode"
)
94
self.
add_keyword
(
"hbzd"
, 5.0)
95
self.
add_keyword
(
"hdamp"
)
96
self.
add_keyword
(
"hfact"
)
97
self.
add_keyword
(
"icsimax"
)
98
self.
add_keyword
(
"ih1"
)
99
self.
add_keyword
(
"ih2"
)
100
self.
add_keyword
(
"itmx1"
)
101
self.
add_keyword
(
"itmx1rm"
)
102
self.
add_keyword
(
"itmx2"
, 8)
103
self.
add_keyword
(
"itmx2rm"
)
104
self.
add_keyword
(
"iupperfsr"
)
105
self.
add_keyword
(
"iupperisr"
)
106
self.
add_keyword
(
"iymax"
)
107
self.
add_keyword
(
"lhans1"
, self.
default_PDFs
)
108
self.
add_keyword
(
"lhans2"
, self.
default_PDFs
)
109
self.
add_keyword
(
"lhapdf6maxsets"
)
110
self.
add_keyword
(
"lhrwgt_descr"
)
111
self.
add_keyword
(
"lhrwgt_group_combine"
)
112
self.
add_keyword
(
"lhrwgt_group_name"
)
113
self.
add_keyword
(
"lhrwgt_id"
)
114
self.
add_keyword
(
"LOevents"
)
115
self.
add_keyword
(
"manyseeds"
)
116
self.
add_keyword
(
"max_io_bufsize"
)
117
self.
add_keyword
(
"maxseeds"
)
118
self.
add_keyword
(
"minlo"
)
119
self.
add_keyword
(
"mintupbratlim"
)
120
self.
add_keyword
(
"mintupbxless"
)
121
self.
add_keyword
(
"ncall1"
, 10000)
122
self.
add_keyword
(
"ncall1rm"
)
123
self.
add_keyword
(
"ncall2"
, 50000)
124
self.
add_keyword
(
"ncall2rm"
)
125
self.
add_keyword
(
"ncallfrominput"
)
126
self.
add_keyword
(
"noevents"
)
127
self.
add_keyword
(
"novirtual"
)
128
self.
add_keyword
(
"nubound"
, 800000)
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"
)
135
self.
add_keyword
(
"ptsqmin"
)
136
self.
add_keyword
(
"ptsupp"
)
137
self.
add_keyword
(
"tmass"
, powheg_atlas_common.mass.t, name=
"mass_t"
, description=
"top quark mass in GeV"
)
138
self.
add_keyword
(
"radregion"
)
139
self.
add_keyword
(
"rand1"
)
140
self.
add_keyword
(
"rand2"
)
141
self.
add_keyword
(
"renscfact"
, self.
default_scales
[1])
142
self.
add_keyword
(
"rwl_add"
)
143
self.
add_keyword
(
"rwl_file"
)
144
self.
add_keyword
(
"rwl_format_rwgt"
)
145
self.
add_keyword
(
"rwl_group_events"
)
146
self.
add_keyword
(
"scalechoice"
, 1)
147
self.
add_keyword
(
"skipextratests"
)
148
self.
add_keyword
(
"smartsig"
)
149
self.
add_keyword
(
"softtest"
)
150
self.
add_keyword
(
"stage2init"
)
151
self.
add_keyword
(
"storeinfo_rwgt"
)
152
self.
add_keyword
(
"storemintupb"
)
153
self.
add_keyword
(
"tdec/bmass"
)
154
self.
add_keyword
(
"tdec/cmass"
)
155
self.
add_keyword
(
"tdec/dmass"
)
156
self.
add_keyword
(
"tdec/elbranching"
)
157
self.
add_keyword
(
"tdec/emass"
)
158
self.
add_keyword
(
"tdec/mumass"
)
159
self.
add_keyword
(
"tdec/sin2cabibbo"
)
160
self.
add_keyword
(
"tdec/smass"
)
161
self.
add_keyword
(
"tdec/taumass"
)
162
self.
add_keyword
(
"tdec/twidth"
)
163
self.
add_keyword
(
"tdec/umass"
)
164
self.
add_keyword
(
"tdec/wmass"
)
165
self.
add_keyword
(
"tdec/wwidth"
)
166
self.
add_keyword
(
"testplots"
)
167
self.
add_keyword
(
"testsuda"
)
168
self.
add_keyword
(
"topdecaymode"
,
"t t~ t t~ > all"
, name=
"decay_mode"
)
169
self.
add_keyword
(
"ubexcess_correct"
)
170
self.
add_keyword
(
"ubsigmadetails"
)
171
self.
add_keyword
(
"use-old-grid"
)
172
self.
add_keyword
(
"use-old-ubound"
)
173
self.
add_keyword
(
"withdamp"
)
174
self.
add_keyword
(
"withnegweights"
)
175
self.
add_keyword
(
"withsubtr"
)
176
self.
add_keyword
(
"xgriditeration"
)
177
self.
add_keyword
(
"xupbound"
, 10)
178
179
def
validate_decays
(self):
180
"""
181
Validate semileptonic and topdecaymode keywords and translate them from ATLAS input to Powheg input
182
"""
183
self.
expose
()
# convenience call to simplify syntax
184
if
self.
decay_mode
not
in
self.
allowed_decay_modes
:
185
error_message =
"Decay mode '{given}' not recognised, valid choices are: '{choices}'!"
.format(given=self.
decay_mode
, choices=
"', '"
.join(self.
allowed_decay_modes
))
186
logger.warning(error_message)
187
raise
ValueError(error_message)
188
189
# Check if MadSpin decays are requested.
190
# Accordingly, MadSpin will run or not run.
191
if
"MadSpin"
in
self.
decay_mode
:
192
self.
externals
[
"MadSpin"
].
parameters_by_keyword
(
"powheg_top_decays_enabled"
)[0].value =
False
193
self.
externals
[
"MadSpin"
].
parameters_by_keyword
(
"MadSpin_model"
)[0].value =
"loop_sm-no_b_mass"
194
self.
externals
[
"MadSpin"
].
parameters_by_keyword
(
"MadSpin_nFlavours"
)[0].value = 5
195
196
if
_decay_mode_lookup[self.
decay_mode
]
in
_signature_lookup:
# special handling of decays with #decay_signature keyword
197
self.
parameters_by_keyword
(
"decay_signature"
)[0].value = _decay_mode_lookup[self.
decay_mode
]
198
self.
parameters_by_keyword
(
"topdecaymode"
)[0].value =
"44444"
199
else
:
# usual handling of decays with #topdecaymode keyword
200
self.
parameters_by_keyword
(
"decay_signature"
)[0].value =
"0"
201
self.
parameters_by_keyword
(
"topdecaymode"
)[0].value = _decay_mode_lookup[self.
decay_mode
]
python.processes.configurable.Configurable.add_keyword
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.configurable.Configurable.expose
expose(self)
Add all names to the interface of this object.
Definition
configurable.py:46
python.processes.configurable.Configurable.parameters_by_keyword
parameters_by_keyword(self, keyword)
Retrieve all parameters that use a given keyword.
Definition
configurable.py:57
python.processes.external.external_madspin.ExternalMadSpin
Class for running external MadSpin process.
Definition
external_madspin.py:11
python.processes.powheg.fourtops.fourtops
Default Powheg configuration for 4 tops production.
Definition
fourtops.py:27
python.processes.powheg.fourtops.fourtops.allowed_decay_modes
allowed_decay_modes
Definition
fourtops.py:51
python.processes.powheg.fourtops.fourtops.validate_decays
validate_decays(self)
Definition
fourtops.py:179
python.processes.powheg.fourtops.fourtops.decay_mode
decay_mode
Definition
fourtops.py:191
python.processes.powheg.fourtops.fourtops.__init__
__init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition
fourtops.py:35
python.processes.powheg_V2.PowhegV2
Base class for PowhegBox V2 processes.
Definition
powheg_V2.py:6
python.processes.powheg_base.PowhegBase.externals
dict externals
List of external processes to schedule.
Definition
powheg_base.py:124
python.processes.powheg_base.PowhegBase.validation_functions
list validation_functions
List of validation functions to run before preparing runcard.
Definition
powheg_base.py:127
python.processes.powheg_base.PowhegBase.add_algorithm
add_algorithm(self, alg_or_process)
Add an algorithm or external process to the sequence.
Definition
powheg_base.py:156
python.processes.powheg_base.PowhegBase.default_scales
default_scales(self)
Default scale variations for this process.
Definition
powheg_base.py:194
Generated on
for ATLAS Offline Software by
1.17.0