ATLAS Offline Software
ttWp_QCD.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 
11 # Dictionary to convert the PowhegControl decay mode names to the appropriate
12 # decay mode numbers understood by Powheg
13 _decay_mode_lookup = {
14  't t~ W+ > all' : '33333',
15  't t~ W+ > all except uuu/ccc' : '33322',
16  't t~ W+ > b j j b~ j j j j' : '00033',
17  't t~ W+ > b l+ vl b~ l- vl~ l+ vl': '33300', # includes taus!
18  't t~ W+ > b l+ vl b~ j j l+ vl': '33300', # additionally need to set the "samesignleptons" parameter
19  't t~ W+ > undecayed' : '0',
20 }
21 
22 
23 
25  """
26  Powheg interface for ttW+ production with NLO QCD corrections.
27 
28  Reference for this process: https://arxiv.org/abs/2101.11808
29 
30  @author Stefan Richter <stefan.richter@cern.ch>
31  """
32 
33  def __init__(self, base_directory, **kwargs):
34  """! Constructor: all process options are set here.
35 
36  @param base_directory: path to PowhegBox code.
37  @param kwargs dictionary of arguments from Gen_tf.
38  """
39  super(ttWp_QCD, self).__init__(base_directory, "Wtt_dec/pp_ttWp_QCD", **kwargs)
40 
41  # List of allowed decay modes
42  # (The sorting of the list is just to increase readability when it's printed)
43  self.allowed_decay_modes = sorted(_decay_mode_lookup.keys())
44 
45  self.validation_functions.append("validate_decays")
46 
47  # Add all keywords for this process, overriding defaults if required
48  # self.add_keyword("alphas_from_pdf", 1) # not used by authors in example
49  self.add_keyword("bornonly")
50  self.add_keyword("BrWlep")
51  self.add_keyword("btlscalect", 1)
52  self.add_keyword("btlscalereal", 1)
53  self.add_keyword("check_bad_st1")
54  self.add_keyword("check_bad_st2")
55  self.add_keyword("CKM_Vcd")
56  self.add_keyword("CKM_Vcs")
57  self.add_keyword("CKM_Vud")
58  self.add_keyword("CKM_Vus")
59  self.add_keyword("clobberlhe") # not used by authors in example
60  self.add_keyword("colltest")
61  self.add_keyword("compress_lhe") # not used by authors in example
62  self.add_keyword("compress_upb") # not used by authors in example
63  self.add_keyword("compute_rwgt")
64  self.add_keyword("correlations")
65  self.add_keyword("dampscfact")
66  self.add_keyword("delta_mttmin")
67  self.add_keyword("dynamic_hdamp")
68  self.add_keyword("facscfact", self.default_scales[0])
69  self.add_keyword("fakevirt")
70  self.add_keyword("fastbtlbound") # not used by authors in example
71  self.add_keyword("foldcsi", 2)
72  self.add_keyword("foldphi", 2)
73  self.add_keyword("foldy", 2)
74  self.add_keyword("for_reweighting") # not used by authors in example
75  self.add_keyword("gfermi")
76  self.add_keyword("hbzd")
77  self.add_keyword("hdamp")
78  self.add_keyword("hmass")
79  self.add_keyword("hwidth")
80  self.add_keyword("icsimax", 3)
81  self.add_keyword("ih1")
82  self.add_keyword("ih2")
83  self.add_keyword("itmx1", 5)
84  self.add_keyword("itmx2", 5)
85  self.add_keyword("iymax", 3)
86  self.add_keyword("lhans1", self.default_PDFs)
87  self.add_keyword("lhans2", self.default_PDFs)
88  self.add_keyword("lhfm/bmass")
89  self.add_keyword("lhfm/cmass")
90  self.add_keyword("lhfm/emass")
91  self.add_keyword("lhfm/mumass")
92  self.add_keyword("lhfm/smass")
93  self.add_keyword("lhfm/taumass")
94  self.add_keyword("lhfm/umass")
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") # not used by authors in example
101  self.add_keyword("maxseeds", 1000) # not used by authors in example
102  self.add_keyword("ncall1", 100000)
103  self.add_keyword("ncall2", 100000)
104  self.add_keyword("ncall2rm") # not used by authors in example
105  self.add_keyword("nubound", 100000)
106  self.add_keyword("parallelstage") # not used by authors in example
107  self.add_keyword("renscfact", self.default_scales[1])
108  self.add_keyword("rwl_add")
109  self.add_keyword("rwl_file")
110  self.add_keyword("rwl_format_rwgt")
111  self.add_keyword("rwl_group_events")
112  self.add_keyword("samesignleptons")
113  self.add_keyword("scalechoice")
114  self.add_keyword("softtest")
115  self.add_keyword("storeinfo_rwgt", 1)
116  self.add_keyword("storemintupb") # not used by authors in example
117  self.add_keyword("tmass")
118  self.add_keyword("topdecaymode", "t t~ W+ > all", name="decay_mode")
119  self.add_keyword("twidth")
120  self.add_keyword("use-old-grid", 1)
121  self.add_keyword("use-old-ubound", 1)
122  self.add_keyword("withdamp", 1) # not used by authors in example
123  self.add_keyword("wmass")
124  self.add_keyword("wwidth")
125  self.add_keyword("xgriditeration") # not used by authors in example
126  self.add_keyword("xupbound", 2)
127  self.add_keyword("zerowidth")
128  self.add_keyword("zmass")
129  self.add_keyword("zwidth")
130 
131 
132 
133  def validate_decays(self):
134  """
135  Validate decay_mode keywords and translate them from ATLAS input to Powheg input
136  """
137  self.expose() # convenience call to simplify syntax
138  if self.decay_mode not in self.allowed_decay_modes:
139  error_message = "Decay mode '{given}' not recognised, valid choices are: '{choices}'!".format(given=self.decay_mode, choices="', '".join(self.allowed_decay_modes))
140  logger.warning(error_message)
141  raise ValueError(error_message)
142 
143  self.parameters_by_keyword("topdecaymode")[0].value = _decay_mode_lookup[self.decay_mode]
144  if self.decay_mode == 't t~ W+ > b l+ vl b~ j j l+ vl':
145  # Parameter samesignleptons must be set to 1 to actually get exactly two same-sign leptons
146  self.parameters_by_keyword("samesignleptons")[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.ttWp_QCD.ttWp_QCD.allowed_decay_modes
allowed_decay_modes
Definition: ttWp_QCD.py:43
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
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.ttWp_QCD.ttWp_QCD.validate_decays
def validate_decays(self)
Definition: ttWp_QCD.py:133
python.processes.powheg_base.PowhegBase.validation_functions
validation_functions
List of validation functions to run before preparing runcard.
Definition: powheg_base.py:179
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
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.ttWp_QCD.ttWp_QCD
Definition: ttWp_QCD.py:24
python.processes.powheg.ttWp_QCD.ttWp_QCD.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ttWp_QCD.py:33
python.processes.powheg.ttWp_QCD.ttWp_QCD.decay_mode
decay_mode
Definition: ttWp_QCD.py:144