MadGraph example
[1]:
import hepi
print(hepi.__version__)
import smpl
import numpy as np
import hepi.madgraph as mg
import hepi.util as util
import matplotlib.pyplot as plt
mg.set_path("/opt/MG5_aMC_v2_7_0/")
print (mg.get_path())
0.1.6.20+dirty
/opt/MG5_aMC_v2_7_0/
[ ]:
No on-shell subtraction through madstr
[2]:
params = [
"mastercode_with_gm2.in",
]
pss = [
(1000011,-1000011),
]
for pa,pb in pss:
for param in params:
i = hepi.Input(hepi.Order.NLO,13000,pa,pb,param,"cteq6l1","cteq66",1., 1.,model="/opt/MG5_aMC_v2_7_0/models/MSSMatNLO_UFO")
li = [i]
li = hepi.mass_scan([i],pa, np.linspace(100,1000,7+8))
mg_dl = mg.run(li,skip=False,madstr=False)
hepi.mass_plot(mg_dl,"LO",pa,logy=True)
hepi.mass_plot(mg_dl,"NLO",pa,logy=True)
hepi.title(plt.gca(),li[0],scenario="mastercode")
Running: 15 jobs
./output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.out
/bin/sh: line 1: /opt/MG5_aMC_v2_7_0/bin/mg5_aMC: No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
cp: cannot stat './output/dd6217160a629c3e78f6d632d334ec2a5503b99be880523928b954ab6f432446.bdir': No such file or directory
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipykernel_3679/832802357.py in <module>
12 mg_dl = mg.run(li,skip=False,madstr=False)
13
---> 14 hepi.mass_plot(mg_dl,"LO",pa,logy=True)
15 hepi.mass_plot(mg_dl,"NLO",pa,logy=True)
16 hepi.title(plt.gca(),li[0],scenario="mastercode")
~/.local/lib/python3.8/site-packages/hepi/plot.py in mass_plot(dict_list, y, part, logy, yaxis, yscale, label, **kwargs)
62 **kwargs):
63 dict_list["mass_" + str(part)] = get_mass(dict_list, abs(part))
---> 64 _plot(dict_list,
65 "mass_" + str(part),
66 y,
~/.local/lib/python3.8/site-packages/hepi/plot.py in _plot(dict_list, x, y, label, xaxis, yaxis, ratio, K, K_plus_1, logy, yscale, mask, **kwargs)
146 vy = vy / splot.unv(vy)
147
--> 148 _vplot(vx, vy, label, xaxis, yaxis, logy, yscale, mask=mask, **kwargs)
149
150
~/.local/lib/python3.8/site-packages/hepi/plot.py in _vplot(x, y, label, xaxis, yaxis, logy, yscale, interpolate, plot_data, data_color, mask, fill, data_fmt, fmt, print_area, **kwargs)
204 if interpolate:
205 #print(vx,vy)
--> 206 spl = make_interp_spline(vx, splot.unv(vy), k=3) # type: BSpline
207 power_smooth = spl(xnew)
208 if fill:
/usr/lib/python3.8/site-packages/scipy/interpolate/_bsplines.py in make_interp_spline(x, y, k, t, bc_type, axis, check_finite)
1238
1239 x = _as_float_array(x, check_finite)
-> 1240 y = _as_float_array(y, check_finite)
1241
1242 y = np.moveaxis(y, axis, 0) # now internally interp axis is zero
/usr/lib/python3.8/site-packages/scipy/interpolate/_bsplines.py in _as_float_array(x, check_finite)
34 x = x.astype(dtyp, copy=False)
35 if check_finite and not np.isfinite(x).all():
---> 36 raise ValueError("Array must not contain infs or nans.")
37 return x
38
ValueError: Array must not contain infs or nans.
On-shell subtraction through madstr
[ ]:
params = [
"mastercode_with_gm2.in",
]
pss = [
(1000022,1000022),
]
for pa,pb in pss:
for param in params:
i = hepi.Input(hepi.Order.NLO,13000,pa,pb,param,"cteq6l1","cteq66",1., 1.,model="/opt/MG5_aMC_v2_7_0/models/EWKino_NLO_UFO_py3")
li = [i]
li = hepi.mass_scan([i],pa, np.linspace(100,1000,7+8))
mg_dl = mg.run(li,skip=False,madstr=True)
hepi.mass_plot(mg_dl,"LO",pa,logy=True)
hepi.mass_plot(mg_dl,"NLO",pa,logy=True)
hepi.title(plt.gca(),li[0],scenario="mastercode")
[ ]:
[ ]: