Back to home page

EIC code displayed by LXR

 
 

    


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

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 // G4NavigationLevel
0027 //
0028 // Class description:
0029 //
0030 // Maintains one level of the geometrical hierarchy.
0031 // A utility class for use by G4NavigationHistory.
0032 
0033 // 30.09.97 J.Apostolakis Initial version. Services derived from
0034 //                        requirements of touchables & G4NavigatorHistory
0035 // ----------------------------------------------------------------------
0036 #ifndef G4NAVIGATIONLEVEL_HH
0037 #define G4NAVIGATIONLEVEL_HH
0038 
0039 #include "G4Types.hh"
0040 
0041 #include "G4AffineTransform.hh"
0042 #include "G4VPhysicalVolume.hh"
0043 
0044 #include "G4NavigationLevelRep.hh"
0045 #include "G4Allocator.hh"
0046 
0047 #include "geomwdefs.hh"
0048 
0049 class G4NavigationLevel
0050 {
0051 
0052  public:
0053 
0054    G4NavigationLevel(G4VPhysicalVolume*       newPtrPhysVol,
0055                      const G4AffineTransform& newT,
0056                      EVolume                  newVolTp,
0057                      G4int                    newRepNo = -1);
0058 
0059    G4NavigationLevel(G4VPhysicalVolume*       newPtrPhysVol,
0060                      const G4AffineTransform& levelAbove,
0061                      const G4AffineTransform& relativeCurrent,
0062                      EVolume                  newVolTp,
0063                      G4int                    newRepNo = -1);
0064      // As the previous constructor, but instead of giving Transform, give 
0065      // the AffineTransform to the level above and the current level's 
0066      // Transform relative to that.
0067 
0068    G4NavigationLevel();
0069    G4NavigationLevel( const G4NavigationLevel& );
0070 
0071    ~G4NavigationLevel();
0072 
0073    G4NavigationLevel& operator=(const G4NavigationLevel& right);
0074 
0075    inline G4VPhysicalVolume*       GetPhysicalVolume() const;
0076    inline const G4AffineTransform* GetTransformPtr() const ;  // New
0077    inline const G4AffineTransform& GetTransform() const ;     // Old
0078 
0079    inline EVolume                  GetVolumeType() const ;
0080    inline G4int                    GetReplicaNo() const ;
0081 
0082    inline const G4AffineTransform* GetPtrTransform() const;
0083      // To try to resolve the possible problem with returning a reference.
0084 
0085    inline void* operator new(size_t);
0086    inline void operator delete(void* aLevel);
0087      // Override "new" and "delete" to use "G4Allocator".
0088 
0089    inline void* operator new(size_t, void*);
0090 #ifndef G4NOT_ISO_DELETES
0091    inline void operator delete(void* ptr, void*);  // Not accepted Sun/HP
0092 #endif
0093      // Pre-allocated 'new' and 'delete' for use with STL 
0094      // Do not (directly) use Allocator
0095 
0096  private:
0097 
0098    G4NavigationLevelRep* fLevelRep;
0099 };
0100 
0101 #include "G4NavigationLevel.icc"
0102 
0103 #endif