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 from DQMServices.Core.DQMEDAnalyzer
import DQMEDAnalyzer
117 StandardMatchingParameters,
118 GenericTriggerSelection = GenericTriggerSelectionParameters,
119 ExtensionName = cms.string(
""),
120 TauProducer = cms.InputTag(
''),
121 discriminators = cms.VPSet(
126 proc.RunHPSValidation = proc.templateAnalyzer.clone()
129 from Configuration.Eras.Modifier_fastSim_cff
import fastSim
131 proc.RunHPSValidation,
132 hltInputTag = cms.InputTag(
""),
133 GenericTriggerSelection=
dict(hltInputTag = cms.InputTag(
""))
136 proc.RunHPSValidation.ExtensionName =
"" 138 proc.RunHPSValidation.TauProducer = cms.InputTag(
'hpsPFTauProducer')
139 proc.RunHPSValidation.discriminators = cms.VPSet(
140 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFinding"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
141 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingNewDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
142 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingOldDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
146 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
147 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
148 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
157 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
158 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
162 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
163 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
164 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
165 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
166 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
167 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
168 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
169 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
170 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
171 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
172 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
173 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
174 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
175 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
176 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
177 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
178 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
179 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
180 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
181 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
182 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
183 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
184 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
185 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
186 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
187 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
188 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
189 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
190 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
191 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
192 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
193 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
194 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
195 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
196 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
197 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
198 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
199 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
200 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
201 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
202 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
203 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
204 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
205 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False))
208 proc.TauValNumeratorAndDenominator = cms.Sequence(
209 proc.RunHPSValidation
216 Tau efficiency calculations 218 Define the Efficiency curves to produce. Each 219 efficiency producer takes the numberator and denominator 220 histograms and the dependent variables. 223 plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator)
224 from DQMServices.Core.DQMEDHarvester
import DQMEDHarvester
226 "TauDQMHistEffProducer",
237 proc.normalizePlots = cms.EDAnalyzer(
239 plotNamesToNormalize = cms.vstring(
'*_pTRatio_*',
'*_Size_*',
'*_SumPt_*',
'*_dRTauRefJet*'),
240 reference = cms.string(
'*_pTRatio_allHadronic')
243 proc.TauEfficiencies = cms.Sequence(
252 loadTau: load two separate TauVal root files into the DQM 253 so the plotter can access them 260 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
261 scaleFactor = cms.double(1.),
262 dqmDirectory_store = cms.string(
'test')
264 reference = cms.PSet(
265 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
266 scaleFactor = cms.double(1.),
267 dqmDirectory_store = cms.string(
'reference')
274 xAxisStuff = cms.PSet(
275 xAxisTitle = cms.string(
'P_{T} / GeV'),
276 xAxisTitleOffset = cms.double(0.9),
277 xAxisTitleSize = cms.double(0.05)
279 xModifiers = [[
'pt',[
'xAxisTitle'],[
'P_{T} / GeV']],[
'eta',[
'xAxisTitle'],[
'#eta']],[
'phi',[
'xAxisTitle'],[
'#phi']],[
'pileup',[
'xAxisTitle'],[
'# of Reco Vertices']]]
281 yAxisStuff =cms.PSet(
282 yScale = cms.string(
'linear'),
283 minY_linear = cms.double(0.),
284 maxY_linear = cms.double(1.6),
285 minY_log = cms.double(0.001),
286 maxY_log = cms.double(1.8),
287 yAxisTitle = cms.string(
'#varepsilon'),
288 yAxisTitleOffset = cms.double(1.1),
289 yAxisTitleSize = cms.double(0.05)
291 yModifiers = [[
'efficiency',[
'yScale',
'yAxisTitle'],[
'linear',
'#varepsilon']],[
'fakeRate',[
'yScale',
'yAxisTitle'],[
'log',
'Fake rate']]]
294 posX = cms.double(0.50),
295 posY = cms.double(0.72),
296 sizeX = cms.double(0.39),
297 sizeY = cms.double(0.17),
298 header = cms.string(
''),
299 option = cms.string(
'brNDC'),
300 borderSize = cms.int32(0),
301 fillColor = cms.int32(0)
303 legModifiers = [[
'efficiency',[
'posY',
'sizeY'],[0.72,0.17]],[
'efficiency_overlay',[
'posY',
'sizeY'],[0.66,0.23]]]
305 drawOptStuff = cms.PSet(
306 markerColor = cms.int32(1),
307 markerSize = cms.double(1.),
308 markerStyle = cms.int32(20),
309 lineColor = cms.int32(1),
310 lineStyle = cms.int32(1),
311 lineWidth = cms.int32(2),
312 drawOption = cms.string(
'ex0'),
313 drawOptionLegend = cms.string(
'p')
315 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]]]
317 standardDrawingStuff = cms.PSet(
318 canvasSizeX = cms.int32(640),
319 canvasSizeY = cms.int32(640),
320 indOutputFileName = cms.string(
'#PLOT#.png'),
321 xAxes = Utils.SpawnPSet(xModifiers,xAxisStuff),
322 yAxes = Utils.SpawnPSet(yModifiers,yAxisStuff),
323 legends = Utils.SpawnPSet(legModifiers,legStuff),
326 posX = cms.double(0.19),
327 posY = cms.double(0.77),
328 sizeX = cms.double(0.12),
329 sizeY = cms.double(0.04),
330 option = cms.string(
'brNDC'),
331 borderSize = cms.int32(0),
332 fillColor = cms.int32(0),
333 textColor = cms.int32(1),
334 textSize = cms.double(0.04),
335 textAlign = cms.int32(22),
336 text = cms.vstring(
'P_{T} > 5 GeV')
339 posX = cms.double(0.19),
340 posY = cms.double(0.83),
341 sizeX = cms.double(0.12),
342 sizeY = cms.double(0.04),
343 option = cms.string(
'brNDC'),
344 borderSize = cms.int32(0),
345 fillColor = cms.int32(0),
346 textColor = cms.int32(1),
347 textSize = cms.double(0.04),
348 textAlign = cms.int32(22),
349 text = cms.vstring(
'-2.5 < #eta < +2.5')
352 drawOptionSets = cms.PSet(
353 efficiency = cms.PSet(
355 markerColor = cms.int32(4),
356 markerSize = cms.double(1.),
357 markerStyle = cms.int32(20),
358 lineColor = cms.int32(1),
359 lineStyle = cms.int32(1),
360 lineWidth = cms.int32(1),
361 drawOption = cms.string(
'ep'),
362 drawOptionLegend = cms.string(
'p')
364 reference = cms.PSet(
365 lineColor = cms.int32(1),
366 lineStyle = cms.int32(1),
367 lineWidth = cms.int32(1),
368 fillColor = cms.int32(41),
369 drawOption = cms.string(
'eBand'),
370 drawOptionLegend = cms.string(
'l')
374 drawOptionEntries = Utils.SpawnPSet(drawOptModifiers,drawOptStuff)
377 standardCompareTestAndReference = cms.PSet(
378 processes = cms.PSet(
380 dqmDirectory = cms.string(
'test'),
381 legendEntry = cms.string(
'no test label'),
382 type = cms.string(
'smMC')
384 reference = cms.PSet(
385 dqmDirectory = cms.string(
'reference'),
386 legendEntry = cms.string(
'no ref label'),
387 type = cms.string(
'smMC')
448 """ Helper class that applies a given function to all modules 458 input = re.sub(
'fixedConePFTauProducer',
'pfRecoTauProducer', input)
460 fixedDiscriminationRegex = re.compile(
'fixedConePFTauDiscrimination(\w*)')
461 input = fixedDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1', input)
462 input = re.sub(
'shrinkingConePFTauProducer',
'pfRecoTauProducerHighEfficiency', input)
463 shrinkingDiscriminationRegex = re.compile(
'shrinkingConePFTauDiscrimination(\w*)')
464 input = shrinkingDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1HighEfficiency', input)
469 """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies 470 to comapre a 31X to a 22X named validation """ 472 if not hasattr(input,
"drawJobs"):
474 myDrawJobs = input.drawJobs.parameters_()
475 for drawJobName, drawJobData
in myDrawJobs.iteritems():
477 if not drawJobData.plots.pythonTypeName() ==
"cms.PSet":
479 pSetToInsert = cms.PSet(
480 standardEfficiencyParameters,
484 dqmMonitorElements = drawJobData.plots.dqmMonitorElements,
485 process = cms.string(
'test'),
486 drawOptionEntry = cms.string(
'eff_overlay01'),
487 legendEntry = cms.string(input.processes.test.legendEntry.value())
493 process = cms.string(
'reference'),
494 drawOptionEntry = cms.string(
'eff_overlay02'),
495 legendEntry = cms.string(input.processes.reference.legendEntry.value())
499 input.drawJobs.__setattr__(drawJobName, pSetToInsert)
503 if hasattr(module,
'processes'):
504 if module.processes.hasParameter([
'test',
'legendEntry'])
and module.processes.hasParameter([
'reference',
'legendEntry']):
505 module.processes.test.legendEntry = TestLabel
506 module.processes.reference.legendEntry = ReferenceLabel
507 print "Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label())
509 print "ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label()
513 ''' set all modules whose name contains one of the matching names to log y scale''' 515 ''' set a module to use log scaling in the yAxis''' 516 if hasattr(module,
'drawJobs'):
518 drawJobParamGetter =
lambda subName : getattr(module.drawJobs, subName)
520 attrNames =
dir(module.drawJobs)
521 for subModuleName, subModule
in zip(attrNames,
map(drawJobParamGetter, attrNames)):
522 matchedNames = [name
for name
in matchingNames
if subModuleName.find( name) > -1]
523 if len(matchingNames) == 0:
524 matchedNames = [
'take',
'everything',
'and',
'dont',
'bother']
525 if hasattr(subModule,
"yAxis")
and len(matchedNames):
526 print "Setting drawJob: ", subModuleName,
" to log scale." 527 subModule.yAxis = cms.string(
'fakeRate')
528 if len(matchingNames) == 0:
529 module.yAxes.efficiency.maxY_log = 40
530 module.yAxes.fakeRate.maxY_log = 40
535 def BaseDirectorizer(module):
538 if hasattr(module,
"outputFilePath"):
539 oldPath = module.outputFilePath.value()
540 newPath = os.path.join(newPath, oldPath)
541 if not os.path.exists(newPath):
544 module.outputFilePath = cms.string(
"%s" % newPath)
545 return BaseDirectorizer
548 if hasattr(module,
'drawJobs'):
550 drawJobs = module.drawJobs.parameterNames_()
551 for drawJob
in drawJobs:
552 if drawJob !=
"TauIdEffStepByStep":
553 module.drawJobs.__delattr__(drawJob)
554 print "Removing comparison plot", drawJob
558 myPlottingSequence.visit(myFunctor)
562 myPlottingSequence.visit(myFunctor)
566 myPlottingSequence.visit(myFunctor)
569 myProcess.loadTau.test.inputFileNames = cms.vstring(FileLoc)
573 del myProcess.loadTau.reference
575 myProcess.loadTau.reference.inputFileNames = cms.vstring(FileLoc)
579 myPlottingSequence.visit(myFunctor)
583 myPlottingSequence.visit(myFunctor)
587 myPlottingSequence.visit(myFunctor)
590 module.ExtensionName = module.ExtensionName.value()+extension
593 if module._TypedParameterizable__type ==
'TauTagValidation':
594 module.histoSettings = pset
597 if hasattr(module,
'_TypedParameterizable__type')
and module._TypedParameterizable__type ==
'TauTagValidation':
598 setattr(module,
'turnOnTrigger',cms.bool(
True))
599 for item
in pset.parameters_().
items():
600 setattr(module.GenericTriggerSelection,item[0],item[1])
def SetPlotOnlyStepByStep(myPlottingSequence)
def SetLogScale(myPlottingSequence)
def SetCompareToLegacyProductNames(myPlottingSequence)
def TranslateToLegacyProdNames(input)
def SetPlotDirectory(myPlottingSequence, directory)
def SetReferenceFileToPlot(myProcess, FileLoc)
def setTrigger(module, pset)
def SetTestFileToPlot(myProcess, FileLoc)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def ConvertDrawJobToLegacyCompare(input)
def SetValidationExtention(module, extension)
The plotting of HPS Efficiencies.
def setBinning(module, pset)
def SetSmartLogScale(myPlottingSequence)
def MakeLabeler(TestLabel, ReferenceLabel)
def SetBaseDirectory(Directory)
def RemoveComparisonPlotCommands(module)
def SetTestAndReferenceLabels(myPlottingSequence, TestLabel, ReferenceLabel)
def SetYmodulesToLog(matchingNames=[])
def __init__(self, function)