G4Root Version 6.6
Loading...
Searching...
No Matches
TG4RootNavMgr Class Reference

Manager class creating a G4Navigator based on a ROOT geometry. More...

#include <TG4RootNavMgr.h>

Inheritance diagram for TG4RootNavMgr:

Public Member Functions

virtual ~TG4RootNavMgr ()
 
Bool_t ConnectToG4 ()
 
void Initialize (TVirtualUserPostDetConstruction *sdinit=0, Int_t nthreads=1)
 
void LocateGlobalPointAndSetup (Double_t *pt, Double_t *dir=0)
 
void PrintG4State () const
 
void SetVerboseLevel (Int_t level)
 
void SetNavigator (TG4RootNavigator *nav)
 
TG4RootNavigatorGetNavigator () const
 Return the G4 navigator working with TGeo.
 
TG4RootDetectorConstructionGetDetConstruction () const
 Return the G4 geometry built based on ROOT one.
 
void SetG4TrackingManager (G4TrackingManager *trackingManager)
 Forward current G4TrackingManager.
 
void SetGeometryRestoreFunction (std::function< Bool_t(Int_t)> restoreGeoStateFunction)
 Forward the given function to the TG4RootNavigator.
 

Static Public Member Functions

static TG4RootNavMgrGetInstance (TGeoManager *geom=0)
 
static TG4RootNavMgrGetInstance (const TG4RootNavMgr &navMgr)
 
static TG4RootNavMgrGetMasterInstance ()
 

Protected Member Functions

 TG4RootNavMgr ()
 
 TG4RootNavMgr (TGeoManager *geom, TG4RootDetectorConstruction *detConstruction=0)
 

Protected Attributes

TGeoManager * fGeometry
 Pointer to TGeo geometry.
 
TG4RootNavigatorfNavigator
 G4 navigator working with TGeo.
 
TG4RootDetectorConstructionfDetConstruction
 
TVirtualUserPostDetConstructionfPostDetDetConstruction
 
Bool_t fConnected
 Flags connection to G4.
 

Static Private Attributes

static G4ThreadLocal TG4RootNavMgrfRootNavMgr = 0
 
static TG4RootNavMgrfgMasterInstance = 0
 

Detailed Description

Manager class creating a G4Navigator based on a ROOT geometry.

Author
A. Gheata; CERN

Definition at line 36 of file TG4RootNavMgr.h.

Constructor & Destructor Documentation

◆ TG4RootNavMgr() [1/2]

TG4RootNavMgr::TG4RootNavMgr ( )
protected

Dummy ctor.

Definition at line 35 of file TG4RootNavMgr.cxx.

Referenced by GetInstance(), and GetInstance().

◆ TG4RootNavMgr() [2/2]

TG4RootNavMgr::TG4RootNavMgr ( TGeoManager * geom,
TG4RootDetectorConstruction * detConstruction = 0 )
protected

Default ctor.

Definition at line 46 of file TG4RootNavMgr.cxx.

◆ ~TG4RootNavMgr()

TG4RootNavMgr::~TG4RootNavMgr ( )
virtual

Destructor.

Definition at line 65 of file TG4RootNavMgr.cxx.

Member Function Documentation

◆ GetInstance() [1/2]

TG4RootNavMgr * TG4RootNavMgr::GetInstance ( TGeoManager * geom = 0)
static

Get the pointer to the singleton. If none, create one based on 'geom'.

Definition at line 79 of file TG4RootNavMgr.cxx.

Referenced by TG4RootDetectorConstruction::Construct().

◆ GetInstance() [2/2]

TG4RootNavMgr * TG4RootNavMgr::GetInstance ( const TG4RootNavMgr & navMgr)
static

Get the pointer to the singleton. If none, create one based on 'geom'.

Definition at line 95 of file TG4RootNavMgr.cxx.

◆ GetMasterInstance()

TG4RootNavMgr * TG4RootNavMgr::GetMasterInstance ( )
static

Get master instance

Definition at line 109 of file TG4RootNavMgr.cxx.

◆ ConnectToG4()

Bool_t TG4RootNavMgr::ConnectToG4 ( )

