diff --git a/scripts/checkTrackSelection.py b/scripts/checkTrackSelection.py index b86271f..0a6c955 100644 --- a/scripts/checkTrackSelection.py +++ b/scripts/checkTrackSelection.py @@ -3,7 +3,7 @@ # @Author: Elena Graverini # @Date: 2015-10-27 18:26:49 # @Last Modified by: Elena Graverini -# @Last Modified time: 2017-05-03 14:44:53 +# @Last Modified time: 2017-05-03 14:48:55 import ROOT as r import os @@ -41,9 +41,9 @@ # t_sig.Draw("GhostP : TrChi2/TrNDoF>>hnew(100,0., 5,100, 0.,1.)", "", "colz", 10000, 0) t_sig.Draw("GhostP : TrChi2/TrNDoF>>hsig(100,0., 5,100, 0.,1.)", "val%s>12" % val[det], "goff", stat, 0) - h_sig = r.gPad.GetPrimitive('hsig') + h_sig = r.gDirectory.Get('hsig') t_sig.Draw("GhostP : TrChi2/TrNDoF>>hnoise(100,0., 5,100, 0.,1.)", "val%s<12" % val[det], "goff", stat, 0) - h_noise = r.gPad.GetPrimitive('hnoise') + h_noise = r.gDirectory.Get('hnoise') c = r.TCanvas() h_sig.Divide(h_noise) @@ -80,7 +80,7 @@ # f = r.TFile(location[det] + '%s.root' % fill, 'read') # t_sig = f.Get('STADCTrackMonitor/HitInfo/%s' % layer[det]) t_sig.Draw("val%s>>hsig(110,-35, 75)" % val[det], "odinStep==%s" % step, "goff", stat, 0) - h_sig = r.gPad.GetPrimitive('hsig') + h_sig = r.gDirectory.Get('hsig') r.gROOT.ProcessLine('.X %s/../include/lhcbstyle.C' % os.getcwd()) c = r.TCanvas()