Skip to content

Commit

Permalink
introduce hcalHardcodeConditions Era, rearrange customizations
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Jul 12, 2017
1 parent 92ee798 commit a4c0b99
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,42 +158,49 @@

es_prefer_hcalHardcode = cms.ESPrefer("HcalHardcodeCalibrations", "es_hardcode")

from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
phase2_hcal.toModify( es_hardcode,
toGet = cms.untracked.vstring(
'GainWidths',
'MCParams',
'RecoParams',
'RespCorrs',
'QIEData',
'QIETypes',
'Gains',
'Pedestals',
'PedestalWidths',
'ChannelQuality',
'ZSThresholds',
'TimeCorrs',
'LUTCorrs',
'LutMetadata',
'L1TriggerObjects',
'PFCorrs',
'ElectronicsMap',
'FrontEndMap',
'CovarianceMatrices',
'SiPMParameters',
'SiPMCharacteristics',
'TPChannelParameters',
'TPParameters',
'FlagHFDigiTimeParams'
),
GainWidthsForTrigPrims = cms.bool(True),
HEreCalibCutoff = cms.double(100.),
useHBUpgrade = cms.bool(True),
useHEUpgrade = cms.bool(True),
useHFUpgrade = cms.bool(True),
useLayer0Weight = cms.bool(True),
from Configuration.Eras.Modifier_hcalHardcodeConditions_cff import hcalHardcodeConditions
hcalHardcodeConditions.toModify( es_hardcode,
toGet = cms.untracked.vstring(
'GainWidths',
'MCParams',
'RecoParams',
'RespCorrs',
'QIEData',
'QIETypes',
'Gains',
'Pedestals',
'PedestalWidths',
'ChannelQuality',
'ZSThresholds',
'TimeCorrs',
'LUTCorrs',
'LutMetadata',
'L1TriggerObjects',
'PFCorrs',
'ElectronicsMap',
'FrontEndMap',
'CovarianceMatrices',
'SiPMParameters',
'SiPMCharacteristics',
'TPChannelParameters',
'TPParameters',
'FlagHFDigiTimeParams'
),
GainWidthsForTrigPrims = cms.bool(True)
)

from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
from Configuration.Eras.Modifier_run2_HF_2017_cff import run2_HF_2017
from Configuration.Eras.Modifier_run2_HE_2017_cff import run2_HE_2017
from Configuration.Eras.Modifier_run2_HEPlan1_2017_cff import run2_HEPlan1_2017
from Configuration.Eras.Modifier_run3_HB_cff import run3_HB

run2_HCAL_2017.toModify( es_hardcode, useLayer0Weight = cms.bool(True) )
run2_HF_2017.toModify( es_hardcode, useHFUpgrade = cms.bool(True) )
run2_HE_2017.toModify( es_hardcode, useHEUpgrade = cms.bool(True), HEreCalibCutoff = cms.double(100.0) )
run2_HEPlan1_2017.toModify( es_hardcode, testHEPlan1 = cms.bool(True), useHEUpgrade = cms.bool(False), HEreCalibCutoff = cms.double(20.0) )
run3_HB.toModify( es_hardcode, useHBUpgrade = cms.bool(True), HBreCalibCutoff = cms.double(100.0) )

from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
phase2_hgcal.toModify( es_hardcode, killHE = cms.bool(True) )

4 changes: 3 additions & 1 deletion Configuration/Eras/python/Era_Phase2_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
from Configuration.Eras.Modifier_hcalHardcodeConditions_cff import hcalHardcodeConditions

Phase2 = cms.ModifierChain(run2_common, phase2_common, phase2_tracker, trackingPhase2PU140, phase2_ecal,
run2_HE_2017, run2_HF_2017, run2_HCAL_2017, run3_HB, phase2_hcal, phase2_hgcal, phase2_muon, run3_GEM, stage2L1Trigger
run2_HE_2017, run2_HF_2017, run2_HCAL_2017, run3_HB, phase2_hcal, phase2_hgcal, phase2_muon, run3_GEM, stage2L1Trigger,
hcalHardcodeConditions
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms

# This modifier activates HCAL hardcode conditions

hcalHardcodeConditions = cms.Modifier()
5 changes: 5 additions & 0 deletions Configuration/EventContent/python/EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@
if fastSim.isChosen():
PREMIXEventContent.outputCommands.extend(fastSimEC.extraPremixContent)

from Configuration.Eras.Modifier_hcalSkipPacker_cff import hcalSkipPacker
hcalSkipPacker.toModify(PREMIXEventContent.outputCommands,
func=lambda outputCommands: outputCommands.append('keep *_simHcalDigis_*_*')
)

PREMIXRAWEventContent.outputCommands.extend(RAWSIMEventContent.outputCommands)
PREMIXRAWEventContent.outputCommands.append('keep CrossingFramePlaybackInfoNew_*_*_*')
PREMIXRAWEventContent.outputCommands.append('drop CrossingFramePlaybackInfoNew_mix_*_*')
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Geometry/python/dict2023Geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
'from Geometry.EcalMapping.EcalMapping_cfi import *',
'from Geometry.EcalMapping.EcalMappingRecord_cfi import *',
],
"era" : "run2_HE_2017, run2_HF_2017, run2_HCAL_2017, run3_HB, phase2_hcal, phase2_hgcal",
"era" : "run2_HE_2017, run2_HF_2017, run2_HCAL_2017, run3_HB, phase2_hcal, phase2_hgcal, hcalHardcodeConditions",
}
}