Connect detector construction class to G4 run manager.

Definition at line 116 of file TG4RootNavMgr.cxx.

◆ Initialize()

void TG4RootNavMgr::Initialize ( TVirtualUserPostDetConstruction * sdinit = 0,
Int_t nthreads = 1 )

Construct G4 geometry based on TGeo geometry.

Definition at line 175 of file TG4RootNavMgr.cxx.

◆ LocateGlobalPointAndSetup()

void TG4RootNavMgr::LocateGlobalPointAndSetup ( Double_t * pt,
Double_t * dir = 0 )

Test the corresponding navigation method.

Definition at line 185 of file TG4RootNavMgr.cxx.

◆ PrintG4State()

void TG4RootNavMgr::PrintG4State ( ) const

Print current G4 state.

Definition at line 207 of file TG4RootNavMgr.cxx.

◆ SetVerboseLevel()

void TG4RootNavMgr::SetVerboseLevel ( Int_t level)

Set navigator verbosity level.

Definition at line 200 of file TG4RootNavMgr.cxx.

◆ SetNavigator()

void TG4RootNavMgr::SetNavigator ( TG4RootNavigator * nav)

Connect a navigator to G4.

Definition at line 148 of file TG4RootNavMgr.cxx.

Referenced by TG4RootNavMgr().

◆ GetNavigator()

TG4RootNavigator * TG4RootNavMgr::GetNavigator ( ) const
inline

Return the G4 navigator working with TGeo.

Definition at line 74 of file TG4RootNavMgr.h.

Referenced by TG4RootDetectorConstruction::Construct().

◆ GetDetConstruction()

TG4RootDetectorConstruction * TG4RootNavMgr::GetDetConstruction ( ) const
inline

Return the G4 geometry built based on ROOT one.

Definition at line 76 of file TG4RootNavMgr.h.

◆ SetG4TrackingManager()

void TG4RootNavMgr::SetG4TrackingManager ( G4TrackingManager * trackingManager)

Forward current G4TrackingManager.

Definition at line 215 of file TG4RootNavMgr.cxx.

◆ SetGeometryRestoreFunction()

void TG4RootNavMgr::SetGeometryRestoreFunction ( std::function< Bool_t(Int_t)> restoreGeoStateFunction)

Forward the given function to the TG4RootNavigator.

Definition at line 221 of file TG4RootNavMgr.cxx.

Member Data Documentation

◆ fGeometry

TGeoManager* TG4RootNavMgr::fGeometry
protected

Pointer to TGeo geometry.

Definition at line 40 of file TG4RootNavMgr.h.

Referenced by GetInstance().

◆ fNavigator

TG4RootNavigator* TG4RootNavMgr::fNavigator
protected

◆ fDetConstruction

TG4RootDetectorConstruction* TG4RootNavMgr::fDetConstruction
protected

G4 geometry built based on ROOT one

Definition at line 42 of file TG4RootNavMgr.h.

Referenced by ConnectToG4(), GetDetConstruction(), GetInstance(), Initialize(), TG4RootNavMgr(), and ~TG4RootNavMgr().

◆ fPostDetDetConstruction

TVirtualUserPostDetConstruction* TG4RootNavMgr::fPostDetDetConstruction
protected

User defined initialization

Definition at line 44 of file TG4RootNavMgr.h.

◆ fConnected

Bool_t TG4RootNavMgr::fConnected
protected

Flags connection to G4.

Definition at line 46 of file TG4RootNavMgr.h.

Referenced by ConnectToG4(), and SetNavigator().

◆ fRootNavMgr

G4ThreadLocal TG4RootNavMgr * TG4RootNavMgr::fRootNavMgr = 0
staticprivate

Static pointer to singleton

Definition at line 53 of file TG4RootNavMgr.h.

Referenced by GetInstance(), GetInstance(), and ~TG4RootNavMgr().

◆ fgMasterInstance

TG4RootNavMgr * TG4RootNavMgr::fgMasterInstance = 0
staticprivate

Definition at line 55 of file TG4RootNavMgr.h.

Referenced by GetInstance(), GetInstance(), GetMasterInstance(), and ~TG4RootNavMgr().


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