Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::g4org::Transformer Class Reference

Return an ORANGE transformation from a Geant4 transformation. More...

#include <Transformer.hh>

Public Types

Type aliases
using Real3 = Array< double, 3 >
 

Public Member Functions

 Transformer (Scaler const &scale)
 Construct with a scaling function.
 
Translation operator() (G4ThreeVector const &t) const
 Create a transform from a translation.
 
Transformation operator() (G4RotationMatrix const &rot) const
 
Transformation operator() (G4ThreeVector const &t, G4RotationMatrix const &rot) const
 Create a transform from a translation plus rotation.
 
VariantTransform operator() (G4ThreeVector const &t, G4RotationMatrix const *rot) const
 
Transformation operator() (G4AffineTransform const &at) const
 Create a transform from an affine transform. More...
 

Detailed Description

Return an ORANGE transformation from a Geant4 transformation.

In Geant4, "object" or "direct" transform refers to daughter-to-parent, how to place the daughter object in the parent. The "frame" transform (raw GetTransform or the fPtrTransform object) is how to transform from parent to daughter and is the inverse of that transform.

Even though the affine transform's matrix has a operator() which does a matrix-vector multiply (aka gemv), this is not the same as the affine transform's rotation, which applies the inverse of the stored matrix.

All ORANGE/Celeritas transforms are "daughter to parent". The transforms returned from this function must be daughter-to-parent!

Member Function Documentation

◆ operator()()

auto celeritas::g4org::Transformer::operator() ( G4AffineTransform const &  affine) const
inline

Create a transform from an affine transform.

The affine transform's stored rotation matrix is inverted!


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