ATLAS Offline Software
chi1chi1.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 import glob
6 import os
7 import shutil
8 
9 
10 logger = Logging.logging.getLogger("PowhegControl")
11 
12 
14  """! Default Powheg configuration for chargino pair production.
15 
16  Create a configurable object with all applicable Powheg options.
17 
18  @author James Robinson <james.robinson@cern.ch>
19  """
20 
21  def __init__(self, base_directory, **kwargs):
22  """! Constructor: all process options are set here.
23 
24  @param base_directory path to PowhegBox code.
25  @param kwargs dictionary of arguments from Generate_tf.
26  """
27  super(chi1chi1, self).__init__(base_directory, os.path.join("weakinos", "chaIchaJ"), powheg_executable="pwhg_main_xixj", **kwargs)
28  if not os.path.isfile("input_mSUGRA.slha"):
29  shutil.copy(os.path.join(os.path.split(self.executable)[0], "testrun", "input_mSUGRA.slha"), ".")
30  logger.info("Locating default mSUGRA input distributed with POWHEG...")
31 
32  # Load SLHA input
33  if len(glob.glob("*.slha")) > 0:
34  input_slha = glob.glob("*.slha")[0]
35  logger.info("Using input SLHA file: {}".format(input_slha))
36  shutil.move(input_slha, "input_parameters.slha")
37  else:
38  logger.info("Locating input SLHA distributed with POWHEG...")
39  shutil.copy(os.path.join(os.path.split(self.executable)[0], "testrun", "input_mSUGRA.slha"), "input_parameters.slha")
40 
41  # Add parameter validation functions
42  self.validation_functions.append("validate_weakinos")
43 
44 
45  self.allowed_weakinos = {"chi1+": 1000024, "chi1-": -1000024, "chi2+": 1000037, "chi2-": -1000037}
46 
47  # Add all keywords for this process, overriding defaults if required
48  self.add_keyword("alphas_from_lhapdf")
49  self.add_keyword("bornktmin")
50  self.add_keyword("bornonly")
51  self.add_keyword("bornsuppfact")
52  self.add_keyword("bornzerodamp")
53  self.add_keyword("bottomthr")
54  self.add_keyword("bottomthrpdf")
55  self.add_keyword("btildeborn")
56  self.add_keyword("btildecoll")
57  self.add_keyword("btildereal")
58  self.add_keyword("btildevirt")
59  self.add_keyword("btlscalect")
60  self.add_keyword("btlscalereal")
61  self.add_keyword("charmthr")
62  self.add_keyword("charmthrpdf")
63  self.add_keyword("check_bad_st1")
64  self.add_keyword("check_bad_st2")
65  self.add_keyword("clobberlhe")
66  self.add_keyword("colltest")
67  self.add_keyword("compress_lhe")
68  self.add_keyword("compress_upb")
69  self.add_keyword("compute_rwgt")
70  self.add_keyword("doublefsr")
71  self.add_keyword("evenmaxrat")
72  self.add_keyword("ewi")
73  self.add_keyword("facscfact", self.default_scales[0])
74  self.add_keyword("fakevirtuals")
75  self.add_keyword("fastbtlbound")
76  self.add_keyword("fin1", "chi1-", name="chargino_A")
77  self.add_keyword("fin2", "chi1+", name="chargino_B")
78  self.add_keyword("fixedgrid")
79  self.add_keyword("flg_debug")
80  self.add_keyword("foldcsi", 2)
81  self.add_keyword("foldphi", 2)
82  self.add_keyword("foldy", 2)
83  self.add_keyword("fullrwgt")
84  self.add_keyword("hdamp")
85  self.add_keyword("hfact")
86  self.add_keyword("icsimax")
87  self.add_keyword("ih1")
88  self.add_keyword("ih2")
89  self.add_keyword("incomingflavors")
90  self.add_keyword("inv_alpha", -1)
91  self.add_keyword("itmx1", 4)
92  self.add_keyword("itmx1osres")
93  self.add_keyword("itmx1rm")
94  self.add_keyword("itmx2", 9)
95  self.add_keyword("itmx2osres")
96  self.add_keyword("itmx2rm")
97  self.add_keyword("iupperfsr")
98  self.add_keyword("iupperisr")
99  self.add_keyword("iymax")
100  self.add_keyword("lhans1", self.default_PDFs)
101  self.add_keyword("lhans2", self.default_PDFs)
102  self.add_keyword("lhrwgt_descr")
103  self.add_keyword("lhrwgt_group_combine")
104  self.add_keyword("lhrwgt_group_name")
105  self.add_keyword("lhrwgt_id")
106  self.add_keyword("LOevents")
107  self.add_keyword("manyseeds")
108  self.add_keyword("max_io_bufsize")
109  self.add_keyword("maxseeds")
110  self.add_keyword("minlo")
111  self.add_keyword("mintupbratlim")
112  self.add_keyword("mintupbxless")
113  self.add_keyword("ncall1", 50000)
114  self.add_keyword("ncall1osres", 50000)
115  self.add_keyword("ncall1rm")
116  self.add_keyword("ncall2", 100000)
117  self.add_keyword("ncall2osres", 200000)
118  self.add_keyword("ncall2rm")
119  self.add_keyword("noevents")
120  self.add_keyword("novirtual")
121  self.add_keyword("nubound", 100000)
122  self.add_keyword("olddij")
123  self.add_keyword("par_2gsupp")
124  self.add_keyword("par_diexp")
125  self.add_keyword("par_dijexp")
126  self.add_keyword("parallelstage")
127  self.add_keyword("pdfreweight")
128  self.add_keyword("ptsqmin")
129  self.add_keyword("ptsupp")
130  self.add_keyword("radregion")
131  self.add_keyword("rand1")
132  self.add_keyword("rand2")
133  self.add_keyword("renscfact", self.default_scales[1])
134  self.add_keyword("runningscale")
135  self.add_keyword("rwl_add")
136  self.add_keyword("rwl_file")
137  self.add_keyword("rwl_format_rwgt")
138  self.add_keyword("rwl_group_events")
139  self.add_keyword("skipextratests")
140  self.add_keyword("SLHA")
141  self.add_keyword("smartsig")
142  self.add_keyword("softtest")
143  self.add_keyword("stage2init")
144  self.add_keyword("storeinfo_rwgt")
145  self.add_keyword("storemintupb")
146  self.add_keyword("testplots")
147  self.add_keyword("testsuda")
148  self.add_keyword("ubexcess_correct")
149  self.add_keyword("ubsigmadetails")
150  self.add_keyword("use-old-grid")
151  self.add_keyword("use-old-ubound")
152  self.add_keyword("withdamp")
153  self.add_keyword("withnegweights")
154  self.add_keyword("withsubtr")
155  self.add_keyword("Wmass", -1)
156  self.add_keyword("Wwidth", -1)
157  self.add_keyword("xupbound", 7)
158  self.add_keyword("Zmass", -1)
159  self.add_keyword("Zwidth", -1)
160 
161  def validate_weakinos(self):
162  """! Validate weakinos."""
163  self.expose() # convenience call to simplify syntax
164  weakinos = []
165  for parameter in ["chargino_A", "chargino_B"]:
166  weakino_name = list(self.parameters_by_name(parameter))[0].value
167  self.check_decay_mode(weakino_name, self.allowed_weakinos.keys())
168  weakinos.append(self.allowed_weakinos[weakino_name])
169  list(self.parameters_by_name("chargino_A"))[0].value = max(weakinos)
170  list(self.parameters_by_name("chargino_B"))[0].value = min(weakinos)
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.configurable.Configurable.parameters_by_name
def parameters_by_name(self, name)
Retrieve all parameters that use a given name.
Definition: configurable.py:64
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.powheg.chi1chi1.chi1chi1.allowed_weakinos
allowed_weakinos
List of allowed weakinos.
Definition: chi1chi1.py:45
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.processes.powheg.chi1chi1.chi1chi1.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: chi1chi1.py:21
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_base.PowhegBase.check_decay_mode
def check_decay_mode(self, decay_mode, allowed_decay_modes=None)
Check whether a decay mode is allowed an raise an exception if it is not.
Definition: powheg_base.py:283
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.processes.powheg_base.PowhegBase.default_PDFs
def default_PDFs(self)
Default PDFs for this process.
Definition: powheg_base.py:241
python.processes.powheg.chi1chi1.chi1chi1.validate_weakinos
def validate_weakinos(self)
Validate weakinos.
Definition: chi1chi1.py:161
python.processes.powheg_V2.PowhegV2
Base class for PowhegBox V2 processes.
Definition: powheg_V2.py:6
python.processes.powheg_base.PowhegBase.executable
executable
Powheg executable that will be used.
Definition: powheg_base.py:154
python.processes.powheg.chi1chi1.chi1chi1
Default Powheg configuration for chargino pair production.
Definition: chi1chi1.py:13
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798