Project
Loading...
Searching...
No Matches
o2::simsetup::VecGeomG4NavigatorBase Class Reference

#include <VecGeomG4NavigatorBase.h>

Inherits G4Navigator.

Inherited by o2::simsetup::VecGeomG4Navigator, and o2::simsetup::VecGeomG4PropagatingNavigator.

Protected Types

using V3 = vecgeom::Vector3D< double >
 

Protected Member Functions

 VecGeomG4NavigatorBase (VecGeomG4Map const &map)
 
G4VPhysicalVolume * historyFromState (vecgeom::NavigationState const &state)
 
bool stateFromHistory (vecgeom::NavigationState &state) const
 

Static Protected Member Functions

static V3 toVG (const G4ThreeVector &p)
 
static V3 toDir (const G4ThreeVector &d)
 
static bool directionLeaves (const V3 &n, const V3 &dir)
 
static bool directionLeaves (vecgeom::NavigationState const &exited, const V3 &point, const V3 &dir)
 The same, with the normal taken from exited, which has the volume left on top.
 

Protected Attributes

VecGeomG4Map const & mMap
 

Static Protected Attributes

static constexpr double kG4ToVG = 1. / CLHEP::cm
 
static constexpr double kVGToG4 = CLHEP::cm
 

Detailed Description

What the two VecGeom navigators share: the correspondence between a VecGeom navigation state and the Geant4 navigation history, which is the touchable the scoring code reads, and the unit conversion. Geant4 works in millimetres, the VecGeom geometry is converted from TGeo in centimetres; every point crossing this boundary is scaled, directions are not.

Definition at line 33 of file VecGeomG4NavigatorBase.h.

Member Typedef Documentation

◆ V3

using o2::simsetup::VecGeomG4NavigatorBase::V3 = vecgeom::Vector3D<double>
protected

Definition at line 36 of file VecGeomG4NavigatorBase.h.

Constructor & Destructor Documentation

◆ VecGeomG4NavigatorBase()

o2::simsetup::VecGeomG4NavigatorBase::VecGeomG4NavigatorBase ( VecGeomG4Map const &  map)
inlineexplicitprotected

Definition at line 40 of file VecGeomG4NavigatorBase.h.

Member Function Documentation

◆ directionLeaves() [1/2]

static bool o2::simsetup::VecGeomG4NavigatorBase::directionLeaves ( const V3 &  n,
const V3 &  dir 
)
inlinestaticprotected

Geant4's rule for the volume a track just left (G4NormalNavigation, G4VoxelNavigation): it is blocked only while the direction points away from it, along its outward normal n (global).

Definition at line 55 of file VecGeomG4NavigatorBase.h.

◆ directionLeaves() [2/2]

static bool o2::simsetup::VecGeomG4NavigatorBase::directionLeaves ( vecgeom::NavigationState const &  exited,
const V3 &  point,
const V3 &  dir 
)
inlinestaticprotected

The same, with the normal taken from exited, which has the volume left on top.

Definition at line 62 of file VecGeomG4NavigatorBase.h.

◆ historyFromState()

G4VPhysicalVolume * o2::simsetup::VecGeomG4NavigatorBase::historyFromState ( vecgeom::NavigationState const &  state)
protected

Rewrites fHistory to stand for state, keeping the levels it already has right. Returns the top volume, or null if the state is outside the world.

Definition at line 31 of file VecGeomG4NavigatorBase.cxx.

◆ stateFromHistory()

bool o2::simsetup::VecGeomG4NavigatorBase::stateFromHistory ( vecgeom::NavigationState &  state) const
protected

Builds state from fHistory, extending past the Geant4 levels assembly flattening dissolved. False if a level matches no VecGeom placement; state is then empty.

Definition at line 83 of file VecGeomG4NavigatorBase.cxx.

◆ toDir()

static V3 o2::simsetup::VecGeomG4NavigatorBase::toDir ( const G4ThreeVector &  d)
inlinestaticprotected

Definition at line 43 of file VecGeomG4NavigatorBase.h.

◆ toVG()

static V3 o2::simsetup::VecGeomG4NavigatorBase::toVG ( const G4ThreeVector &  p)
inlinestaticprotected

Definition at line 42 of file VecGeomG4NavigatorBase.h.

Member Data Documentation

◆ kG4ToVG

constexpr double o2::simsetup::VecGeomG4NavigatorBase::kG4ToVG = 1. / CLHEP::cm
staticconstexprprotected

Definition at line 37 of file VecGeomG4NavigatorBase.h.

◆ kVGToG4

constexpr double o2::simsetup::VecGeomG4NavigatorBase::kVGToG4 = CLHEP::cm
staticconstexprprotected

Definition at line 38 of file VecGeomG4NavigatorBase.h.

◆ mMap

VecGeomG4Map const& o2::simsetup::VecGeomG4NavigatorBase::mMap
protected

Definition at line 78 of file VecGeomG4NavigatorBase.h.


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