Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:20:19

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Standard pp setup
0004 from RecoMuon.Configuration.RecoMuonPPonly_cff import *
0005 
0006 ########################################################
0007 
0008 # Sequence for cosmic reconstruction
0009 # Seed generator
0010 from RecoMuon.MuonSeedGenerator.CosmicMuonSeedProducer_cfi import *
0011 CosmicMuonSeed.DTRecSegmentLabel = 'dt4DCosmicSegments'
0012 # Stand alone muon track producer
0013 from RecoMuon.CosmicMuonProducer.cosmicMuons_cff import *
0014 cosmicMuons.TrajectoryBuilderParameters.DTRecSegmentLabel = 'dt4DCosmicSegments'
0015 
0016 # Muon Id producer
0017 muonsFromCosmics = RecoMuon.MuonIdentification.muons1stStep_cfi.muons1stStep.clone(
0018     inputCollectionLabels = ['cosmicMuons'],
0019     inputCollectionTypes = ['outer tracks'],
0020     fillIsolation = False,
0021     fillGlobalTrackQuality = False,
0022     fillGlobalTrackRefits = False,
0023     TrackAssociatorParameters = dict(DTRecSegment4DCollectionLabel = 'dt4DCosmicSegments'),
0024     TrackExtractorPSet = dict(inputTrackCollection = 'cosmicMuons'),
0025     TimingFillerParameters = dict(
0026     MatchParameters = dict(DTsegments = 'dt4DCosmicSegments'),
0027     DTTimingParameters = dict(PruneCut = 9999),
0028     CSCTimingParameters = dict(PruneCut = 9999)),
0029     selectHighPurity = False,
0030     minPt = 0.5
0031 )
0032 
0033 #add regional cosmic tracks here
0034 muoncosmicreco2legsSTATask = cms.Task(CosmicMuonSeed,cosmicMuons)
0035 muoncosmicreco2legsSTA = cms.Sequence(muoncosmicreco2legsSTATask)
0036 muoncosmicreco2legsHighLevelTask = cms.Task(muonsFromCosmics)
0037 muoncosmicreco2legsHighLevel = cms.Sequence(muoncosmicreco2legsHighLevelTask)
0038 
0039 # 1 Leg type
0040 # Stand alone muon track producer
0041 cosmicMuons1Leg = cosmicMuons.clone(
0042     MuonSeedCollectionLabel = 'CosmicMuonSeed',
0043     TrajectoryBuilderParameters = dict(
0044     BuildTraversingMuon = True, 
0045     Strict1Leg = True, 
0046     DTRecSegmentLabel = 'dt4DCosmicSegments')
0047 )
0048 
0049 # Muon Id producer
0050 muonsFromCosmics1Leg = muons1stStep.clone(
0051     inputCollectionLabels = ['cosmicMuons1Leg'],
0052     inputCollectionTypes = ['outer tracks'],
0053     fillIsolation = False,
0054     fillGlobalTrackQuality = False,
0055     fillGlobalTrackRefits = False,
0056     TrackAssociatorParameters = dict(DTRecSegment4DCollectionLabel = 'dt4DCosmicSegments'),
0057     TrackExtractorPSet = dict(inputTrackCollection = 'cosmicMuons1Leg'),
0058     TimingFillerParameters = dict(
0059         MatchParameters = dict(DTsegments = 'dt4DCosmicSegments'),
0060         DTTimingParameters = dict(PruneCut = 9999),
0061         CSCTimingParameters = dict(PruneCut = 9999)),
0062     selectHighPurity = False,
0063     minPt = 0.5
0064 )
0065 
0066 muoncosmicreco1legSTATask = cms.Task(CosmicMuonSeed,cosmicMuons1Leg)
0067 muoncosmicreco1legSTA = cms.Sequence(muoncosmicreco1legSTATask)
0068 muoncosmicreco1legHighLevelTask = cms.Task(muonsFromCosmics1Leg)
0069 muoncosmicreco1legHighLevel = cms.Sequence(muoncosmicreco1legHighLevelTask)
0070 
0071 muoncosmicrecoTask = cms.Task(muoncosmicreco2legsSTATask,muoncosmicreco1legSTATask)
0072 muoncosmicreco = cms.Sequence(muoncosmicrecoTask)
0073 muoncosmichighlevelrecoTask = cms.Task(muoncosmicreco2legsHighLevelTask,muoncosmicreco1legHighLevelTask,cosmicsMuonIdTask)
0074 muoncosmichighlevelreco = cms.Sequence(muoncosmichighlevelrecoTask)
0075 
0076 #### High level sequence (i.e., post PF reconstruction) ###
0077 from RecoMuon.MuonIdentification.muons_cfi import *
0078 from RecoMuon.MuonIdentification.displacedMuons_cfi import *
0079 from RecoMuon.MuonIsolation.muonPFIsolation_cff import *
0080 from RecoMuon.MuonIdentification.muonReducedTrackExtras_cfi import *
0081 from RecoMuon.MuonIdentification.displacedMuonReducedTrackExtras_cfi import *
0082 
0083 # clusters are not present in fastsim
0084 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0085 fastSim.toModify(muonReducedTrackExtras, outputClusters = False)
0086 
0087 # cluster collections are different in phase 2
0088 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0089 phase2_tracker.toModify(muonReducedTrackExtras, outputClusters = False)
0090 phase2_tracker.toModify(displacedMuonReducedTrackExtras, outputClusters = False)
0091 
0092 muonshighlevelrecoTask = cms.Task(muonPFIsolationTask,displacedMuonPFIsolationTask,muons,displacedMuons,muonReducedTrackExtras, displacedMuonReducedTrackExtras)
0093 muonshighlevelreco = cms.Sequence(muonshighlevelrecoTask)
0094 
0095 # displaced sequences do not run in fastsim
0096 fastSim.toReplaceWith(muonshighlevelrecoTask,muonshighlevelrecoTask.copyAndExclude([displacedMuonPFIsolationTask,displacedMuons,displacedMuonReducedTrackExtras]))