CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackValidation_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
7 from Validation.RecoTrack.trajectorySeedTracks_cfi import trajectorySeedTracks as _trajectorySeedTracks
11 import cutsRecoTracks_cfi
12 
15 from PhysicsTools.RecoAlgos.trackingParticleSelector_cfi import trackingParticleSelector as _trackingParticleSelector
16 from CommonTools.RecoAlgos.trackingParticleConversionSelector_cfi import trackingParticleConversionSelector as _trackingParticleConversionSelector
17 from CommonTools.RecoAlgos.sortedPrimaryVertices_cfi import sortedPrimaryVertices as _sortedPrimaryVertices
18 from CommonTools.RecoAlgos.recoChargedRefCandidateToTrackRefProducer_cfi import recoChargedRefCandidateToTrackRefProducer as _recoChargedRefCandidateToTrackRefProducer
19 
20 from Configuration.StandardSequences.Eras import eras
21 
22 ### First define the stuff for the standard validation sequence
23 ## Track selectors
24 _algos = [
25  "generalTracks",
26  "initialStep",
27  "lowPtTripletStep",
28  "pixelPairStep",
29  "detachedTripletStep",
30  "mixedTripletStep",
31  "pixelLessStep",
32  "tobTecStep",
33  "jetCoreRegionalStep",
34  "muonSeededStepInOut",
35  "muonSeededStepOutIn",
36  "duplicateMerge",
37 ]
38 _algosForPhase1Pixel = [
39  "generalTracks",
40  "initialStep",
41  "highPtTripletStep",
42  "lowPtQuadStep",
43  "lowPtTripletStep",
44  "detachedQuadStep",
45  "mixedTripletStep",
46  "pixelPairStep",
47  "tobTecStep",
48  "muonSeededStepInOut",
49  "muonSeededStepOutIn",
50  ]
51 
52 _seedProducers = [
53  "initialStepSeedsPreSplitting",
54  "initialStepSeeds",
55  "detachedTripletStepSeeds",
56  "lowPtTripletStepSeeds",
57  "pixelPairStepSeeds",
58  "mixedTripletStepSeedsA",
59  "mixedTripletStepSeedsB",
60  "pixelLessStepSeeds",
61  "tobTecStepSeedsPair",
62  "tobTecStepSeedsTripl",
63  "jetCoreRegionalStepSeeds",
64  "muonSeededSeedsInOut",
65  "muonSeededSeedsOutIn",
66 ]
67 
68 _removeForFastSimSeedProducers =["initialStepSeedsPreSplitting",
69  "jetCoreRegionalStepSeeds",
70  "muonSeededSeedsInOut",
71  "muonSeededSeedsOutIn"]
72 _seedProducersForFastSim = [ x for x in _seedProducers if x not in _removeForFastSimSeedProducers]
73 
74 
75 _seedProducersForPhase1Pixel = [
76  "initialStepSeeds",
77  "highPtTripletStepSeeds",
78  "lowPtQuadStepSeeds",
79  "lowPtTripletStepSeeds",
80  "detachedQuadStepSeeds",
81  "mixedTripletStepSeedsA",
82  "mixedTripletStepSeedsB",
83  "pixelPairStepSeeds",
84  "tobTecStepSeeds",
85  "muonSeededSeedsInOut",
86  "muonSeededSeedsOutIn",
87  ]
88 
89 
90 _trackProducers = [
91  "initialStepTracksPreSplitting",
92  "initialStepTracks",
93  "lowPtTripletStepTracks",
94  "pixelPairStepTracks",
95  "detachedTripletStepTracks",
96  "mixedTripletStepTracks",
97  "pixelLessStepTracks",
98  "tobTecStepTracks",
99  "jetCoreRegionalStepTracks",
100  "muonSeededTracksInOut",
101  "muonSeededTracksOutIn",
102 ]
103 _removeForFastTrackProducers = ["initialStepTracksPreSplitting",
104  "jetCoreRegionalStepTracks",
105  "muonSeededTracksInOut",
106  "muonSeededTracksOutIn"]
107 _trackProducersForFastSim = [ x for x in _trackProducers if x not in _removeForFastTrackProducers]
108 
109 _trackProducersForPhase1Pixel = [
110  "initialStepTracks",
111  "highPtTripletStepTracks",
112  "lowPtQuadStepTracks",
113  "lowPtTripletStepTracks",
114  "detachedQuadStepTracks",
115  "mixedTripletStepTracks",
116  "pixelPairStepTracks",
117  "tobTecStepTracks",
118  "muonSeededTracksInOut",
119  "muonSeededTracksOutIn",
120 ]
121 
122 def _algoToSelector(algo):
123  sel = ""
124  if algo != "generalTracks":
125  sel = algo[0].upper()+algo[1:]
126  return "cutsRecoTracks"+sel
127 
128 def _addSelectorsByAlgo(algos, modDict):
129  names = []
130  seq = cms.Sequence()
131  for algo in algos:
132  if algo == "generalTracks":
133  continue
134  modName = _algoToSelector(algo)
135  if modName not in modDict:
136  mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(algorithm=[algo])
137  modDict[modName] = mod
138  else:
139  mod = modDict[modName]
140  names.append(modName)
141  seq += mod
142  return (names, seq)
143 def _addSelectorsByHp(algos, modDict):
144  seq = cms.Sequence()
145  names = []
146  for algo in algos:
147  modName = _algoToSelector(algo)
148  modNameHp = modName+"Hp"
149  if modNameHp not in modDict:
150  if algo == "generalTracks":
151  mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(quality=["highPurity"])
152  else:
153  mod = modDict[modName].clone(quality=["highPurity"])
154  modDict[modNameHp] = mod
155  else:
156  mod = modDict[modNameHp]
157  names.append(modNameHp)
158  seq += mod
159  return (names, seq)
160 def _addSelectorsBySrc(modules, midfix, src, modDict):
161  seq = cms.Sequence()
162  names = []
163  for modName in modules:
164  modNameNew = modName.replace("cutsRecoTracks", "cutsRecoTracks"+midfix)
165  if modNameNew not in modDict:
166  mod = modDict[modName].clone(src=src)
167  modDict[modNameNew] = mod
168  else:
169  mod = modDict[modNameNew]
170  names.append(modNameNew)
171  seq += mod
172  return (names, seq)
173 def _addSelectorsByOriginalAlgoMask(modules, midfix, algoParam,modDict):
174  seq = cms.Sequence()
175  names = []
176  for modName in modules:
177  if modName[-2:] == "Hp":
178  modNameNew = modName[:-2] + midfix + "Hp"
179  else:
180  modNameNew = modName + midfix
181  if modNameNew not in modDict:
182  mod = modDict[modName].clone()
183  setattr(mod, algoParam, mod.algorithm.value())
184  mod.algorithm = []
185  modDict[modNameNew] = mod
186  else:
187  mod = modDict[modNameNew]
188  names.append(modNameNew)
189  seq += mod
190  return (names, seq)
191 def _addSeedToTrackProducers(seedProducers,modDict):
192  names = []
193  seq = cms.Sequence()
194  for seed in seedProducers:
195  modName = "seedTracks"+seed
196  if modName not in modDict:
197  mod = _trajectorySeedTracks.clone(src=seed)
198  globals()[modName] = mod
199  else:
200  mod = modDict[modName]
201  names.append(modName)
202  seq += mod
203  return (names, seq)
204 
205 # Validation iterative steps
206 (_selectorsByAlgo, tracksValidationSelectorsByAlgo) = _addSelectorsByAlgo(_algos, globals())
207 (_selectorsByAlgo_phase1Pixel, _tracksValidationSelectorsByAlgo_phase1Pixel) = _addSelectorsByAlgo(_algosForPhase1Pixel, globals())
208 eras.phase1Pixel.toReplaceWith(tracksValidationSelectorsByAlgo, _tracksValidationSelectorsByAlgo_phase1Pixel)
209 
210 # high purity
211 (_selectorsByAlgoHp, tracksValidationSelectorsByAlgoHp) = _addSelectorsByHp(_algos,globals())
212 (_selectorsByAlgoHp_phase1Pixel, _tracksValidationSelectorsByAlgoHp_phase1Pixel) = _addSelectorsByHp(_algosForPhase1Pixel,globals())
213 eras.phase1Pixel.toReplaceWith(tracksValidationSelectorsByAlgoHp, _tracksValidationSelectorsByAlgoHp_phase1Pixel)
214 
215 _generalTracksHp = _selectorsByAlgoHp[0]
216 _generalTracksHp_phase1Pixel = _selectorsByAlgoHp_phase1Pixel[0]
217 _selectorsByAlgoHp = _selectorsByAlgoHp[1:]
218 _selectorsByAlgoHp_phase1Pixel = _selectorsByAlgoHp_phase1Pixel[1:]
219 
220 # BTV-like selection
221 import PhysicsTools.RecoAlgos.btvTracks_cfi as btvTracks_cfi
222 cutsRecoTracksBtvLike = btvTracks_cfi.btvTrackRefs.clone()
223 
224 # Select tracks associated to AK4 jets
226 ak4JetTracksAssociatorExplicitAll = ak4JTA_cff.ak4JetTracksAssociatorExplicit.clone(
227  jets = "ak4PFJets"
228 )
230 import CommonTools.RecoAlgos.jetTracksAssociationToTrackRefs_cfi as jetTracksAssociationToTrackRefs_cfi
231 cutsRecoTracksAK4PFJets = jetTracksAssociationToTrackRefs_cfi.jetTracksAssociationToTrackRefs.clone(
232  association = "ak4JetTracksAssociatorExplicitAll",
233  jets = "ak4PFJets",
234  correctedPtMin = 10,
235 )
236 
237 
238 ## Select signal TrackingParticles, and do the corresponding associations
239 trackingParticlesSignal = _trackingParticleSelector.clone(
240  signalOnly = True,
241  chargedOnly = False,
242  tip = 1e5,
243  lip = 1e5,
244  minRapidity = -10,
245  maxRapidity = 10,
246  ptMin = 0,
247 )
248 tpClusterProducerSignal = tpClusterProducer.clone(
249  trackingParticleSrc = "trackingParticlesSignal"
250 )
251 quickTrackAssociatorByHitsSignal = quickTrackAssociatorByHits.clone(
252  cluster2TPSrc = "tpClusterProducerSignal"
253 )
254 trackingParticleRecoTrackAsssociationSignal = trackingParticleRecoTrackAsssociation.clone(
255  label_tp = "trackingParticlesSignal",
256  associator = "quickTrackAssociatorByHitsSignal"
257 )
258 
259 # select tracks from the PV
260 from CommonTools.RecoAlgos.TrackWithVertexRefSelector_cfi import trackWithVertexRefSelector as _trackWithVertexRefSelector
261 generalTracksFromPV = _trackWithVertexRefSelector.clone(
262  src = "generalTracks",
263  ptMin = 0,
264  ptMax = 1e10,
265  ptErrorCut = 1e10,
266  quality = "loose",
267  vertexTag = "offlinePrimaryVertices",
268  nVertices = 1,
269  vtxFallback = False,
270  zetaVtx = 0.1, # 1 mm
271  rhoVtx = 1e10, # intentionally no dxy cut
272 )
273 # and then the selectors
274 (_selectorsFromPV, tracksValidationSelectorsFromPV) = _addSelectorsBySrc([_generalTracksHp], "FromPV", "generalTracksFromPV", globals())
275 tracksValidationSelectorsFromPV.insert(0, generalTracksFromPV)
276 (_selectorsFromPV_phase1Pixel, _tracksValidationSelectorsFromPV_phase1Pixel) = _addSelectorsBySrc([_generalTracksHp_phase1Pixel], "FromPV", "generalTracksFromPV", globals())
277 _tracksValidationSelectorsFromPV_phase1Pixel.insert(0, generalTracksFromPV)
278 eras.phase1Pixel.toReplaceWith(tracksValidationSelectorsFromPV, _tracksValidationSelectorsFromPV_phase1Pixel)
279 
280 ## Select conversion TrackingParticles, and define the corresponding associator
281 # (do not use associations because the collections of interest are not subsets of each other)
282 trackingParticlesConversion = _trackingParticleConversionSelector.clone()
283 tpClusterProducerConversion = tpClusterProducer.clone(
284  trackingParticleSrc = "trackingParticlesConversion",
285 )
286 quickTrackAssociatorByHitsConversion = quickTrackAssociatorByHits.clone(
287  cluster2TPSrc = "tpClusterProducerConversion"
288 )
289 
290 
291 ## MTV instances
292 trackValidator = Validation.RecoTrack.MultiTrackValidator_cfi.multiTrackValidator.clone(
293  label = ["generalTracks", _generalTracksHp] + _selectorsByAlgo + _selectorsByAlgoHp + [
294  "cutsRecoTracksBtvLike",
295  "cutsRecoTracksAK4PFJets"],
296  useLogPt = cms.untracked.bool(True),
297  dodEdxPlots = True,
298  doPVAssociationPlots = True
299  #,minpT = cms.double(-1)
300  #,maxpT = cms.double(3)
301  #,nintpT = cms.int32(40)
302 )
303 eras.fastSim.toModify(trackValidator,
304  dodEdxPlots = False)
305 eras.phase1Pixel.toModify(trackValidator,
306  label = ["generalTracks", _generalTracksHp_phase1Pixel] + _selectorsByAlgo_phase1Pixel + _selectorsByAlgoHp_phase1Pixel + [
307  "cutsRecoTracksBtvLike",
308  "cutsRecoTracksAK4PFJets"])
309 
310 # For efficiency of signal TPs vs. signal tracks, and fake rate of
311 # signal tracks vs. signal TPs
312 trackValidatorFromPV = trackValidator.clone(
313  dirName = "Tracking/TrackFromPV/",
314  label = ["generalTracksFromPV"]+_selectorsFromPV,
315  label_tp_effic = "trackingParticlesSignal",
316  label_tp_fake = "trackingParticlesSignal",
317  associators = ["trackingParticleRecoTrackAsssociationSignal"],
318  trackCollectionForDrCalculation = "generalTracksFromPV",
319  doPlotsOnlyForTruePV = True,
320  doPVAssociationPlots = False,
321 )
322 eras.phase1Pixel.toModify(trackValidatorFromPV, label = ["generalTracksFromPV"]+_selectorsFromPV_phase1Pixel)
323 
324 # For fake rate of signal tracks vs. all TPs, and pileup rate of
325 # signal tracks vs. non-signal TPs
326 trackValidatorFromPVAllTP = trackValidatorFromPV.clone(
327  dirName = "Tracking/TrackFromPVAllTP/",
328  label_tp_effic = trackValidator.label_tp_effic.value(),
329  label_tp_fake = trackValidator.label_tp_fake.value(),
330  associators = trackValidator.associators.value(),
331  doSimPlots = False,
332  doSimTrackPlots = False,
333 )
334 
335 # For efficiency of all TPs vs. all tracks
336 trackValidatorAllTPEffic = trackValidator.clone(
337  dirName = "Tracking/TrackAllTPEffic/",
338  label = [
339  "generalTracks",
340  _generalTracksHp,
341  ],
342  doSimPlots = False,
343  doRecoTrackPlots = False, # Fake rate of all tracks vs. all TPs is already included in trackValidator
344  doPVAssociationPlots = False,
345 )
346 trackValidatorAllTPEffic.histoProducerAlgoBlock.generalTpSelector.signalOnly = False
347 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsEta.signalOnly = False
348 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPhi.signalOnly = False
349 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPt.signalOnly = False
350 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXR.signalOnly = False
351 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXZ.signalOnly = False
352 eras.phase1Pixel.toModify(trackValidatorAllTPEffic, label = ["generalTracks", _generalTracksHp_phase1Pixel])
353 
354 # For conversions
355 trackValidatorConversion = trackValidator.clone(
356  dirName = "Tracking/TrackConversion/",
357  label = [
358  "convStepTracks",
359  "conversionStepTracks",
360  "ckfInOutTracksFromConversions",
361  "ckfOutInTracksFromConversions",
362  ],
363  label_tp_effic = "trackingParticlesConversion",
364  label_tp_fake = "trackingParticlesConversion",
365  associators = ["quickTrackAssociatorByHitsConversion"],
366  UseAssociators = True,
367  doSimPlots = True,
368  dodEdxPlots = False,
369  doPVAssociationPlots = False,
370  calculateDrSingleCollection = False,
371 )
372 # relax lip and tip
373 for n in ["Eta", "Phi", "Pt", "VTXR", "VTXZ"]:
374  pset = getattr(trackValidatorConversion.histoProducerAlgoBlock, "TpSelectorForEfficiencyVs"+n)
375  pset.lip = trackValidatorConversion.lipTP.value()
376  pset.tip = trackValidatorConversion.tipTP.value()
377 
378 
379 # the track selectors
380 tracksValidationSelectors = cms.Sequence(
381  tracksValidationSelectorsByAlgo +
382  tracksValidationSelectorsByAlgoHp +
383  cutsRecoTracksBtvLike +
384  ak4JetTracksAssociatorExplicitAll +
385  cutsRecoTracksAK4PFJets
386 )
387 tracksValidationTruth = cms.Sequence(
388  tpClusterProducer +
389  quickTrackAssociatorByHits +
390  trackingParticleRecoTrackAsssociation +
391  VertexAssociatorByPositionAndTracks
392 )
393 eras.fastSim.toModify(tracksValidationTruth, lambda x: x.remove(tpClusterProducer))
394 
395 tracksValidationTruthSignal = cms.Sequence(
396  cms.ignore(trackingParticlesSignal) +
397  tpClusterProducerSignal +
398  quickTrackAssociatorByHitsSignal +
399  trackingParticleRecoTrackAsssociationSignal
400 )
401 eras.fastSim.toModify(tracksValidationTruthSignal, lambda x: x.remove(tpClusterProducerSignal))
402 
403 
404 tracksValidationTruthConversion = cms.Sequence(
405  trackingParticlesConversion +
406  tpClusterProducerConversion +
407  quickTrackAssociatorByHitsConversion
408 )
409 
410 tracksPreValidation = cms.Sequence(
411  tracksValidationSelectors +
412  tracksValidationSelectorsFromPV +
413  tracksValidationTruth +
414  tracksValidationTruthSignal +
415  tracksValidationTruthConversion
416 )
417 eras.fastSim.toModify(tracksPreValidation, lambda x: x.remove(tracksValidationTruthConversion))
418 
419 tracksValidation = cms.Sequence(
420  tracksPreValidation +
421  trackValidator +
422  trackValidatorFromPV +
423  trackValidatorFromPVAllTP +
424  trackValidatorAllTPEffic +
425  trackValidatorConversion
426 )
427 eras.fastSim.toModify(tracksValidation, lambda x: x.remove(trackValidatorConversion))
428 
429 
430 ### Then define stuff for standalone mode (i.e. MTV with RECO+DIGI input)
431 
432 # Select by originalAlgo and algoMask
433 _selectorsByAlgoAndHp = _selectorsByAlgo+_selectorsByAlgoHp
434 _selectorsByAlgoAndHp_phase1Pixel = _selectorsByAlgo_phase1Pixel+_selectorsByAlgoHp_phase1Pixel
435 (_selectorsByOriginalAlgo, tracksValidationSelectorsByOriginalAlgoStandalone) = _addSelectorsByOriginalAlgoMask(_selectorsByAlgoAndHp, "ByOriginalAlgo", "originalAlgorithm",globals())
436 (_selectorsByOriginalAlgo_phase1Pixel, _tracksValidationSelectorsByOriginalAlgoStandalone_phase1Pixel) = _addSelectorsByOriginalAlgoMask(_selectorsByAlgoAndHp_phase1Pixel, "ByOriginalAlgo", "originalAlgorithm",globals())
437 eras.phase1Pixel.toReplaceWith(tracksValidationSelectorsByOriginalAlgoStandalone, _tracksValidationSelectorsByOriginalAlgoStandalone_phase1Pixel)
438 
439 (_selectorsByAlgoMask, tracksValidationSelectorsByAlgoMaskStandalone) = _addSelectorsByOriginalAlgoMask(_selectorsByAlgoAndHp, "ByAlgoMask", "algorithmMaskContains",globals())
440 (_selectorsByAlgoMask_phase1Pixel, _tracksValidationSelectorsByAlgoMaskStandalone_phase1Pixel) = _addSelectorsByOriginalAlgoMask(_selectorsByAlgoAndHp_phase1Pixel, "ByAlgoMask", "algorithmMaskContains",globals())
441 eras.phase1Pixel.toReplaceWith(tracksValidationSelectorsByAlgoMaskStandalone, _tracksValidationSelectorsByAlgoMaskStandalone_phase1Pixel)
442 
443 # Select fromPV by iteration
444 (_selectorsFromPVStandalone, tracksValidationSelectorsFromPVStandalone) = _addSelectorsBySrc(_selectorsByAlgoAndHp, "FromPV", "generalTracksFromPV",globals())
445 (_selectorsFromPVStandalone_phase1Pixel, _tracksValidationSelectorsFromPVStandalone_phase1Pixel) = _addSelectorsBySrc(_selectorsByAlgoAndHp_phase1Pixel, "FromPV", "generalTracksFromPV",globals())
446 eras.phase1Pixel.toReplaceWith(tracksValidationSelectorsFromPVStandalone, _tracksValidationSelectorsFromPVStandalone_phase1Pixel)
447 
448 # MTV instances
449 trackValidatorStandalone = trackValidator.clone( label = trackValidator.label+ _selectorsByOriginalAlgo + _selectorsByAlgoMask)
450 eras.phase1Pixel.toModify(trackValidatorStandalone, label = trackValidator.label+ _selectorsByOriginalAlgo_phase1Pixel + _selectorsByAlgoMask_phase1Pixel)
451 
452 trackValidatorFromPVStandalone = trackValidatorFromPV.clone( label = trackValidatorFromPV.label+_selectorsFromPVStandalone)
453 eras.phase1Pixel.toModify(trackValidatorFromPVStandalone, label = trackValidatorFromPV.label+_selectorsFromPVStandalone_phase1Pixel)
454 
455 trackValidatorFromPVAllTPStandalone = trackValidatorFromPVAllTP.clone(
456  label = trackValidatorFromPVStandalone.label.value()
457 )
458 trackValidatorAllTPEfficStandalone = trackValidatorAllTPEffic.clone(
459  label = [ x for x in trackValidator.label.value() if x not in ["cutsRecoTracksBtvLike", "cutsRecoTracksAK4PFJets"]]
460 )
461 
462 trackValidatorConversionStandalone = trackValidatorConversion.clone( label = [x for x in trackValidatorConversion.label if x != "convStepTracks"])
463 
464 # sequences
465 tracksValidationSelectorsStandalone = cms.Sequence(
466  tracksValidationSelectorsByOriginalAlgoStandalone +
467  tracksValidationSelectorsByAlgoMaskStandalone +
468  tracksValidationSelectorsFromPVStandalone
469 )
470 
471 # we copy this for both Standalone and TrackingOnly
472 # and later make modifications from it which change based on era
473 _trackValidatorsBase = cms.Sequence(
474  trackValidatorStandalone +
475  trackValidatorFromPVStandalone +
476  trackValidatorFromPVAllTPStandalone +
477  trackValidatorAllTPEfficStandalone +
478  trackValidatorConversionStandalone
479 )
480 trackValidatorsStandalone = _trackValidatorsBase.copy()
481 eras.fastSim.toModify(trackValidatorsStandalone, lambda x: x.remove(trackValidatorConversionStandalone) )
482 
483 tracksValidationStandalone = cms.Sequence(
484  ak4PFL1FastL2L3CorrectorChain +
485  tracksPreValidation +
486  tracksValidationSelectorsStandalone +
487  trackValidatorsStandalone
488 )
489 
490 ### TrackingOnly mode (i.e. MTV with DIGI input + tracking-only reconstruction)
491 
492 # selectors
493 tracksValidationSelectorsTrackingOnly = tracksValidationSelectors.copyAndExclude([ak4JetTracksAssociatorExplicitAll,cutsRecoTracksAK4PFJets]) # selectors using track information only (i.e. no PF)
494 (_seedSelectors, tracksValidationSeedSelectorsTrackingOnly) = _addSeedToTrackProducers(_seedProducers, globals())
495 (_fastSimSeedSelectors, _fastSimTracksValidationSeedSelectorsTrackingOnly) = _addSeedToTrackProducers(_seedProducersForFastSim, globals())
496 (_phase1PixelSeedSelectors, _phase1PixelTracksValidationSeedSelectorsTrackingOnly) = _addSeedToTrackProducers(_seedProducersForPhase1Pixel, globals())
497 eras.fastSim.toReplaceWith(tracksValidationSeedSelectorsTrackingOnly, _fastSimTracksValidationSeedSelectorsTrackingOnly)
498 eras.phase1Pixel.toReplaceWith(tracksValidationSeedSelectorsTrackingOnly, _phase1PixelTracksValidationSeedSelectorsTrackingOnly)
499 
500 # MTV instances
501 trackValidatorTrackingOnly = trackValidatorStandalone.clone(label = [ x for x in trackValidatorStandalone.label if x != "cutsRecoTracksAK4PFJets"] )
502 
503 trackValidatorBuildingTrackingOnly = trackValidatorTrackingOnly.clone(
504  dirName = "Tracking/TrackBuilding/",
505  associators = ["quickTrackAssociatorByHits"],
506  UseAssociators = True,
507  label = _trackProducers,
508  dodEdxPlots = False,
509  doPVAssociationPlots = False,
510  doSimPlots = False,
511 )
512 
513 eras.fastSim.toModify(trackValidatorBuildingTrackingOnly, label = _trackProducersForFastSim )
514 eras.phase1Pixel.toModify(trackValidatorBuildingTrackingOnly, label = _trackProducersForPhase1Pixel)
515 
516 trackValidatorSeedingTrackingOnly = trackValidatorBuildingTrackingOnly.clone(
517  dirName = "Tracking/TrackSeeding/",
518  label = _seedSelectors,
519  doSeedPlots = True,
520 )
521 eras.fastSim.toModify(trackValidatorSeedingTrackingOnly, label= _fastSimSeedSelectors)
522 eras.phase1Pixel.toModify(trackValidatorSeedingTrackingOnly, label= _phase1PixelSeedSelectors)
523 
524 
525 trackValidatorConversionTrackingOnly = trackValidatorConversion.clone(label = [x for x in trackValidatorConversion.label if x not in ["ckfInOutTracksFromConversions", "ckfOutInTracksFromConversions"]])
526 
527 # sequences
528 tracksPreValidationTrackingOnly = tracksPreValidation.copy()
529 tracksPreValidationTrackingOnly.replace(tracksValidationSelectors, tracksValidationSelectorsTrackingOnly)
530 
531 trackValidatorsTrackingOnly = _trackValidatorsBase.copy()
532 trackValidatorsTrackingOnly.replace(trackValidatorStandalone, trackValidatorTrackingOnly)
533 trackValidatorsTrackingOnly += (
534  trackValidatorSeedingTrackingOnly +
535  trackValidatorBuildingTrackingOnly
536 )
537 trackValidatorsTrackingOnly.replace(trackValidatorConversionStandalone, trackValidatorConversionTrackingOnly)
538 eras.fastSim.toModify(trackValidatorsTrackingOnly, lambda x: x.remove(trackValidatorConversionTrackingOnly))
539 
540 
541 tracksValidationTrackingOnly = cms.Sequence(
542  tracksPreValidationTrackingOnly +
543  tracksValidationSelectorsStandalone +
544  tracksValidationSeedSelectorsTrackingOnly +
545  trackValidatorsTrackingOnly
546 )
547 
548 
549 
550 ### Lite mode (only generalTracks and HP)
551 trackValidatorLite = trackValidator.clone(
552  label = ["generalTracks", "cutsRecoTracksHp"]
553 )
554 tracksValidationLite = cms.Sequence(
555  cutsRecoTracksHp +
556  tracksValidationTruth +
557  trackValidatorLite
558 )
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135