Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Reduction Network for photon energy regression in miniAOD using the SonicTriton service #37134

Merged
merged 42 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f3fee7c
One merged commit
ssrothman Mar 3, 2022
32c5854
Fix ES data getting to be compliant with newer CMSSW
ssrothman Mar 3, 2022
2da29a3
Added test
ssrothman Mar 3, 2022
616831b
code-format and code-checks
ssrothman Mar 3, 2022
3cdd06c
Code-format (again??)
ssrothman Mar 3, 2022
0bf9e99
Made test shorter
ssrothman Mar 7, 2022
da3c714
Fixed model name
ssrothman Mar 7, 2022
5af31a1
Not sure what's going on here tbh...
ssrothman Mar 7, 2022
fe1ee8e
Revert "Not sure what's going on here tbh..."
ssrothman Mar 7, 2022
c65a63d
Rename customisation function appropriately
ssrothman Mar 7, 2022
e36b116
Updated test config to call correct customisation function name
ssrothman Mar 7, 2022
26dfae6
Fixed customisation function to be compatible with cmsDriver
ssrothman Mar 8, 2022
30e291e
Almost working.....
ssrothman Mar 9, 2022
82ced8d
Kevin found the problem :D
ssrothman Mar 10, 2022
2f80e2f
Removed test
ssrothman Mar 11, 2022
d357aa7
UserFloat functionality
ssrothman Mar 16, 2022
9556a83
Fixed fatal typos
ssrothman Mar 16, 2022
2637202
No reason to touch runtests.sh
ssrothman Mar 16, 2022
1a5de2f
Pointers..
ssrothman Mar 16, 2022
f994140
Clean up DRNCorrectionProducerT
ssrothman Mar 16, 2022
e5db2ac
Error fixing...
ssrothman Mar 16, 2022
ec15ac7
Should compile now
ssrothman Mar 16, 2022
cc93d65
empty commit to get cms bot to rerun code checks
ssrothman Mar 16, 2022
c3927d0
Code-format
ssrothman Mar 16, 2022
722602b
Don't need ES Handles
ssrothman Mar 17, 2022
c658fab
No longer pointers
ssrothman Mar 17, 2022
509d4a1
Typo fix
ssrothman Mar 17, 2022
84c52f2
Adding process modifier
ssrothman Mar 17, 2022
0e55eb0
Typo fix
ssrothman Mar 17, 2022
c99da3c
userFloats by default
ssrothman Mar 17, 2022
8a69393
RelVal use modifier
ssrothman Mar 17, 2022
fa89ab1
Replace p4 matching
ssrothman Mar 17, 2022
bb7c727
Clean up after removing p4 comparison
ssrothman Mar 17, 2022
bccd830
Merge branch 'noHandle' into photon_rebase2
ssrothman Mar 17, 2022
8c0bd7c
Code-format
ssrothman Mar 17, 2022
1ab9afd
photonDRN modifier now includes enableSonicTriton
ssrothman Apr 4, 2022
fc9c472
use fillDescriptions defaults for recHits
ssrothman Apr 4, 2022
78558dc
shared memory on
ssrothman Apr 4, 2022
7ecb877
test clone...
ssrothman Apr 13, 2022
a8702fa
Revert "test clone..."
ssrothman Apr 14, 2022
5977c4b
Cloning fillDescriptions config
ssrothman Apr 14, 2022
c8484f9
Same for electrons
ssrothman Apr 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Configuration/ProcessModifiers/python/photonDRN_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import FWCore.ParameterSet.Config as cms
from Configuration.ProcessModifiers.enableSonicTriton_cff import enableSonicTriton

#behind-the-scenes modifier that only turns on the DRN photon regression
_photonDRN = cms.Modifier()

