CMS 3D CMS Logo

RecoTLR.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 ##############################################################################
4 # common utilities
5 ##############################################################################
7  from RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi import onlineBeamSpotProducer
8  process.offlineBeamSpot = onlineBeamSpotProducer.clone()
9  return process
10 
11 def _addLumiProducer(process):
12  if not hasattr(process,'lumiProducer'):
13  #unscheduled..
14  from RecoLuminosity.LumiProducer.lumiProducer_cff import lumiProducer,LumiDBService
15  process.lumiProducer=lumiProducer
16  #if it's scheduled
17  if hasattr(process, 'reconstruction_step'):
18  process.reconstruction_step+=process.lumiProducer
19 
20  return process
21 
22 def _overridesFor50ns(process):
23  process.bunchSpacingProducer.bunchSpacingOverride = cms.uint32(50)
24  process.bunchSpacingProducer.overrideBunchSpacing = cms.bool(True)
25 
26  return process
27 
28 ##############################################################################
29 # post-era customizations
30 # these are here instead of generating Data-specific eras
31 ##############################################################################
32 def _hcalCustoms25ns(process):
33  import RecoLocalCalo.HcalRecAlgos.RemoveAddSevLevel as HcalRemoveAddSevLevel
34  HcalRemoveAddSevLevel.AddFlag(process.hcalRecAlgos,"HFDigiTime",8)
35  HcalRemoveAddSevLevel.AddFlag(process.hcalRecAlgos,"HBHEFlatNoise",8)
36  return process
37 
39  _hcalCustoms25ns(process)
40  return process
41 
43  _hcalCustoms25ns(process)
44  return process
45 
47  _hcalCustoms25ns(process)
48  return process
49 
50 
51 ##############################################################################
52 def customisePPData(process):
53  #deprecated process= customiseCommon(process)
54  ##all customisation for data are now deprecated to Reconstruction_Data_cff
55  #left as a place holder to alter production sequences in case of emergencies
56  return process
57 
58 
59 ##############################################################################
60 def customisePPMC(process):
61  #deprecated process=customiseCommon(process)
62  #left as a place holder to alter production sequences in case of emergencies
63  return process
64 
65 ##############################################################################
66 def customiseCosmicData(process):
67  return process
68 
69 
70 ##############################################################################
71 def customiseCosmicMC(process):
72  return process
73 
74 ##############################################################################
75 def customiseVALSKIM(process):
76  print "WARNING"
77  print "this method is outdated, please use RecoTLR.customisePPData"
78  process= customisePPData(process)
79  return process
80 
81 
82 ##############################################################################
83 def customiseExpress(process):
84  process= customisePPData(process)
85  process = _swapOfflineBSwithOnline(process)
86  return process
87 
88 ##############################################################################
89 def customisePrompt(process):
90  process= customisePPData(process)
91  process = _addLumiProducer(process)
92 
93  return process
94 
95 ##############################################################################
96 # Heavy Ions
97 ##############################################################################
98 # keep it in case modification is needed
99 def customiseCommonHI(process):
100  return process
101 
102 ##############################################################################
103 def customiseExpressHI(process):
104  process = customiseCommonHI(process)
105  process = _swapOfflineBSwithOnline(process)
106 
107  return process
108 
109 ##############################################################################
110 def customisePromptHI(process):
111  process = customiseCommonHI(process)
112 
113  process = _addLumiProducer(process)
114 
115  return process
116 
117 ##############################################################################
118 ##############################################################################
119 
126  from SLHCUpgradeSimulations.Configuration.muonCustoms import unganged_me1a_geometry,customise_csc_LocalReco
127  process = unganged_me1a_geometry(process)
128  process = customise_csc_LocalReco(process)
129 
130  if hasattr(process,'valCscTriggerPrimitiveDigis'):
131  #this is not doing anything at the moment
132  process.valCscTriggerPrimitiveDigis.commonParam.gangedME1a = cms.bool(False)
133  if hasattr(process,'valCsctfTrackDigis'):
134  process.valCsctfTrackDigis.gangedME1a = cms.untracked.bool(False)
135 
136  from SLHCUpgradeSimulations.Configuration.postLS1Customs import customise_Reco,customise_RawToDigi,customise_DQM
137  if hasattr(process,'RawToDigi'):
138  process=customise_RawToDigi(process)
139  if hasattr(process,'reconstruction'):
140  process=customise_Reco(process)
141  if hasattr(process,'dqmoffline_step'):
142  process=customise_DQM(process)
143 
144  return process
145 
146 # add stage1
148  process = customiseDataRun2Common(process)
149 
150  from L1Trigger.L1TCommon.customsPostLS1 import customiseL1RecoForStage1
151  process=customiseL1RecoForStage1(process)
152 
153  return process
154 
155 ##############################################################################
156 # common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
158  process = customiseDataRun2Common_withStage1(process)
159 
160  _hcalCustoms25ns(process)
161 
162  from SLHCUpgradeSimulations.Configuration.postLS1Customs import customise_DQM_25ns
163  if hasattr(process,'dqmoffline_step'):
164  process=customise_DQM_25ns(process)
165  return process
166 
167 # common+50ns. Needed only for runs >= 253000 if taken with 50ns
169  process = customiseDataRun2Common_withStage1(process)
170 
171  process = _overridesFor50ns(process)
172 
173  return process
174 
175 ##############################################################################
176 # keep it in case modification is needed
178  process = customiseDataRun2Common_withStage1(process)
179 
180  process = _overridesFor50ns(process)
181  # HI Specific additional customizations:
182  # from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_Additional_HI
183  # process = customiseSimL1EmulatorForPostLS1_Additional_HI(process)
184 
185  return process
186 
def customise_DQM_25ns(process)
def _overridesFor50ns(process)
Definition: RecoTLR.py:22
def customise_DQM(process)
Definition: gemCustoms.py:36
def _hcalCustoms25ns(process)
post-era customizations these are here instead of generating Data-specific eras
Definition: RecoTLR.py:32
def customise_csc_LocalReco(process)
Definition: muonCustoms.py:207
def customiseCosmicData(process)
Definition: RecoTLR.py:66
def customise_Reco(process)
Definition: gemCustoms.py:33
def customiseVALSKIM(process)
Definition: RecoTLR.py:75
def customisePPMC(process)
Definition: RecoTLR.py:60
def customiseExpressHI(process)
Definition: RecoTLR.py:103
def _addLumiProducer(process)
Definition: RecoTLR.py:11
def customise_RawToDigi(process)
Definition: gemCustoms.py:30
def customiseRun2CommonHI(process)
keep it in case modification is needed
Definition: RecoTLR.py:177
def customiseDataRun2Common(process)
ALL FUNCTIONS BELOW ARE GOING TO BE REMOVED IN 81X.
Definition: RecoTLR.py:125
def customisePostEra_Run2_2017(process)
Definition: RecoTLR.py:46
def customisePromptHI(process)
Definition: RecoTLR.py:110
def customisePrompt(process)
Definition: RecoTLR.py:89
def customiseDataRun2Common_25ns(process)
common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
Definition: RecoTLR.py:157
def customiseExpress(process)
Definition: RecoTLR.py:83
def customisePostEra_Run2_25ns(process)
Definition: RecoTLR.py:38
def unganged_me1a_geometry(process)
Definition: muonCustoms.py:4
def customiseDataRun2Common_50nsRunsAfter253000(process)
Definition: RecoTLR.py:168
def customisePPData(process)
Definition: RecoTLR.py:52
def customiseDataRun2Common_withStage1(process)
Definition: RecoTLR.py:147
def customiseL1RecoForStage1(process)
def customiseCosmicMC(process)
Definition: RecoTLR.py:71
def _swapOfflineBSwithOnline(process)
common utilities
Definition: RecoTLR.py:6
def customisePostEra_Run2_2016(process)
Definition: RecoTLR.py:42
def customiseCommonHI(process)
Heavy Ions.
Definition: RecoTLR.py:99