Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-25 02:14:08

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ######################## Cosmic Reco #############################
0004 
0005 ## Full detector ##
0006 
0007 # Seed generator
0008 from RecoMuon.MuonSeedGenerator.CosmicMuonSeedProducer_cfi import *
0009 
0010 # Stand alone muon track producer
0011 from RecoMuon.CosmicMuonProducer.cosmicMuons_cff import *
0012 
0013 # Global muon track producer
0014 from RecoMuon.CosmicMuonProducer.globalCosmicMuons_cff import *
0015 globalCosmicMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5LHCNavigation'
0016 
0017 # Muon Id producer
0018 from RecoMuon.MuonIdentification.muonIdProducerSequence_cff import *
0019 
0020 muons = muons1stStep.clone(
0021     inputCollectionLabels = ['ctfWithMaterialTracksP5LHCNavigation', 
0022                              'globalCosmicMuons', 
0023                              'cosmicMuons', 
0024                              'tevMuons:firstHit',
0025                              'tevMuons:picky',
0026                              'tevMuons:dyt'],
0027 
0028     inputCollectionTypes = ['inner tracks', 
0029                             'links', 
0030                             'outer tracks', 
0031                             'tev firstHit', 
0032                             'tev picky', 
0033                             'tev dyt'],
0034     fillIsolation = True,
0035     fillGlobalTrackQuality = True,
0036     # need to modify track selection as well (not clear to what)
0037     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'),
0038     # set wide cone until the code is made to compute this wrt CalIntersection
0039     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0),
0040     TimingFillerParameters = dict(
0041     DTTimingParameters = dict(PruneCut = 9999),
0042     CSCTimingParameters = dict(PruneCut = 9999))
0043 )
0044 
0045 #similar to what's in pp configuration
0046 muonsFromCosmics = muons1stStep.clone(
0047     inputCollectionLabels = ['cosmicMuons'],
0048     inputCollectionTypes = ['outer tracks'],
0049     fillIsolation = False,
0050     fillGlobalTrackQuality = False,
0051     fillGlobalTrackRefits = False,
0052     TrackExtractorPSet = dict(inputTrackCollection = 'cosmicMuons'),
0053     TimingFillerParameters = dict(
0054     DTTimingParameters = dict(PruneCut = 9999),
0055     CSCTimingParameters = dict(PruneCut = 9999))
0056 )
0057 
0058 ## Sequences
0059 # Stand Alone Tracking
0060 STAmuontrackingforcosmicsTask = cms.Task(CosmicMuonSeed,cosmicMuons)
0061 STAmuontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmicsTask)
0062 
0063 # Stand Alone Tracking plus global tracking
0064 muontrackingforcosmicsTask = cms.Task(STAmuontrackingforcosmicsTask,globalCosmicMuons)
0065 muontrackingforcosmics = cms.Sequence(muontrackingforcosmicsTask)
0066 
0067 # Muon Isolation sequence
0068 from RecoMuon.MuonIsolationProducers.muIsolation_cff import *
0069 # muisodeposits based on "muons"
0070 # we are using copy extractors now
0071 muIsoDepositTk.inputTags = ['muons:tracker']
0072 muIsoDepositJets.inputTags = ['muons:jets']
0073 muIsoDepositCalByAssociatorTowers.inputTags = ['muons:ecal', 'muons:hcal', 'muons:ho']
0074 muIsoDepositCalByAssociatorHits.inputTags = ['muons:ecal', 'muons:hcal', 'muons:ho']
0075 
0076 # TeV refinement
0077 from RecoMuon.GlobalMuonProducer.tevMuons_cfi import *
0078 tevMuons.MuonCollectionLabel = 'globalCosmicMuons'
0079 tevMuons.RefitterParameters.PropDirForCosmics = True
0080 
0081 # Glb Track Quality
0082 from RecoMuon.GlobalTrackingTools.GlobalTrackQuality_cfi import *
0083 glbTrackQual.InputCollection = 'globalCosmicMuons'
0084 
0085 # all muons id
0086 allmuonsTask = cms.Task(glbTrackQual,
0087                         tevMuons,
0088                         muons,
0089                         muIsolationTask)
0090 allmuons = cms.Sequence(allmuonsTask)
0091 
0092 # Final sequence
0093 muonrecoforcosmicsTask = cms.Task(muontrackingforcosmicsTask,
0094                   allmuonsTask,
0095                                   muonsFromCosmics)
0096 muonrecoforcosmics = cms.Sequence(muonrecoforcosmicsTask)
0097 
0098 # 1 leg mode
0099 # Stand alone muon track producer
0100 cosmicMuons1Leg = cosmicMuons.clone(
0101     MuonSeedCollectionLabel = 'CosmicMuonSeed',
0102     TrajectoryBuilderParameters = dict(BuildTraversingMuon = True)
0103 )
0104 
0105 # Global muon track producer
0106 globalCosmicMuons1Leg = globalCosmicMuons.clone(
0107     MuonCollectionLabel = 'cosmicMuons1Leg',
0108     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
0109 )
0110 
0111 # Muon Id producer
0112 muons1Leg = muons1stStep.clone(
0113     inputCollectionLabels = ['ctfWithMaterialTracksP5', 
0114                              'globalCosmicMuons1Leg', 
0115                              'cosmicMuons1Leg'],
0116     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0117     fillIsolation = False,
0118     fillGlobalTrackQuality = False,
0119     fillGlobalTrackRefits = False,
0120     TimingFillerParameters = dict(
0121         DTTimingParameters = dict(PruneCut = 9999),
0122         CSCTimingParameters = dict(PruneCut = 9999))
0123 )
0124 
0125 # Sequences
0126 # Stand Alone Tracking
0127 STAmuontrackingforcosmics1LegTask = cms.Task(CosmicMuonSeed,cosmicMuons1Leg)
0128 
0129 # Stand Alone Tracking plus global tracking
0130 muontrackingforcosmics1LegTask = cms.Task(STAmuontrackingforcosmics1LegTask, globalCosmicMuons1Leg)
0131 
0132 # Final sequence
0133 muonrecoforcosmics1LegTask = cms.Task(muontrackingforcosmics1LegTask,muons1Leg)
0134 
0135 #####################################################
0136 
0137 # t0 Corrections
0138 
0139 # Seed generator
0140 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone(
0141     DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
0142 )
0143 
0144 # Stand alone muon track producer
0145 cosmicMuonsWitht0Correction = cosmicMuons.clone(
0146     MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction',
0147     TrajectoryBuilderParameters = dict(BuildTraversingMuon = False, DTRecSegmentLabel = 'dt4DSegmentsT0Seg')
0148 )
0149 
0150 # Global muon track producer
0151 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone(
0152     MuonCollectionLabel = 'cosmicMuonsWitht0Correction',
0153     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
0154 )
0155 
0156 # Muon Id producer
0157 muonsWitht0Correction = muons1stStep.clone(
0158     inputCollectionLabels = ['ctfWithMaterialTracksP5', 
0159                              'globalCosmicMuonsWitht0Correction', 
0160                              'cosmicMuonsWitht0Correction'],
0161     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0162     fillIsolation = True,
0163     fillGlobalTrackQuality = False,
0164     fillGlobalTrackRefits = False,
0165     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
0166     # set wide cone until the code is made to compute this wrt CalIntersection
0167     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0),
0168     TimingFillerParameters = dict(
0169     DTTimingParameters = dict(UseSegmentT0 = True),
0170     MatchParameters = dict(DTsegments = 'dt4DSegmentsT0Seg'))
0171 )
0172 
0173 #Sequences
0174 # Stand Alone Tracking
0175 STAmuontrackingforcosmicsWitht0CorrectionTask = cms.Task(CosmicMuonSeedWitht0Correction,cosmicMuonsWitht0Correction)
0176 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
0177 
0178 # Stand Alone Tracking plus global tracking
0179 muontrackingforcosmicsWitht0CorrectionTask = cms.Task(STAmuontrackingforcosmicsWitht0CorrectionTask,globalCosmicMuonsWitht0Correction)
0180 muontrackingforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0CorrectionTask)
0181 
0182 # Stand Alone Tracking plus muon ID
0183 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
0184 
0185 # Final sequence
0186 muonrecoforcosmicsWitht0CorrectionTask = cms.Task(muontrackingforcosmicsWitht0CorrectionTask,muonsWitht0Correction)
0187 muonrecoforcosmicsWitht0Correction = cms.Sequence(muonrecoforcosmicsWitht0CorrectionTask)
0188 
0189 ### Final sequence ###
0190 muonRecoGRTask = cms.Task(muonrecoforcosmics1LegTask,muonrecoforcosmicsWitht0CorrectionTask)
0191 muonRecoGR = cms.Sequence(muonRecoGRTask)
0192 
0193 #####################################################
0194 
0195 # Beam halo in Encaps only. GLB reco only is needed
0196 
0197 # Seed generator 
0198 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone(
0199     EnableDTMeasurement = False
0200 )
0201 
0202 # Stand alone muon track producer
0203 cosmicMuonsEndCapsOnly = cosmicMuons.clone(
0204     MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly',
0205     TrajectoryBuilderParameters = dict(
0206     EnableDTMeasurement = False,
0207     MuonNavigationParameters = dict(Barrel = False))
0208 )
0209 
0210 # Global muon track producer
0211 globalBeamHaloMuonEndCapslOnly = globalCosmicMuons.clone(
0212     MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
0213 )
0214 
0215 # Muon Id producer
0216 muonsBeamHaloEndCapsOnly = muons1stStep.clone(
0217     inputCollectionLabels = ['beamhaloTracks', 
0218                              'globalBeamHaloMuonEndCapslOnly', 
0219                              'cosmicMuonsEndCapsOnly'],
0220     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0221     fillIsolation = True,
0222     fillGlobalTrackQuality = False,
0223     fillGlobalTrackRefits = False,
0224     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
0225     # set wide cone until the code is made to compute this wrt CalIntersection
0226     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0227 )
0228 
0229 # Sequences
0230 muonrecoBeamHaloEndCapsOnlyTask = cms.Task(CosmicMuonSeedEndCapsOnly,
0231                                            cosmicMuonsEndCapsOnly,
0232                                            globalBeamHaloMuonEndCapslOnly,
0233                                            muonsBeamHaloEndCapsOnly)
0234 muonrecoBeamHaloEndCapsOnly = cms.Sequence(muonrecoBeamHaloEndCapsOnlyTask)
0235 
0236 ########
0237 
0238 ## Full detector but NO RPC ##
0239 
0240 # Stand alone muon track producer
0241 cosmicMuonsNoRPC = cosmicMuons.clone(
0242     TrajectoryBuilderParameters = dict(EnableRPCMeasurement = False)
0243 )
0244 
0245 # Global muon track producer
0246 globalCosmicMuonsNoRPC = globalCosmicMuons.clone(
0247     MuonCollectionLabel = 'cosmicMuonsNoRPC',
0248     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
0249 )
0250 
0251 # Muon Id producer
0252 muonsNoRPC = muons1stStep.clone(
0253     inputCollectionLabels = ['ctfWithMaterialTracksP5',
0254                              'globalCosmicMuonsNoRPC', 
0255                              'cosmicMuonsNoRPC'],
0256     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0257     fillIsolation = True,
0258     fillGlobalTrackQuality = False,
0259     fillGlobalTrackRefits = False,
0260     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
0261     # set wide cone until the code is made to compute this wrt CalIntersection
0262     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0263 )
0264 
0265 #Sequences
0266 
0267 # Stand Alone Tracking plus global tracking
0268 muontrackingforcosmicsNoRPCTask = cms.Task(cosmicMuonsNoRPC,globalCosmicMuonsNoRPC)
0269 muontrackingforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPCTask)
0270 
0271 # Final sequence
0272 muonrecoforcosmicsNoRPCTask = cms.Task(muontrackingforcosmicsNoRPCTask,muonsNoRPC)
0273 muonrecoforcosmicsNoRPC = cms.Sequence(muonrecoforcosmicsNoRPCTask)
0274 
0275 ##############################################
0276 
0277 ## Split Tracks  ##
0278 
0279 # Global muon track producer
0280 globalCosmicSplitMuons = globalCosmicMuons.clone(
0281     MuonCollectionLabel = 'cosmicMuons',
0282     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'splittedTracksP5')
0283 )
0284 
0285 # Muon Id producer
0286 splitMuons = muons1stStep.clone(
0287     inputCollectionLabels = ['splittedTracksP5', 
0288                              'globalCosmicSplitMuons', 
0289                              'cosmicMuons'],
0290     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0291     fillIsolation = True,
0292     fillGlobalTrackQuality = False,
0293     fillGlobalTrackRefits = False,
0294     TrackExtractorPSet = dict(inputTrackCollection = 'splittedTracksP5'),
0295     # set wide cone until the code is made to compute this wrt CalIntersection
0296     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0297 )
0298 
0299 #Sequences
0300 
0301 # Final sequence
0302 muonrecoforsplitcosmicsTask = cms.Task(globalCosmicSplitMuons,splitMuons)
0303 muonrecoforsplitcosmics = cms.Sequence(muonrecoforsplitcosmicsTask)
0304 
0305 ##############################################
0306 
0307 ######################## LHC like Reco #############################
0308 
0309 # Standard reco
0310 from RecoMuon.Configuration.RecoMuonPPonly_cff import *
0311 
0312 # Muon Id producer
0313 lhcSTAMuons = muons1stStep.clone(
0314     inputCollectionLabels = ['standAloneMuons'],
0315     inputCollectionTypes = ['outer tracks'],
0316     fillIsolation = True,
0317     fillGlobalTrackQuality = False,
0318     fillGlobalTrackRefits = False,
0319     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'),
0320     # set wide cone until the code is made to compute this wrt CalIntersection
0321     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0322 )
0323 
0324 # Final sequence
0325 muonRecoLHCTask = cms.Task(ancientMuonSeed,
0326                            standAloneMuons,
0327                            lhcSTAMuons)
0328 muonRecoLHC = cms.Sequence(muonRecoLHCTask)
0329 
0330 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
0331 muonRecoGRTask = cms.Task(muonrecoforcosmicsTask,
0332                           muonRecoGRTask,
0333                           muonrecoBeamHaloEndCapsOnlyTask,
0334                           muonrecoforcosmicsNoRPCTask,
0335                           muonrecoforsplitcosmicsTask,
0336                           muonRecoLHCTask)
0337 muonRecoGR = cms.Sequence(muonRecoGRTask)
0338 #######################################################################################################################