1 import FWCore.ParameterSet.Config
as cms
2 import Validation.RecoTau.ValidationUtils
as Utils
13 RecoTauValidation_cfi.py 15 Contains the standard tau validation parameters. It is organized into 16 the following sections. 20 Set common kinematic cuts (pt > 5 and eta < 2.5) on the denominator source. 21 Note that the denominator depends on the type of test (signal/background/e etc) 23 The denominator kinematic cutter requires that 27 Produce numerator and denominator histgorams used to produce 31 TauValNumeratorAndDenominator 33 tauValSelectedDenominator (filtered GenJet collection) 37 Using numerator and denominators, calculate and store 43 TauValNumeratorAndDenominator 47 Plot curves calculated in efficiency, in both an overlay mode 48 showing overall performance for a release, and the indvidual 49 discriminator efficiency compared to a given release 54 loadAndPlotTauValidation 57 TauEfficiencies, external root file to compare to 59 Plotting must be executed in a separate cmsRun job! 63 Various scripts to automate things... 74 kinematicSelectedTauValDenominatorCut = cms.string(
'pt > 5. && abs(eta) < 2.5')
75 denominator = cms.InputTag(
"kinematicSelectedTauValDenominator")
81 Plot the pt/eta/energy/phi spectrum of PFTaus that pass 82 a series of PFTauDiscriminator cuts. 84 These will be used as the numerator/denominators of the 85 efficiency calculations 89 proc = cms.Process(
'helper')
91 StandardMatchingParameters = cms.PSet(
92 DataType = cms.string(
'Leptons'),
93 MatchDeltaR_Leptons = cms.double(0.15),
94 MatchDeltaR_Jets = cms.double(0.3),
95 SaveOutputHistograms = cms.bool(
False),
97 RefCollection = denominator,
98 TauPtCut = cms.double(0.),
99 recoCuts = cms.string(
''),
100 genCuts = cms.string(
''),
101 chainCuts = cms.bool(
False)
104 GenericTriggerSelectionParameters = cms.PSet(
105 andOr = cms.bool(
False ),
106 dbLabel = cms.string(
"PFTauDQMTrigger"),
107 andOrHlt = cms.bool(
True),
108 hltInputTag = cms.InputTag(
"TriggerResults::HLT"),
110 hltPaths = cms.vstring(
'HLT_IsoMu*_eta*_LooseIsoPFTau*_v*',
'HLT_DoubleIsoPFTau*_Trk*_eta*_v*'),
111 errorReplyHlt = cms.bool(
False),
112 verbosityLevel = cms.uint32(0)
115 from DQMServices.Core.DQMEDAnalyzer
import DQMEDAnalyzer
118 StandardMatchingParameters,
119 GenericTriggerSelection = GenericTriggerSelectionParameters,
120 ExtensionName = cms.string(
""),
121 TauProducer = cms.InputTag(
''),
122 discriminators = cms.VPSet(
127 proc.RunHPSValidation = proc.templateAnalyzer.clone()
130 from Configuration.Eras.Modifier_fastSim_cff
import fastSim
132 proc.RunHPSValidation,
133 hltInputTag = cms.InputTag(
""),
134 GenericTriggerSelection=
dict(hltInputTag = cms.InputTag(
""))
137 proc.RunHPSValidation.ExtensionName =
"" 139 proc.RunHPSValidation.TauProducer = cms.InputTag(
'hpsPFTauProducer')
140 proc.RunHPSValidation.discriminators = cms.VPSet(
141 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFinding"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
142 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingNewDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
143 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingOldDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
147 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
148 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
149 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
158 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
159 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
163 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
164 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
165 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
166 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
167 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
168 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
169 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
170 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
171 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
172 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
173 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
174 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
175 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
176 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
177 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
178 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
179 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
180 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
181 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
182 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
183 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
184 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
185 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
186 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
187 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
188 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
189 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
190 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
191 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
192 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
193 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
194 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
195 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
196 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
197 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
198 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
199 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
200 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
201 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
202 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
203 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
204 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
205 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
206 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False))
209 proc.TauValNumeratorAndDenominator = cms.Sequence(
210 proc.RunHPSValidation
217 Tau efficiency calculations 219 Define the Efficiency curves to produce. Each 220 efficiency producer takes the numberator and denominator 221 histograms and the dependent variables. 224 plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator)
225 from DQMServices.Core.DQMEDHarvester
import DQMEDHarvester
227 "TauDQMHistEffProducer",
238 proc.normalizePlots = cms.EDAnalyzer(
240 plotNamesToNormalize = cms.vstring(
'*_pTRatio_*',
'*_Size_*',
'*_SumPt_*',
'*_dRTauRefJet*'),
241 reference = cms.string(
'*_pTRatio_allHadronic')
244 proc.TauEfficiencies = cms.Sequence(
253 loadTau: load two separate TauVal root files into the DQM 254 so the plotter can access them 261 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
262 scaleFactor = cms.double(1.),
263 dqmDirectory_store = cms.string(
'test')
265 reference = cms.PSet(
266 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
267 scaleFactor = cms.double(1.),
268 dqmDirectory_store = cms.string(
'reference')
275 xAxisStuff = cms.PSet(
276 xAxisTitle = cms.string(
'P_{T} / GeV'),
277 xAxisTitleOffset = cms.double(0.9),
278 xAxisTitleSize = cms.double(0.05)
280 xModifiers = [[
'pt',[
'xAxisTitle'],[
'P_{T} / GeV']],[
'eta',[
'xAxisTitle'],[
'#eta']],[
'phi',[
'xAxisTitle'],[
'#phi']],[
'pileup',[
'xAxisTitle'],[
'# of Reco Vertices']]]
282 yAxisStuff =cms.PSet(
283 yScale = cms.string(
'linear'),
284 minY_linear = cms.double(0.),
285 maxY_linear = cms.double(1.6),
286 minY_log = cms.double(0.001),
287 maxY_log = cms.double(1.8),
288 yAxisTitle = cms.string(
'#varepsilon'),
289 yAxisTitleOffset = cms.double(1.1),
290 yAxisTitleSize = cms.double(0.05)
292 yModifiers = [[
'efficiency',[
'yScale',
'yAxisTitle'],[
'linear',
'#varepsilon']],[
'fakeRate',[
'yScale',
'yAxisTitle'],[
'log',
'Fake rate']]]
295 posX = cms.double(0.50),
296 posY = cms.double(0.72),
297 sizeX = cms.double(0.39),
298 sizeY = cms.double(0.17),
299 header = cms.string(
''),
300 option = cms.string(
'brNDC'),
301 borderSize = cms.int32(0),
302 fillColor = cms.int32(0)
304 legModifiers = [[
'efficiency',[
'posY',
'sizeY'],[0.72,0.17]],[
'efficiency_overlay',[
'posY',
'sizeY'],[0.66,0.23]]]
306 drawOptStuff = cms.PSet(
307 markerColor = cms.int32(1),
308 markerSize = cms.double(1.),
309 markerStyle = cms.int32(20),
310 lineColor = cms.int32(1),
311 lineStyle = cms.int32(1),
312 lineWidth = cms.int32(2),
313 drawOption = cms.string(
'ex0'),
314 drawOptionLegend = cms.string(
'p')
316 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]]]
318 standardDrawingStuff = cms.PSet(
319 canvasSizeX = cms.int32(640),
320 canvasSizeY = cms.int32(640),
321 indOutputFileName = cms.string(
'#PLOT#.png'),
322 xAxes = Utils.SpawnPSet(xModifiers,xAxisStuff),
323 yAxes = Utils.SpawnPSet(yModifiers,yAxisStuff),
324 legends = Utils.SpawnPSet(legModifiers,legStuff),
327 posX = cms.double(0.19),
328 posY = cms.double(0.77),
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(
'P_{T} > 5 GeV')
340 posX = cms.double(0.19),
341 posY = cms.double(0.83),
342 sizeX = cms.double(0.12),
343 sizeY = cms.double(0.04),
344 option = cms.string(
'brNDC'),
345 borderSize = cms.int32(0),
346 fillColor = cms.int32(0),
347 textColor = cms.int32(1),
348 textSize = cms.double(0.04),
349 textAlign = cms.int32(22),
350 text = cms.vstring(
'-2.5 < #eta < +2.5')
353 drawOptionSets = cms.PSet(
354 efficiency = cms.PSet(
356 markerColor = cms.int32(4),
357 markerSize = cms.double(1.),
358 markerStyle = cms.int32(20),
359 lineColor = cms.int32(1),
360 lineStyle = cms.int32(1),
361 lineWidth = cms.int32(1),
362 drawOption = cms.string(
'ep'),
363 drawOptionLegend = cms.string(
'p')
365 reference = cms.PSet(
366 lineColor = cms.int32(1),
367 lineStyle = cms.int32(1),
368 lineWidth = cms.int32(1),
369 fillColor = cms.int32(41),
370 drawOption = cms.string(
'eBand'),
371 drawOptionLegend = cms.string(
'l')
375 drawOptionEntries = Utils.SpawnPSet(drawOptModifiers,drawOptStuff)
378 standardCompareTestAndReference = cms.PSet(
379 processes = cms.PSet(
381 dqmDirectory = cms.string(
'test'),
382 legendEntry = cms.string(
'no test label'),
383 type = cms.string(
'smMC')
385 reference = cms.PSet(
386 dqmDirectory = cms.string(
'reference'),
387 legendEntry = cms.string(
'no ref label'),
388 type = cms.string(
'smMC')
449 """ Helper class that applies a given function to all modules 459 input = re.sub(
'fixedConePFTauProducer',
'pfRecoTauProducer', input)
461 fixedDiscriminationRegex = re.compile(
'fixedConePFTauDiscrimination(\w*)')
462 input = fixedDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1', input)
463 input = re.sub(
'shrinkingConePFTauProducer',
'pfRecoTauProducerHighEfficiency', input)
464 shrinkingDiscriminationRegex = re.compile(
'shrinkingConePFTauDiscrimination(\w*)')
465 input = shrinkingDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1HighEfficiency', input)
470 """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies 471 to comapre a 31X to a 22X named validation """ 473 if not hasattr(input,
"drawJobs"):
475 myDrawJobs = input.drawJobs.parameters_()
476 for drawJobName, drawJobData
in six.iteritems(myDrawJobs):
478 if not drawJobData.plots.pythonTypeName() ==
"cms.PSet":
480 pSetToInsert = cms.PSet(
481 standardEfficiencyParameters,
485 dqmMonitorElements = drawJobData.plots.dqmMonitorElements,
486 process = cms.string(
'test'),
487 drawOptionEntry = cms.string(
'eff_overlay01'),
488 legendEntry = cms.string(input.processes.test.legendEntry.value())
494 process = cms.string(
'reference'),
495 drawOptionEntry = cms.string(
'eff_overlay02'),
496 legendEntry = cms.string(input.processes.reference.legendEntry.value())
500 input.drawJobs.__setattr__(drawJobName, pSetToInsert)
504 if hasattr(module,
'processes'):
505 if module.processes.hasParameter([
'test',
'legendEntry'])
and module.processes.hasParameter([
'reference',
'legendEntry']):
506 module.processes.test.legendEntry = TestLabel
507 module.processes.reference.legendEntry = ReferenceLabel
508 print "Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label())
510 print "ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label()
514 ''' set all modules whose name contains one of the matching names to log y scale''' 516 ''' set a module to use log scaling in the yAxis''' 517 if hasattr(module,
'drawJobs'):
519 drawJobParamGetter =
lambda subName : getattr(module.drawJobs, subName)
521 attrNames =
dir(module.drawJobs)
522 for subModuleName, subModule
in zip(attrNames,
map(drawJobParamGetter, attrNames)):
523 matchedNames = [name
for name
in matchingNames
if subModuleName.find( name) > -1]
524 if len(matchingNames) == 0:
525 matchedNames = [
'take',
'everything',
'and',
'dont',
'bother']
526 if hasattr(subModule,
"yAxis")
and len(matchedNames):
527 print "Setting drawJob: ", subModuleName,
" to log scale." 528 subModule.yAxis = cms.string(
'fakeRate')
529 if len(matchingNames) == 0:
530 module.yAxes.efficiency.maxY_log = 40
531 module.yAxes.fakeRate.maxY_log = 40
536 def BaseDirectorizer(module):
539 if hasattr(module,
"outputFilePath"):
540 oldPath = module.outputFilePath.value()
541 newPath = os.path.join(newPath, oldPath)
542 if not os.path.exists(newPath):
545 module.outputFilePath = cms.string(
"%s" % newPath)
546 return BaseDirectorizer
549 if hasattr(module,
'drawJobs'):
551 drawJobs = module.drawJobs.parameterNames_()
552 for drawJob
in drawJobs:
553 if drawJob !=
"TauIdEffStepByStep":
554 module.drawJobs.__delattr__(drawJob)
555 print "Removing comparison plot", drawJob
559 myPlottingSequence.visit(myFunctor)
563 myPlottingSequence.visit(myFunctor)
567 myPlottingSequence.visit(myFunctor)
570 myProcess.loadTau.test.inputFileNames = cms.vstring(FileLoc)
574 del myProcess.loadTau.reference
576 myProcess.loadTau.reference.inputFileNames = cms.vstring(FileLoc)
580 myPlottingSequence.visit(myFunctor)
584 myPlottingSequence.visit(myFunctor)
588 myPlottingSequence.visit(myFunctor)
591 module.ExtensionName = module.ExtensionName.value()+extension
594 if module._TypedParameterizable__type ==
'TauTagValidation':
595 module.histoSettings = pset
598 if hasattr(module,
'_TypedParameterizable__type')
and module._TypedParameterizable__type ==
'TauTagValidation':
599 setattr(module,
'turnOnTrigger',cms.bool(
True))
600 for item
in pset.parameters_().
items():
601 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)