Go to the documentation of this file.00001 import FWCore.ParameterSet.Config as cms
00002 from Validation.RecoTau.RecoTauValidation_cfi import *
00003 import copy
00004
00005 from PhysicsTools.HepMCCandAlgos.genParticles_cfi import *
00006 from RecoJets.Configuration.RecoGenJets_cff import *
00007 from RecoJets.Configuration.GenJetParticles_cff import *
00008 import PhysicsTools.PatAlgos.tools.helpers as helpers
00009
00010 kinematicSelectedTauValDenominatorQCD = cms.EDFilter(
00011 "GenJetSelector",
00012 src = cms.InputTag('iterativeCone5GenJets'),
00013 cut = kinematicSelectedTauValDenominatorCut,
00014 filter = cms.bool(False)
00015 )
00016
00017
00018 procAttributes = dir(proc)
00019 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominator, 'QCD')
00020 helpers.cloneProcessingSnippet( proc, proc.TauEfficiencies, 'QCD')
00021 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorQCD, 'kinematicSelectedTauValDenominator', 'kinematicSelectedTauValDenominatorQCD')
00022
00023
00024 zttLabeler = lambda module : SetValidationExtention(module, 'QCD')
00025 zttModifier = ApplyFunctionToSequence(zttLabeler)
00026 proc.TauValNumeratorAndDenominatorQCD.visit(zttModifier)
00027
00028
00029 proc.efficienciesQCD.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorQCD)
00030
00031
00032 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('QCD') != -1), dir(proc) )
00033
00034
00035 for newAttr in newProcAttributes:
00036 locals()[newAttr] = getattr(proc,newAttr)
00037
00038
00039 produceDenominatorQCD = cms.Sequence(
00040 genParticlesForJets
00041 *kinematicSelectedTauValDenominatorQCD
00042 )
00043
00044 produceDenominator = produceDenominatorQCD
00045
00046 runTauValidationBatchMode = cms.Sequence(
00047 produceDenominator
00048 +TauValNumeratorAndDenominatorQCD
00049 )
00050
00051 runTauValidation = cms.Sequence(
00052 runTauValidationBatchMode
00053 +TauEfficienciesQCD
00054 )