Esempio n. 1
0
            elif args.lumi < 500.:
                g_max = 2.
            else:
                g_max = 1.5
        else:
            if args.lumi < 200.:
                g_max = 5.
            elif args.lumi < 500.:
                g_max = 4.
            else:
                g_max = 3.

        g_values = np.linspace(0.1, g_max, num=20)

        grid = statscan.Grid(mass_values, g_values)
        calc = statscan.StatCalc(None, args.bkg, args.lumi * 1e3)

        for i, mass, g in grid:

            width = XSecTwoHDM.width_tt(args.cp, mass, g=g)
            parton_xsec = XSecTwoHDM(mA=mass,
                                     wA=width,
                                     gA=g,
                                     mH=mass,
                                     wH=width,
                                     gH=g)

            if args.cp == 'A':
                parton_xsec.gH = 0.
            else:
                parton_xsec.gA = 0.
Esempio n. 2
0
from math import isclose

import hmssm
from spectrum import RecoMtt
import statscan

if __name__ == '__main__':

    mA = 500.
    tanbeta = 5.

    significance_ref = 0.9155510617044962
    cls_ref = 0.3621699755911078

    parton_xsec = hmssm.XSecHMSSM(mA, tanbeta, 'params/hMSSM.root')
    reco_mtt = RecoMtt(parton_xsec, resolution=0.1)
    calc = statscan.StatCalc(reco_mtt, 'ttbar_res10.root', 150e3)

    with statscan.suppress_stdout():
        significance = calc.significance()
        cls = calc.cls()

    print('Significance\n  Current:   {}\n  Reference: {}'.format(
        significance, significance_ref))
    print('CLs\n  Current:   {}\n  Reference: {}'.format(cls, cls_ref))

    if isclose(significance, significance_ref) and isclose(cls, cls_ref):
        print('\033[1;32mTest passed\033[0m')
    else:
        print('\033[1;31mTest failed\033[0m')