Giter Site home page Giter Site logo

Comments (5)

sawenzel avatar sawenzel commented on August 25, 2024 1

From discussions with the VecGeom team it sounds like we might be able to reduce the displaced solids to regular solids by propagating the displacement into the "placement" of the physical volumes.

Yes, that's a good idea. In Geant4 a boolean has 2 logical volumes as members whereas in VecGeom there are 2 placed volumes. A logical displaced volume should be straightforwardly convertible.

from celeritas.

sawenzel avatar sawenzel commented on August 25, 2024 1

Since you have the code already I would say just go ahead -:)

I believe the assumption might be based on some documentation but potentially the gdml converter or some other unit does not seem to respect it.

from celeritas.

sawenzel avatar sawenzel commented on August 25, 2024 1

I made a PR with the replica treatment. Feel free to use it or take it as inspiration. I am now locally able to convert my test geometry.

from celeritas.

sawenzel avatar sawenzel commented on August 25, 2024

@sethrj : After inspection of the conversion code, I believe you should already be doing the right thing. But there might be a wrong assumption that only the second volume could be a displaced volume. In fact, after switching on assertations, I see:

.../app/celer-g4/celer-g4.cc:297: critical: While running input_gun.json: celeritas/ext/g4vg/SolidConverter.cc:696:
celeritas: Geant4 error: celer0001 failed:
    precondition failed: !dynamic_cast<G4DisplacedSolid const*>(solids[0])

So simply extending the treatment to the first volume might be enough. Shall I provide a PR?

from celeritas.

sethrj avatar sethrj commented on August 25, 2024

@sawenzel Yes that was an assumption inherited from an earlier version of the vecgeom->Geant4 converter. I actually just found the same thing and am about to submit the PR! Thanks though. If you'd like to add the PV expansion we'd love to include your contribution 😄

from celeritas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.