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
00009 from SimGeneral.HepPDTESSource.pythiapdt_cfi import *
00010 import PhysicsTools.PatAlgos.tools.helpers as helpers
00011
00012 selectMuons = cms.EDProducer(
00013 "GenParticlePruner",
00014 src = cms.InputTag("genParticles"),
00015 select = cms.vstring(
00016 "drop * ",
00017 "keep++ pdgId = 13",
00018 "keep++ pdgId = -13",
00019 )
00020 )
00021
00022 selectStableMuons = genParticlesForJets.clone(src = cms.InputTag("selectMuons"))
00023
00024 kinematicSelectedTauValDenominatorZMM = cms.EDFilter(
00025 "TauValGenPRefSelector",
00026 src = cms.InputTag('selectStableMuons'),
00027 cut = kinematicSelectedTauValDenominatorCut,
00028 filter = cms.bool(False)
00029 )
00030
00031 procAttributes = dir(proc)
00032 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominator, 'ZMM')
00033 helpers.cloneProcessingSnippet( proc, proc.TauEfficiencies, 'ZMM')
00034 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorZMM, 'kinematicSelectedTauValDenominator', 'kinematicSelectedTauValDenominatorZMM')
00035
00036
00037 zttLabeler = lambda module : SetValidationExtention(module, 'ZMM')
00038 zttModifier = ApplyFunctionToSequence(zttLabeler)
00039 proc.TauValNumeratorAndDenominatorZMM.visit(zttModifier)
00040
00041
00042 proc.efficienciesZMM.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorZMM)
00043
00044
00045 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('ZMM') != -1), dir(proc) )
00046
00047
00048 for newAttr in newProcAttributes:
00049 locals()[newAttr] = getattr(proc,newAttr)
00050
00051 produceDenominatorZMM = cms.Sequence(
00052 selectMuons
00053 +selectStableMuons
00054
00055 +kinematicSelectedTauValDenominatorZMM
00056 )
00057
00058 produceDenominator = produceDenominatorZMM
00059
00060 runTauValidationBatchMode = cms.Sequence(
00061 produceDenominatorZMM
00062 +TauValNumeratorAndDenominatorZMM
00063 )
00064
00065 runTauValidation = cms.Sequence(
00066 runTauValidationBatchMode
00067 +TauEfficienciesZMM
00068 )
00069