Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:01

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from SimTracker.TrackerHitAssociation.tpClusterProducer_cfi import *
0004 from SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi import *
0005 
0006 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0007 
0008 prunedTpClusterProducer = tpClusterProducer.clone(
0009     trackingParticleSrc = cms.InputTag("prunedTrackingParticles"),
0010     pixelSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siPixel"),
0011     stripSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siStrip"),
0012     throwOnMissingCollections = cms.bool(True)
0013 )
0014 
0015 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0016 _phase2_prunedTpClusterProducer = tpClusterProducer.clone(
0017     trackingParticleSrc = cms.InputTag("prunedTrackingParticles"),
0018     pixelSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siPixel"),
0019     phase2OTSimLinkSrc = cms.InputTag("prunedDigiSimLinks", "siphase2OT"),
0020     throwOnMissingCollections = cms.bool(True)
0021 )
0022 phase2_tracker.toReplaceWith( 
0023     prunedTpClusterProducer,
0024     _phase2_prunedTpClusterProducer
0025 )
0026 
0027 quickPrunedTrackAssociatorByHits = quickTrackAssociatorByHits.clone(
0028     cluster2TPSrc = "prunedTpClusterProducer"
0029 )
0030 
0031 prunedTrackMCMatch = cms.EDProducer("MCTrackMatcher",
0032     trackingParticles = cms.InputTag("prunedTrackingParticles"),
0033     tracks = cms.InputTag("generalTracks"),
0034     genParticles = cms.InputTag("genParticles"),
0035     associator = cms.string('quickPrunedTrackAssociatorByHits'),
0036     throwOnMissingTPCollection = cms.bool(True)
0037 )
0038 
0039 trackPrunedMCMatchTask = cms.Task(prunedTpClusterProducer,quickPrunedTrackAssociatorByHits,prunedTrackMCMatch)
0040 
0041 
0042 
0043 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0044 fastSim.toReplaceWith(quickTrackAssociatorByHits, quickPrunedTrackAssociatorByHits.clone(
0045     useClusterTPAssociation = cms.bool(False),
0046     associateStrip = cms.bool(False),
0047     associatePixel = cms.bool(False),
0048 ))
0049 
0050 fastSim.toModify(trackPrunedMCMatchTask, lambda x: x.remove(prunedTpClusterProducer))