CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTLR.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoTracker.Configuration.customiseForRunI import customiseForRunI
4 
5 ##############################################################################
6 # common utilities
7 ##############################################################################
9  from RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi import onlineBeamSpotProducer
10  process.offlineBeamSpot = onlineBeamSpotProducer.clone()
11  return process
12 
13 def _addLumiProducer(process):
14  if not hasattr(process,'lumiProducer'):
15  #unscheduled..
16  from RecoLuminosity.LumiProducer.lumiProducer_cff import lumiProducer,LumiDBService
17  process.lumiProducer=lumiProducer
18  #if it's scheduled
19  if hasattr(process, 'reconstruction_step'):
20  process.reconstruction_step+=process.lumiProducer
21 
22  return process
23 
24 #gone with the fact that there is no difference between production and development sequence
25 #def customiseCommon(process):
26 # return (process)
27 
28 
29 ##############################################################################
30 def customisePPData(process):
31  #deprecated process= customiseCommon(process)
32  ##all customisation for data are now deprecated to Reconstruction_Data_cff
33  #left as a place holder to alter production sequences in case of emergencies
34  return process
35 
36 
37 ##############################################################################
38 def customisePPMC(process):
39  #deprecated process=customiseCommon(process)
40  #left as a place holder to alter production sequences in case of emergencies
41  return process
42 
43 ##############################################################################
44 def customiseCosmicData(process):
45 
46  return process
47 
48 
49 
50 ##############################################################################
51 # this is supposed to be added on top of other (Run1) data customs
53  from SLHCUpgradeSimulations.Configuration.muonCustoms import unganged_me1a_geometry,customise_csc_LocalReco
54  process = unganged_me1a_geometry(process)
55  process = customise_csc_LocalReco(process)
56 
57  if hasattr(process,'valCscTriggerPrimitiveDigis'):
58  #this is not doing anything at the moment
59  process.valCscTriggerPrimitiveDigis.commonParam.gangedME1a = cms.bool(False)
60  if hasattr(process,'valCsctfTrackDigis'):
61  process.valCsctfTrackDigis.gangedME1a = cms.untracked.bool(False)
62 
63  from SLHCUpgradeSimulations.Configuration.postLS1Customs import customise_Reco,customise_RawToDigi,customise_DQM
64  if hasattr(process,'RawToDigi'):
65  process=customise_RawToDigi(process)
66  if hasattr(process,'reconstruction'):
67  process=customise_Reco(process)
68  if hasattr(process,'dqmoffline_step'):
69  process=customise_DQM(process)
70 
71  return process
72 
73 # add stage1
75  process = customiseDataRun2Common(process)
76 
77  from L1Trigger.L1TCommon.customsPostLS1 import customiseL1RecoForStage1
78  process=customiseL1RecoForStage1(process)
79 
80  return process
81 
82 ##############################################################################
83 # common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
85  process = customiseDataRun2Common_withStage1(process)
86 
87  import RecoLocalCalo.HcalRecAlgos.RemoveAddSevLevel as HcalRemoveAddSevLevel
88  HcalRemoveAddSevLevel.AddFlag(process.hcalRecAlgos,"HFDigiTime",8)
89  HcalRemoveAddSevLevel.AddFlag(process.hcalRecAlgos,"HBHEFlatNoise",8)
90 
91  from SLHCUpgradeSimulations.Configuration.postLS1Customs import customise_DQM_25ns
92  if hasattr(process,'dqmoffline_step'):
93  process=customise_DQM_25ns(process)
94  return process
95 
96 # common+50ns. Needed only for runs >= 253000 if taken with 50ns
98  process = customiseDataRun2Common_withStage1(process)
99 
100  if hasattr(process,'particleFlowClusterECAL'):
101  process.particleFlowClusterECAL.energyCorrector.autoDetectBunchSpacing = False
102  process.particleFlowClusterECAL.energyCorrector.bunchSpacing = cms.int32(50)
103  if hasattr(process,'ecalMultiFitUncalibRecHit'):
104  process.ecalMultiFitUncalibRecHit.algoPSet.useLumiInfoRunHeader = False
105  process.ecalMultiFitUncalibRecHit.algoPSet.bunchSpacing = cms.int32(50)
106 
107  return process
108 
109 ##############################################################################
111  process = customiseCosmicData(process)
112  process = customiseDataRun2Common_25ns(process)
113  return process
114 
115 
116 ##############################################################################
117 def customiseCosmicMC(process):
118 
119  return process
120 
121 ##############################################################################
122 def customiseVALSKIM(process):
123  print "WARNING"
124  print "this method is outdated, please use RecoTLR.customisePPData"
125  process= customisePPData(process)
126  return process
127 
128 
129 ##############################################################################
130 def customiseExpress(process):
131  process= customisePPData(process)
132  process = _swapOfflineBSwithOnline(process)
133 
134  return process
135 
136 ##############################################################################
137 def customiseExpressRun2(process):
138  process = customiseExpress(process)
139  process = customiseDataRun2Common_25ns(process)
140  return process
141 
143  process = customiseExpress(process)
145  return process
146 
148  process=customiseForRunI(process)
149  process=customiseExpressRun2(process)
150  return process
151 
152 ##############################################################################
153 def customisePrompt(process):
154  process= customisePPData(process)
155  process = _addLumiProducer(process)
156 
157  return process
158 
159 ##############################################################################
160 def customisePromptRun2(process):
161  process = customisePrompt(process)
162  process = customiseDataRun2Common_25ns(process)
163  return process
164 
166  process = customisePrompt(process)
168  return process
169 
171  process=customiseForRunI(process)
172  process=customisePromptRun2(process)
173  return process
174 
175 
176 ##############################################################################
177 # Heavy Ions
178 ##############################################################################
179 # keep it in case modification is needed
180 def customiseCommonHI(process):
181  return process
182 
183 ##############################################################################
184 def customiseExpressHI(process):
185  process = customiseCommonHI(process)
186  process = _swapOfflineBSwithOnline(process)
187 
188  return process
189 
190 ##############################################################################
191 def customisePromptHI(process):
192  process = customiseCommonHI(process)
193  process = _swapOfflineBSwithOnline(process)
194 
195  process = _addLumiProducer(process)
196 
197  return process
198 
199 ##############################################################################
200 # keep it in case modification is needed
202  process = customiseDataRun2Common_withStage1(process)
203 
204  # HI Specific additional customizations:
205  # from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_Additional_HI
206  # process = customiseSimL1EmulatorForPostLS1_Additional_HI(process)
207 
208  return process
209 
210 ##############################################################################
212  process = customiseRun2CommonHI(process)
213  process = _swapOfflineBSwithOnline(process)
214 
215  return process
216 
217 ##############################################################################
219  process = customiseRun2CommonHI(process)
220  process = _swapOfflineBSwithOnline(process)
221 
222  process = _addLumiProducer(process)
223 
224  return process
225 
226 ##############################################################################
def customiseDataRun2Common
this is supposed to be added on top of other (Run1) data customs
Definition: RecoTLR.py:52
def customisePromptHI
Definition: RecoTLR.py:191
def customisePPMC
Definition: RecoTLR.py:38
def customiseCosmicMC
Definition: RecoTLR.py:117
def unganged_me1a_geometry
Definition: muonCustoms.py:4
def _addLumiProducer
Definition: RecoTLR.py:13
def customise_csc_LocalReco
Definition: muonCustoms.py:207
def customiseCommonHI
Heavy Ions.
Definition: RecoTLR.py:180
def customise_RawToDigi
Definition: gemCustoms.py:97
def _swapOfflineBSwithOnline
common utilities
Definition: RecoTLR.py:8
def customiseDataRun2Common_50nsRunsAfter253000
Definition: RecoTLR.py:97
def customisePromptRun2_50ns
Definition: RecoTLR.py:165
def customiseVALSKIM
Definition: RecoTLR.py:122
def customiseCosmicDataRun2
Definition: RecoTLR.py:110
def customiseExpressRun2
Definition: RecoTLR.py:137
def customiseExpressHI
Definition: RecoTLR.py:184
def customiseCosmicData
Definition: RecoTLR.py:44
def customisePromptRun2
Definition: RecoTLR.py:160
def customisePPData
Definition: RecoTLR.py:30
def customise_DQM
Definition: gemCustoms.py:110
def customise_Reco
Definition: gemCustoms.py:100
def customisePrompt
Definition: RecoTLR.py:153
def customiseRun2ExpressHI
Definition: RecoTLR.py:211
def customiseDataRun2Common_25ns
common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
Definition: RecoTLR.py:84
def customiseRun2CommonHI
keep it in case modification is needed
Definition: RecoTLR.py:201
def customisePromptRun2B0T
Definition: RecoTLR.py:170
def customiseExpressRun2_50ns
Definition: RecoTLR.py:142
def customiseRun2PromptHI
Definition: RecoTLR.py:218
def customiseExpress
Definition: RecoTLR.py:130
def customiseDataRun2Common_withStage1
Definition: RecoTLR.py:74
def customiseExpressRun2B0T
Definition: RecoTLR.py:147
def customiseL1RecoForStage1