diff --git a/scripts/plot_noise_and_signal.py b/scripts/plot_noise_and_signal.py index a8852e4..fc2fb17 100644 --- a/scripts/plot_noise_and_signal.py +++ b/scripts/plot_noise_and_signal.py @@ -2,14 +2,14 @@ # @Author: Elena Graverini # @Date: 2017-04-28 15:34:06 # @Last Modified by: Elena Graverini -# @Last Modified time: 2017-04-28 15:56:59 +# @Last Modified time: 2017-04-28 16:05:40 from __future__ import print_function import sys import os import ROOT as r -def draw_cali_step(i, sig, noi, layer, sector, ns): +def draw_cali_step(i, sig, noi, layer, sector, ns, fill): cuts_noi = "(odinStep==%s && sector==%s)" % (i, sector) cuts_sig = "(TrChi2/TrNDoF<3.0) &&"\ "(GhostP<0.01+0.1/1.6*TrChi2/TrNDoF) &&"\ @@ -30,7 +30,7 @@ c.Modified() c.Update() os.system("mkdir -p plot_noise_and_signal") - c.SaveAs("%s_%s_val%s_step%s.pdf") + c.SaveAs("plot_noise_and_signal/%s_fill%s_%s_val%s_step%s.pdf" % (layer, fill, sector, ns, i)) h_sig.Delete() h_bkg.Delete() @@ -53,6 +53,6 @@ noi = file.Get('STADCTrackMonitor/NoiseInfo/%s' % layer) for i in range(66): - draw_cali_step(i, sig, noi, layer, sector, ns) + draw_cali_step(i, sig, noi, layer, sector, ns, fill) file.Close()