diff --git a/scripts/checkTrackSelection.py b/scripts/checkTrackSelection.py index a5083a2..21a4a5e 100644 --- a/scripts/checkTrackSelection.py +++ b/scripts/checkTrackSelection.py @@ -8,19 +8,21 @@ import ROOT as r import os -location_tt = "/disk/data1/hep/elena/data/ST/Aging_Tuples/TT/TTaU/" +location = {'TT': "/disk/data1/hep/elena/data/ST/Aging_Tuples/TT/TTaU/", + 'IT': "/disk/data1/hep/elena/data/ST/Aging_Tuples/IT/T3X2/"} out_location = os.getcwd() + '/trackSel' os.system('mkdir -p %s' % out_location) -#fills = [2797, 3108, 3478, 3960, 4518] -fills = [4643] +fills = [2797, 3108, 3478, 3960, 4518] +#fills = [4643] +dets = ['TT', 'IT'] stat = 10000000 r.gROOT.ProcessLine('.X %s/../include/lhcbstyle.C' % os.getcwd()) r.gStyle.SetPadRightMargin(0.12) -def printSelection(fill, stat): - f = r.TFile(location_tt + '%s.root' % fill, 'read') +def printSelection(det, fill, stat): + f = r.TFile(location[det] + '%s.root' % fill, 'read') t_sig = f.Get('STADCTrackMonitor/HitInfo/TTaU') # t_bg = f.Get('STADCTrackMonitor/NoiseInfo/TTaU') # t_sig.Draw("GhostP : TrChi2/TrNDoF>>hnew(100,0., 5,100, 0.,1.)", "", "colz", 10000, 0) @@ -37,6 +39,7 @@ h_sig.SetTitle('TTaU S/B ratio for fill %s' % fill) h_sig.GetXaxis().SetTitle(r'#chi^{2}_{track}/ndf') h_sig.GetYaxis().SetTitle(r'Ghost Prob.') + h_sig.GetZaxis().SetTitle(r'S/B ratio') h_sig.Draw("colz") label = r.TPaveText( 0.74 - r.gStyle.GetPadRightMargin(), 0.87 - r.gStyle.GetPadTopMargin(), @@ -54,7 +57,7 @@ c.Modified() c.Update() - c.SaveAs('%s/%s.pdf' % (out_location, fill)) + c.SaveAs('%s/%s_fill%s.pdf' % (out_location, det, fill)) f.Close() @@ -75,5 +78,6 @@ if __name__ == '__main__': - for fill in fills: - printSelection(fill, stat) + for det in dets: + for fill in fills: + printSelection(fill, stat)