示例#1
0
def pmt_draw(the_file,event):
    #Map PMT - 4X4 grid
    face=m.pmtface()
    
    #Create Text
    text = [m.tpaver("%s" % str(x+4*y),float((x+1)%16),float((y+1)%16)) for x in xrange(4) for y in xrange(4)]    
    title=m.pmttitle("PMT View")
    
    #Create pixel map
    values = f.fiber(the_file,event)
    pmt = m.pmt_hist(values,face)

    s.fix_plot(pmt)
    pmt.SetTitle(";Column;Row")
    
    #Return
    for_display=[pmt,text,title]

    return for_display
示例#2
0
def gridit(root_file,user_event):
    gStyle.SetOptStat(0)
    n_extrusions = 32
    top_grid = TH2I('top_grid',
                    ';x (0 #rightarrow 7);y (8 #rightarrow 15)',
                    8,0,8,8,0,8)
    bot_grid = TH2I('bot_grid',
                    ';x (16 #rightarrow 23);y (24 #rightarrow 31)',
                    8,0,8,8,0,8)
    grid_list = [top_grid,bot_grid]
    hit_pixels = f.fiber(root_file,int(user_event))
    mapfile    = open('mapfile.csv')
    hit_map    = f.mapping(mapfile)

    grid_list = gm.fill_grid(grid_list,hit_pixels,hit_map)
                        
    gm.fix_grids(grid_list)

    return grid_list