1 import FWCore.ParameterSet.Config
as cms
8 kinematicSelectedPFJets = cms.EDFilter(
10 src = cms.InputTag(
'ak4PFJets'),
11 cut = cms.string(
"pt > 15 & abs(eta) < 2.5"),
12 filter = cms.bool(
False)
15 PFJetsId = cms.EDFilter(
16 "TauValPFJetSelector",
17 src = cms.InputTag(
'kinematicSelectedPFJets'),
18 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"),
19 filter = cms.bool(
False)
22 CleanedPFJets = cms.EDProducer(
"TauValJetViewCleaner",
23 srcObject = cms.InputTag(
"kinematicSelectedPFJets" ),
24 srcObjectsToRemove = cms.VInputTag( cms.InputTag(
"muons"), cms.InputTag(
"gedGsfElectrons") ),
25 deltaRMin = cms.double(0.15)
28 procAttributes =
dir(proc)
31 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorRealData,
'kinematicSelectedTauValDenominator',
'CleanedPFJets')
35 zttModifier = ApplyFunctionToSequence(zttLabeler)
36 proc.TauValNumeratorAndDenominatorRealData.visit(zttModifier)
39 pt = cms.PSet( nbins = cms.int32(25), min = cms.double(0.), max = cms.double(250.) ),
40 eta = cms.PSet( nbins = cms.int32(4), min = cms.double(-3.), max = cms.double(3.) ),
41 phi = cms.PSet( nbins = cms.int32(4), min = cms.double(-180.), max = cms.double(180.) ),
42 pileup = cms.PSet( nbins = cms.int32(18), min = cms.double(0.), max = cms.double(72.) ),
44 zttModifier = ApplyFunctionToSequence(
lambda m:
setBinning(m,binning))
45 proc.TauValNumeratorAndDenominatorRealData.visit(zttModifier)
49 proc.efficienciesRealData.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorRealData)
52 newProcAttributes =
filter(
lambda x: (x
not in procAttributes)
and (x.find(
'RealData') != -1),
dir(proc) )
55 for newAttr
in newProcAttributes:
56 locals()[newAttr] = getattr(proc,newAttr)
59 produceDenominatorRealData = cms.Sequence(
60 cms.ignore(kinematicSelectedPFJets) *
61 cms.ignore(PFJetsId) *
65 produceDenominator = cms.Sequence(produceDenominatorRealData)
67 runTauValidationBatchMode = cms.Sequence(
68 produceDenominatorRealData
69 +TauValNumeratorAndDenominatorRealData
72 runTauValidation = cms.Sequence(
73 runTauValidationBatchMode
74 +TauEfficienciesRealData
def cloneProcessingSnippet(process, sequence, postfix, removePostfix="", noClones=[], addToTask=False)
def SetValidationExtention(module, extension)
def setBinning(module, pset)