1 import FWCore.ParameterSet.Config
as cms
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)),
135 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
136 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
137 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
146 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
147 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
151 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
152 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
153 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
154 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
155 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
156 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
157 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
158 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
159 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
160 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
161 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
162 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
163 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
164 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
165 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
166 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
167 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
168 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
169 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
170 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
171 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
172 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
173 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
174 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
175 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
176 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
177 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
178 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
179 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
180 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
181 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
182 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
183 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
184 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
185 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
186 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
187 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
188 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
189 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
190 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
191 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
192 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
193 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
194 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False))
197 proc.TauValNumeratorAndDenominator = cms.Sequence(
198 proc.RunHPSValidation
205 Tau efficiency calculations
207 Define the Efficiency curves to produce. Each
208 efficiency producer takes the numberator and denominator
209 histograms and the dependent variables.
212 plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator)
213 proc.efficiencies = cms.EDAnalyzer(
214 "TauDQMHistEffProducer",
225 proc.normalizePlots = cms.EDAnalyzer(
227 plotNamesToNormalize = cms.vstring(
'*_pTRatio_*',
'*_Size_*',
'*_SumPt_*',
'*_dRTauRefJet*'),
228 reference = cms.string(
'*_pTRatio_allHadronic')
231 proc.TauEfficiencies = cms.Sequence(
240 loadTau: load two separate TauVal root files into the DQM
241 so the plotter can access them
245 loadTau = cms.EDAnalyzer(
"TauDQMFileLoader",
248 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
249 scaleFactor = cms.double(1.),
250 dqmDirectory_store = cms.string(
'test')
252 reference = cms.PSet(
253 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
254 scaleFactor = cms.double(1.),
255 dqmDirectory_store = cms.string(
'reference')
262 xAxisStuff = cms.PSet(
263 xAxisTitle = cms.string(
'P_{T} / GeV'),
264 xAxisTitleOffset = cms.double(0.9),
265 xAxisTitleSize = cms.double(0.05)
267 xModifiers = [[
'pt',[
'xAxisTitle'],[
'P_{T} / GeV']],[
'eta',[
'xAxisTitle'],[
'#eta']],[
'phi',[
'xAxisTitle'],[
'#phi']],[
'pileup',[
'xAxisTitle'],[
'# of Reco Vertices']]]
269 yAxisStuff =cms.PSet(
270 yScale = cms.string(
'linear'),
271 minY_linear = cms.double(0.),
272 maxY_linear = cms.double(1.6),
273 minY_log = cms.double(0.001),
274 maxY_log = cms.double(1.8),
275 yAxisTitle = cms.string(
'#varepsilon'),
276 yAxisTitleOffset = cms.double(1.1),
277 yAxisTitleSize = cms.double(0.05)
279 yModifiers = [[
'efficiency',[
'yScale',
'yAxisTitle'],[
'linear',
'#varepsilon']],[
'fakeRate',[
'yScale',
'yAxisTitle'],[
'log',
'Fake rate']]]
282 posX = cms.double(0.50),
283 posY = cms.double(0.72),
284 sizeX = cms.double(0.39),
285 sizeY = cms.double(0.17),
286 header = cms.string(
''),
287 option = cms.string(
'brNDC'),
288 borderSize = cms.int32(0),
289 fillColor = cms.int32(0)
291 legModifiers = [[
'efficiency',[
'posY',
'sizeY'],[0.72,0.17]],[
'efficiency_overlay',[
'posY',
'sizeY'],[0.66,0.23]]]
293 drawOptStuff = cms.PSet(
294 markerColor = cms.int32(1),
295 markerSize = cms.double(1.),
296 markerStyle = cms.int32(20),
297 lineColor = cms.int32(1),
298 lineStyle = cms.int32(1),
299 lineWidth = cms.int32(2),
300 drawOption = cms.string(
'ex0'),
301 drawOptionLegend = cms.string(
'p')
303 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]]]
305 standardDrawingStuff = cms.PSet(
306 canvasSizeX = cms.int32(640),
307 canvasSizeY = cms.int32(640),
308 indOutputFileName = cms.string(
'#PLOT#.png'),
309 xAxes = Utils.SpawnPSet(xModifiers,xAxisStuff),
310 yAxes = Utils.SpawnPSet(yModifiers,yAxisStuff),
311 legends = Utils.SpawnPSet(legModifiers,legStuff),
314 posX = cms.double(0.19),
315 posY = cms.double(0.77),
316 sizeX = cms.double(0.12),
317 sizeY = cms.double(0.04),
318 option = cms.string(
'brNDC'),
319 borderSize = cms.int32(0),
320 fillColor = cms.int32(0),
321 textColor = cms.int32(1),
322 textSize = cms.double(0.04),
323 textAlign = cms.int32(22),
324 text = cms.vstring(
'P_{T} > 5 GeV')
327 posX = cms.double(0.19),
328 posY = cms.double(0.83),
329 sizeX = cms.double(0.12),
330 sizeY = cms.double(0.04),
331 option = cms.string(
'brNDC'),
332 borderSize = cms.int32(0),
333 fillColor = cms.int32(0),
334 textColor = cms.int32(1),
335 textSize = cms.double(0.04),
336 textAlign = cms.int32(22),
337 text = cms.vstring(
'-2.5 < #eta < +2.5')
340 drawOptionSets = cms.PSet(
341 efficiency = cms.PSet(
343 markerColor = cms.int32(4),
344 markerSize = cms.double(1.),
345 markerStyle = cms.int32(20),
346 lineColor = cms.int32(1),
347 lineStyle = cms.int32(1),
348 lineWidth = cms.int32(1),
349 drawOption = cms.string(
'ep'),
350 drawOptionLegend = cms.string(
'p')
352 reference = cms.PSet(
353 lineColor = cms.int32(1),
354 lineStyle = cms.int32(1),
355 lineWidth = cms.int32(1),
356 fillColor = cms.int32(41),
357 drawOption = cms.string(
'eBand'),
358 drawOptionLegend = cms.string(
'l')
362 drawOptionEntries = Utils.SpawnPSet(drawOptModifiers,drawOptStuff)
365 standardCompareTestAndReference = cms.PSet(
366 processes = cms.PSet(
368 dqmDirectory = cms.string(
'test'),
369 legendEntry = cms.string(
'no test label'),
370 type = cms.string(
'smMC')
372 reference = cms.PSet(
373 dqmDirectory = cms.string(
'reference'),
374 legendEntry = cms.string(
'no ref label'),
375 type = cms.string(
'smMC')
436 """ Helper class that applies a given function to all modules
446 input = re.sub(
'fixedConePFTauProducer',
'pfRecoTauProducer', input)
448 fixedDiscriminationRegex = re.compile(
'fixedConePFTauDiscrimination(\w*)')
449 input = fixedDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1', input)
450 input = re.sub(
'shrinkingConePFTauProducer',
'pfRecoTauProducerHighEfficiency', input)
451 shrinkingDiscriminationRegex = re.compile(
'shrinkingConePFTauDiscrimination(\w*)')
452 input = shrinkingDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1HighEfficiency', input)
457 """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies
458 to comapre a 31X to a 22X named validation """
460 if not hasattr(input,
"drawJobs"):
462 myDrawJobs = input.drawJobs.parameters_()
463 for drawJobName, drawJobData
in myDrawJobs.iteritems():
465 if not drawJobData.plots.pythonTypeName() ==
"cms.PSet":
467 pSetToInsert = cms.PSet(
468 standardEfficiencyParameters,
472 dqmMonitorElements = drawJobData.plots.dqmMonitorElements,
473 process = cms.string(
'test'),
474 drawOptionEntry = cms.string(
'eff_overlay01'),
475 legendEntry = cms.string(input.processes.test.legendEntry.value())
481 process = cms.string(
'reference'),
482 drawOptionEntry = cms.string(
'eff_overlay02'),
483 legendEntry = cms.string(input.processes.reference.legendEntry.value())
487 input.drawJobs.__setattr__(drawJobName, pSetToInsert)
491 if hasattr(module,
'processes'):
492 if module.processes.hasParameter([
'test',
'legendEntry'])
and module.processes.hasParameter([
'reference',
'legendEntry']):
493 module.processes.test.legendEntry = TestLabel
494 module.processes.reference.legendEntry = ReferenceLabel
495 print "Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label())
497 print "ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label()
501 ''' set all modules whose name contains one of the matching names to log y scale'''
503 ''' set a module to use log scaling in the yAxis'''
504 if hasattr(module,
'drawJobs'):
506 drawJobParamGetter =
lambda subName : getattr(module.drawJobs, subName)
508 attrNames =
dir(module.drawJobs)
509 for subModuleName, subModule
in zip(attrNames, map(drawJobParamGetter, attrNames)):
510 matchedNames = [name
for name
in matchingNames
if subModuleName.find( name) > -1]
511 if len(matchingNames) == 0:
512 matchedNames = [
'take',
'everything',
'and',
'dont',
'bother']
513 if hasattr(subModule,
"yAxis")
and len(matchedNames):
514 print "Setting drawJob: ", subModuleName,
" to log scale."
515 subModule.yAxis = cms.string(
'fakeRate')
516 if len(matchingNames) == 0:
517 module.yAxes.efficiency.maxY_log = 40
518 module.yAxes.fakeRate.maxY_log = 40
523 def BaseDirectorizer(module):
526 if hasattr(module,
"outputFilePath"):
527 oldPath = module.outputFilePath.value()
528 newPath = os.path.join(newPath, oldPath)
529 if not os.path.exists(newPath):
532 module.outputFilePath = cms.string(
"%s" % newPath)
533 return BaseDirectorizer
536 if hasattr(module,
'drawJobs'):
538 drawJobs = module.drawJobs.parameterNames_()
539 for drawJob
in drawJobs:
540 if drawJob !=
"TauIdEffStepByStep":
541 module.drawJobs.__delattr__(drawJob)
542 print "Removing comparison plot", drawJob
546 myPlottingSequence.visit(myFunctor)
550 myPlottingSequence.visit(myFunctor)
554 myPlottingSequence.visit(myFunctor)
557 myProcess.loadTau.test.inputFileNames = cms.vstring(FileLoc)
561 del myProcess.loadTau.reference
563 myProcess.loadTau.reference.inputFileNames = cms.vstring(FileLoc)
567 myPlottingSequence.visit(myFunctor)
571 myPlottingSequence.visit(myFunctor)
575 myPlottingSequence.visit(myFunctor)
578 module.ExtensionName = module.ExtensionName.value()+extension
581 if module._TypedParameterizable__type ==
'TauTagValidation':
582 module.histoSettings = pset
585 if hasattr(module,
'_TypedParameterizable__type')
and module._TypedParameterizable__type ==
'TauTagValidation':
586 setattr(module,
'turnOnTrigger',cms.bool(
True))
587 for item
in pset.parameters_().
items():
588 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