ATLAS Offline Software
tt.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaCommon 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 class tt(PowhegV2):
13  """! Default Powheg configuration for top-pair production.
14 
15  Create a configurable object with all applicable Powheg options.
16 
17  @author James Robinson <james.robinson@cern.ch>
18  """
19 
20  def __init__(self, base_directory, **kwargs):
21  """! Constructor: all process options are set here.
22 
23  @param base_directory: path to PowhegBox code.
24  @param kwargs dictionary of arguments from Generate_tf.
25  """
26  super(tt, self).__init__(base_directory, "hvq", **kwargs)
27 
28  # Add algorithms to the sequence
29  self.add_algorithm(ExternalMadSpin(process="generate p p > t t~ [QCD]"))
30 
31  # Add parameter validation functions
32  self.validation_functions.append("validate_decays")
33 
34 
35  self.allowed_decay_modes = ["t t~ > all", "t t~ > b j j b~ j j", "t t~ > b l+ vl b~ l- vl~", "t t~ > b emu+ vemu b~ emu- vemu~", "t t~ > semileptonic", "t t~ > undecayed"]
36 
37  # Add all keywords for this process, overriding defaults if required
38  self.add_keyword("bmass_lhe")
39  self.add_keyword("bornktmin", 5.0)
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("clobberlhe")
56  self.add_keyword("cmass_lhe")
57  self.add_keyword("colltest")
58  self.add_keyword("compress_lhe")
59  self.add_keyword("compress_upb")
60  self.add_keyword("compute_rwgt")
61  self.add_keyword("doublefsr")
62  self.add_keyword("evenmaxrat")
63  self.add_keyword("facscfact", self.default_scales[0])
64  self.add_keyword("fastbtlbound")
65  self.add_keyword("fixedgrid")
66  self.add_keyword("fixedscale")
67  self.add_keyword("flg_debug")
68  self.add_keyword("foldcsi")
69  self.add_keyword("foldphi")
70  self.add_keyword("foldy")
71  self.add_keyword("fullrwgt")
72  self.add_keyword("fullrwgtmode")
73  self.add_keyword("hdamp")
74  self.add_keyword("hfact")
75  self.add_keyword("icsimax")
76  self.add_keyword("ih1")
77  self.add_keyword("ih2")
78  self.add_keyword("itmx1")
79  self.add_keyword("itmx1rm")
80  self.add_keyword("itmx2", 8)
81  self.add_keyword("itmx2rm")
82  self.add_keyword("iupperfsr")
83  self.add_keyword("iupperisr")
84  self.add_keyword("iymax")
85  self.add_keyword("lhans1", self.default_PDFs)
86  self.add_keyword("lhans2", self.default_PDFs)
87  self.add_keyword("lhapdf6maxsets")
88  self.add_keyword("lhrwgt_descr")
89  self.add_keyword("lhrwgt_group_combine")
90  self.add_keyword("lhrwgt_group_name")
91  self.add_keyword("lhrwgt_id")
92  self.add_keyword("LOevents")
93  self.add_keyword("manyseeds")
94  self.add_keyword("max_io_bufsize")
95  self.add_keyword("maxseeds")
96  self.add_keyword("minlo")
97  self.add_keyword("mintupbratlim")
98  self.add_keyword("mintupbxless")
99  self.add_keyword("ncall1", 10000)
100  self.add_keyword("ncall1rm")
101  self.add_keyword("ncall2", 50000)
102  self.add_keyword("ncall2rm")
103  self.add_keyword("ncallfrominput")
104  self.add_keyword("noevents")
105  self.add_keyword("novirtual")
106  self.add_keyword("nubound", 800000)
107  self.add_keyword("olddij")
108  self.add_keyword("par_2gsupp")
109  self.add_keyword("par_diexp")
110  self.add_keyword("par_dijexp")
111  self.add_keyword("parallelstage")
112  self.add_keyword("pdfreweight")
113  self.add_keyword("ptsqmin")
114  self.add_keyword("ptsupp")
115  self.add_keyword("qmass", powheg_atlas_common.mass.t, name="mass_t", description="top quark mass in GeV")
116  self.add_keyword("radregion")
117  self.add_keyword("rand1")
118  self.add_keyword("rand2")
119  self.add_keyword("renscfact", self.default_scales[1])
120  self.add_keyword("rwl_add")
121  self.add_keyword("rwl_file")
122  self.add_keyword("rwl_format_rwgt")
123  self.add_keyword("rwl_group_events")
124  self.add_keyword("semileptonic", hidden=True)
125  self.add_keyword("skipextratests")
126  self.add_keyword("smartsig")
127  self.add_keyword("softtest")
128  self.add_keyword("stage2init")
129  self.add_keyword("storeinfo_rwgt")
130  self.add_keyword("storemintupb")
131  self.add_keyword("tdec/bmass")
132  self.add_keyword("tdec/cmass")
133  self.add_keyword("tdec/dmass")
134  self.add_keyword("tdec/elbranching")
135  self.add_keyword("tdec/emass")
136  self.add_keyword("tdec/mumass")
137  self.add_keyword("tdec/sin2cabibbo")
138  self.add_keyword("tdec/smass")
139  self.add_keyword("tdec/taumass")
140  self.add_keyword("tdec/twidth")
141  self.add_keyword("tdec/umass")
142  self.add_keyword("tdec/wmass")
143  self.add_keyword("tdec/wwidth")
144  self.add_keyword("testplots")
145  self.add_keyword("testsuda")
146  self.add_keyword("topdecaymode", self.allowed_decay_modes[0], name="decay_mode")
147  self.add_keyword("ubexcess_correct")
148  self.add_keyword("ubsigmadetails")
149  self.add_keyword("use-old-grid")
150  self.add_keyword("use-old-ubound")
151  self.add_keyword("withdamp")
152  self.add_keyword("withnegweights")
153  self.add_keyword("withsubtr")
154  self.add_keyword("xgriditeration")
155  self.add_keyword("xupbound", 10)
156 
157  def validate_decays(self):
158  """! Validate semileptonic and topdecaymode keywords."""
159  self.expose() # convenience call to simplify syntax
160  if self.decay_mode not in self.allowed_decay_modes:
161  logger.warning("Decay mode {} not recognised!".format(self.decay_mode))
162  raise ValueError("Decay mode {} not recognised!".format(self.decay_mode))
163  # Let MadSpin know whether tops have been decayed
164  if "undecayed" in self.decay_mode:
165  list(self.externals["MadSpin"].parameters_by_keyword("powheg_top_decays_enabled"))[0].value = False
166  # Calculate appropriate decay mode numbers
167  __decay_mode_lookup = {"t t~ > all": "22222", "t t~ > b j j b~ j j": "00022", "t t~ > b l+ vl b~ l- vl~": "22200", "t t~ > b emu+ vemu b~ emu- vemu~": "22000", "t t~ > semileptonic": "11111", "t t~ > undecayed": "00000"}
168  list(self.parameters_by_keyword("topdecaymode"))[0].value = __decay_mode_lookup[self.decay_mode]
169  if self.decay_mode == "t t~ > semileptonic":
170  list(self.parameters_by_keyword("semileptonic"))[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_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
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.tt.tt.validate_decays
def validate_decays(self)
Validate semileptonic and topdecaymode keywords.
Definition: tt.py:157
python.processes.powheg.tt.tt.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: tt.py:20
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.tt.tt
Default Powheg configuration for top-pair production.
Definition: tt.py:12
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
python.processes.powheg.tt.tt.decay_mode
decay_mode
Definition: tt.py:169
python.processes.powheg.tt.tt.allowed_decay_modes
allowed_decay_modes
List of allowed decay modes.
Definition: tt.py:35