2 import Validation.RecoTau.ValidationUtils
as Utils
12 RecoTauValidation_cfi.py
14 Contains the standard tau validation parameters. It is organized into
15 the following sections.
19 Set common kinematic cuts (pt > 5 and eta < 2.5) on the denominator source.
20 Note that the denominator depends on the type of test (signal/background/e etc)
22 The denominator kinematic cutter requires that
26 Produce numerator and denominator histgorams used to produce
30 TauValNumeratorAndDenominator
32 tauValSelectedDenominator (filtered GenJet collection)
36 Using numerator and denominators, calculate and store
42 TauValNumeratorAndDenominator
46 Plot curves calculated in efficiency, in both an overlay mode
47 showing overall performance for a release, and the indvidual
48 discriminator efficiency compared to a given release
53 loadAndPlotTauValidation
56 TauEfficiencies, external root file to compare to
58 Plotting must be executed in a separate cmsRun job!
62 Various scripts to automate things...
73 kinematicSelectedTauValDenominatorCut = cms.string(
'pt > 5. && abs(eta) < 2.5')
74 denominator = cms.InputTag(
"kinematicSelectedTauValDenominator")
80 Plot the pt/eta/energy/phi spectrum of PFTaus that pass
81 a series of PFTauDiscriminator cuts.
83 These will be used as the numerator/denominators of the
84 efficiency calculations
88 proc = cms.Process(
'helper')
90 StandardMatchingParameters = cms.PSet(
91 DataType = cms.string(
'Leptons'),
92 MatchDeltaR_Leptons = cms.double(0.15),
93 MatchDeltaR_Jets = cms.double(0.3),
94 SaveOutputHistograms = cms.bool(
False),
96 RefCollection = denominator,
97 TauPtCut = cms.double(0.),
98 recoCuts = cms.string(
''),
99 genCuts = cms.string(
''),
100 chainCuts = cms.bool(
False)
103 GenericTriggerSelectionParameters = cms.PSet(
104 andOr = cms.bool(
False ),
105 dbLabel = cms.string(
"PFTauDQMTrigger"),
106 andOrHlt = cms.bool(
True),
107 hltInputTag = cms.InputTag(
"TriggerResults::HLT"),
109 hltPaths = cms.vstring(
'HLT_IsoMu*_eta*_LooseIsoPFTau*_v*',
'HLT_DoubleIsoPFTau*_Trk*_eta*_v*'),
110 errorReplyHlt = cms.bool(
False),
111 verbosityLevel = cms.uint32(0)
114 proc.templateAnalyzer = cms.EDAnalyzer(
116 StandardMatchingParameters,
117 GenericTriggerSelection = GenericTriggerSelectionParameters,
118 ExtensionName = cms.string(
""),
119 TauProducer = cms.InputTag(
''),
120 discriminators = cms.VPSet(
124 proc.RunHPSValidation = proc.templateAnalyzer.clone()
125 proc.RunHPSValidation.ExtensionName =
""
127 proc.RunHPSValidation.TauProducer = cms.InputTag(
'hpsPFTauProducer')
128 proc.RunHPSValidation.discriminators = cms.VPSet(
129 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFinding"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
130 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingNewDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
131 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingOldDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
132 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseChargedIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
133 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseChargedIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
134 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightChargedIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
135 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
136 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
137 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
138 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
139 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
140 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
141 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
142 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
143 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
144 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
145 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
146 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
147 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
148 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
149 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
150 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
151 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
152 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
153 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
154 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
155 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
156 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
157 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
158 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
159 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
160 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
161 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
162 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
163 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
164 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
165 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
166 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
167 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
168 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
169 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
170 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA5VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
171 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA5LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
172 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA5MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
173 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA5TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
174 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA5VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
175 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
176 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
177 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
178 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseMuonRejection2"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
179 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumMuonRejection2"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
180 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightMuonRejection2"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
181 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
182 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
183 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVALooseMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
184 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVAMediumMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
185 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVATightMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
188 proc.TauValNumeratorAndDenominator = cms.Sequence(
189 proc.RunHPSValidation
196 Tau efficiency calculations
198 Define the Efficiency curves to produce. Each
199 efficiency producer takes the numberator and denominator
200 histograms and the dependent variables.
203 plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator)
204 proc.efficiencies = cms.EDAnalyzer(
205 "TauDQMHistEffProducer",
216 proc.normalizePlots = cms.EDAnalyzer(
218 plotNamesToNormalize = cms.vstring(
'*_pTRatio_*',
'*_Size_*',
'*_SumPt_*',
'*_dRTauRefJet*'),
219 reference = cms.string(
'*_pTRatio_allHadronic')
222 proc.TauEfficiencies = cms.Sequence(
231 loadTau: load two separate TauVal root files into the DQM
232 so the plotter can access them
236 loadTau = cms.EDAnalyzer(
"TauDQMFileLoader",
239 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
240 scaleFactor = cms.double(1.),
241 dqmDirectory_store = cms.string(
'test')
243 reference = cms.PSet(
244 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
245 scaleFactor = cms.double(1.),
246 dqmDirectory_store = cms.string(
'reference')
253 xAxisStuff = cms.PSet(
254 xAxisTitle = cms.string(
'P_{T} / GeV'),
255 xAxisTitleOffset = cms.double(0.9),
256 xAxisTitleSize = cms.double(0.05)
258 xModifiers = [[
'pt',[
'xAxisTitle'],[
'P_{T} / GeV']],[
'eta',[
'xAxisTitle'],[
'#eta']],[
'phi',[
'xAxisTitle'],[
'#phi']],[
'pileup',[
'xAxisTitle'],[
'# of Reco Vertices']]]
260 yAxisStuff =cms.PSet(
261 yScale = cms.string(
'linear'),
262 minY_linear = cms.double(0.),
263 maxY_linear = cms.double(1.6),
264 minY_log = cms.double(0.001),
265 maxY_log = cms.double(1.8),
266 yAxisTitle = cms.string(
'#varepsilon'),
267 yAxisTitleOffset = cms.double(1.1),
268 yAxisTitleSize = cms.double(0.05)
270 yModifiers = [[
'efficiency',[
'yScale',
'yAxisTitle'],[
'linear',
'#varepsilon']],[
'fakeRate',[
'yScale',
'yAxisTitle'],[
'log',
'Fake rate']]]
273 posX = cms.double(0.50),
274 posY = cms.double(0.72),
275 sizeX = cms.double(0.39),
276 sizeY = cms.double(0.17),
277 header = cms.string(
''),
278 option = cms.string(
'brNDC'),
279 borderSize = cms.int32(0),
280 fillColor = cms.int32(0)
282 legModifiers = [[
'efficiency',[
'posY',
'sizeY'],[0.72,0.17]],[
'efficiency_overlay',[
'posY',
'sizeY'],[0.66,0.23]]]
284 drawOptStuff = cms.PSet(
285 markerColor = cms.int32(1),
286 markerSize = cms.double(1.),
287 markerStyle = cms.int32(20),
288 lineColor = cms.int32(1),
289 lineStyle = cms.int32(1),
290 lineWidth = cms.int32(2),
291 drawOption = cms.string(
'ex0'),
292 drawOptionLegend = cms.string(
'p')
294 drawOptModifiers = [[
'eff_overlay01',[
'markerColor',
'lineColor'],[1,1]],[
'eff_overlay02',[
'markerColor',
'lineColor'],[2,2]],[
'eff_overlay03',[
'markerColor',
'lineColor'],[3,3]],[
'eff_overlay04',[
'markerColor',
'lineColor'],[4,4]],[
'eff_overlay05',[
'markerColor',
'lineColor'],[6,6]],[
'eff_overlay06',[
'markerColor',
'lineColor'],[5,5]],[
'eff_overlay07',[
'markerColor',
'lineColor'],[7,7]],[
'eff_overlay08',[
'markerColor',
'lineColor'],[28,28]],[
'eff_overlay09',[
'markerColor',
'lineColor',
'markerStyle'],[2,2,29]],[
'eff_overlay010',[
'markerColor',
'lineColor',
'markerStyle'],[4,4,29]],[
'eff_overlay011',[
'markerColor',
'lineColor',
'markerStyle'],[6,6,29]]]
296 standardDrawingStuff = cms.PSet(
297 canvasSizeX = cms.int32(640),
298 canvasSizeY = cms.int32(640),
299 indOutputFileName = cms.string(
'#PLOT#.png'),
300 xAxes = Utils.SpawnPSet(xModifiers,xAxisStuff),
301 yAxes = Utils.SpawnPSet(yModifiers,yAxisStuff),
302 legends = Utils.SpawnPSet(legModifiers,legStuff),
305 posX = cms.double(0.19),
306 posY = cms.double(0.77),
307 sizeX = cms.double(0.12),
308 sizeY = cms.double(0.04),
309 option = cms.string(
'brNDC'),
310 borderSize = cms.int32(0),
311 fillColor = cms.int32(0),
312 textColor = cms.int32(1),
313 textSize = cms.double(0.04),
314 textAlign = cms.int32(22),
315 text = cms.vstring(
'P_{T} > 5 GeV')
318 posX = cms.double(0.19),
319 posY = cms.double(0.83),
320 sizeX = cms.double(0.12),
321 sizeY = cms.double(0.04),
322 option = cms.string(
'brNDC'),
323 borderSize = cms.int32(0),
324 fillColor = cms.int32(0),
325 textColor = cms.int32(1),
326 textSize = cms.double(0.04),
327 textAlign = cms.int32(22),
328 text = cms.vstring(
'-2.5 < #eta < +2.5')
331 drawOptionSets = cms.PSet(
332 efficiency = cms.PSet(
334 markerColor = cms.int32(4),
335 markerSize = cms.double(1.),
336 markerStyle = cms.int32(20),
337 lineColor = cms.int32(1),
338 lineStyle = cms.int32(1),
339 lineWidth = cms.int32(1),
340 drawOption = cms.string(
'ep'),
341 drawOptionLegend = cms.string(
'p')
343 reference = cms.PSet(
344 lineColor = cms.int32(1),
345 lineStyle = cms.int32(1),
346 lineWidth = cms.int32(1),
347 fillColor = cms.int32(41),
348 drawOption = cms.string(
'eBand'),
349 drawOptionLegend = cms.string(
'l')
353 drawOptionEntries = Utils.SpawnPSet(drawOptModifiers,drawOptStuff)
356 standardCompareTestAndReference = cms.PSet(
357 processes = cms.PSet(
359 dqmDirectory = cms.string(
'test'),
360 legendEntry = cms.string(
'no test label'),
361 type = cms.string(
'smMC')
363 reference = cms.PSet(
364 dqmDirectory = cms.string(
'reference'),
365 legendEntry = cms.string(
'no ref label'),
366 type = cms.string(
'smMC')
427 """ Helper class that applies a given function to all modules
437 input = re.sub(
'fixedConePFTauProducer',
'pfRecoTauProducer', input)
439 fixedDiscriminationRegex = re.compile(
'fixedConePFTauDiscrimination(\w*)')
440 input = fixedDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1', input)
441 input = re.sub(
'shrinkingConePFTauProducer',
'pfRecoTauProducerHighEfficiency', input)
442 shrinkingDiscriminationRegex = re.compile(
'shrinkingConePFTauDiscrimination(\w*)')
443 input = shrinkingDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1HighEfficiency', input)
448 """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies
449 to comapre a 31X to a 22X named validation """
451 if not hasattr(input,
"drawJobs"):
453 myDrawJobs = input.drawJobs.parameters_()
454 for drawJobName, drawJobData
in myDrawJobs.iteritems():
456 if not drawJobData.plots.pythonTypeName() ==
"cms.PSet":
458 pSetToInsert = cms.PSet(
459 standardEfficiencyParameters,
463 dqmMonitorElements = drawJobData.plots.dqmMonitorElements,
464 process = cms.string(
'test'),
465 drawOptionEntry = cms.string(
'eff_overlay01'),
466 legendEntry = cms.string(input.processes.test.legendEntry.value())
472 process = cms.string(
'reference'),
473 drawOptionEntry = cms.string(
'eff_overlay02'),
474 legendEntry = cms.string(input.processes.reference.legendEntry.value())
478 input.drawJobs.__setattr__(drawJobName, pSetToInsert)
482 if hasattr(module,
'processes'):
483 if module.processes.hasParameter([
'test',
'legendEntry'])
and module.processes.hasParameter([
'reference',
'legendEntry']):
484 module.processes.test.legendEntry = TestLabel
485 module.processes.reference.legendEntry = ReferenceLabel
486 print "Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label())
488 print "ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label()
492 ''' set all modules whose name contains one of the matching names to log y scale'''
494 ''' set a module to use log scaling in the yAxis'''
495 if hasattr(module,
'drawJobs'):
497 drawJobParamGetter =
lambda subName : getattr(module.drawJobs, subName)
499 attrNames =
dir(module.drawJobs)
500 for subModuleName, subModule
in zip(attrNames,
map(drawJobParamGetter, attrNames)):
501 matchedNames = [name
for name
in matchingNames
if subModuleName.find( name) > -1]
502 if len(matchingNames) == 0:
503 matchedNames = [
'take',
'everything',
'and',
'dont',
'bother']
504 if hasattr(subModule,
"yAxis")
and len(matchedNames):
505 print "Setting drawJob: ", subModuleName,
" to log scale."
506 subModule.yAxis = cms.string(
'fakeRate')
507 if len(matchingNames) == 0:
508 module.yAxes.efficiency.maxY_log = 40
509 module.yAxes.fakeRate.maxY_log = 40
514 def BaseDirectorizer(module):
517 if hasattr(module,
"outputFilePath"):
518 oldPath = module.outputFilePath.value()
519 newPath = os.path.join(newPath, oldPath)
520 if not os.path.exists(newPath):
523 module.outputFilePath = cms.string(
"%s" % newPath)
524 return BaseDirectorizer
527 if hasattr(module,
'drawJobs'):
529 drawJobs = module.drawJobs.parameterNames_()
530 for drawJob
in drawJobs:
531 if drawJob !=
"TauIdEffStepByStep":
532 module.drawJobs.__delattr__(drawJob)
533 print "Removing comparison plot", drawJob
537 myPlottingSequence.visit(myFunctor)
541 myPlottingSequence.visit(myFunctor)
545 myPlottingSequence.visit(myFunctor)
548 myProcess.loadTau.test.inputFileNames = cms.vstring(FileLoc)
552 del myProcess.loadTau.reference
554 myProcess.loadTau.reference.inputFileNames = cms.vstring(FileLoc)
558 myPlottingSequence.visit(myFunctor)
562 myPlottingSequence.visit(myFunctor)
566 myPlottingSequence.visit(myFunctor)
569 module.ExtensionName = module.ExtensionName.value()+extension
572 if module._TypedParameterizable__type ==
'TauTagValidation':
573 module.histoSettings = pset
576 if hasattr(module,
'_TypedParameterizable__type')
and module._TypedParameterizable__type ==
'TauTagValidation':
577 setattr(module,
'turnOnTrigger',cms.bool(
True))
578 for item
in pset.parameters_().items():
579 setattr(module.GenericTriggerSelection,item[0],item[1])
def SetPlotOnlyStepByStep
def TranslateToLegacyProdNames
def ConvertDrawJobToLegacyCompare
def SetValidationExtention
The plotting of HPS Efficiencies.
def SetReferenceFileToPlot
def RemoveComparisonPlotCommands
def SetTestAndReferenceLabels
def SetCompareToLegacyProductNames