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