-
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
CSC migration to DD4HEP #29111
Merged
Merged
CSC migration to DD4HEP #29111
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 has to be tracked, I think
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 Yana, I made the same for GEM migration. It is needed to use Untracked Parameter for dd4hep in order to have no crashes during runTheMatrix tests
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.
Strictly speaking tracked vs. untracked should not lead to crashes (or, crashes imply that something else is wrong). Where the failures perhaps complaining a missing parameter? In that case the best solution would be to implement
fillDescriptions()
to generated and validate the configuration fragment.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 is not a crash, but test failure
(i.e ----- Begin Fatal Exception 05-Mar-2020 18:40:27 CET-----------------------
An exception of category 'Configuration' occurred while
[0] Constructing the EventProcessor
[1] Constructing ESProducer: class=CSCGeometryESModule label=''
Exception Message:
MissingParameter: Parameter 'useDD4hep' not found.
----- End Fatal Exception -------------------------------------------------)
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, so the complaint is about missing parameter. The best solutions are to either implement
fillDescriptions()
(preferred), or propagate the added parameter to all definitions.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.
No, all parameters affecting results/physics should be tracked. I meant to add the parameter in all places where
cms.ESProducer("CSCGeometryESModule", ...)
is defined. By quick look there does not seem to be that many, but it is in the HLT menu, which would need a customize function in https://github.com/cms-sw/cmssw/blob/master/HLTrigger/Configuration/python/customizeHLTforCMSSW.pyThere 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 found 10 files (see attached picture). In all these .py files do I have to set the dd4hep parameter? Do I have to delete useDD4hep_{p.getUntrackedParameter("useDD4hep", false)} from CSCGeometryESModule.cc? Probably I'll see a compilation error..
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.
In the first three (under
Geometry/CSCGeometry*
) yes, theuseDD4hep
parameter would need to be added.For the next 6 (under
HLTrigger/Configuration
) a customize function should be added inhttps://github.com/cms-sw/cmssw/blob/master/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
because the HLT menu dumps should not be edited directly.
The last one looks like it can be ignored (it only modifies an existing module, and the file may well be obsolete).
It should be changed to
useDD4hep_{p.getParameter("useDD4hep")}
.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 keep in mind that we have a process modifier https://cmssdt.cern.ch/lxr/source/Configuration/ProcessModifiers/python/dd4hep_cff.py that can be used to centralize settings change. This could help in tracking in a transparent way the set of needed modifications
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.
@slomeo I think the easiest way is to set the default value by using
fillDescriptions()
, as suggested by @makortel