Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:33

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 //
0027 // ------------------------------------------------------------
0028 //  GEANT 4  inlined function members implementation
0029 // ------------------------------------------------------------
0030 //
0031 // Created :  10 March 1997, J. Apostolakis
0032 // Reviewed:  26 April 2006, G. Cosmo
0033 //  
0034 // ----------------------------------------------------------------------------
0035 
0036 // ----------------------------------------------------------------------------
0037 // GetNavigatorForTracking()
0038 //
0039 // Utility method to return the active navigator for tracking, always
0040 // the first in the collection of registered navigators.
0041 //
0042 inline
0043 G4ITNavigator* G4ITTransportationManager::GetNavigatorForTracking() const
0044 {
0045    return fNavigators[0];
0046 }
0047 
0048 // ----------------------------------------------------------------------------
0049 // SetWorldForTracking()
0050 //
0051 // Set the tracking world volume.
0052 // This method is to be invoked by G4RunManagerKernel.
0053 //
0054 inline 
0055 void G4ITTransportationManager::SetWorldForTracking(G4VPhysicalVolume* theWorld)
0056 {
0057    fWorlds[0] = theWorld;
0058    fNavigators[0]->SetWorldVolume(theWorld);
0059 }
0060 
0061 // ----------------------------------------------------------------------------
0062 // SetNavigatorForTracking()
0063 //
0064 // Set the active navigator for tracking, always
0065 // the first in the collection of registered navigators.
0066 //
0067 //inline
0068 //void G4ITTransportationManager::SetNavigatorForTracking(G4ITNavigator* newNavigator)
0069 //{
0070 //   fNavigators[0] = newNavigator;
0071 //}
0072 
0073 // ----------------------------------------------------------------------------
0074 // GetNoActiveNavigators()
0075 //
0076 // Return the number of active navigators.
0077 //
0078 inline
0079 size_t G4ITTransportationManager::GetNoActiveNavigators() const
0080 {
0081    return fActiveNavigators.size();
0082 }
0083 
0084 // ----------------------------------------------------------------------------
0085 // GetActiveNavigatorsIterator()
0086 //
0087 // Return an iterator to the list of active navigators.
0088 //
0089 inline
0090 std::vector<G4ITNavigator*>::iterator
0091 G4ITTransportationManager::GetActiveNavigatorsIterator()
0092 {
0093    auto iterator
0094      = std::vector<G4ITNavigator*>::iterator(fActiveNavigators.begin());
0095    return iterator;
0096 }
0097 
0098 // ----------------------------------------------------------------------------
0099 // GetNoWorlds()
0100 //
0101 // Return the number of registered worlds.
0102 //
0103 inline
0104 size_t G4ITTransportationManager::GetNoWorlds() const
0105 {
0106    return fWorlds.size();
0107 }
0108 
0109 // ----------------------------------------------------------------------------
0110 // GetWorldsIterator()
0111 //
0112 // Return an iterator to the list of registered worlds.
0113 //
0114 inline
0115 std::vector<G4VPhysicalVolume*>::iterator
0116 G4ITTransportationManager::GetWorldsIterator()
0117 {
0118    auto iterator
0119      = std::vector<G4VPhysicalVolume*>::iterator(fWorlds.begin());
0120    return iterator;
0121 }
0122 
0123 // ----------------------------------------------------------------------------
0124 // GetSafetyHelper()
0125 //
0126 // Return pointer to the created navigation safety helper instance.
0127 //
0128 inline
0129 G4ITSafetyHelper* G4ITTransportationManager::GetSafetyHelper() const
0130 {
0131   return fpSafetyHelper;
0132 }