Skip to content
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

MTD & Tracker DD4hep Units #32488

Merged
merged 4 commits into from Dec 17, 2020
Merged

MTD & Tracker DD4hep Units #32488

merged 4 commits into from Dec 17, 2020

Conversation

vargasa
Copy link
Contributor

@vargasa vargasa commented Dec 14, 2020

PR description:

DD4hep will transition to use geant4 units

PR validation:

convertCmToMm currently multiplies its input by 10. and the current value of dd4hep::mm is 0.1 therefore x / dd4hep::mm == convertCmToMm(x).

FYI: @cvuosalo

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32488/20395

  • This PR adds an extra 16KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32488/20396

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @vargasa (Andres Vargas) for master.

It involves the following packages:

Geometry/MTDNumberingBuilder
Geometry/TrackerNumberingBuilder

@civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please review it and eventually sign? Thanks.
@makortel, @JanFSchulte, @VinInn, @ebrondol, @mtosi, @fabiocos, @venturia this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

GeometricTimingDet::GeometricTimingDet(cms::DDFilteredView* fv, GeometricTimingEnumType type)
: trans_(fv->translation()),
: trans_(fv->translation() / dd4hep::mm),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this line been wrong up to now? Before your change, the translations were in cm. Was that a bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, before it was redefined a right after the initialization list

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it now. I missed it before. It looks correct.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vargasa thanks for taking care of this, according to the unit test (and my check also on the GeometryBuilder) everything looks unchanged and consistent

@@ -5,7 +5,7 @@
#include "CondFormats/GeometryObjects/interface/PGeometricTimingDet.h"

#include "CLHEP/Units/GlobalSystemOfUnits.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete this line 7. It should have been done long ago. Also requiring change is line 232:

Position pos(float(trans_.x() / cm), float(trans_.y() / cm), float(trans_.z() / cm));

It will become:

Position pos(float(trans_.x() / dd4hep::cm), float(trans_.y() / dd4hep::cm), float(trans_.z() / dd4hep::cm));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm: As of now cm is 10. and dd4hep::cm is 1. Therefore, applying the suggested change we would expect these quantities to increase by a factor of 10. and not remain the same. Is that correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I goofed. In CLHEP / cm means "convert from mm to cm", so the line should become:

Position pos(static_cast<float>(convertMmToCm(trans_.x()), static_cast<float>(convertMmToCm((trans_.y())), static_cast<float>(convertMmToCm((trans_.z())));

I don't think this line is related to DD4hep. It's confusing. The translation is initially converted to mm and then converted to cm for this position.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I think is done now 👍

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32488/20403

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #32488 was updated. @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please check and sign again.

@cvuosalo
Copy link
Contributor

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-392a04/11651/summary.html
CMSSW: CMSSW_11_3_X_2020-12-14-2300/slc7_amd64_gcc900

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2747284
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2747255
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 35 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 153 log files, 37 edm output root files, 36 DQM output files

@cvuosalo
Copy link
Contributor

+1

@vargasa
Copy link
Contributor Author

vargasa commented Dec 16, 2020 via email

@kpedro88
Copy link
Contributor

+upgrade

@cmsbuild
Copy link
Contributor

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)

@qliphy
Copy link
Contributor

qliphy commented Dec 17, 2020

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants