Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-15 22:20:51

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Seed generator
0004 from RecoMuon.MuonSeedGenerator.standAloneMuonSeeds_cff import *
0005 # Stand alone muon track producer
0006 from RecoMuon.StandAloneMuonProducer.standAloneMuons_cff import *
0007 
0008 # refitted stand-alone muons.
0009 refittedStandAloneMuons = standAloneMuons.clone(
0010     STATrajBuilderParameters = dict(DoRefit = True)
0011 )
0012 #refittedStandAloneMuons.STATrajBuilderParameters.DoRefit = True
0013 # Displaced SA muons
0014 from RecoMuon.MuonSeedGenerator.CosmicMuonSeedProducer_cfi import *
0015 displacedMuonSeeds = CosmicMuonSeed.clone(
0016     ForcePointDown = False
0017 )
0018 
0019 displacedStandAloneMuons = standAloneMuons.clone(
0020     InputObjects = 'displacedMuonSeeds',
0021     MuonTrajectoryBuilder = 'StandAloneMuonTrajectoryBuilder',
0022     TrackLoaderParameters = dict(VertexConstraint = False)
0023 )
0024 
0025 # Global muon track producer
0026 from RecoMuon.GlobalMuonProducer.GlobalMuonProducer_cff import *
0027 from RecoMuon.Configuration.iterativeTkDisplaced_cff import *
0028 displacedGlobalMuons = globalMuons.clone(
0029     MuonCollectionLabel = 'displacedStandAloneMuons:',
0030     TrackerCollectionLabel = 'displacedTracks',
0031     selectHighPurity = False
0032 )
0033 
0034 # TeV refinement
0035 from RecoMuon.GlobalMuonProducer.tevMuons_cfi import *
0036 
0037 # SET Muon tracking
0038 from RecoMuon.Configuration.SETRecoMuon_cff import *
0039 
0040 # Muon Id producer
0041 from RecoMuon.MuonIdentification.muonIdProducerSequence_cff import *
0042 muons1stStep.fillGlobalTrackQuality = True
0043 
0044 # Displaced muons
0045 displacedMuons1stStep = muons1stStep.clone(
0046     inputCollectionLabels = ['displacedTracks',
0047                              'displacedGlobalMuons',
0048                              'displacedStandAloneMuons'],
0049     inputCollectionTypes = ['inner tracks',
0050                             'links',
0051                             'outer tracks'],
0052     fillGlobalTrackQuality = False
0053 )
0054 displacedMuons1stStep.TrackExtractorPSet.Diff_r = 0.2
0055 displacedMuons1stStep.TrackExtractorPSet.Diff_z = 0.5
0056 
0057 displacedMuonIdProducerTask = cms.Task(displacedMuons1stStep)
0058 
0059 #Muon Id isGood flag ValueMap producer sequence
0060 from RecoMuon.MuonIdentification.muonSelectionTypeValueMapProducer_cff import *
0061 
0062 # Muon Isolation sequence
0063 from RecoMuon.MuonIsolationProducers.muIsolation_cff import *
0064 
0065 # ---------------------------------------------------- #
0066 ################## Make the sequences ##################
0067 # ---------------------------------------------------- #
0068 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0069 
0070 # Muon Tracking sequence
0071 standalonemuontrackingTask = cms.Task(standAloneMuons,
0072                                       refittedStandAloneMuons,
0073                                       displacedMuonSeeds,
0074                                       displacedStandAloneMuons,
0075                                       standAloneMuonSeedsTask)
0076 standalonemuontracking = cms.Sequence(standalonemuontrackingTask)
0077 # not commisoned and not relevant in FastSim (?):
0078 fastSim.toReplaceWith(standalonemuontrackingTask,standalonemuontrackingTask.copyAndExclude([displacedMuonSeeds,displacedStandAloneMuons]))
0079 displacedGlobalMuonTrackingTask = cms.Task(iterDisplcedTrackingTask,displacedGlobalMuons)
0080 displacedGlobalMuonTracking = cms.Sequence(displacedGlobalMuonTrackingTask)
0081 
0082 globalmuontrackingTask = cms.Task(globalMuons,tevMuons,displacedGlobalMuonTrackingTask)
0083 globalmuontracking = cms.Sequence(globalmuontrackingTask)
0084 # not commisoned and not relevant in FastSim (?):
0085 fastSim.toReplaceWith(globalmuontrackingTask,globalmuontrackingTask.copyAndExclude([displacedGlobalMuonTrackingTask]))
0086 muontrackingTask = cms.Task(standalonemuontrackingTask,globalmuontrackingTask)
0087 muontracking = cms.Sequence(muontrackingTask)
0088 # Muon Reconstruction
0089 muonrecoTask = cms.Task(muontrackingTask,muonIdProducerTask, displacedMuonIdProducerTask)
0090 fastSim.toReplaceWith(muonrecoTask,muonrecoTask.copyAndExclude([displacedMuonIdProducerTask]))
0091 muonreco = cms.Sequence(muonrecoTask)
0092 # Muon Reconstruction plus Isolation
0093 muonreco_plus_isolationTask = cms.Task(muonrecoTask,muIsolationTask)
0094 muonreco_plus_isolation = cms.Sequence(muonreco_plus_isolationTask)
0095 
0096 muonrecoComplete = cms.Sequence(muonreco_plus_isolationTask,muonSelectionTypeTask)
0097 
0098 
0099 # _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- #
0100 # -_-_-_- Special Sequences for Iterative tracking -_-_-_- #
0101 # -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ #
0102 
0103 # We need to split the muon sequence above in two, to be able to run the MuonSeeding in the tracker. So muonrecoComplete will 
0104 # be run no longer...
0105 
0106 #from RecoMuon.MuonIdentification.earlyMuons_cfi import earlyMuons
0107 
0108 muonGlobalRecoTask = cms.Task(globalmuontrackingTask,
0109                               muonIdProducerTask,
0110                               displacedMuonIdProducerTask,
0111                               muonSelectionTypeTask,
0112                               muIsolationTask,
0113                               muIsolationDisplacedTask)
0114 muonGlobalReco = cms.Sequence(muonGlobalRecoTask)
0115 
0116 # ... instead, the sequences will be run in the following order:
0117 # 1st - standalonemuontracking
0118 # 2nd - iterative tracking (def in RecoTracker config)
0119 # 3rd - MuonIDProducer with 1&2 as input, with special replacements; the earlyMuons above. 
0120 # 4th - MuonSeeded tracks, inside-out and outside-in
0121 # 5th - Merging of the new TK tracks into the generalTracks collection
0122 # 6th - Run the remnant part of the muon sequence (muonGlobalReco) 
0123 
0124 ########################################################
0125 # not commisoned and not relevant in FastSim (?):
0126 fastSim.toReplaceWith(muonGlobalRecoTask, muonGlobalRecoTask.copyAndExclude([muonreco_with_SET_Task,muonSelectionTypeTask,displacedMuonIdProducerTask,muIsolationDisplacedTask]))