CMS 3D CMS Logo

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