source: trunk/source/geometry/navigation/include/G4TransportationManager.icc@ 1243

Last change on this file since 1243 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

File size: 5.5 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4TransportationManager.icc,v 1.10 2007/04/20 15:28:37 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-03 $
29// ------------------------------------------------------------
30// GEANT 4 inlined function members implementation
31// ------------------------------------------------------------
32//
33// Created : 10 March 1997, J. Apostolakis
34// Reviewed: 26 April 2006, G. Cosmo
35//
36// ----------------------------------------------------------------------------
37
38// ----------------------------------------------------------------------------
39// GetNavigatorForTracking()
40//
41// Utility method to return the active navigator for tracking, always
42// the first in the collection of registered navigators.
43//
44inline
45G4Navigator* G4TransportationManager::GetNavigatorForTracking() const
46{
47 return fNavigators[0];
48}
49
50// ----------------------------------------------------------------------------
51// SetWorldForTracking()
52//
53// Set the tracking world volume.
54// This method is to be invoked by G4RunManagerKernel.
55//
56inline
57void G4TransportationManager::SetWorldForTracking(G4VPhysicalVolume* theWorld)
58{
59 fWorlds[0] = theWorld;
60 fNavigators[0]->SetWorldVolume(theWorld);
61}
62
63// ----------------------------------------------------------------------------
64// SetNavigatorForTracking()
65//
66// Set the active navigator for tracking, always
67// the first in the collection of registered navigators.
68//
69inline
70void G4TransportationManager::SetNavigatorForTracking(G4Navigator* newNavigator)
71{
72 fNavigators[0] = newNavigator;
73}
74
75// ----------------------------------------------------------------------------
76// GetPropagatorInField()
77//
78// Return the associated propagator in field.
79//
80inline
81G4PropagatorInField* G4TransportationManager::GetPropagatorInField() const
82{
83 return fPropagatorInField;
84}
85
86// ----------------------------------------------------------------------------
87// SetPropagatorInField()
88//
89// Set the associated propagator in field.
90//
91inline
92void G4TransportationManager::
93SetPropagatorInField( G4PropagatorInField* newFieldPropagator )
94{
95 fPropagatorInField = newFieldPropagator;
96}
97
98// ----------------------------------------------------------------------------
99// GetFieldManager()
100//
101// Return the associated field manager.
102//
103inline
104G4FieldManager* G4TransportationManager::GetFieldManager() const
105{
106 return fFieldManager;
107}
108
109// ----------------------------------------------------------------------------
110// GetNoActiveNavigators()
111//
112// Return the number of active navigators.
113//
114inline
115size_t G4TransportationManager::GetNoActiveNavigators() const
116{
117 return fActiveNavigators.size();
118}
119
120// ----------------------------------------------------------------------------
121// GetActiveNavigatorsIterator()
122//
123// Return an iterator to the list of active navigators.
124//
125inline
126std::vector<G4Navigator*>::iterator
127G4TransportationManager::GetActiveNavigatorsIterator()
128{
129 std::vector<G4Navigator*>::iterator iterator
130 = std::vector<G4Navigator*>::iterator(fActiveNavigators.begin());
131 return iterator;
132}
133
134// ----------------------------------------------------------------------------
135// GetNoWorlds()
136//
137// Return the number of registerd worlds.
138//
139inline
140size_t G4TransportationManager::GetNoWorlds() const
141{
142 return fWorlds.size();
143}
144
145// ----------------------------------------------------------------------------
146// GetWorldsIterator()
147//
148// Return an iterator to the list of registered worlds.
149//
150inline
151std::vector<G4VPhysicalVolume*>::iterator
152G4TransportationManager::GetWorldsIterator()
153{
154 std::vector<G4VPhysicalVolume*>::iterator iterator
155 = std::vector<G4VPhysicalVolume*>::iterator(fWorlds.begin());
156 return iterator;
157}
158
159// ----------------------------------------------------------------------------
160// GetSafetyHelper()
161//
162// Return pointer to the created navigation safety helper instance.
163//
164inline
165G4SafetyHelper* G4TransportationManager::GetSafetyHelper() const
166{
167 return fSafetyHelper;
168}
Note: See TracBrowser for help on using the repository browser.