-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
LowPtElectrons: final energy regression and ID (back port of 32391) #33589
LowPtElectrons: final energy regression and ID (back port of 32391) #33589
Conversation
A new Pull Request was created by @bainbrid for CMSSW_10_6_X. It involves the following packages: PhysicsTools/PatAlgos @perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@slava77 do I need to squash the commits? |
It's welcome but not required. |
test parameters: |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5690ec/14752/summary.html Comparison SummarySummary:
|
all differences appear to be in 136.88811 (2018 data UL re-miniAOD). Changes in this workflow are not allowed/expected in this release. It looks like something is not protected by |
Sorry, there was a typo. Fixed here 683bf86. Tested locally with 136.88811 (and can reproduce exactly the ID distribution now...) |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5690ec/14843/summary.html Comparison SummarySummary:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are quite a few divergent points from what's in #32391 / master version. Backports should be maximally verbatim.
# For run2_miniAOD_devel ... | ||
# (1) apply energy regression | ||
# (2) rekey seed BDT ValueMaps by reco::GsfElectron | ||
# (3) rerun ID | ||
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel | ||
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectrons_cff import lowPtGsfElectrons | ||
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSeedValueMaps_cff import rekeyLowPtGsfElectronSeedValueMaps | ||
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cff import lowPtGsfElectronID | ||
_makePatLowPtElectronsTask = makePatLowPtElectronsTask.copy() | ||
_makePatLowPtElectronsTask.add(lowPtGsfElectrons) | ||
_makePatLowPtElectronsTask.add(rekeyLowPtGsfElectronSeedValueMaps) | ||
_makePatLowPtElectronsTask.add(lowPtGsfElectronID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part is reshuffled compared to #32391 https://github.com/cms-sw/cmssw/pull/32391/files#diff-301347daec1998142b2c5167fcec9c40bacb33d2622ae294648e9be73a34ee40L74-R86
please backport verbatim wherever possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified to be verbatim w.r.t. master, caveat changes to handle modifiers (and their combinations) according to the TWiki linked in the PR description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I've reverted back to the order originally used in this PR, as fitst more naturally with the existing code in 10_6_X and also the most recent changes I've made to deal with issues found during testing. I can copy this style to master as part of an upcoming PR (to master) that includes missing items / "forward ports".
# Modifier for run2_miniAOD_UL (order is important: overrides bParking) | ||
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL | ||
run2_miniAOD_UL.toModify(selectedPatLowPtElectrons,cut = "pt>1. && electronID('ID')>1.5") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this part really needed: it seems more straightforward to keep the older version (the cut in L9/10) to stay unchanged.
# Modifier for run2_miniAOD_UL (order is important: overrides bParking) | |
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL | |
run2_miniAOD_UL.toModify(selectedPatLowPtElectrons,cut = "pt>1. && electronID('ID')>1.5") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, reverted as suggested.
@@ -3,16 +3,25 @@ | |||
# module to select Electrons | |||
# See https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePhysicsCutParser | |||
# on how to use the cut-string | |||
# | |||
|
|||
# By default, no low-pT electrons are stored in MINIAOD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this comment actually useful?
is it supposed to really refer to what's stored, or more about the module running (or somehow to the fact that the cut is now changed to ""
in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment removed. (Was related to the cut that was changed to "", now also reverted.)
(bParking | run2_miniAOD_UL | run2_miniAOD_devel).toModify( | ||
MicroEventContent, | ||
outputCommands = MicroEventContent.outputCommands + _lowPt_extraCommands | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in this file seem unnecessary.
run2_miniAOD_devel
will highly unlikely be applied by itself without either bParking
or run2_miniAOD_UL
already present.
please remove the commit editing this file if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'run2_miniAOD_devel' is required, as used in the following combination: (~bParking & run2_miniAOD_devel)
This modifier combination is defined in the TWiki linked in the PR description, which is "Recommended for future UL re-miniAOD of non-BParking data sets."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'run2_miniAOD_devel' is required, as used in the following combination: (~bParking & run2_miniAOD_devel)
This modifier combination is defined in the TWiki linked in the PR description, which is "Recommended for future UL re-miniAOD of non-BParking data sets."
but the point is that run2_miniAOD_devel
is needed only where one has to extend the functionality beyond what is already provided by run2_miniAOD_UL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my reply here: https://github.com/cms-sw/cmssw/pull/33589/files#r641937310
phase2_hgcal.toModify( RecoEgammaFEVT, outputCommands = RecoEgammaFEVT.outputCommands + _phase2_hgcal_RecoEgamma_tokeep | ||
) | ||
phase2_hgcal.toModify( RecoEgammaFEVT, outputCommands = RecoEgammaFEVT.outputCommands + _phase2_hgcal_RecoEgamma_tokeep ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice(r) not to edit unrelated lines in a backport
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, reverted.
) | ||
|
||
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel | ||
run2_miniAOD_devel.toReplaceWith(lowPtGsfElectrons,_lowPtGsfElectrons) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run2_miniAOD_devel.toReplaceWith(lowPtGsfElectrons,_lowPtGsfElectrons) | |
(bParking | run2_miniAOD_devel).toReplaceWith(lowPtGsfElectrons,_lowPtGsfElectrons) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
bParking.toModify(_lowPtGsfElectrons, | ||
previousGsfElectronsTag = cms.InputTag("lowPtGsfElectronsPreRegression"), | ||
) | ||
bParking.toReplaceWith(lowPtGsfElectrons,_lowPtGsfElectrons) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bParking.toReplaceWith(lowPtGsfElectrons,_lowPtGsfElectrons) |
see above (bParking | run2_miniAOD_devel).toReplaceWith
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
bParking.toModify(_lowPtGsfElectrons, | ||
previousGsfElectronsTag = cms.InputTag("lowPtGsfElectronsPreRegression"), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bParking.toModify(_lowPtGsfElectrons, | |
previousGsfElectronsTag = cms.InputTag("lowPtGsfElectronsPreRegression"), | |
) | |
bParking.toModify(_lowPtGsfElectrons, | |
previousGsfElectronsTag = "lowPtGsfElectronsPreRegression" | |
) |
also, please move this up, before _lowPtGsfElectrons
is used in toReplaceWith
calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
run2_miniAOD_devel.toReplaceWith(lowPtGsfElectrons,_lowPtGsfElectrons) | ||
|
||
from Configuration.Eras.Modifier_bParking_cff import bParking | ||
lowPtGsfElectronsPreRegression = lowPtGsfElectrons.clone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line better be moved before all the .toReplaceWith(lowPtGsfElectrons
calls above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I need this line anymore?
Please can you check the updated version of this file to be sure it's organised correctly according to your suggestion.
@@ -68,3 +68,61 @@ | |||
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 | |||
pp_on_AA_2018.toModify(lowPtGsfElectrons.preselection, minSCEtBarrel = 15.0) | |||
pp_on_AA_2018.toModify(lowPtGsfElectrons.preselection, minSCEtEndcaps = 15.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to propose a less circular implementation with more similarity to what is done in the master version:
- define lowPtGsfElectronsPreRegression_cfi.py which would contain all of the above except for the module name changed to
lowPtGsfElectronsPreRegression
- keep the rest of this file content in lowPtGsfElectrons_cfi.py
- start with
lowPtGsfElectrons = lowPtGsfElectronsPreRegression.clone()
- start with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I also updated these lines to read as 'lowPtGsfElectronsPreRegression.preselection' - I hope this is correct.
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5690ec/15677/summary.html Comparison SummarySummary:
|
RecoEgamma/EgammaElectronProducers/python/lowPtGsfElectronID_cff.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Slava Krutelyov <slava77@gmail.com>
I've just reviewed again all combinations of modifier logic required in 10_6_20 and this PR, and I have this:
So I believe your change (in conjunction with the remaining cfi) does indeed give the above. The original logic Explicitly we could write in the cfi:
but the existing logic is effectively the same. |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5690ec/15680/summary.html Comparison SummarySummary:
|
+reconstruction for #33589 2a63f28
|
This pull request is fully signed and it will be integrated in one of the next CMSSW_10_6_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_12_0_X is complete. This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR:
Provides support for UL re-MINIAOD of both "standard" and BParking data sets, using the modifiers
bParking
,run2_miniAOD_UL
, andrun2_miniAOD_devel
.Leaves the RECO sequence, and RECO/AOD content, unchanged w.r.t. 10_6_25.
Enables energy regression for certain modifier configurations (detailed below). The energy regression performance can be found on slides 6-7 here.
Enables new electron ID models for certain modifier configurations (detailed below). The performance of the ID models 2020Nov28 and 2021May17 can be found on slides 4-5 here.
Depends on PR LowPtElectrons: 2020Nov28 and 2021May17 models for 10_6_X cms-data/RecoEgamma-ElectronIdentification#19
A detailed summary of the modifier configurations provided in this PR can be found at this TWiki (see table). A brief summary is provided below.
No changes to the RECO sequence are applied.
No-change policy for UL re-MINIAOD of standard data sets, modifier
(~bParking & run2_miniAOD_UL)
:(~bParking & run2_miniAOD_devel)
:Energy regression is performed as part of the re-MINIAOD sequence.
ID is evaluated as part of the re-MINIAOD sequence. A new ID weights file (2020Nov28) has been provided for use with a UL re-MINIAOD campaign. There is no appreciable extra CPU load (w.r.t. the original model), and the memory footprint will reduce (due to the smaller weights file). The 2020Nov28 model is available within PR LowPtElectrons: 2020Nov28 and 2021May17 models for 10_6_X cms-data/RecoEgamma-ElectronIdentification#19.
Low-pT PAT electrons are selected based on the following conditions
pT > 1.0 GeV and ID score > -0.25
, which provides 90% signal efficiency, a 10% mistag rate, resulting in an increase to the MINIAOD footprint of ~1%.(bParking & run2_miniAOD_UL)
:Energy regression is performed as part of the re-MINIAOD sequence.
ID is evaluated as part of the re-MINIAOD sequence. A new ID weights file (2021May17), has been provided for use with a UL re-MINIAOD campaign. There is no appreciable extra CPU load (w.r.t. the original model), and the memory footprint will reduce (due to the smaller weights file). The 2021May17 model is available within PR LowPtElectrons: 2020Nov28 and 2021May17 models for 10_6_X cms-data/RecoEgamma-ElectronIdentification#19.
Low-pT PAT electrons are selected based on the following conditions
pT > 1.0 GeV
. Computing performance studies can be found below. The raising of the minimum electron pT threshold from 'open' (effectively ~0.5 GeV) to 1.0 GeV reduces the MINIAOD event size by ~20%, based on the 136.898 workflow (data ParkingBPH 2018B).PR validation:
if this PR is a backport please specify the original PR and why you need to backport that PR:
This PR is a back port of #32391
Forward port of additional functionality