4 import FWCore.ParameterSet.VarParsing
as VarParsing
6 from PerformanceCurvePlotter
import *
10 options.register(
'signalFiles',
12 VarParsing.VarParsing.multiplicity.list,
13 VarParsing.VarParsing.varType.string,
14 "Specify path(s) to signal files(s)"
17 options.register(
'backgroundFiles',
19 VarParsing.VarParsing.multiplicity.list,
20 VarParsing.VarParsing.varType.string,
21 "Specify paths(s) to background files(s)"
24 options.register(
'referenceLabels',
26 VarParsing.VarParsing.multiplicity.list,
27 VarParsing.VarParsing.varType.string,
28 "Specify labels for each sig/bkg pair"
31 options.register(
'ValidationSequence',
33 VarParsing.VarParsing.multiplicity.singleton,
34 VarParsing.VarParsing.varType.sring,
35 "Specify the sequence of discriminators to plot. They are defined \
36 in the NUMERATOR/DENOMINATOR section of RecoTauValidation_cff "
40 options.parseArguments()
43 print "Error: Validation sequence %s is not defined in Validation.RecoTau.RecoTauValidation_cfi!!" % options.ValidationSequence
45 filesAndLabels = zip(options.signalFiles, options.backgroundFiles, options.referenceLabels)
50 if not os.path.isfile(theFile):
51 print "Can't stat file %s!" % theFile
54 for signalFile, backgroundFile, referenceLabel:
62 ReleaseToPlot.append(toPlot)
64 if not os.path.exists(
"SummaryPlots"):
65 os.mkdir(
"SummaryPlots)
67 myOutputFileName = os.path.join("SummaryPlots",
"PerformanceCurve.png")