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 RecoJets.Configuration.RecoPFJets_cff import *
00006 import PhysicsTools.PatAlgos.tools.helpers as helpers
00007
00008 kinematicSelectedPFJets = cms.EDFilter(
00009 "TauValPFJetSelector",
00010 src = cms.InputTag('ak5PFJets'),
00011 cut = cms.string("pt > 15 & abs(eta) < 2.5"),
00012 filter = cms.bool(False)
00013 )
00014
00015 PFJetsId = cms.EDFilter(
00016 "TauValPFJetSelector",
00017 src = cms.InputTag('kinematicSelectedPFJets'),
00018 cut = cms.string("chargedHadronEnergyFraction > 0.0 & neutralHadronEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99 & chargedEmEnergyFraction < 0.99 & chargedEmEnergyFraction < 0.99 & neutralEmEnergyFraction < 0.99 & chargedMultiplicity > 0 & nConstituents > 1"),
00019 filter = cms.bool(False)
00020 )
00021
00022 CleanedPFJets = cms.EDProducer("TauValJetViewCleaner",
00023 srcObject = cms.InputTag( "kinematicSelectedPFJets" ),
00024 srcObjectsToRemove = cms.VInputTag( cms.InputTag("muons"), cms.InputTag("gsfElectrons") ),
00025 deltaRMin = cms.double(0.15)
00026 )
00027
00028 procAttributes = dir(proc)
00029 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominator, 'RealData')
00030 helpers.cloneProcessingSnippet( proc, proc.TauEfficiencies, 'RealData')
00031 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorRealData, 'kinematicSelectedTauValDenominator', 'CleanedPFJets')
00032
00033
00034 zttLabeler = lambda module : SetValidationExtention(module, 'RealData')
00035 zttModifier = ApplyFunctionToSequence(zttLabeler)
00036 proc.TauValNumeratorAndDenominatorRealData.visit(zttModifier)
00037
00038 binning = cms.PSet(
00039 pt = cms.PSet( nbins = cms.int32(25), min = cms.double(0.), max = cms.double(250.) ),
00040 eta = cms.PSet( nbins = cms.int32(4), min = cms.double(-3.), max = cms.double(3.) ),
00041 phi = cms.PSet( nbins = cms.int32(4), min = cms.double(-180.), max = cms.double(180.) ),
00042 pileup = cms.PSet( nbins = cms.int32(18), min = cms.double(0.), max = cms.double(72.) ),
00043 )
00044 zttModifier = ApplyFunctionToSequence(lambda m: setBinning(m,binning))
00045 proc.TauValNumeratorAndDenominatorRealData.visit(zttModifier)
00046
00047
00048
00049 proc.efficienciesRealData.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorRealData)
00050
00051
00052 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('RealData') != -1), dir(proc) )
00053
00054
00055 for newAttr in newProcAttributes:
00056 locals()[newAttr] = getattr(proc,newAttr)
00057
00058
00059 produceDenominatorRealData = cms.Sequence(
00060 kinematicSelectedPFJets *
00061 PFJetsId *
00062 CleanedPFJets
00063 )
00064
00065 produceDenominator = cms.Sequence(produceDenominatorRealData)
00066
00067 runTauValidationBatchMode = cms.Sequence(
00068 produceDenominatorRealData
00069 +TauValNumeratorAndDenominatorRealData
00070 )
00071
00072 runTauValidation = cms.Sequence(
00073 runTauValidationBatchMode
00074 +TauEfficienciesRealData
00075 )