![]() |
Project
|
#include <VecGeomG4Map.h>
Public Member Functions | |
| void | build (TG4RootDetectorConstruction const &dc, bool flattenAssemblies) |
| G4VPhysicalVolume *const * | chain (int vgId, unsigned &size) const |
| vecgeom::VPlacedVolume const * | toVecGeom (int g4Id) const |
| std::vector< vecgeom::VPlacedVolume const * > const & | candidates (int g4Id) const |
| The placements that share an ambiguous Geant4 volume, to be told apart by their chains. | |
| bool | chainMatches (vecgeom::VPlacedVolume const *pv, G4VPhysicalVolume *const *first, std::size_t n) const |
| Whether a placement's chain is exactly the given run of Geant4 volumes. | |
| unsigned | chainSize (int vgId) const |
| How many Geant4 levels a VecGeom placement accounts for. | |
| vecgeom::VPlacedVolume const * | world () const |
| The outermost placement, standing for the Geant4 world volume. | |
| std::size_t | ambiguousCount () const |
| How many Geant4 volumes share more than one VecGeom placement. | |
| std::size_t | size () const |
Static Public Member Functions | |
| static vecgeom::VPlacedVolume const * | ambiguous () |
| Marks a Geant4 volume that several VecGeom placements reach. | |
The correspondence between the VecGeom tree tgeo2vecgeom built and the Geant4 tree g4root built. Both are conversions of the same TGeoNode hierarchy, but not necessarily level for level: with assembly flattening one VecGeom placement stands for a whole assembly subtree, so a placement maps to a chain of Geant4 physical volumes rather than to one. Pushing the whole chain is what keeps the Geant4 touchable at the depth the TGeo navigator produces, and hence keeps every volume id, copy number and CurrentVolOffName offset unchanged.
Without flattening every chain has length one. Lookups are vector indexing: VecGeom placed-volume ids and Geant4 physical-volume instance ids are both dense.
Definition at line 38 of file VecGeomG4Map.h.
|
inlinestatic |
Marks a Geant4 volume that several VecGeom placements reach.
Definition at line 65 of file VecGeomG4Map.h.
|
inline |
How many Geant4 volumes share more than one VecGeom placement.
Definition at line 104 of file VecGeomG4Map.h.
| void o2::simsetup::VecGeomG4Map::build | ( | TG4RootDetectorConstruction const & | dc, |
| bool | flattenAssemblies | ||
| ) |
Walks the TGeo hierarchy and pairs up the two conversions of it. Both must exist.
| flattenAssemblies | must match what the converter was told, since it decides how many TGeo nodes stand behind one VecGeom placement. |
Definition at line 118 of file VecGeomG4Map.cxx.
|
inline |
The placements that share an ambiguous Geant4 volume, to be told apart by their chains.
Definition at line 71 of file VecGeomG4Map.h.
|
inline |
The Geant4 volumes a VecGeom placement stands for, outermost first. A size of zero means the placement was never paired up, which is a bug rather than a legal state.
Definition at line 48 of file VecGeomG4Map.h.
|
inline |
Whether a placement's chain is exactly the given run of Geant4 volumes.
Definition at line 79 of file VecGeomG4Map.h.
|
inline |
How many Geant4 levels a VecGeom placement accounts for.
Definition at line 95 of file VecGeomG4Map.h.
|
inline |
Definition at line 106 of file VecGeomG4Map.h.
|
inline |
The VecGeom placement whose chain ends at the Geant4 volume g4Id. Null means that volume is only ever an intermediate assembly level, which flattening dissolved on the VecGeom side, so the walk extends past it. A plain vector index; the few Geant4 volumes reachable through more than one flattened chain answer ambiguous() and go to candidates().
Definition at line 62 of file VecGeomG4Map.h.
|
inline |
The outermost placement, standing for the Geant4 world volume.
Definition at line 101 of file VecGeomG4Map.h.