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

Implement isA() operation on solids. Add TGeoCtub translation to Geant4. #584

Merged
merged 7 commits into from
Oct 21, 2019

Conversation

MarkusFrankATcernch
Copy link
Contributor

@MarkusFrankATcernch MarkusFrankATcernch commented Oct 18, 2019

BEGINRELEASENOTES

  • Add function bool isInstance(const Handle<TGeoShape>& solid)
    • compares types of shapes and behaves like dynamic_cast, similar to python's isinstance(obj,type)
    • remove deprecated function instanceOf in favour of isInstance. Same behavior.
  • Add function bool isA(const Handle<TGeoShape>& solid)
    • compares types of shapes and requires exact match, no polymorphism allowed.
  • Add Geant4 conversion for shape TGeoCtub -> G4CutTube

ENDRELEASENOTES

z.reserve(nz);
polygon.reserve(nz);
for(size_t i=0; i<nz; ++i) {
z.emplace_back(G4ExtrudedSolid::ZSection(sh->GetZ(i) * CM_2_MM,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
z.emplace_back(G4ExtrudedSolid::ZSection(sh->GetZ(i) * CM_2_MM,
z.emplace_back(sh->GetZ(i) * CM_2_MM,

MarkusFrankATcernch and others added 5 commits October 18, 2019 18:35
Co-Authored-By: Andre Sailer <andre.philippe.sailer@cern.ch>
Co-Authored-By: Andre Sailer <andre.philippe.sailer@cern.ch>
Co-Authored-By: Andre Sailer <andre.philippe.sailer@cern.ch>
Co-Authored-By: Andre Sailer <andre.philippe.sailer@cern.ch>
Co-Authored-By: Andre Sailer <andre.philippe.sailer@cern.ch>
@ianna
Copy link
Contributor

ianna commented Oct 19, 2019

@mrodozov - FYI, we'll need this update

@mrodozov
Copy link
Contributor

@ianna -> cms-sw/cmsdist#5285

@MarkusFrankATcernch MarkusFrankATcernch merged commit 3cbe0dc into AIDASoft:master Oct 21, 2019
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.

5 participants