def MT2bl_wrapper(lepE, lepPx, lepPy, lepPz,
b1E, b1Px, b1Py, b1Pz,
b2E, b2Px, b2Py, b2Pz,
MET_x, MET_y):
code = """
double pl[4] = { lepE, lepPx, lepPy, lepPz}; // El, plx, ply, plz, (visible lepton)
double pb1[4] = { b1E, b1Px, b1Py, b1Pz }; // Eb1, pb1x, pb1y, pb1z (bottom on the same side as the visible lepton)
double pb2[4] = { b2E, b2Px, b2Py, b2Pz }; // Eb2, pb2x, pb2y, pb2z (other bottom, paired with the invisible W)
double pmiss[3] = { 0., MET_x, MET_y }; // <unused>, pmx, pmy (missing pT)
mt2bl_bisect::mt2bl mt2bl;
mt2bl.set_momenta(pl, pb1, pb2, pmiss);
return_val = mt2bl.get_mt2bl();
"""
# Pass all Python arguments to C++
frame = inspect.currentframe()
args = inspect.getargvalues(frame)[0]
lib_MT2bl = inline(code,args,
headers=['"MT2bl.h"'],
include_dirs=["/scratch18/kazuki2/analyses/mT2_packages"],
verbose=0
)
return lib_MT2bl
评论列表
文章目录