Celeritas 0.7-develop+ddcb429
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
celeritas::g4org::ProtoConstructor Class Reference

Recursively build ORANGE proto-universes from a LogicalVolume . More...

#include <ProtoConstructor.hh>

Public Types

Type aliases
using SPConstObject = std::shared_ptr< orangeinp::ObjectInterface const >
 
using ObjLv = std::pair< SPConstObject, LogicalVolume const * >
 
using SPUnitProto = std::shared_ptr< UnitProto >
 
using Input = inp::OrangeGeoFromGeant
 

Public Member Functions

 ProtoConstructor (VolumeParams const &vols, Input const &options)
 Construct with volume parameters and options.
 
SPUnitProto operator() (LogicalVolume const &)
 Construct a proto-universe from a logical volume.
 

Detailed Description

Recursively build ORANGE proto-universes from a LogicalVolume .

The input to this function is the output of LogicalVolumeConverter . This class is responsible for "placing" the converted PhysicalVolume by transforming its children. Depending on heuristics, the children are directly inserted into a UnitProto as volumes (specifically, the logical volume becomes a UnitProto::MaterialInput), or a LogicalVolume is turned into a new UnitProto that can be used in multiple locations.

Both "material" entries and "daughter" entries are labeled with the corresponding VolumeInstanceId. Multiple levels of volumes in the geometry hierarchy can be expanded into a single proto, so the local_parent field is set for every "material" entry created: the enclosing material entry ID normally, or an empty material entry if the volume is placed directly in the "background".

If a logical volume is listed in OrangeGeoFromGeant::universe_alignment , it is constructed in a frame rotated by the given matrix so that its daughters are axis-aligned (to improve acceleration performance). This is done by applying the rotation to the local volume's boundary and all daughters, and applying the inverse rotation to its placement in its parent parent. Note that this operation does not change the physical geometry, only how it is represented computationally.

Volumes can also be aligned automatically. If a volume has at least align_daughter_threshold daughters, and at least the fraction align_daughter_fraction of them have the same rotation (and that rotation is not already axis-aligned) the inverse of that rotation is then used for alignment. Explicit entries in universe_alignment take precedence.

Member Function Documentation

◆ operator()()

auto celeritas::g4org::ProtoConstructor::operator() ( LogicalVolume const &  lv)

Construct a proto-universe from a logical volume.

We can use logical volume for the structure, but we need to associate the world physical volume ID.

If the volume is aligned, its boundary and daughters are rotated into the aligned frame.


The documentation for this class was generated from the following files: