Ejemplo n.º 1
0
def do_all(files):
    for f in files:
        
        ph_cands = make_cut_histogram(f.photon_counts)
        events = make_cut_histogram(f.event_counts)
        
        #("oq", "grl", "pv", "pt_gt100").project_out().
        print filename
        print "\n".join("  %20s %12s %12s" % (a.title, comma_num(a.true), comma_num(a.total)) for a in ph_cands.axes_objs)
Ejemplo n.º 2
0
def do_cutflow_one_file(f, cuts, options):
    ph_cands = make_cut_histogram(f.photon_counts)
    #ph_cands = ph_cands.isConv.project_out(True)
    if options.apply_cut:
        cut, value = options.apply_cut.split(":")
        ph_cands = getattr(ph_cands, cut).project_out(int(value))
    
    rows = []
    for axis in [None] + ordered_axes(ph_cands.axes_objs, cuts):
        rows.append(do_cutflow_one_cut(ph_cands, axis, cuts, options))
        
    return rows