1 import FWCore.ParameterSet.Config
as cms
10 import cutsRecoTracks_cfi
14 from PhysicsTools.RecoAlgos.trackingParticleSelector_cfi
import trackingParticleSelector
as _trackingParticleSelector
16 from CommonTools.RecoAlgos.recoChargedRefCandidateToTrackRefProducer_cfi
import recoChargedRefCandidateToTrackRefProducer
as _recoChargedRefCandidateToTrackRefProducer
20 cutsRecoTracksInitialStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"initialStep"])
21 cutsRecoTracksLowPtTripletStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"lowPtTripletStep"])
22 cutsRecoTracksPixelPairStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"pixelPairStep"])
23 cutsRecoTracksDetachedTripletStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"detachedTripletStep"])
24 cutsRecoTracksMixedTripletStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"mixedTripletStep"])
25 cutsRecoTracksPixelLessStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"pixelLessStep"])
26 cutsRecoTracksTobTecStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"tobTecStep"])
27 cutsRecoTracksJetCoreRegionalStep = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"jetCoreRegionalStep"])
28 cutsRecoTracksMuonSeededStepInOut = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"muonSeededStepInOut"])
29 cutsRecoTracksMuonSeededStepOutIn = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[
"muonSeededStepOutIn"])
32 cutsRecoTracksHp = cutsRecoTracks_cfi.cutsRecoTracks.clone(quality=[
"highPurity"])
33 cutsRecoTracksInitialStepHp = cutsRecoTracksInitialStep.clone(quality=[
"highPurity"])
34 cutsRecoTracksLowPtTripletStepHp = cutsRecoTracksLowPtTripletStep.clone(quality=[
"highPurity"])
35 cutsRecoTracksPixelPairStepHp = cutsRecoTracksPixelPairStep.clone(quality=[
"highPurity"])
36 cutsRecoTracksDetachedTripletStepHp = cutsRecoTracksDetachedTripletStep.clone(quality=[
"highPurity"])
37 cutsRecoTracksMixedTripletStepHp = cutsRecoTracksMixedTripletStep.clone(quality=[
"highPurity"])
38 cutsRecoTracksPixelLessStepHp = cutsRecoTracksPixelLessStep.clone(quality=[
"highPurity"])
39 cutsRecoTracksTobTecStepHp = cutsRecoTracksTobTecStep.clone(quality=[
"highPurity"])
40 cutsRecoTracksJetCoreRegionalStepHp = cutsRecoTracksJetCoreRegionalStep.clone(quality=[
"highPurity"])
41 cutsRecoTracksMuonSeededStepInOutHp = cutsRecoTracksMuonSeededStepInOut.clone(quality=[
"highPurity"])
42 cutsRecoTracksMuonSeededStepOutInHp = cutsRecoTracksMuonSeededStepOutIn.clone(quality=[
"highPurity"])
45 import PhysicsTools.RecoAlgos.btvTracks_cfi
as btvTracks_cfi
46 cutsRecoTracksBtvLike = btvTracks_cfi.btvTrackRefs.clone()
50 ak4JetTracksAssociatorAtVertexPFAll = ak4JTA_cff.ak4JetTracksAssociatorAtVertexPF.clone(
54 import CommonTools.RecoAlgos.jetTracksAssociationToTrackRefs_cfi
as jetTracksAssociationToTrackRefs_cfi
55 cutsRecoTracksAK4PFJets = jetTracksAssociationToTrackRefs_cfi.jetTracksAssociationToTrackRefs.clone(
56 association =
"ak4JetTracksAssociatorAtVertexPFAll",
63 trackingParticlesSignal = _trackingParticleSelector.clone(
72 tpClusterProducerSignal = tpClusterProducer.clone(
73 trackingParticleSrc =
"trackingParticlesSignal"
75 quickTrackAssociatorByHitsSignal = quickTrackAssociatorByHits.clone(
76 cluster2TPSrc =
"tpClusterProducerSignal"
78 trackingParticleRecoTrackAsssociationSignal = trackingParticleRecoTrackAsssociation.clone(
79 label_tp =
"trackingParticlesSignal",
80 associator =
"quickTrackAssociatorByHitsSignal"
85 trackRefsForValidation = cms.EDProducer(
"ChargedRefCandidateProducer",
86 particleType = cms.string(
'pi+'),
87 src = cms.InputTag(
"generalTracks")
90 trackRefsFromPV = _sortedPrimaryVertices.clone(
91 particles =
"trackRefsForValidation",
92 produceAssociationToOriginalVertices =
True,
93 produceNoPileUpCollection =
True,
94 produceSortedVertices =
False,
96 vertices =
"offlinePrimaryVertices"
99 generalTracksFromPV = _recoChargedRefCandidateToTrackRefProducer.clone(
100 src = cms.InputTag(
"trackRefsFromPV",
"originalNoPileUp")
103 cutsRecoTracksFromPVInitialStep = cutsRecoTracksInitialStep.clone(src=
"generalTracksFromPV")
104 cutsRecoTracksFromPVLowPtTripletStep = cutsRecoTracksLowPtTripletStep.clone(src=
"generalTracksFromPV")
105 cutsRecoTracksFromPVPixelPairStep = cutsRecoTracksPixelPairStep.clone(src=
"generalTracksFromPV")
106 cutsRecoTracksFromPVDetachedTripletStep = cutsRecoTracksDetachedTripletStep.clone(src=
"generalTracksFromPV")
107 cutsRecoTracksFromPVMixedTripletStep = cutsRecoTracksMixedTripletStep.clone(src=
"generalTracksFromPV")
108 cutsRecoTracksFromPVPixelLessStep = cutsRecoTracksPixelLessStep.clone(src=
"generalTracksFromPV")
109 cutsRecoTracksFromPVTobTecStep = cutsRecoTracksTobTecStep.clone(src=
"generalTracksFromPV")
110 cutsRecoTracksFromPVJetCoreRegionalStep = cutsRecoTracksJetCoreRegionalStep.clone(src=
"generalTracksFromPV")
111 cutsRecoTracksFromPVMuonSeededStepInOut = cutsRecoTracksMuonSeededStepInOut.clone(src=
"generalTracksFromPV")
112 cutsRecoTracksFromPVMuonSeededStepOutIn = cutsRecoTracksMuonSeededStepOutIn.clone(src=
"generalTracksFromPV")
114 cutsRecoTracksFromPVHp = cutsRecoTracksHp.clone(src=
"generalTracksFromPV")
115 cutsRecoTracksFromPVInitialStepHp = cutsRecoTracksInitialStepHp.clone(src=
"generalTracksFromPV")
116 cutsRecoTracksFromPVLowPtTripletStepHp = cutsRecoTracksLowPtTripletStepHp.clone(src=
"generalTracksFromPV")
117 cutsRecoTracksFromPVPixelPairStepHp = cutsRecoTracksPixelPairStepHp.clone(src=
"generalTracksFromPV")
118 cutsRecoTracksFromPVDetachedTripletStepHp = cutsRecoTracksDetachedTripletStepHp.clone(src=
"generalTracksFromPV")
119 cutsRecoTracksFromPVMixedTripletStepHp = cutsRecoTracksMixedTripletStepHp.clone(src=
"generalTracksFromPV")
120 cutsRecoTracksFromPVPixelLessStepHp = cutsRecoTracksPixelLessStepHp.clone(src=
"generalTracksFromPV")
121 cutsRecoTracksFromPVTobTecStepHp = cutsRecoTracksTobTecStepHp.clone(src=
"generalTracksFromPV")
122 cutsRecoTracksFromPVJetCoreRegionalStepHp = cutsRecoTracksJetCoreRegionalStepHp.clone(src=
"generalTracksFromPV")
123 cutsRecoTracksFromPVMuonSeededStepInOutHp = cutsRecoTracksMuonSeededStepInOutHp.clone(src=
"generalTracksFromPV")
124 cutsRecoTracksFromPVMuonSeededStepOutInHp = cutsRecoTracksMuonSeededStepOutInHp.clone(src=
"generalTracksFromPV")
128 trackValidator= Validation.RecoTrack.MultiTrackValidator_cfi.multiTrackValidator.clone()
130 trackValidator.label=cms.VInputTag(cms.InputTag(
"generalTracks"),
131 cms.InputTag(
"cutsRecoTracksHp"),
132 cms.InputTag(
"cutsRecoTracksInitialStep"),
133 cms.InputTag(
"cutsRecoTracksInitialStepHp"),
134 cms.InputTag(
"cutsRecoTracksLowPtTripletStep"),
135 cms.InputTag(
"cutsRecoTracksLowPtTripletStepHp"),
136 cms.InputTag(
"cutsRecoTracksPixelPairStep"),
137 cms.InputTag(
"cutsRecoTracksPixelPairStepHp"),
138 cms.InputTag(
"cutsRecoTracksDetachedTripletStep"),
139 cms.InputTag(
"cutsRecoTracksDetachedTripletStepHp"),
140 cms.InputTag(
"cutsRecoTracksMixedTripletStep"),
141 cms.InputTag(
"cutsRecoTracksMixedTripletStepHp"),
142 cms.InputTag(
"cutsRecoTracksPixelLessStep"),
143 cms.InputTag(
"cutsRecoTracksPixelLessStepHp"),
144 cms.InputTag(
"cutsRecoTracksTobTecStep"),
145 cms.InputTag(
"cutsRecoTracksTobTecStepHp"),
146 cms.InputTag(
"cutsRecoTracksJetCoreRegionalStep"),
147 cms.InputTag(
"cutsRecoTracksJetCoreRegionalStepHp"),
148 cms.InputTag(
"cutsRecoTracksMuonSeededStepInOut"),
149 cms.InputTag(
"cutsRecoTracksMuonSeededStepInOutHp"),
150 cms.InputTag(
"cutsRecoTracksMuonSeededStepOutIn"),
151 cms.InputTag(
"cutsRecoTracksMuonSeededStepOutInHp"),
152 cms.InputTag(
"cutsRecoTracksBtvLike"),
153 cms.InputTag(
"cutsRecoTracksAK4PFJets"),
155 trackValidator.useLogPt=cms.untracked.bool(
True)
156 trackValidator.dodEdxPlots =
True
157 trackValidator.doPVAssociationPlots =
True
162 from Configuration.StandardSequences.Eras
import eras
163 if eras.fastSim.isChosen():
164 trackValidator.dodEdxPlots =
False
168 trackValidatorFromPV = trackValidator.clone(
169 dirName =
"Tracking/TrackFromPV/",
171 "generalTracksFromPV",
172 "cutsRecoTracksFromPVHp",
174 label_tp_effic =
"trackingParticlesSignal",
175 label_tp_fake =
"trackingParticlesSignal",
176 associators = [
"trackingParticleRecoTrackAsssociationSignal"],
177 trackCollectionForDrCalculation =
"generalTracksFromPV",
178 doPlotsOnlyForTruePV =
True,
179 doPVAssociationPlots =
False,
181 trackValidatorFromPVStandalone = trackValidatorFromPV.clone()
182 trackValidatorFromPVStandalone.label.extend([
183 "cutsRecoTracksFromPVInitialStep",
184 "cutsRecoTracksFromPVInitialStepHp",
185 "cutsRecoTracksFromPVLowPtTripletStep",
186 "cutsRecoTracksFromPVLowPtTripletStepHp",
187 "cutsRecoTracksFromPVPixelPairStep",
188 "cutsRecoTracksFromPVPixelPairStepHp",
189 "cutsRecoTracksFromPVDetachedTripletStep",
190 "cutsRecoTracksFromPVDetachedTripletStepHp",
191 "cutsRecoTracksFromPVMixedTripletStep",
192 "cutsRecoTracksFromPVMixedTripletStepHp",
193 "cutsRecoTracksFromPVPixelLessStep",
194 "cutsRecoTracksFromPVPixelLessStepHp",
195 "cutsRecoTracksFromPVTobTecStep",
196 "cutsRecoTracksFromPVTobTecStepHp",
197 "cutsRecoTracksFromPVJetCoreRegionalStep",
198 "cutsRecoTracksFromPVJetCoreRegionalStepHp",
199 "cutsRecoTracksFromPVMuonSeededStepInOut",
200 "cutsRecoTracksFromPVMuonSeededStepInOutHp",
201 "cutsRecoTracksFromPVMuonSeededStepOutIn",
202 "cutsRecoTracksFromPVMuonSeededStepOutInHp",
207 trackValidatorFromPVAllTP = trackValidatorFromPV.clone(
208 dirName =
"Tracking/TrackFromPVAllTP/",
209 label_tp_effic = trackValidator.label_tp_effic.value(),
210 label_tp_fake = trackValidator.label_tp_fake.value(),
211 associators = trackValidator.associators.value(),
213 doSimTrackPlots =
False,
215 trackValidatorFromPVAllTPStandalone = trackValidatorFromPVAllTP.clone(
216 label = trackValidatorFromPVStandalone.label.value()
220 trackValidatorAllTPEffic = trackValidator.clone(
221 dirName =
"Tracking/TrackAllTPEffic/",
227 doRecoTrackPlots =
False,
228 doPVAssociationPlots =
False,
230 trackValidatorAllTPEffic.histoProducerAlgoBlock.generalTpSelector.signalOnly =
False
231 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsEta.signalOnly =
False
232 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPhi.signalOnly =
False
233 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPt.signalOnly =
False
234 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXR.signalOnly =
False
235 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXZ.signalOnly =
False
236 trackValidatorAllTPEfficStandalone = trackValidatorAllTPEffic.clone(
237 label = trackValidator.label.value()
242 tracksValidationSelectors = cms.Sequence(
244 cutsRecoTracksInitialStep*
245 cutsRecoTracksInitialStepHp*
246 cutsRecoTracksLowPtTripletStep*
247 cutsRecoTracksLowPtTripletStepHp*
248 cutsRecoTracksPixelPairStep*
249 cutsRecoTracksPixelPairStepHp*
250 cutsRecoTracksDetachedTripletStep*
251 cutsRecoTracksDetachedTripletStepHp*
252 cutsRecoTracksMixedTripletStep*
253 cutsRecoTracksMixedTripletStepHp*
254 cutsRecoTracksPixelLessStep*
255 cutsRecoTracksPixelLessStepHp*
256 cutsRecoTracksTobTecStep*
257 cutsRecoTracksTobTecStepHp*
258 cutsRecoTracksJetCoreRegionalStep*
259 cutsRecoTracksJetCoreRegionalStepHp*
260 cutsRecoTracksMuonSeededStepInOut*
261 cutsRecoTracksMuonSeededStepInOutHp*
262 cutsRecoTracksMuonSeededStepOutIn*
263 cutsRecoTracksMuonSeededStepOutInHp*
264 cutsRecoTracksBtvLike*
265 ak4JetTracksAssociatorAtVertexPFAll*
266 cutsRecoTracksAK4PFJets
268 tracksValidationSelectorsFromPV = cms.Sequence(
269 trackRefsForValidation*
272 cutsRecoTracksFromPVHp
274 tracksValidationSelectorsFromPVStandalone = cms.Sequence(
275 cutsRecoTracksFromPVInitialStep*
276 cutsRecoTracksFromPVInitialStepHp*
277 cutsRecoTracksFromPVLowPtTripletStep*
278 cutsRecoTracksFromPVLowPtTripletStepHp*
279 cutsRecoTracksFromPVPixelPairStep*
280 cutsRecoTracksFromPVPixelPairStepHp*
281 cutsRecoTracksFromPVDetachedTripletStep*
282 cutsRecoTracksFromPVDetachedTripletStepHp*
283 cutsRecoTracksFromPVMixedTripletStep*
284 cutsRecoTracksFromPVMixedTripletStepHp*
285 cutsRecoTracksFromPVPixelLessStep*
286 cutsRecoTracksFromPVPixelLessStepHp*
287 cutsRecoTracksFromPVTobTecStep*
288 cutsRecoTracksFromPVTobTecStepHp*
289 cutsRecoTracksFromPVJetCoreRegionalStep*
290 cutsRecoTracksFromPVJetCoreRegionalStepHp*
291 cutsRecoTracksFromPVMuonSeededStepInOut*
292 cutsRecoTracksFromPVMuonSeededStepInOutHp*
293 cutsRecoTracksFromPVMuonSeededStepOutIn*
294 cutsRecoTracksFromPVMuonSeededStepOutInHp
296 tracksValidationTruth = cms.Sequence(
298 quickTrackAssociatorByHits +
299 trackingParticleRecoTrackAsssociation +
300 VertexAssociatorByPositionAndTracks
303 tracksValidationTruthSignal = cms.Sequence(
304 cms.ignore(trackingParticlesSignal) +
305 tpClusterProducerSignal +
306 quickTrackAssociatorByHitsSignal +
307 trackingParticleRecoTrackAsssociationSignal
310 if eras.fastSim.isChosen():
311 tracksValidationTruth.remove(tpClusterProducer)
312 tracksValidationTruthSignal.remove(tpClusterProducerSignal)
315 tracksPreValidation = cms.Sequence(
316 tracksValidationSelectors +
317 tracksValidationSelectorsFromPV +
318 tracksValidationTruth +
319 tracksValidationTruthSignal
321 tracksPreValidationStandalone = cms.Sequence(
322 tracksPreValidation +
323 tracksValidationSelectorsFromPVStandalone
327 tracksValidation = cms.Sequence(
329 trackValidatorFromPV +
330 trackValidatorFromPVAllTP +
331 trackValidatorAllTPEffic
334 tracksValidationStandalone = cms.Sequence(
335 ak4PFL1FastL2L3CorrectorChain+
336 tracksPreValidationStandalone+
338 trackValidatorFromPVStandalone +
339 trackValidatorFromPVAllTPStandalone +
340 trackValidatorAllTPEfficStandalone
344 tracksValidationSelectorsSlim = tracksValidationSelectors.copyAndExclude([cutsRecoTracksBtvLike,ak4JetTracksAssociatorAtVertexPFAll,cutsRecoTracksAK4PFJets])
346 tracksPreValidationSlim = cms.Sequence(
347 tracksValidationSelectorsSlim +
348 tracksValidationTruth
351 trackValidatorSlim = trackValidator.clone(
352 doPVAssociationPlots = cms.untracked.bool(
False),
355 for _label
in [cms.InputTag(
"cutsRecoTracksBtvLike"),cms.InputTag(
"cutsRecoTracksAK4PFJets")]:
356 trackValidatorSlim.label.remove(_label)
358 tracksValidationSlim = cms.Sequence(
359 tracksPreValidationSlim+