def RecoTauValidation_cfi::ConvertDrawJobToLegacyCompare | ( | input | ) |
Converts a draw job defined to compare 31X named PFTau validtion efficiencies to comapre a 31X to a 22X named validation
Definition at line 1331 of file RecoTauValidation_cfi.py.
01332 : 01333 """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies 01334 to comapre a 31X to a 22X named validation """ 01335 # get the list of drawjobs { name : copyOfPSet } 01336 if not hasattr(input, "drawJobs"): 01337 return 01338 myDrawJobs = input.drawJobs.parameters_() 01339 for drawJobName, drawJobData in myDrawJobs.iteritems(): 01340 print drawJobData 01341 if not drawJobData.plots.pythonTypeName() == "cms.PSet": 01342 continue 01343 pSetToInsert = cms.PSet( 01344 standardEfficiencyParameters, 01345 plots = cms.VPSet( 01346 # test plot w/ modern names 01347 cms.PSet( 01348 dqmMonitorElements = drawJobData.plots.dqmMonitorElements, 01349 process = cms.string('test'), 01350 drawOptionEntry = cms.string('eff_overlay01'), 01351 legendEntry = cms.string(input.processes.test.legendEntry.value()) 01352 ), 01353 # ref plot w/ vintage name 01354 cms.PSet( 01355 # translate the name 01356 dqmMonitorElements = cms.vstring(TranslateToLegacyProdNames(drawJobData.plots.dqmMonitorElements.value()[0])), 01357 process = cms.string('reference'), 01358 drawOptionEntry = cms.string('eff_overlay02'), 01359 legendEntry = cms.string(input.processes.reference.legendEntry.value()) 01360 ) 01361 ) 01362 ) 01363 input.drawJobs.__setattr__(drawJobName, pSetToInsert)
def RecoTauValidation_cfi::MakeLabeler | ( | TestLabel, | |
ReferenceLabel | |||
) |
Definition at line 1364 of file RecoTauValidation_cfi.py.
01365 : 01366 def labeler(module): 01367 if hasattr(module, 'processes'): 01368 if module.processes.hasParameter(['test', 'legendEntry']) and module.processes.hasParameter([ 'reference', 'legendEntry']): 01369 module.processes.test.legendEntry = TestLabel 01370 module.processes.reference.legendEntry = ReferenceLabel 01371 print "Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label()) 01372 else: 01373 print "ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label() 01374 return labeler
def RecoTauValidation_cfi::RemoveComparisonPlotCommands | ( | module | ) |
Definition at line 1405 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetBaseDirectory | ( | Directory | ) |
Definition at line 1392 of file RecoTauValidation_cfi.py.
01393 : 01394 def BaseDirectorizer(module): 01395 newPath = Directory 01396 #if module.hasParameter("outputFilePath"): 01397 if hasattr(module, "outputFilePath"): 01398 oldPath = module.outputFilePath.value() 01399 newPath = os.path.join(newPath, oldPath) 01400 if not os.path.exists(newPath): 01401 os.makedirs(newPath) 01402 print newPath 01403 module.outputFilePath = cms.string("%s" % newPath) 01404 return BaseDirectorizer
def RecoTauValidation_cfi::SetCompareToLegacyProductNames | ( | myPlottingSequence | ) |
Definition at line 1422 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetLogScale | ( | myPlottingSequence | ) |
Definition at line 1435 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetPlotDirectory | ( | myPlottingSequence, | |
directory | |||
) |
Definition at line 1414 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetPlotOnlyStepByStep | ( | myPlottingSequence | ) |
Definition at line 1443 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetReferenceFileToPlot | ( | myProcess, | |
FileLoc | |||
) |
Definition at line 1429 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetSmartLogScale | ( | myPlottingSequence | ) |
Definition at line 1439 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetTestAndReferenceLabels | ( | myPlottingSequence, | |
TestLabel, | |||
ReferenceLabel | |||
) |
Definition at line 1418 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetTestFileToPlot | ( | myProcess, | |
FileLoc | |||
) |
Definition at line 1426 of file RecoTauValidation_cfi.py.
def RecoTauValidation_cfi::SetYmodulesToLog | ( | matchingNames = [] | ) |
set all modules whose name contains one of the matching names to log y scale
Definition at line 1375 of file RecoTauValidation_cfi.py.
01376 : 01377 ''' set all modules whose name contains one of the matching names to log y scale''' 01378 def yLogger(module): 01379 ''' set a module to use log scaling in the yAxis''' 01380 if hasattr(module, 'drawJobs'): 01381 print "EK DEBUG" 01382 drawJobParamGetter = lambda subName : getattr(module.drawJobs, subName) 01383 #for subModule in [getattr(module.drawJobs, subModuleName) for subModuleName in dir(module.drawJobs)]: 01384 attrNames = dir(module.drawJobs) 01385 for subModuleName, subModule in zip(attrNames, map(drawJobParamGetter, attrNames)): 01386 matchedNames = [name for name in matchingNames if subModuleName.find( name) > -1] # matching sub strings 01387 if hasattr(subModule, "yAxis") and len(matchedNames): 01388 print "Setting drawJob: ", subModuleName, " to log scale." 01389 subModule.yAxis = cms.string('fakeRate') #'fakeRate' configuration specifies the log scaling 01390 return yLogger 01391
def RecoTauValidation_cfi::TranslateToLegacyProdNames | ( | input | ) |
Definition at line 1320 of file RecoTauValidation_cfi.py.
01321 : 01322 input = re.sub('fixedConePFTauProducer', 'pfRecoTauProducer', input) 01323 #fixedDiscriminationRegex = re.compile('fixedConePFTauDiscrimination( \w* )') 01324 fixedDiscriminationRegex = re.compile('fixedConePFTauDiscrimination(\w*)') 01325 input = fixedDiscriminationRegex.sub(r'pfRecoTauDiscrimination\1', input) 01326 input = re.sub('shrinkingConePFTauProducer', 'pfRecoTauProducerHighEfficiency', input) 01327 shrinkingDiscriminationRegex = re.compile('shrinkingConePFTauDiscrimination(\w*)') 01328 input = shrinkingDiscriminationRegex.sub(r'pfRecoTauDiscrimination\1HighEfficiency', input) 01329 return input 01330
00001 cms.EDAnalyzer("TauTagValidation", 00002 StandardMatchingParameters, 00003 ExtensionName = cms.string(""), 00004 TauProducer = cms.InputTag('caloRecoTauProducer'), 00005 discriminators = cms.VPSet( 00006 cms.PSet( discriminator = cms.string("caloRecoTauDiscriminationByLeadingTrackFinding"),selectionCut = cms.double(0.5)), 00007 cms.PSet( discriminator = cms.string("caloRecoTauDiscriminationByLeadingTrackPtCut"),selectionCut = cms.double(0.5)), 00008 cms.PSet( discriminator = cms.string("caloRecoTauDiscriminationByIsolation"),selectionCut = cms.double(0.5)), 00009 cms.PSet( discriminator = cms.string("caloRecoTauDiscriminationAgainstElectron"),selectionCut = cms.double(0.5)) 00010 ) 00011 )
Definition at line 164 of file RecoTauValidation_cfi.py.
00001 cms.EDFilter("GenJetSelector", 00002 src = cms.InputTag("objectTypeSelectedTauValDenominator"), 00003 cut = cms.string('pt > 5. && abs(eta) < 2.5'), 00004 filter = cms.bool(False) 00005 )
Definition at line 70 of file RecoTauValidation_cfi.py.
00001 cms.Sequence( 00002 loadTau 00003 +plotTancValidation 00004 )
Definition at line 1299 of file RecoTauValidation_cfi.py.
00001 cms.EDAnalyzer("DQMFileLoader", 00002 test = cms.PSet( 00003 inputFileNames = cms.vstring('/afs/cern.ch/user/f/friis/scratch0/MyValidationArea/310pre6NewTags/src/Validation/RecoTau/test/CMSSW_3_1_0_pre6_ZTT_0505Fixes.root'), 00004 scaleFactor = cms.double(1.), 00005 dqmDirectory_store = cms.string('test') 00006 ), 00007 reference = cms.PSet( 00008 inputFileNames = cms.vstring('/afs/cern.ch/user/f/friis/CMSSW/pre6/src/Validation/RecoTau/test/CMSSW_3_1_0_pre6_ZTT.root'), 00009 scaleFactor = cms.double(1.), 00010 dqmDirectory_store = cms.string('reference') 00011 ) 00012 )
Definition at line 462 of file RecoTauValidation_cfi.py.
00001 cms.EDAnalyzer("TauTagValidation", 00002 StandardMatchingParameters, 00003 ExtensionName = cms.string(""), 00004 TauProducer = cms.InputTag('fixedConePFTauProducer'), 00005 discriminators = cms.VPSet( 00006 cms.PSet( discriminator = cms.string("fixedConePFTauDiscriminationByLeadingTrackFinding"),selectionCut = cms.double(0.5)), 00007 cms.PSet( discriminator = cms.string("fixedConePFTauDiscriminationByLeadingTrackPtCut"),selectionCut = cms.double(0.5)), 00008 cms.PSet( discriminator = cms.string("fixedConePFTauDiscriminationByTrackIsolation"),selectionCut = cms.double(0.5)), 00009 cms.PSet( discriminator = cms.string("fixedConePFTauDiscriminationByECALIsolation"),selectionCut = cms.double(0.5)), 00010 cms.PSet( discriminator = cms.string("fixedConePFTauDiscriminationAgainstElectron"),selectionCut = cms.double(0.5)), 00011 cms.PSet( discriminator = cms.string("fixedConePFTauDiscriminationAgainstMuon"),selectionCut = cms.double(0.5)) 00012 ) 00013 )
Definition at line 150 of file RecoTauValidation_cfi.py.
00001 cms.EDAnalyzer("TauTagValidation", 00002 StandardMatchingParameters, 00003 ExtensionName = cms.string(""), 00004 TauProducer = cms.InputTag('shrinkingConePFTauProducer'), 00005 discriminators = cms.VPSet( 00006 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationByLeadingTrackFinding"),selectionCut = cms.double(0.5)), 00007 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationByLeadingTrackPtCut"),selectionCut = cms.double(0.5)), 00008 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationByTrackIsolation"),selectionCut = cms.double(0.5)), 00009 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationByECALIsolation"),selectionCut = cms.double(0.5)), 00010 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationAgainstElectron"),selectionCut = cms.double(0.5)), 00011 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationAgainstMuon"),selectionCut = cms.double(0.5)) 00012 ) 00013 )
Definition at line 110 of file RecoTauValidation_cfi.py.
00001 cms.EDAnalyzer("TauTagValidation", 00002 StandardMatchingParameters, 00003 ExtensionName = cms.string("LeadingPion"), 00004 TauProducer = cms.InputTag('shrinkingConePFTauProducer'), 00005 discriminators = cms.VPSet( 00006 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationByLeadingPionPtCut"),selectionCut = cms.double(0.5)), 00007 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationByTrackIsolationUsingLeadingPion"),selectionCut = cms.double(0.5)), 00008 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationByECALIsolationUsingLeadingPion"),selectionCut = cms.double(0.5)), 00009 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationAgainstElectron"),selectionCut = cms.double(0.5)), 00010 cms.PSet( discriminator = cms.string("shrinkingConePFTauDiscriminationAgainstMuon"),selectionCut = cms.double(0.5)) 00011 ) 00012 )
Definition at line 97 of file RecoTauValidation_cfi.py.
The plotting of all the CaloTau ID efficiencies.
Definition at line 1003 of file RecoTauValidation_cfi.py.
The plotting of HPS Efficiencies.
Definition at line 803 of file RecoTauValidation_cfi.py.
The plotting of all the PFTau ID efficiencies.
Definition at line 706 of file RecoTauValidation_cfi.py.
The plotting of all the PFTauHighEfficiencies ID efficiencies.
Definition at line 906 of file RecoTauValidation_cfi.py.
The plotting of all the PFTauHighEfficiencyUsingLeadingPion ID efficiencies.
Definition at line 1198 of file RecoTauValidation_cfi.py.
Plot Tanc performance.
Definition at line 1074 of file RecoTauValidation_cfi.py.
00001 cms.Sequence( 00002 plotPFTauEfficiencies 00003 +plotPFTauHighEfficiencyEfficiencies 00004 +plotCaloTauEfficiencies 00005 +plotTancValidation 00006 +plotPFTauHighEfficiencyEfficienciesLeadingPion 00007 +plotHPSEfficiencies 00008 )
Definition at line 1289 of file RecoTauValidation_cfi.py.
tuple RecoTauValidation_cfi::RunHPSValidation = copy.deepcopy(PFTausHighEfficiencyBothProngs) |
Definition at line 136 of file RecoTauValidation_cfi.py.
tuple RecoTauValidation_cfi::RunTancValidation = copy.deepcopy(PFTausHighEfficiencyBothProngs) |
Definition at line 124 of file RecoTauValidation_cfi.py.
00001 cms.PSet( 00002 processes = cms.PSet( 00003 test = cms.PSet( 00004 dqmDirectory = cms.string('test'), 00005 legendEntry = cms.string('no test label'), 00006 type = cms.string('smMC') # Data/smMC/bsmMC/smSumMC 00007 ), 00008 reference = cms.PSet( 00009 dqmDirectory = cms.string('reference'), 00010 legendEntry = cms.string('no ref label'), 00011 type = cms.string('smMC') # Data/smMC/bsmMC/smSumMC 00012 ) 00013 ), 00014 )
Definition at line 667 of file RecoTauValidation_cfi.py.
Definition at line 478 of file RecoTauValidation_cfi.py.
00001 cms.PSet( 00002 parameter = cms.vstring('pt', 'eta', 'phi', 'energy'), 00003 title = cms.string('TauId step by step efficiencies'), 00004 xAxis = cms.string('#PAR#'), 00005 yAxis = cms.string('efficiency'), 00006 legend = cms.string('efficiency_overlay'), 00007 labels = cms.vstring('pt', 'eta') 00008 )
Definition at line 691 of file RecoTauValidation_cfi.py.
00001 cms.PSet( 00002 parameter = cms.vstring('pt', 'eta', 'phi', 'energy'), 00003 xAxis = cms.string('#PAR#'), 00004 yAxis = cms.string('efficiency'), 00005 legend = cms.string('efficiency'), 00006 labels = cms.vstring('pt', 'eta'), 00007 drawOptionSet = cms.string('efficiency') 00008 )
Definition at line 682 of file RecoTauValidation_cfi.py.
00001 cms.PSet( 00002 DataType = cms.string('Leptons'), 00003 MatchDeltaR_Leptons = cms.double(0.15), 00004 MatchDeltaR_Jets = cms.double(0.3), 00005 SaveOutputHistograms = cms.bool(False), 00006 #RefCollection = cms.InputTag("TauGenJetProducer","selectedGenTauDecaysToHadronsPt5Cumulative"), 00007 RefCollection = cms.InputTag("kinematicSelectedTauValDenominator"), 00008 )
Definition at line 88 of file RecoTauValidation_cfi.py.
Definition at line 196 of file RecoTauValidation_cfi.py.
00001 cms.Sequence( 00002 PFTausBothProngs+ 00003 CaloTausBothProngs + 00004 PFTausHighEfficiencyBothProngs+ 00005 PFTausHighEfficiencyLeadingPionBothProngs+ 00006 RunTancValidation+ 00007 RunHPSValidation 00008 )
Definition at line 176 of file RecoTauValidation_cfi.py.