1 from __future__
import absolute_import
2 import FWCore.ParameterSet.Config
as cms
8 from Validation.RecoTrack.trajectorySeedTracks_cfi
import trajectorySeedTracks
as _trajectorySeedTracks
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
23 import RecoTracker.IterativeTracking.iterativeTkConfig
as _cfg
24 import RecoTracker.IterativeTracking.iterativeTkUtils
as _utils
25 from Configuration.Eras.Modifier_fastSim_cff
import fastSim
29 for _eraName, _postfix, _era
in _cfg.allEras():
30 _seedProd = [
"initialStepSeedsPreSplitting"]
31 _trackProd = [
"initialStepTracksPreSplitting"]
32 if _eraName
in [
"trackingLowPU",
"trackingPhase2PU140"]:
36 locals()[
"_algos"+_postfix] = [
"generalTracks"] + _cfg.iterationAlgos(_postfix) + [
"duplicateMerge"]
37 locals()[
"_seedProducersPreSplitting"+_postfix] = _seedProd
38 locals()[
"_trackProducersPreSplitting"+_postfix] = _trackProd
39 locals()[
"_seedProducers"+_postfix] = _cfg.seedProducers(_postfix)
40 locals()[
"_trackProducers"+_postfix] = _cfg.trackProducers(_postfix)
42 if _eraName !=
"trackingPhase2PU140":
43 locals()[
"_electronSeedProducers"+_postfix] = [
"tripletElectronSeeds",
"pixelPairElectronSeeds",
"stripPairElectronSeeds"]
45 locals()[
"_electronSeedProducers"+_postfix] = [
"tripletElectronSeeds"]
47 _removeForFastSimSeedProducers =[
"initialStepSeedsPreSplitting",
48 "jetCoreRegionalStepSeeds",
49 "jetCoreRegionalStepSeedsBarrel",
"jetCoreRegionalStepSeedsEndcap",
50 "muonSeededSeedsInOut",
51 "muonSeededSeedsOutIn"]
53 _seedProducers_fastSim = [ x
for x
in _seedProducers
if x
not in _removeForFastSimSeedProducers]
55 _removeForFastTrackProducers = [
"initialStepTracksPreSplitting",
56 "jetCoreRegionalStepTracks",
57 "muonSeededTracksInOut",
58 "muonSeededTracksOutIn"]
59 _trackProducers_fastSim = [ x
for x
in _trackProducers
if x
not in _removeForFastTrackProducers]
63 if algo !=
"generalTracks":
64 sel = algo[0].
upper()+algo[1:]
65 return "cutsRecoTracks"+sel
71 if algo ==
"generalTracks":
74 if modName
not in modDict:
75 mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(
79 modDict[modName] = mod
81 mod = modDict[modName]
90 modNameHp = modName+
"Hp"
91 if modNameHp
not in modDict:
92 if algo ==
"generalTracks":
93 mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(quality=[
"highPurity"])
95 mod = modDict[modName].
clone(quality=[
"highPurity"])
96 modDict[modNameHp] = mod
98 mod = modDict[modNameHp]
99 names.append(modNameHp)
105 for modName
in modules:
106 modNameNew = modName.replace(
"cutsRecoTracks",
"cutsRecoTracks"+midfix)
107 if modNameNew
not in modDict:
108 mod = modDict[modName].
clone(src=src)
109 modDict[modNameNew] = mod
111 mod = modDict[modNameNew]
112 names.append(modNameNew)
118 for modName
in modules:
119 if modName[-2:] ==
"Hp":
120 modNameNew = modName[:-2] + midfix +
"Hp"
122 modNameNew = modName + midfix
123 if modNameNew
not in modDict:
124 mod = modDict[modName].
clone()
125 setattr(mod, algoParam, mod.algorithm.value())
127 modDict[modNameNew] = mod
129 mod = modDict[modNameNew]
130 names.append(modNameNew)
136 for seed
in seedProducers:
137 modName =
"seedTracks"+seed
138 if modName
not in modDict:
139 mod = _trajectorySeedTracks.clone(src=seed)
140 modDict[modName] = mod
142 mod = modDict[modName]
143 names.append(modName)
147 _relevantEras = _cfg.allEras()
148 _relevantErasAndFastSim = _relevantEras + [(
"fastSim",
"_fastSim", fastSim)]
152 if isinstance(arg, list):
155 ret.append(modDict[arg+postfix])
157 def _taskForEachEra(function, args, names, task, modDict, plainArgs=[], modifyTask=None, includeFastSim=False):
159 raise Exception(
"Task name is expected to begin with _")
161 _eras = _relevantErasAndFastSim
if includeFastSim
else _relevantEras
162 for eraName, postfix, _era
in _eras:
164 _args.extend(plainArgs)
165 ret =
function(*_args, modDict=modDict)
167 raise Exception(
"_taskForEachEra is expected to return 2 values, but function returned %d" % len(ret))
168 modDict[names+postfix] = ret[0]
169 modDict[task+postfix] = ret[1]
172 defaultTaskName = task+_eras[0][0]
173 defaultTask = modDict[defaultTaskName]
174 modDict[defaultTaskName[1:]] = defaultTask
177 if modifyTask
is not None:
178 for eraName, postfix, _era
in _eras:
182 for _eraName, _postfix, _era
in _eras[1:]:
183 _era.toReplaceWith(defaultTask, modDict[task+_postfix])
186 for key, value
in kwargs.items():
187 setattr(module, key, value)
189 era.toModify(module, **kwargs)
193 def _findSeedingLayers(name):
194 prod = getattr(config, name)
195 if hasattr(prod,
"triplets"):
196 if hasattr(prod,
"layerList"):
197 return prod.layerList.refToPSet_.value()
198 return _findSeedingLayers(prod.triplets.getModuleLabel())
199 elif hasattr(prod,
"doublets"):
200 return _findSeedingLayers(prod.doublets.getModuleLabel())
201 label = prod.trackingRegionsSeedingLayers.getModuleLabel()
204 return prod.seedingLayers.getModuleLabel()
206 seedingLayersMerged = []
207 for seedName
in seedProducers:
208 seedProd = getattr(config, seedName)
209 seedingLayersName =
None
211 if hasattr(seedProd,
"OrderedHitsFactoryPSet"):
212 seedingLayersName = seedProd.OrderedHitsFactoryPSet.SeedingLayers.getModuleLabel()
213 elif hasattr(seedProd,
"seedingHitSets"):
214 seedingLayersName = _findSeedingLayers(seedProd.seedingHitSets.getModuleLabel())
215 elif hasattr(seedProd,
"layerList"):
216 seedingLayers = seedProd.layerList.value()
220 if seedingLayersName
is not None:
221 seedingLayers = getattr(config, seedingLayersName).layerList.value()
222 for layerSet
in seedingLayers:
223 if layerSet
not in seedingLayersMerged:
224 seedingLayersMerged.append(layerSet)
226 return seedingLayersMerged
229 for _eraName, _postfix, _era
in _relevantErasAndFastSim:
232 if "_electronSeedProducers"+_postfix
in locals():
233 for _layer
in _getSeedingLayers(locals()[
"_electronSeedProducers"+_postfix], _ElectronSeeds_cff):
234 if _layer
not in _stdLayers:
235 _eleLayers.append(_layer)
237 locals()[
"_seedingLayerSets"+_postfix] = _stdLayers
238 locals()[
"_seedingLayerSetsForElectrons"+_postfix] = _eleLayers
243 mvaSel = _utils.getMVASelectors(postfix)
245 pset = cms.untracked.PSet()
246 for iteration, (trackProducer, classifiers)
in mvaSel.items():
247 setattr(pset, trackProducer, cms.untracked.vstring(classifiers))
249 for _eraName, _postfix, _era
in _relevantEras:
253 _taskForEachEra(_addSelectorsByAlgo, args=[
"_algos"], names=
"_selectorsByAlgo", task=
"_tracksValidationSelectorsByAlgo", modDict=globals())
256 _taskForEachEra(_addSelectorsByHp, args=[
"_algos"], names=
"_selectorsByAlgoHp", task=
"_tracksValidationSelectorsByAlgoHp", modDict=globals())
259 for _eraName, _postfix, _era
in _relevantEras:
260 locals()[
"_selectorsByAlgoAndHp"+_postfix] = locals()[
"_selectorsByAlgo"+_postfix] + locals()[
"_selectorsByAlgoHp"+_postfix]
262 locals()[
"_selectorsByAlgoAndHpNoGenTk"+_postfix] = [n
for n
in locals()[
"_selectorsByAlgoAndHp"+_postfix]
if n
not in [
"generalTracks",
"cutsRecoTracksHp"]]
264 locals()[
"_selectorsByAlgoAndHpNoGenTkDupMerge"+_postfix] = [n
for n
in locals()[
"_selectorsByAlgoAndHpNoGenTk"+_postfix]
if n
not in [
"cutsRecoTracksDuplicateMerge",
"cutsRecoTracksDuplicateMergeHp"]]
266 args = [
"_selectorsByAlgoAndHpNoGenTkDupMerge"], plainArgs = [
"ByOriginalAlgo",
"originalAlgorithm"],
267 names =
"_selectorsByOriginalAlgo", task =
"_tracksValidationSelectorsByOriginalAlgo")
270 for _eraName, _postfix, _era
in _relevantEras:
271 selectors = locals()[
"_selectorsByAlgoHp"+_postfix]
272 locals()[
"_generalTracksHp"+_postfix] = selectors[0]
273 locals()[
"_selectorsByAlgoHp"+_postfix] = selectors[1:]
276 import PhysicsTools.RecoAlgos.btvTracks_cfi
as btvTracks_cfi
277 cutsRecoTracksBtvLike = btvTracks_cfi.btvTrackRefs.clone()
281 ak4JetTracksAssociatorExplicitAll = ak4JTA_cff.ak4JetTracksAssociatorExplicit.clone(
285 import JetMETCorrections.JetCorrector.jetTracksAssociationToTrackRefs_cfi
as jetTracksAssociationToTrackRefs_cfi
286 cutsRecoTracksAK4PFJets = jetTracksAssociationToTrackRefs_cfi.jetTracksAssociationToTrackRefs.clone(
287 association =
"ak4JetTracksAssociatorExplicitAll",
294 trackingParticlesSignal = _trackingParticleRefSelector.clone(
304 trackingParticlesInTime = trackingParticlesSignal.clone(
310 generalTracksPt09 = cutsRecoTracks_cfi.cutsRecoTracks.clone(ptMin=0.9)
313 args=[[
"_generalTracksHp"]],
314 plainArgs=[
"Pt09",
"generalTracksPt09"],
315 names=
"_selectorsPt09", task=
"_tracksValidationSelectorsPt09",
316 modifyTask=
lambda task:task.add(generalTracksPt09))
320 generalTracksFromPV = _trackWithVertexRefSelector.clone(
321 src =
"generalTracks",
326 vertexTag =
"offlinePrimaryVertices",
334 args=[[
"_generalTracksHp"]],
335 plainArgs=[
"FromPV",
"generalTracksFromPV"],
336 names=
"_selectorsFromPV", task=
"_tracksValidationSelectorsFromPV",
337 modifyTask=
lambda task: task.add(generalTracksFromPV))
340 generalTracksFromPVPt09 = generalTracksPt09.clone(src=
"generalTracksFromPV")
343 args=[[
"_generalTracksHp"]],
344 plainArgs=[
"FromPVPt09",
"generalTracksFromPVPt09"],
345 names=
"_selectorsFromPVPt09", task=
"_tracksValidationSelectorsFromPVPt09",
346 modifyTask=
lambda task: task.add(generalTracksFromPVPt09))
349 trackingParticlesConversion = _trackingParticleConversionRefSelector.clone()
352 trackingParticlesElectron = _trackingParticleRefSelector.clone(
363 highPtJets = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"ak4CaloJets"), cut = cms.string(
"pt()>1000"))
364 highPtJetsForTrk = highPtJets.clone(src =
"ak4CaloJetsForTrk")
367 trackingParticlesBHadron = _trackingParticleBHadronRefSelector.clone()
370 trackValidator = Validation.RecoTrack.MultiTrackValidator_cfi.multiTrackValidator.clone(
371 useLogPt = cms.untracked.bool(
True),
373 doPVAssociationPlots =
True
378 fastSim.toModify(trackValidator,
381 for _eraName, _postfix, _era
in _relevantEras:
383 label = [
"generalTracks", locals()[
"_generalTracksHp"+_postfix]] +
384 locals()[
"_selectorsByAlgo"+_postfix] + locals()[
"_selectorsByAlgoHp"+_postfix] +
385 locals()[
"_selectorsByOriginalAlgo"+_postfix] +
386 [
"generalTracksPt09"] + locals()[
"_selectorsPt09"+_postfix] +
388 "cutsRecoTracksBtvLike",
389 "cutsRecoTracksAK4PFJets"
391 doResolutionPlotsForLabels = [
393 locals()[
"_generalTracksHp"+_postfix],
395 "cutsRecoTracksBtvLike",
396 "cutsRecoTracksJetCoreRegionalStepByOriginalAlgo",
399 _setForEra(trackValidator.histoProducerAlgoBlock, _eraName, _era, seedingLayerSets=locals()[
"_seedingLayerSets"+_postfix])
402 trackValidatorTPPtLess09 = trackValidator.clone(
403 dirName =
"Tracking/TrackTPPtLess09/",
404 label = [x
for x
in trackValidator.label.value()
if (
"Pt09" not in x)
and (
"BtvLike" not in x)
and (
"AK4PFJets" not in x)],
406 histoProducerAlgoBlock = dict(
407 TpSelectorForEfficiencyVsEta = dict(ptMin=0.05),
408 TpSelectorForEfficiencyVsPhi = dict(ptMin=0.05),
409 TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.05),
410 TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.05),
413 doRecoTrackPlots =
False,
414 doResolutionPlotsForLabels = [
"disabled"],
418 trackingParticlesEtaGreater2p7 = _trackingParticleRefSelector.clone(
419 signalOnly = cms.bool(
False),
424 invertRapidityCut = cms.bool(
True),
430 generalTracksEtaGreater2p7 = cutsRecoTracks_cfi.cutsRecoTracks.clone(
431 minRapidity = cms.double(-2.7),
432 maxRapidity = cms.double( 2.7),
433 invertRapidityCut = cms.bool(
True)
437 args=[[
"_generalTracksHp"]],
438 plainArgs=[
"EtaGreater2p7",
"generalTracksEtaGreater2p7"],
439 names=
"_selectorsEtaGreater2p7", task=
"_tracksValidationSelectorsEtaGreater2p7",
440 modifyTask=
lambda task: task.add(generalTracksEtaGreater2p7))
443 trackValidatorTPEtaGreater2p7 = trackValidator.clone(
444 dirName =
"Tracking/TrackTPEtaGreater2p7/",
445 label_tp_effic =
"trackingParticlesEtaGreater2p7",
446 label_tp_fake =
"trackingParticlesEtaGreater2p7",
447 label_tp_effic_refvector =
True,
448 label_tp_fake_refvector =
True,
451 minRapidityTP = -2.7,
453 invertRapidityCutTP =
True,
455 histoProducerAlgoBlock = dict(
456 TpSelectorForEfficiencyVsPt = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
457 TpSelectorForEfficiencyVsEta = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
458 TpSelectorForEfficiencyVsPhi = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
459 TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
460 TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
461 generalTpSelector = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
468 doRecoTrackPlots =
True,
469 doResolutionPlotsForLabels = [
"disabled"]
471 for _eraName, _postfix, _era
in _relevantEras:
472 _setForEra(trackValidatorTPEtaGreater2p7, _eraName, _era,
473 label = [
"generalTracksEtaGreater2p7"] + locals()[
"_selectorsEtaGreater2p7"+_postfix] +
474 locals()[
"_selectorsByAlgo"+_postfix] + locals()[
"_selectorsByAlgoHp"+_postfix],
475 doResolutionPlotsForLabels = [
"generalTracksEtaGreater2p7"] + locals()[
"_selectorsEtaGreater2p7"+_postfix]
480 trackValidatorFromPV = trackValidator.clone(
481 dirName =
"Tracking/TrackFromPV/",
482 label_tp_effic =
"trackingParticlesSignal",
483 label_tp_fake =
"trackingParticlesSignal",
484 label_tp_effic_refvector =
True,
485 label_tp_fake_refvector =
True,
486 trackCollectionForDrCalculation =
"generalTracksFromPV",
487 doPlotsOnlyForTruePV =
True,
488 doPVAssociationPlots =
False,
489 doResolutionPlotsForLabels = [
"disabled"],
491 for _eraName, _postfix, _era
in _relevantEras:
492 _setForEra(trackValidatorFromPV, _eraName, _era,
493 label = [
"generalTracksFromPV"] + locals()[
"_selectorsFromPV"+_postfix] + [
"generalTracksFromPVPt09"] + locals()[
"_selectorsFromPVPt09"+_postfix],
494 doResolutionPlotsForLabels = []
499 trackValidatorFromPVAllTP = trackValidatorFromPV.clone(
500 dirName =
"Tracking/TrackFromPVAllTP/",
501 label_tp_effic = trackValidator.label_tp_effic.value(),
502 label_tp_fake = trackValidator.label_tp_fake.value(),
503 label_tp_effic_refvector =
False,
504 label_tp_fake_refvector =
False,
506 doSimTrackPlots =
False,
507 doResolutionPlotsForLabels = [
"disabled"],
511 trackValidatorAllTPEffic = trackValidator.clone(
512 dirName =
"Tracking/TrackAllTPEffic/",
513 label = [x
for x
in trackValidator.label.value()
if "Pt09" not in x],
515 doRecoTrackPlots =
True,
516 doPVAssociationPlots =
False,
517 doResolutionPlotsForLabels = [
"disabled"],
519 trackValidatorAllTPEffic.histoProducerAlgoBlock.generalTpSelector.signalOnly =
False
520 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsEta.signalOnly =
False
521 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPhi.signalOnly =
False
522 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPt.signalOnly =
False
523 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXR.signalOnly =
False
524 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXZ.signalOnly =
False
525 for _eraName, _postfix, _era
in _relevantEras:
526 _setForEra(trackValidatorAllTPEffic, _eraName, _era, label = [
"generalTracks", locals()[
"_generalTracksHp"+_postfix]])
529 tpClusterProducerPreSplitting = tpClusterProducer.clone(pixelClusterSrc =
"siPixelClustersPreSplitting")
530 quickTrackAssociatorByHitsPreSplitting = quickTrackAssociatorByHits.clone(cluster2TPSrc =
"tpClusterProducerPreSplitting")
531 _trackValidatorSeedingBuilding = trackValidator.clone(
532 associators = [
"quickTrackAssociatorByHits"],
533 UseAssociators =
True,
535 doPVAssociationPlots =
False,
537 doResolutionPlotsForLabels = [
"disabled"],
539 trackValidatorBuilding = _trackValidatorSeedingBuilding.clone(
540 dirName =
"Tracking/TrackBuilding/",
542 doResolutionPlotsForLabels = [
'jetCoreRegionalStepTracks'],
544 trackValidatorBuildingPreSplitting = trackValidatorBuilding.clone(
545 associators = [
"quickTrackAssociatorByHitsPreSplitting"],
547 doSummaryPlots =
False,
549 for _eraName, _postfix, _era
in _relevantErasAndFastSim:
550 _setForEra(trackValidatorBuilding, _eraName, _era, label = locals()[
"_trackProducers"+_postfix])
551 fastSim.toModify(trackValidatorBuilding, doMVAPlots=
False)
552 for _eraName, _postfix, _era
in _relevantEras:
553 _setForEra(trackValidatorBuilding, _eraName, _era, mvaLabels = locals()[
"_mvaSelectors"+_postfix])
554 _setForEra(trackValidatorBuildingPreSplitting, _eraName, _era, label = locals()[
"_trackProducersPreSplitting"+_postfix])
558 trackValidatorConversion = trackValidator.clone(
559 dirName =
"Tracking/TrackConversion/",
562 "conversionStepTracks",
563 "ckfInOutTracksFromConversions",
564 "ckfOutInTracksFromConversions",
566 label_tp_effic =
"trackingParticlesConversion",
567 label_tp_effic_refvector =
True,
568 associators = [
"quickTrackAssociatorByHits"],
569 UseAssociators =
True,
572 doPVAssociationPlots =
False,
573 calculateDrSingleCollection =
False,
577 firstLayers = [layerSet.split(
"+")[0]
for layerSet
in layerList]
579 for l
in firstLayers:
584 if l.startswith(
"TEC"):
590 trackValidatorConversion.histoProducerAlgoBlock.seedingLayerSets =
_uniqueFirstLayers(_convLayerPairs.layerList.value())
592 for n
in [
"Eta",
"Phi",
"Pt",
"VTXR",
"VTXZ"]:
593 pset = getattr(trackValidatorConversion.histoProducerAlgoBlock,
"TpSelectorForEfficiencyVs"+n)
594 pset.lip = trackValidatorConversion.lipTP.value()
595 pset.tip = trackValidatorConversion.tipTP.value()
598 trackValidatorGsfTracks = trackValidatorConversion.clone(
599 dirName =
"Tracking/TrackGsf/",
600 label = [
"electronGsfTracks"],
601 label_tp_effic =
"trackingParticlesElectron",
604 for _eraName, _postfix, _era
in _relevantEras:
605 _setForEra(trackValidatorGsfTracks.histoProducerAlgoBlock, _eraName, _era, seedingLayerSets=trackValidator.histoProducerAlgoBlock.seedingLayerSets.value()+locals()[
"_seedingLayerSetsForElectrons"+_postfix])
608 trackValidatorJetCore = trackValidator.clone(
609 dirName =
"Tracking/JetCore/",
610 useLogPt = cms.untracked.bool(
True),
612 associators= [
"trackAssociatorByChi2"],
613 UseAssociators =
True,
614 doPVAssociationPlots =
True,
615 label_tp_effic =
"trackingParticlesInTime",
616 label_tp_fake =
"trackingParticlesInTime",
617 label_tp_effic_refvector =
True,
618 label_tp_fake_refvector =
True,
620 for _eraName, _postfix, _era
in _relevantEras:
621 if 'jetCoreRegionalStep' in _cfg.iterationAlgos(_postfix) :
622 _setForEra(trackValidatorJetCore, _eraName, _era,
623 label = [
"generalTracks",
"jetCoreRegionalStepTracks",
624 "cutsRecoTracksJetCoreRegionalStepByOriginalAlgo",
"cutsRecoTracksJetCoreRegionalStepByOriginalAlgoHp",
625 "cutsRecoTracksJetCoreRegionalStep",
"cutsRecoTracksJetCoreRegionalStepHp"],
626 doResolutionPlotsForLabels =[
"generalTracks",
"jetCoreRegionalStepTracks",
627 "cutsRecoTracksJetCoreRegionalStepByOriginalAlgo",
"cutsRecoTracksJetCoreRegionalStepByOriginalAlgoHp",
628 "cutsRecoTracksJetCoreRegionalStep",
"cutsRecoTracksJetCoreRegionalStepHp"],
632 trackValidatorBHadron = trackValidator.clone(
633 dirName =
"Tracking/TrackBHadron/",
634 label_tp_effic =
"trackingParticlesBHadron",
635 label_tp_effic_refvector =
True,
637 doRecoTrackPlots =
False,
640 for _eraName, _postfix, _era
in _relevantEras:
641 _setForEra(trackValidatorBHadron, _eraName, _era,
642 label = [
"generalTracks", locals()[
"_generalTracksHp"+_postfix],
"cutsRecoTracksBtvLike"]
647 trackValidatorDisplaced = trackValidator.clone(
648 dirName =
"Tracking/TrackDisplaced/",
649 label = [x
for x
in trackValidator.label.value()
if (
"Pt09" not in x)
and (
"BtvLike" not in x)
and (
"AK4PFJets" not in x)],
652 invertRapidityCutTP =
False,
653 histoProducerAlgoBlock = dict(
654 TpSelectorForEfficiencyVsPt = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
655 TpSelectorForEfficiencyVsEta = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
656 TpSelectorForEfficiencyVsPhi = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
657 TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
658 TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
659 generalTpSelector = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
673 tracksValidationSelectors = cms.Task(
674 tracksValidationSelectorsByAlgo,
675 tracksValidationSelectorsByAlgoHp,
676 tracksValidationSelectorsByOriginalAlgo,
677 cutsRecoTracksBtvLike,
678 ak4JetTracksAssociatorExplicitAll,
679 cutsRecoTracksAK4PFJets
681 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(generalTracksEtaGreater2p7))
682 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(cutsRecoTracksEtaGreater2p7Hp))
687 names=
"_selectorsByAlgo", task=
"_tracksEtaGreater2p7ValidationSelectorsByAlgo"
693 names=
"_selectorsByAlgoHp", task=
"_tracksEtaGreater2p7ValidationSelectorsByAlgoHp"
696 for _eraName, _postfix, _era
in _relevantEras:
697 selectors = locals()[
"_selectorsByAlgoHp"+_postfix]
698 locals()[
"_generalTracksHp"+_postfix] = selectors[0]
699 locals()[
"_selectorsByAlgoHp"+_postfix] = selectors[1:]
701 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(tracksEtaGreater2p7ValidationSelectorsByAlgo))
702 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(tracksEtaGreater2p7ValidationSelectorsByAlgoHp))
704 tracksValidationTruth = cms.Task(
706 tpClusterProducerPreSplitting,
707 trackAssociatorByChi2,
708 quickTrackAssociatorByHits,
709 quickTrackAssociatorByHitsPreSplitting,
710 trackingParticleRecoTrackAsssociation,
711 VertexAssociatorByPositionAndTracks,
712 trackingParticleNumberOfLayersProducer
714 fastSim.toModify(tracksValidationTruth,
lambda x: x.remove(tpClusterProducer))
716 tracksPreValidation = cms.Task(
718 tracksValidationSelectors,
719 tracksValidationSelectorsPt09,
720 tracksValidationSelectorsFromPV,
721 tracksValidationSelectorsFromPVPt09,
722 tracksValidationTruth,
723 trackingParticlesSignal,
724 trackingParticlesInTime,
725 trackingParticlesElectron,
726 trackingParticlesConversion
728 fastSim.toReplaceWith(tracksPreValidation, tracksPreValidation.copyAndExclude([
729 trackingParticlesElectron,
730 trackingParticlesConversion,
735 tracksValidation = cms.Sequence(
737 trackValidatorTPPtLess09 +
738 trackValidatorFromPV +
739 trackValidatorFromPVAllTP +
740 trackValidatorAllTPEffic +
741 trackValidatorBuilding +
742 trackValidatorBuildingPreSplitting +
743 trackValidatorConversion +
744 trackValidatorGsfTracks,
748 from Configuration.ProcessModifiers.seedingDeepCore_cff
import seedingDeepCore
749 seedingDeepCore.toReplaceWith(tracksValidation, cms.Sequence(tracksValidation.copy()+trackValidatorJetCore))
751 from Configuration.ProcessModifiers.displacedTrackValidation_cff
import displacedTrackValidation
752 displacedTrackValidation.toReplaceWith(tracksValidation, cms.Sequence(tracksValidation.copy()+trackValidatorDisplaced))
754 from Configuration.Eras.Modifier_phase2_tracker_cff
import phase2_tracker
755 tracksPreValidationPhase2 = tracksPreValidation.copy()
756 tracksPreValidationPhase2.add(trackingParticlesEtaGreater2p7)
757 phase2_tracker.toReplaceWith(tracksPreValidation, tracksPreValidationPhase2)
759 tracksValidationPhase2 = tracksValidation.copyAndExclude([
760 trackValidatorJetCore
762 tracksValidationPhase2+=trackValidatorTPEtaGreater2p7
763 phase2_tracker.toReplaceWith(tracksValidation, tracksValidationPhase2)
765 fastSim.toReplaceWith(tracksValidation, tracksValidation.copyAndExclude([
766 trackValidatorBuildingPreSplitting,
767 trackValidatorConversion,
768 trackValidatorGsfTracks,
775 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"ByAlgoMask",
"algorithmMaskContains"],
776 names =
"_selectorsByAlgoMask", task =
"_tracksValidationSelectorsByAlgoMaskStandalone")
781 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"Pt09",
"generalTracksPt09"],
782 names =
"_selectorsPt09Standalone", task =
"_tracksValidationSelectorsPt09Standalone")
787 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"FromPV",
"generalTracksFromPV"],
788 names =
"_selectorsFromPVStandalone", task =
"_tracksValidationSelectorsFromPVStandalone")
793 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"FromPVPt09",
"generalTracksFromPVPt09"],
794 names =
"_selectorsFromPVPt09Standalone", task =
"_tracksValidationSelectorsFromPVPt09Standalone")
797 trackValidatorStandalone = trackValidator.clone(
800 trackValidatorTPPtLess09Standalone = trackValidatorTPPtLess09.clone(
803 for _eraName, _postfix, _era
in _relevantEras:
804 _setForEra(trackValidatorStandalone, _eraName, _era, label = trackValidator.label + locals()[
"_selectorsByAlgoMask"+_postfix] + locals()[
"_selectorsPt09Standalone"+_postfix])
805 _setForEra(trackValidatorTPPtLess09Standalone, _eraName, _era, label = trackValidatorTPPtLess09.label + locals()[
"_selectorsByAlgoMask"+_postfix] + locals()[
"_selectorsPt09Standalone"+_postfix])
807 trackValidatorFromPVStandalone = trackValidatorFromPV.clone(
810 for _eraName, _postfix, _era
in _relevantEras:
811 _setForEra(trackValidatorFromPVStandalone, _eraName, _era, label = trackValidatorFromPV.label + locals()[
"_selectorsFromPVStandalone"+_postfix] + locals()[
"_selectorsFromPVPt09Standalone"+_postfix])
814 trackValidatorFromPVAllTPStandalone = trackValidatorFromPVAllTP.clone(
815 label = trackValidatorFromPVStandalone.label.value(),
819 trackValidatorAllTPEfficStandalone = trackValidatorAllTPEffic.clone(
820 label = [ x
for x
in trackValidator.label.value()
if x
not in [
"cutsRecoTracksBtvLike",
"cutsRecoTracksAK4PFJets"]
and "Pt09" not in x],
824 trackValidatorConversionStandalone = trackValidatorConversion.clone(
825 label = [x
for x
in trackValidatorConversion.label
if x !=
"convStepTracks"],
829 trackValidatorBHadronStandalone = trackValidatorBHadron.clone(
830 label = [x
for x
in trackValidatorStandalone.label
if "Pt09" not in x],
834 trackValidatorGsfTracksStandalone = trackValidatorGsfTracks.clone(
839 tracksPreValidationStandalone = tracksPreValidation.copy()
840 tracksPreValidationStandalone.add(trackingParticlesBHadron)
841 tracksPreValidationStandalone.replace(highPtJetsForTrk,highPtJets)
842 fastSim.toReplaceWith(tracksPreValidationStandalone, tracksPreValidation)
844 tracksValidationSelectorsStandalone = cms.Task(
845 tracksValidationSelectorsByAlgoMaskStandalone,
846 tracksValidationSelectorsPt09Standalone,
847 tracksValidationSelectorsFromPVStandalone,
848 tracksValidationSelectorsFromPVPt09Standalone
853 _trackValidatorsBase = cms.Sequence(
854 trackValidatorStandalone +
855 trackValidatorTPPtLess09Standalone +
856 trackValidatorFromPVStandalone +
857 trackValidatorFromPVAllTPStandalone +
858 trackValidatorAllTPEfficStandalone +
859 trackValidatorConversionStandalone +
860 trackValidatorGsfTracksStandalone +
861 trackValidatorBHadronStandalone
864 _trackValidatorsBasePhase2 = _trackValidatorsBase.copy()
865 _trackValidatorsBasePhase2+=trackValidatorTPEtaGreater2p7
866 phase2_tracker.toReplaceWith(_trackValidatorsBase, _trackValidatorsBasePhase2)
868 trackValidatorsStandalone = _trackValidatorsBase.copy()
869 fastSim.toModify(trackValidatorsStandalone,
lambda x: x.remove(trackValidatorConversionStandalone) )
871 tracksValidationStandalone = cms.Sequence(
872 ak4PFL1FastL2L3CorrectorChain +
873 trackValidatorsStandalone,
874 tracksPreValidationStandalone,
875 tracksValidationSelectorsStandalone
881 tracksValidationSelectorsTrackingOnly = tracksValidationSelectors.copyAndExclude([ak4JetTracksAssociatorExplicitAll,cutsRecoTracksAK4PFJets])
882 _taskForEachEra(_addSeedToTrackProducers, args=[
"_seedProducers"], names=
"_seedSelectors", task=
"_tracksValidationSeedSelectorsTrackingOnly", includeFastSim=
True, modDict=globals())
883 _taskForEachEra(_addSeedToTrackProducers, args=[
"_seedProducersPreSplitting"], names=
"_seedSelectorsPreSplitting", task=
"_tracksValidationSeedSelectorsPreSplittingTrackingOnly", modDict=globals())
884 tracksValidationSeedSelectorsTrackingOnly.add(tracksValidationSeedSelectorsPreSplittingTrackingOnly)
887 trackValidatorTrackingOnly = trackValidatorStandalone.clone(
888 label = [ x
for x
in trackValidatorStandalone.label
if x !=
"cutsRecoTracksAK4PFJets"],
889 cores =
"highPtJetsForTrk"
892 trackValidatorSeedingTrackingOnly = _trackValidatorSeedingBuilding.clone(
893 dirName =
"Tracking/TrackSeeding/",
894 label = _seedSelectors,
896 doResolutionPlotsForLabels = [
"seedTracksjetCoreRegionalStepSeeds" ]
898 seedingDeepCore.toModify(trackValidatorSeedingTrackingOnly, doResolutionPlotsForLabels = [
"seedTracksjetCoreRegionalStepSeedsBarrel",
"seedTracksjetCoreRegionalStepSeedsEndcap"] )
900 trackValidatorSeedingPreSplittingTrackingOnly = trackValidatorSeedingTrackingOnly.clone(
901 associators = [
"quickTrackAssociatorByHitsPreSplitting"],
902 label = _seedSelectorsPreSplitting,
903 doSummaryPlots =
False,
907 trackValidatorJetCoreSeedingTrackingOnly = trackValidatorSeedingTrackingOnly.clone(
908 dirName =
"Tracking/JetCore/TrackSeeding/",
909 associators = [
"trackAssociatorByChi2"],
910 UseAssociators =
True,
914 for _eraName, _postfix, _era
in _relevantEras:
915 if 'jetCoreRegionalStep' in _cfg.iterationAlgos(_postfix) :
916 _setForEra(trackValidatorJetCoreSeedingTrackingOnly, _eraName, _era,
917 label = [
"seedTracksjetCoreRegionalStepSeedsBarrel",
"seedTracksjetCoreRegionalStepSeedsEndcap" ],
918 doResolutionPlotsForLabels = [
"seedTracksjetCoreRegionalStepSeedsBarrel",
"seedTracksjetCoreRegionalStepSeedsEndcap" ]
921 for _eraName, _postfix, _era
in _relevantErasAndFastSim:
922 _setForEra(trackValidatorSeedingTrackingOnly, _eraName, _era, label = locals()[
"_seedSelectors"+_postfix])
923 for _eraName, _postfix, _era
in _relevantEras:
924 _setForEra(trackValidatorSeedingPreSplittingTrackingOnly, _eraName, _era, label = locals()[
"_seedSelectorsPreSplitting"+_postfix])
927 trackValidatorConversionTrackingOnly = trackValidatorConversion.clone(label = [x
for x
in trackValidatorConversion.label
if x
not in [
"ckfInOutTracksFromConversions",
"ckfOutInTracksFromConversions"]])
929 trackValidatorBHadronTrackingOnly = trackValidatorBHadron.clone(label = [x
for x
in trackValidatorTrackingOnly.label
if "Pt09" not in x])
931 trackValidatorTPPtLess09TrackingOnly = trackValidatorTPPtLess09Standalone.clone(cores =
"highPtJetsForTrk")
932 trackValidatorFromPVTrackingOnly = trackValidatorFromPVStandalone.clone(cores =
"highPtJetsForTrk")
933 trackValidatorFromPVAllTPTrackingOnly = trackValidatorFromPVAllTPStandalone.clone(cores =
"highPtJetsForTrk")
934 trackValidatorAllTPEfficTrackingOnly = trackValidatorAllTPEfficStandalone.clone(cores =
"highPtJetsForTrk")
936 tracksPreValidationTrackingOnly = tracksPreValidationStandalone.copy()
937 tracksPreValidationTrackingOnly.replace(tracksValidationSelectors, tracksValidationSelectorsTrackingOnly)
938 tracksPreValidationTrackingOnly.replace(highPtJets,highPtJetsForTrk)
940 trackValidatorsTrackingOnly = _trackValidatorsBase.copy()
941 trackValidatorsTrackingOnly.replace(trackValidatorStandalone, trackValidatorTrackingOnly)
942 trackValidatorsTrackingOnly.replace(trackValidatorTPPtLess09Standalone,trackValidatorTPPtLess09TrackingOnly)
943 trackValidatorsTrackingOnly.replace(trackValidatorFromPVStandalone,trackValidatorFromPVTrackingOnly)
944 trackValidatorsTrackingOnly.replace(trackValidatorFromPVAllTPStandalone,trackValidatorFromPVAllTPTrackingOnly)
945 trackValidatorsTrackingOnly.replace(trackValidatorAllTPEfficStandalone,trackValidatorAllTPEfficTrackingOnly)
946 trackValidatorsTrackingOnly += trackValidatorSeedingTrackingOnly
947 trackValidatorsTrackingOnly += trackValidatorSeedingPreSplittingTrackingOnly
948 trackValidatorsTrackingOnly += trackValidatorBuilding
949 trackValidatorsTrackingOnly += trackValidatorBuildingPreSplitting
950 trackValidatorsTrackingOnly.replace(trackValidatorConversionStandalone, trackValidatorConversionTrackingOnly)
951 trackValidatorsTrackingOnly.remove(trackValidatorGsfTracksStandalone)
952 trackValidatorsTrackingOnly.replace(trackValidatorBHadronStandalone, trackValidatorBHadronTrackingOnly)
954 seedingDeepCore.toReplaceWith(trackValidatorsTrackingOnly, cms.Sequence(
955 trackValidatorsTrackingOnly.copy()+
956 trackValidatorJetCore+
957 trackValidatorJetCoreSeedingTrackingOnly
960 phase2_tracker.toReplaceWith(trackValidatorsTrackingOnly, trackValidatorsTrackingOnly.copyAndExclude([
961 trackValidatorJetCore,
962 trackValidatorJetCoreSeedingTrackingOnly
965 displacedTrackValidation.toReplaceWith(trackValidatorsTrackingOnly, cms.Sequence(trackValidatorsTrackingOnly.copy()+trackValidatorDisplaced))
967 fastSim.toReplaceWith(trackValidatorsTrackingOnly, trackValidatorsTrackingOnly.copyAndExclude([
968 trackValidatorBuildingPreSplitting,
969 trackValidatorSeedingPreSplittingTrackingOnly,
970 trackValidatorConversionTrackingOnly,
971 trackValidatorBHadronTrackingOnly
973 tracksValidationTrackingOnly = cms.Sequence(
974 trackValidatorsTrackingOnly,
975 tracksPreValidationTrackingOnly,
976 tracksValidationSelectorsStandalone,
977 tracksValidationSeedSelectorsTrackingOnly
982 trackingParticlePixelTrackAsssociation = trackingParticleRecoTrackAsssociation.clone(
983 label_tr =
"pixelTracks",
984 associator =
"quickTrackAssociatorByHitsPreSplitting",
986 PixelVertexAssociatorByPositionAndTracks = VertexAssociatorByPositionAndTracks.clone(
987 trackAssociation =
"trackingParticlePixelTrackAsssociation"
990 _pixelTracksCustom = dict(
992 vertexTag =
"pixelVertices",
995 trackRefSelector = cms.EDFilter(
'TrackRefSelector',
996 src = cms.InputTag(
'pixelTracks'),
1000 trackSelector = cms.EDFilter(
'TrackSelector',
1001 src = cms.InputTag(
'pixelTracks'),
1002 cut = cms.string(
"")
1005 cutstring =
"numberOfValidHits == 3"
1006 pixelTracks3hits = trackRefSelector.clone( cut = cutstring )
1008 cutstring =
"numberOfValidHits >= 4"
1009 pixelTracks4hits = trackRefSelector.clone( cut = cutstring )
1011 cutstring =
"pt > 0.9"
1012 pixelTracksPt09 = trackRefSelector.clone( cut = cutstring )
1015 pixelTracksFromPV = generalTracksFromPV.clone(quality =
"highPurity", ptMin = 0.0, ptMax = 99999., ptErrorCut = 99999., copyExtras =
True, **_pixelTracksCustom)
1017 pixelTracksFromPVPt09 = pixelTracksFromPV.clone(ptMin = 0.9)
1019 cutstring =
"numberOfValidHits >= 4"
1021 pixelTracksFromPV4hits = pixelTracksFromPV.clone( numberOfValidPixelHits = 4 )
1024 trackValidatorPixelTrackingOnly = trackValidator.clone(
1025 dirName =
"Tracking/PixelTrack/",
1027 "pixelTracks",
"pixelTracksPt09",
"pixelTracks3hits",
"pixelTracks4hits",
1028 "pixelTracksL",
"pixelTracksPt09L",
"pixelTracks3hitsL",
"pixelTracks4hitsL",
1029 "pixelTracksT",
"pixelTracksPt09T",
"pixelTracks3hitsT",
"pixelTracks4hitsT",
1030 "pixelTracksHP",
"pixelTracksPt09HP",
"pixelTracks3hitsHP",
"pixelTracks4hitsHP",
1032 doResolutionPlotsForLabels = [],
1033 trackCollectionForDrCalculation =
"pixelTracks",
1034 associators = [
"trackingParticlePixelTrackAsssociation"],
1035 label_vertex =
"pixelVertices",
1036 vertexAssociator =
"PixelVertexAssociatorByPositionAndTracks",
1037 dodEdxPlots =
False,
1038 cores = cms.InputTag(
""),
1040 trackValidatorFromPVPixelTrackingOnly = trackValidatorPixelTrackingOnly.clone(
1041 dirName =
"Tracking/PixelTrackFromPV/",
1043 "pixelTracksFromPV",
"pixelTracksFromPVPt09",
"pixelTracksFromPV4hits",
1044 "pixelTracksFromPVL",
"pixelTracksFromPVT",
"pixelTracksFromPVHP",
1045 "pixelTracksFromPVPt09L",
"pixelTracksFromPVPt09T",
"pixelTracksFromPVPt09HP",
1046 "pixelTracksFromPV4hitsL",
"pixelTracksFromPV4hitsT",
"pixelTracksFromPV4hitsHP",
1048 label_tp_effic =
"trackingParticlesSignal",
1049 label_tp_fake =
"trackingParticlesSignal",
1050 label_tp_effic_refvector =
True,
1051 label_tp_fake_refvector =
True,
1052 trackCollectionForDrCalculation =
"pixelTracksFromPV",
1053 doPlotsOnlyForTruePV =
True,
1054 doPVAssociationPlots =
False,
1055 doResolutionPlotsForLabels = [
"disabled"],
1057 trackValidatorFromPVAllTPPixelTrackingOnly = trackValidatorFromPVPixelTrackingOnly.clone(
1058 dirName =
"Tracking/PixelTrackFromPVAllTP/",
1059 label_tp_effic = trackValidatorPixelTrackingOnly.label_tp_effic.value(),
1060 label_tp_fake = trackValidatorPixelTrackingOnly.label_tp_fake.value(),
1061 label_tp_effic_refvector =
False,
1062 label_tp_fake_refvector =
False,
1064 doSimTrackPlots =
False,
1066 trackValidatorBHadronPixelTrackingOnly = trackValidatorPixelTrackingOnly.clone(
1067 dirName =
"Tracking/PixelTrackBHadron/",
1069 "pixelTracks",
"pixelTracksPt09",
1070 "pixelTracksL",
"pixelTracks3hitsL",
"pixelTracks4hitsL",
1071 "pixelTracksT",
"pixelTracks3hitsT",
"pixelTracks4hitsT",
1072 "pixelTracksHP",
"pixelTracks3hitsHP",
"pixelTracks4hitsHP",
1074 label_tp_effic =
"trackingParticlesBHadron",
1075 label_tp_effic_refvector =
True,
1077 doRecoTrackPlots =
False,
1078 dodEdxPlots =
False,
1081 tracksValidationTruthPixelTrackingOnly = tracksValidationTruth.copy()
1082 tracksValidationTruthPixelTrackingOnly.replace(trackingParticleRecoTrackAsssociation, trackingParticlePixelTrackAsssociation)
1083 tracksValidationTruthPixelTrackingOnly.replace(VertexAssociatorByPositionAndTracks, PixelVertexAssociatorByPositionAndTracks)
1084 tracksValidationTruthPixelTrackingOnly.add(trackingParticlesBHadron)
1085 tracksValidationTruthPixelTrackingOnly.add( pixelTracks3hits )
1086 tracksValidationTruthPixelTrackingOnly.add( pixelTracks4hits )
1087 tracksValidationTruthPixelTrackingOnly.add( pixelTracksPt09 )
1088 tracksValidationTruthPixelTrackingOnly.add( pixelTracksFromPV )
1089 tracksValidationTruthPixelTrackingOnly.add( pixelTracksFromPVPt09 )
1090 tracksValidationTruthPixelTrackingOnly.add( pixelTracksFromPV4hits )
1092 tracksPreValidationPixelTrackingOnly = cms.Task(
1093 tracksValidationTruthPixelTrackingOnly,
1094 trackingParticlesSignal)
1098 "L" : (1,
"loose", [
"loose",
"tight",
"highPurity"]),
1099 "T" : (2,
"tight", [
"tight",
"highPurity"]),
1100 "HP" : (4,
"highPurity",[
"highPurity"]),
1103 for key,value
in quality.items():
1104 qualityName = value[1]
1105 qualityBit = value[0]
1106 qualityList = value[2]
1108 label =
"pixelTracks"+
str(key)
1109 cutstring =
"qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1110 locals()[label] = trackRefSelector.clone( cut = cutstring )
1111 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1113 label =
"pixelTracksFromPV"+key
1115 locals()[label] = pixelTracksFromPV.clone( quality = qualityName )
1116 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1118 cutstring =
"pt > 0.9 & qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1119 label =
"pixelTracksPt09"+key
1120 locals()[label] = trackRefSelector.clone( cut = cutstring )
1121 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1123 label =
"pixelTracksFromPVPt09"+key
1125 locals()[label] = pixelTracksFromPVPt09.clone( quality = qualityName )
1126 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1128 label =
"pixelTracks4hits"+key
1129 cutstring =
"numberOfValidHits == 4 & qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1130 locals()[label] = trackRefSelector.clone( cut = cutstring )
1131 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1133 label =
"pixelTracksFromPV4hits"+key
1135 locals()[label] = pixelTracksFromPV4hits.clone( quality = qualityName )
1136 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1138 label =
"pixelTracks3hits"+key
1139 cutstring =
"numberOfValidHits == 3 & qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1140 locals()[label] = trackRefSelector.clone( cut = cutstring )
1141 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1143 tracksValidationPixelTrackingOnly = cms.Sequence(
1144 trackValidatorPixelTrackingOnly +
1145 trackValidatorFromPVPixelTrackingOnly +
1146 trackValidatorFromPVAllTPPixelTrackingOnly +
1147 trackValidatorBHadronPixelTrackingOnly,
1148 tracksPreValidationPixelTrackingOnly
1153 trackValidatorLite = trackValidator.clone(
1154 label = [
"generalTracks",
"cutsRecoTracksHp"]
1156 tracksValidationLite = cms.Sequence(
1159 tracksValidationTruth
1163 from Configuration.Eras.Modifier_phase2_timing_layer_cff
import phase2_timing_layer
1164 phase2_timing_layer.toModify( generalTracksFromPV,
1165 timesTag = cms.InputTag(
'tofPID:t0'),
1166 timeResosTag = cms.InputTag(
'tofPID:sigmat0'),
1167 nSigmaDtVertex = cms.double(3) )
1168 phase2_timing_layer.toModify( trackValidatorStandalone,
1169 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1170 phase2_timing_layer.toModify( trackValidatorFromPVStandalone,
1171 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1172 phase2_timing_layer.toModify( trackValidatorFromPVAllTPStandalone,
1173 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1174 phase2_timing_layer.toModify( trackValidatorConversionStandalone,
1175 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1176 phase2_timing_layer.toModify( trackValidatorGsfTracks,
1177 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )