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
[DD4hep] Add second name to elementary materials for Geant4 GDML #36149
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36149/26689
|
A new Pull Request was created by @cvuosalo (Carl Vuosalo) for master. It involves the following packages:
@civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cvuosalo , in Geant4 both name and symbol are used only for printout. There is no practical sense to define symbol for Geant4 element derived from TGeo element. Geant4 team do not recommend to build elements from G4Element(..) constructor, instead G4NistMaterial::Instance()->FindOrBuildElement(G4int Z) interface should be used. |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-358b2d/20581/summary.html Comparison SummarySummary:
|
+1 |
@civanch I'm not sure I understand your comment. Should anything be changed in this PR, or is your comment for future consideration? |
+1 my comments for further fixes: with DD4Hep we have unreasonable material and elements names. |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
Elementary materials inside ROOT and Geant4 use two names, called variously the "name" and "title" or the "name" and "symbol". With DD4hep, redefined elements were given the second name "CMS element" because it was thought that this second name was not used. However, it does show up in Geant4 GDML and causes confusion when multiple elements all have "CMS element" as a second name.
It should be noted that our code uses ROOT elements unchanged by default, unless they have atomic masses that differ from the standard atomic masses specified for Geant4, in which case the elements are redefined.
This PR leaves ROOT elements unchanged, but for those elements our code redefines to make their atomic masses match the Geant4 standard, their two names are made to match each other. Thus, ROOT elements have names like "HYDROGEN (H)", while redefined elements have names like "Oxygen (Oxygen)". The format of the names doesn't matter as long as the names are unique.
This PR also promotes to Warning messages about composite materials that have undefined components. It is planned to make this condition an exception, with the Warning message as a first step to allow changing any remaining cases in Phase 2 before the exception is implemented.
A simple fix of the DD4hep overlap check config is also included in this PR.
PR validation:
The
SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDD4hep_cfg.py
was run to check the Geant4 materials list and the GDML file to verify that they contain unique element names for both names.No backport is needed.