Expand Down
6 changes: 3 additions & 3 deletions Configuration/StandardSequences/python/DigiToRaw_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
phase2_common.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([castorRawData]))

#until we have hcal raw data for phase 2....
from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
phase2_hcal.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([hcalRawData]))
#if we don't have hcal raw data
from Configuration.Eras.Modifier_hcalSkipPacker_cff import hcalSkipPacker
hcalSkipPacker.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([hcalRawData]))

# Remove siPixelRawData until we have phase1 pixel digis
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
Expand Down
6 changes: 3 additions & 3 deletions Configuration/StandardSequences/python/Digi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis

#phase 2 common mods
def _modifyDigitizerPhase2Hcal( theProcess ):
def _modifyEnableHcalHardcode( theProcess ):
from CalibCalorimetry.HcalPlugins.Hcal_Conditions_forGlobalTag_cff import hcal_db_producer as _hcal_db_producer, es_hardcode as _es_hardcode, es_prefer_hcalHardcode as _es_prefer_hcalHardcode
theProcess.hcal_db_producer = _hcal_db_producer
theProcess.es_hardcode = _es_hardcode
theProcess.es_prefer_hcalHardcode = _es_prefer_hcalHardcode

from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
modifyDigitizerPhase2Hcal_ = phase2_hcal.makeProcessModifier( _modifyDigitizerPhase2Hcal )
from Configuration.Eras.Modifier_hcalHardcodeConditions_cff import hcalHardcodeConditions
modifyEnableHcalHardcode_ = hcalHardcodeConditions.makeProcessModifier( _modifyEnableHcalHardcode )


3 changes: 2 additions & 1 deletion Configuration/StandardSequences/python/Eras.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def __init__(self):
'phase2_hgcal', 'phase2_muon', 'phase2_timing',
'phase2_timing_layer','phase2_hcal',
'trackingLowPU', 'trackingPhase1', 'trackingPhase1QuadProp', 'ctpps_2016', 'trackingPhase2PU140',
'tracker_apv_vfp30_2016', 'run2_miniAOD_80XLegacy']
'tracker_apv_vfp30_2016', 'run2_miniAOD_80XLegacy',
'hcalHardcodeConditions']
internalUseModChains = ['run2_2017_noTrackingModifier']


Expand Down
2 changes: 1 addition & 1 deletion EventFilter/HcalRawToDigi/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<use name="zlib"/>
<use name="EventFilter/HcalRawToDigi"/>
<flags EDM_PLUGIN="1"/>
<library file="HcalCalibFEDSelector.cc,HcalCalibTypeFilter.cc,HcalDigiToRaw.cc,HcalEmptyEventFilter.cc,HcalHistogramRawToDigi.cc,HcalRawToDigi.cc,modules.cc,HcalDigiToRawuHTR.cc" name="EventFilterHcalRawToDigiPlugins">
<library file="HcalCalibFEDSelector.cc,HcalCalibTypeFilter.cc,HcalDigiToRaw.cc,HcalEmptyEventFilter.cc,HcalHistogramRawToDigi.cc,HcalRawToDigi.cc,modules.cc,HcalDigiToRawuHTR.cc,HcalRawToDigiFake.cc" name="EventFilterHcalRawToDigiPlugins">
</library>
<library file="HcalLaserEventFiltProducer2012.cc, HcalLaserEventFilter2012.cc,HcalLaserHFFilter2012.cc,HcalLaserHBHEFilter2012.cc,HcalLaserHBHEHFFilter2012.cc" name="EventFilterHcalRawToDigiFiltersPlugins">
</library>
5 changes: 5 additions & 0 deletions EventFilter/HcalRawToDigi/python/HcalRawToDigi_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
# than ten, firstSample and lastSample select which samples
# will be copied to the digi
hcalDigis.firstSample = cms.int32(0)

_hcalDigisFake = EventFilter.HcalRawToDigi.HcalRawToDigiFake_cfi.HcalRawToDigiFake.clone()
from Configuration.Eras.Modifier_hcalSkipPacker_cff import hcalSkipPacker
hcalSkipPacker.toReplaceWith(hcalDigis, _hcalDigisFake)

4 changes: 0 additions & 4 deletions RecoLocalCalo/Configuration/python/hcalGlobalReco_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@

from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
phase2_hcal.toReplaceWith( hbhereco, _phase1_hbheprereco )
phase2_hcal.toModify( hbhereco,
digiLabelQIE8 = cms.InputTag('simHcalDigis'),
digiLabelQIE11 = cms.InputTag('simHcalDigis','HBHEQIE11DigiCollection')
)
3 changes: 0 additions & 3 deletions RecoLocalCalo/Configuration/python/hcalLocalReco_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,5 @@
_phase2_hcalLocalRecoSequence.remove(hbheprereco)

from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
phase2_hcal.toModify( horeco, digiLabel = cms.InputTag('simHcalDigis') )
phase2_hcal.toModify( hfprereco, digiLabel = cms.InputTag('simHcalDigis','HFQIE10DigiCollection') )
phase2_hcal.toModify( zdcreco, digiLabel = cms.InputTag('simHcalUnsuppressedDigis'), digiLabelhcal = cms.InputTag('simHcalUnsuppressedDigis') )
phase2_hcal.toReplaceWith( hcalLocalRecoSequence, _phase2_hcalLocalRecoSequence )

0 comments on commit a4c0b99

Please sign in to comment.