Uploaded image for project: 'VecGeom'
  1. VecGeom
  2. VECGEOM-494

Allow volume/shape specialization through non-child classes

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • None
    • None
    • volumes
    • None

    Description

      I would like to improve our factory mechanism for unplaced volumes "A" in the sense that
      the factory should be able to give back specialized volumes (that behave like) B although B is not an A in the C++ class sense.

      Details:

      So far specialization was only possible for volume types which are related by inheritance.
      We could create a FullTube when we asked for a Tube because we have a type FullTube which "is-a" Tube.

      Sometimes, the situation is different. For example, a trap might under certain circumstances be a box. However, a box is not a trap (in the C++ class layout) and it would be cumbersome to restructure the class layout.

      Idea:

      We can solve the problem by automatically creating subtypes of trap that behave like a box.
      Hence we look for a mechanism to create `UnplacedImplAs<A,B>` which signify
      a type that "is-a" A but that is optimized by using "B".

      Attachments

        Activity

          People

            swenzel Sandro Christian Wenzel
            swenzel Sandro Christian Wenzel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual Start:
              Actual End: