Esempio n. 1
0
elif vsbin:
    data +=":labels"

elif one_run:
    data += ":luminum"


canv = TCanvas("PlotCalib","plotCalib",0,0,1600,800)

if opt2d: 
    hhh = TH2D("hhh","hhh",modmax-modmin+1,modmin-0.5,modmax+0.5,chanmax-chanmin+1,chanmin-0.5,chanmax+0.5)

if vsbin: tree.Draw(data,cut_cond,"goff",15)
else: tree.Draw(data,cut_cond,"goff")

if (not opt2d and tree.GetSelectedRows() <= 1) or tree.GetSelectedRows() <= 0:
    print "Not enough points to plot"
    sys.exit(2)

if vsbin:
    if tree.GetSelectedRows() >= 15:
        print "Maximum number of bins is 15"


if line or noline:
    gr = TGraph(tree.GetSelectedRows(),tree.GetV2(),tree.GetV1())
    gr.SetTitle(modulename +" " + " Channel "+ str(chan_n) +" " + gainvalue + titsuff)
    gr.SetMarkerStyle(20)
    gr.SetMarkerSize(1.3)
    gr.SetMarkerColor(2)
    gr.SetLineColor(2)
Esempio n. 2
0
#    cy = int(1.05*cy)
canv = TCanvas("PlotCalib", "plotCalib", 0, 0, cx, cy)

if opt2d:
    hhh = TH2D("hhh", "hhh", modmax - modmin + 1, modmin - 0.5, modmax + 0.5,
               chanmax - chanmin + 1, chanmin - 0.5, chanmax + 0.5)

if not many and not opt2d:
    print("Plotting", data)
    print("With cut", cut_cond)
    if vsbin:
        tree.Draw(data, cut_cond, "goff", 15)
    else:
        tree.Draw(data, cut_cond, "goff")

    if tree.GetSelectedRows() <= 0:
        print("Not enough points to plot")
        sys.exit(2)

    if vsbin:
        if tree.GetSelectedRows() >= 15:
            print("Maximum number of bins is 15")

if line or noline:
    if many:
        first = True
        color = 1
        grall = []
        vmin = 1.e+38
        vmax = -1.e+38
        cut0 = cut_cond