ATLAS Offline Software
ttWp_EW.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 EW 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_EW, self).__init__(base_directory, "Wtt_dec/pp_ttWp_EW", **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("CKM_Vcd")
54  self.add_keyword("CKM_Vcs")
55  self.add_keyword("CKM_Vud")
56  self.add_keyword("CKM_Vus")
57  self.add_keyword("clobberlhe") # not used by authors in example
58  self.add_keyword("colltest")
59  self.add_keyword("compress_lhe") # not used by authors in example
60  self.add_keyword("compress_upb") # not used by authors in example
61  self.add_keyword("compute_rwgt")
62  self.add_keyword("correlations")
63  self.add_keyword("dampscfact")
64  self.add_keyword("delta_mttmin")
65  self.add_keyword("dynamic_hdamp")
66  self.add_keyword("facscfact", self.default_scales[0])
67  self.add_keyword("fakevirt")
68  self.add_keyword("fastbtlbound") # not used by authors in example
69  self.add_keyword("foldcsi", 2)
70  self.add_keyword("foldphi", 2)
71  self.add_keyword("foldy", 2)
72  self.add_keyword("for_reweighting") # not used by authors in example
73  self.add_keyword("gfermi")
74  self.add_keyword("hbzd")
75  self.add_keyword("hdamp")
76  self.add_keyword("hmass")
77  self.add_keyword("hwidth")
78  self.add_keyword("icsimax", 3)
79  self.add_keyword("ih1")
80  self.add_keyword("ih2")
81  self.add_keyword("itmx1", 5)
82  self.add_keyword("itmx2", 5)
83  self.add_keyword("iymax", 3)
84  self.add_keyword("lhans1", self.default_PDFs)
85  self.add_keyword("lhans2", self.default_PDFs)
86  self.add_keyword("lhfm/bmass")
87  self.add_keyword("lhfm/cmass")
88  self.add_keyword("lhfm/emass")
89  self.add_keyword("lhfm/mumass")
90  self.add_keyword("lhfm/smass")
91  self.add_keyword("lhfm/taumass")
92  self.add_keyword("lhfm/umass")
93  self.add_keyword("lhrwgt_descr")
94  self.add_keyword("lhrwgt_group_combine")
95  self.add_keyword("lhrwgt_group_name")
96  self.add_keyword("lhrwgt_id")
97  self.add_keyword("LOevents")
98  self.add_keyword("manyseeds") # not used by authors in example
99  self.add_keyword("maxseeds", 1000) # not used by authors in example
100  self.add_keyword("ncall1", 100000)
101  self.add_keyword("ncall2", 100000)
102  self.add_keyword("ncall2rm") # not used by authors in example
103  self.add_keyword("nubound", 100000)
104  self.add_keyword("parallelstage") # not used by authors in example
105  self.add_keyword("renscfact", self.default_scales[1])
106  self.add_keyword("rwl_add")
107  self.add_keyword("rwl_file")
108  self.add_keyword("rwl_format_rwgt")
109  self.add_keyword("rwl_group_events")
110  self.add_keyword("samesignleptons")
111  self.add_keyword("scalechoice")
112  self.add_keyword("softtest")
113  self.add_keyword("storeinfo_rwgt", 1)
114  self.add_keyword("storemintupb") # not used by authors in example
115  self.add_keyword("tmass")
116  self.add_keyword("topdecaymode", "t t~ W+ > all", name="decay_mode")
117  self.add_keyword("twidth")
118  self.add_keyword("use-old-grid", 1)
119  self.add_keyword("use-old-ubound", 1)
120  self.add_keyword("withdamp", 1) # not used by authors in example
121  self.add_keyword("wmass")
122  self.add_keyword("wwidth")
123  self.add_keyword("xgriditeration") # not used by authors in example
124  self.add_keyword("xupbound", 2)
125  self.add_keyword("zerowidth")
126  self.add_keyword("zmass")
127  self.add_keyword("zwidth")
128 
129 
130 
131  def validate_decays(self):
132  """
133  Validate decay_mode keywords and translate them from ATLAS input to Powheg input
134  """
135  self.expose() # convenience call to simplify syntax
136  if self.decay_mode not in self.allowed_decay_modes:
137  error_message = "Decay mode '{given}' not recognised, valid choices are: '{choices}'!".format(given=self.decay_mode, choices="', '".join(self.allowed_decay_modes))
138  logger.warning(error_message)
139  raise ValueError(error_message)
140 
141  self.parameters_by_keyword("topdecaymode")[0].value = _decay_mode_lookup[self.decay_mode]
142  if self.decay_mode == 't t~ W+ > b l+ vl b~ j j l+ vl':
143  # Parameter samesignleptons must be set to 1 to actually get exactly two same-sign leptons
144  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
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:243
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.ttWp_EW.ttWp_EW.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ttWp_EW.py:33
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_EW.ttWp_EW
Definition: ttWp_EW.py:24
python.processes.powheg_base.PowhegBase.validation_functions
validation_functions
List of validation functions to run before preparing runcard.
Definition: powheg_base.py:176
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.ttWp_EW.ttWp_EW.validate_decays
def validate_decays(self)
Definition: ttWp_EW.py:131
python.processes.powheg_base.PowhegBase.default_PDFs
def default_PDFs(self)
Default PDFs for this process.
Definition: powheg_base.py:238
python.processes.powheg_V2.PowhegV2
Base class for PowhegBox V2 processes.
Definition: powheg_V2.py:6
python.processes.powheg.ttWp_EW.ttWp_EW.decay_mode
decay_mode
Definition: ttWp_EW.py:142
python.processes.powheg.ttWp_EW.ttWp_EW.allowed_decay_modes
allowed_decay_modes
Definition: ttWp_EW.py:43