1 import FWCore.ParameterSet.Config
as cms
23 from CommonTools.RecoAlgos.trackingParticleRefSelector_cfi
import trackingParticleRefSelector
as _trackingParticleRefSelector
24 trackingParticlesIntime = _trackingParticleRefSelector.clone(
34 trackingNtuple.trackingParticles =
"trackingParticlesIntime" 35 trackingNtuple.trackingParticlesRef =
True 36 trackingNtuple.includeAllHits = _includeHits
37 trackingNtuple.includeSeeds = _includeSeeds
42 if "PreSplitting" in item:
44 if "SeedsA" in item
and item.replace(
"SeedsA",
"SeedsB")
in lst:
45 ret.append(item.replace(
"SeedsA",
"Seeds"))
49 if "SeedsPair" in item
and item.replace(
"SeedsPair",
"SeedsTripl")
in lst:
50 ret.append(item.replace(
"SeedsPair",
"Seeds"))
52 if "SeedsTripl" in item:
57 _seedProducers_trackingPhase1 =
_filterForNtuple(_TrackValidation_cff._seedProducers_trackingPhase1)
58 _seedProducers_trackingPhase1QuadProp =
_filterForNtuple(_TrackValidation_cff._seedProducers_trackingPhase1QuadProp)
59 _seedProducers_trackingPhase2PU140 =
_filterForNtuple(_TrackValidation_cff._seedProducers_trackingPhase2PU140)
61 (_seedSelectors, trackingNtupleSeedSelectors) = _TrackValidation_cff._addSeedToTrackProducers(_seedProducers, globals())
62 (_seedSelectors_trackingPhase1, _trackingNtupleSeedSelectors_trackingPhase1) = _TrackValidation_cff._addSeedToTrackProducers(_seedProducers_trackingPhase1, globals())
63 (_seedSelectors_trackingPhase1QuadProp, _trackingNtupleSeedSelectors_trackingPhase1QuadProp) = _TrackValidation_cff._addSeedToTrackProducers(_seedProducers_trackingPhase1QuadProp, globals())
64 (_seedSelectors_trackingPhase2PU140, _trackingNtupleSeedSelectors_trackingPhase2PU140) = _TrackValidation_cff._addSeedToTrackProducers(_seedProducers_trackingPhase2PU140, globals())
65 from Configuration.Eras.Modifier_trackingPhase1_cff
import trackingPhase1
66 from Configuration.Eras.Modifier_trackingPhase1QuadProp_cff
import trackingPhase1QuadProp
67 from Configuration.Eras.Modifier_trackingPhase2PU140_cff
import trackingPhase2PU140
68 trackingPhase1.toReplaceWith(trackingNtupleSeedSelectors, _trackingNtupleSeedSelectors_trackingPhase1)
69 trackingPhase1QuadProp.toReplaceWith(trackingNtupleSeedSelectors, _trackingNtupleSeedSelectors_trackingPhase1QuadProp)
70 trackingPhase2PU140.toReplaceWith(trackingNtupleSeedSelectors, _trackingNtupleSeedSelectors_trackingPhase2PU140)
72 trackingNtuple.seedTracks = _seedSelectors
73 trackingPhase1.toModify(trackingNtuple, seedTracks = _seedSelectors_trackingPhase1)
74 trackingPhase1QuadProp.toModify(trackingNtuple, seedTracks = _seedSelectors_trackingPhase1)
75 trackingPhase2PU140.toModify(trackingNtuple, seedTracks = _seedSelectors_trackingPhase2PU140)
78 return name.replace(
"seedTracks",
"").
replace(
"Seeds",
"TrackCandidates")
79 trackingNtuple.trackCandidates =
map(_seedProdToTrackCands, _seedProducers)
80 trackingPhase1.toModify(trackingNtuple, trackCandidates=
map(_seedProdToTrackCands, _seedProducers_trackingPhase1))
81 trackingPhase1QuadProp.toModify(trackingNtuple, trackCandidates=
map(_seedProdToTrackCands, _seedProducers_trackingPhase1QuadProp))
82 trackingPhase2PU140.toModify(trackingNtuple, trackCandidates=
map(_seedProdToTrackCands, _seedProducers_trackingPhase2PU140))
84 trackingNtupleSequence = cms.Sequence()
87 trackingNtupleSequence += (
91 _phase2_trackingNtupleSequence = trackingNtupleSequence.copy()
92 _phase2_trackingNtupleSequence.remove(siStripMatchedRecHits)
93 _phase2_trackingNtupleSequence += (siPhase2RecHits)
94 trackingPhase2PU140.toReplaceWith(trackingNtupleSequence, _phase2_trackingNtupleSequence)
97 trackingNtupleSequence += trackingNtupleSeedSelectors
99 trackingNtupleSequence += (
101 trackingParticlesIntime +
102 simHitTPAssocProducer +
104 quickTrackAssociatorByHits +
105 trackingParticleNumberOfLayersProducer +
110 trackingPhase2PU140.toModify(trackingNtuple,
111 pixelDigiSimLink = cms.untracked.InputTag(
'simSiPixelDigis',
"Pixel"),
112 stripDigiSimLink = cms.untracked.InputTag(
''),
113 phase2OTSimLink = cms.untracked.InputTag(
'simSiPixelDigis',
"Tracker")
def _seedProdToTrackCands(name)
def replace(string, replacements)
Expects test.root in current directory.
def _filterForNtuple(lst)