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 from Configuration.Eras.Modifier_bParking_cff import bParking
8 
9 prunedTpClusterProducer = tpClusterProducer.clone(
10  trackingParticleSrc = cms.InputTag("prunedTrackingParticles"),
11  pixelSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siPixel"),
12  stripSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siStrip"),
13  throwOnMissingCollections = cms.bool(True)
14 )
15 
16 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
17 _phase2_prunedTpClusterProducer = tpClusterProducer.clone(
18  trackingParticleSrc = cms.InputTag("prunedTrackingParticles"),
19  pixelSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siPixel"),
20  phase2OTSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siphase2OT"),
21  throwOnMissingCollections = cms.bool(True)
22 )
23 phase2_tracker.toReplaceWith(
24  prunedTpClusterProducer,
25  _phase2_prunedTpClusterProducer
26 )
27 
28 quickPrunedTrackAssociatorByHits = quickTrackAssociatorByHits.clone(
29  cluster2TPSrc = "prunedTpClusterProducer"
30 )
31 
32 prunedTrackMCMatch = cms.EDProducer("MCTrackMatcher",
33  trackingParticles = cms.InputTag("prunedTrackingParticles"),
34  tracks = cms.InputTag("generalTracks"),
35  genParticles = cms.InputTag("genParticles"),
36  associator = cms.string('quickPrunedTrackAssociatorByHits'),
37  throwOnMissingTPCollection = cms.bool(True)
38 )
39 
40 trackPrunedMCMatchTask = cms.Task()
41 
42 _bParking_trackPrunedMCMatchTask = cms.Task(prunedTpClusterProducer,quickPrunedTrackAssociatorByHits,prunedTrackMCMatch)
43 bParking.toReplaceWith(trackPrunedMCMatchTask,_bParking_trackPrunedMCMatchTask)
44 
45 (fastSim & bParking).toReplaceWith(quickTrackAssociatorByHits, quickPrunedTrackAssociatorByHits.clone(
46  useClusterTPAssociation = cms.bool(False),
47  associateStrip = cms.bool(False),
48  associatePixel = cms.bool(False),
49 ))
50 
51 (fastSim & bParking).toModify(trackPrunedMCMatchTask, lambda x: x.remove(prunedTpClusterProducer))