G4Root Version 6.6
|
Manager class creating a G4Navigator based on a ROOT geometry. More...
#include <TG4RootNavMgr.h>
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) |
TG4RootNavigator * | GetNavigator () const |
Return the G4 navigator working with TGeo. | |
TG4RootDetectorConstruction * | GetDetConstruction () 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 TG4RootNavMgr * | GetInstance (TGeoManager *geom=0) |
static TG4RootNavMgr * | GetInstance (const TG4RootNavMgr &navMgr) |
static TG4RootNavMgr * | GetMasterInstance () |
Protected Member Functions | |
TG4RootNavMgr () | |
TG4RootNavMgr (TGeoManager *geom, TG4RootDetectorConstruction *detConstruction=0) | |
Protected Attributes | |
TGeoManager * | fGeometry |
Pointer to TGeo geometry. | |
TG4RootNavigator * | fNavigator |
G4 navigator working with TGeo. | |
TG4RootDetectorConstruction * | fDetConstruction |
TVirtualUserPostDetConstruction * | fPostDetDetConstruction |
Bool_t | fConnected |
Flags connection to G4. | |
Static Private Attributes | |
static G4ThreadLocal TG4RootNavMgr * | fRootNavMgr = 0 |
static TG4RootNavMgr * | fgMasterInstance = 0 |
Manager class creating a G4Navigator based on a ROOT geometry.
Definition at line 36 of file TG4RootNavMgr.h.
|
protected |
Dummy ctor.
Definition at line 35 of file TG4RootNavMgr.cxx.
Referenced by GetInstance(), and GetInstance().
|
protected |
Default ctor.
Definition at line 46 of file TG4RootNavMgr.cxx.
|
virtual |
Destructor.
Definition at line 65 of file TG4RootNavMgr.cxx.
|
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().
|
static |
Get the pointer to the singleton. If none, create one based on 'geom'.
Definition at line 95 of file TG4RootNavMgr.cxx.
|
static |
Get master instance
Definition at line 109 of file TG4RootNavMgr.cxx.
Bool_t TG4RootNavMgr::ConnectToG4 | ( | ) |
Connect detector construction class to G4 run manager.
Definition at line 116 of file TG4RootNavMgr.cxx.
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.
void TG4RootNavMgr::LocateGlobalPointAndSetup | ( | Double_t * | pt, |
Double_t * | dir = 0 ) |
Test the corresponding navigation method.
Definition at line 185 of file TG4RootNavMgr.cxx.
void TG4RootNavMgr::PrintG4State | ( | ) | const |
Print current G4 state.
Definition at line 207 of file TG4RootNavMgr.cxx.
void TG4RootNavMgr::SetVerboseLevel | ( | Int_t | level | ) |
Set navigator verbosity level.
Definition at line 200 of file TG4RootNavMgr.cxx.
void TG4RootNavMgr::SetNavigator | ( | TG4RootNavigator * | nav | ) |
Connect a navigator to G4.
Definition at line 148 of file TG4RootNavMgr.cxx.
Referenced by TG4RootNavMgr().
|
inline |
Return the G4 navigator working with TGeo.
Definition at line 74 of file TG4RootNavMgr.h.
Referenced by TG4RootDetectorConstruction::Construct().
|
inline |
Return the G4 geometry built based on ROOT one.
Definition at line 76 of file TG4RootNavMgr.h.
void TG4RootNavMgr::SetG4TrackingManager | ( | G4TrackingManager * | trackingManager | ) |
Forward current G4TrackingManager.
Definition at line 215 of file TG4RootNavMgr.cxx.
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.
|
protected |
Pointer to TGeo geometry.
Definition at line 40 of file TG4RootNavMgr.h.
Referenced by GetInstance().
|
protected |
G4 navigator working with TGeo.
Definition at line 41 of file TG4RootNavMgr.h.
Referenced by ConnectToG4(), GetNavigator(), LocateGlobalPointAndSetup(), PrintG4State(), SetG4TrackingManager(), SetGeometryRestoreFunction(), SetNavigator(), and SetVerboseLevel().
|
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().
|
protected |
User defined initialization
Definition at line 44 of file TG4RootNavMgr.h.
|
protected |
Flags connection to G4.
Definition at line 46 of file TG4RootNavMgr.h.
Referenced by ConnectToG4(), and SetNavigator().
|
staticprivate |
Static pointer to singleton
Definition at line 53 of file TG4RootNavMgr.h.
Referenced by GetInstance(), GetInstance(), and ~TG4RootNavMgr().
|
staticprivate |
Definition at line 55 of file TG4RootNavMgr.h.
Referenced by GetInstance(), GetInstance(), GetMasterInstance(), and ~TG4RootNavMgr().