1 from __future__
import absolute_import
2 import FWCore.ParameterSet.Config
as cms
8 from Validation.RecoTrack.trajectorySeedTracks_cfi
import trajectorySeedTracks
as _trajectorySeedTracks
15 from CommonTools.RecoAlgos.trackingParticleRefSelector_cfi
import trackingParticleRefSelector
as _trackingParticleRefSelector
16 from CommonTools.RecoAlgos.trackingParticleConversionRefSelector_cfi
import trackingParticleConversionRefSelector
as _trackingParticleConversionRefSelector
17 from SimTracker.TrackHistory.trackingParticleBHadronRefSelector_cfi
import trackingParticleBHadronRefSelector
as _trackingParticleBHadronRefSelector
19 from CommonTools.RecoAlgos.recoChargedRefCandidateToTrackRefProducer_cfi
import recoChargedRefCandidateToTrackRefProducer
as _recoChargedRefCandidateToTrackRefProducer
21 import RecoTracker.IterativeTracking.iterativeTkConfig
as _cfg
22 import RecoTracker.IterativeTracking.iterativeTkUtils
as _utils
23 from Configuration.Eras.Modifier_fastSim_cff
import fastSim
27 for _eraName, _postfix, _era
in _cfg.allEras():
28 _seedProd = [
"initialStepSeedsPreSplitting"]
29 _trackProd = [
"initialStepTracksPreSplitting"]
30 if _eraName
in [
"trackingLowPU",
"trackingPhase2PU140"]:
34 locals()[
"_algos"+_postfix] = [
"generalTracks"] + _cfg.iterationAlgos(_postfix) + [
"duplicateMerge"]
35 locals()[
"_seedProducersPreSplitting"+_postfix] = _seedProd
36 locals()[
"_trackProducersPreSplitting"+_postfix] = _trackProd
37 locals()[
"_seedProducers"+_postfix] = _cfg.seedProducers(_postfix)
38 locals()[
"_trackProducers"+_postfix] = _cfg.trackProducers(_postfix)
40 if _eraName !=
"trackingPhase2PU140":
41 locals()[
"_electronSeedProducers"+_postfix] = [
"tripletElectronSeeds",
"pixelPairElectronSeeds",
"stripPairElectronSeeds"]
43 locals()[
"_electronSeedProducers"+_postfix] = [
"tripletElectronSeeds"]
45 _removeForFastSimSeedProducers =[
"initialStepSeedsPreSplitting",
46 "jetCoreRegionalStepSeeds",
47 "jetCoreRegionalStepSeedsBarrel",
"jetCoreRegionalStepSeedsEndcap",
48 "muonSeededSeedsInOut",
49 "muonSeededSeedsOutIn"]
51 _seedProducers_fastSim = [ x
for x
in _seedProducers
if x
not in _removeForFastSimSeedProducers]
53 _removeForFastTrackProducers = [
"initialStepTracksPreSplitting",
54 "jetCoreRegionalStepTracks",
55 "muonSeededTracksInOut",
56 "muonSeededTracksOutIn"]
57 _trackProducers_fastSim = [ x
for x
in _trackProducers
if x
not in _removeForFastTrackProducers]
61 if algo !=
"generalTracks":
62 sel = algo[0].upper()+algo[1:]
63 return "cutsRecoTracks"+sel
69 if algo ==
"generalTracks":
72 if modName
not in modDict:
73 mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(
77 modDict[modName] = mod
79 mod = modDict[modName]
88 modNameHp = modName+
"Hp" 89 if modNameHp
not in modDict:
90 if algo ==
"generalTracks":
91 mod = cutsRecoTracks_cfi.cutsRecoTracks.clone(quality=[
"highPurity"])
93 mod = modDict[modName].
clone(quality=[
"highPurity"])
94 modDict[modNameHp] = mod
96 mod = modDict[modNameHp]
97 names.append(modNameHp)
103 for modName
in modules:
104 modNameNew = modName.replace(
"cutsRecoTracks",
"cutsRecoTracks"+midfix)
105 if modNameNew
not in modDict:
106 mod = modDict[modName].
clone(src=src)
107 modDict[modNameNew] = mod
109 mod = modDict[modNameNew]
110 names.append(modNameNew)
116 for modName
in modules:
117 if modName[-2:] ==
"Hp":
118 modNameNew = modName[:-2] + midfix +
"Hp" 120 modNameNew = modName + midfix
121 if modNameNew
not in modDict:
122 mod = modDict[modName].
clone()
123 setattr(mod, algoParam, mod.algorithm.value())
125 modDict[modNameNew] = mod
127 mod = modDict[modNameNew]
128 names.append(modNameNew)
134 for seed
in seedProducers:
135 modName =
"seedTracks"+seed
136 if modName
not in modDict:
137 mod = _trajectorySeedTracks.clone(src=seed)
138 modDict[modName] = mod
140 mod = modDict[modName]
141 names.append(modName)
145 _relevantEras = _cfg.allEras()
146 _relevantErasAndFastSim = _relevantEras + [(
"fastSim",
"_fastSim", fastSim)]
150 if isinstance(arg, list):
153 ret.append(modDict[arg+postfix])
155 def _taskForEachEra(function, args, names, task, modDict, plainArgs=[], modifyTask=None, includeFastSim=False):
157 raise Exception(
"Task name is expected to begin with _")
159 _eras = _relevantErasAndFastSim
if includeFastSim
else _relevantEras
160 for eraName, postfix, _era
in _eras:
162 _args.extend(plainArgs)
163 ret =
function(*_args, modDict=modDict)
165 raise Exception(
"_taskForEachEra is expected to return 2 values, but function returned %d" % len(ret))
166 modDict[names+postfix] = ret[0]
167 modDict[task+postfix] = ret[1]
170 defaultTaskName = task+_eras[0][0]
171 defaultTask = modDict[defaultTaskName]
172 modDict[defaultTaskName[1:]] = defaultTask
175 if modifyTask
is not None:
176 for eraName, postfix, _era
in _eras:
180 for _eraName, _postfix, _era
in _eras[1:]:
181 _era.toReplaceWith(defaultTask, modDict[task+_postfix])
184 for key, value
in kwargs.items():
185 setattr(module, key, value)
187 era.toModify(module, **kwargs)
191 def _findSeedingLayers(name):
192 prod = getattr(config, name)
193 if hasattr(prod,
"triplets"):
194 if hasattr(prod,
"layerList"):
195 return prod.layerList.refToPSet_.value()
196 return _findSeedingLayers(prod.triplets.getModuleLabel())
197 elif hasattr(prod,
"doublets"):
198 return _findSeedingLayers(prod.doublets.getModuleLabel())
199 label = prod.trackingRegionsSeedingLayers.getModuleLabel()
202 return prod.seedingLayers.getModuleLabel()
204 seedingLayersMerged = []
205 for seedName
in seedProducers:
206 seedProd = getattr(config, seedName)
207 seedingLayersName =
None 209 if hasattr(seedProd,
"OrderedHitsFactoryPSet"):
210 seedingLayersName = seedProd.OrderedHitsFactoryPSet.SeedingLayers.getModuleLabel()
211 elif hasattr(seedProd,
"seedingHitSets"):
212 seedingLayersName = _findSeedingLayers(seedProd.seedingHitSets.getModuleLabel())
213 elif hasattr(seedProd,
"layerList"):
214 seedingLayers = seedProd.layerList.value()
218 if seedingLayersName
is not None:
219 seedingLayers = getattr(config, seedingLayersName).layerList.value()
220 for layerSet
in seedingLayers:
221 if layerSet
not in seedingLayersMerged:
222 seedingLayersMerged.append(layerSet)
224 return seedingLayersMerged
227 for _eraName, _postfix, _era
in _relevantErasAndFastSim:
230 if "_electronSeedProducers"+_postfix
in locals():
231 for _layer
in _getSeedingLayers(locals()[
"_electronSeedProducers"+_postfix], _ElectronSeeds_cff):
232 if _layer
not in _stdLayers:
233 _eleLayers.append(_layer)
235 locals()[
"_seedingLayerSets"+_postfix] = _stdLayers
236 locals()[
"_seedingLayerSetsForElectrons"+_postfix] = _eleLayers
241 mvaSel = _utils.getMVASelectors(postfix)
243 pset = cms.untracked.PSet()
244 for iteration, (trackProducer, classifiers)
in mvaSel.items():
245 setattr(pset, trackProducer, cms.untracked.vstring(classifiers))
247 for _eraName, _postfix, _era
in _relevantEras:
251 _taskForEachEra(_addSelectorsByAlgo, args=[
"_algos"], names=
"_selectorsByAlgo", task=
"_tracksValidationSelectorsByAlgo", modDict=globals())
254 _taskForEachEra(_addSelectorsByHp, args=[
"_algos"], names=
"_selectorsByAlgoHp", task=
"_tracksValidationSelectorsByAlgoHp", modDict=globals())
257 for _eraName, _postfix, _era
in _relevantEras:
258 locals()[
"_selectorsByAlgoAndHp"+_postfix] = locals()[
"_selectorsByAlgo"+_postfix] + locals()[
"_selectorsByAlgoHp"+_postfix]
260 locals()[
"_selectorsByAlgoAndHpNoGenTk"+_postfix] = [n
for n
in locals()[
"_selectorsByAlgoAndHp"+_postfix]
if n
not in [
"generalTracks",
"cutsRecoTracksHp"]]
262 locals()[
"_selectorsByAlgoAndHpNoGenTkDupMerge"+_postfix] = [n
for n
in locals()[
"_selectorsByAlgoAndHpNoGenTk"+_postfix]
if n
not in [
"cutsRecoTracksDuplicateMerge",
"cutsRecoTracksDuplicateMergeHp"]]
264 args = [
"_selectorsByAlgoAndHpNoGenTkDupMerge"], plainArgs = [
"ByOriginalAlgo",
"originalAlgorithm"],
265 names =
"_selectorsByOriginalAlgo", task =
"_tracksValidationSelectorsByOriginalAlgo")
268 for _eraName, _postfix, _era
in _relevantEras:
269 selectors = locals()[
"_selectorsByAlgoHp"+_postfix]
270 locals()[
"_generalTracksHp"+_postfix] = selectors[0]
271 locals()[
"_selectorsByAlgoHp"+_postfix] = selectors[1:]
274 import PhysicsTools.RecoAlgos.btvTracks_cfi
as btvTracks_cfi
275 cutsRecoTracksBtvLike = btvTracks_cfi.btvTrackRefs.clone()
279 ak4JetTracksAssociatorExplicitAll = ak4JTA_cff.ak4JetTracksAssociatorExplicit.clone(
283 import JetMETCorrections.JetCorrector.jetTracksAssociationToTrackRefs_cfi
as jetTracksAssociationToTrackRefs_cfi
284 cutsRecoTracksAK4PFJets = jetTracksAssociationToTrackRefs_cfi.jetTracksAssociationToTrackRefs.clone(
285 association =
"ak4JetTracksAssociatorExplicitAll",
292 trackingParticlesSignal = _trackingParticleRefSelector.clone(
302 trackingParticlesInTime = trackingParticlesSignal.clone(
308 generalTracksPt09 = cutsRecoTracks_cfi.cutsRecoTracks.clone(ptMin=0.9)
311 args=[[
"_generalTracksHp"]],
312 plainArgs=[
"Pt09",
"generalTracksPt09"],
313 names=
"_selectorsPt09", task=
"_tracksValidationSelectorsPt09",
314 modifyTask=
lambda task:task.add(generalTracksPt09))
318 generalTracksFromPV = _trackWithVertexRefSelector.clone(
319 src =
"generalTracks",
324 vertexTag =
"offlinePrimaryVertices",
332 args=[[
"_generalTracksHp"]],
333 plainArgs=[
"FromPV",
"generalTracksFromPV"],
334 names=
"_selectorsFromPV", task=
"_tracksValidationSelectorsFromPV",
335 modifyTask=
lambda task: task.add(generalTracksFromPV))
338 generalTracksFromPVPt09 = generalTracksPt09.clone(src=
"generalTracksFromPV")
341 args=[[
"_generalTracksHp"]],
342 plainArgs=[
"FromPVPt09",
"generalTracksFromPVPt09"],
343 names=
"_selectorsFromPVPt09", task=
"_tracksValidationSelectorsFromPVPt09",
344 modifyTask=
lambda task: task.add(generalTracksFromPVPt09))
347 trackingParticlesConversion = _trackingParticleConversionRefSelector.clone()
350 trackingParticlesElectron = _trackingParticleRefSelector.clone(
361 highPtJets = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"ak4CaloJets"), cut = cms.string(
"pt()>1000"))
362 highPtJetsForTrk = highPtJets.clone(src =
"ak4CaloJetsForTrk")
365 trackingParticlesBHadron = _trackingParticleBHadronRefSelector.clone()
368 trackValidator = Validation.RecoTrack.MultiTrackValidator_cfi.multiTrackValidator.clone(
369 useLogPt = cms.untracked.bool(
True),
371 doPVAssociationPlots =
True 376 fastSim.toModify(trackValidator,
379 for _eraName, _postfix, _era
in _relevantEras:
381 label = [
"generalTracks", locals()[
"_generalTracksHp"+_postfix]] +
382 locals()[
"_selectorsByAlgo"+_postfix] + locals()[
"_selectorsByAlgoHp"+_postfix] +
383 locals()[
"_selectorsByOriginalAlgo"+_postfix] +
384 [
"generalTracksPt09"] + locals()[
"_selectorsPt09"+_postfix] +
386 "cutsRecoTracksBtvLike",
387 "cutsRecoTracksAK4PFJets" 389 doResolutionPlotsForLabels = [
391 locals()[
"_generalTracksHp"+_postfix],
393 "cutsRecoTracksBtvLike",
394 "cutsRecoTracksJetCoreRegionalStepByOriginalAlgo",
397 _setForEra(trackValidator.histoProducerAlgoBlock, _eraName, _era, seedingLayerSets=locals()[
"_seedingLayerSets"+_postfix])
400 trackValidatorTPPtLess09 = trackValidator.clone(
401 dirName =
"Tracking/TrackTPPtLess09/",
402 label = [x
for x
in trackValidator.label.value()
if (
"Pt09" not in x)
and (
"BtvLike" not in x)
and (
"AK4PFJets" not in x)],
404 histoProducerAlgoBlock = dict(
405 TpSelectorForEfficiencyVsEta = dict(ptMin=0.05),
406 TpSelectorForEfficiencyVsPhi = dict(ptMin=0.05),
407 TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.05),
408 TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.05),
411 doRecoTrackPlots =
False,
412 doResolutionPlotsForLabels = [
"disabled"],
416 trackingParticlesEtaGreater2p7 = _trackingParticleRefSelector.clone(
417 signalOnly = cms.bool(
False),
422 invertRapidityCut = cms.bool(
True),
428 generalTracksEtaGreater2p7 = cutsRecoTracks_cfi.cutsRecoTracks.clone(
429 minRapidity = cms.double(-2.7),
430 maxRapidity = cms.double( 2.7),
431 invertRapidityCut = cms.bool(
True)
435 args=[[
"_generalTracksHp"]],
436 plainArgs=[
"EtaGreater2p7",
"generalTracksEtaGreater2p7"],
437 names=
"_selectorsEtaGreater2p7", task=
"_tracksValidationSelectorsEtaGreater2p7",
438 modifyTask=
lambda task: task.add(generalTracksEtaGreater2p7))
441 trackValidatorTPEtaGreater2p7 = trackValidator.clone(
442 dirName =
"Tracking/TrackTPEtaGreater2p7/",
443 label_tp_effic =
"trackingParticlesEtaGreater2p7",
444 label_tp_fake =
"trackingParticlesEtaGreater2p7",
445 label_tp_effic_refvector =
True,
446 label_tp_fake_refvector =
True,
449 minRapidityTP = -2.7,
451 invertRapidityCutTP =
True,
453 histoProducerAlgoBlock = dict(
454 TpSelectorForEfficiencyVsPt = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
455 TpSelectorForEfficiencyVsEta = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
456 TpSelectorForEfficiencyVsPhi = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
457 TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
458 TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
459 generalTpSelector = dict(ptMin=0.005,minRapidity=-2.7,maxRapidity=2.7,invertRapidityCut=
True),
466 doRecoTrackPlots =
True,
467 doResolutionPlotsForLabels = [
"disabled"]
469 for _eraName, _postfix, _era
in _relevantEras:
470 _setForEra(trackValidatorTPEtaGreater2p7, _eraName, _era,
471 label = [
"generalTracksEtaGreater2p7"] + locals()[
"_selectorsEtaGreater2p7"+_postfix] +
472 locals()[
"_selectorsByAlgo"+_postfix] + locals()[
"_selectorsByAlgoHp"+_postfix],
473 doResolutionPlotsForLabels = [
"generalTracksEtaGreater2p7"] + locals()[
"_selectorsEtaGreater2p7"+_postfix]
478 trackValidatorFromPV = trackValidator.clone(
479 dirName =
"Tracking/TrackFromPV/",
480 label_tp_effic =
"trackingParticlesSignal",
481 label_tp_fake =
"trackingParticlesSignal",
482 label_tp_effic_refvector =
True,
483 label_tp_fake_refvector =
True,
484 trackCollectionForDrCalculation =
"generalTracksFromPV",
485 doPlotsOnlyForTruePV =
True,
486 doPVAssociationPlots =
False,
487 doResolutionPlotsForLabels = [
"disabled"],
489 for _eraName, _postfix, _era
in _relevantEras:
490 _setForEra(trackValidatorFromPV, _eraName, _era,
491 label = [
"generalTracksFromPV"] + locals()[
"_selectorsFromPV"+_postfix] + [
"generalTracksFromPVPt09"] + locals()[
"_selectorsFromPVPt09"+_postfix],
492 doResolutionPlotsForLabels = []
497 trackValidatorFromPVAllTP = trackValidatorFromPV.clone(
498 dirName =
"Tracking/TrackFromPVAllTP/",
499 label_tp_effic = trackValidator.label_tp_effic.value(),
500 label_tp_fake = trackValidator.label_tp_fake.value(),
501 label_tp_effic_refvector =
False,
502 label_tp_fake_refvector =
False,
504 doSimTrackPlots =
False,
505 doResolutionPlotsForLabels = [
"disabled"],
509 trackValidatorAllTPEffic = trackValidator.clone(
510 dirName =
"Tracking/TrackAllTPEffic/",
511 label = [x
for x
in trackValidator.label.value()
if "Pt09" not in x],
513 doRecoTrackPlots =
True,
514 doPVAssociationPlots =
False,
515 doResolutionPlotsForLabels = [
"disabled"],
517 trackValidatorAllTPEffic.histoProducerAlgoBlock.generalTpSelector.signalOnly =
False 518 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsEta.signalOnly =
False 519 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPhi.signalOnly =
False 520 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsPt.signalOnly =
False 521 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXR.signalOnly =
False 522 trackValidatorAllTPEffic.histoProducerAlgoBlock.TpSelectorForEfficiencyVsVTXZ.signalOnly =
False 523 for _eraName, _postfix, _era
in _relevantEras:
524 _setForEra(trackValidatorAllTPEffic, _eraName, _era, label = [
"generalTracks", locals()[
"_generalTracksHp"+_postfix]])
527 tpClusterProducerPreSplitting = tpClusterProducer.clone(pixelClusterSrc =
"siPixelClustersPreSplitting")
528 quickTrackAssociatorByHitsPreSplitting = quickTrackAssociatorByHits.clone(cluster2TPSrc =
"tpClusterProducerPreSplitting")
529 _trackValidatorSeedingBuilding = trackValidator.clone(
530 associators = [
"quickTrackAssociatorByHits"],
531 UseAssociators =
True,
533 doPVAssociationPlots =
False,
535 doResolutionPlotsForLabels = [
"disabled"],
537 trackValidatorBuilding = _trackValidatorSeedingBuilding.clone(
538 dirName =
"Tracking/TrackBuilding/",
540 doResolutionPlotsForLabels = [
'jetCoreRegionalStepTracks'],
542 trackValidatorBuildingPreSplitting = trackValidatorBuilding.clone(
543 associators = [
"quickTrackAssociatorByHitsPreSplitting"],
545 doSummaryPlots =
False,
547 for _eraName, _postfix, _era
in _relevantErasAndFastSim:
548 _setForEra(trackValidatorBuilding, _eraName, _era, label = locals()[
"_trackProducers"+_postfix])
549 fastSim.toModify(trackValidatorBuilding, doMVAPlots=
False)
550 for _eraName, _postfix, _era
in _relevantEras:
551 _setForEra(trackValidatorBuilding, _eraName, _era, mvaLabels = locals()[
"_mvaSelectors"+_postfix])
552 _setForEra(trackValidatorBuildingPreSplitting, _eraName, _era, label = locals()[
"_trackProducersPreSplitting"+_postfix])
556 trackValidatorConversion = trackValidator.clone(
557 dirName =
"Tracking/TrackConversion/",
560 "conversionStepTracks",
561 "ckfInOutTracksFromConversions",
562 "ckfOutInTracksFromConversions",
564 label_tp_effic =
"trackingParticlesConversion",
565 label_tp_effic_refvector =
True,
566 associators = [
"quickTrackAssociatorByHits"],
567 UseAssociators =
True,
570 doPVAssociationPlots =
False,
571 calculateDrSingleCollection =
False,
575 firstLayers = [layerSet.split(
"+")[0]
for layerSet
in layerList]
577 for l
in firstLayers:
582 if l.startswith(
"TEC"):
588 trackValidatorConversion.histoProducerAlgoBlock.seedingLayerSets =
_uniqueFirstLayers(_convLayerPairs.layerList.value())
590 for n
in [
"Eta",
"Phi",
"Pt",
"VTXR",
"VTXZ"]:
591 pset = getattr(trackValidatorConversion.histoProducerAlgoBlock,
"TpSelectorForEfficiencyVs"+n)
592 pset.lip = trackValidatorConversion.lipTP.value()
593 pset.tip = trackValidatorConversion.tipTP.value()
596 trackValidatorGsfTracks = trackValidatorConversion.clone(
597 dirName =
"Tracking/TrackGsf/",
598 label = [
"electronGsfTracks"],
599 label_tp_effic =
"trackingParticlesElectron",
602 for _eraName, _postfix, _era
in _relevantEras:
603 _setForEra(trackValidatorGsfTracks.histoProducerAlgoBlock, _eraName, _era, seedingLayerSets=trackValidator.histoProducerAlgoBlock.seedingLayerSets.value()+locals()[
"_seedingLayerSetsForElectrons"+_postfix])
606 trackValidatorJetCore = trackValidator.clone(
607 dirName =
"Tracking/JetCore/",
608 useLogPt = cms.untracked.bool(
True),
610 associators= [
"trackAssociatorByChi2"],
611 UseAssociators =
True,
612 doPVAssociationPlots =
True,
613 label_tp_effic =
"trackingParticlesInTime",
614 label_tp_fake =
"trackingParticlesInTime",
615 label_tp_effic_refvector =
True,
616 label_tp_fake_refvector =
True,
618 for _eraName, _postfix, _era
in _relevantEras:
619 if 'jetCoreRegionalStep' in _cfg.iterationAlgos(_postfix) :
620 _setForEra(trackValidatorJetCore, _eraName, _era,
621 label = [
"generalTracks",
"jetCoreRegionalStepTracks",
622 "cutsRecoTracksJetCoreRegionalStepByOriginalAlgo",
"cutsRecoTracksJetCoreRegionalStepByOriginalAlgoHp",
623 "cutsRecoTracksJetCoreRegionalStep",
"cutsRecoTracksJetCoreRegionalStepHp"],
624 doResolutionPlotsForLabels =[
"generalTracks",
"jetCoreRegionalStepTracks",
625 "cutsRecoTracksJetCoreRegionalStepByOriginalAlgo",
"cutsRecoTracksJetCoreRegionalStepByOriginalAlgoHp",
626 "cutsRecoTracksJetCoreRegionalStep",
"cutsRecoTracksJetCoreRegionalStepHp"],
630 trackValidatorBHadron = trackValidator.clone(
631 dirName =
"Tracking/TrackBHadron/",
632 label_tp_effic =
"trackingParticlesBHadron",
633 label_tp_effic_refvector =
True,
635 doRecoTrackPlots =
False,
638 for _eraName, _postfix, _era
in _relevantEras:
639 _setForEra(trackValidatorBHadron, _eraName, _era,
640 label = [
"generalTracks", locals()[
"_generalTracksHp"+_postfix],
"cutsRecoTracksBtvLike"]
645 trackValidatorDisplaced = trackValidator.clone(
646 dirName =
"Tracking/TrackDisplaced/",
647 label = [x
for x
in trackValidator.label.value()
if (
"Pt09" not in x)
and (
"BtvLike" not in x)
and (
"AK4PFJets" not in x)],
650 invertRapidityCutTP =
False,
651 histoProducerAlgoBlock = dict(
652 TpSelectorForEfficiencyVsPt = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
653 TpSelectorForEfficiencyVsEta = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
654 TpSelectorForEfficiencyVsPhi = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
655 TpSelectorForEfficiencyVsVTXR = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
656 TpSelectorForEfficiencyVsVTXZ = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
657 generalTpSelector = dict(ptMin=0.005, signalOnly=
True, tip=1e5, lip=1e5),
671 tracksValidationSelectors = cms.Task(
672 tracksValidationSelectorsByAlgo,
673 tracksValidationSelectorsByAlgoHp,
674 tracksValidationSelectorsByOriginalAlgo,
675 cutsRecoTracksBtvLike,
676 ak4JetTracksAssociatorExplicitAll,
677 cutsRecoTracksAK4PFJets
679 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(generalTracksEtaGreater2p7))
680 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(cutsRecoTracksEtaGreater2p7Hp))
685 names=
"_selectorsByAlgo", task=
"_tracksEtaGreater2p7ValidationSelectorsByAlgo" 691 names=
"_selectorsByAlgoHp", task=
"_tracksEtaGreater2p7ValidationSelectorsByAlgoHp" 694 for _eraName, _postfix, _era
in _relevantEras:
695 selectors = locals()[
"_selectorsByAlgoHp"+_postfix]
696 locals()[
"_generalTracksHp"+_postfix] = selectors[0]
697 locals()[
"_selectorsByAlgoHp"+_postfix] = selectors[1:]
699 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(tracksEtaGreater2p7ValidationSelectorsByAlgo))
700 phase2_tracker.toModify(tracksValidationSelectors,
lambda x: x.add(tracksEtaGreater2p7ValidationSelectorsByAlgoHp))
702 tracksValidationTruth = cms.Task(
704 tpClusterProducerPreSplitting,
705 trackAssociatorByChi2,
706 quickTrackAssociatorByHits,
707 quickTrackAssociatorByHitsPreSplitting,
708 trackingParticleRecoTrackAsssociation,
709 VertexAssociatorByPositionAndTracks,
710 trackingParticleNumberOfLayersProducer
712 fastSim.toModify(tracksValidationTruth,
lambda x: x.remove(tpClusterProducer))
714 tracksPreValidation = cms.Task(
716 tracksValidationSelectors,
717 tracksValidationSelectorsPt09,
718 tracksValidationSelectorsFromPV,
719 tracksValidationSelectorsFromPVPt09,
720 tracksValidationTruth,
721 trackingParticlesSignal,
722 trackingParticlesInTime,
723 trackingParticlesElectron,
724 trackingParticlesConversion
726 fastSim.toReplaceWith(tracksPreValidation, tracksPreValidation.copyAndExclude([
727 trackingParticlesElectron,
728 trackingParticlesConversion,
733 tracksValidation = cms.Sequence(
735 trackValidatorTPPtLess09 +
736 trackValidatorFromPV +
737 trackValidatorFromPVAllTP +
738 trackValidatorAllTPEffic +
739 trackValidatorBuilding +
740 trackValidatorBuildingPreSplitting +
741 trackValidatorConversion +
742 trackValidatorGsfTracks,
746 from Configuration.ProcessModifiers.seedingDeepCore_cff
import seedingDeepCore
747 seedingDeepCore.toReplaceWith(tracksValidation, cms.Sequence(tracksValidation.copy()+trackValidatorJetCore))
749 from Configuration.ProcessModifiers.displacedTrackValidation_cff
import displacedTrackValidation
750 displacedTrackValidation.toReplaceWith(tracksValidation, cms.Sequence(tracksValidation.copy()+trackValidatorDisplaced))
752 from Configuration.Eras.Modifier_phase2_tracker_cff
import phase2_tracker
753 tracksPreValidationPhase2 = tracksPreValidation.copy()
754 tracksPreValidationPhase2.add(trackingParticlesEtaGreater2p7)
755 phase2_tracker.toReplaceWith(tracksPreValidation, tracksPreValidationPhase2)
757 tracksValidationPhase2 = tracksValidation.copyAndExclude([
758 trackValidatorJetCore
760 tracksValidationPhase2+=trackValidatorTPEtaGreater2p7
761 phase2_tracker.toReplaceWith(tracksValidation, tracksValidationPhase2)
763 fastSim.toReplaceWith(tracksValidation, tracksValidation.copyAndExclude([
764 trackValidatorBuildingPreSplitting,
765 trackValidatorConversion,
766 trackValidatorGsfTracks,
773 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"ByAlgoMask",
"algorithmMaskContains"],
774 names =
"_selectorsByAlgoMask", task =
"_tracksValidationSelectorsByAlgoMaskStandalone")
779 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"Pt09",
"generalTracksPt09"],
780 names =
"_selectorsPt09Standalone", task =
"_tracksValidationSelectorsPt09Standalone")
785 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"FromPV",
"generalTracksFromPV"],
786 names =
"_selectorsFromPVStandalone", task =
"_tracksValidationSelectorsFromPVStandalone")
791 args = [
"_selectorsByAlgoAndHpNoGenTk"], plainArgs = [
"FromPVPt09",
"generalTracksFromPVPt09"],
792 names =
"_selectorsFromPVPt09Standalone", task =
"_tracksValidationSelectorsFromPVPt09Standalone")
795 trackValidatorStandalone = trackValidator.clone(
798 trackValidatorTPPtLess09Standalone = trackValidatorTPPtLess09.clone(
801 for _eraName, _postfix, _era
in _relevantEras:
802 _setForEra(trackValidatorStandalone, _eraName, _era, label = trackValidator.label + locals()[
"_selectorsByAlgoMask"+_postfix] + locals()[
"_selectorsPt09Standalone"+_postfix])
803 _setForEra(trackValidatorTPPtLess09Standalone, _eraName, _era, label = trackValidatorTPPtLess09.label + locals()[
"_selectorsByAlgoMask"+_postfix] + locals()[
"_selectorsPt09Standalone"+_postfix])
805 trackValidatorFromPVStandalone = trackValidatorFromPV.clone(
808 for _eraName, _postfix, _era
in _relevantEras:
809 _setForEra(trackValidatorFromPVStandalone, _eraName, _era, label = trackValidatorFromPV.label + locals()[
"_selectorsFromPVStandalone"+_postfix] + locals()[
"_selectorsFromPVPt09Standalone"+_postfix])
812 trackValidatorFromPVAllTPStandalone = trackValidatorFromPVAllTP.clone(
813 label = trackValidatorFromPVStandalone.label.value(),
817 trackValidatorAllTPEfficStandalone = trackValidatorAllTPEffic.clone(
818 label = [ x
for x
in trackValidator.label.value()
if x
not in [
"cutsRecoTracksBtvLike",
"cutsRecoTracksAK4PFJets"]
and "Pt09" not in x],
822 trackValidatorConversionStandalone = trackValidatorConversion.clone(
823 label = [x
for x
in trackValidatorConversion.label
if x !=
"convStepTracks"],
827 trackValidatorBHadronStandalone = trackValidatorBHadron.clone(
828 label = [x
for x
in trackValidatorStandalone.label
if "Pt09" not in x],
832 trackValidatorGsfTracksStandalone = trackValidatorGsfTracks.clone(
837 tracksPreValidationStandalone = tracksPreValidation.copy()
838 tracksPreValidationStandalone.add(trackingParticlesBHadron)
839 tracksPreValidationStandalone.replace(highPtJetsForTrk,highPtJets)
840 fastSim.toReplaceWith(tracksPreValidationStandalone, tracksPreValidation)
842 tracksValidationSelectorsStandalone = cms.Task(
843 tracksValidationSelectorsByAlgoMaskStandalone,
844 tracksValidationSelectorsPt09Standalone,
845 tracksValidationSelectorsFromPVStandalone,
846 tracksValidationSelectorsFromPVPt09Standalone
851 _trackValidatorsBase = cms.Sequence(
852 trackValidatorStandalone +
853 trackValidatorTPPtLess09Standalone +
854 trackValidatorFromPVStandalone +
855 trackValidatorFromPVAllTPStandalone +
856 trackValidatorAllTPEfficStandalone +
857 trackValidatorConversionStandalone +
858 trackValidatorGsfTracksStandalone +
859 trackValidatorBHadronStandalone
862 _trackValidatorsBasePhase2 = _trackValidatorsBase.copy()
863 _trackValidatorsBasePhase2+=trackValidatorTPEtaGreater2p7
864 phase2_tracker.toReplaceWith(_trackValidatorsBase, _trackValidatorsBasePhase2)
866 trackValidatorsStandalone = _trackValidatorsBase.copy()
867 fastSim.toModify(trackValidatorsStandalone,
lambda x: x.remove(trackValidatorConversionStandalone) )
869 tracksValidationStandalone = cms.Sequence(
870 ak4PFL1FastL2L3CorrectorChain +
871 trackValidatorsStandalone,
872 tracksPreValidationStandalone,
873 tracksValidationSelectorsStandalone
879 tracksValidationSelectorsTrackingOnly = tracksValidationSelectors.copyAndExclude([ak4JetTracksAssociatorExplicitAll,cutsRecoTracksAK4PFJets])
880 _taskForEachEra(_addSeedToTrackProducers, args=[
"_seedProducers"], names=
"_seedSelectors", task=
"_tracksValidationSeedSelectorsTrackingOnly", includeFastSim=
True, modDict=globals())
881 _taskForEachEra(_addSeedToTrackProducers, args=[
"_seedProducersPreSplitting"], names=
"_seedSelectorsPreSplitting", task=
"_tracksValidationSeedSelectorsPreSplittingTrackingOnly", modDict=globals())
882 tracksValidationSeedSelectorsTrackingOnly.add(tracksValidationSeedSelectorsPreSplittingTrackingOnly)
885 trackValidatorTrackingOnly = trackValidatorStandalone.clone(
886 label = [ x
for x
in trackValidatorStandalone.label
if x !=
"cutsRecoTracksAK4PFJets"],
887 cores =
"highPtJetsForTrk" 890 trackValidatorSeedingTrackingOnly = _trackValidatorSeedingBuilding.clone(
891 dirName =
"Tracking/TrackSeeding/",
892 label = _seedSelectors,
894 doResolutionPlotsForLabels = [
"seedTracksjetCoreRegionalStepSeeds" ]
896 seedingDeepCore.toModify(trackValidatorSeedingTrackingOnly, doResolutionPlotsForLabels = [
"seedTracksjetCoreRegionalStepSeedsBarrel",
"seedTracksjetCoreRegionalStepSeedsEndcap"] )
898 trackValidatorSeedingPreSplittingTrackingOnly = trackValidatorSeedingTrackingOnly.clone(
899 associators = [
"quickTrackAssociatorByHitsPreSplitting"],
900 label = _seedSelectorsPreSplitting,
901 doSummaryPlots =
False,
905 trackValidatorJetCoreSeedingTrackingOnly = trackValidatorSeedingTrackingOnly.clone(
906 dirName =
"Tracking/JetCore/TrackSeeding/",
907 associators = [
"trackAssociatorByChi2"],
908 UseAssociators =
True,
912 for _eraName, _postfix, _era
in _relevantEras:
913 if 'jetCoreRegionalStep' in _cfg.iterationAlgos(_postfix) :
914 _setForEra(trackValidatorJetCoreSeedingTrackingOnly, _eraName, _era,
915 label = [
"seedTracksjetCoreRegionalStepSeedsBarrel",
"seedTracksjetCoreRegionalStepSeedsEndcap" ],
916 doResolutionPlotsForLabels = [
"seedTracksjetCoreRegionalStepSeedsBarrel",
"seedTracksjetCoreRegionalStepSeedsEndcap" ]
919 for _eraName, _postfix, _era
in _relevantErasAndFastSim:
920 _setForEra(trackValidatorSeedingTrackingOnly, _eraName, _era, label = locals()[
"_seedSelectors"+_postfix])
921 for _eraName, _postfix, _era
in _relevantEras:
922 _setForEra(trackValidatorSeedingPreSplittingTrackingOnly, _eraName, _era, label = locals()[
"_seedSelectorsPreSplitting"+_postfix])
925 trackValidatorConversionTrackingOnly = trackValidatorConversion.clone(label = [x
for x
in trackValidatorConversion.label
if x
not in [
"ckfInOutTracksFromConversions",
"ckfOutInTracksFromConversions"]])
927 trackValidatorBHadronTrackingOnly = trackValidatorBHadron.clone(label = [x
for x
in trackValidatorTrackingOnly.label
if "Pt09" not in x])
929 trackValidatorTPPtLess09TrackingOnly = trackValidatorTPPtLess09Standalone.clone(cores =
"highPtJetsForTrk")
930 trackValidatorFromPVTrackingOnly = trackValidatorFromPVStandalone.clone(cores =
"highPtJetsForTrk")
931 trackValidatorFromPVAllTPTrackingOnly = trackValidatorFromPVAllTPStandalone.clone(cores =
"highPtJetsForTrk")
932 trackValidatorAllTPEfficTrackingOnly = trackValidatorAllTPEfficStandalone.clone(cores =
"highPtJetsForTrk")
934 tracksPreValidationTrackingOnly = tracksPreValidationStandalone.copy()
935 tracksPreValidationTrackingOnly.replace(tracksValidationSelectors, tracksValidationSelectorsTrackingOnly)
936 tracksPreValidationTrackingOnly.replace(highPtJets,highPtJetsForTrk)
938 trackValidatorsTrackingOnly = _trackValidatorsBase.copy()
939 trackValidatorsTrackingOnly.replace(trackValidatorStandalone, trackValidatorTrackingOnly)
940 trackValidatorsTrackingOnly.replace(trackValidatorTPPtLess09Standalone,trackValidatorTPPtLess09TrackingOnly)
941 trackValidatorsTrackingOnly.replace(trackValidatorFromPVStandalone,trackValidatorFromPVTrackingOnly)
942 trackValidatorsTrackingOnly.replace(trackValidatorFromPVAllTPStandalone,trackValidatorFromPVAllTPTrackingOnly)
943 trackValidatorsTrackingOnly.replace(trackValidatorAllTPEfficStandalone,trackValidatorAllTPEfficTrackingOnly)
944 trackValidatorsTrackingOnly += trackValidatorSeedingTrackingOnly
945 trackValidatorsTrackingOnly += trackValidatorSeedingPreSplittingTrackingOnly
946 trackValidatorsTrackingOnly += trackValidatorBuilding
947 trackValidatorsTrackingOnly += trackValidatorBuildingPreSplitting
948 trackValidatorsTrackingOnly.replace(trackValidatorConversionStandalone, trackValidatorConversionTrackingOnly)
949 trackValidatorsTrackingOnly.remove(trackValidatorGsfTracksStandalone)
950 trackValidatorsTrackingOnly.replace(trackValidatorBHadronStandalone, trackValidatorBHadronTrackingOnly)
952 seedingDeepCore.toReplaceWith(trackValidatorsTrackingOnly, cms.Sequence(
953 trackValidatorsTrackingOnly.copy()+
954 trackValidatorJetCore+
955 trackValidatorJetCoreSeedingTrackingOnly
958 phase2_tracker.toReplaceWith(trackValidatorsTrackingOnly, trackValidatorsTrackingOnly.copyAndExclude([
959 trackValidatorJetCore,
960 trackValidatorJetCoreSeedingTrackingOnly
963 displacedTrackValidation.toReplaceWith(trackValidatorsTrackingOnly, cms.Sequence(trackValidatorsTrackingOnly.copy()+trackValidatorDisplaced))
965 fastSim.toReplaceWith(trackValidatorsTrackingOnly, trackValidatorsTrackingOnly.copyAndExclude([
966 trackValidatorBuildingPreSplitting,
967 trackValidatorSeedingPreSplittingTrackingOnly,
968 trackValidatorConversionTrackingOnly,
969 trackValidatorBHadronTrackingOnly
971 tracksValidationTrackingOnly = cms.Sequence(
972 trackValidatorsTrackingOnly,
973 tracksPreValidationTrackingOnly,
974 tracksValidationSelectorsStandalone,
975 tracksValidationSeedSelectorsTrackingOnly
980 trackingParticlePixelTrackAsssociation = trackingParticleRecoTrackAsssociation.clone(
981 label_tr =
"pixelTracks",
982 associator =
"quickTrackAssociatorByHitsPreSplitting",
984 PixelVertexAssociatorByPositionAndTracks = VertexAssociatorByPositionAndTracks.clone(
985 trackAssociation =
"trackingParticlePixelTrackAsssociation" 988 _pixelTracksCustom = dict(
990 vertexTag =
"pixelVertices",
993 trackRefSelector = cms.EDFilter(
'TrackRefSelector',
994 src = cms.InputTag(
'pixelTracks'),
998 trackSelector = cms.EDFilter(
'TrackSelector',
999 src = cms.InputTag(
'pixelTracks'),
1000 cut = cms.string(
"")
1003 cutstring =
"hitPattern.trackerLayersWithMeasurement == 3" 1004 pixelTracks3hits = trackRefSelector.clone( cut = cutstring )
1006 cutstring =
"hitPattern.trackerLayersWithMeasurement >= 4" 1007 pixelTracks4hits = trackRefSelector.clone( cut = cutstring )
1009 cutstring =
"pt > 0.9" 1010 pixelTracksPt09 = trackRefSelector.clone( cut = cutstring )
1013 pixelTracksFromPV = generalTracksFromPV.clone(quality =
"highPurity", ptMin = 0.0, ptMax = 99999., ptErrorCut = 99999., copyExtras =
True, **_pixelTracksCustom)
1015 pixelTracksFromPVPt09 = pixelTracksFromPV.clone(ptMin = 0.9)
1017 cutstring =
"hitPattern.trackerLayersWithMeasurement >= 4" 1019 pixelTracksFromPV4hits = pixelTracksFromPV.clone( numberOfValidPixelHits = 4 )
1022 trackValidatorPixelTrackingOnly = trackValidator.clone(
1023 dirName =
"Tracking/PixelTrack/",
1025 "pixelTracks",
"pixelTracksPt09",
"pixelTracks3hits",
"pixelTracks4hits",
1026 "pixelTracksL",
"pixelTracksPt09L",
"pixelTracks3hitsL",
"pixelTracks4hitsL",
1027 "pixelTracksT",
"pixelTracksPt09T",
"pixelTracks3hitsT",
"pixelTracks4hitsT",
1028 "pixelTracksHP",
"pixelTracksPt09HP",
"pixelTracks3hitsHP",
"pixelTracks4hitsHP",
1030 doResolutionPlotsForLabels = [],
1031 trackCollectionForDrCalculation =
"pixelTracks",
1032 associators = [
"trackingParticlePixelTrackAsssociation"],
1033 label_vertex =
"pixelVertices",
1034 vertexAssociator =
"PixelVertexAssociatorByPositionAndTracks",
1035 dodEdxPlots =
False,
1036 cores = cms.InputTag(
""),
1038 trackValidatorFromPVPixelTrackingOnly = trackValidatorPixelTrackingOnly.clone(
1039 dirName =
"Tracking/PixelTrackFromPV/",
1041 "pixelTracksFromPV",
"pixelTracksFromPVPt09",
"pixelTracksFromPV4hits",
1042 "pixelTracksFromPVL",
"pixelTracksFromPVT",
"pixelTracksFromPVHP",
1043 "pixelTracksFromPVPt09L",
"pixelTracksFromPVPt09T",
"pixelTracksFromPVPt09HP",
1044 "pixelTracksFromPV4hitsL",
"pixelTracksFromPV4hitsT",
"pixelTracksFromPV4hitsHP",
1046 label_tp_effic =
"trackingParticlesSignal",
1047 label_tp_fake =
"trackingParticlesSignal",
1048 label_tp_effic_refvector =
True,
1049 label_tp_fake_refvector =
True,
1050 trackCollectionForDrCalculation =
"pixelTracksFromPV",
1051 doPlotsOnlyForTruePV =
True,
1052 doPVAssociationPlots =
False,
1053 doResolutionPlotsForLabels = [
"disabled"],
1055 trackValidatorFromPVAllTPPixelTrackingOnly = trackValidatorFromPVPixelTrackingOnly.clone(
1056 dirName =
"Tracking/PixelTrackFromPVAllTP/",
1057 label_tp_effic = trackValidatorPixelTrackingOnly.label_tp_effic.value(),
1058 label_tp_fake = trackValidatorPixelTrackingOnly.label_tp_fake.value(),
1059 label_tp_effic_refvector =
False,
1060 label_tp_fake_refvector =
False,
1062 doSimTrackPlots =
False,
1064 trackValidatorBHadronPixelTrackingOnly = trackValidatorPixelTrackingOnly.clone(
1065 dirName =
"Tracking/PixelTrackBHadron/",
1067 "pixelTracks",
"pixelTracksPt09",
1068 "pixelTracksL",
"pixelTracks3hitsL",
"pixelTracks4hitsL",
1069 "pixelTracksT",
"pixelTracks3hitsT",
"pixelTracks4hitsT",
1070 "pixelTracksHP",
"pixelTracks3hitsHP",
"pixelTracks4hitsHP",
1072 label_tp_effic =
"trackingParticlesBHadron",
1073 label_tp_effic_refvector =
True,
1075 doRecoTrackPlots =
False,
1076 dodEdxPlots =
False,
1079 tracksValidationTruthPixelTrackingOnly = tracksValidationTruth.copy()
1080 tracksValidationTruthPixelTrackingOnly.replace(trackingParticleRecoTrackAsssociation, trackingParticlePixelTrackAsssociation)
1081 tracksValidationTruthPixelTrackingOnly.replace(VertexAssociatorByPositionAndTracks, PixelVertexAssociatorByPositionAndTracks)
1082 tracksValidationTruthPixelTrackingOnly.add(trackingParticlesBHadron)
1083 tracksValidationTruthPixelTrackingOnly.add( pixelTracks3hits )
1084 tracksValidationTruthPixelTrackingOnly.add( pixelTracks4hits )
1085 tracksValidationTruthPixelTrackingOnly.add( pixelTracksPt09 )
1086 tracksValidationTruthPixelTrackingOnly.add( pixelTracksFromPV )
1087 tracksValidationTruthPixelTrackingOnly.add( pixelTracksFromPVPt09 )
1088 tracksValidationTruthPixelTrackingOnly.add( pixelTracksFromPV4hits )
1090 tracksPreValidationPixelTrackingOnly = cms.Task(
1091 tracksValidationTruthPixelTrackingOnly,
1092 trackingParticlesSignal)
1096 "L" : (1,
"loose", [
"loose",
"tight",
"highPurity"]),
1097 "T" : (2,
"tight", [
"tight",
"highPurity"]),
1098 "HP" : (4,
"highPurity",[
"highPurity"]),
1101 for key,value
in quality.items():
1102 qualityName = value[1]
1103 qualityBit = value[0]
1104 qualityList = value[2]
1106 label =
"pixelTracks"+
str(key)
1107 cutstring =
"qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1108 locals()[label] = trackRefSelector.clone( cut = cutstring )
1109 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1111 label =
"pixelTracksFromPV"+key
1113 locals()[label] = pixelTracksFromPV.clone( quality = qualityName )
1114 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1116 cutstring =
"pt > 0.9 & qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1117 label =
"pixelTracksPt09"+key
1118 locals()[label] = trackRefSelector.clone( cut = cutstring )
1119 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1121 label =
"pixelTracksFromPVPt09"+key
1123 locals()[label] = pixelTracksFromPVPt09.clone( quality = qualityName )
1124 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1126 label =
"pixelTracks4hits"+key
1127 cutstring =
"hitPattern.trackerLayersWithMeasurement >= 4 & qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1128 locals()[label] = trackRefSelector.clone( cut = cutstring )
1129 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1131 label =
"pixelTracksFromPV4hits"+key
1133 locals()[label] = pixelTracksFromPV4hits.clone( quality = qualityName )
1134 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1136 label =
"pixelTracks3hits"+key
1137 cutstring =
"hitPattern.trackerLayersWithMeasurement == 3 & qualityMask <= 7 & qualityMask >= " +
str(qualityBit)
1138 locals()[label] = trackRefSelector.clone( cut = cutstring )
1139 tracksPreValidationPixelTrackingOnly.add(locals()[label])
1141 tracksValidationPixelTrackingOnly = cms.Sequence(
1142 trackValidatorPixelTrackingOnly +
1143 trackValidatorFromPVPixelTrackingOnly +
1144 trackValidatorFromPVAllTPPixelTrackingOnly +
1145 trackValidatorBHadronPixelTrackingOnly,
1146 tracksPreValidationPixelTrackingOnly
1151 trackValidatorLite = trackValidator.clone(
1152 label = [
"generalTracks",
"cutsRecoTracksHp"]
1154 tracksValidationLite = cms.Sequence(
1157 tracksValidationTruth
1161 from Configuration.Eras.Modifier_phase2_timing_layer_cff
import phase2_timing_layer
1162 phase2_timing_layer.toModify( generalTracksFromPV,
1163 timesTag = cms.InputTag(
'tofPID:t0'),
1164 timeResosTag = cms.InputTag(
'tofPID:sigmat0'),
1165 nSigmaDtVertex = cms.double(3) )
1166 phase2_timing_layer.toModify( trackValidatorStandalone,
1167 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1168 phase2_timing_layer.toModify( trackValidatorFromPVStandalone,
1169 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1170 phase2_timing_layer.toModify( trackValidatorFromPVAllTPStandalone,
1171 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1172 phase2_timing_layer.toModify( trackValidatorConversionStandalone,
1173 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
1174 phase2_timing_layer.toModify( trackValidatorGsfTracks,
1175 label_vertex = cms.untracked.InputTag(
'offlinePrimaryVertices4D') )
def _getMVASelectors(postfix)
def _setForEra(module, eraName, era, kwargs)
def _translateArgs(args, postfix, modDict)
def _uniqueFirstLayers(layerList)
_addSelectorsByOriginalAlgoMask
Then define stuff for standalone mode (i.e.
def _getSeedingLayers(seedProducers, config)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
def _algoToSelector(algo)
def _taskForEachEra(function, args, names, task, modDict, plainArgs=[], modifyTask=None, includeFastSim=False)