CMS 3D CMS Logo

TrackValidation_cff.py
Go to the documentation of this file.
1 from __future__ import absolute_import
2 import FWCore.ParameterSet.Config as cms
3 
8 from Validation.RecoTrack.trajectorySeedTracks_cfi import trajectorySeedTracks as _trajectorySeedTracks
12 import Validation.RecoTrack.cutsRecoTracks_cfi as cutsRecoTracks_cfi
13 #from . import cutsRecoTracks_cfi
14 
17 from CommonTools.RecoAlgos.trackingParticleRefSelector_cfi import trackingParticleRefSelector as _trackingParticleRefSelector
18 from CommonTools.RecoAlgos.trackingParticleConversionRefSelector_cfi import trackingParticleConversionRefSelector as _trackingParticleConversionRefSelector
19 from SimTracker.TrackHistory.trackingParticleBHadronRefSelector_cfi import trackingParticleBHadronRefSelector as _trackingParticleBHadronRefSelector
21 from CommonTools.RecoAlgos.recoChargedRefCandidateToTrackRefProducer_cfi import recoChargedRefCandidateToTrackRefProducer as _recoChargedRefCandidateToTrackRefProducer
22 
23 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
24 import RecoTracker.IterativeTracking.iterativeTkUtils as _utils
25 from Configuration.Eras.Modifier_fastSim_cff import fastSim
26 import six
27 
28 
30 for _eraName, _postfix, _era in _cfg.allEras():
31  _seedProd = ["initialStepSeedsPreSplitting"]
32  _trackProd = ["initialStepTracksPreSplitting"]
33  if _eraName in ["trackingLowPU", "trackingPhase2PU140"]: # these don't have preSplitting
34  _seedProd = []
35  _trackProd = []
36 
37  locals()["_algos"+_postfix] = ["generalTracks"] + _cfg.iterationAlgos(_postfix) + ["duplicateMerge"]
38  locals()["_seedProducersPreSplitting"+_postfix] = _seedProd
39  locals()["_trackProducersPreSplitting"+_postfix] = _trackProd
40  locals()["_seedProducers"+_postfix] = _cfg.seedProducers(_postfix)
41  locals()["_trackProducers"+_postfix] = _cfg.trackProducers(_postfix)
42 
43  if _eraName != "trackingPhase2PU140":
44  locals()["_electronSeedProducers"+_postfix] = ["tripletElectronSeeds", "pixelPairElectronSeeds", "stripPairElectronSeeds"]
45  else:
46  locals()["_electronSeedProducers"+_postfix] = ["tripletElectronSeeds"]
47 
48 _removeForFastSimSeedProducers =["initialStepSeedsPreSplitting",
49  "jetCoreRegionalStepSeeds",
50  "muonSeededSeedsInOut",
51  "muonSeededSeedsOutIn"]
52 _seedProducers_fastSim = [ x for x in _seedProducers if x not in _removeForFastSimSeedProducers]
53 
54 _removeForFastTrackProducers = ["initialStepTracksPreSplitting",
55  "jetCoreRegionalStepTracks",
56  "muonSeededTracksInOut",
57  "muonSeededTracksOutIn"]
58 _trackProducers_fastSim = [ x for x in _trackProducers if x not in _removeForFastTrackProducers]
59 
60 def _algoToSelector(algo):
61  sel = ""
62  if algo != "generalTracks":
63  sel = algo[0].upper()+algo[1:]
64  return "cutsRecoTracks"+sel
65 
66 def _addSelectorsByAlgo(algos, modDict):
67  names = []
68  task = cms.Task()
69  for algo in algos:
70  if algo == "generalTracks":
71  continue
72  modName = _algoToSelector(algo)
73  if modName not in modDict:
74  mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(
75 # src = [src],
76  algorithm=[algo]
77  )
78  modDict[modName] = mod
79  else:
80  mod = modDict[modName]
81  names.append(modName)
82  task.add(mod)
83  return (names, task)
84 def _addSelectorsByHp(algos, modDict):
85  task = cms.Task()
86  names = []
87  for algo in algos:
88  modName = _algoToSelector(algo)
89  modNameHp = modName+"Hp"
90  if modNameHp not in modDict:
91  if algo == "generalTracks":
92  mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(quality=["highPurity"])
93  else:
94  mod = modDict[modName].clone(quality=["highPurity"])
95  modDict[modNameHp] = mod
96  else:
97  mod = modDict[modNameHp]
98  names.append(modNameHp)
99  task.add(mod)
100  return (names, task)
101 def _addSelectorsBySrc(modules, midfix, src, modDict):
102  task = cms.Task()
103  names = []
104  for modName in modules:
105  modNameNew = modName.replace("cutsRecoTracks", "cutsRecoTracks"+midfix)
106  if modNameNew not in modDict:
107  mod = modDict[modName].clone(src=src)
108  modDict[modNameNew] = mod
109  else:
110  mod = modDict[modNameNew]
111  names.append(modNameNew)
112  task.add(mod)
113  return (names, task)
114 def _addSelectorsByOriginalAlgoMask(modules, midfix, algoParam,modDict):
115  task = cms.Task()
116  names = []
117  for modName in modules:
118  if modName[-2:] == "Hp":
119  modNameNew = modName[:-2] + midfix + "Hp"
120  else:
121  modNameNew = modName + midfix
122  if modNameNew not in modDict:
123  mod = modDict[modName].clone()
124  setattr(mod, algoParam, mod.algorithm.value())
125  mod.algorithm = []
126  modDict[modNameNew] = mod
127  else:
128  mod = modDict[modNameNew]
129  names.append(modNameNew)
130  task.add(mod)
131  return (names, task)
132 def _addSeedToTrackProducers(seedProducers,modDict):
133  names = []
134  task = cms.Task()
135  for seed in seedProducers:
136  modName = "seedTracks"+seed
137  if modName not in modDict:
138  mod = _trajectorySeedTracks.clone(src=seed)
139  modDict[modName] = mod
140  else:
141  mod = modDict[modName]
142  names.append(modName)
143  task.add(mod)
144  return (names, task)
145 
146 _relevantEras = _cfg.allEras()
147 _relevantErasAndFastSim = _relevantEras + [("fastSim", "_fastSim", fastSim)]
148 def _translateArgs(args, postfix, modDict):
149  ret = []
150  for arg in args:
151  if isinstance(arg, list):
152  ret.append(_translateArgs(arg, postfix, modDict))
153  else:
154  ret.append(modDict[arg+postfix])
155  return ret
156 def _taskForEachEra(function, args, names, task, modDict, plainArgs=[], modifyTask=None, includeFastSim=False):
157  if task[0] != "_":
158  raise Exception("Task name is expected to begin with _")
159 
160  _eras = _relevantErasAndFastSim if includeFastSim else _relevantEras
161  for eraName, postfix, _era in _eras:
162  _args = _translateArgs(args, postfix, modDict)
163  _args.extend(plainArgs)
164  ret = function(*_args, modDict=modDict)
165  if len(ret) != 2:
166  raise Exception("_taskForEachEra is expected to return 2 values, but function returned %d" % len(ret))
167  modDict[names+postfix] = ret[0]
168  modDict[task+postfix] = ret[1]
169 
170  # The task of the first era will be the default one
171  defaultTaskName = task+_eras[0][0]
172  defaultTask = modDict[defaultTaskName]
173  modDict[defaultTaskName[1:]] = defaultTask # remove leading underscore
174 
175  # Optionally modify task before applying the era
176  if modifyTask is not None:
177  for eraName, postfix, _era in _eras:
178  modifyTask(modDict[task+postfix])
179 
180  # Apply eras
181  for _eraName, _postfix, _era in _eras[1:]:
182  _era.toReplaceWith(defaultTask, modDict[task+_postfix])
183 def _setForEra(module, eraName, era, **kwargs):
184  if eraName == "":
185  for key, value in six.iteritems(kwargs):
186  setattr(module, key, value)
187  else:
188  era.toModify(module, **kwargs)
189 
190 # Seeding layer sets
191 def _getSeedingLayers(seedProducers, config):
192  def _findSeedingLayers(name):
193  prod = getattr(config, name)
194  if hasattr(prod, "triplets"):
195  if hasattr(prod, "layerList"): # merger
196  return prod.layerList.refToPSet_.value()
197  return _findSeedingLayers(prod.triplets.getModuleLabel())
198  elif hasattr(prod, "doublets"):
199  return _findSeedingLayers(prod.doublets.getModuleLabel())
200  label = prod.trackingRegionsSeedingLayers.getModuleLabel()
201  if label != "":
202  return label
203  return prod.seedingLayers.getModuleLabel()
204 
205  seedingLayersMerged = []
206  for seedName in seedProducers:
207  seedProd = getattr(config, seedName)
208  seedingLayersName = None
209  seedingLayers = None
210  if hasattr(seedProd, "OrderedHitsFactoryPSet"): # old seeding framework
211  seedingLayersName = seedProd.OrderedHitsFactoryPSet.SeedingLayers.getModuleLabel()
212  elif hasattr(seedProd, "seedingHitSets"): # new seeding framework
213  seedingLayersName = _findSeedingLayers(seedProd.seedingHitSets.getModuleLabel())
214  elif hasattr(seedProd, "layerList"): # FastSim:
215  seedingLayers = seedProd.layerList.value()
216  else:
217  continue
218 
219  if seedingLayersName is not None:
220  seedingLayers = getattr(config, seedingLayersName).layerList.value()
221  for layerSet in seedingLayers:
222  if layerSet not in seedingLayersMerged:
223  seedingLayersMerged.append(layerSet)
224 
225  return seedingLayersMerged
226 import RecoTracker.IterativeTracking.iterativeTk_cff as _iterativeTk_cff
227 import RecoTracker.IterativeTracking.ElectronSeeds_cff as _ElectronSeeds_cff
228 for _eraName, _postfix, _era in _relevantErasAndFastSim:
229  _stdLayers = _getSeedingLayers(locals()["_seedProducers"+_postfix], _iterativeTk_cff)
230  _eleLayers = []
231  if "_electronSeedProducers"+_postfix in locals(): # doesn't exist for FastSim
232  for _layer in _getSeedingLayers(locals()["_electronSeedProducers"+_postfix], _ElectronSeeds_cff):
233  if _layer not in _stdLayers:
234  _eleLayers.append(_layer)
235 
236  locals()["_seedingLayerSets"+_postfix] = _stdLayers
237  locals()["_seedingLayerSetsForElectrons"+_postfix] = _eleLayers
238 
239 
240 # MVA selectors
241 def _getMVASelectors(postfix):
242  mvaSel = _utils.getMVASelectors(postfix)
243 
244  pset = cms.untracked.PSet()
245  for iteration, (trackProducer, classifiers) in six.iteritems(mvaSel):
246  setattr(pset, trackProducer, cms.untracked.vstring(classifiers))
247  return pset
248 for _eraName, _postfix, _era in _relevantEras:
249  locals()["_mvaSelectors"+_postfix] = _getMVASelectors(_postfix)
250 
251 # Validation iterative steps
252 _taskForEachEra(_addSelectorsByAlgo, args=["_algos"], names="_selectorsByAlgo", task="_tracksValidationSelectorsByAlgo", modDict=globals())
253 
254 # high purity
255 _taskForEachEra(_addSelectorsByHp, args=["_algos"], names="_selectorsByAlgoHp", task="_tracksValidationSelectorsByAlgoHp", modDict=globals())
256 
257 # by originalAlgo
258 for _eraName, _postfix, _era in _relevantEras:
259  locals()["_selectorsByAlgoAndHp"+_postfix] = locals()["_selectorsByAlgo"+_postfix] + locals()["_selectorsByAlgoHp"+_postfix]
260  # For ByAlgoMask
261  locals()["_selectorsByAlgoAndHpNoGenTk"+_postfix] = [n for n in locals()["_selectorsByAlgoAndHp"+_postfix] if n not in ["generalTracks", "cutsRecoTracksHp"]]
262  # For ByOriginalAlgo
263  locals()["_selectorsByAlgoAndHpNoGenTkDupMerge"+_postfix] = [n for n in locals()["_selectorsByAlgoAndHpNoGenTk"+_postfix] if n not in ["cutsRecoTracksDuplicateMerge", "cutsRecoTracksDuplicateMergeHp"]]
264 _taskForEachEra(_addSelectorsByOriginalAlgoMask, modDict = globals(),
265  args = ["_selectorsByAlgoAndHpNoGenTkDupMerge"], plainArgs = ["ByOriginalAlgo", "originalAlgorithm"],
266  names = "_selectorsByOriginalAlgo", task = "_tracksValidationSelectorsByOriginalAlgo")
267 
268 
269 for _eraName, _postfix, _era in _relevantEras:
270  selectors = locals()["_selectorsByAlgoHp"+_postfix]
271  locals()["_generalTracksHp"+_postfix] = selectors[0]
272  locals()["_selectorsByAlgoHp"+_postfix] = selectors[1:]
273 
274 # BTV-like selection
275 import PhysicsTools.RecoAlgos.btvTracks_cfi as btvTracks_cfi
276 cutsRecoTracksBtvLike = btvTracks_cfi.btvTrackRefs.clone()
277 
278 # Select tracks associated to AK4 jets
280 ak4JetTracksAssociatorExplicitAll = ak4JTA_cff.ak4JetTracksAssociatorExplicit.clone(
281  jets = "ak4PFJets"
282 )
284 import CommonTools.RecoAlgos.jetTracksAssociationToTrackRefs_cfi as jetTracksAssociationToTrackRefs_cfi
285 cutsRecoTracksAK4PFJets = jetTracksAssociationToTrackRefs_cfi.jetTracksAssociationToTrackRefs.clone(
286  association = "ak4JetTracksAssociatorExplicitAll",
287  jets = "ak4PFJets",
288  correctedPtMin = 10,
289 )
290 
291 
292 
293 trackingParticlesSignal = _trackingParticleRefSelector.clone(
294  signalOnly = True,
295  chargedOnly = False,
296  tip = 1e5,
297  lip = 1e5,
298  minRapidity = -10,
299  maxRapidity = 10,
300  ptMin = 0,
301 )
302 
303 # select tracks with pT > 0.9 GeV (for upgrade fake rates)
304 generalTracksPt09 = cutsRecoTracks_cfi.cutsRecoTracks.clone(ptMin=0.9)
305 # and then the selectors
306 _taskForEachEra(_addSelectorsBySrc, modDict=globals(),
307  args=[["_generalTracksHp"]],
308  plainArgs=["Pt09", "generalTracksPt09"],
309  names="_selectorsPt09", task="_tracksValidationSelectorsPt09",
310  modifyTask=lambda task:task.add(generalTracksPt09))
311 
312 # select tracks from the PV
313 from CommonTools.RecoAlgos.TrackWithVertexRefSelector_cfi import trackWithVertexRefSelector as _trackWithVertexRefSelector
314 generalTracksFromPV = _trackWithVertexRefSelector.clone(
315  src = "generalTracks",
316  ptMin = 0,
317  ptMax = 1e10,
318  ptErrorCut = 1e10,
319  quality = "loose",
320  vertexTag = "offlinePrimaryVertices",
321  nVertices = 1,
322  vtxFallback = False,
323  zetaVtx = 0.1, # 1 mm
324  rhoVtx = 1e10, # intentionally no dxy cut
325 )
326 # and then the selectors
327 _taskForEachEra(_addSelectorsBySrc, modDict=globals(),
328  args=[["_generalTracksHp"]],
329  plainArgs=["FromPV", "generalTracksFromPV"],
330  names="_selectorsFromPV", task="_tracksValidationSelectorsFromPV",
331  modifyTask=lambda task: task.add(generalTracksFromPV))
332 
333 # select tracks with pT > 0.9 GeV from the PV
334 generalTracksFromPVPt09 = generalTracksPt09.clone(src="generalTracksFromPV")
335 # and then the selectors
336 _taskForEachEra(_addSelectorsBySrc, modDict=globals(),
337  args=[["_generalTracksHp"]],
338  plainArgs=["FromPVPt09", "generalTracksFromPVPt09"],
339  names="_selectorsFromPVPt09", task="_tracksValidationSelectorsFromPVPt09",
340  modifyTask=lambda task: task.add(generalTracksFromPVPt09))
341 
342 
343 trackingParticlesConversion = _trackingParticleConversionRefSelector.clone()
344 
345 
346 trackingParticlesElectron = _trackingParticleRefSelector.clone(
347  pdgId = [-11, 11],
348  signalOnly = False,
349  tip = 1e5,
350  lip = 1e5,
351  minRapidity = -10,
352  maxRapidity = 10,
353  ptMin = 0,
354 )
355 
356 # Select jets for JetCore tracking
357 highPtJets = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4CaloJets"), cut = cms.string("pt()>1000"))
358 highPtJetsForTrk = highPtJetsForTrk = highPtJets.clone(src = "ak4CaloJetsForTrk")
359 
360 # Select B-hadron TPs
361 trackingParticlesBHadron = _trackingParticleBHadronRefSelector.clone()
362 
363 
364 trackValidator = Validation.RecoTrack.MultiTrackValidator_cfi.multiTrackValidator.clone(
365  useLogPt = cms.untracked.bool(True),
366  dodEdxPlots = True,
367  doPVAssociationPlots = True
368  #,minpT = cms.double(-1)
369  #,maxpT = cms.double(3)
370  #,nintpT = cms.int32(40)
371 )
372 fastSim.toModify(trackValidator,
373  dodEdxPlots = False)
374 
375 for _eraName, _postfix, _era in _relevantEras:
376  _setForEra(trackValidator, _eraName, _era,
377  label = ["generalTracks", locals()["_generalTracksHp"+_postfix]] +
378  locals()["_selectorsByAlgo"+_postfix] + locals()["_selectorsByAlgoHp"+_postfix] +
379  locals()["_selectorsByOriginalAlgo"+_postfix] +
380  ["generalTracksPt09"] + locals()["_selectorsPt09"+_postfix] +
381  [
382  "cutsRecoTracksBtvLike",
383  "cutsRecoTracksAK4PFJets"
384  ],
385  doResolutionPlotsForLabels = [
386  "generalTracks",
387  locals()["_generalTracksHp"+_postfix],
388  "generalTracksPt09",
389  "cutsRecoTracksBtvLike",
390  ]
391  )
392  _setForEra(trackValidator.histoProducerAlgoBlock, _eraName, _era, seedingLayerSets=locals()["_seedingLayerSets"+_postfix])
393 
394 # for low-pT
395 trackValidatorTPPtLess09 = trackValidator.clone(
396  dirName = "Tracking/TrackTPPtLess09/",
397  label = [x for x in trackValidator.label.value() if ("Pt09" not in x) and ("BtvLike" not in x) and ("AK4PFJets" not in x)],
398  ptMaxTP = 0.9, # set maximum pT globally
399  histoProducerAlgoBlock = dict(
400  TpSelectorForEfficiencyVsEta = dict(ptMin=0.05), # enough to set min pT here
401  TpSelectorForEfficiencyVsPhi = dict(ptMin=0.05),
402  TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.05),
403  TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.05),
404  ),
405  doSimPlots = False, # same as in trackValidator, no need to repeat here
406  doRecoTrackPlots = False, # fake rates are same as in trackValidator, no need to repeat here
407  doResolutionPlotsForLabels = ["disabled"], # resolutions are same as in trackValidator, no need to repeat here
408 )
409 
410 
411 trackingParticlesEtaGreater2p7 = _trackingParticleRefSelector.clone(
412  signalOnly = cms.bool(False),
413  tip = 1e5,
414  lip = 1e5,
415  minRapidity = -2.7,
416  maxRapidity = 2.7,
417  invertRapidityCut = cms.bool(True),
418  ptMin = 0,
419 )
420 
421 
422 # select tracks with |eta| > 2.7
423 generalTracksEtaGreater2p7 = cutsRecoTracks_cfi.cutsRecoTracks.clone(
424  minRapidity = cms.double(-2.7),
425  maxRapidity = cms.double( 2.7),
426  invertRapidityCut = cms.bool(True)
427 )
428 
429 _taskForEachEra(_addSelectorsBySrc, modDict=globals(),
430  args=[["_generalTracksHp"]],
431  plainArgs=["EtaGreater2p7", "generalTracksEtaGreater2p7"],
432  names="_selectorsEtaGreater2p7", task="_tracksValidationSelectorsEtaGreater2p7",
433  modifyTask=lambda task: task.add(generalTracksEtaGreater2p7))
434 
435 # for high-eta (phase2 : |eta| > 2.7)
436 trackValidatorTPEtaGreater2p7 = trackValidator.clone(
437  dirName = "Tracking/TrackTPEtaGreater2p7/",
438  label_tp_effic = "trackingParticlesEtaGreater2p7",
439  label_tp_fake = "trackingParticlesEtaGreater2p7",
440  label_tp_effic_refvector = True,
441  label_tp_fake_refvector = True,
442  dodEdxPlots = False,
443 # doPVAssociationPlots = False,
444  minRapidityTP = -2.7,
445  maxRapidityTP = 2.7,
446  invertRapidityCutTP = True,
447 # ptMaxTP = 0.9, # set maximum pT globally
448  histoProducerAlgoBlock = dict(
449  TpSelectorForEfficiencyVsPt = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=True), # enough to set min pT here
450  TpSelectorForEfficiencyVsEta = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=True), # enough to set min pT here
451  TpSelectorForEfficiencyVsPhi = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=True),
452  TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=True),
453  TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=True),
454  generalTpSelector = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=True),
455 # minEta = -4.5,
456 # maxEta = 4.5,
457 # nintEta = 90,
458  # minPt = 0.01,
459  ),
460  doSimPlots = True, # ####same as in trackValidator, no need to repeat here
461  doRecoTrackPlots = True, # ####fake rates are same as in trackValidator, no need to repeat here
462  doResolutionPlotsForLabels = ["disabled"] # resolutions are same as in trackValidator, no need to repeat here
463 )
464 for _eraName, _postfix, _era in _relevantEras:
465  _setForEra(trackValidatorTPEtaGreater2p7, _eraName, _era,
466  label = ["generalTracksEtaGreater2p7"] + locals()["_selectorsEtaGreater2p7"+_postfix] +
467  locals()["_selectorsByAlgo"+_postfix] + locals()["_selectorsByAlgoHp"+_postfix],
468  doResolutionPlotsForLabels = ["generalTracksEtaGreater2p7"] + locals()["_selectorsEtaGreater2p7"+_postfix]
469  )
470 
471 # For efficiency of signal TPs vs. signal tracks, and fake rate of
472 # signal tracks vs. signal TPs
473 trackValidatorFromPV = trackValidator.clone(
474  dirName = "Tracking/TrackFromPV/",
475  label_tp_effic = "trackingParticlesSignal",
476  label_tp_fake = "trackingParticlesSignal",
477  label_tp_effic_refvector = True,
478  label_tp_fake_refvector = True,
479  trackCollectionForDrCalculation = "generalTracksFromPV",
480  doPlotsOnlyForTruePV = True,
481  doPVAssociationPlots = False,
482  doResolutionPlotsForLabels = ["disabled"],
483 )
484 for _eraName, _postfix, _era in _relevantEras:
485  _setForEra(trackValidatorFromPV, _eraName, _era,
486  label = ["generalTracksFromPV"] + locals()["_selectorsFromPV"+_postfix] + ["generalTracksFromPVPt09"] + locals()["_selectorsFromPVPt09"+_postfix],
487  doResolutionPlotsForLabels = [] # for standard "FromPV" do resolution plots for all input collections as they are already limited
488  )
489 
490 # For fake rate of signal tracks vs. all TPs, and pileup rate of
491 # signal tracks vs. non-signal TPs
492 trackValidatorFromPVAllTP = trackValidatorFromPV.clone(
493  dirName = "Tracking/TrackFromPVAllTP/",
494  label_tp_effic = trackValidator.label_tp_effic.value(),
495  label_tp_fake = trackValidator.label_tp_fake.value(),
496  label_tp_effic_refvector = False,
497  label_tp_fake_refvector = False,
498  doSimPlots = False,
499  doSimTrackPlots = False,
500  doResolutionPlotsForLabels = ["disabled"], # resolution plots are the same as in "trackValidatorFromPV"
501 )
502 
503 # For efficiency of all TPs vs. all tracks
504 trackValidatorAllTPEffic = trackValidator.clone(
505  dirName = "Tracking/TrackAllTPEffic/",
506  label = [x for x in trackValidator.label.value() if "Pt09" not in x],
507  doSimPlots = False,
508  doRecoTrackPlots = True, # Fake rate of all tracks vs. all TPs is already included in trackValidator, but we want the reco plots for other reasons
509  doPVAssociationPlots = False,
510  doResolutionPlotsForLabels = ["disabled"], # resolution plots are the same as in "trackValidator"
511 )
512 trackValidatorAllTPEffic.histoProducerAlgoBlock.generalTpSelector.signalOnly = False
513 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsEta.signalOnly = False
514 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPhi.signalOnly = False
515 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPt.signalOnly = False
516 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXR.signalOnly = False
517 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXZ.signalOnly = False
518 for _eraName, _postfix, _era in _relevantEras:
519  _setForEra(trackValidatorAllTPEffic, _eraName, _era, label = ["generalTracks", locals()["_generalTracksHp"+_postfix]])
520 
521 # Built tracks, in the standard sequence mainly for monitoring the track selection MVA
522 tpClusterProducerPreSplitting = tpClusterProducer.clone(pixelClusterSrc = "siPixelClustersPreSplitting")
523 quickTrackAssociatorByHitsPreSplitting = quickTrackAssociatorByHits.clone(cluster2TPSrc = "tpClusterProducerPreSplitting")
524 _trackValidatorSeedingBuilding = trackValidator.clone( # common for built tracks and seeds (in trackingOnly)
525  associators = ["quickTrackAssociatorByHits"],
526  UseAssociators = True,
527  dodEdxPlots = False,
528  doPVAssociationPlots = False,
529  doSimPlots = False,
530  doResolutionPlotsForLabels = ["disabled"],
531 )
532 trackValidatorBuilding = _trackValidatorSeedingBuilding.clone(
533  dirName = "Tracking/TrackBuilding/",
534  doMVAPlots = True,
535 )
536 trackValidatorBuildingPreSplitting = trackValidatorBuilding.clone(
537  associators = ["quickTrackAssociatorByHitsPreSplitting"],
538  doMVAPlots = False,
539  doSummaryPlots = False,
540 )
541 for _eraName, _postfix, _era in _relevantErasAndFastSim:
542  _setForEra(trackValidatorBuilding, _eraName, _era, label = locals()["_trackProducers"+_postfix])
543 fastSim.toModify(trackValidatorBuilding, doMVAPlots=False)
544 for _eraName, _postfix, _era in _relevantEras:
545  _setForEra(trackValidatorBuilding, _eraName, _era, mvaLabels = locals()["_mvaSelectors"+_postfix])
546  _setForEra(trackValidatorBuildingPreSplitting, _eraName, _era, label = locals()["_trackProducersPreSplitting"+_postfix])
547 
548 
549 # For conversions
550 trackValidatorConversion = trackValidator.clone(
551  dirName = "Tracking/TrackConversion/",
552  label = [
553  "convStepTracks",
554  "conversionStepTracks",
555  "ckfInOutTracksFromConversions",
556  "ckfOutInTracksFromConversions",
557  ],
558  label_tp_effic = "trackingParticlesConversion",
559  label_tp_effic_refvector = True,
560  associators = ["quickTrackAssociatorByHits"],
561  UseAssociators = True,
562  doSimPlots = True,
563  dodEdxPlots = False,
564  doPVAssociationPlots = False,
565  calculateDrSingleCollection = False,
566 )
567 from RecoTracker.ConversionSeedGenerators.ConversionStep_cff import convLayerPairs as _convLayerPairs
568 def _uniqueFirstLayers(layerList):
569  firstLayers = [layerSet.split("+")[0] for layerSet in layerList]
570  ret = []
571  for l in firstLayers:
572  if not l in ret:
573  ret.append(l)
574  # For conversions add also the mono-TEC to the list as 'TEC'
575  # is used for both matched and unmatched rphi/stereo hits
576  if l.startswith("TEC"):
577  ret.append("M"+l)
578  return ret
579 # PhotonConversionTrajectorySeedProducerFromSingleLeg keeps only the
580 # first hit of the pairs in the seed, bookkeeping those is the best we
581 # can do without major further development
582 trackValidatorConversion.histoProducerAlgoBlock.seedingLayerSets = _uniqueFirstLayers(_convLayerPairs.layerList.value())
583 # relax lip and tip
584 for n in ["Eta", "Phi", "Pt", "VTXR", "VTXZ"]:
585  pset = getattr(trackValidatorConversion.histoProducerAlgoBlock, "TpSelectorForEfficiencyVs"+n)
586  pset.lip = trackValidatorConversion.lipTP.value()
587  pset.tip = trackValidatorConversion.tipTP.value()
588 
589 # For electrons
590 trackValidatorGsfTracks = trackValidatorConversion.clone(
591  dirName = "Tracking/TrackGsf/",
592  label = ["electronGsfTracks"],
593  label_tp_effic = "trackingParticlesElectron",
594 )
595 # add the additional seeding layers from ElectronSeeds
596 for _eraName, _postfix, _era in _relevantEras:
597  _setForEra(trackValidatorGsfTracks.histoProducerAlgoBlock, _eraName, _era, seedingLayerSets=trackValidator.histoProducerAlgoBlock.seedingLayerSets.value()+locals()["_seedingLayerSetsForElectrons"+_postfix])
598 
599 
600 
601 # for B-hadrons
602 trackValidatorBHadron = trackValidator.clone(
603  dirName = "Tracking/TrackBHadron/",
604  label_tp_effic = "trackingParticlesBHadron",
605  label_tp_effic_refvector = True,
606  doSimPlots = True,
607  doRecoTrackPlots = False, # Fake rate is defined wrt. all TPs, and that is already included in trackValidator
608  dodEdxPlots = False,
609 )
610 for _eraName, _postfix, _era in _relevantEras:
611  _setForEra(trackValidatorBHadron, _eraName, _era,
612  label = ["generalTracks", locals()["_generalTracksHp"+_postfix], "cutsRecoTracksBtvLike"]
613  )
614 
615 
616 # the track selectors
617 tracksValidationSelectors = cms.Task(
618  tracksValidationSelectorsByAlgo,
619  tracksValidationSelectorsByAlgoHp,
620  tracksValidationSelectorsByOriginalAlgo,
621  cutsRecoTracksBtvLike,
622  ak4JetTracksAssociatorExplicitAll,
623  cutsRecoTracksAK4PFJets
624 )
625 phase2_tracker.toModify(tracksValidationSelectors, lambda x: x.add(generalTracksEtaGreater2p7))
626 phase2_tracker.toModify(tracksValidationSelectors, lambda x: x.add(cutsRecoTracksEtaGreater2p7Hp))
627 
628 # Validation iterative steps
629 _taskForEachEra(_addSelectorsByAlgo, modDict=globals(),
630  args=["_algos"],
631  names="_selectorsByAlgo", task="_tracksEtaGreater2p7ValidationSelectorsByAlgo"
632  )
633 
634 # high purity
635 _taskForEachEra(_addSelectorsByHp, modDict=globals(),
636  args=["_algos"],
637  names="_selectorsByAlgoHp", task="_tracksEtaGreater2p7ValidationSelectorsByAlgoHp"
638  )
639 
640 for _eraName, _postfix, _era in _relevantEras:
641  selectors = locals()["_selectorsByAlgoHp"+_postfix]
642  locals()["_generalTracksHp"+_postfix] = selectors[0]
643  locals()["_selectorsByAlgoHp"+_postfix] = selectors[1:]
644 
645 phase2_tracker.toModify(tracksValidationSelectors, lambda x: x.add(tracksEtaGreater2p7ValidationSelectorsByAlgo))
646 phase2_tracker.toModify(tracksValidationSelectors, lambda x: x.add(tracksEtaGreater2p7ValidationSelectorsByAlgoHp))
647 
648 tracksValidationTruth = cms.Task(
649  tpClusterProducer,
650  tpClusterProducerPreSplitting,
651  quickTrackAssociatorByHits,
652  quickTrackAssociatorByHitsPreSplitting,
653  trackingParticleRecoTrackAsssociation,
654  VertexAssociatorByPositionAndTracks,
655  trackingParticleNumberOfLayersProducer
656 )
657 fastSim.toModify(tracksValidationTruth, lambda x: x.remove(tpClusterProducer))
658 
659 tracksPreValidation = cms.Task(
660  highPtJetsForTrk,
661  tracksValidationSelectors,
662  tracksValidationSelectorsPt09,
663  tracksValidationSelectorsFromPV,
664  tracksValidationSelectorsFromPVPt09,
665  tracksValidationTruth,
666  trackingParticlesSignal,
667  trackingParticlesElectron,
668  trackingParticlesConversion
669 )
670 fastSim.toReplaceWith(tracksPreValidation, tracksPreValidation.copyAndExclude([
671  trackingParticlesElectron,
672  trackingParticlesConversion,
673 ]))
674 
675 
676 
677 tracksValidation = cms.Sequence(
678  trackValidator +
679  trackValidatorTPPtLess09 +
680  trackValidatorFromPV +
681  trackValidatorFromPVAllTP +
682  trackValidatorAllTPEffic +
683  trackValidatorBuilding +
684  trackValidatorBuildingPreSplitting +
685  trackValidatorConversion +
686  trackValidatorGsfTracks,
687  tracksPreValidation
688 )
689 
690 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
691 #tracksValidationPhase2 = cms.Sequence(tracksValidation+trackValidatorTPEtaGreater2p7) # it does not work
692 tracksPreValidationPhase2 = tracksPreValidation.copy()
693 tracksPreValidationPhase2.add(trackingParticlesEtaGreater2p7)
694 phase2_tracker.toReplaceWith(tracksPreValidation, tracksPreValidationPhase2)
695 
696 tracksValidationPhase2 = tracksValidation.copy()
697 tracksValidationPhase2+=trackValidatorTPEtaGreater2p7
698 phase2_tracker.toReplaceWith(tracksValidation, tracksValidationPhase2)
699 
700 
701 fastSim.toReplaceWith(tracksValidation, tracksValidation.copyAndExclude([
702  trackValidatorBuildingPreSplitting,
703  trackValidatorConversion,
704  trackValidatorGsfTracks,
705 ]))
706 
707 
708 
709 # Select by originalAlgo and algoMask
710 _taskForEachEra(_addSelectorsByOriginalAlgoMask, modDict = globals(),
711  args = ["_selectorsByAlgoAndHpNoGenTk"], plainArgs = ["ByAlgoMask", "algorithmMaskContains"],
712  names = "_selectorsByAlgoMask", task = "_tracksValidationSelectorsByAlgoMaskStandalone")
713 
714 # Select pT>0.9 by iteration
715 # Need to avoid generalTracks+HP because those are already included in the standard validator
716 _taskForEachEra(_addSelectorsBySrc, modDict = globals(),
717  args = ["_selectorsByAlgoAndHpNoGenTk"], plainArgs = ["Pt09", "generalTracksPt09"],
718  names = "_selectorsPt09Standalone", task = "_tracksValidationSelectorsPt09Standalone")
719 
720 # Select fromPV by iteration
721 # Need to avoid generalTracks+HP because those are already included in the standard validator
722 _taskForEachEra(_addSelectorsBySrc, modDict = globals(),
723  args = ["_selectorsByAlgoAndHpNoGenTk"], plainArgs = ["FromPV", "generalTracksFromPV"],
724  names = "_selectorsFromPVStandalone", task = "_tracksValidationSelectorsFromPVStandalone")
725 
726 # Select pt>0.9 and fromPV by iteration
727 # Need to avoid generalTracks+HP because those are already included in the standard validator
728 _taskForEachEra(_addSelectorsBySrc, modDict = globals(),
729  args = ["_selectorsByAlgoAndHpNoGenTk"], plainArgs = ["FromPVPt09", "generalTracksFromPVPt09"],
730  names = "_selectorsFromPVPt09Standalone", task = "_tracksValidationSelectorsFromPVPt09Standalone")
731 
732 # MTV instances
733 trackValidatorStandalone = trackValidator.clone(
734  cores = "highPtJets"
735 )
736 trackValidatorTPPtLess09Standalone = trackValidatorTPPtLess09.clone(
737  cores = "highPtJets"
738 )
739 for _eraName, _postfix, _era in _relevantEras:
740  _setForEra(trackValidatorStandalone, _eraName, _era, label = trackValidator.label + locals()["_selectorsByAlgoMask"+_postfix] + locals()["_selectorsPt09Standalone"+_postfix])
741  _setForEra(trackValidatorTPPtLess09Standalone, _eraName, _era, label = trackValidatorTPPtLess09.label + locals()["_selectorsByAlgoMask"+_postfix] + locals()["_selectorsPt09Standalone"+_postfix])
742 
743 trackValidatorFromPVStandalone = trackValidatorFromPV.clone(
744  cores = "highPtJets"
745 )
746 for _eraName, _postfix, _era in _relevantEras:
747  _setForEra(trackValidatorFromPVStandalone, _eraName, _era, label = trackValidatorFromPV.label + locals()["_selectorsFromPVStandalone"+_postfix] + locals()["_selectorsFromPVPt09Standalone"+_postfix])
748 # do resolutions as in the standard version
749 
750 trackValidatorFromPVAllTPStandalone = trackValidatorFromPVAllTP.clone(
751  label = trackValidatorFromPVStandalone.label.value(),
752  cores = "highPtJets"
753 
754 )
755 trackValidatorAllTPEfficStandalone = trackValidatorAllTPEffic.clone(
756  label = [ x for x in trackValidator.label.value() if x not in ["cutsRecoTracksBtvLike", "cutsRecoTracksAK4PFJets"] and "Pt09" not in x],
757  cores = "highPtJets"
758 )
759 
760 trackValidatorConversionStandalone = trackValidatorConversion.clone(
761  label = [x for x in trackValidatorConversion.label if x != "convStepTracks"],
762  cores = "highPtJets"
763 )
764 
765 trackValidatorBHadronStandalone = trackValidatorBHadron.clone(
766  label = [x for x in trackValidatorStandalone.label if "Pt09" not in x],
767  cores = "highPtJets"
768 )
769 
770 trackValidatorGsfTracksStandalone = trackValidatorGsfTracks.clone(
771  cores = "highPtJets"
772 )
773 
774 # sequences
775 tracksPreValidationStandalone = tracksPreValidation.copy()
776 tracksPreValidationStandalone.add(trackingParticlesBHadron)
777 tracksPreValidationStandalone.replace(highPtJetsForTrk,highPtJets)
778 fastSim.toReplaceWith(tracksPreValidationStandalone, tracksPreValidation)
779 
780 tracksValidationSelectorsStandalone = cms.Task(
781  tracksValidationSelectorsByAlgoMaskStandalone,
782  tracksValidationSelectorsPt09Standalone,
783  tracksValidationSelectorsFromPVStandalone,
784  tracksValidationSelectorsFromPVPt09Standalone
785 )
786 
787 # we copy this for both Standalone and TrackingOnly
788 # and later make modifications from it which change based on era
789 _trackValidatorsBase = cms.Sequence(
790  trackValidatorStandalone +
791  trackValidatorTPPtLess09Standalone +
792  trackValidatorFromPVStandalone +
793  trackValidatorFromPVAllTPStandalone +
794  trackValidatorAllTPEfficStandalone +
795  trackValidatorConversionStandalone +
796  trackValidatorGsfTracksStandalone +
797  trackValidatorBHadronStandalone
798 )
799 
800 _trackValidatorsBasePhase2 = _trackValidatorsBase.copy()
801 _trackValidatorsBasePhase2+=trackValidatorTPEtaGreater2p7
802 phase2_tracker.toReplaceWith(_trackValidatorsBase, _trackValidatorsBasePhase2)
803 
804 trackValidatorsStandalone = _trackValidatorsBase.copy()
805 fastSim.toModify(trackValidatorsStandalone, lambda x: x.remove(trackValidatorConversionStandalone) )
806 
807 tracksValidationStandalone = cms.Sequence(
808  ak4PFL1FastL2L3CorrectorChain +
809  trackValidatorsStandalone,
810  tracksPreValidationStandalone,
811  tracksValidationSelectorsStandalone
812 )
813 
814 
815 
816 # selectors
817 tracksValidationSelectorsTrackingOnly = tracksValidationSelectors.copyAndExclude([ak4JetTracksAssociatorExplicitAll,cutsRecoTracksAK4PFJets]) # selectors using track information only (i.e. no PF)
818 _taskForEachEra(_addSeedToTrackProducers, args=["_seedProducers"], names="_seedSelectors", task="_tracksValidationSeedSelectorsTrackingOnly", includeFastSim=True, modDict=globals())
819 _taskForEachEra(_addSeedToTrackProducers, args=["_seedProducersPreSplitting"], names="_seedSelectorsPreSplitting", task="_tracksValidationSeedSelectorsPreSplittingTrackingOnly", modDict=globals())
820 tracksValidationSeedSelectorsTrackingOnly.add(tracksValidationSeedSelectorsPreSplittingTrackingOnly)
821 
822 # MTV instances
823 trackValidatorTrackingOnly = trackValidatorStandalone.clone(
824  label = [ x for x in trackValidatorStandalone.label if x != "cutsRecoTracksAK4PFJets"],
825  cores = "highPtJetsForTrk"
826  )
827 
828 trackValidatorSeedingTrackingOnly = _trackValidatorSeedingBuilding.clone(
829  dirName = "Tracking/TrackSeeding/",
830  label = _seedSelectors,
831  doSeedPlots = True,
832 )
833 trackValidatorSeedingPreSplittingTrackingOnly = trackValidatorSeedingTrackingOnly.clone(
834  associators = ["quickTrackAssociatorByHitsPreSplitting"],
835  label = _seedSelectorsPreSplitting,
836  doSummaryPlots = False,
837 
838 )
839 for _eraName, _postfix, _era in _relevantErasAndFastSim:
840  _setForEra(trackValidatorSeedingTrackingOnly, _eraName, _era, label = locals()["_seedSelectors"+_postfix])
841 for _eraName, _postfix, _era in _relevantEras:
842  _setForEra(trackValidatorSeedingPreSplittingTrackingOnly, _eraName, _era, label = locals()["_seedSelectorsPreSplitting"+_postfix])
843 
844 
845 trackValidatorConversionTrackingOnly = trackValidatorConversion.clone(label = [x for x in trackValidatorConversion.label if x not in ["ckfInOutTracksFromConversions", "ckfOutInTracksFromConversions"]])
846 
847 trackValidatorBHadronTrackingOnly = trackValidatorBHadron.clone(label = [x for x in trackValidatorTrackingOnly.label if "Pt09" not in x])
848 
849 trackValidatorTPPtLess09TrackingOnly = trackValidatorTPPtLess09Standalone.clone(cores = "highPtJetsForTrk")
850 trackValidatorFromPVTrackingOnly = trackValidatorFromPVStandalone.clone(cores = "highPtJetsForTrk")
851 trackValidatorFromPVAllTPTrackingOnly = trackValidatorFromPVAllTPStandalone.clone(cores = "highPtJetsForTrk")
852 trackValidatorAllTPEfficTrackingOnly = trackValidatorAllTPEfficStandalone.clone(cores = "highPtJetsForTrk")
853 # sequences
854 tracksPreValidationTrackingOnly = tracksPreValidationStandalone.copy()
855 tracksPreValidationTrackingOnly.replace(tracksValidationSelectors, tracksValidationSelectorsTrackingOnly)
856 tracksPreValidationTrackingOnly.replace(highPtJets,highPtJetsForTrk)
857 
858 trackValidatorsTrackingOnly = _trackValidatorsBase.copy()
859 trackValidatorsTrackingOnly.replace(trackValidatorStandalone, trackValidatorTrackingOnly)
860 trackValidatorsTrackingOnly.replace(trackValidatorTPPtLess09Standalone,trackValidatorTPPtLess09TrackingOnly)
861 trackValidatorsTrackingOnly.replace(trackValidatorFromPVStandalone,trackValidatorFromPVTrackingOnly)
862 trackValidatorsTrackingOnly.replace(trackValidatorFromPVAllTPStandalone,trackValidatorFromPVAllTPTrackingOnly)
863 trackValidatorsTrackingOnly.replace(trackValidatorAllTPEfficStandalone,trackValidatorAllTPEfficTrackingOnly)
864 trackValidatorsTrackingOnly += trackValidatorSeedingTrackingOnly
865 trackValidatorsTrackingOnly += trackValidatorSeedingPreSplittingTrackingOnly
866 trackValidatorsTrackingOnly += trackValidatorBuilding
867 trackValidatorsTrackingOnly += trackValidatorBuildingPreSplitting
868 trackValidatorsTrackingOnly.replace(trackValidatorConversionStandalone, trackValidatorConversionTrackingOnly)
869 trackValidatorsTrackingOnly.remove(trackValidatorGsfTracksStandalone)
870 trackValidatorsTrackingOnly.replace(trackValidatorBHadronStandalone, trackValidatorBHadronTrackingOnly)
871 fastSim.toReplaceWith(trackValidatorsTrackingOnly, trackValidatorsTrackingOnly.copyAndExclude([
872  trackValidatorBuildingPreSplitting,
873  trackValidatorSeedingPreSplittingTrackingOnly,
874  trackValidatorConversionTrackingOnly,
875  trackValidatorBHadronTrackingOnly
876 ]))
877 
878 tracksValidationTrackingOnly = cms.Sequence(
879  trackValidatorsTrackingOnly,
880  tracksPreValidationTrackingOnly,
881  tracksValidationSelectorsStandalone,
882  tracksValidationSeedSelectorsTrackingOnly
883 )
884 
885 
886 
887 trackingParticlePixelTrackAsssociation = trackingParticleRecoTrackAsssociation.clone(
888  label_tr = "pixelTracks",
889  associator = "quickTrackAssociatorByHitsPreSplitting",
890 )
891 PixelVertexAssociatorByPositionAndTracks = VertexAssociatorByPositionAndTracks.clone(
892  trackAssociation = "trackingParticlePixelTrackAsssociation"
893 )
894 
895 trackValidatorPixelTrackingOnly = trackValidator.clone(
896  dirName = "Tracking/PixelTrack/",
897  label = ["pixelTracks"],
898  doResolutionPlotsForLabels = [],
899  trackCollectionForDrCalculation = "pixelTracks",
900  associators = ["trackingParticlePixelTrackAsssociation"],
901  label_vertex = "pixelVertices",
902  vertexAssociator = "PixelVertexAssociatorByPositionAndTracks",
903  dodEdxPlots = False,
904  cores = cms.InputTag(""),
905 )
906 
907 tracksValidationTruthPixelTrackingOnly = tracksValidationTruth.copy()
908 tracksValidationTruthPixelTrackingOnly.replace(trackingParticleRecoTrackAsssociation, trackingParticlePixelTrackAsssociation)
909 tracksValidationTruthPixelTrackingOnly.replace(VertexAssociatorByPositionAndTracks, PixelVertexAssociatorByPositionAndTracks)
910 tracksValidationPixelTrackingOnly = cms.Sequence(
911  trackValidatorPixelTrackingOnly,
912  tracksValidationTruthPixelTrackingOnly
913 )
914 
915 
916 
917 trackValidatorLite = trackValidator.clone(
918  label = ["generalTracks", "cutsRecoTracksHp"]
919 )
920 tracksValidationLite = cms.Sequence(
921  cutsRecoTracksHp +
922  trackValidatorLite,
923  tracksValidationTruth
924 )
925 
926 
927 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
928 phase2_timing_layer.toModify( generalTracksFromPV,
929  timesTag = cms.InputTag('tofPID:t0'),
930  timeResosTag = cms.InputTag('tofPID:sigmat0'),
931  nSigmaDtVertex = cms.double(3) )
932 phase2_timing_layer.toModify( trackValidatorStandalone,
933  label_vertex = cms.untracked.InputTag('offlinePrimaryVertices4D') )
934 phase2_timing_layer.toModify( trackValidatorFromPVStandalone,
935  label_vertex = cms.untracked.InputTag('offlinePrimaryVertices4D') )
936 phase2_timing_layer.toModify( trackValidatorFromPVAllTPStandalone,
937  label_vertex = cms.untracked.InputTag('offlinePrimaryVertices4D') )
938 phase2_timing_layer.toModify( trackValidatorConversionStandalone,
939  label_vertex = cms.untracked.InputTag('offlinePrimaryVertices4D') )
940 phase2_timing_layer.toModify( trackValidatorGsfTracks,
941  label_vertex = cms.untracked.InputTag('offlinePrimaryVertices4D') )
TrackValidation_cff._addSelectorsBySrc
_addSelectorsBySrc
Definition: TrackValidation_cff.py:306
TrackWithVertexRefSelector_cfi
TrackValidation_cff._addSelectorsByAlgo
_addSelectorsByAlgo
Definition: TrackValidation_cff.py:252
ElectronSeeds_cff
LhcParametersDefinerForTP_cfi
TrackValidation_cff._getSeedingLayers
def _getSeedingLayers(seedProducers, config)
Definition: TrackValidation_cff.py:191
ak4JTA_cff
TrackValidation_cff._translateArgs
def _translateArgs(args, postfix, modDict)
Definition: TrackValidation_cff.py:148
trackAssociatorByChi2_cfi
TrackValidation_cff._addSelectorsByHp
_addSelectorsByHp
Definition: TrackValidation_cff.py:255
iterativeTk_cff
trackingParticleNumberOfLayersProducer_cff
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
MultiTrackValidator_cfi
TrackValidation_cff._getMVASelectors
def _getMVASelectors(postfix)
Definition: TrackValidation_cff.py:241
TrackValidation_cff._addSelectorsByOriginalAlgoMask
_addSelectorsByOriginalAlgoMask
Then define stuff for standalone mode (i.e.
Definition: TrackValidation_cff.py:264
TrackValidation_cff._algoToSelector
def _algoToSelector(algo)
Definition: TrackValidation_cff.py:60
TrackValidation_cff.modifyTask
modifyTask
Definition: TrackValidation_cff.py:310
Exception
tpClusterProducer_cfi
JetCorrectors_cff
TrackValidation_cff._addSeedToTrackProducers
_addSeedToTrackProducers
Definition: TrackValidation_cff.py:818
TrackValidation_cff._taskForEachEra
def _taskForEachEra(function, args, names, task, modDict, plainArgs=[], modifyTask=None, includeFastSim=False)
Definition: TrackValidation_cff.py:156
TrackValidation_cff._setForEra
def _setForEra(module, eraName, era, **kwargs)
Definition: TrackValidation_cff.py:183
VertexAssociatorByPositionAndTracks_cfi
PostProcessorTracker_cfi
quickTrackAssociatorByHits_cfi
function
Definition: vlib.h:246
pileupCalc.upper
upper
Definition: pileupCalc.py:214
cutsRecoTracks_cfi
CosmicParametersDefinerForTP_cfi
trackingParticleRecoTrackAsssociation_cfi
TrackValidation_cff._uniqueFirstLayers
def _uniqueFirstLayers(layerList)
Definition: TrackValidation_cff.py:568
ConversionStep_cff