CMS 3D CMS Logo

ReconstructionCosmics_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 #
3 # luminosity
4 #
6 # no bunchspacing in cosmics
7 bunchSpacingProducer.overrideBunchSpacing= cms.bool(True)
8 bunchSpacingProducer.bunchSpacingOverride= cms.uint32(50)
9 
10 #
11 # tracker
12 #
18 
19 #
20 # calorimeters
21 #
25 
26 #
27 # muons
28 #
31 
32 # primary vertex
34 
35 #
36 # jets and met
37 #
41 
42 #
43 
46 
47 # local reco
48 trackerCosmicsTask = cms.Task(offlineBeamSpot,trackerlocalrecoTask,MeasurementTrackerEvent,tracksP5Task)
49 
50 # ugly hack: for the time being remove tracking (no Cosmics seeding in Phase-2)
51 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
52 phase2_tracker.toReplaceWith(trackerCosmicsTask,trackerCosmicsTask.copyAndExclude([tracksP5Task]))
53 
54 trackerCosmics = cms.Sequence(trackerCosmicsTask)
55 caloCosmicsTask = cms.Task(calolocalrecoTaskCosmics,ecalClustersCosmicsTask)
56 caloCosmics = cms.Sequence(caloCosmicsTask)
57 caloCosmics_HcalNZSTask = cms.Task(calolocalrecoTaskCosmicsNZS,ecalClustersCosmicsTask)
58 caloCosmics_HcalNZS = cms.Sequence(caloCosmics_HcalNZSTask)
59 muonsLocalRecoCosmicsTask = cms.Task(muonlocalrecoTask,muonlocalrecoT0SegTask)
60 muonsLocalRecoCosmics = cms.Sequence(muonsLocalRecoCosmicsTask)
61 localReconstructionCosmicsTask = cms.Task(bunchSpacingProducer,trackerCosmicsTask,caloCosmicsTask,muonsLocalRecoCosmicsTask,vertexrecoCosmicsTask)
62 #phase2_tracker.toReplaceWith(localReconstructionCosmicsTask,localReconstructionCosmicsTask.copyAndExclude([vertexrecoCosmicsTask]))
63 
64 localReconstructionCosmics = cms.Sequence(localReconstructionCosmicsTask)
65 localReconstructionCosmics_HcalNZSTask = cms.Task(bunchSpacingProducer,trackerCosmicsTask,caloCosmics_HcalNZSTask,muonsLocalRecoCosmicsTask,vertexrecoCosmicsTask)
66 localReconstructionCosmics_HcalNZS = cms.Sequence(localReconstructionCosmics_HcalNZSTask)
67 
68 # global reco
69 muonsCosmicsTask = cms.Task(muonRecoGRTask)
70 jetsCosmicsTask = cms.Task(recoCaloTowersGRTask,recoJetsGRTask)
71 egammaCosmicsTask = cms.Task(egammarecoGlobal_cosmicsTask,egammarecoCosmics_woElectronsTask)
72 
74 
75 reconstructionCosmicsTask = cms.Task(localReconstructionCosmicsTask,
76  beamhaloTracksTask,
77  jetsCosmicsTask,
78  muonsCosmicsTask,
79  regionalCosmicTracksTask,
80  cosmicDCTracksSeqTask,
81  metrecoCosmicsTask,
82  egammaCosmicsTask,
83  logErrorHarvester)
84 
85 # ugly hack
86 # for the time being remove all tasks related to tracking
87 phase2_tracker.toReplaceWith(reconstructionCosmicsTask,reconstructionCosmicsTask.copyAndExclude([beamhaloTracksTask,
88  cosmicDCTracksSeqTask,
89  regionalCosmicTracksTask,
90  metrecoCosmicsTask,
91  muonsCosmicsTask]))
92 
93 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
94 _phase2HGALRecoTask = reconstructionCosmicsTask.copy()
95 _phase2HGALRecoTask.add(iterTICLTask)
96 phase2_hgcal.toReplaceWith(reconstructionCosmicsTask, _phase2HGALRecoTask)
97 
98 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
99 _phase2HFNoseRecoTask = reconstructionCosmicsTask.copy()
100 _phase2HFNoseRecoTask.add(iterHFNoseTICLTask)
101 phase2_hfnose.toReplaceWith(reconstructionCosmicsTask, _phase2HFNoseRecoTask)
102 
103 reconstructionCosmics = cms.Sequence(reconstructionCosmicsTask)
104 #logErrorHarvester should only wait for items produced in the reconstructionCosmics sequence
105 _modulesInReconstruction = list()
106 reconstructionCosmics.visit(cms.ModuleNamesFromGlobalsVisitor(globals(),_modulesInReconstruction))
107 logErrorHarvester.includeModules = cms.untracked.vstring(sorted(set(_modulesInReconstruction)))
108 
109 reconstructionCosmics_HcalNZSTask = cms.Task(localReconstructionCosmics_HcalNZSTask,
110  beamhaloTracksTask,
111  jetsCosmicsTask,
112  muonsCosmicsTask,
113  regionalCosmicTracksTask,
114  cosmicDCTracksSeqTask,
115  metrecoCosmicsTask,
116  egammaCosmicsTask,
117  logErrorHarvester)
118 
119 phase2_tracker.toReplaceWith(reconstructionCosmics_HcalNZSTask,reconstructionCosmics_HcalNZSTask.copyAndExclude([beamhaloTracksTask,cosmicDCTracksSeqTask,regionalCosmicTracksTask]))
120 reconstructionCosmics_HcalNZS = cms.Sequence(reconstructionCosmics_HcalNZSTask)
121 
122 reconstructionCosmics_woTkBHMTask = cms.Task(localReconstructionCosmicsTask,
123  jetsCosmicsTask,
124  muonsCosmicsTask,
125  regionalCosmicTracksTask,
126  cosmicDCTracksSeqTask,
127  metrecoCosmicsTask,
128  egammaCosmicsTask)
129 
130 phase2_tracker.toReplaceWith(reconstructionCosmics_woTkBHMTask,reconstructionCosmics_woTkBHMTask.copyAndExclude([beamhaloTracksTask,cosmicDCTracksSeqTask,regionalCosmicTracksTask]))
131 reconstructionCosmics_woTkBHM = cms.Sequence(reconstructionCosmics_woTkBHMTask)