128 MadGraph_param_blocks = {}
129 decoupled_mass =
'4.5E9'
131 for p
in [
'1000001',
'1000002',
'1000003',
'1000004',
'1000005',
'1000006',
'2000001',
'2000002',
'2000003',
'2000004',
'2000005',
'2000006',
'1000021',\
132 '1000023',
'1000024',
'1000025',
'1000011',
'1000013',
'1000015',
'2000011',
'2000013',
'2000015',
'1000012',
'1000014',
'1000016',
'1000022',\
133 '1000035',
'1000037',
'35',
'36',
'37']:
134 masses[p]=decoupled_mass
140 for anum
in [1,2,3,4]:
141 squarks += [
str(1000000+anum),
str(-1000000-anum),
str(2000000+anum),
str(-2000000-anum)]
142 squarksl += [
str(1000000+anum),
str(-1000000-anum)]
143 dict_index_syst = {0:
'scalefactup',
153 MadGraph_syst_mod =
None
156 MadGraph_param_card =
None
159 MadGraph_run_settings = {
'event_norm':
'average',
167 MadGraph_writeGridpack =
False
172 keepMadGraphOutput =
False
175 fixEventWeightsForBridgeMode=
False
178 MadGraph_add_lifetimes_lhe =
True
181 MadGraph_usePMGSettings =
True
184 customMadGraphPlugin =
None
194 force_nobmass_5FS =
True
198 This JO is long-lived stop RHadrons decaying to b+mu
199 Migrated from r19 JO: https://gitlab.cern.ch/atlas-physics/pmg/infrastructure/mc15joboptions/-/blob/master/common/MadGraph/MadGraphControl_SimplifiedModel_TT_RPVdirectBL_LongLived_RHadron.py
200 JIRA: https://its.cern.ch/jira/browse/ATLMCPROD-5979
203 from MadGraphControl.MadGraphUtilsHelpers
import get_physics_short
205 infoStrings = phys_short.split(
"_")
206 rhlog.info(
" jobConfig: %s ", phys_short[0] )
207 rhlog.info(
" stop mass: %s ", infoStrings[4] )
208 rhlog.info(
" stop ctau: %s ", infoStrings[6].
replace(
'p',
'.') )
211 masses[
'1000006'] =
float(infoStrings[4])
212 masses[
'1000005'] = 3.00000000E+05
213 masses[
'1000022'] = 100000.
216 lifetimeString =
str(infoStrings[6])
217 stopLifetime = lifetimeString.replace(
"ns",
"").
replace(
".py",
"").
replace(
"p",
".")
218 hbar = 6.582119514e-16
219 stopWidth = hbar/
float(stopLifetime)
220 rhlog.info(
" stop lifetime, width: %f, %f ",
float(stopLifetime), stopWidth )
227 if len(infoStrings)>7:
228 gluinoBallProbabilityString =
str(infoStrings[7])
230 gluinoBallProbabilityString =
"gball10"
232 gluinoBallProbability =
float(gluinoBallProbabilityString.replace(
"gball",
""))/100.
233 rhlog.info(
" gluino-ball probability: %f ", gluinoBallProbability )
236 decays[
'1000006'] =
"""DECAY 1000006 %s # stop1 decays
237 # BR NDA ID1 ID2 ID3 ID4
238 1.00000000000 2 -13 5 # stop1 to b mu
243 MadGraph_process =
'''
244 import model MSSM_SLHA2-full
245 define susylq = ul ur dl dr cl cr sl sr
246 define susylq~ = ul~ ur~ dl~ dr~ cl~ cr~ sl~ sr~
247 generate p p > t1 t1~ $ go susylq susylq~ b2 t1 t2 b2~ t1~ t2~ @1
248 add process p p > t1 t1~ j $ go susylq susylq~ b2 t1 t2 b2~ t1~ t2~ @2
249 add process p p > t1 t1~ j j $ go susylq susylq~ b2 t1 t2 b2~ t1~ t2~ @3
254 rhlog.info(
'Registered generation of stop pair production to b+mu; grid point '+
str(runArgs.generatorJobNumber))
256 MadGraph_run_settings.update({
'time_of_flight':
'1E-2',
'event_norm':
'sum'})
259 if 'rpv' in phys_short.lower()
and 'import ' not in MadGraph_process:
260 raise RuntimeError(
'Please import a model when using an RPV decay; these are not handled by the standard MSSM model in MadGraph')
264 nevts = flags.Exec.MaxEvents * 2.
266 MadGraph_run_settings.update({
'nevents':
int(nevts)})
269 if ktdurham
is not None:
270 MadGraph_run_settings.update({
'ktdurham':ktdurham})
272 if flavourScheme
not in [4,5]:
273 raise RuntimeError(
'flavourScheme must be 4 or 5.')
275 if flavourScheme == 4:
276 MadGraph_run_settings.update({
277 'pdgs_for_merging_cut':
'1, 2, 3, 4, 21'
279 _nQuarksMerge = 5
if finalStateB
else 4
281 MadGraph_run_settings.update({
282 'pdgs_for_merging_cut':
'1, 2, 3, 4, 5, 21',
289 MadGraph_process =
"define p = g u c d s b u~ c~ d~ s~ b~\ndefine j = g u c d s b u~ c~ d~ s~ b~\n" + MadGraph_process
291 for l
in MadGraph_process.split(
'\n'):
292 l_nocomment = l.split(
'#')[0]
293 if (
"define p" in l_nocomment
or "define j" in l_nocomment)
and l_nocomment.count(
"=") == 1:
294 l_equals = (l_nocomment.split(
"=")[-1]).
split(
" ")
295 if not set([
'g',
'u',
'c',
'd',
's',
'b',
'u~',
'c~',
'd~',
's~',
'b~']) <=
set(l_equals):
296 raise RuntimeError(
'Invalid definition found for p or j in MadGraph_process string while using 5FS')
297 if force_nobmass_5FS:
298 if masses.get(
'5',0.0) != 0.0:
299 raise RuntimeError(
'Non-zero mass found for b while using 5FS')
303 if 'scup' in phys_short:
304 MadGraph_syst_mod=dict_index_syst[0]
305 elif 'scdw' in phys_short:
306 MadGraph_syst_mod=dict_index_syst[1]
307 elif 'alup' in phys_short:
308 MadGraph_syst_mod=dict_index_syst[2]
309 elif 'aldw' in phys_short:
310 MadGraph_syst_mod=dict_index_syst[3]
311 elif 'qcup' in phys_short:
312 MadGraph_syst_mod=dict_index_syst[6]
313 elif 'qcdw' in phys_short:
314 MadGraph_syst_mod=dict_index_syst[7]
317 if 'mass' in [x.lower()
for x
in MadGraph_param_blocks]:
318 raise RuntimeError(
'Do not provide masses in MadGraph_param_blocks; use the masses variable instead')
319 MadGraph_param_blocks[
'MASS'] = masses
323 MadGraph_param_blocks[
'DECAY'] = decays
325 argdict = {
'runArgs' : runArgs,
326 'process' : MadGraph_process,
327 'params' : MadGraph_param_blocks,
328 'fixEventWeightsForBridgeMode': fixEventWeightsForBridgeMode,
329 'madspin_card' : madspin_card,
330 'keepOutput' : keepMadGraphOutput,
331 'run_settings' : MadGraph_run_settings,
332 'writeGridpack' : MadGraph_writeGridpack,
333 'syst_mod' : MadGraph_syst_mod,
334 'param_card' : MadGraph_param_card,
335 'add_lifetimes_lhe' : MadGraph_add_lifetimes_lhe,
336 'usePMGSettings' : MadGraph_usePMGSettings,
337 'plugin' : customMadGraphPlugin,
340 rhlog.info(
"Calling SUSY_Generation")
349 modify_param_card(param_card_input=
'param_card.dat', params={
'MASS': masses,
'DECAY':decays}, output_location=
'SLHA_INPUT.DAT')
351 return ktdurham, MadGraph_process, _nQuarksMerge, gluinoBallProbability