G4TransportationManager.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 // ------------------------------------------------------------
00029 //  GEANT 4  inlined function members implementation
00030 // ------------------------------------------------------------
00031 //
00032 // Created :  10 March 1997, J. Apostolakis
00033 // Reviewed:  26 April 2006, G. Cosmo
00034 //  
00035 // ----------------------------------------------------------------------------
00036 
00037 // ----------------------------------------------------------------------------
00038 // GetNavigatorForTracking()
00039 //
00040 // Utility method to return the active navigator for tracking, always
00041 // the first in the collection of registered navigators.
00042 //
00043 inline
00044 G4Navigator* G4TransportationManager::GetNavigatorForTracking() const
00045 {
00046    return fNavigators[0];
00047 }
00048 
00049 // ----------------------------------------------------------------------------
00050 // SetWorldForTracking()
00051 //
00052 // Set the tracking world volume.
00053 // This method is to be invoked by G4RunManagerKernel.
00054 //
00055 inline 
00056 void G4TransportationManager::SetWorldForTracking(G4VPhysicalVolume* theWorld)
00057 {
00058    fWorlds[0] = theWorld;
00059    fNavigators[0]->SetWorldVolume(theWorld);
00060 }
00061 
00062 // ----------------------------------------------------------------------------
00063 // SetNavigatorForTracking()
00064 //
00065 // Set the active navigator for tracking, always
00066 // the first in the collection of registered navigators.
00067 //
00068 inline
00069 void G4TransportationManager::SetNavigatorForTracking(G4Navigator* newNavigator)
00070 {
00071    fNavigators[0] = newNavigator;
00072 }
00073 
00074 // ----------------------------------------------------------------------------
00075 // GetPropagatorInField()
00076 //
00077 // Return the associated propagator in field.
00078 //
00079 inline
00080 G4PropagatorInField* G4TransportationManager::GetPropagatorInField() const
00081 {
00082    return fPropagatorInField;
00083 }
00084 
00085 // ----------------------------------------------------------------------------
00086 // SetPropagatorInField()
00087 //
00088 // Set the associated propagator in field.
00089 //
00090 inline
00091 void G4TransportationManager::
00092 SetPropagatorInField( G4PropagatorInField* newFieldPropagator )
00093 {
00094    fPropagatorInField = newFieldPropagator;
00095 }
00096 
00097 // ----------------------------------------------------------------------------
00098 // GetFieldManager()
00099 //
00100 // Return the associated field manager.
00101 //
00102 inline
00103 G4FieldManager* G4TransportationManager::GetFieldManager() const
00104 {
00105    return fFieldManager;
00106 }
00107 
00108 // ----------------------------------------------------------------------------
00109 // GetNoActiveNavigators()
00110 //
00111 // Return the number of active navigators.
00112 //
00113 inline
00114 size_t G4TransportationManager::GetNoActiveNavigators() const
00115 {
00116    return fActiveNavigators.size();
00117 }
00118 
00119 // ----------------------------------------------------------------------------
00120 // GetActiveNavigatorsIterator()
00121 //
00122 // Return an iterator to the list of active navigators.
00123 //
00124 inline
00125 std::vector<G4Navigator*>::iterator
00126 G4TransportationManager::GetActiveNavigatorsIterator()
00127 {
00128    std::vector<G4Navigator*>::iterator iterator
00129      = std::vector<G4Navigator*>::iterator(fActiveNavigators.begin());
00130    return iterator;
00131 }
00132 
00133 // ----------------------------------------------------------------------------
00134 // GetNoWorlds()
00135 //
00136 // Return the number of registerd worlds.
00137 //
00138 inline
00139 size_t G4TransportationManager::GetNoWorlds() const
00140 {
00141    return fWorlds.size();
00142 }
00143 
00144 // ----------------------------------------------------------------------------
00145 // GetWorldsIterator()
00146 //
00147 // Return an iterator to the list of registered worlds.
00148 //
00149 inline
00150 std::vector<G4VPhysicalVolume*>::iterator
00151 G4TransportationManager::GetWorldsIterator()
00152 {
00153    std::vector<G4VPhysicalVolume*>::iterator iterator
00154      = std::vector<G4VPhysicalVolume*>::iterator(fWorlds.begin());
00155    return iterator;
00156 }
00157 
00158 // ----------------------------------------------------------------------------
00159 // GetSafetyHelper()
00160 //
00161 // Return pointer to the created navigation safety helper instance.
00162 //
00163 inline
00164 G4SafetyHelper* G4TransportationManager::GetSafetyHelper() const
00165 {
00166   return fSafetyHelper;
00167 }

Generated on Mon May 27 17:50:02 2013 for Geant4 by  doxygen 1.4.7