Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
This adds the code to convert an ORANGE LogicalVolume hierarchy into a hierarchy of UnitProtos. Since Geant4 has no distinction between LogicalVolumes with and without children, we have a couple of heuristics to construct a universe hierarchy from these.
If a logical volume has no children, simply place it as a volume in its parent(s) as a material.
If a logical volume is used only once, it's probably meant for acceleration or convenience, and we don't have to make a universe from it; we can just make a volume. Construct a volume by subtracting its children and place it as a material.
Otherwise (or for the "world" volume), create a new UnitProto corresponding to the logical volume.
If a logical volume corresponding to a proto-universe has 2 or fewer children, construct an explicit "background" volume by subtracting out the daughters. Otherwise, use a "background" fill.
The choice of 2 is somewhat arbitrary but it provides a good value for testing; we can make it user-configurable if desired (right now it's a static constexpr value). The tradeoff is that transporting on a background volume may be more expensive than doing an explicit volume. That may change if we implement BVH/BIH tracking to accelerate tracking.
In the future we can look at further accelerating construction by merging volumes within the same region that have the same material. The ALICE ZDC components look like they have lots of ROOT-constructed "bounding boxes" that are inlined.
This adds the code to convert an ORANGE
LogicalVolume
hierarchy into a hierarchy ofUnitProto
s. Since Geant4 has no distinction between LogicalVolumes with and without children, we have a couple of heuristics to construct a universe hierarchy from these.volume
in its parent(s) as a material.The choice of 2 is somewhat arbitrary but it provides a good value for testing; we can make it user-configurable if desired (right now it's a
static constexpr
value). The tradeoff is that transporting on abackground
volume may be more expensive than doing an explicit volume. That may change if we implement BVH/BIH tracking to accelerate tracking.In the future we can look at further accelerating construction by merging volumes within the same region that have the same material. The ALICE ZDC components look like they have lots of ROOT-constructed "bounding boxes" that are inlined.