CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HCalCustoms.py
Go to the documentation of this file.
2 
3 def customise_HcalPhase0(process):
4  process.load("CalibCalorimetry/HcalPlugins/Hcal_Conditions_forGlobalTag_cff")
5 
6  if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'):
7  process.mix.digitizers.hcal.HcalReLabel.RelabelHits=cms.untracked.bool(True)
8  process.mix.digitizers.hcal.HcalReLabel.RelabelRules.Eta1 = cms.untracked.vint32(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
9  process.mix.digitizers.hcal.HcalReLabel.RelabelRules.Eta16 = cms.untracked.vint32(1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3)
10  process.mix.digitizers.hcal.HcalReLabel.RelabelRules.Eta17 = cms.untracked.vint32(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
11  process.mix.digitizers.hcal.HcalReLabel.RelabelRules.Eta18 = cms.untracked.vint32(1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
12  process.mix.digitizers.hcal.HcalReLabel.RelabelRules.Eta19 = cms.untracked.vint32(1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2)
13  process.mix.digitizers.hcal.HcalReLabel.RelabelRules.Eta27 = cms.untracked.vint32(1,1,1,1,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3)
14 
15  process.es_hardcode.HcalReLabel.RelabelHits = cms.untracked.bool(True)
16  process.es_hardcode.HcalReLabel.RelabelRules.Eta1 = cms.untracked.vint32(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
17  process.es_hardcode.HcalReLabel.RelabelRules.Eta16 = cms.untracked.vint32(1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3)
18  process.es_hardcode.HcalReLabel.RelabelRules.Eta17 = cms.untracked.vint32(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
19  process.es_hardcode.HcalReLabel.RelabelRules.Eta18 = cms.untracked.vint32(1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
20  process.es_hardcode.HcalReLabel.RelabelRules.Eta19 = cms.untracked.vint32(1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2)
21  process.es_hardcode.HcalReLabel.RelabelRules.Eta27 = cms.untracked.vint32(1,1,1,1,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3)
22  process.es_hardcode.HEreCalibCutoff = cms.double(20.) #for aging
23 
24  process.es_hardcode.toGet = cms.untracked.vstring(
25  'GainWidths',
26  'RespCorrs'
27  )
28 
29 
30  if hasattr(process,'g4SimHits'):
31  process=customise_Sim(process)
32  if hasattr(process,'validation_step'):
33  process=customise_Validation(process)
34 
35  return process
36 
37 def customise_HcalPhase1(process):
38  #common stuff
39  process.load("CalibCalorimetry/HcalPlugins/Hcal_Conditions_forGlobalTag_cff")
40  process.es_hardcode.toGet = cms.untracked.vstring(
41  'GainWidths',
42  'MCParams',
43  'RecoParams',
44  'RespCorrs',
45  'QIEData',
46  'Gains',
47  'Pedestals',
48  'PedestalWidths',
49  'ChannelQuality',
50  'ZSThresholds',
51  'TimeCorrs',
52  'LUTCorrs',
53  'LutMetadata',
54  'L1TriggerObjects',
55  'PFCorrs',
56  'ElectronicsMap',
57  'CholeskyMatrices',
58  'CovarianceMatrices'
59  )
60 
61  process.es_hardcode.hcalTopologyConstants.mode=cms.string('HcalTopologyMode::SLHC')
62  process.es_hardcode.hcalTopologyConstants.maxDepthHB=cms.int32(3)
63  process.es_hardcode.hcalTopologyConstants.maxDepthHB=cms.int32(3)
64  process.es_hardcode.hcalTopologyConstants.maxDepthHE=cms.int32(5)
65  process.es_hardcode.HcalReLabel.RelabelHits=cms.untracked.bool(True)
66  # Special Upgrade trick (if absent - regular case assumed)
67  process.es_hardcode.GainWidthsForTrigPrims = cms.bool(True)
68  process.es_hardcode.HEreCalibCutoff = cms.double(100.) #for aging
69 
70  process.hcalTopologyIdeal.hcalTopologyConstants.mode=cms.string('HcalTopologyMode::SLHC')
71  process.hcalTopologyIdeal.hcalTopologyConstants.maxDepthHB=cms.int32(3)
72  process.hcalTopologyIdeal.hcalTopologyConstants.maxDepthHE=cms.int32(5)
73 
74 
75  if hasattr(process,'g4SimHits'):
76  process=customise_Sim(process)
77  if hasattr(process,'DigiToRaw'):
78  process=customise_DigiToRaw(process)
79  if hasattr(process,'RawToDigi'):
80  process=customise_RawToDigi(process)
81  if hasattr(process,'digitisation_step'):
82  process=customise_Digi(process)
83  if hasattr(process,'reconstruction_step'):
84  process=customise_Reco(process)
85  if hasattr(process,'dqmoffline_step'):
86  process=customise_DQM(process)
87  if hasattr(process,'dqmHarvesting'):
88  process=customise_harvesting(process)
89  if hasattr(process,'validation_step'):
90  process=customise_Validation(process)
91  process=customise_condOverRides(process)
92  return process
93 
94 
95 def customise_Sim(process):
96  process.g4SimHits.HCalSD.TestNumberingScheme = True
97 
98  return process
99 
100 def customise_DigiToRaw(process):
101  process.digi2raw_step.remove(process.hcalRawData)
102 
103  return process
104 
105 def customise_RawToDigi(process):
106  process.raw2digi_step.remove(process.hcalDigis)
107 
108  return process
109 
110 def customise_Digi(process):
111  if hasattr(process,'mix'):
112  process.mix.digitizers.hcal.HBHEUpgradeQIE = True
113  process.mix.digitizers.hcal.hb.siPMCells = cms.vint32([1])
114  process.mix.digitizers.hcal.hb.photoelectronsToAnalog = cms.vdouble([10.]*16)
115  process.mix.digitizers.hcal.hb.pixels = cms.int32(4500*4*2)
116  process.mix.digitizers.hcal.he.photoelectronsToAnalog = cms.vdouble([10.]*16)
117  process.mix.digitizers.hcal.he.pixels = cms.int32(4500*4*2)
118  process.mix.digitizers.hcal.HFUpgradeQIE = True
119  process.mix.digitizers.hcal.HcalReLabel.RelabelHits=cms.untracked.bool(True)
120 
121  if hasattr(process,'HcalTPGCoderULUT'):
122  process.HcalTPGCoderULUT.hcalTopologyConstants.mode=cms.string('HcalTopologyMode::SLHC')
123  process.HcalTPGCoderULUT.hcalTopologyConstants.maxDepthHB=cms.int32(3)
124  process.HcalTPGCoderULUT.hcalTopologyConstants.maxDepthHE=cms.int32(5)
125 
126  if hasattr(process,'simHcalDigis'):
127  process.simHcalDigis.useConfigZSvalues=cms.int32(1)
128  process.simHcalDigis.HBlevel=cms.int32(16)
129  process.simHcalDigis.HElevel=cms.int32(16)
130  process.simHcalDigis.HOlevel=cms.int32(16)
131  process.simHcalDigis.HFlevel=cms.int32(16)
132 
133  process.digitisation_step.remove(process.simHcalTriggerPrimitiveDigis)
134  process.digitisation_step.remove(process.simHcalTTPDigis)
135 
136  return process
137 
138 def customise_Reco(process):
139  #--- CaloTowers maker input customization
140  process.towerMaker.hfInput = cms.InputTag("hfUpgradeReco")
141  process.towerMaker.hbheInput = cms.InputTag("hbheUpgradeReco")
142  process.towerMakerPF.hfInput = cms.InputTag("hfUpgradeReco")
143  process.towerMakerPF.hbheInput = cms.InputTag("hbheUpgradeReco")
144  process.towerMakerWithHO.hfInput = cms.InputTag("hfUpgradeReco")
145  process.towerMakerWithHO.hbheInput = cms.InputTag("hbheUpgradeReco")
146  process.particleFlowRecHitHCAL.hcalRecHitsHBHE = cms.InputTag("hbheUpgradeReco")
147  process.particleFlowRecHitHCAL.hcalRecHitsHF = cms.InputTag("hfUpgradeReco")
148  process.ak4JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
149  process.ak4JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
150  process.ak7JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
151  process.ak7JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
152  process.ca4JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
153  process.ca4JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
154  process.ca6JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
155  process.ca6JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
156  process.gk5JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
157  process.gk5JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
158  process.gk7JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
159  process.gk7JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
160  process.ic5JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
161  process.ic5JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
162  process.ic7JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
163  process.ic7JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
164  process.kt4JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
165  process.kt4JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
166  process.kt6JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
167  process.kt6JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
168  process.sc5JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
169  process.sc5JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
170  process.sc7JetID.hfRecHitsColl = cms.InputTag("hfUpgradeReco")
171  process.sc7JetID.hbheRecHitsColl = cms.InputTag("hbheUpgradeReco")
172  process.hfEMClusters.hits = cms.InputTag("hfUpgradeReco")
173  process.caloRecoTauProducer.TrackAssociatorParameters.HBHERecHitCollectionLabel = cms.InputTag("hbheUpgradeReco")
174  process.caloRecoTauProducer.HFRecHitCollection=cms.InputTag("hfUpgradeReco")
175 
176  process.muons1stStep.TrackAssociatorParameters.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
177  process.muons1stStep.CaloExtractorPSet.TrackAssociatorParameters.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
178  process.muons1stStep.JetExtractorPSet.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
179 
180  process.muonsFromCosmics.TrackAssociatorParameters.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
181  process.muonsFromCosmics.CaloExtractorPSet.TrackAssociatorParameters.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
182  process.muonsFromCosmics.JetExtractorPSet.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
183  process.muonsFromCosmics1Leg.TrackAssociatorParameters.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
184  process.muonsFromCosmics1Leg.CaloExtractorPSet.TrackAssociatorParameters.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
185  process.muonsFromCosmics1Leg.JetExtractorPSet.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
186 
187  process.interestingTrackEcalDetIds.TrackAssociatorParameters.HBHERecHitCollectionLabel=cms.InputTag("hbheUpgradeReco")
188 
189  process.hcalnoise.recHitCollName=cms.string('hbheUpgradeReco')
190  process.reducedHcalRecHits.hfTag=cms.InputTag("hfUpgradeReco")
191  process.reducedHcalRecHits.hbheTag=cms.InputTag("hbheUpgradeReco")
192 
193  process.caloRecoTauProducer.HBHERecHitCollection=cms.InputTag("hbheUpgradeReco")
194  process.caloRecoTauProducer.HFRecHitCollection=cms.InputTag("hfUpgradeReco")
195 
196  process.load("RecoLocalCalo.HcalRecProducers.HBHEUpgradeReconstructor_cfi")
197  process.load("RecoLocalCalo.HcalRecProducers.HFUpgradeReconstructor_cfi")
198 ### process.load("RecoLocalCalo.HcalRecProducers.HcalSimpleReconstructor_ho_cfi")
199 
200  process.reconstruction_step.replace(process.hfreco,process.hfUpgradeReco)
201  process.reconstruction_step.remove(process.hbhereco)
202  process.reconstruction_step.replace(process.hbheprereco,process.hbheUpgradeReco)
203 
204  process.horeco.digiLabel = "simHcalDigis"
205  process.hbhereco.digiLabel = cms.InputTag("simHcalDigis","HBHEUpgradeDigiCollection")
206  process.hfreco.digiLabel = cms.InputTag("simHcalDigis","HBHEUpgradeDigiCollection")
207 
208  process.zdcreco.digiLabel = "simHcalUnsuppressedDigis"
209  process.hcalnoise.digiCollName=cms.string('simHcalDigis')
210 
211  # not sure why these are missing - but need to investigate later
212  process.reconstruction_step.remove(process.castorreco)
213  process.reconstruction_step.remove(process.CastorTowerReco)
214  process.reconstruction_step.remove(process.ak7BasicJets)
215  process.reconstruction_step.remove(process.ak7CastorJetID)
216  return process
217 
218 def customise_DQM(process):
219  process.dqmoffline_step.remove(process.hcalDigiMonitor)
220  process.dqmoffline_step.remove(process.hcalDeadCellMonitor)
221  process.dqmoffline_step.remove(process.hcalBeamMonitor)
222  process.dqmoffline_step.remove(process.hcalRecHitMonitor)
223  process.dqmoffline_step.remove(process.hcalDetDiagNoiseMonitor)
224  process.dqmoffline_step.remove(process.hcalNoiseMonitor)
225  process.dqmoffline_step.remove(process.RecHitsDQMOffline)
226  process.dqmoffline_step.remove(process.zdcMonitor)
227  process.dqmoffline_step.remove(process.hcalMonitor)
228  process.dqmoffline_step.remove(process.hcalHotCellMonitor)
229  process.dqmoffline_step.remove(process.hcalRawDataMonitor)
230  process.ExoticaDQM.JetIDParams.hbheRecHitsColl=cms.InputTag("hbheUpgradeReco")
231  process.ExoticaDQM.JetIDParams.hfRecHitsColl=cms.InputTag("hfUpgradeReco")
232  return process
233 
234 def customise_harvesting(process):
235  return process
236 
237 def customise_Validation(process):
238  process.validation_step.remove(process.AllHcalDigisValidation)
239  process.validation_step.remove(process.RecHitsValidation)
240  process.validation_step.remove(process.globalhitsanalyze)
241  return process
242 
244  return process
def customise_Validation
Definition: HCalCustoms.py:237
def customise_HcalPhase0
Definition: HCalCustoms.py:3
def customise_harvesting
Definition: HCalCustoms.py:234
def customise_DQM
process.load("RecoLocalCalo.HcalRecProducers.HcalSimpleReconstructor_ho_cfi")
Definition: HCalCustoms.py:218
def customise_HcalPhase1
Definition: HCalCustoms.py:37
def customise_Sim
Definition: HCalCustoms.py:95
def customise_DigiToRaw
Definition: HCalCustoms.py:100
def customise_RawToDigi
Definition: HCalCustoms.py:105
def customise_Digi
Definition: HCalCustoms.py:110
def customise_Reco
Definition: HCalCustoms.py:138
def customise_condOverRides
Definition: HCalCustoms.py:243