Project
Loading...
Searching...
No Matches
o2::base::TGeoGeometryUtils Class Reference

A few utility functions to operate on TGeo geometries (transformations, printing, ...) More...

#include <TGeoGeometryUtils.h>

Static Public Member Functions

static TGeoTessellated * TGeoShapeToTGeoTessellated (TGeoShape const *)
 < Transform any (primitive) TGeoShape to a tessellated representation
 
static void makeHalfSpaceBox (const char *name, const double p[3], const double n[3], double reach)
 

Detailed Description

A few utility functions to operate on TGeo geometries (transformations, printing, ...)

Definition at line 28 of file TGeoGeometryUtils.h.

Member Function Documentation

◆ makeHalfSpaceBox()

void o2::base::TGeoGeometryUtils::makeHalfSpaceBox ( const char name,
const double  p[3],
const double  n[3],
double  reach 
)
static

Definition at line 149 of file TGeoGeometryUtils.cxx.

◆ TGeoShapeToTGeoTessellated()

TGeoTessellated * o2::base::TGeoGeometryUtils::TGeoShapeToTGeoTessellated ( TGeoShape const *  shape)
static

< Transform any (primitive) TGeoShape to a tessellated representation

Bounded stand-in for a TGeoHalfSpace.

Create a bounded stand-in for the half-space { x : (x - p) . n <= 0 }, which is what TGeoHalfSpace describes. Registers a cube of half-size reach under name and its placement under "<name>_tr". The stand-in agrees with the half-space everywhere within a distance reach of p, so reach must exceed the extent of the solid it is subtracted from. Unlike TGeoHalfSpace, the result can be exported to GDML and converted to native Geant4 geometry.

Write the term in a composite expression in parentheses, as "-(<name>:<name>_tr)". A trailing "shape:matrix" is not safe: TGeoManager::Parse takes the last top-level ":" of an expression that already contains a top-level ")" to be a transformation of the whole expression, warns "no geometrical transformation allowed at this level" and then drops it - leaving an unplaced cube at the origin that swallows the parent solid.

< Transform any (primitive) TGeoShape to a TGeoTessellated. Display and export only: TGeoTessellated does not navigate (it is tracked as its bounding box); use O2Tessellated for transport.

Definition at line 141 of file TGeoGeometryUtils.cxx.


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