File indexing completed on 2023-03-17 11:28:45
0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 import Validation.RecoTau.ValidationUtils as Utils
0004 import copy
0005 import re
0006 import os
0007
0008 import RecoTauTag.Configuration.HPSPFTaus_cff as RecoModules
0009
0010
0011
0012
0013 """
0014
0015 RecoTauValidation_cfi.py
0016
0017 Contains the standard tau validation parameters. It is organized into
0018 the following sections.
0019
0020 DENOMINATOR
0021
0022 Set common kinematic cuts (pt > 5 and eta < 2.5) on the denominator source.
0023 Note that the denominator depends on the type of test (signal/background/e etc)
0024
0025 The denominator kinematic cutter requires that
0026
0027 HISTOGRAMS
0028
0029 Produce numerator and denominator histgorams used to produce
0030 tau efficiency plots
0031
0032 Provides sequence:
0033 TauValNumeratorAndDenominator
0034 Requires:
0035 tauValSelectedDenominator (filtered GenJet collection)
0036
0037 EFFICIENCY
0038
0039 Using numerator and denominators, calculate and store
0040 the efficiency curves
0041
0042 Provides sequence:
0043 TauEfficiencies
0044 Requires:
0045 TauValNumeratorAndDenominator
0046
0047 PLOTTING
0048
0049 Plot curves calculated in efficiency, in both an overlay mode
0050 showing overall performance for a release, and the indvidual
0051 discriminator efficiency compared to a given release
0052
0053 Provides sequence:
0054 loadTau
0055 plotTauValidation
0056 loadAndPlotTauValidation
0057
0058 Requires:
0059 TauEfficiencies, external root file to compare to
0060
0061 Plotting must be executed in a separate cmsRun job!
0062
0063 UTILITIES
0064
0065 Various scripts to automate things...
0066
0067
0068 """
0069
0070 """
0071
0072 DENOMINATOR
0073
0074 """
0075
0076 kinematicSelectedTauValDenominatorCut = cms.string('pt > 5. && abs(eta) < 2.5')
0077 denominator = cms.InputTag("kinematicSelectedTauValDenominator")
0078
0079 """
0080
0081 HISTOGRAMS
0082
0083 Plot the pt/eta/energy/phi spectrum of PFTaus that pass
0084 a series of PFTauDiscriminator cuts.
0085
0086 These will be used as the numerator/denominators of the
0087 efficiency calculations
0088 """
0089
0090
0091 proc = cms.Process('helper')
0092
0093 StandardMatchingParameters = cms.PSet(
0094 DataType = cms.string('Leptons'),
0095 MatchDeltaR_Leptons = cms.double(0.15),
0096 MatchDeltaR_Jets = cms.double(0.3),
0097 SaveOutputHistograms = cms.bool(False),
0098
0099 RefCollection = denominator,
0100 TauPtCut = cms.double(0.),
0101 recoCuts = cms.string(''),
0102 genCuts = cms.string(''),
0103 chainCuts = cms.bool(False)
0104 )
0105
0106 GenericTriggerSelectionParameters = cms.PSet(
0107 andOr = cms.bool( False ),
0108 dbLabel = cms.string("PFTauDQMTrigger"),
0109 andOrHlt = cms.bool(True),
0110 hltInputTag = cms.InputTag("TriggerResults::HLT"),
0111
0112 hltPaths = cms.vstring('HLT_IsoMu*_eta*_LooseIsoPFTau*_v*','HLT_DoubleIsoPFTau*_Trk*_eta*_v*'),
0113 errorReplyHlt = cms.bool(False),
0114 verbosityLevel = cms.uint32(0)
0115 )
0116
0117 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0118 proc.templateAnalyzer = DQMEDAnalyzer(
0119 "TauTagValidation",
0120 StandardMatchingParameters,
0121 GenericTriggerSelection = GenericTriggerSelectionParameters,
0122 ExtensionName = cms.string(""),
0123 TauProducer = cms.InputTag(''),
0124 discriminators = cms.VPSet(
0125 )
0126 )
0127
0128
0129 proc.RunHPSValidation = proc.templateAnalyzer.clone()
0130
0131
0132 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0133 fastSim.toModify(
0134 proc.RunHPSValidation,
0135 hltInputTag = cms.InputTag(""),
0136 GenericTriggerSelection=dict(hltInputTag = cms.InputTag(""))
0137 )
0138
0139 proc.RunHPSValidation.ExtensionName = ""
0140
0141 proc.RunHPSValidation.TauProducer = cms.InputTag('hpsPFTauProducer')
0142
0143 def tauIDMVAinputs(module, wp):
0144 return {"container" : cms.string(module), "workingPointIndex" : cms.int32(-1 if wp=="raw" else getattr(RecoModules, module).workingPoints.index(wp))}
0145 def tauIDbasicinputs(module, wp):
0146 index = RecoModules.getBasicTauDiscriminatorRawIndex(getattr(RecoModules, module), wp, True)
0147 if index==None:
0148 index = RecoModules.getBasicTauDiscriminatorWPIndex(getattr(RecoModules, module), wp, True)
0149 else:
0150 index = -index - 1
0151 if index!=None:
0152 return {"container" : cms.string(module), "workingPointIndex" : cms.int32(index)}
0153 print ("Basic Tau Discriminator <{}> <{}> for Validation configuration not found!".format(module, wp))
0154 raise Exception
0155
0156 proc.RunHPSValidation.discriminators = cms.VPSet(
0157 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByDecayModeFinding"),plotStep = cms.bool(True),selectionCut = cms.double(0.5),container = cms.string("")),
0158 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByDecayModeFindingNewDMs"),plotStep = cms.bool(True),selectionCut = cms.double(0.5),container = cms.string("")),
0159 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByDecayModeFindingOldDMs"),plotStep = cms.bool(True),selectionCut = cms.double(0.5),container = cms.string("")),
0160 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),plotStep = cms.bool(True),container = cms.string("hpsPFTauBasicDiscriminators"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByLooseCombinedIsolationDBSumPtCorr3Hits")),
0161 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),plotStep = cms.bool(True),container = cms.string("hpsPFTauBasicDiscriminators"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByMediumCombinedIsolationDBSumPtCorr3Hits")),
0162 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),plotStep = cms.bool(True),container = cms.string("hpsPFTauBasicDiscriminators"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByTightCombinedIsolationDBSumPtCorr3Hits")),
0163
0164
0165
0166
0167
0168
0169
0170
0171 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseMuonRejection3"),plotStep = cms.bool(True),container = cms.string("hpsPFTauDiscriminationByMuonRejection3"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByLooseMuonRejection3")),
0172 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightMuonRejection3"),plotStep = cms.bool(True),container = cms.string("hpsPFTauDiscriminationByMuonRejection3"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByTightMuonRejection3")),
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"),plotStep = cms.bool(True),container = cms.string("hpsPFTauBasicDiscriminatorsdR03"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByLooseCombinedIsolationDBSumPtCorr3HitsdR03")),
0191 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"),plotStep = cms.bool(True),container = cms.string("hpsPFTauBasicDiscriminatorsdR03"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByMediumCombinedIsolationDBSumPtCorr3HitsdR03")),
0192 cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"),plotStep = cms.bool(True),container = cms.string("hpsPFTauBasicDiscriminatorsdR03"),provenanceConfigLabel=cms.string("IDWPdefinitions"),idLabel=cms.string("ByTightCombinedIsolationDBSumPtCorr3HitsdR03")),
0193
0194
0195
0196
0197
0198
0199 )
0200
0201 proc.TauValNumeratorAndDenominator = cms.Sequence(
0202 proc.RunHPSValidation
0203 )
0204
0205 """
0206
0207 EFFICIENCY
0208
0209 Tau efficiency calculations
0210
0211 Define the Efficiency curves to produce. Each
0212 efficiency producer takes the numberator and denominator
0213 histograms and the dependent variables.
0214 """
0215
0216 plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator)
0217 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0218 proc.efficiencies = DQMEDHarvester(
0219 "TauDQMHistEffProducer",
0220 plots = plotPset
0221 )
0222
0223
0224
0225
0226
0227
0228
0229
0230 proc.normalizePlots = cms.EDAnalyzer(
0231 "DQMHistNormalizer",
0232 plotNamesToNormalize = cms.vstring('*_pTRatio_*','*_Size_*','*_SumPt_*','*_dRTauRefJet*'),
0233 reference = cms.string('*_pTRatio_allHadronic')
0234 )
0235
0236 proc.TauEfficiencies = cms.Sequence(
0237 proc.efficiencies*
0238 proc.normalizePlots
0239 )
0240
0241 """
0242
0243 PLOTTING
0244
0245 loadTau: load two separate TauVal root files into the DQM
0246 so the plotter can access them
0247
0248 """
0249
0250 loadTau = DQMEDAnalyzer("TauDQMFileLoader",
0251 test = cms.PSet(
0252
0253 inputFileNames = cms.vstring('/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
0254 scaleFactor = cms.double(1.),
0255 dqmDirectory_store = cms.string('test')
0256 ),
0257 reference = cms.PSet(
0258 inputFileNames = cms.vstring('/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
0259 scaleFactor = cms.double(1.),
0260 dqmDirectory_store = cms.string('reference')
0261 )
0262 )
0263
0264
0265
0266
0267 xAxisStuff = cms.PSet(
0268 xAxisTitle = cms.string('P_{T} / GeV'),
0269 xAxisTitleOffset = cms.double(0.9),
0270 xAxisTitleSize = cms.double(0.05)
0271 )
0272 xModifiers = [['pt',['xAxisTitle'],['P_{T} / GeV']],['eta',['xAxisTitle'],['#eta']],['phi',['xAxisTitle'],['#phi']],['pileup',['xAxisTitle'],['# of Reco Vertices']]]
0273
0274 yAxisStuff =cms.PSet(
0275 yScale = cms.string('linear'),
0276 minY_linear = cms.double(0.),
0277 maxY_linear = cms.double(1.6),
0278 minY_log = cms.double(0.001),
0279 maxY_log = cms.double(1.8),
0280 yAxisTitle = cms.string('#varepsilon'),
0281 yAxisTitleOffset = cms.double(1.1),
0282 yAxisTitleSize = cms.double(0.05)
0283 )
0284 yModifiers = [['efficiency',['yScale','yAxisTitle'],['linear','#varepsilon']],['fakeRate',['yScale','yAxisTitle'],['log','Fake rate']]]
0285
0286 legStuff = cms.PSet(
0287 posX = cms.double(0.50),
0288 posY = cms.double(0.72),
0289 sizeX = cms.double(0.39),
0290 sizeY = cms.double(0.17),
0291 header = cms.string(''),
0292 option = cms.string('brNDC'),
0293 borderSize = cms.int32(0),
0294 fillColor = cms.int32(0)
0295 )
0296 legModifiers = [['efficiency',['posY','sizeY'],[0.72,0.17]],['efficiency_overlay',['posY','sizeY'],[0.66,0.23]]]
0297
0298 drawOptStuff = cms.PSet(
0299 markerColor = cms.int32(1),
0300 markerSize = cms.double(1.),
0301 markerStyle = cms.int32(20),
0302 lineColor = cms.int32(1),
0303 lineStyle = cms.int32(1),
0304 lineWidth = cms.int32(2),
0305 drawOption = cms.string('ex0'),
0306 drawOptionLegend = cms.string('p')
0307 )
0308 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]]]
0309
0310 standardDrawingStuff = cms.PSet(
0311 canvasSizeX = cms.int32(640),
0312 canvasSizeY = cms.int32(640),
0313 indOutputFileName = cms.string('#PLOT#.png'),
0314 xAxes = Utils.SpawnPSet(xModifiers,xAxisStuff),
0315 yAxes = Utils.SpawnPSet(yModifiers,yAxisStuff),
0316 legends = Utils.SpawnPSet(legModifiers,legStuff),
0317 labels = cms.PSet(
0318 pt = cms.PSet(
0319 posX = cms.double(0.19),
0320 posY = cms.double(0.77),
0321 sizeX = cms.double(0.12),
0322 sizeY = cms.double(0.04),
0323 option = cms.string('brNDC'),
0324 borderSize = cms.int32(0),
0325 fillColor = cms.int32(0),
0326 textColor = cms.int32(1),
0327 textSize = cms.double(0.04),
0328 textAlign = cms.int32(22),
0329 text = cms.vstring('P_{T} > 5 GeV')
0330 ),
0331 eta = cms.PSet(
0332 posX = cms.double(0.19),
0333 posY = cms.double(0.83),
0334 sizeX = cms.double(0.12),
0335 sizeY = cms.double(0.04),
0336 option = cms.string('brNDC'),
0337 borderSize = cms.int32(0),
0338 fillColor = cms.int32(0),
0339 textColor = cms.int32(1),
0340 textSize = cms.double(0.04),
0341 textAlign = cms.int32(22),
0342 text = cms.vstring('-2.5 < #eta < +2.5')
0343 )
0344 ),
0345 drawOptionSets = cms.PSet(
0346 efficiency = cms.PSet(
0347 test = cms.PSet(
0348 markerColor = cms.int32(4),
0349 markerSize = cms.double(1.),
0350 markerStyle = cms.int32(20),
0351 lineColor = cms.int32(1),
0352 lineStyle = cms.int32(1),
0353 lineWidth = cms.int32(1),
0354 drawOption = cms.string('ep'),
0355 drawOptionLegend = cms.string('p')
0356 ),
0357 reference = cms.PSet(
0358 lineColor = cms.int32(1),
0359 lineStyle = cms.int32(1),
0360 lineWidth = cms.int32(1),
0361 fillColor = cms.int32(41),
0362 drawOption = cms.string('eBand'),
0363 drawOptionLegend = cms.string('l')
0364 )
0365 )
0366 ),
0367 drawOptionEntries = Utils.SpawnPSet(drawOptModifiers,drawOptStuff)
0368 )
0369
0370 standardCompareTestAndReference = cms.PSet(
0371 processes = cms.PSet(
0372 test = cms.PSet(
0373 dqmDirectory = cms.string('test'),
0374 legendEntry = cms.string('no test label'),
0375 type = cms.string('smMC')
0376 ),
0377 reference = cms.PSet(
0378 dqmDirectory = cms.string('reference'),
0379 legendEntry = cms.string('no ref label'),
0380 type = cms.string('smMC')
0381 )
0382 ),
0383 )
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434 """
0435
0436 UTILITIES
0437
0438 """
0439
0440 class ApplyFunctionToSequence:
0441 """ Helper class that applies a given function to all modules
0442 in a sequence """
0443 def __init__(self,function):
0444 self.functor = function
0445 def enter(self, module):
0446 self.functor(module)
0447 def leave(self, module):
0448 pass
0449
0450 def TranslateToLegacyProdNames(input):
0451 input = re.sub('fixedConePFTauProducer', 'pfRecoTauProducer', input)
0452
0453 fixedDiscriminationRegex = re.compile('fixedConePFTauDiscrimination(\w*)')
0454 input = fixedDiscriminationRegex.sub(r'pfRecoTauDiscrimination\1', input)
0455 input = re.sub('shrinkingConePFTauProducer', 'pfRecoTauProducerHighEfficiency', input)
0456 shrinkingDiscriminationRegex = re.compile('shrinkingConePFTauDiscrimination(\w*)')
0457 input = shrinkingDiscriminationRegex.sub(r'pfRecoTauDiscrimination\1HighEfficiency', input)
0458 return input
0459
0460
0461 def ConvertDrawJobToLegacyCompare(input):
0462 """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies
0463 to comapre a 31X to a 22X named validation """
0464
0465 if not hasattr(input, "drawJobs"):
0466 return
0467 myDrawJobs = input.drawJobs.parameters_()
0468 for drawJobName, drawJobData in myDrawJobs.items():
0469 print(drawJobData)
0470 if not drawJobData.plots.pythonTypeName() == "cms.PSet":
0471 continue
0472 pSetToInsert = cms.PSet(
0473 standardEfficiencyParameters,
0474 plots = cms.VPSet(
0475
0476 cms.PSet(
0477 dqmMonitorElements = drawJobData.plots.dqmMonitorElements,
0478 process = cms.string('test'),
0479 drawOptionEntry = cms.string('eff_overlay01'),
0480 legendEntry = cms.string(input.processes.test.legendEntry.value())
0481 ),
0482
0483 cms.PSet(
0484
0485 dqmMonitorElements = cms.vstring(TranslateToLegacyProdNames(drawJobData.plots.dqmMonitorElements.value()[0])),
0486 process = cms.string('reference'),
0487 drawOptionEntry = cms.string('eff_overlay02'),
0488 legendEntry = cms.string(input.processes.reference.legendEntry.value())
0489 )
0490 )
0491 )
0492 input.drawJobs.__setattr__(drawJobName, pSetToInsert)
0493
0494 def MakeLabeler(TestLabel, ReferenceLabel):
0495 def labeler(module):
0496 if hasattr(module, 'processes'):
0497 if module.processes.hasParameter(['test', 'legendEntry']) and module.processes.hasParameter([ 'reference', 'legendEntry']):
0498 module.processes.test.legendEntry = TestLabel
0499 module.processes.reference.legendEntry = ReferenceLabel
0500 print("Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label()))
0501 else:
0502 print("ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label())
0503 return labeler
0504
0505 def SetYmodulesToLog(matchingNames = []):
0506 ''' set all modules whose name contains one of the matching names to log y scale'''
0507 def yLogger(module):
0508 ''' set a module to use log scaling in the yAxis'''
0509 if hasattr(module, 'drawJobs'):
0510 print("EK DEBUG")
0511 drawJobParamGetter = lambda subName : getattr(module.drawJobs, subName)
0512
0513 attrNames = dir(module.drawJobs)
0514 for subModuleName, subModule in zip(attrNames, map(drawJobParamGetter, attrNames)):
0515 matchedNames = [name for name in matchingNames if subModuleName.find( name) > -1]
0516 if len(matchingNames) == 0:
0517 matchedNames = ['take','everything','and','dont','bother']
0518 if hasattr(subModule, "yAxis") and len(matchedNames):
0519 print("Setting drawJob: ", subModuleName, " to log scale.")
0520 subModule.yAxis = cms.string('fakeRate')
0521 if len(matchingNames) == 0:
0522 module.yAxes.efficiency.maxY_log = 40
0523 module.yAxes.fakeRate.maxY_log = 40
0524 return yLogger
0525
0526
0527 def SetBaseDirectory(Directory):
0528 def BaseDirectorizer(module):
0529 newPath = Directory
0530
0531 if hasattr(module, "outputFilePath"):
0532 oldPath = module.outputFilePath.value()
0533 newPath = os.path.join(newPath, oldPath)
0534 if not os.path.exists(newPath):
0535 os.makedirs(newPath)
0536 print(newPath)
0537 module.outputFilePath = cms.string("%s" % newPath)
0538 return BaseDirectorizer
0539
0540 def RemoveComparisonPlotCommands(module):
0541 if hasattr(module, 'drawJobs'):
0542
0543 drawJobs = module.drawJobs.parameterNames_()
0544 for drawJob in drawJobs:
0545 if drawJob != "TauIdEffStepByStep":
0546 module.drawJobs.__delattr__(drawJob)
0547 print("Removing comparison plot", drawJob)
0548
0549 def SetPlotDirectory(myPlottingSequence, directory):
0550 myFunctor = ApplyFunctionToSequence(SetBaseDirectory(directory))
0551 myPlottingSequence.visit(myFunctor)
0552
0553 def SetTestAndReferenceLabels(myPlottingSequence, TestLabel, ReferenceLabel):
0554 myFunctor = ApplyFunctionToSequence(MakeLabeler(TestLabel, ReferenceLabel))
0555 myPlottingSequence.visit(myFunctor)
0556
0557 def SetCompareToLegacyProductNames(myPlottingSequence):
0558 myFunctor = ApplyFunctionToSequence(ConvertDrawJobToLegacyCompare)
0559 myPlottingSequence.visit(myFunctor)
0560
0561 def SetTestFileToPlot(myProcess, FileLoc):
0562 myProcess.loadTau.test.inputFileNames = cms.vstring(FileLoc)
0563
0564 def SetReferenceFileToPlot(myProcess, FileLoc):
0565 if FileLoc == None:
0566 del myProcess.loadTau.reference
0567 else:
0568 myProcess.loadTau.reference.inputFileNames = cms.vstring(FileLoc)
0569
0570 def SetLogScale(myPlottingSequence):
0571 myFunctor = ApplyFunctionToSequence(SetYmodulesToLog())
0572 myPlottingSequence.visit(myFunctor)
0573
0574 def SetSmartLogScale(myPlottingSequence):
0575 myFunctor = ApplyFunctionToSequence(SetYmodulesToLog(['Electron', 'Muon', 'Isolation', 'TaNC']))
0576 myPlottingSequence.visit(myFunctor)
0577
0578 def SetPlotOnlyStepByStep(myPlottingSequence):
0579 myFunctor = ApplyFunctionToSequence(RemoveComparisonPlotCommands)
0580 myPlottingSequence.visit(myFunctor)
0581
0582 def SetValidationExtention(module, extension):
0583 module.ExtensionName = module.ExtensionName.value()+extension
0584
0585 def setBinning(module,pset):
0586 if module._TypedParameterizable__type == 'TauTagValidation':
0587 module.histoSettings = pset
0588
0589 def setTrigger(module,pset):
0590 if hasattr(module,'_TypedParameterizable__type') and module._TypedParameterizable__type == 'TauTagValidation':
0591 setattr(module,'turnOnTrigger',cms.bool(True))
0592 for item in pset.parameters_().items():
0593 setattr(module.GenericTriggerSelection,item[0],item[1])