Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-01-27 02:45:02

0001 import FWCore.ParameterSet.Config as cms
0002 #
0003 # luminosity
0004 #
0005 from RecoLuminosity.LumiProducer.bunchSpacingProducer_cfi import *
0006 # no bunchspacing in cosmics
0007 bunchSpacingProducer.overrideBunchSpacing= cms.bool(True)
0008 bunchSpacingProducer.bunchSpacingOverride= cms.uint32(50)
0009 
0010 #
0011 # tracker
0012 #
0013 from RecoLocalTracker.Configuration.RecoLocalTracker_Cosmics_cff import *
0014 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import *
0015 from RecoTracker.Configuration.RecoTrackerP5_cff import *
0016 from RecoVertex.BeamSpotProducer.BeamSpot_cff import *
0017 from RecoTracker.Configuration.RecoTrackerBHM_cff import *
0018 
0019 #
0020 # calorimeters
0021 #
0022 from RecoLocalCalo.Configuration.RecoLocalCalo_Cosmics_cff import *
0023 from RecoEcal.Configuration.RecoEcalCosmics_cff import *
0024 from RecoHGCal.Configuration.recoHGCAL_cff import *
0025 
0026 #
0027 # muons
0028 #
0029 from RecoLocalMuon.Configuration.RecoLocalMuonCosmics_cff import *
0030 from RecoMuon.Configuration.RecoMuonCosmics_cff import *
0031 
0032 # primary vertex
0033 from RecoVertex.Configuration.RecoVertexCosmicTracks_cff import *
0034 
0035 #
0036 # jets and met
0037 #
0038 from RecoJets.Configuration.RecoCaloTowersGR_cff import *
0039 from RecoJets.Configuration.RecoJetsGR_cff import *
0040 from RecoMET.Configuration.RecoMET_Cosmics_cff import *
0041 
0042 #
0043 ## egamma
0044 #
0045 from RecoEgamma.Configuration.RecoEgammaCosmics_cff import *
0046 
0047 # local reco
0048 trackerCosmicsTask = cms.Task(offlineBeamSpot,trackerlocalrecoTask,MeasurementTrackerEvent,tracksP5Task)
0049 
0050 # ugly hack: for the time being remove tracking (no Cosmics seeding in Phase-2) 
0051 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0052 phase2_tracker.toReplaceWith(trackerCosmicsTask,trackerCosmicsTask.copyAndExclude([tracksP5Task]))
0053 
0054 trackerCosmics = cms.Sequence(trackerCosmicsTask)
0055 caloCosmicsTask = cms.Task(calolocalrecoTaskCosmics,ecalClustersCosmicsTask)
0056 caloCosmics = cms.Sequence(caloCosmicsTask)
0057 caloCosmics_HcalNZSTask = cms.Task(calolocalrecoTaskCosmicsNZS,ecalClustersCosmicsTask)
0058 caloCosmics_HcalNZS = cms.Sequence(caloCosmics_HcalNZSTask)
0059 muonsLocalRecoCosmicsTask = cms.Task(muonlocalrecoTask,muonlocalrecoT0SegTask)
0060 muonsLocalRecoCosmics = cms.Sequence(muonsLocalRecoCosmicsTask)
0061 localReconstructionCosmicsTask = cms.Task(bunchSpacingProducer,trackerCosmicsTask,caloCosmicsTask,muonsLocalRecoCosmicsTask,vertexrecoCosmicsTask)
0062 #phase2_tracker.toReplaceWith(localReconstructionCosmicsTask,localReconstructionCosmicsTask.copyAndExclude([vertexrecoCosmicsTask]))  
0063 
0064 localReconstructionCosmics         = cms.Sequence(localReconstructionCosmicsTask)
0065 localReconstructionCosmics_HcalNZSTask = cms.Task(bunchSpacingProducer,trackerCosmicsTask,caloCosmics_HcalNZSTask,muonsLocalRecoCosmicsTask,vertexrecoCosmicsTask)
0066 localReconstructionCosmics_HcalNZS = cms.Sequence(localReconstructionCosmics_HcalNZSTask)
0067 
0068 # global reco
0069 muonsCosmicsTask = cms.Task(muonRecoGRTask)
0070 jetsCosmicsTask = cms.Task(recoCaloTowersGRTask,recoJetsGRTask)
0071 egammaCosmicsTask = cms.Task(egammarecoGlobal_cosmicsTask,egammarecoCosmics_woElectronsTask)
0072 
0073 from FWCore.Modules.logErrorHarvester_cfi import *
0074 
0075 reconstructionCosmicsTask = cms.Task(localReconstructionCosmicsTask,
0076                                      beamhaloTracksTask,
0077                                      jetsCosmicsTask,
0078                                      muonsCosmicsTask,
0079                                      regionalCosmicTracksTask,
0080                                      cosmicDCTracksSeqTask,
0081                                      metrecoCosmicsTask,
0082                                      egammaCosmicsTask,
0083                                      logErrorHarvester)
0084 
0085 # ugly hack
0086 # for the time being remove all tasks related to tracking
0087 phase2_tracker.toReplaceWith(reconstructionCosmicsTask,reconstructionCosmicsTask.copyAndExclude([beamhaloTracksTask,
0088                                                                                                  cosmicDCTracksSeqTask,
0089                                                                                                  regionalCosmicTracksTask,
0090                                                                                                  metrecoCosmicsTask,
0091                                                                                                  muonsCosmicsTask]))
0092 
0093 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
0094 _phase2HGALRecoTask = reconstructionCosmicsTask.copy()
0095 _phase2HGALRecoTask.add(iterTICLTask)
0096 phase2_hgcal.toReplaceWith(reconstructionCosmicsTask, _phase2HGALRecoTask)
0097 
0098 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
0099 _phase2HFNoseRecoTask = reconstructionCosmicsTask.copy()
0100 _phase2HFNoseRecoTask.add(iterHFNoseTICLTask)
0101 phase2_hfnose.toReplaceWith(reconstructionCosmicsTask, _phase2HFNoseRecoTask)
0102 
0103 reconstructionCosmics = cms.Sequence(reconstructionCosmicsTask)
0104 #logErrorHarvester should only wait for items produced in the reconstructionCosmics sequence
0105 _modulesInReconstruction = list()
0106 reconstructionCosmics.visit(cms.ModuleNamesFromGlobalsVisitor(globals(),_modulesInReconstruction))
0107 logErrorHarvester.includeModules = cms.untracked.vstring(sorted(set(_modulesInReconstruction)))
0108 
0109 reconstructionCosmics_HcalNZSTask = cms.Task(localReconstructionCosmics_HcalNZSTask,
0110                                              beamhaloTracksTask,
0111                                              jetsCosmicsTask,
0112                                              muonsCosmicsTask,
0113                                              regionalCosmicTracksTask,
0114                                              cosmicDCTracksSeqTask,
0115                                              metrecoCosmicsTask,
0116                                              egammaCosmicsTask,
0117                                              logErrorHarvester)
0118 
0119 phase2_tracker.toReplaceWith(reconstructionCosmics_HcalNZSTask,reconstructionCosmics_HcalNZSTask.copyAndExclude([beamhaloTracksTask,cosmicDCTracksSeqTask,regionalCosmicTracksTask]))
0120 reconstructionCosmics_HcalNZS = cms.Sequence(reconstructionCosmics_HcalNZSTask)
0121 
0122 reconstructionCosmics_woTkBHMTask = cms.Task(localReconstructionCosmicsTask,
0123                                              jetsCosmicsTask,
0124                                              muonsCosmicsTask,
0125                                              regionalCosmicTracksTask,
0126                                              cosmicDCTracksSeqTask,
0127                                              metrecoCosmicsTask,
0128                                              egammaCosmicsTask)
0129 
0130 phase2_tracker.toReplaceWith(reconstructionCosmics_woTkBHMTask,reconstructionCosmics_woTkBHMTask.copyAndExclude([beamhaloTracksTask,cosmicDCTracksSeqTask,regionalCosmicTracksTask]))  
0131 reconstructionCosmics_woTkBHM = cms.Sequence(reconstructionCosmics_woTkBHMTask)