#include <G4TransportationManager.hh>
Definition at line 57 of file G4TransportationManager.hh.
G4TransportationManager::G4TransportationManager |
( |
| ) |
|
|
protected |
Definition at line 56 of file G4TransportationManager.cc.
58 if (fTransportationManager)
60 G4Exception(
"G4TransportationManager::G4TransportationManager()",
62 "Only ONE instance of G4TransportationManager is allowed!");
69 fNavigators.push_back(trackingNavigator);
70 fActiveNavigators.push_back(trackingNavigator);
void Activate(G4bool flag)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VPhysicalVolume * GetWorldVolume() const
G4TransportationManager::~G4TransportationManager |
( |
| ) |
|
|
protected |
Definition at line 82 of file G4TransportationManager.cc.
85 delete fPropagatorInField;
87 delete fGeomMessenger;
89 if (fTransportationManager)
91 delete fTransportationManager; fTransportationManager=0;
Definition at line 304 of file G4TransportationManager.cc.
306 std::vector<G4Navigator*>::iterator pNav =
307 std::find(fNavigators.begin(), fNavigators.end(), aNavigator);
308 if (pNav == fNavigators.end())
312 +
"- not found in memory!";
313 G4Exception(
"G4TransportationManager::ActivateNavigator()",
320 std::vector<G4Navigator*>::iterator pActiveNav;
321 for(pActiveNav=fActiveNavigators.begin();
322 pActiveNav!=fActiveNavigators.end(); pActiveNav++)
324 if (*pActiveNav == aNavigator) {
return id; }
328 fActiveNavigators.push_back(aNavigator);
const G4String & GetName() const
void Activate(G4bool flag)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VPhysicalVolume * GetWorldVolume() const
void G4TransportationManager::ClearParallelWorlds |
( |
| ) |
|
Definition at line 457 of file G4TransportationManager.cc.
459 std::vector<G4Navigator*>::iterator pNav = fNavigators.begin();
461 for (pNav=fNavigators.begin(); pNav!=fNavigators.end(); pNav++)
463 if (*pNav != trackingNavigator) {
delete *pNav; }
466 fActiveNavigators.clear();
470 fNavigators.push_back(trackingNavigator);
471 fActiveNavigators.push_back(trackingNavigator);
473 fWorlds.push_back(0);
void G4TransportationManager::DeActivateNavigator |
( |
G4Navigator * |
aNavigator | ) |
|
Definition at line 339 of file G4TransportationManager.cc.
341 std::vector<G4Navigator*>::iterator pNav =
342 std::find(fNavigators.begin(), fNavigators.end(), aNavigator);
343 if (pNav != fNavigators.end())
345 (*pNav)->Activate(
false);
351 +
"- not found in memory!";
352 G4Exception(
"G4TransportationManager::DeActivateNavigator()",
356 std::vector<G4Navigator*>::iterator pActiveNav =
357 std::find(fActiveNavigators.begin(), fActiveNavigators.end(), aNavigator);
358 if (pActiveNav != fActiveNavigators.end())
360 fActiveNavigators.erase(pActiveNav);
const G4String & GetName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VPhysicalVolume * GetWorldVolume() const
void G4TransportationManager::DeRegisterNavigator |
( |
G4Navigator * |
aNavigator | ) |
|
Definition at line 265 of file G4TransportationManager.cc.
267 if (aNavigator == fNavigators[0])
269 G4Exception(
"G4TransportationManager::DeRegisterNavigator()",
271 "The navigator for tracking CANNOT be deregistered!");
273 std::vector<G4Navigator*>::iterator pNav =
274 std::find(fNavigators.begin(), fNavigators.end(), aNavigator);
275 if (pNav != fNavigators.end())
279 DeRegisterWorld((*pNav)->GetWorldVolume());
283 fNavigators.erase(pNav);
289 +
"- not found in memory!";
290 G4Exception(
"G4TransportationManager::DeRegisterNavigator()",
const G4String & GetName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VPhysicalVolume * GetWorldVolume() const
std::vector<G4Navigator*>::iterator G4TransportationManager::GetActiveNavigatorsIterator |
( |
| ) |
|
|
inline |
Definition at line 189 of file G4TransportationManager.cc.
193 std::vector<G4Navigator*>::iterator pNav;
194 for (pNav=fNavigators.begin(); pNav!=fNavigators.end(); pNav++)
196 if ((*pNav)->GetWorldVolume()->GetName() == worldName) {
return *pNav; }
208 fNavigators.push_back(aNavigator);
213 =
"World volume with name -" + worldName
214 +
"- does not exist. Create it first by GetParallelWorld() method!";
215 G4Exception(
"G4TransportationManager::GetNavigator(name)",
G4VPhysicalVolume * IsWorldExisting(const G4String &worldName)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetWorldVolume(G4VPhysicalVolume *pWorld)
Definition at line 229 of file G4TransportationManager.cc.
231 std::vector<G4Navigator*>::iterator pNav;
232 for (pNav=fNavigators.begin(); pNav!=fNavigators.end(); pNav++)
234 if ((*pNav)->GetWorldVolume() == aWorld) {
return *pNav; }
237 std::vector<G4VPhysicalVolume*>::iterator pWorld =
238 std::find(fWorlds.begin(), fWorlds.end(), aWorld);
239 if (pWorld != fWorlds.end())
243 fNavigators.push_back(aNavigator);
248 =
"World volume with name -" + aWorld->
GetName()
249 +
"- does not exist. Create it first by GetParallelWorld() method!";
250 G4Exception(
"G4TransportationManager::GetNavigator(pointer)",
const G4String & GetName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetWorldVolume(G4VPhysicalVolume *pWorld)
G4Navigator* G4TransportationManager::GetNavigatorForTracking |
( |
| ) |
const |
|
inline |
size_t G4TransportationManager::GetNoActiveNavigators |
( |
| ) |
const |
|
inline |
size_t G4TransportationManager::GetNoWorlds |
( |
| ) |
const |
|
inline |
Definition at line 165 of file G4TransportationManager.cc.
175 wPV->GetTranslation(),
176 wLV, worldName, 0,
false, 0);
G4VPhysicalVolume * IsWorldExisting(const G4String &worldName)
G4Navigator * GetNavigatorForTracking() const
G4VSolid * GetSolid() const
G4LogicalVolume * GetLogicalVolume() const
G4bool RegisterWorld(G4VPhysicalVolume *aWorld)
G4VPhysicalVolume * GetWorldVolume() const
Definition at line 100 of file G4TransportationManager.cc.
102 if (!fTransportationManager)
106 return fTransportationManager;
G4TransportationManager()
std::vector<G4VPhysicalVolume*>::iterator G4TransportationManager::GetWorldsIterator |
( |
| ) |
|
|
inline |
void G4TransportationManager::InactivateAll |
( |
| ) |
|
Definition at line 370 of file G4TransportationManager.cc.
372 std::vector<G4Navigator*>::iterator pNav;
373 for (pNav=fActiveNavigators.begin(); pNav!=fActiveNavigators.end(); pNav++)
375 (*pNav)->Activate(
false);
377 fActiveNavigators.clear();
381 fNavigators[0]->Activate(
true);
382 fActiveNavigators.push_back(fNavigators[0]);
Definition at line 392 of file G4TransportationManager.cc.
394 std::vector<G4VPhysicalVolume*>::iterator pWorld = fWorlds.begin();
395 if (*pWorld==0) { *pWorld=fNavigators[0]->GetWorldVolume(); }
397 for (pWorld=fWorlds.begin(); pWorld!=fWorlds.end(); pWorld++)
399 if ((*pWorld)->GetName() ==
name ) {
return *pWorld; }
Definition at line 411 of file G4TransportationManager.cc.
415 std::vector<G4VPhysicalVolume*>::iterator pWorld =
416 std::find(fWorlds.begin(), fWorlds.end(), aWorld);
417 if (pWorld == fWorlds.end())
419 fWorlds.push_back(aWorld);
Definition at line 114 of file G4TransportationManager.cc.
116 fFieldManager = newFieldManager;
121 if( fPropagatorInField )
123 fPropagatorInField -> SetDetectorFieldManager( newFieldManager );
void G4TransportationManager::SetNavigatorForTracking |
( |
G4Navigator * |
newNavigator | ) |
|
Definition at line 133 of file G4TransportationManager.cc.
135 fNavigators[0] = newNavigator;
136 fActiveNavigators[0] = newNavigator;
void SetNavigatorForPropagating(G4Navigator *SimpleOrMultiNavigator)
The documentation for this class was generated from the following files: