Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:13

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //  G4TransportationManager inlined function members implementation
0027 //
0028 // Created :  10 March 1997, J. Apostolakis
0029 // Reviewed:  26 April 2006, G. Cosmo
0030 // ----------------------------------------------------------------------------
0031 
0032 // ----------------------------------------------------------------------------
0033 // GetNavigatorForTracking()
0034 //
0035 // Utility method to return the active navigator for tracking, always
0036 // the first in the collection of registered navigators.
0037 //
0038 inline
0039 G4Navigator* G4TransportationManager::GetNavigatorForTracking() const
0040 {
0041    return fNavigators[0];
0042 }
0043 
0044 // ----------------------------------------------------------------------------
0045 // SetWorldForTracking()
0046 //
0047 // Set the tracking world volume.
0048 // This method is to be invoked by G4RunManagerKernel.
0049 //
0050 inline 
0051 void G4TransportationManager::SetWorldForTracking(G4VPhysicalVolume* theWorld)
0052 {
0053    fWorlds[0] = theWorld;
0054    fNavigators[0]->SetWorldVolume(theWorld);
0055 }
0056 
0057 // ----------------------------------------------------------------------------
0058 // GetPropagatorInField()
0059 //
0060 // Return the associated propagator in field.
0061 //
0062 inline
0063 G4PropagatorInField* G4TransportationManager::GetPropagatorInField() const
0064 {
0065    return fPropagatorInField;
0066 }
0067 
0068 // ----------------------------------------------------------------------------
0069 // SetPropagatorInField()
0070 //
0071 // Set the associated propagator in field.
0072 //
0073 inline
0074 void G4TransportationManager::
0075 SetPropagatorInField( G4PropagatorInField* newFieldPropagator )
0076 {
0077    fPropagatorInField = newFieldPropagator;
0078 }
0079 
0080 // ----------------------------------------------------------------------------
0081 // GetFieldManager()
0082 //
0083 // Return the associated field manager.
0084 //
0085 inline
0086 G4FieldManager* G4TransportationManager::GetFieldManager() const
0087 {
0088    return fFieldManager;
0089 }
0090 
0091 // ----------------------------------------------------------------------------
0092 // GetNoActiveNavigators()
0093 //
0094 // Return the number of active navigators.
0095 //
0096 inline
0097 size_t G4TransportationManager::GetNoActiveNavigators() const
0098 {
0099    return fActiveNavigators.size();
0100 }
0101 
0102 // ----------------------------------------------------------------------------
0103 // GetActiveNavigatorsIterator()
0104 //
0105 // Return an iterator to the list of active navigators.
0106 //
0107 inline
0108 std::vector<G4Navigator*>::iterator
0109 G4TransportationManager::GetActiveNavigatorsIterator()
0110 {
0111    auto iter = std::vector<G4Navigator*>::iterator(fActiveNavigators.begin());
0112    return iter;
0113 }
0114 
0115 // ----------------------------------------------------------------------------
0116 // GetNoWorlds()
0117 //
0118 // Return the number of registerd worlds.
0119 //
0120 inline
0121 size_t G4TransportationManager::GetNoWorlds() const
0122 {
0123    return fWorlds.size();
0124 }
0125 
0126 // ----------------------------------------------------------------------------
0127 // GetWorldsIterator()
0128 //
0129 // Return an iterator to the list of registered worlds.
0130 //
0131 inline
0132 std::vector<G4VPhysicalVolume*>::iterator
0133 G4TransportationManager::GetWorldsIterator()
0134 {
0135    auto iter = std::vector<G4VPhysicalVolume*>::iterator(fWorlds.begin());
0136    return iter;
0137 }
0138 
0139 // ----------------------------------------------------------------------------
0140 // GetSafetyHelper()
0141 //
0142 // Return pointer to the created navigation safety helper instance.
0143 //
0144 inline
0145 G4SafetyHelper* G4TransportationManager::GetSafetyHelper() const
0146 {
0147   return fSafetyHelper;
0148 }