CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/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.inputCollectionLabels = ['ctfWithMaterialTracksP5LHCNavigation', 'globalCosmicMuons', 'cosmicMuons']
00021 muons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00022 muons.fillIsolation = True
00023 muons.fillGlobalTrackQuality = True
00024 # need to modify track selection as well (not clear to what)
00025 muons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
00026 muons.CaloExtractorPSet.CenterConeOnCalIntersection = True
00027 
00028 from RecoMuon.MuonIdentification.calomuons_cfi import *
00029 calomuons.inputTracks = 'ctfWithMaterialTracksP5LHCNavigation'
00030 
00031 ## Sequences
00032 
00033 # Stand Alone Tracking
00034 STAmuontrackingforcosmics = cms.Sequence(CosmicMuonSeed*cosmicMuons)
00035 # Stand Alone Tracking plus muon ID
00036 STAmuonrecoforcosmics = cms.Sequence(STAmuontrackingforcosmics)
00037 
00038 # Stand Alone Tracking plus global tracking
00039 muontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmics*globalCosmicMuons)
00040 
00041 # Muon Isolation sequence
00042 from RecoMuon.MuonIsolationProducers.muIsolation_cff import *
00043 # muisodeposits based on "muons"
00044 # we are using copy extractors now
00045 
00046 # TeV refinement
00047 from RecoMuon.GlobalMuonProducer.tevMuons_cfi import *
00048 tevMuons.MuonCollectionLabel = "globalCosmicMuons"
00049 tevMuons.RefitterParameters.PropDirForCosmics = cms.bool(True)
00050 
00051 # Glb Track Quality
00052 from RecoMuon.GlobalTrackingTools.GlobalTrackQuality_cfi import *
00053 glbTrackQual.InputCollection = "globalCosmicMuons"
00054 
00055 # all muons id
00056 allmuons = cms.Sequence(glbTrackQual*muons*tevMuons*muIsolation*calomuons)
00057 
00058 # Final sequence
00059 muonrecoforcosmics = cms.Sequence(muontrackingforcosmics*allmuons)
00060 muonRecoAllGR = cms.Sequence(muonrecoforcosmics)
00061 
00062 ##############################################
00063 
00064 ## Barrel only ##
00065 
00066 # Seed generator 
00067 CosmicMuonSeedBarrelOnly = CosmicMuonSeed.clone()
00068 CosmicMuonSeedBarrelOnly.EnableCSCMeasurement = False
00069 
00070 # Stand alone muon track producer
00071 cosmicMuonsBarrelOnly = cosmicMuons.clone()
00072 cosmicMuonsBarrelOnly.TrajectoryBuilderParameters.EnableCSCMeasurement = False
00073 cosmicMuonsBarrelOnly.TrajectoryBuilderParameters.MuonNavigationParameters.Endcap = False
00074 cosmicMuonsBarrelOnly.MuonSeedCollectionLabel = 'CosmicMuonSeedBarrelOnly'
00075 
00076 # Global muon track producer
00077 globalCosmicMuonsBarrelOnly = globalCosmicMuons.clone()
00078 globalCosmicMuonsBarrelOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00079 globalCosmicMuonsBarrelOnly.MuonCollectionLabel = 'cosmicMuonsBarrelOnly'
00080 
00081 # Muon Id producer
00082 muonsBarrelOnly = muons.clone()
00083 muonsBarrelOnly.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsBarrelOnly', 'cosmicMuonsBarrelOnly']
00084 muonsBarrelOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00085 muonsBarrelOnly.fillIsolation = True
00086 muonsBarrelOnly.fillGlobalTrackQuality = False
00087 muonsBarrelOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00088 muonsBarrelOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
00089 
00090 #Sequences
00091 
00092 # Stand Alone Tracking
00093 STAmuontrackingforcosmicsBarrelOnly = cms.Sequence(CosmicMuonSeedBarrelOnly*cosmicMuonsBarrelOnly)
00094 
00095 # Stand Alone Tracking plus global tracking
00096 muontrackingforcosmicsBarrelOnly = cms.Sequence(STAmuontrackingforcosmicsBarrelOnly*globalCosmicMuonsBarrelOnly)
00097 
00098 # Stand Alone Tracking plus muon ID
00099 STAmuonrecoforcosmicsBarrelOnly = cms.Sequence(STAmuontrackingforcosmicsBarrelOnly)
00100 
00101 # all muons id
00102 allmuonsBarrelOnly = cms.Sequence(muonsBarrelOnly)
00103 
00104 # Final sequence
00105 muonrecoforcosmicsBarrelOnly = cms.Sequence(muontrackingforcosmicsBarrelOnly*allmuonsBarrelOnly)
00106 
00107 ########
00108 
00109 # 1 leg mode
00110 
00111 # Stand alone muon track producer
00112 cosmicMuons1Leg = cosmicMuons.clone()
00113 cosmicMuons1Leg.TrajectoryBuilderParameters.BuildTraversingMuon = True
00114 cosmicMuons1Leg.MuonSeedCollectionLabel = 'CosmicMuonSeed'
00115 
00116 # Global muon track producer
00117 globalCosmicMuons1Leg = globalCosmicMuons.clone()
00118 globalCosmicMuons1Leg.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00119 globalCosmicMuons1Leg.MuonCollectionLabel = 'cosmicMuons1Leg'
00120 
00121 # Muon Id producer
00122 muons1Leg = muons.clone()
00123 muons1Leg.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuons1Leg', 'cosmicMuons1Leg']
00124 muons1Leg.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00125 muons1Leg.fillIsolation = False
00126 muons1Leg.fillGlobalTrackQuality = False
00127 
00128 # Sequences
00129 
00130 # Stand Alone Tracking
00131 STAmuontrackingforcosmics1Leg = cms.Sequence(CosmicMuonSeed*cosmicMuons1Leg)
00132 
00133 # Stand Alone Tracking plus global tracking
00134 muontrackingforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg*globalCosmicMuons1Leg)
00135 
00136 # all muons id
00137 allmuons1Leg = cms.Sequence(muons1Leg)
00138 
00139 # Stand Alone Tracking plus muon ID
00140 STAmuonrecoforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg)
00141 
00142 # Final sequence
00143 muonrecoforcosmics1Leg = cms.Sequence(muontrackingforcosmics1Leg*allmuons1Leg)
00144 
00145 ########
00146 
00147 # t0 Corrections
00148 
00149 # Seed generator
00150 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone()
00151 CosmicMuonSeedWitht0Correction.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
00152 
00153 # Stand alone muon track producer
00154 cosmicMuonsWitht0Correction = cosmicMuons.clone()
00155 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.BuildTraversingMuon = False
00156 cosmicMuonsWitht0Correction.MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction'
00157 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
00158 
00159 # Global muon track producer
00160 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone()
00161 globalCosmicMuonsWitht0Correction.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00162 globalCosmicMuonsWitht0Correction.MuonCollectionLabel = 'cosmicMuonsWitht0Correction'
00163 
00164 # Muon Id producer
00165 muonsWitht0Correction = muons.clone()
00166 muonsWitht0Correction.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsWitht0Correction', 'cosmicMuonsWitht0Correction']
00167 muonsWitht0Correction.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00168 muonsWitht0Correction.fillIsolation = True
00169 muonsWitht0Correction.fillGlobalTrackQuality = False
00170 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.UseSegmentT0 = True
00171 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.DTsegments = 'dt4DSegmentsT0Seg'
00172 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.MatchParameters.DTsegments = 'dt4DSegmentsT0Seg'
00173 muonsWitht0Correction.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00174 muonsWitht0Correction.CaloExtractorPSet.CenterConeOnCalIntersection = True
00175 
00176 #Sequences
00177 
00178 
00179 # Stand Alone Tracking
00180 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(CosmicMuonSeedWitht0Correction*cosmicMuonsWitht0Correction)
00181 
00182 # Stand Alone Tracking plus global tracking
00183 muontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction*globalCosmicMuonsWitht0Correction)
00184 
00185 # Stand Alone Tracking plus muon ID
00186 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction)
00187 
00188 # all muons id
00189 allmuonsWitht0Correction = cms.Sequence(muonsWitht0Correction)
00190 
00191 # Final sequence
00192 muonrecoforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0Correction*allmuonsWitht0Correction)
00193 
00194 ### Final sequence for barrel only ###
00195 muonRecoBarrelGR = cms.Sequence(muonrecoforcosmicsBarrelOnly+muonrecoforcosmics1Leg+muonrecoforcosmicsWitht0Correction)
00196 
00197 ##############################################
00198 
00199 ## Endcaps only ##
00200 
00201 # Seed generator 
00202 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone()
00203 CosmicMuonSeedEndCapsOnly.EnableDTMeasurement = False
00204 
00205 # Stand alone muon track producer
00206 cosmicMuonsEndCapsOnly = cosmicMuons.clone()
00207 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.EnableDTMeasurement = False
00208 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.MuonNavigationParameters.Barrel = False
00209 cosmicMuonsEndCapsOnly.MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly'
00210 
00211 # Global muon track producer
00212 globalCosmicMuonsEndCapsOnly = globalCosmicMuons.clone()
00213 globalCosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00214 globalCosmicMuonsEndCapsOnly.MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
00215 
00216 # Muon Id producer
00217 muonsEndCapsOnly = muons.clone()
00218 muonsEndCapsOnly.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsEndCapsOnly', 'cosmicMuonsEndCapsOnly']
00219 muonsEndCapsOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00220 muonsEndCapsOnly.fillIsolation = True
00221 muonsEndCapsOnly.fillGlobalTrackQuality = False
00222 muonsEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00223 muonsEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
00224 
00225 # Sequences
00226 
00227 # Stand Alone Tracking
00228 STAmuontrackingforcosmicsEnsCapsOnly = cms.Sequence(CosmicMuonSeedEndCapsOnly*cosmicMuonsEndCapsOnly)
00229 
00230 # Stand Alone Tracking plus global tracking
00231 muontrackingforcosmicsEndCapsOnly = cms.Sequence(STAmuontrackingforcosmicsEnsCapsOnly*globalCosmicMuonsEndCapsOnly)
00232 
00233 # Stand Alone Tracking plus muon ID
00234 STAmuonrecoforcosmicsEndCapsOnly = cms.Sequence(STAmuontrackingforcosmicsEnsCapsOnly)
00235 
00236 # all muons id
00237 allmuonsEndCapsOnly = cms.Sequence(muonsEndCapsOnly)
00238 
00239 # Final sequence
00240 muonrecoforcosmicsEndCapsOnly = cms.Sequence(muontrackingforcosmicsEndCapsOnly*allmuonsEndCapsOnly)
00241 
00242 ########
00243 
00244 # Beam halo in Encaps only. GLB reco only is needed
00245 globalBeamHaloMuonEndCapslOnly = globalCosmicMuonsEndCapsOnly.clone()
00246 globalBeamHaloMuonEndCapslOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'beamhaloTracks'
00247 
00248 # Muon Id producer
00249 muonsBeamHaloEndCapsOnly = muons.clone()           
00250 muonsBeamHaloEndCapsOnly.inputCollectionLabels = ['beamhaloTracks', 'globalBeamHaloMuonEndCapslOnly', 'cosmicMuonsEndCapsOnly']
00251 muonsBeamHaloEndCapsOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00252 muonsBeamHaloEndCapsOnly.fillIsolation = True
00253 muonsBeamHaloEndCapsOnly.fillGlobalTrackQuality = False
00254 muonsBeamHaloEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00255 muonsBeamHaloEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
00256 
00257 # Sequences
00258 muonrecoBeamHaloEndCapsOnly = cms.Sequence(globalBeamHaloMuonEndCapslOnly*muonsBeamHaloEndCapsOnly)
00259 
00260 ### Final sequence for endcaps only ###
00261 muonRecoEndCapsGR = cms.Sequence(muonrecoforcosmicsEndCapsOnly*muonrecoBeamHaloEndCapsOnly)
00262 
00263 ########
00264 
00265 ## Full detector but NO RPC ##
00266 
00267 # Stand alone muon track producer
00268 cosmicMuonsNoRPC = cosmicMuons.clone()
00269 cosmicMuonsNoRPC.TrajectoryBuilderParameters.EnableRPCMeasurement = False
00270 
00271 # Global muon track producer
00272 globalCosmicMuonsNoRPC = globalCosmicMuons.clone()
00273 globalCosmicMuonsNoRPC.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
00274 globalCosmicMuonsNoRPC.MuonCollectionLabel = 'cosmicMuonsNoRPC'
00275 
00276 # Muon Id producer
00277 muonsNoRPC = muons.clone()
00278 muonsNoRPC.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsNoRPC', 'cosmicMuonsNoRPC']
00279 muonsNoRPC.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00280 muonsNoRPC.fillIsolation = True
00281 muonsNoRPC.fillGlobalTrackQuality = False
00282 muonsNoRPC.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
00283 muonsNoRPC.CaloExtractorPSet.CenterConeOnCalIntersection = True
00284 
00285 #Sequences
00286 
00287 # Stand Alone Tracking
00288 STAmuontrackingforcosmicsNoRPC = cms.Sequence(cosmicMuonsNoRPC)
00289 
00290 # Stand Alone Tracking plus global tracking
00291 muontrackingforcosmicsNoRPC = cms.Sequence(STAmuontrackingforcosmicsNoRPC*globalCosmicMuonsNoRPC)
00292 
00293 # all muons id
00294 allmuonsNoRPC = cms.Sequence(muonsNoRPC)
00295 
00296 # Final sequence
00297 muonrecoforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPC*allmuonsNoRPC)
00298 
00299 ##############################################
00300 
00301 ## Split Tracks  ##
00302 
00303 # Global muon track producer
00304 globalCosmicSplitMuons = globalCosmicMuons.clone()
00305 globalCosmicSplitMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'splittedTracksP5'
00306 globalCosmicSplitMuons.MuonCollectionLabel = 'cosmicMuons'
00307 
00308 # Muon Id producer
00309 
00310 splitMuons = muons.clone()
00311 splitMuons.inputCollectionLabels = ['splittedTracksP5', 'globalCosmicSplitMuons', 'cosmicMuons']
00312 splitMuons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
00313 splitMuons.fillIsolation = True
00314 splitMuons.fillGlobalTrackQuality = False
00315 splitMuons.TrackExtractorPSet.inputTrackCollection = 'splittedTracksP5'
00316 splitMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
00317 
00318 #Sequences
00319 
00320 # Final sequence
00321 muonrecoforsplitcosmics = cms.Sequence(globalCosmicSplitMuons*splitMuons)
00322 
00323 ##############################################
00324 
00325 ######################## LHC like Reco #############################
00326 
00327 # Standard reco
00328 from RecoMuon.Configuration.RecoMuonPPonly_cff import *
00329 
00330 ## Barrel only ##
00331 
00332 # Seed generator 
00333 lhcMuonSeedBarrelOnly = ancientMuonSeed.clone()
00334 lhcMuonSeedBarrelOnly.EnableCSCMeasurement = False
00335 
00336 # Stand alone muon track producer
00337 lhcStandAloneMuonsBarrelOnly = standAloneMuons.clone()
00338 lhcStandAloneMuonsBarrelOnly.STATrajBuilderParameters.BWFilterParameters.EnableCSCMeasurement = False
00339 lhcStandAloneMuonsBarrelOnly.InputObjects = 'lhcMuonSeedBarrelOnly'
00340 #lhcStandAloneMuonsBarrelOnly.STATrajBuilderParameters.NavigationType = 'Direct'
00341 
00342 # Muon Id producer
00343 lhcSTAMuonsBarrelOnly = muons.clone()
00344 lhcSTAMuonsBarrelOnly.inputCollectionLabels = ['lhcStandAloneMuonsBarrelOnly']
00345 lhcSTAMuonsBarrelOnly.inputCollectionTypes = ['outer tracks']
00346 lhcSTAMuonsBarrelOnly.fillIsolation = True
00347 lhcSTAMuonsBarrelOnly.fillGlobalTrackQuality = False
00348 lhcSTAMuonsBarrelOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
00349 lhcSTAMuonsBarrelOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
00350 
00351 # Seqeunces
00352 lhcMuonBarrelOnly = cms.Sequence(lhcMuonSeedBarrelOnly*lhcStandAloneMuonsBarrelOnly)
00353 
00354 # Final sequence
00355 muonrecocosmicLHCBarrelOnly = cms.Sequence(lhcMuonBarrelOnly*lhcSTAMuonsBarrelOnly)
00356 
00357 ##############################################
00358 
00359 ## Endcaps only ##
00360 
00361 # Seed generator
00362 lhcMuonSeedEndCapsOnly = ancientMuonSeed.clone()
00363 lhcMuonSeedEndCapsOnly.EnableDTMeasurement = False
00364 
00365 # Stand alone muon track producer
00366 lhcStandAloneMuonsEndCapsOnly = standAloneMuons.clone()
00367 lhcStandAloneMuonsEndCapsOnly.STATrajBuilderParameters.BWFilterParameters.EnableDTMeasurement = False
00368 lhcStandAloneMuonsEndCapsOnly.InputObjects = 'lhcMuonSeedEndCapsOnly'
00369 #lhcStandAloneMuonsBarrelOnly.STATrajBuilderParameters.NavigationType = 'Direct'
00370 
00371 # Muon Id producer
00372 lhcSTAMuonsEndCapsOnly = muons.clone()
00373 lhcSTAMuonsEndCapsOnly.inputCollectionLabels = ['lhcStandAloneMuonsEndCapsOnly']
00374 lhcSTAMuonsEndCapsOnly.inputCollectionTypes = ['outer tracks']
00375 lhcSTAMuonsEndCapsOnly.fillIsolation = True
00376 lhcSTAMuonsEndCapsOnly.fillGlobalTrackQuality = False
00377 lhcSTAMuonsEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
00378 lhcSTAMuonsEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
00379 
00380 # Seqeunces
00381 lhcMuonEndCapsOnly = cms.Sequence(lhcMuonSeedEndCapsOnly*lhcStandAloneMuonsEndCapsOnly)
00382 
00383 # Final sequence
00384 muonrecocosmicLHCEndCapsOnly = cms.Sequence(lhcMuonEndCapsOnly*lhcSTAMuonsEndCapsOnly)
00385 
00386 ## Fianl sequence for cosmics a la LHC 
00387 muonRecoLHC = cms.Sequence(muonrecocosmicLHCBarrelOnly*muonrecocosmicLHCEndCapsOnly)
00388 
00389 ##############################################
00390 
00391 
00392 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
00393 
00394 muonRecoGR = cms.Sequence(muonRecoAllGR*muonRecoBarrelGR*muonRecoEndCapsGR*muonrecoforcosmicsNoRPC*muonrecoforsplitcosmics*muonRecoLHC)
00395 
00396 #######################################################################################################################
00397 
00398 
00399 
00400 
00401