ATLAS Offline Software
chi0chi0.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 neutralino 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(chi0chi0, self).__init__(base_directory, os.path.join("weakinos", "neuIneuJ"), powheg_executable="pwhg_main_ninj", **kwargs)
28 
29  # Load SLHA input
30  if len(glob.glob("*.slha")) > 0:
31  input_slha = glob.glob("*.slha")[0]
32  logger.info("Using input SLHA file: {}".format(input_slha))
33  shutil.move(input_slha, "input_parameters.slha")
34  else:
35  logger.info("Locating input SLHA distributed with POWHEG...")
36  shutil.copy(os.path.join(os.path.split(self.executable)[0], "testrun", "input_mSUGRA.slha"), "input_parameters.slha")
37 
38  # Add parameter validation functions
39  self.validation_functions.append("validate_weakinos")
40 
41 
42  self.allowed_weakinos = {"chi10": 1000022, "chi20": 1000023, "chi30": 1000025, "chi40": 1000035}
43 
44  # Add all keywords for this process, overriding defaults if required
45  self.add_keyword("alphas_from_lhapdf")
46  self.add_keyword("bornktmin")
47  self.add_keyword("bornonly")
48  self.add_keyword("bornsuppfact")
49  self.add_keyword("bornzerodamp")
50  self.add_keyword("bottomthr")
51  self.add_keyword("bottomthrpdf")
52  self.add_keyword("btildeborn")
53  self.add_keyword("btildecoll")
54  self.add_keyword("btildereal")
55  self.add_keyword("btildevirt")
56  self.add_keyword("btlscalect")
57  self.add_keyword("btlscalereal")
58  self.add_keyword("charmthr")
59  self.add_keyword("charmthrpdf")
60  self.add_keyword("check_bad_st1")
61  self.add_keyword("check_bad_st2")
62  self.add_keyword("clobberlhe")
63  self.add_keyword("colltest")
64  self.add_keyword("compress_lhe")
65  self.add_keyword("compress_upb")
66  self.add_keyword("compute_rwgt")
67  self.add_keyword("doublefsr")
68  self.add_keyword("evenmaxrat")
69  self.add_keyword("ewi")
70  self.add_keyword("facscfact", self.default_scales[0])
71  self.add_keyword("fakevirtuals")
72  self.add_keyword("fastbtlbound")
73  self.add_keyword("fin1", "chi10", name="neutralino_A")
74  self.add_keyword("fin2", "chi20", name="neutralino_B")
75  self.add_keyword("fixedgrid")
76  self.add_keyword("flg_debug")
77  self.add_keyword("foldcsi")
78  self.add_keyword("foldphi", 2)
79  self.add_keyword("foldy")
80  self.add_keyword("fullrwgt")
81  self.add_keyword("hdamp")
82  self.add_keyword("hfact")
83  self.add_keyword("icsimax")
84  self.add_keyword("ih1")
85  self.add_keyword("ih2")
86  self.add_keyword("incomingflavors")
87  self.add_keyword("inv_alpha", -1)
88  self.add_keyword("itmx1", 2)
89  self.add_keyword("itmx1osres", 6)
90  self.add_keyword("itmx1rm")
91  self.add_keyword("itmx2", 7)
92  self.add_keyword("itmx2osres", 10)
93  self.add_keyword("itmx2rm")
94  self.add_keyword("iupperfsr")
95  self.add_keyword("iupperisr")
96  self.add_keyword("iymax")
97  self.add_keyword("lhans1", self.default_PDFs)
98  self.add_keyword("lhans2", self.default_PDFs)
99  self.add_keyword("lhrwgt_descr")
100  self.add_keyword("lhrwgt_group_combine")
101  self.add_keyword("lhrwgt_group_name")
102  self.add_keyword("lhrwgt_id")
103  self.add_keyword("LOevents")
104  self.add_keyword("manyseeds")
105  self.add_keyword("max_io_bufsize")
106  self.add_keyword("maxseeds")
107  self.add_keyword("minlo")
108  self.add_keyword("mintupbratlim")
109  self.add_keyword("mintupbxless")
110  self.add_keyword("ncall1", 15000)
111  self.add_keyword("ncall1osres", 15000)
112  self.add_keyword("ncall1rm")
113  self.add_keyword("ncall2", 200000)
114  self.add_keyword("ncall2osres", 200000)
115  self.add_keyword("ncall2rm")
116  self.add_keyword("noevents")
117  self.add_keyword("novirtual")
118  self.add_keyword("nubound", 200000)
119  self.add_keyword("olddij")
120  self.add_keyword("par_2gsupp")
121  self.add_keyword("par_diexp")
122  self.add_keyword("par_dijexp")
123  self.add_keyword("parallelstage")
124  self.add_keyword("pdfreweight")
125  self.add_keyword("ptsqmin")
126  self.add_keyword("ptsupp")
127  self.add_keyword("radregion")
128  self.add_keyword("rand1")
129  self.add_keyword("rand2")
130  self.add_keyword("renscfact", self.default_scales[1])
131  self.add_keyword("runningscale", 0)
132  self.add_keyword("rwl_add")
133  self.add_keyword("rwl_file")
134  self.add_keyword("rwl_format_rwgt")
135  self.add_keyword("rwl_group_events")
136  self.add_keyword("skipextratests")
137  self.add_keyword("SLHA")
138  self.add_keyword("smartsig")
139  self.add_keyword("softtest")
140  self.add_keyword("stage2init")
141  self.add_keyword("storeinfo_rwgt")
142  self.add_keyword("storemintupb")
143  self.add_keyword("testplots")
144  self.add_keyword("testsuda")
145  self.add_keyword("ubexcess_correct")
146  self.add_keyword("ubsigmadetails")
147  self.add_keyword("use-old-grid")
148  self.add_keyword("use-old-ubound")
149  self.add_keyword("withdamp")
150  self.add_keyword("withnegweights")
151  self.add_keyword("withsubtr")
152  self.add_keyword("Wmass", -1)
153  self.add_keyword("Wwidth", -1)
154  self.add_keyword("xupbound", 6)
155  self.add_keyword("Zmass", -1)
156  self.add_keyword("Zwidth", -1)
157 
158  def validate_weakinos(self):
159  """! Validate weakinos."""
160  self.expose() # convenience call to simplify syntax
161  weakinos = []
162  for parameter in ["neutralino_A", "neutralino_B"]:
163  weakino_name = list(self.parameters_by_name(parameter))[0].value
164  self.check_decay_mode(weakino_name, self.allowed_weakinos.keys())
165  weakinos.append(self.allowed_weakinos[weakino_name])
166  list(self.parameters_by_name("neutralino_A"))[0].value = min(weakinos)
167  list(self.parameters_by_name("neutralino_B"))[0].value = max(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.chi0chi0.chi0chi0
Default Powheg configuration for neutralino pair production.
Definition: chi0chi0.py:13
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
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_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.chi0chi0.chi0chi0.allowed_weakinos
allowed_weakinos
List of allowed weakinos.
Definition: chi0chi0.py:42
python.processes.powheg.chi0chi0.chi0chi0.validate_weakinos
def validate_weakinos(self)
Validate weakinos.
Definition: chi0chi0.py:158
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.chi0chi0.chi0chi0.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: chi0chi0.py:21
python.processes.powheg_base.PowhegBase.executable
executable
Powheg executable that will be used.
Definition: powheg_base.py:154
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798