1 import FWCore.ParameterSet.Config
as cms
8 MuPrimaryVertexFilter = 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 MuBestPV = cms.EDProducer(
16 "HighestSumP4PrimaryVertexSelector",
17 src = cms.InputTag(
"MuPrimaryVertexFilter")
20 selectedMuons = cms.EDFilter(
22 src = cms.InputTag(
'muons'),
23 cut = cms.string(
"pt > 20.0 && abs(eta) < 2.1 && isGlobalMuon = 1 && isTrackerMuon = 1"),
24 filter = cms.bool(
False)
27 selectedMuonsIso = cms.EDFilter(
29 src = cms.InputTag(
'selectedMuons'),
30 cut = cms.string(
'(isolationR03().emEt + isolationR03().hadEt + isolationR03().sumPt)/pt < 0.15'),
31 filter = cms.bool(
False)
34 MuonsFromPV = cms.EDProducer(
36 srcMuon = cms.InputTag(
"selectedMuonsIso"),
37 srcVertex = cms.InputTag(
"MuBestPV"),
38 max_dxy = cms.double(0.01),
39 max_dz = cms.double(0.1)
44 MuGoodTracks = cms.EDFilter(
"TrackSelector",
45 src = cms.InputTag(
"generalTracks"),
46 cut = cms.string(
"pt > 5 && abs(eta) < 2.5"),
47 filter = cms.bool(
False)
50 MuIsoTracks = cms.EDProducer(
52 src = cms.InputTag(
"MuGoodTracks"),
53 radius = cms.double(0.3),
54 SumPtFraction = cms.double(0.5)
57 MuTrackFromPV = cms.EDProducer(
58 "TrackFromPVSelector",
59 srcTrack = cms.InputTag(
"MuIsoTracks"),
60 srcVertex = cms.InputTag(
"MuBestPV"),
61 max_dxy = cms.double(0.01),
62 max_dz = cms.double(0.1)
65 MuTrackCands = cms.EDProducer(
66 "ConcreteChargedCandidateProducer",
67 src = cms.InputTag(
"MuTrackFromPV"),
68 particleType = cms.string(
"mu+")
71 ZmmCandMuonTrack = cms.EDProducer(
72 "CandViewShallowCloneCombiner",
73 decay = cms.string(
"MuonsFromPV@+ MuTrackCands@-"),
74 cut = cms.string(
"80 < mass < 100")
77 BestZmm = cms.EDProducer(
"BestMassZArbitrationProducer",
78 ZCandidateCollection = cms.InputTag(
"ZmmCandMuonTrack")
81 MuZLegs = cms.EDProducer(
"CollectionFromZLegProducer",
82 ZCandidateCollection = cms.InputTag(
"BestZmm"),
85 procAttributes =
dir(proc)
88 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorRealMuonsData,
'kinematicSelectedTauValDenominator', cms.InputTag(
"MuZLegs",
"theProbeLeg"))
92 zttModifier = ApplyFunctionToSequence(zttLabeler)
93 proc.TauValNumeratorAndDenominatorRealMuonsData.visit(zttModifier)
96 pt = cms.PSet( nbins = cms.int32(10), min = cms.double(0.), max = cms.double(100.) ),
97 eta = cms.PSet( nbins = cms.int32(4), min = cms.double(-3.), max = cms.double(3.) ),
98 phi = cms.PSet( nbins = cms.int32(4), min = cms.double(-180.), max = cms.double(180.) ),
99 pileup = cms.PSet( nbins = cms.int32(18), min = cms.double(0.), max = cms.double(72.) ),
101 zttModifier = ApplyFunctionToSequence(
lambda m:
setBinning(m,binning))
102 proc.TauValNumeratorAndDenominatorRealMuonsData.visit(zttModifier)
106 proc.efficienciesRealMuonsData.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorRealMuonsData)
109 newProcAttributes =
filter(
lambda x: (x
not in procAttributes)
and (x.find(
'RealMuonsData') != -1),
dir(proc) )
112 for newAttr
in newProcAttributes:
113 locals()[newAttr] = getattr(proc,newAttr)
115 produceDenominatorRealMuonsData = cms.Sequence(
116 cms.ignore(MuPrimaryVertexFilter) * MuBestPV *
117 ( ( cms.ignore(selectedMuons) * cms.ignore(selectedMuonsIso) * MuonsFromPV ) +
118 ( cms.ignore(MuGoodTracks) * MuIsoTracks * MuTrackFromPV * MuTrackCands ) ) *
124 produceDenominator = cms.Sequence(produceDenominatorRealMuonsData)
126 runTauValidationBatchMode = cms.Sequence(
127 produceDenominatorRealMuonsData
128 +TauValNumeratorAndDenominatorRealMuonsData
131 runTauValidation = cms.Sequence(
132 runTauValidationBatchMode
133 +TauEfficienciesRealMuonsData
def cloneProcessingSnippet(process, sequence, postfix, removePostfix="", noClones=[], addToTask=False)
def SetValidationExtention(module, extension)
def setBinning(module, pset)