Пример #1
0
def mctruth_ddbar_single_mode(datatype, mode, label, ranges, test):
    var = 'mctruth'
    mctruthfile = get_evtfile(datatype, mode, label, var)

    if test:
        sys.stdout.write('\ntest: mctruthfile %s\n' % mctruthfile)

    modename = mode.replace('Single_', '')
    mctruthtable = get_mctruth_tab_link(datatype, mode, label)
    result = [modename, mctruthtable]
    tab = DHadTable(mctruthfile)
    result.extend(tab.column_analyze('Number', ranges))
    return result
Пример #2
0
def bkg_ddbar_single_mode(datatype, mode, label, ranges, debug):
    prefix = 'dir_'+label
    bkgname = '%s_%s.txt' %(datatype, mode)
    bkgname = bkgname.replace('/', '_')
    bkgfile = tools.set_file(
        extbase=attr.bkgpath(), prefix=prefix, comname=bkgname)

    if debug:
        sys.stdout.write('\ndebug: bkgfile %s\n' %bkgfile)
    modename = mode.replace('Single_', '')
    bkgtable = get_bkg_tab_link(datatype, mode, label)
    result = [modename, bkgtable]
    tab = DHadTable(bkgfile)
    result.extend(tab.column_analyze('Number', ranges))
    return result
Пример #3
0
def bkg_ddbar_single_mode(datatype, mode, label, ranges, debug):
    prefix = 'dir_' + label
    bkgname = '%s_%s.txt' % (datatype, mode)
    bkgname = bkgname.replace('/', '_')
    bkgfile = tools.set_file(extbase=attr.bkgpath(),
                             prefix=prefix,
                             comname=bkgname)

    if debug:
        sys.stdout.write('\ndebug: bkgfile %s\n' % bkgfile)
    modename = mode.replace('Single_', '')
    bkgtable = get_bkg_tab_link(datatype, mode, label)
    result = [modename, bkgtable]
    tab = DHadTable(bkgfile)
    result.extend(tab.column_analyze('Number', ranges))
    return result