#modifier to enable DRN energy regression for photons
#requires also having enableSonicTriton
photonDRN = cms.ModifierChain(_photonDRN, enableSonicTriton)
1 change: 1 addition & 0 deletions Configuration/PyReleaseValidation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The offsets currently in use are:
* 0.17: Run-3 deep core seeding for JetCore iteration
* 0.21: Production-like sequence
* 0.24: 0 Tesla (Run-2, Run-3)
* 0.31: Photon energy corrections with DRN architecture
* 0.61: `phase2_ecal_devel` era
* 0.91: Track DNN modifier
* 0.97: Premixing stage1
Expand Down
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_2017.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# (TTbar trackingOnly, trackingRun2, trackingOnlyRun2, trackingLowPU, pixelTrackingOnly)
# (TTbar PU with JME NanoAOD, disable for now due to Run-3 Nano-Prompt preparation)
# 2018 (ele guns 10, 35, 1000; pho guns 10, 35; mu guns 1, 10, 100, 1000, QCD 3TeV, QCD Flat)
# (pho guns 10, 35 with photonDRN enabled)
# 2018 (ZMM, TTbar, ZEE, MinBias, TTbar PU, ZEE PU, TTbar design)
# (TTbar trackingOnly, pixelTrackingOnly)
# (HE collapse: TTbar, TTbar PU, TTbar design)
Expand Down Expand Up @@ -47,6 +48,7 @@
10024.1,10024.2,10024.3,10024.4,10024.5,
#10224.15,
10801.0,10802.0,10803.0,10804.0,10805.0,10806.0,10807.0,10808.0,10809.0,10859.0,10871.0,
10804.31, 10805.31,
10842.0,10824.0,10825.0,10826.0,10823.0,11024.0,11025.0,11224.0,
10824.1,10824.5,
10824.6,11024.6,11224.6,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,32 @@ def condition(self, fragment, stepList, key, hasHarvest):
'--procModifiers': 'mlpf'
}

# photonDRN workflows
class UpgradeWorkflow_photonDRN(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if 'Reco' in step:
stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
return '2018' in key and "SingleGamma" in fragment

upgradeWFs['photonDRN'] = UpgradeWorkflow_photonDRN(
steps = [
'Reco',
'RecoNano',
'RecoFakeHLT'
],
PU = [
'Reco',
'RecoNano',
'RecoFakeHLT'
],
suffix = '_photonDRN',
offset = 0.31,
)
upgradeWFs['photonDRN'].step3 = {
'--procModifiers': 'enableSonicTriton,photonDRN'
}

# Patatrack workflows:
# - 2018 conditions, TTbar
# - 2018 conditions, Z->mumu,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import FWCore.ParameterSet.Config as cms

from RecoEgamma.EgammaTools.patElectronDRNCorrectionProducer_cfi import patElectronDRNCorrectionProducer

patElectronsDRN = patElectronDRNCorrectionProducer.clone(
particleSource = 'selectedPatElectrons',
rhoName = 'fixedGridRhoFastjetAll',
Client = patElectronDRNCorrectionProducer.Client.clone(
mode = 'Async',
allowedTries = 1,
modelName = 'electronObjectEnsemble',
modelConfigPath = 'RecoEgamma/EgammaElectronProducers/data/models/electronObjectEnsemble/config.pbtxt',
timeout = 10
)
)
14 changes: 14 additions & 0 deletions PhysicsTools/PatAlgos/python/slimming/patPhotonDRNCorrector_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import FWCore.ParameterSet.Config as cms
from RecoEgamma.EgammaTools.patPhotonDRNCorrectionProducer_cfi import patPhotonDRNCorrectionProducer

patPhotonsDRN = patPhotonDRNCorrectionProducer.clone(
particleSource = 'selectedPatPhotons',
rhoName = 'fixedGridRhoFastjetAll',
Client = patPhotonDRNCorrectionProducer.Client.clone(
mode = 'Async',
allowedTries = 1,
modelName = 'photonObjectEnsemble',
modelConfigPath = 'RecoEgamma/EgammaPhotonProducers/data/models/photonObjectEnsemble/config.pbtxt',
timeout = 10
)
)
4 changes: 4 additions & 0 deletions PhysicsTools/PatAlgos/python/slimming/slimming_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@
_phase2_timing_slimmingTask = cms.Task(slimmingTask.copy(),
offlineSlimmedPrimaryVertices4D)
phase2_timing.toReplaceWith(slimmingTask,_phase2_timing_slimmingTask)

from PhysicsTools.PatAlgos.slimming.patPhotonDRNCorrector_cfi import patPhotonsDRN
from Configuration.ProcessModifiers.photonDRN_cff import _photonDRN
_photonDRN.toReplaceWith(slimmingTask, cms.Task(slimmingTask.copy(), patPhotonsDRN))
1 change: 1 addition & 0 deletions RecoEgamma/EgammaTools/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<use name="RecoEcal/EgammaCoreTools"/>
<use name="DataFormats/ParticleFlowReco"/>
<use name="PhysicsTools/TensorFlow" />
<use name="HeterogeneousCore/SonicTriton"/>
<export>
<lib name="1"/>
</export>
Loading