ATLAS Offline Software
t_tch_4FS.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 from ..external import ExternalMadSpin
6 
7 
8 logger = Logging.logging.getLogger("PowhegControl")
9 
10 
12  """! Default Powheg configuration for single-top production in the t-channel in the four-flavour scheme.
13 
14  Create a configurable object with all applicable Powheg options.
15 
16  @author James Robinson <james.robinson@cern.ch>
17  """
18 
19  def __init__(self, base_directory, **kwargs):
20  """! Constructor: all process options are set here.
21 
22  @param base_directory: path to PowhegBox code.
23  @param kwargs dictionary of arguments from Generate_tf.
24  """
25  super(t_tch_4FS, self).__init__(base_directory, "ST_tch_4f", **kwargs)
26 
27  # Add algorithms to the sequence
28  self.add_algorithm(ExternalMadSpin(process=None))
29 
30  # Add parameter validation functions
31  self.validation_functions.append("validate_decays")
32 
33 
34  self.allowed_decay_modes = ["t > undecayed", "t~ > undecayed"]
35 
36  # Add all keywords for this process, overriding defaults if required
37  self.add_keyword("alphaem_inv")
38  self.add_keyword("bmass")
39  self.add_keyword("bornktmin")
40  self.add_keyword("bornonly")
41  self.add_keyword("bornsuppfact")
42  self.add_keyword("bornzerodamp")
43  self.add_keyword("bottomthr")
44  self.add_keyword("bottomthrpdf")
45  self.add_keyword("btildeborn")
46  self.add_keyword("btildecoll")
47  self.add_keyword("btildereal")
48  self.add_keyword("btildevirt")
49  self.add_keyword("btlscalect")
50  self.add_keyword("btlscalereal")
51  self.add_keyword("charmthr")
52  self.add_keyword("charmthrpdf")
53  self.add_keyword("check_bad_st1")
54  self.add_keyword("check_bad_st2")
55  self.add_keyword("CKM_Vcb")
56  self.add_keyword("CKM_Vcd")
57  self.add_keyword("CKM_Vcs")
58  self.add_keyword("CKM_Vtb")
59  self.add_keyword("CKM_Vtd")
60  self.add_keyword("CKM_Vts")
61  self.add_keyword("CKM_Vub")
62  self.add_keyword("CKM_Vud")
63  self.add_keyword("CKM_Vus")
64  self.add_keyword("clobberlhe")
65  self.add_keyword("colltest")
66  self.add_keyword("compress_lhe")
67  self.add_keyword("compress_upb")
68  self.add_keyword("compute_rwgt")
69  self.add_keyword("doublefsr")
70  self.add_keyword("evenmaxrat")
71  self.add_keyword("facscfact", self.default_scales[0])
72  self.add_keyword("fastbtlbound")
73  self.add_keyword("fixedgrid")
74  self.add_keyword("flg_debug")
75  self.add_keyword("foldcsi", 5)
76  self.add_keyword("foldphi", 5)
77  self.add_keyword("foldy", 5)
78  self.add_keyword("fullrwgt")
79  self.add_keyword("fullrwgtmode")
80  self.add_keyword("hdamp")
81  self.add_keyword("hfact")
82  self.add_keyword("icsimax")
83  self.add_keyword("ih1")
84  self.add_keyword("ih2")
85  self.add_keyword("itmx1", 6)
86  self.add_keyword("itmx1rm")
87  self.add_keyword("itmx2", 4)
88  self.add_keyword("itmx2rm")
89  self.add_keyword("iupperfsr")
90  self.add_keyword("iupperisr")
91  self.add_keyword("iymax")
92  self.add_keyword("lhans1", self.default_PDFs)
93  self.add_keyword("lhans2", self.default_PDFs)
94  self.add_keyword("lhapdf6maxsets")
95  self.add_keyword("lhrwgt_descr")
96  self.add_keyword("lhrwgt_group_combine")
97  self.add_keyword("lhrwgt_group_name")
98  self.add_keyword("lhrwgt_id")
99  self.add_keyword("LOevents")
100  self.add_keyword("manyseeds")
101  self.add_keyword("max_io_bufsize")
102  self.add_keyword("maxseeds")
103  self.add_keyword("minlo")
104  self.add_keyword("mintupbratlim")
105  self.add_keyword("mintupbxless")
106  self.add_keyword("ncall1", 1000000)
107  self.add_keyword("ncall1rm")
108  self.add_keyword("ncall2", 300000)
109  self.add_keyword("ncall2rm")
110  self.add_keyword("ncallfrominput")
111  self.add_keyword("noevents")
112  self.add_keyword("novirtual")
113  self.add_keyword("nubound", 20000)
114  self.add_keyword("olddij")
115  self.add_keyword("par_2gsupp")
116  self.add_keyword("par_diexp")
117  self.add_keyword("par_dijexp")
118  self.add_keyword("parallelstage")
119  self.add_keyword("pdfreweight")
120  self.add_keyword("ptsqmin")
121  self.add_keyword("ptsupp")
122  self.add_keyword("radregion")
123  self.add_keyword("rand1")
124  self.add_keyword("rand2")
125  self.add_keyword("renscfact", self.default_scales[1])
126  self.add_keyword("rwl_add")
127  self.add_keyword("rwl_file")
128  self.add_keyword("rwl_format_rwgt")
129  self.add_keyword("rwl_group_events")
130  self.add_keyword("smartsig")
131  self.add_keyword("softtest")
132  self.add_keyword("stage2init")
133  self.add_keyword("sthw2")
134  self.add_keyword("storeinfo_rwgt")
135  self.add_keyword("storemintupb")
136  self.add_keyword("testplots")
137  self.add_keyword("testsuda")
138  self.add_keyword("tmass")
139  self.add_keyword("topmass")
140  self.add_keyword("topwidth")
141  self.add_keyword("ttype", "t > undecayed", name="decay_mode")
142  self.add_keyword("ubexcess_correct")
143  self.add_keyword("ubsigmadetails")
144  self.add_keyword("use-old-grid")
145  self.add_keyword("use-old-ubound")
146  self.add_keyword("withdamp")
147  self.add_keyword("withnegweights")
148  self.add_keyword("withsubtr")
149  self.add_keyword("wmass")
150  self.add_keyword("xgriditeration")
151  self.add_keyword("xupbound", 2)
152 
153  def validate_decays(self):
154  """! Validate ttype keywords."""
155  self.expose() # convenience call to simplify syntax
156  if self.decay_mode not in self.allowed_decay_modes:
157  logger.warning("Decay mode {} not recognised!".format(self.decay_mode))
158  raise ValueError("Decay mode {} not recognised!".format(self.decay_mode))
159  # Let MadSpin know whether tops have been decayed
160  if "undecayed" in self.decay_mode:
161  list(self.externals["MadSpin"].parameters_by_keyword("powheg_top_decays_enabled"))[0].value = False
162  # Calculate appropriate decay mode numbers
163  list(self.parameters_by_keyword("ttype"))[0].value = [+1, -1][self.decay_mode.startswith("t~")]
164  # Set MadSpin default process appropriately if it has not been set by the user (this tests for both None and "")
165  if not list(self.externals["MadSpin"].parameters_by_keyword("MadSpin_process"))[0].value:
166  if self.decay_mode.startswith("t~"):
167  list(self.externals["MadSpin"].parameters_by_keyword("MadSpin_process"))[0].value = "generate p p > t~ b j $$ w+ w- [QCD]"
168  else:
169  list(self.externals["MadSpin"].parameters_by_keyword("MadSpin_process"))[0].value = "generate p p > t b~ j $$ w+ w- [QCD]"
170 
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.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_madspin.ExternalMadSpin
Class for running external MadSpin process.
Definition: external_madspin.py:11
python.processes.powheg.t_tch_4FS.t_tch_4FS.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: t_tch_4FS.py:19
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.t_tch_4FS.t_tch_4FS
Default Powheg configuration for single-top production in the t-channel in the four-flavour scheme.
Definition: t_tch_4FS.py:11
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.t_tch_4FS.t_tch_4FS.allowed_decay_modes
allowed_decay_modes
List of allowed decay modes.
Definition: t_tch_4FS.py:34
python.processes.powheg.t_tch_4FS.t_tch_4FS.validate_decays
def validate_decays(self)
Validate ttype keywords.
Definition: t_tch_4FS.py:153
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