Go to the documentation of this file.00001 import FWCore.ParameterSet.Config as cms
00002 from Validation.RecoTau.RecoTauValidation_cfi import *
00003
00004 from PhysicsTools.JetMCAlgos.TauGenJets_cfi import tauGenJets
00005 from PhysicsTools.HepMCCandAlgos.genParticles_cfi import *
00006 import PhysicsTools.PatAlgos.tools.helpers as helpers
00007
00008
00009 objectTypeSelectedTauValDenominatorModuleZTT = cms.EDFilter("TauGenJetDecayModeSelector",
00010 src = cms.InputTag("tauGenJets"),
00011 select = cms.vstring('oneProng0Pi0', 'oneProng1Pi0', 'oneProng2Pi0', 'oneProngOther',
00012 'threeProng0Pi0', 'threeProng1Pi0', 'threeProngOther', 'rare'),
00013 filter = cms.bool(False)
00014 )
00015
00016
00017 kinematicSelectedTauValDenominatorZTT = cms.EDFilter(
00018 "GenJetSelector",
00019 src = cms.InputTag('objectTypeSelectedTauValDenominatorModuleZTT'),
00020 cut = kinematicSelectedTauValDenominatorCut,
00021 filter = cms.bool(False)
00022 )
00023
00024 procAttributes = dir(proc)
00025 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominator, 'ZTT')
00026 helpers.cloneProcessingSnippet( proc, proc.TauEfficiencies, 'ZTT')
00027 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorZTT, 'kinematicSelectedTauValDenominator', 'kinematicSelectedTauValDenominatorZTT')
00028
00029
00030 zttLabeler = lambda module : SetValidationExtention(module, 'ZTT')
00031 zttModifier = ApplyFunctionToSequence(zttLabeler)
00032 proc.TauValNumeratorAndDenominatorZTT.visit(zttModifier)
00033
00034
00035 proc.efficienciesZTT.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorZTT)
00036
00037
00038 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('ZTT') != -1), dir(proc) )
00039
00040
00041 for newAttr in newProcAttributes:
00042 locals()[newAttr] = getattr(proc,newAttr)
00043
00044 produceDenominatorZTT = cms.Sequence(
00045 tauGenJets
00046 +objectTypeSelectedTauValDenominatorModuleZTT
00047 +kinematicSelectedTauValDenominatorZTT
00048 )
00049
00050 produceDenominator = produceDenominatorZTT
00051
00052 runTauValidationBatchMode = cms.Sequence(
00053 produceDenominatorZTT
00054 +TauValNumeratorAndDenominatorZTT
00055 )
00056
00057 runTauValidation = cms.Sequence(
00058 runTauValidationBatchMode
00059 +TauEfficienciesZTT
00060 )
00061