-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add GEM unpacker in L1Repack FullMC and temporary load of GEM geometry to hltGetConfiguration #34788
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
Add GEM unpacker in L1Repack FullMC and temporary load of GEM geometry to hltGetConfiguration #34788
Changes from 5 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,9 @@ | |
| # helper fuctions | ||
| from HLTrigger.Configuration.common import * | ||
|
|
||
| # dd4hep | ||
| from Configuration.ProcessModifiers.dd4hep_cff import dd4hep | ||
|
|
||
| # add one customisation function per PR | ||
| # - put the PR number into the name of the function | ||
| # - add a short comment | ||
|
|
@@ -129,10 +132,21 @@ def customiseFor2018Input(process): | |
| return process | ||
|
|
||
|
|
||
| #temporary solution to add GEM geometry for hltGetConfiguration | ||
| def customiseFor34788(process): | ||
| """Add GEM geometry to output from hltGetConfiguration""" | ||
| process.load("Geometry.GEMGeometryBuilder.gemGeometryDB_cfi") | ||
|
|
||
| return process | ||
|
|
||
| # CMSSW version specific customizations | ||
| def customizeHLTforCMSSW(process, menuType="GRun"): | ||
|
|
||
| # add call to action function in proper order: newest last! | ||
| # process = customiseFor12718(process) | ||
|
|
||
| # temporary for GEM | ||
| if menuType in ["GRun","HIon","PIon","PRef"]: | ||
| (~dd4hep).makeProcessModifier(customiseFor34788) | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not very familiar with the syntax of Also, I was curious to know if the check on
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would also be best to move the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK, For the menu, as I test, it will not work with the Fake menu, i.e. Run1 or Run2 config. I assume because GEM does not exist. This is to provide a temporary solution until GEM unpacker will integrate with CSC (I hope soon), then the whole of this can be removed. I can move import away, but then it will need to be at the beginning, or just before the function. It is fine to me.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That is true for cfi/cff fragments that get load into the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @makortel
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If not dd4hep. When DD4hep is used, I will get
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a "not": if the dd4hep modifier is not active, then call customiseFor34788
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That will be a pain when we move the ES module into the HLT menus in ConfDb, as that is not dd4hep aware. Why this different treatment dd4hep vs non-dd4hep?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, process load should avoid the duplication as you load exactly the same into the process (twice).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess that when |
||
| 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.
If this function needs to be used via
hltGetConfiguration --customise [..].customiseForRun3GEMGeometry34788(which will writeprocess = customiseForRun3GEMGeometry34788(process)), then the function body is missingreturn process.In general, if the function is run from inside
customizeHLTforCMSSW, passing it via the--customiseoption ofhltGetConfigurationis not needed; if that's done, the function will be run twice (first bycustomizeHLTforCMSSW, then by the call added via--customise).Also (but this is just an opinion), if the function is meant to be temporary, its name should just contain the PR number (i.e.
customiseFor34788), plus a description as comment in the function body (which is already done). If the function is not temporary (but this is a much less common occurrence), then one should probably not use the PR number, like for other functions in this file (e.g.customisePixelGainForRun2Input).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.
Fixed. Thx.