diff --git a/scripts/checkTrackSelection.py b/scripts/checkTrackSelection.py index a59d574..5bd1eb5 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-22 14:28:11 +# @Last Modified time: 2017-05-22 14:59:43 import sys import os from math import sqrt @@ -145,9 +145,9 @@ def printADC(f, t_sig, det, fill, stat, step): if step > 10: - print t_sig.Draw("val%s>>hsig%s(210,-35, 175)" % (val[det], step), "odinStep==%s" % step, "goff") # , stat, 0) + print(t_sig.Draw("val%s>>hsig%s(210,-35, 175)" % (val[det], step), "odinStep==%s" % step, "goff")) # , stat, 0)) else: - print t_sig.Draw("val%s>>hsig%s(210,-35, 175)" % (val[det], step), "odinStep==%s" % step, "goff", stat, 0) + print(t_sig.Draw("val%s>>hsig%s(210,-35, 175)" % (val[det], step), "odinStep==%s" % step, "goff", stat, 0)) h_sig = r.gDirectory.Get('hsig%s' % step) r.gROOT.ProcessLine('.X %s/../include/lhcbstyle.C' % os.getcwd()) r.gStyle.SetPadLeftMargin(0.15) @@ -196,19 +196,19 @@ return c, line -def printByStep(fill, stat): - f = r.TFile(location_tt + '%s.root' % fill, 'read') - t_sig = f.Get('STADCTrackMonitor/HitInfo/TTaU') - - # Look at Landau distribution - for step in range(67): - c = r.TCanvas() - 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() +# def printByStep(fill, stat, det): +# f = r.TFile(location[det] + '%s.root' % fill, 'read') +# t_sig = f.Get('STADCTrackMonitor/HitInfo/TTaU') +# +# # Look at Landau distribution +# for step in range(67): +# c = r.TCanvas() +# 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() if __name__ == '__main__':