ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/Configuration/scripts/makeCutFlows.py
(Generate patch)

Comparing UserCode/OSUT3Analysis/Configuration/scripts/makeCutFlows.py (file contents):
Revision 1.6 by ahart, Wed Feb 6 00:28:41 2013 UTC vs.
Revision 1.8 by ahart, Mon Feb 18 16:12:47 2013 UTC

# Line 112 | Line 112 | firstChannel = True
112   weight = intLumi / 10000.0
113   for dataset in processed_datasets:
114      dataset_file = "%s/%s.root" % (condor_dir,dataset)
115 <    os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", weight))
115 >    if types[dataset] != "data":
116 >        os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", weight))
117 >    else:
118 >        os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", 1.0))
119  
120   for channel in channels: # loop over final states, which each have their own directory
118    fout = open (texfile, "a")
119    if not firstChannel:
120        fout.write ("\\pagebreak\n\n")
121    firstChannel = False
122    fout.write ("\\section{" + channel + " channel}\n\n")
123    fout.close ()
124
121      cutFlowArgs = ""
122      selectionArgs = ""
123      minusOneArgs = ""
# Line 147 | Line 143 | for channel in channels: # loop over fin
143  
144      #make cutFlowTable objects
145      fout = open (texfile, "a")
146 <    fout.write ("\\subsection{Cut Flow}\n\n")
146 >    if not firstChannel:
147 >        fout.write ("\\pagebreak\n\n")
148 >    firstChannel = False
149 >    fout.write ("\\section*{" + channel + " channel}\n\n")
150 >    fout.write ("\\subsection*{Cut flow}\n\n")
151      fout.close ()
152      os.system("cutFlowTable -l %g %s >> %s" % (intLumi,cutFlowArgs,texfile))
153      fout = open (texfile, "a")
154      fout.write ("\\pagebreak\n\n")
155 <    fout.write ("\\subsection{Individual Selection}\n\n")
155 >    fout.write ("\\section*{" + channel + " channel}\n\n")
156 >    fout.write ("\\subsection*{Individual selection}\n\n")
157      fout.close ()
158      os.system("cutFlowTable -l %g %s >> %s" % (intLumi,selectionArgs,texfile))
159      fout = open (texfile, "a")
160      fout.write ("\\pagebreak\n\n")
161 <    fout.write ("\\subsection{Minus One}\n\n")
161 >    fout.write ("\\section*{" + channel + " channel}\n\n")
162 >    fout.write ("\\subsection*{Minus one}\n\n")
163      fout.close ()
164      os.system("cutFlowTable -l %g %s >> %s" % (intLumi,minusOneArgs,texfile))
165  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines