diff --git a/scripts/checkTrackSelection.py b/scripts/checkTrackSelection.py index e516345..419d54a 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 16:38:19 +# @Last Modified time: 2017-05-03 17:02:22 import ROOT as r import os @@ -46,7 +46,7 @@ h_noise = r.gDirectory.Get('hnoise') c = r.TCanvas() h_sig.Divide(h_noise) - h_sig.Draw("colz") + # h_sig.Draw("colz") h_sig.GetZaxis().SetRangeUser(0, 10) h_sig.SetTitle('TTaU S/B ratio for fill %s' % fill) h_sig.GetXaxis().SetTitle(r'#chi^{2}_{track}/ndf') @@ -70,6 +70,7 @@ c.SaveAs('%s/%s_fill%s.pdf' % (out_location, det, fill)) h_sig.Delete() h_noise.Delete() + return f, t_sig def printADC(f, t_sig, det, fill, stat, step): @@ -107,6 +108,7 @@ c.Update() c.SaveAs('%s/%s_odinStep%s_fill%s.pdf' % (out_location, det, step, fill)) h_sig.Delete() + return f, t_sig def putLine(c, det): @@ -134,7 +136,6 @@ t_sig.Draw('val5>>hnew(70,-30,90)', 'odinStep==%s' % step) c.SaveAs() - draw_sig = "GhostP : TrChi2/TrNDoF>>hsig(100, 0., 10., 100, 0., 1.)" draw_bg = "GhostP : TrChi2/TrNDoF>>hnoise(100, 0., 10., 100, 0., 1.)" f.Close() @@ -146,8 +147,8 @@ f = r.TFile(location[det] + '%s.root' % fill, 'read') t_sig = f.Get('STADCTrackMonitor/HitInfo/%s' % layer[det]) - printSelection(f, t_sig, det, fill, stat) + f, t_sig = printSelection(f, t_sig, det, fill, stat) for step in [0, 12, 48, 54, 60]: - printADC(f, t_sig, det, fill, stat, step) + f, t_sig = printADC(f, t_sig, det, fill, stat, step) f.Close()