CMS 3D CMS Logo

RecoMuon_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Standard pp setup
5 
6 
7 
8 # Sequence for cosmic reconstruction
9 # Seed generator
11 CosmicMuonSeed.DTRecSegmentLabel = 'dt4DCosmicSegments'
12 # Stand alone muon track producer
14 cosmicMuons.TrajectoryBuilderParameters.DTRecSegmentLabel = 'dt4DCosmicSegments'
15 
16 # Muon Id producer
17 muonsFromCosmics = RecoMuon.MuonIdentification.muons1stStep_cfi.muons1stStep.clone(
18  inputCollectionLabels = ['cosmicMuons'],
19  inputCollectionTypes = ['outer tracks'],
20  fillIsolation = False,
21  fillGlobalTrackQuality = False,
22  fillGlobalTrackRefits = False,
23  TrackAssociatorParameters = dict(DTRecSegment4DCollectionLabel = 'dt4DCosmicSegments'),
24  TrackExtractorPSet = dict(inputTrackCollection = 'cosmicMuons'),
25  TimingFillerParameters = dict(
26  MatchParameters = dict(DTsegments = 'dt4DCosmicSegments'),
27  DTTimingParameters = dict(PruneCut = 9999),
28  CSCTimingParameters = dict(PruneCut = 9999)),
29  selectHighPurity = False,
30  minPt = 0.5
31 )
32 
33 #add regional cosmic tracks here
34 muoncosmicreco2legsSTATask = cms.Task(CosmicMuonSeed,cosmicMuons)
35 muoncosmicreco2legsSTA = cms.Sequence(muoncosmicreco2legsSTATask)
36 muoncosmicreco2legsHighLevelTask = cms.Task(muonsFromCosmics)
37 muoncosmicreco2legsHighLevel = cms.Sequence(muoncosmicreco2legsHighLevelTask)
38 
39 # 1 Leg type
40 # Stand alone muon track producer
41 cosmicMuons1Leg = cosmicMuons.clone(
42  MuonSeedCollectionLabel = 'CosmicMuonSeed',
43  TrajectoryBuilderParameters = dict(
44  BuildTraversingMuon = True,
45  Strict1Leg = True,
46  DTRecSegmentLabel = 'dt4DCosmicSegments')
47 )
48 
49 # Muon Id producer
50 muonsFromCosmics1Leg = muons1stStep.clone(
51  inputCollectionLabels = ['cosmicMuons1Leg'],
52  inputCollectionTypes = ['outer tracks'],
53  fillIsolation = False,
54  fillGlobalTrackQuality = False,
55  fillGlobalTrackRefits = False,
56  TrackAssociatorParameters = dict(DTRecSegment4DCollectionLabel = 'dt4DCosmicSegments'),
57  TrackExtractorPSet = dict(inputTrackCollection = 'cosmicMuons1Leg'),
58  TimingFillerParameters = dict(
59  MatchParameters = dict(DTsegments = 'dt4DCosmicSegments'),
60  DTTimingParameters = dict(PruneCut = 9999),
61  CSCTimingParameters = dict(PruneCut = 9999)),
62  selectHighPurity = False,
63  minPt = 0.5
64 )
65 
66 muoncosmicreco1legSTATask = cms.Task(CosmicMuonSeed,cosmicMuons1Leg)
67 muoncosmicreco1legSTA = cms.Sequence(muoncosmicreco1legSTATask)
68 muoncosmicreco1legHighLevelTask = cms.Task(muonsFromCosmics1Leg)
69 muoncosmicreco1legHighLevel = cms.Sequence(muoncosmicreco1legHighLevelTask)
70 
71 muoncosmicrecoTask = cms.Task(muoncosmicreco2legsSTATask,muoncosmicreco1legSTATask)
72 muoncosmicreco = cms.Sequence(muoncosmicrecoTask)
73 muoncosmichighlevelrecoTask = cms.Task(muoncosmicreco2legsHighLevelTask,muoncosmicreco1legHighLevelTask,cosmicsMuonIdTask)
74 muoncosmichighlevelreco = cms.Sequence(muoncosmichighlevelrecoTask)
75 
76 
82 
83 # clusters are not present in fastsim
84 from Configuration.Eras.Modifier_fastSim_cff import fastSim
85 fastSim.toModify(muonReducedTrackExtras, outputClusters = False)
86 
87 # cluster collections are different in phase 2
88 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
89 phase2_tracker.toModify(muonReducedTrackExtras, outputClusters = False)
90 phase2_tracker.toModify(displacedMuonReducedTrackExtras, outputClusters = False)
91 
92 muonshighlevelrecoTask = cms.Task(muonPFIsolationTask,displacedMuonPFIsolationTask,muons,displacedMuons,muonReducedTrackExtras, displacedMuonReducedTrackExtras)
93 muonshighlevelreco = cms.Sequence(muonshighlevelrecoTask)
94 
95 # displaced sequences do not run in fastsim
96 fastSim.toReplaceWith(muonshighlevelrecoTask,muonshighlevelrecoTask.copyAndExclude([displacedMuonPFIsolationTask,displacedMuons,displacedMuonReducedTrackExtras]))
High level sequence (i.e., post PF reconstruction) ###.