Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:20:19

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 
0075 # TeV refinement
0076 from RecoMuon.GlobalMuonProducer.tevMuons_cfi import *
0077 tevMuons.MuonCollectionLabel = 'globalCosmicMuons'
0078 tevMuons.RefitterParameters.PropDirForCosmics = True
0079 
0080 # Glb Track Quality
0081 from RecoMuon.GlobalTrackingTools.GlobalTrackQuality_cfi import *
0082 glbTrackQual.InputCollection = 'globalCosmicMuons'
0083 
0084 # all muons id
0085 allmuonsTask = cms.Task(glbTrackQual,
0086                         tevMuons,
0087                         muons,
0088                         muIsolationTask)
0089 allmuons = cms.Sequence(allmuonsTask)
0090 
0091 # Final sequence
0092 muonrecoforcosmicsTask = cms.Task(muontrackingforcosmicsTask,
0093                   allmuonsTask,
0094                                   muonsFromCosmics)
0095 muonrecoforcosmics = cms.Sequence(muonrecoforcosmicsTask)
0096 
0097 # 1 leg mode
0098 # Stand alone muon track producer
0099 cosmicMuons1Leg = cosmicMuons.clone(
0100     MuonSeedCollectionLabel = 'CosmicMuonSeed',
0101     TrajectoryBuilderParameters = dict(BuildTraversingMuon = True)
0102 )
0103 
0104 # Global muon track producer
0105 globalCosmicMuons1Leg = globalCosmicMuons.clone(
0106     MuonCollectionLabel = 'cosmicMuons1Leg',
0107     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
0108 )
0109 
0110 # Muon Id producer
0111 muons1Leg = muons1stStep.clone(
0112     inputCollectionLabels = ['ctfWithMaterialTracksP5', 
0113                              'globalCosmicMuons1Leg', 
0114                              'cosmicMuons1Leg'],
0115     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0116     fillIsolation = False,
0117     fillGlobalTrackQuality = False,
0118     fillGlobalTrackRefits = False,
0119     TimingFillerParameters = dict(
0120         DTTimingParameters = dict(PruneCut = 9999),
0121         CSCTimingParameters = dict(PruneCut = 9999))
0122 )
0123 
0124 # Sequences
0125 # Stand Alone Tracking
0126 STAmuontrackingforcosmics1LegTask = cms.Task(CosmicMuonSeed,cosmicMuons1Leg)
0127 
0128 # Stand Alone Tracking plus global tracking
0129 muontrackingforcosmics1LegTask = cms.Task(STAmuontrackingforcosmics1LegTask, globalCosmicMuons1Leg)
0130 
0131 # Final sequence
0132 muonrecoforcosmics1LegTask = cms.Task(muontrackingforcosmics1LegTask,muons1Leg)
0133 
0134 #####################################################
0135 
0136 # t0 Corrections
0137 
0138 # Seed generator
0139 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone(
0140     DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
0141 )
0142 
0143 # Stand alone muon track producer
0144 cosmicMuonsWitht0Correction = cosmicMuons.clone(
0145     MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction',
0146     TrajectoryBuilderParameters = dict(BuildTraversingMuon = False, DTRecSegmentLabel = 'dt4DSegmentsT0Seg')
0147 )
0148 
0149 # Global muon track producer
0150 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone(
0151     MuonCollectionLabel = 'cosmicMuonsWitht0Correction',
0152     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
0153 )
0154 
0155 # Muon Id producer
0156 muonsWitht0Correction = muons1stStep.clone(
0157     inputCollectionLabels = ['ctfWithMaterialTracksP5', 
0158                              'globalCosmicMuonsWitht0Correction', 
0159                              'cosmicMuonsWitht0Correction'],
0160     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0161     fillIsolation = True,
0162     fillGlobalTrackQuality = False,
0163     fillGlobalTrackRefits = False,
0164     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
0165     # set wide cone until the code is made to compute this wrt CalIntersection
0166     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0),
0167     TimingFillerParameters = dict(
0168     DTTimingParameters = dict(UseSegmentT0 = True),
0169     MatchParameters = dict(DTsegments = 'dt4DSegmentsT0Seg'))
0170 )
0171 
0172 #Sequences
0173 # Stand Alone Tracking
0174 STAmuontrackingforcosmicsWitht0CorrectionTask = cms.Task(CosmicMuonSeedWitht0Correction,cosmicMuonsWitht0Correction)
0175 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
0176 
0177 # Stand Alone Tracking plus global tracking
0178 muontrackingforcosmicsWitht0CorrectionTask = cms.Task(STAmuontrackingforcosmicsWitht0CorrectionTask,globalCosmicMuonsWitht0Correction)
0179 muontrackingforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0CorrectionTask)
0180 
0181 # Stand Alone Tracking plus muon ID
0182 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
0183 
0184 # Final sequence
0185 muonrecoforcosmicsWitht0CorrectionTask = cms.Task(muontrackingforcosmicsWitht0CorrectionTask,muonsWitht0Correction)
0186 muonrecoforcosmicsWitht0Correction = cms.Sequence(muonrecoforcosmicsWitht0CorrectionTask)
0187 
0188 ### Final sequence ###
0189 muonRecoGRTask = cms.Task(muonrecoforcosmics1LegTask,muonrecoforcosmicsWitht0CorrectionTask)
0190 muonRecoGR = cms.Sequence(muonRecoGRTask)
0191 
0192 #####################################################
0193 
0194 # Beam halo in Encaps only. GLB reco only is needed
0195 
0196 # Seed generator 
0197 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone(
0198     EnableDTMeasurement = False
0199 )
0200 
0201 # Stand alone muon track producer
0202 cosmicMuonsEndCapsOnly = cosmicMuons.clone(
0203     MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly',
0204     TrajectoryBuilderParameters = dict(
0205     EnableDTMeasurement = False,
0206     MuonNavigationParameters = dict(Barrel = False))
0207 )
0208 
0209 # Global muon track producer
0210 globalBeamHaloMuonEndCapslOnly = globalCosmicMuons.clone(
0211     MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
0212 )
0213 
0214 # Muon Id producer
0215 muonsBeamHaloEndCapsOnly = muons1stStep.clone(
0216     inputCollectionLabels = ['beamhaloTracks', 
0217                              'globalBeamHaloMuonEndCapslOnly', 
0218                              'cosmicMuonsEndCapsOnly'],
0219     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0220     fillIsolation = True,
0221     fillGlobalTrackQuality = False,
0222     fillGlobalTrackRefits = False,
0223     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
0224     # set wide cone until the code is made to compute this wrt CalIntersection
0225     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0226 )
0227 
0228 # Sequences
0229 muonrecoBeamHaloEndCapsOnlyTask = cms.Task(CosmicMuonSeedEndCapsOnly,
0230                                            cosmicMuonsEndCapsOnly,
0231                                            globalBeamHaloMuonEndCapslOnly,
0232                                            muonsBeamHaloEndCapsOnly)
0233 muonrecoBeamHaloEndCapsOnly = cms.Sequence(muonrecoBeamHaloEndCapsOnlyTask)
0234 
0235 ########
0236 
0237 ## Full detector but NO RPC ##
0238 
0239 # Stand alone muon track producer
0240 cosmicMuonsNoRPC = cosmicMuons.clone(
0241     TrajectoryBuilderParameters = dict(EnableRPCMeasurement = False)
0242 )
0243 
0244 # Global muon track producer
0245 globalCosmicMuonsNoRPC = globalCosmicMuons.clone(
0246     MuonCollectionLabel = 'cosmicMuonsNoRPC',
0247     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
0248 )
0249 
0250 # Muon Id producer
0251 muonsNoRPC = muons1stStep.clone(
0252     inputCollectionLabels = ['ctfWithMaterialTracksP5',
0253                              'globalCosmicMuonsNoRPC', 
0254                              'cosmicMuonsNoRPC'],
0255     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0256     fillIsolation = True,
0257     fillGlobalTrackQuality = False,
0258     fillGlobalTrackRefits = False,
0259     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
0260     # set wide cone until the code is made to compute this wrt CalIntersection
0261     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0262 )
0263 
0264 #Sequences
0265 
0266 # Stand Alone Tracking plus global tracking
0267 muontrackingforcosmicsNoRPCTask = cms.Task(cosmicMuonsNoRPC,globalCosmicMuonsNoRPC)
0268 muontrackingforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPCTask)
0269 
0270 # Final sequence
0271 muonrecoforcosmicsNoRPCTask = cms.Task(muontrackingforcosmicsNoRPCTask,muonsNoRPC)
0272 muonrecoforcosmicsNoRPC = cms.Sequence(muonrecoforcosmicsNoRPCTask)
0273 
0274 ##############################################
0275 
0276 ## Split Tracks  ##
0277 
0278 # Global muon track producer
0279 globalCosmicSplitMuons = globalCosmicMuons.clone(
0280     MuonCollectionLabel = 'cosmicMuons',
0281     TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'splittedTracksP5')
0282 )
0283 
0284 # Muon Id producer
0285 splitMuons = muons1stStep.clone(
0286     inputCollectionLabels = ['splittedTracksP5', 
0287                              'globalCosmicSplitMuons', 
0288                              'cosmicMuons'],
0289     inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
0290     fillIsolation = True,
0291     fillGlobalTrackQuality = False,
0292     fillGlobalTrackRefits = False,
0293     TrackExtractorPSet = dict(inputTrackCollection = 'splittedTracksP5'),
0294     # set wide cone until the code is made to compute this wrt CalIntersection
0295     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0296 )
0297 
0298 #Sequences
0299 
0300 # Final sequence
0301 muonrecoforsplitcosmicsTask = cms.Task(globalCosmicSplitMuons,splitMuons)
0302 muonrecoforsplitcosmics = cms.Sequence(muonrecoforsplitcosmicsTask)
0303 
0304 ##############################################
0305 
0306 ######################## LHC like Reco #############################
0307 
0308 # Standard reco
0309 from RecoMuon.Configuration.RecoMuonPPonly_cff import *
0310 
0311 # Muon Id producer
0312 lhcSTAMuons = muons1stStep.clone(
0313     inputCollectionLabels = ['standAloneMuons'],
0314     inputCollectionTypes = ['outer tracks'],
0315     fillIsolation = True,
0316     fillGlobalTrackQuality = False,
0317     fillGlobalTrackRefits = False,
0318     TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'),
0319     # set wide cone until the code is made to compute this wrt CalIntersection
0320     CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
0321 )
0322 
0323 # Final sequence
0324 muonRecoLHCTask = cms.Task(ancientMuonSeed,
0325                            standAloneMuons,
0326                            lhcSTAMuons)
0327 muonRecoLHC = cms.Sequence(muonRecoLHCTask)
0328 
0329 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
0330 muonRecoGRTask = cms.Task(muonrecoforcosmicsTask,
0331                           muonRecoGRTask,
0332                           muonrecoBeamHaloEndCapsOnlyTask,
0333                           muonrecoforcosmicsNoRPCTask,
0334                           muonrecoforsplitcosmicsTask,
0335                           muonRecoLHCTask)
0336 muonRecoGR = cms.Sequence(muonRecoGRTask)
0337 #######################################################################################################################