1 import FWCore.ParameterSet.Config
as cms
8 ElPrimaryVertexFilter = cms.EDFilter(
10 src = cms.InputTag(
"offlinePrimaryVertices"),
11 cut = cms.string(
"!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),
12 filter = cms.bool(
False)
15 ElBestPV = cms.EDProducer(
16 "HighestSumP4PrimaryVertexSelector",
17 src = cms.InputTag(
"ElPrimaryVertexFilter")
20 selectedElectrons = cms.EDFilter(
21 "TauValElectronSelector",
22 src = cms.InputTag(
'gedGsfElectrons'),
23 cut = cms.string(
"pt > 25.0 && abs(eta) < 2.4 && isElectron"),
24 filter = cms.bool(
False)
27 ElectronsFromPV = cms.EDProducer(
28 "GsfElectronFromPVSelector",
29 srcElectron = cms.InputTag(
"selectedElectrons"),
30 srcVertex = cms.InputTag(
"ElBestPV"),
31 max_dxy = cms.double(0.01),
32 max_dz = cms.double(0.1)
35 idElectrons = cms.EDFilter(
36 "TauValElectronSelector",
37 src = cms.InputTag(
'ElectronsFromPV'),
38 cut = cms.string(
'ecalDrivenSeed & isGsfCtfScPixChargeConsistent & isGsfScPixChargeConsistent & isGsfCtfChargeConsistent & !isEBEEGap & (isEB & sigmaIetaIeta<0.01 & abs(deltaPhiSuperClusterTrackAtVtx)<0.06 & abs(deltaEtaSuperClusterTrackAtVtx)<0.006 & hadronicOverEm<0.04 | isEE & sigmaIetaIeta<0.03 & abs(deltaPhiSuperClusterTrackAtVtx)<0.04 & abs(deltaEtaSuperClusterTrackAtVtx)<0.007 & hadronicOverEm<0.025)'),
39 filter = cms.bool(
False)
42 trackElectrons = cms.EDFilter(
43 "TauValElectronSelector",
44 src = cms.InputTag(
'idElectrons'),
45 cut = cms.string(
'gsfTrack.isNonnull && 0.7 < eSuperClusterOverP < 1.5'),
47 filter = cms.bool(
False)
50 isolatedElectrons = cms.EDFilter(
51 "TauValElectronSelector",
52 src = cms.InputTag(
'trackElectrons'),
53 cut = cms.string(
"(isEB & (dr04TkSumPt/pt + max(0.,dr04EcalRecHitSumEt-2.)/pt + dr04HcalTowerSumEt/pt < 0.10)) | (isEE & (dr04TkSumPt/pt + dr04EcalRecHitSumEt/pt + dr04HcalTowerSumEt/pt < 0.09))"),
54 filter = cms.bool(
False)
59 ElGoodTracks = cms.EDFilter(
61 src = cms.InputTag(
"generalTracks"),
62 cut = cms.string(
"pt > 5 && abs(eta) < 2.5"),
63 filter = cms.bool(
False)
66 ElIsoTracks = cms.EDProducer(
68 src = cms.InputTag(
"ElGoodTracks"),
69 radius = cms.double(0.3),
70 SumPtFraction = cms.double(0.5)
73 ElTrackFromPV = cms.EDProducer(
74 "TrackFromPVSelector",
75 srcTrack = cms.InputTag(
"ElIsoTracks"),
76 srcVertex = cms.InputTag(
"ElBestPV"),
77 max_dxy = cms.double(0.01),
78 max_dz = cms.double(0.1)
81 ElTrackCands = cms.EDProducer(
82 "ConcreteChargedCandidateProducer",
83 src = cms.InputTag(
"ElTrackFromPV"),
84 particleType = cms.string(
"e+")
87 ZeeCandElectronTrack = cms.EDProducer(
88 "CandViewShallowCloneCombiner",
89 decay = cms.string(
"isolatedElectrons@+ ElTrackCands@-"),
90 cut = cms.string(
"80 < mass < 100")
93 BestZee = cms.EDProducer(
94 "BestMassZArbitrationProducer",
95 ZCandidateCollection = cms.InputTag(
"ZeeCandElectronTrack")
98 ElZLegs = cms.EDProducer(
99 "CollectionFromZLegProducer",
100 ZCandidateCollection = cms.InputTag(
"BestZee"),
103 procAttributes =
dir(proc)
106 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorRealElectronsData,
'kinematicSelectedTauValDenominator', cms.InputTag(
"ElZLegs",
"theProbeLeg"))
110 zttModifier = ApplyFunctionToSequence(zttLabeler)
111 proc.TauValNumeratorAndDenominatorRealElectronsData.visit(zttModifier)
114 pt = cms.PSet( nbins = cms.int32(10), min = cms.double(0.), max = cms.double(100.) ),
115 eta = cms.PSet( nbins = cms.int32(4), min = cms.double(-3.), max = cms.double(3.) ),
116 phi = cms.PSet( nbins = cms.int32(4), min = cms.double(-180.), max = cms.double(180.) ),
117 pileup = cms.PSet( nbins = cms.int32(18), min = cms.double(0.), max = cms.double(72.) ),
119 zttModifier = ApplyFunctionToSequence(
lambda m:
setBinning(m,binning))
120 proc.TauValNumeratorAndDenominatorRealElectronsData.visit(zttModifier)
124 proc.efficienciesRealElectronsData.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorRealElectronsData)
127 newProcAttributes = [x
for x
in dir(proc)
if (x
not in procAttributes)
and (x.find(
'RealElectronsData') != -1)]
130 for newAttr
in newProcAttributes:
131 locals()[newAttr] = getattr(proc,newAttr)
133 produceDenominatorRealElectronsData = cms.Sequence( cms.ignore(ElPrimaryVertexFilter) * ElBestPV *
134 ( (cms.ignore(selectedElectrons) * ElectronsFromPV * cms.ignore(idElectrons) * cms.ignore(trackElectrons) * cms.ignore(isolatedElectrons)) +
135 (cms.ignore(ElGoodTracks) * ElIsoTracks * ElTrackFromPV * ElTrackCands) ) *
136 ZeeCandElectronTrack *
141 produceDenominator = cms.Sequence(produceDenominatorRealElectronsData)
143 runTauValidationBatchMode = cms.Sequence(
144 produceDenominatorRealElectronsData
145 +TauValNumeratorAndDenominatorRealElectronsData
148 runTauValidation = cms.Sequence(
149 runTauValidationBatchMode
150 +TauEfficienciesRealElectronsData
def cloneProcessingSnippet(process, sequence, postfix, removePostfix="", noClones=[], addToTask=False)
def SetValidationExtention(module, extension)
def setBinning(module, pset)