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
Magnetic Field optimization #29556
Magnetic Field optimization #29556
Conversation
…onstruction time. Improves 0.4% CPU for non-cached calls. Also migrate debug couts to MessageLogger
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14848
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
switch (geomVersion >= 120812 ? 0 : (geomVersion >= 90812 ? 1 : 2)) { | ||
case 0: // since 120812 | ||
barrelRsq1 = 172.400f * 172.400f; | ||
barrelRsq2 = 308.735f * 308.735f; | ||
barrelZ0 = 350.000f; | ||
barrelZ1 = 633.290f; | ||
barrelZ2 = 662.010f; | ||
break; | ||
case 1: // version 90812 (no longer in use) | ||
barrelRsq1 = 172.400f * 172.400f; | ||
barrelRsq2 = 308.755f * 308.755f; | ||
barrelZ0 = 350.000f; | ||
barrelZ1 = 633.890f; | ||
barrelZ2 = 662.010f; | ||
break; | ||
case 2: // versions 71212, 90322 | ||
barrelRsq1 = 172.400f * 172.400f; | ||
barrelRsq2 = 308.755f * 308.755f; | ||
barrelZ0 = 350.000f; | ||
barrelZ1 = 633.290f; | ||
barrelZ2 = 661.010f; | ||
break; |
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 apparently relocating some magic numbers from what was earlier in MagGeometry::inBarrel
.
There we had // FIXME: Get these dimensions from the builder.
Is this available from the builder?
Minimally, it's still worth to keep the FIXME 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.
I put the comment back,
I wrote the FIXME a dozen years ago in the hope I would have figured out a reasonable way to detect the dimensions automatically or to label volumes appropriately in the geometry. I haven't since. A sufficiently generic solution would require adding specifications to the geometry and some logic, which I don't think is worth given that these numbers are not expected to change (last change was 8 years ago and none is in sight in the future)
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14849
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
just in case it was missed |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14854
|
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14945
|
@cmsbuild please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
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 (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
PR validation:
Regression-tested for identical values against reference files for all maps/currents/eras.
Optimizations found to sum up to a 0.5% speedup for non-cached MF calls, according to callgrind.