CMS 3D CMS Logo

trackPrunedMCMatchTask_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 from Configuration.Eras.Modifier_fastSim_cff import fastSim
7 
8 prunedTpClusterProducer = tpClusterProducer.clone(
9  trackingParticleSrc = cms.InputTag("prunedTrackingParticles"),
10  pixelSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siPixel"),
11  stripSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siStrip"),
12  throwOnMissingCollections = cms.bool(True)
13 )
14 
15 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
16 _phase2_prunedTpClusterProducer = tpClusterProducer.clone(
17  trackingParticleSrc = cms.InputTag("prunedTrackingParticles"),
18  pixelSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siPixel"),
19  phase2OTSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siphase2OT"),
20  throwOnMissingCollections = cms.bool(True)
21 )
22 phase2_tracker.toReplaceWith(
23  prunedTpClusterProducer,
24  _phase2_prunedTpClusterProducer
25 )
26 
27 quickPrunedTrackAssociatorByHits = quickTrackAssociatorByHits.clone(
28  cluster2TPSrc = "prunedTpClusterProducer"
29 )
30 
31 prunedTrackMCMatch = cms.EDProducer("MCTrackMatcher",
32  trackingParticles = cms.InputTag("prunedTrackingParticles"),
33  tracks = cms.InputTag("generalTracks"),
34  genParticles = cms.InputTag("genParticles"),
35  associator = cms.string('quickPrunedTrackAssociatorByHits'),
36  throwOnMissingTPCollection = cms.bool(True)
37 )
38 
39 trackPrunedMCMatchTask = cms.Task(prunedTpClusterProducer,quickPrunedTrackAssociatorByHits,prunedTrackMCMatch)
40 
41 
42 
43 from Configuration.Eras.Modifier_fastSim_cff import fastSim
44 fastSim.toReplaceWith(quickTrackAssociatorByHits, quickPrunedTrackAssociatorByHits.clone(
45  useClusterTPAssociation = cms.bool(False),
46  associateStrip = cms.bool(False),
47  associatePixel = cms.bool(False),
48 ))
49 
50 fastSim.toModify(trackPrunedMCMatchTask, lambda x: x.remove(prunedTpClusterProducer))
tpClusterProducer_cfi
quickTrackAssociatorByHits_cfi