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(
125 proc.RunHPSValidation = proc.templateAnalyzer.clone()
128 from Configuration.Eras.Modifier_fastSim_cff
import fastSim
130 proc.RunHPSValidation,
131 hltInputTag = cms.InputTag(
""),
132 GenericTriggerSelection=
dict(hltInputTag = cms.InputTag(
""))
135 proc.RunHPSValidation.ExtensionName =
"" 137 proc.RunHPSValidation.TauProducer = cms.InputTag(
'hpsPFTauProducer')
138 proc.RunHPSValidation.discriminators = cms.VPSet(
139 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFinding"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
140 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingNewDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
141 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByDecayModeFindingOldDMs"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
145 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
146 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
147 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(
True)),
156 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
157 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightMuonRejection3"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
161 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
162 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
163 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
164 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
165 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMVA6VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
166 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
167 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
168 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
169 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
170 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
171 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
172 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
173 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
174 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
175 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
176 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
177 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
178 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
179 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
180 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
181 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
182 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
183 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
184 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
185 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
186 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
187 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
188 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
189 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
190 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
191 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
192 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
193 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
194 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
195 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
196 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
197 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
198 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
199 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
200 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
201 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
202 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
203 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False)),
204 cms.PSet( discriminator = cms.string(
"hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(
False))
207 proc.TauValNumeratorAndDenominator = cms.Sequence(
208 proc.RunHPSValidation
215 Tau efficiency calculations 217 Define the Efficiency curves to produce. Each 218 efficiency producer takes the numberator and denominator 219 histograms and the dependent variables. 222 plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator)
223 proc.efficiencies = cms.EDAnalyzer(
224 "TauDQMHistEffProducer",
235 proc.normalizePlots = cms.EDAnalyzer(
237 plotNamesToNormalize = cms.vstring(
'*_pTRatio_*',
'*_Size_*',
'*_SumPt_*',
'*_dRTauRefJet*'),
238 reference = cms.string(
'*_pTRatio_allHadronic')
241 proc.TauEfficiencies = cms.Sequence(
250 loadTau: load two separate TauVal root files into the DQM 251 so the plotter can access them 255 loadTau = cms.EDAnalyzer(
"TauDQMFileLoader",
258 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
259 scaleFactor = cms.double(1.),
260 dqmDirectory_store = cms.string(
'test')
262 reference = cms.PSet(
263 inputFileNames = cms.vstring(
'/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
264 scaleFactor = cms.double(1.),
265 dqmDirectory_store = cms.string(
'reference')
272 xAxisStuff = cms.PSet(
273 xAxisTitle = cms.string(
'P_{T} / GeV'),
274 xAxisTitleOffset = cms.double(0.9),
275 xAxisTitleSize = cms.double(0.05)
277 xModifiers = [[
'pt',[
'xAxisTitle'],[
'P_{T} / GeV']],[
'eta',[
'xAxisTitle'],[
'#eta']],[
'phi',[
'xAxisTitle'],[
'#phi']],[
'pileup',[
'xAxisTitle'],[
'# of Reco Vertices']]]
279 yAxisStuff =cms.PSet(
280 yScale = cms.string(
'linear'),
281 minY_linear = cms.double(0.),
282 maxY_linear = cms.double(1.6),
283 minY_log = cms.double(0.001),
284 maxY_log = cms.double(1.8),
285 yAxisTitle = cms.string(
'#varepsilon'),
286 yAxisTitleOffset = cms.double(1.1),
287 yAxisTitleSize = cms.double(0.05)
289 yModifiers = [[
'efficiency',[
'yScale',
'yAxisTitle'],[
'linear',
'#varepsilon']],[
'fakeRate',[
'yScale',
'yAxisTitle'],[
'log',
'Fake rate']]]
292 posX = cms.double(0.50),
293 posY = cms.double(0.72),
294 sizeX = cms.double(0.39),
295 sizeY = cms.double(0.17),
296 header = cms.string(
''),
297 option = cms.string(
'brNDC'),
298 borderSize = cms.int32(0),
299 fillColor = cms.int32(0)
301 legModifiers = [[
'efficiency',[
'posY',
'sizeY'],[0.72,0.17]],[
'efficiency_overlay',[
'posY',
'sizeY'],[0.66,0.23]]]
303 drawOptStuff = cms.PSet(
304 markerColor = cms.int32(1),
305 markerSize = cms.double(1.),
306 markerStyle = cms.int32(20),
307 lineColor = cms.int32(1),
308 lineStyle = cms.int32(1),
309 lineWidth = cms.int32(2),
310 drawOption = cms.string(
'ex0'),
311 drawOptionLegend = cms.string(
'p')
313 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]]]
315 standardDrawingStuff = cms.PSet(
316 canvasSizeX = cms.int32(640),
317 canvasSizeY = cms.int32(640),
318 indOutputFileName = cms.string(
'#PLOT#.png'),
319 xAxes = Utils.SpawnPSet(xModifiers,xAxisStuff),
320 yAxes = Utils.SpawnPSet(yModifiers,yAxisStuff),
321 legends = Utils.SpawnPSet(legModifiers,legStuff),
324 posX = cms.double(0.19),
325 posY = cms.double(0.77),
326 sizeX = cms.double(0.12),
327 sizeY = cms.double(0.04),
328 option = cms.string(
'brNDC'),
329 borderSize = cms.int32(0),
330 fillColor = cms.int32(0),
331 textColor = cms.int32(1),
332 textSize = cms.double(0.04),
333 textAlign = cms.int32(22),
334 text = cms.vstring(
'P_{T} > 5 GeV')
337 posX = cms.double(0.19),
338 posY = cms.double(0.83),
339 sizeX = cms.double(0.12),
340 sizeY = cms.double(0.04),
341 option = cms.string(
'brNDC'),
342 borderSize = cms.int32(0),
343 fillColor = cms.int32(0),
344 textColor = cms.int32(1),
345 textSize = cms.double(0.04),
346 textAlign = cms.int32(22),
347 text = cms.vstring(
'-2.5 < #eta < +2.5')
350 drawOptionSets = cms.PSet(
351 efficiency = cms.PSet(
353 markerColor = cms.int32(4),
354 markerSize = cms.double(1.),
355 markerStyle = cms.int32(20),
356 lineColor = cms.int32(1),
357 lineStyle = cms.int32(1),
358 lineWidth = cms.int32(1),
359 drawOption = cms.string(
'ep'),
360 drawOptionLegend = cms.string(
'p')
362 reference = cms.PSet(
363 lineColor = cms.int32(1),
364 lineStyle = cms.int32(1),
365 lineWidth = cms.int32(1),
366 fillColor = cms.int32(41),
367 drawOption = cms.string(
'eBand'),
368 drawOptionLegend = cms.string(
'l')
372 drawOptionEntries = Utils.SpawnPSet(drawOptModifiers,drawOptStuff)
375 standardCompareTestAndReference = cms.PSet(
376 processes = cms.PSet(
378 dqmDirectory = cms.string(
'test'),
379 legendEntry = cms.string(
'no test label'),
380 type = cms.string(
'smMC')
382 reference = cms.PSet(
383 dqmDirectory = cms.string(
'reference'),
384 legendEntry = cms.string(
'no ref label'),
385 type = cms.string(
'smMC')
446 """ Helper class that applies a given function to all modules 456 input = re.sub(
'fixedConePFTauProducer',
'pfRecoTauProducer', input)
458 fixedDiscriminationRegex = re.compile(
'fixedConePFTauDiscrimination(\w*)')
459 input = fixedDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1', input)
460 input = re.sub(
'shrinkingConePFTauProducer',
'pfRecoTauProducerHighEfficiency', input)
461 shrinkingDiscriminationRegex = re.compile(
'shrinkingConePFTauDiscrimination(\w*)')
462 input = shrinkingDiscriminationRegex.sub(
r'pfRecoTauDiscrimination\1HighEfficiency', input)
467 """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies 468 to comapre a 31X to a 22X named validation """ 470 if not hasattr(input,
"drawJobs"):
472 myDrawJobs = input.drawJobs.parameters_()
473 for drawJobName, drawJobData
in myDrawJobs.iteritems():
475 if not drawJobData.plots.pythonTypeName() ==
"cms.PSet":
477 pSetToInsert = cms.PSet(
478 standardEfficiencyParameters,
482 dqmMonitorElements = drawJobData.plots.dqmMonitorElements,
483 process = cms.string(
'test'),
484 drawOptionEntry = cms.string(
'eff_overlay01'),
485 legendEntry = cms.string(input.processes.test.legendEntry.value())
491 process = cms.string(
'reference'),
492 drawOptionEntry = cms.string(
'eff_overlay02'),
493 legendEntry = cms.string(input.processes.reference.legendEntry.value())
497 input.drawJobs.__setattr__(drawJobName, pSetToInsert)
501 if hasattr(module,
'processes'):
502 if module.processes.hasParameter([
'test',
'legendEntry'])
and module.processes.hasParameter([
'reference',
'legendEntry']):
503 module.processes.test.legendEntry = TestLabel
504 module.processes.reference.legendEntry = ReferenceLabel
505 print "Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label())
507 print "ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label()
511 ''' set all modules whose name contains one of the matching names to log y scale''' 513 ''' set a module to use log scaling in the yAxis''' 514 if hasattr(module,
'drawJobs'):
516 drawJobParamGetter =
lambda subName : getattr(module.drawJobs, subName)
518 attrNames =
dir(module.drawJobs)
519 for subModuleName, subModule
in zip(attrNames,
map(drawJobParamGetter, attrNames)):
520 matchedNames = [name
for name
in matchingNames
if subModuleName.find( name) > -1]
521 if len(matchingNames) == 0:
522 matchedNames = [
'take',
'everything',
'and',
'dont',
'bother']
523 if hasattr(subModule,
"yAxis")
and len(matchedNames):
524 print "Setting drawJob: ", subModuleName,
" to log scale." 525 subModule.yAxis = cms.string(
'fakeRate')
526 if len(matchingNames) == 0:
527 module.yAxes.efficiency.maxY_log = 40
528 module.yAxes.fakeRate.maxY_log = 40
533 def BaseDirectorizer(module):
536 if hasattr(module,
"outputFilePath"):
537 oldPath = module.outputFilePath.value()
538 newPath = os.path.join(newPath, oldPath)
539 if not os.path.exists(newPath):
542 module.outputFilePath = cms.string(
"%s" % newPath)
543 return BaseDirectorizer
546 if hasattr(module,
'drawJobs'):
548 drawJobs = module.drawJobs.parameterNames_()
549 for drawJob
in drawJobs:
550 if drawJob !=
"TauIdEffStepByStep":
551 module.drawJobs.__delattr__(drawJob)
552 print "Removing comparison plot", drawJob
556 myPlottingSequence.visit(myFunctor)
560 myPlottingSequence.visit(myFunctor)
564 myPlottingSequence.visit(myFunctor)
567 myProcess.loadTau.test.inputFileNames = cms.vstring(FileLoc)
571 del myProcess.loadTau.reference
573 myProcess.loadTau.reference.inputFileNames = cms.vstring(FileLoc)
577 myPlottingSequence.visit(myFunctor)
581 myPlottingSequence.visit(myFunctor)
585 myPlottingSequence.visit(myFunctor)
588 module.ExtensionName = module.ExtensionName.value()+extension
591 if module._TypedParameterizable__type ==
'TauTagValidation':
592 module.histoSettings = pset
595 if hasattr(module,
'_TypedParameterizable__type')
and module._TypedParameterizable__type ==
'TauTagValidation':
596 setattr(module,
'turnOnTrigger',cms.bool(
True))
597 for item
in pset.parameters_().
items():
598 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)