-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[14.0.X] store the hltobjects for Mass50 triggers #44746
Conversation
A new Pull Request was created by @pinchunchou for CMSSW_14_0_X. It involves the following packages:
@Martin-Grunewald, @mmusich, @cmsbuild can you please review it and eventually sign? Thanks. cms-bot commands are listed here
|
cms-bot internal usage |
You need to provide a PR to master branch (currently 14_1_X) first, and then link this PR to be its backport to 14_0. |
@@ -45,6 +47,35 @@ bool HLTEgammaCombMassFilter::hltFilter(edm::Event& iEvent, | |||
trigger::TriggerFilterObjectWithRefs& filterproduct) const { | |||
//right, issue 1, we dont know if this is a TriggerElectron, TriggerPhoton, TriggerCluster (should never be a TriggerCluster btw as that implies the 4-vectors are not stored in AOD) |
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.
Does this comment still apply after the changes proposed here?
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 think this problem should already be solved after we applied the proposed change, but one can verify if this is really solved or not.
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.
If it does, then please remove the comment.
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.
Sure, I have removed the comment. Thanks for the reminder!
@pinchunchou can you please address the comments? |
Thanks for the reminder. I will do this |
Pull request #44746 was updated. @cmsbuild, @mmusich, @Martin-Grunewald can you please check and sign again. |
Pull request #44746 was updated. @mmusich, @cmsbuild, @Martin-Grunewald can you please check and sign again. |
PR to master branch: #44778 |
backport of #44778 |
type egamma, bug-fix |
@cmsbuild, please test |
@@ -35,6 +36,7 @@ void HLTEgammaCombMassFilter::fillDescriptions(edm::ConfigurationDescriptions& d | |||
makeHLTFilterDescription(desc); | |||
desc.add<edm::InputTag>("firstLegLastFilter", edm::InputTag("firstFilter")); | |||
desc.add<edm::InputTag>("secondLegLastFilter", edm::InputTag("secondFilter")); | |||
desc.add<edm::InputTag>("l1EGCand", edm::InputTag("hltL1IsoRecoEcalCandidate")); |
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.
Since the default value of the tag is not realistic, and the PR has no changes to the python configs, I would naively expect some test to fail because of a misconfigured InputTag. Or not ?
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.
scram b runtests passed without failures - if there are python configs where this parameter should be added, they are not used in testing. Are the configs where the module is called such as HLTrigger/Configuration/test/OnLine_HLT_FULL.py are expected to need changes?
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.
fillDescriptions inserts values/parameters if they are missing in the py config, so no changes needed there.
However, if the default of a new parameter is not realistic, then it is either not used or misused. Please check!
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.
Hi @Martin-Grunewald , since it passes tests its unclear to me what is meant by the current value is unrealistic, could you clarify?
BTW if I remove that line (L39), when doing HLT emulation we would have error as below:
----- Begin Fatal Exception 17-Jun-2024 07:35:03 CEST-----------------------
An exception of category 'Configuration' occurred while
[0] Constructing the EventProcessor
[1] Constructing module: class=HLTEgammaCombMassFilter label='hltDoubleEle10Mass50PPRefFilter'
Exception Message:
MissingParameter: Parameter 'l1EGCand' not found.
----- End Fatal Exception -------------------------------------------------
And if I also remove L27 and L49-51, nothing will be stored in the hltobject. So I think we should keep it as it is?
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 think the issue @missirol is referring to is the observation that hltL1IsoRecoEcalCandidate
is not part of any recent menu, so there shouldn't be an object with that label in the Event. So it is weird!
Check whether/how l1EGCand
is used.
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.
Yes you are correct. In the modules for HIon
HLT menu we should use hltEgammaCandidatesPPOnAA
. I looked into the example you provided but not quite sure how to do the customisation for them, could you advice?
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 could be something as follows (did not test it).
diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
index 4f116461823..0b027666ccc 100644
--- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
+++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
@@ -261,6 +261,13 @@ def checkHLTfor43774(process):
return process
+def customizeHLTfor44746(process):
+ for modLabel in ['hltDoubleEle10Mass50PPOnAAFilter', 'hltDoubleEle15Mass50PPOnAAFilter']:
+ if hasattr(process, modLabel):
+ mod = getattr(process, modLabel)
+ mod.l1EGCand = cms.InputTag('hltEgammaCandidatesPPOnAA')
+ return process
+
# CMSSW version specific customizations
def customizeHLTforCMSSW(process, menuType="GRun"):
@@ -270,5 +277,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
# process = customiseFor12718(process)
process = checkHLTfor43774(process)
+ process = customizeHLTfor44746(process)
return process
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.
Thanks! I have applied the changes here as well as at PR #44778 in the latest squashed commits.
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.
Sorry there seems to be some merge conflicts. I am trying to deal with them
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.
The conflicts are solved.
PrevFilterOutput->getObjects(trigger::TriggerElectron, eleCandsPrev); | ||
|
||
if (!phoCandsPrev.empty()) { | ||
for (auto& phoCand : phoCandsPrev) { |
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.
Would auto const&
work, instead ?
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.
Sure I will fix it, thanks for pointing this out
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 is fixed accordingly in the latest commits.
} | ||
} else if (!clusCandsPrev.empty()) { | ||
for (auto& clusCand : clusCandsPrev) { | ||
filterproduct.addObject(trigger::TriggerCluster, clusCand); | ||
} | ||
} else if (!eleCandsPrev.empty()) { | ||
for (auto& eleCand : eleCandsPrev) { | ||
filterproduct.addObject(trigger::TriggerElectron, eleCand); | ||
} | ||
} |
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.
Normally (but I guess there is no universal rule on this), the trigger objects are added for those candidates which pass some kinematic/trigger selection inside the HLTFilter
, e.g. the candidates forming pairs passing the mass cut. Here, it seems that simply every candidate is saved regardless. Is this really intended ?
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.
Sure I will try to fix it, thanks for pointing this out
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.
The problem has been fixed in the latest commits.
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b35ec9/38942/summary.html Comparison SummarySummary:
|
code-checks |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44746/40148
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
No reply to review comments in over 2 weeks. What is the plan for this PR ? |
13307fa
to
73b2adb
Compare
Pull request #44746 was updated. @Martin-Grunewald, @cmsbuild, @mmusich can you please check and sign again. |
fixed |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b35ec9/40192/summary.html Comparison SummarySummary:
|
+1 |
urgent |
This pull request is fully signed and it will be integrated in one of the next CMSSW_14_0_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_14_1_X is complete. This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @sextonkennedy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
@rappoccio @antoniovilela Merge conflicts resolved by author, this PR is now ready to go into 14_0, please merge. |
+1 |
@Martin-Grunewald @cms-sw/hlt-l2 |
PR description:
We've encountered an issue with the Mass50 HLT triggers for double electrons (Ele15Ele10GsfMass50, DoubleEle10GsfMass50, and DoubleEle15GsfMass50) in both ppref and HI HLT menus. These HLT triggers are not storing any information in the hltobject trees, even though the events are being triggered. After investigating, we have identified that the problem lies with HLTEgammaCombMassFilter.
I have made some modifications to HLTEgammaCombMassFilter, and now the information is being stored in hltobject.
See slides: https://twiki.cern.ch/twiki/pub/CMS/HLT_HIon_Run3/pinchun20230928.pdf (P.8)