Esempio n. 1
0
def check_mva_category_sum(year):
    data = Data(year)
    evt_sum = 0.
    for cat in CATEGORIES['mva_all']:
        cur_sum = data.events(cat)[1].value
        assert_true(cur_sum > 0)
        evt_sum += cur_sum
    assert_true(evt_sum > 0)
    presel = data.events(Category_Preselection)[1].value
    presel_deta = data.events(Category_Preselection, cuts=DETA_TAUS)[1].value
    assert_equal(presel_deta, evt_sum)
    assert_true(presel > evt_sum)
Esempio n. 2
0
def test_category_orthogonality():

    data = Data(year=2012)
    cats = CATEGORIES['harmonize']

    class CombinedCat(Category):
        cuts = reduce(and_, [c.cuts for c in cats])
        year_cuts = cats[0].year_cuts
    log.info(str(CombinedCat.cuts))
    assert_equal(data.events(CombinedCat, 'OS_TRK'), 0)
Esempio n. 3
0
def check_category_orthogonality(year, cat_type):
    data = Data(year)
    cats = CATEGORIES[cat_type]
    cuts = reduce(and_, [c.get_cuts(year) for c in cats])
    log.info(str(cuts))
    assert_equal(data.events(cuts=cuts)[1].value, 0)