CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoMuon/Configuration/python/RecoMuonCosmics_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 ######################## Cosmic Reco #############################
00004 
00005 ## Full detector ##
00006 
00007 # Seed generator
00008 from RecoMuon.MuonSeedGenerator.CosmicMuonSeedProducer_cfi import *
00009 
00010 # Stand alone muon track producer
00011 from RecoMuon.CosmicMuonProducer.cosmicMuons_cff import *
00012 
00013 # Global muon track producer
00014 from RecoMuon.CosmicMuonProducer.globalCosmicMuons_cff import *
00015 globalCosmicMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5LHCNavigation'
00016 
00017 # Muon Id producer
00018 from RecoMuon.MuonIdentification.muonIdProducerSequence_cff import *
00019 
00020 muons = muons1stStep.clone()
00021 
00022 muons.inputCollectionLabels = ['ctfWithMaterialTracksP5LHCNavigation', 'globalCosmicMuons', 'cosmicMuons', "tevMuons:firstHit","tevMuons:picky","tevMuons:dyt"]
00023 muons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks', 'tev firstHit', 'tev picky', 'tev dyt']
00024 muons.fillIsolation = True
00025 muons.fillGlobalTrackQuality = True
00026 # need to modify track selection as well (not clear to what)
00027 muons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
00028 muons.CaloExtractorPSet.CenterConeOnCalIntersection = True
00029 
00030 from RecoMuon.MuonIdentification.calomuons_cfi import *
00031 calomuons.inputTracks = 'ctfWithMaterialTracksP5LHCNavigation'
00032 calomuons.inputCollection = 'muons'
00033 calomuons.inputMuons = 'muons'
00034 
00035 ## Sequences
00036 
00037 # Stand Alone Tracking
00038 STAmuontrackingforcosmics = cms.Sequence(CosmicMuonSeed*cosmicMuons)
00039 # Stand Alone Tracking plus muon ID
00040 STAmuonrecoforcosmics = cms.Sequence(STAmuontrackingforcosmics)
00041 
00042 # Stand Alone Tracking plus global tracking
00043 muontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmics*globalCosmicMuons)
00044 
00045 # Muon Isolation sequence
00046 from RecoMuon.MuonIsolationProducers.muIsolation_cff import *
00047 # muisodeposits based on "muons"
00048 # we are using copy extractors now
00049 muIsoDepositTk.inputTags = cms.VInputTag(cms.InputTag("muons:tracker"))
00050 muIsoDepositJets. inputTags = cms.VInputTag(cms.InputTag("muons:jets"))
00051 muIsoDepositCalByAssociatorTowers.inputTags = cms.VInputTag(cms.InputTag("muons:ecal"), cms.InputTag("muons:hcal"), cms.InputTag("muons:ho"))
00052 
00053 
00054 
00055 # TeV refinement
00056 from RecoMuon.GlobalMuonProducer.tevMuons_cfi import *
00057 tevMuons.MuonCollectionLabel = "globalCosmicMuons"
00058 tevMuons.RefitterParameters.PropDirForCosmics = cms.bool(True)
00059 
00060 # Glb Track Quality
00061 from RecoMuon.GlobalTrackingTools.GlobalTrackQuality_cfi import *
00062 glbTrackQual.InputCollection = "globalCosmicMuons"
00063 
00064 # all muons id
00065 allmuons = cms.Sequence(glbTrackQual*tevMuons*muons*muIsolation*calomuons)
00066 
00067 # Final sequence
00068 muonrecoforcosmics = cms.Sequence(muontrackingforcosmics*allmuons)
00069 muonRecoAllGR = cms.Sequence(muonrecoforcosmics)
00070 
00071 # 1 leg mode
00072 
00073 # Stand alone muon track producer
00074 cosmicMuons1Leg = cosmicMuons.clone()
00075 cosmicMuons1Leg.TrajectoryBuilderParameters.BuildTraversingMuon = True
00076 cosmicMuons1Leg.MuonSeedCollectionLabel = 'CosmicMuonSeed'
00077 
00078 # Global muon track producer
00079 globalCosmicMuons1Leg = globalCosmicMuons.clone()
00080 globalCosmicMuons1Leg.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00081 globalCosmicMuons1Leg.MuonCollectionLabel = 'cosmicMuons1Leg'
00082 
00083 # Muon Id producer
00084 muons1Leg = muons1stStep.clone()
00085 muons1Leg.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuons1Leg', 'cosmicMuons1Leg']
00086 muons1Leg.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00087 muons1Leg.fillIsolation = False
00088 muons1Leg.fillGlobalTrackQuality = False
00089 muons1Leg.fillGlobalTrackRefits = False
00090 # Sequences
00091 
00092 # Stand Alone Tracking
00093 STAmuontrackingforcosmics1Leg = cms.Sequence(CosmicMuonSeed*cosmicMuons1Leg)
00094 
00095 # Stand Alone Tracking plus global tracking
00096 muontrackingforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg*globalCosmicMuons1Leg)
00097 
00098 # all muons id
00099 allmuons1Leg = cms.Sequence(muons1Leg)
00100 
00101 # Stand Alone Tracking plus muon ID
00102 STAmuonrecoforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg)
00103 
00104 # Final sequence
00105 muonrecoforcosmics1Leg = cms.Sequence(muontrackingforcosmics1Leg*allmuons1Leg)
00106 
00107 #####################################################
00108 
00109 # t0 Corrections
00110 
00111 # Seed generator
00112 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone()
00113 CosmicMuonSeedWitht0Correction.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
00114 
00115 # Stand alone muon track producer
00116 cosmicMuonsWitht0Correction = cosmicMuons.clone()
00117 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.BuildTraversingMuon = False
00118 cosmicMuonsWitht0Correction.MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction'
00119 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
00120 
00121 # Global muon track producer
00122 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone()
00123 globalCosmicMuonsWitht0Correction.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00124 globalCosmicMuonsWitht0Correction.MuonCollectionLabel = 'cosmicMuonsWitht0Correction'
00125 
00126 # Muon Id producer
00127 muonsWitht0Correction = muons1stStep.clone()
00128 muonsWitht0Correction.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsWitht0Correction', 'cosmicMuonsWitht0Correction']
00129 muonsWitht0Correction.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00130 muonsWitht0Correction.fillIsolation = True
00131 muonsWitht0Correction.fillGlobalTrackQuality = False
00132 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.UseSegmentT0 = True
00133 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.DTsegments = 'dt4DSegmentsT0Seg'
00134 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.MatchParameters.DTsegments = 'dt4DSegmentsT0Seg'
00135 muonsWitht0Correction.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00136 muonsWitht0Correction.CaloExtractorPSet.CenterConeOnCalIntersection = True
00137 muonsWitht0Correction.fillGlobalTrackRefits = False
00138 #Sequences
00139 
00140 
00141 # Stand Alone Tracking
00142 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(CosmicMuonSeedWitht0Correction*cosmicMuonsWitht0Correction)
00143 
00144 # Stand Alone Tracking plus global tracking
00145 muontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction*globalCosmicMuonsWitht0Correction)
00146 
00147 # Stand Alone Tracking plus muon ID
00148 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction)
00149 
00150 # all muons id
00151 allmuonsWitht0Correction = cms.Sequence(muonsWitht0Correction)
00152 
00153 # Final sequence
00154 muonrecoforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0Correction*allmuonsWitht0Correction)
00155 
00156 ### Final sequence ###
00157 muonRecoGR = cms.Sequence(muonrecoforcosmics1Leg+muonrecoforcosmicsWitht0Correction)
00158 
00159 #####################################################
00160 
00161 # Beam halo in Encaps only. GLB reco only is needed
00162 
00163 # Seed generator 
00164 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone()
00165 CosmicMuonSeedEndCapsOnly.EnableDTMeasurement = False
00166 
00167 # Stand alone muon track producer
00168 cosmicMuonsEndCapsOnly = cosmicMuons.clone()
00169 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.EnableDTMeasurement = False
00170 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.MuonNavigationParameters.Barrel = False
00171 cosmicMuonsEndCapsOnly.MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly'
00172 
00173 # Global muon track producer
00174 globalBeamHaloMuonEndCapslOnly = globalCosmicMuons.clone()
00175 globalBeamHaloMuonEndCapslOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'beamhaloTracks'
00176 globalBeamHaloMuonEndCapslOnly.MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
00177 
00178 
00179 # Muon Id producer
00180 muonsBeamHaloEndCapsOnly = muons1stStep.clone()           
00181 muonsBeamHaloEndCapsOnly.inputCollectionLabels = ['beamhaloTracks', 'globalBeamHaloMuonEndCapslOnly', 'cosmicMuonsEndCapsOnly']
00182 muonsBeamHaloEndCapsOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00183 muonsBeamHaloEndCapsOnly.fillIsolation = True
00184 muonsBeamHaloEndCapsOnly.fillGlobalTrackQuality = False
00185 muonsBeamHaloEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00186 muonsBeamHaloEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
00187 muonsBeamHaloEndCapsOnly.fillGlobalTrackRefits = False
00188 
00189 # Sequences
00190 muonrecoBeamHaloEndCapsOnly = cms.Sequence(CosmicMuonSeedEndCapsOnly*cosmicMuonsEndCapsOnly*globalBeamHaloMuonEndCapslOnly*muonsBeamHaloEndCapsOnly)
00191 
00192 ########
00193 
00194 ## Full detector but NO RPC ##
00195 
00196 # Stand alone muon track producer
00197 cosmicMuonsNoRPC = cosmicMuons.clone()
00198 cosmicMuonsNoRPC.TrajectoryBuilderParameters.EnableRPCMeasurement = False
00199 
00200 # Global muon track producer
00201 globalCosmicMuonsNoRPC = globalCosmicMuons.clone()
00202 globalCosmicMuonsNoRPC.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00203 globalCosmicMuonsNoRPC.MuonCollectionLabel = 'cosmicMuonsNoRPC'
00204 
00205 # Muon Id producer
00206 muonsNoRPC = muons1stStep.clone()
00207 muonsNoRPC.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsNoRPC', 'cosmicMuonsNoRPC']
00208 muonsNoRPC.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00209 muonsNoRPC.fillIsolation = True
00210 muonsNoRPC.fillGlobalTrackQuality = False
00211 muonsNoRPC.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00212 muonsNoRPC.CaloExtractorPSet.CenterConeOnCalIntersection = True
00213 muonsNoRPC.fillGlobalTrackRefits = False
00214 
00215 #Sequences
00216 
00217 # Stand Alone Tracking
00218 STAmuontrackingforcosmicsNoRPC = cms.Sequence(cosmicMuonsNoRPC)
00219 
00220 # Stand Alone Tracking plus global tracking
00221 muontrackingforcosmicsNoRPC = cms.Sequence(STAmuontrackingforcosmicsNoRPC*globalCosmicMuonsNoRPC)
00222 
00223 # all muons id
00224 allmuonsNoRPC = cms.Sequence(muonsNoRPC)
00225 
00226 # Final sequence
00227 muonrecoforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPC*allmuonsNoRPC)
00228 
00229 ##############################################
00230 
00231 ## Split Tracks  ##
00232 
00233 # Global muon track producer
00234 globalCosmicSplitMuons = globalCosmicMuons.clone()
00235 globalCosmicSplitMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'splittedTracksP5'
00236 globalCosmicSplitMuons.MuonCollectionLabel = 'cosmicMuons'
00237 
00238 # Muon Id producer
00239 
00240 splitMuons = muons1stStep.clone()
00241 splitMuons.inputCollectionLabels = ['splittedTracksP5', 'globalCosmicSplitMuons', 'cosmicMuons']
00242 splitMuons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00243 splitMuons.fillIsolation = True
00244 splitMuons.fillGlobalTrackQuality = False
00245 splitMuons.TrackExtractorPSet.inputTrackCollection = 'splittedTracksP5'
00246 splitMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
00247 splitMuons.fillGlobalTrackRefits = False
00248 
00249 #Sequences
00250 
00251 # Final sequence
00252 muonrecoforsplitcosmics = cms.Sequence(globalCosmicSplitMuons*splitMuons)
00253 
00254 ##############################################
00255 
00256 ######################## LHC like Reco #############################
00257 
00258 # Standard reco
00259 from RecoMuon.Configuration.RecoMuonPPonly_cff import *
00260 
00261 # Muon Id producer
00262 lhcSTAMuons = muons1stStep.clone()
00263 lhcSTAMuons.inputCollectionLabels = ['standAloneMuons']
00264 lhcSTAMuons.inputCollectionTypes = ['outer tracks']
00265 lhcSTAMuons.fillIsolation = True
00266 lhcSTAMuons.fillGlobalTrackQuality = False
00267 lhcSTAMuons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
00268 lhcSTAMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
00269 lhcSTAMuons.fillGlobalTrackRefits = False
00270 
00271 # Final sequence
00272 muonRecoLHC = cms.Sequence(ancientMuonSeed*standAloneMuons*lhcSTAMuons)
00273 
00274 
00275 
00276 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
00277 
00278 muonRecoGR = cms.Sequence(muonRecoAllGR*muonRecoGR*muonrecoBeamHaloEndCapsOnly*muonrecoforcosmicsNoRPC*muonrecoforsplitcosmics*muonRecoLHC)
00279 
00280 #######################################################################################################################
00281 
00282 
00283 
00284 
00285