--- UserCode/OSUT3Analysis/Configuration/scripts/makeCutFlows.py 2013/02/05 10:49:41 1.5 +++ UserCode/OSUT3Analysis/Configuration/scripts/makeCutFlows.py 2013/02/06 00:28:41 1.6 @@ -122,24 +122,44 @@ for channel in channels: # loop over fin fout.write ("\\section{" + channel + " channel}\n\n") fout.close () - args = "" - hist = channel + "CutFlow" + cutFlowArgs = "" + selectionArgs = "" + minusOneArgs = "" #print hist for dataset in processed_datasets: dataset_file = "%s/%s.root_tmp" % (condor_dir,dataset) #print dataset_file - args = args + " " + dataset_file - args = args + " " + hist + cutFlowArgs = cutFlowArgs + " " + dataset_file + selectionArgs = selectionArgs + " " + dataset_file + minusOneArgs = minusOneArgs + " " + dataset_file + cutFlowArgs = cutFlowArgs + " " + channel + "CutFlow" + selectionArgs = selectionArgs + " " + channel + "Selection" + minusOneArgs = minusOneArgs + " " + channel + "MinusOne" rawlabel = "$" + labels[dataset] + "$" label = rawlabel.replace("#","\\") label = "'" + label + "'" #print label - args = args + " " + label + cutFlowArgs = cutFlowArgs + " " + label + selectionArgs = selectionArgs + " " + label + minusOneArgs = minusOneArgs + " " + label #make cutFlowTable objects - os.system("cutFlowTable -l %g %s >> %s" % (intLumi,args,texfile)) + fout = open (texfile, "a") + fout.write ("\\subsection{Cut Flow}\n\n") + fout.close () + os.system("cutFlowTable -l %g %s >> %s" % (intLumi,cutFlowArgs,texfile)) + fout = open (texfile, "a") + fout.write ("\\pagebreak\n\n") + fout.write ("\\subsection{Individual Selection}\n\n") + fout.close () + os.system("cutFlowTable -l %g %s >> %s" % (intLumi,selectionArgs,texfile)) + fout = open (texfile, "a") + fout.write ("\\pagebreak\n\n") + fout.write ("\\subsection{Minus One}\n\n") + fout.close () + os.system("cutFlowTable -l %g %s >> %s" % (intLumi,minusOneArgs,texfile)) for dataset in processed_datasets: dataset_file = "%s/%s.root_tmp" % (condor_dir,dataset)