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 discs_to_retain = [
'ByDecayModeFinding',
'ElectronRejection']
125 proc.RunHPSValidationRealElectronsData.discriminators = cms.VPSet([p
for p
in proc.RunHPSValidationRealElectronsData.discriminators
if any(disc
in p.discriminator.value()
for disc
in discs_to_retain) ])
128 proc.efficienciesRealElectronsData.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorRealElectronsData)
129 proc.efficienciesRealElectronsDataSummary = cms.EDProducer(
"TauDQMHistEffProducer",
132 denominator = cms.string(
'RecoTauV/hpsPFTauProducerRealElectronsData_Summary/#PAR#PlotDen'),
133 efficiency = cms.string(
'RecoTauV/hpsPFTauProducerRealElectronsData_Summary/#PAR#Plot'),
134 numerator = cms.string(
'RecoTauV/hpsPFTauProducerRealElectronsData_Summary/#PAR#PlotNum'),
135 parameter = cms.vstring(
'summary'),
136 stepByStep = cms.bool(
True)
142 newProcAttributes = [x
for x
in dir(proc)
if (x
not in procAttributes)
and (x.find(
'RealElectronsData') != -1)]
145 for newAttr
in newProcAttributes:
146 locals()[newAttr] = getattr(proc,newAttr)
148 produceDenominatorRealElectronsData = cms.Sequence( cms.ignore(ElPrimaryVertexFilter) * ElBestPV *
149 ( (cms.ignore(selectedElectrons) * ElectronsFromPV * cms.ignore(idElectrons) * cms.ignore(trackElectrons) * cms.ignore(isolatedElectrons)) +
150 (cms.ignore(ElGoodTracks) * ElIsoTracks * ElTrackFromPV * ElTrackCands) ) *
151 ZeeCandElectronTrack *
156 produceDenominator = cms.Sequence(produceDenominatorRealElectronsData)
158 runTauValidationBatchMode = cms.Sequence(
159 produceDenominatorRealElectronsData
160 +TauValNumeratorAndDenominatorRealElectronsData
163 runTauValidation = cms.Sequence(
164 runTauValidationBatchMode
165 +TauEfficienciesRealElectronsData