-
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
Run3-gex26 Correct for preshower numbering scheme #31882
Conversation
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31882/19281
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
The code-checks are being triggered in jenkins. |
@cmsbuild Please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31882/19282
|
The tests are being triggered in jenkins.
|
A new Pull Request was created by @bsunanda (Sunanda Banerjee) for master. It involves the following packages: Geometry/EcalCommonData @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
urgent |
+1 |
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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
@@ -25,7 +25,7 @@ int EcalBaseNumber::getCopyNumber(int level) const { return _sortedCopyNumber[le | |||
|
|||
int EcalBaseNumber::getCopyNumber(const std::string& levelName) const { | |||
for (int iLevel = 0; iLevel < _theLevels; iLevel++) { | |||
if (_sortedName[iLevel] == levelName) { | |||
if (_sortedName[iLevel].find(levelName) != std::string::npos) { |
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.
@bsunanda If a volume of a given hierarchy level has a name partly containing the name of another hierarchy level volume, this will lead to issues.
The underlying, dd4hep-migration related issue, is that the G4 logical volumes, as produced from DD4hep CMSSW interface, have different names, than the G4 logical volumes names as produced from old DD.
I think the cleanest (and fastest) approach would be to have a simple string manipulation upstream to get the same G4 logical volumes with DD4hep. Ie, casting namespace and removing the extra _copyNumber from the logical volume name.
I have a branch where it is done.
This solves this specific issue, but also all the other names-related ones.
Otherwise, one has to change the string manipulations in all the client code, in all the string-related functions.
This implies many changes.
This is also slower, because we repeatedly end up making searches in strings to remove the namespace / extra copy number anyway, but in all the client code.
But more importantly, if any place in the client code is forgotten, we end up with regressions ;p.
@ghigo83
Please make a pull request using your branch. It will be nice to solve it that way.
________________________________
From: ghugo83 [notifications@github.com]
Sent: 22 October 2020 15:34
To: cms-sw/cmssw
Cc: Sunanda Banerjee; Mention
Subject: Re: [cms-sw/cmssw] Run3-gex26 Correct for preshower numbering scheme (#31882)
@ghugo83 commented on this pull request.
________________________________
In Geometry/EcalCommonData/src/EcalBaseNumber.cc<#31882 (comment)>:
@@ -25,7 +25,7 @@ int EcalBaseNumber::getCopyNumber(int level) const { return _sortedCopyNumber[le
int EcalBaseNumber::getCopyNumber(const std::string& levelName) const {
for (int iLevel = 0; iLevel < _theLevels; iLevel++) {
- if (_sortedName[iLevel] == levelName) {
+ if (_sortedName[iLevel].find(levelName) != std::string::npos) {
@bsunanda<https://github.com/bsunanda> If a volume of a given hierarchy level has a name partly containing the name of another hierarchy level volume, this will lead to issues.
The underlying, dd4hep-migration related issue, is that the G4 logical volumes, as produced from DD4hep CMSSW interface, have different names, than the G4 logical volumes names as produced from old DD.
I think the cleanest (and fastest) approach would be to have a simple string manipulation upstream to get the same G4 logical volumes with DD4hep. Ie, casting namespace and removing the extra _copyNumber from the logical volume name.
I have a branch where it is done.
This solves this specific issue, but also all the other names-related ones. Otherwise one has to change the string manipulations in all the client code, in all the string-related functions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#31882 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGMZOXNOKKCAVCE6SKIMO3SMAYGTANCNFSM4SZ2SVQA>.
|
PR description:
Correct for preshower numbering scheme in the context of dd4hep
PR validation:
Tested using private scripts in SimG4Core/Configuration/test
if this PR is a backport please specify the original PR and why you need to backport that PR:
Nothing special