1 import FWCore.ParameterSet.Config
as cms
26 _includeTrackingParticles =
True 29 from CommonTools.RecoAlgos.trackingParticleRefSelector_cfi
import trackingParticleRefSelector
as _trackingParticleRefSelector
30 trackingParticlesIntime = _trackingParticleRefSelector.clone(
40 trackingNtuple.trackingParticles =
"trackingParticlesIntime" 41 trackingNtuple.trackingParticlesRef =
True 42 trackingNtuple.includeAllHits = _includeHits
43 trackingNtuple.includeSeeds = _includeSeeds
44 trackingNtuple.includeMVA = _includeMVA
45 trackingNtuple.includeTrackingParticles = _includeTrackingParticles
50 if "PreSplitting" in item:
52 if "SeedsA" in item
and item.replace(
"SeedsA",
"SeedsB")
in lst:
53 ret.append(item.replace(
"SeedsA",
"Seeds"))
57 if "SeedsPair" in item
and item.replace(
"SeedsPair",
"SeedsTripl")
in lst:
58 ret.append(item.replace(
"SeedsPair",
"Seeds"))
60 if "SeedsTripl" in item:
65 _seedProducers_trackingPhase1 =
_filterForNtuple(_TrackValidation_cff._seedProducers_trackingPhase1)
66 _seedProducers_trackingPhase2PU140 =
_filterForNtuple(_TrackValidation_cff._seedProducers_trackingPhase2PU140)
68 (_seedSelectors, trackingNtupleSeedSelectors) = _TrackValidation_cff._addSeedToTrackProducers(_seedProducers, globals())
69 (_seedSelectors_trackingPhase1, _trackingNtupleSeedSelectors_trackingPhase1) = _TrackValidation_cff._addSeedToTrackProducers(_seedProducers_trackingPhase1, globals())
70 (_seedSelectors_trackingPhase2PU140, _trackingNtupleSeedSelectors_trackingPhase2PU140) = _TrackValidation_cff._addSeedToTrackProducers(_seedProducers_trackingPhase2PU140, globals())
71 from Configuration.Eras.Modifier_trackingPhase1_cff
import trackingPhase1
72 from Configuration.Eras.Modifier_trackingPhase2PU140_cff
import trackingPhase2PU140
73 trackingPhase1.toReplaceWith(trackingNtupleSeedSelectors, _trackingNtupleSeedSelectors_trackingPhase1)
74 trackingPhase2PU140.toReplaceWith(trackingNtupleSeedSelectors, _trackingNtupleSeedSelectors_trackingPhase2PU140)
76 trackingNtuple.seedTracks = _seedSelectors
77 trackingPhase1.toModify(trackingNtuple, seedTracks = _seedSelectors_trackingPhase1)
78 trackingPhase2PU140.toModify(trackingNtuple, seedTracks = _seedSelectors_trackingPhase2PU140)
81 return name.replace(
"seedTracks",
"").
replace(
"Seeds",
"TrackCandidates")
83 trackingPhase1.toModify(trackingNtuple, trackCandidates=[
_seedProdToTrackCands(i)
for i
in _seedProducers_trackingPhase1])
84 trackingPhase2PU140.toModify(trackingNtuple, trackCandidates=[
_seedProdToTrackCands(i)
for i
in _seedProducers_trackingPhase2PU140])
86 trackingNtupleTask = cms.Task()
89 trackingNtupleTask.add(siPixelRecHits, siStripMatchedRecHits)
90 _phase2_trackingNtupleTask = trackingNtupleTask.copy()
91 _phase2_trackingNtupleTask.remove(siStripMatchedRecHits)
92 _phase2_trackingNtupleTask.add(siPhase2RecHits)
93 trackingPhase2PU140.toReplaceWith(trackingNtupleTask, _phase2_trackingNtupleTask)
96 trackingNtupleTask.add(trackingNtupleSeedSelectors)
98 trackingNtupleTask.add(
100 trackingParticlesIntime,
101 simHitTPAssocProducer,
103 quickTrackAssociatorByHits,
104 trackingParticleNumberOfLayersProducer
107 trackingNtupleSequence = cms.Sequence(trackingNtuple, trackingNtupleTask)
109 trackingPhase2PU140.toModify(trackingNtuple,
110 pixelDigiSimLink = cms.untracked.InputTag(
'simSiPixelDigis',
"Pixel"),
111 stripDigiSimLink = cms.untracked.InputTag(
''),
112 phase2OTSimLink = cms.untracked.InputTag(
'simSiPixelDigis',
"Tracker")
def _seedProdToTrackCands(name)
def replace(string, replacements)
Expects test.root in current directory.
def _filterForNtuple(lst)