CMS 3D CMS Logo

RecoMuonPPonly_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Seed generator
5 # Stand alone muon track producer
7 
8 # refitted stand-alone muons.
9 refittedStandAloneMuons = standAloneMuons.clone(
10  STATrajBuilderParameters = dict(DoRefit = True)
11 )
12 #refittedStandAloneMuons.STATrajBuilderParameters.DoRefit = True
13 # Displaced SA muons
15 displacedMuonSeeds = CosmicMuonSeed.clone(
16  ForcePointDown = False
17 )
18 
19 displacedStandAloneMuons = standAloneMuons.clone(
20  InputObjects = 'displacedMuonSeeds',
21  MuonTrajectoryBuilder = 'StandAloneMuonTrajectoryBuilder',
22  TrackLoaderParameters = dict(VertexConstraint = False)
23 )
24 
25 # Global muon track producer
28 displacedGlobalMuons = globalMuons.clone(
29  MuonCollectionLabel = 'displacedStandAloneMuons:',
30  TrackerCollectionLabel = 'displacedTracks',
31  selectHighPurity = False
32 )
33 
34 # TeV refinement
36 
37 # SET Muon tracking
39 
40 # Muon Id producer
42 muons1stStep.fillGlobalTrackQuality = True
43 
44 # Displaced muons
45 displacedMuons1stStep = muons1stStep.clone(
46  inputCollectionLabels = ['displacedTracks',
47  'displacedGlobalMuons',
48  'displacedStandAloneMuons'],
49  inputCollectionTypes = ['inner tracks',
50  'links',
51  'outer tracks'],
52  fillGlobalTrackQuality = False
53 )
54 displacedMuons1stStep.TrackExtractorPSet.Diff_r = 0.2
55 displacedMuons1stStep.TrackExtractorPSet.Diff_z = 0.5
56 
57 displacedMuonIdProducerTask = cms.Task(displacedMuons1stStep)
58 
59 #Muon Id isGood flag ValueMap producer sequence
61 
62 # Muon Isolation sequence
64 
65 # ---------------------------------------------------- #
66 
68 from Configuration.Eras.Modifier_fastSim_cff import fastSim
69 
70 # Muon Tracking sequence
71 standalonemuontrackingTask = cms.Task(standAloneMuons,
72  refittedStandAloneMuons,
73  displacedMuonSeeds,
74  displacedStandAloneMuons,
75  standAloneMuonSeedsTask)
76 standalonemuontracking = cms.Sequence(standalonemuontrackingTask)
77 # not commisoned and not relevant in FastSim (?):
78 fastSim.toReplaceWith(standalonemuontrackingTask,standalonemuontrackingTask.copyAndExclude([displacedMuonSeeds,displacedStandAloneMuons]))
79 displacedGlobalMuonTrackingTask = cms.Task(iterDisplcedTrackingTask,displacedGlobalMuons)
80 displacedGlobalMuonTracking = cms.Sequence(displacedGlobalMuonTrackingTask)
81 
82 globalmuontrackingTask = cms.Task(globalMuons,tevMuons,displacedGlobalMuonTrackingTask)
83 globalmuontracking = cms.Sequence(globalmuontrackingTask)
84 # not commisoned and not relevant in FastSim (?):
85 fastSim.toReplaceWith(globalmuontrackingTask,globalmuontrackingTask.copyAndExclude([displacedGlobalMuonTrackingTask]))
86 muontrackingTask = cms.Task(standalonemuontrackingTask,globalmuontrackingTask)
87 muontracking = cms.Sequence(muontrackingTask)
88 # Muon Reconstruction
89 muonrecoTask = cms.Task(muontrackingTask,muonIdProducerTask, displacedMuonIdProducerTask)
90 fastSim.toReplaceWith(muonrecoTask,muonrecoTask.copyAndExclude([displacedMuonIdProducerTask]))
91 muonreco = cms.Sequence(muonrecoTask)
92 # Muon Reconstruction plus Isolation
93 muonreco_plus_isolationTask = cms.Task(muonrecoTask,muIsolationTask)
94 muonreco_plus_isolation = cms.Sequence(muonreco_plus_isolationTask)
95 
96 muonrecoComplete = cms.Sequence(muonreco_plus_isolationTask,muonSelectionTypeTask)
97 
98 
99 # _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- #
100 # -_-_-_- Special Sequences for Iterative tracking -_-_-_- #
101 # -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ #
102 
103 # We need to split the muon sequence above in two, to be able to run the MuonSeeding in the tracker. So muonrecoComplete will
104 # be run no longer...
105 
106 #from RecoMuon.MuonIdentification.earlyMuons_cfi import earlyMuons
107 
108 muonGlobalRecoTask = cms.Task(globalmuontrackingTask,
109  muonIdProducerTask,
110  displacedMuonIdProducerTask,
111  muonSelectionTypeTask,
112  muIsolationTask,
113  muIsolationDisplacedTask)
114 muonGlobalReco = cms.Sequence(muonGlobalRecoTask)
115 
116 # ... instead, the sequences will be run in the following order:
117 # 1st - standalonemuontracking
118 # 2nd - iterative tracking (def in RecoTracker config)
119 # 3rd - MuonIDProducer with 1&2 as input, with special replacements; the earlyMuons above.
120 # 4th - MuonSeeded tracks, inside-out and outside-in
121 # 5th - Merging of the new TK tracks into the generalTracks collection
122 # 6th - Run the remnant part of the muon sequence (muonGlobalReco)
123 
124 
126 fastSim.toReplaceWith(muonGlobalRecoTask, muonGlobalRecoTask.copyAndExclude([muonreco_with_SET_Task,muonSelectionTypeTask,displacedMuonIdProducerTask,muIsolationDisplacedTask]))