Skip to content

Commit fbbfc76

Browse files
authored
Merge pull request #42097 from srimanob/132_ECalComponentModAndWorkflow
Add ECal-component modifiers and test workflows
2 parents 43cb25f + 5054bcd commit fbbfc76

File tree

7 files changed

+66
-3
lines changed

7 files changed

+66
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
ecal_component = cms.Modifier()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
ecal_component_finely_sampled_waveforms = cms.Modifier()

Configuration/PyReleaseValidation/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ The offsets currently in use are:
6666
* 0.31: Photon energy corrections with DRN architecture
6767
* 0.61: ECAL `phase2_ecal_devel` era, on CPU
6868
* 0.612: ECAL `phase2_ecal_devel` era, with automatic offload to GPU if available
69+
* 0.631: ECAL component-method based digis
70+
* 0.632: ECAL component-method based finely-sampled waveforms
6971
* 0.75: Phase-2 HLT
7072
* 0.91: Track DNN modifier
7173
* 0.97: Premixing stage1

Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py

+42
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,48 @@ def condition(self, fragment, stepList, key, hasHarvest):
18411841
offset = 0.612,
18421842
)
18431843

1844+
# ECAL component
1845+
class UpgradeWorkflow_ECalComponent(UpgradeWorkflow):
1846+
def __init__(self, suffix, offset, ecalMod,
1847+
steps = [
1848+
'GenSim',
1849+
'GenSimHLBeamSpot',
1850+
'GenSimHLBeamSpot14',
1851+
'GenSimHLBeamSpotHGCALCloseBy',
1852+
'Digi',
1853+
'DigiTrigger',
1854+
],
1855+
PU = [
1856+
'GenSim',
1857+
'GenSimHLBeamSpot',
1858+
'GenSimHLBeamSpot14',
1859+
'GenSimHLBeamSpotHGCALCloseBy',
1860+
'Digi',
1861+
'DigiTrigger',
1862+
]):
1863+
super(UpgradeWorkflow_ECalComponent, self).__init__(steps, PU, suffix, offset)
1864+
self.__ecalMod = ecalMod
1865+
1866+
def setup_(self, step, stepName, stepDict, k, properties):
1867+
if 'Sim' in step or 'Digi' in step:
1868+
if self.__ecalMod is not None:
1869+
stepDict[stepName][k] = merge([{'--procModifiers':self.__ecalMod},stepDict[step][k]])
1870+
1871+
def condition(self, fragment, stepList, key, hasHarvest):
1872+
return ('2021' in key or '2023' in key or '2026' in key)
1873+
1874+
upgradeWFs['ECALComponent'] = UpgradeWorkflow_ECalComponent(
1875+
suffix = '_ecalComponent',
1876+
offset = 0.631,
1877+
ecalMod = 'ecal_component',
1878+
)
1879+
1880+
upgradeWFs['ECALComponentFSW'] = UpgradeWorkflow_ECalComponent(
1881+
suffix = '_ecalComponentFSW',
1882+
offset = 0.632,
1883+
ecalMod = 'ecal_component_finely_sampled_waveforms',
1884+
)
1885+
18441886
class UpgradeWorkflow_0T(UpgradeWorkflow):
18451887
def setup_(self, step, stepName, stepDict, k, properties):
18461888
myGT=stepDict[step][k]['--conditions']

SimCalorimetry/EcalSimProducers/python/componentDigiParameters_cff.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
componentTimeTag = cms.string("Component"),
66
componentSeparateDigi = cms.bool(False),
77
componentAddToBarrel = cms.bool(False),
8-
componentTimePhase = cms.double(0.),
9-
8+
componentTimePhase = cms.double(0.)
109
)
10+
11+
from Configuration.ProcessModifiers.ecal_component_cff import ecal_component
12+
from Configuration.ProcessModifiers.ecal_component_finely_sampled_waveforms_cff import ecal_component_finely_sampled_waveforms
13+
(ecal_component | ecal_component_finely_sampled_waveforms).toModify(component_digi_parameters,componentSeparateDigi=True)

SimCalorimetry/EcalSimProducers/python/ecalTimeDigiParameters_cff.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@
88
timeLayerBarrel = cms.int32(7),
99
timeLayerEndcap = cms.int32(3),
1010
componentWaveform = cms.bool(False)
11-
)
11+
)
12+
13+
from Configuration.ProcessModifiers.ecal_component_finely_sampled_waveforms_cff import ecal_component_finely_sampled_waveforms
14+
(ecal_component_finely_sampled_waveforms).toModify(ecal_time_digi_parameters,componentWaveform=True)

SimG4Core/Application/python/g4SimHits_cfi.py

+7
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,13 @@
679679
TimeSliceUnit = 0.001 )
680680
)
681681

682+
##
683+
## For ECAL component study
684+
##
685+
from Configuration.ProcessModifiers.ecal_component_cff import ecal_component
686+
from Configuration.ProcessModifiers.ecal_component_finely_sampled_waveforms_cff import ecal_component_finely_sampled_waveforms
687+
(ecal_component | ecal_component_finely_sampled_waveforms).toModify(g4SimHits,ECalSD = dict(StoreLayerTimeSim = True, SlopeLightYield = 0.0))
688+
682689
##
683690
## Change CALO Thresholds
684691
##

0 commit comments

Comments
 (0)