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 // G4NavigationLevelRep
0027 //
0028 // Class description:
0029 //
0030 // A data representation class, used to hold the data for a single level
0031 // of the Navigation history tree.
0032 //
0033 // This is the body of a handle/body pair of classes, that implement
0034 // reference counting for NavigationLevels.
0035 // The corresponding handle class is G4NavigationLevel
0036 
0037 // 1 October 1997, J.Apostolakis: initial version
0038 // ----------------------------------------------------------------------
0039 #ifndef G4NAVIGATIONLEVELREP_HH
0040 #define G4NAVIGATIONLEVELREP_HH
0041 
0042 #include "G4Types.hh"
0043 
0044 #include "G4AffineTransform.hh"
0045 #include "G4VPhysicalVolume.hh"
0046 #include "G4Allocator.hh"
0047 
0048 #include "geomwdefs.hh"
0049 
0050 class G4NavigationLevelRep
0051 {
0052 
0053  public:
0054 
0055    inline G4NavigationLevelRep( G4VPhysicalVolume*  newPtrPhysVol,
0056                           const G4AffineTransform&  newT,
0057                                 EVolume             newVolTp,
0058                                 G4int               newRepNo = -1 );
0059 
0060    inline G4NavigationLevelRep( G4VPhysicalVolume*  newPtrPhysVol,
0061                           const G4AffineTransform&  levelAbove,
0062                           const G4AffineTransform&  relativeCurrent,
0063                                 EVolume             newVolTp,
0064                                 G4int               newRepNo = -1 );
0065      // As the previous constructor, but instead of giving Transform, give 
0066      // the AffineTransform to the level above and the current level's 
0067      // Transform relative to that.
0068 
0069    inline G4NavigationLevelRep();
0070    inline G4NavigationLevelRep( G4NavigationLevelRep& );
0071 
0072    inline ~G4NavigationLevelRep();
0073 
0074    inline G4NavigationLevelRep& operator=(const G4NavigationLevelRep& right);
0075 
0076    inline G4VPhysicalVolume* GetPhysicalVolume();
0077 
0078    inline const G4AffineTransform* GetTransformPtr() const ;  // New
0079    inline const G4AffineTransform& GetTransform() const ;     // Old
0080 
0081    inline EVolume            GetVolumeType() const ;
0082    inline G4int              GetReplicaNo() const ;
0083 
0084    inline void   AddAReference(); 
0085    inline G4bool RemoveAReference(); 
0086      // Take care of the reference counts.
0087 
0088    inline void* operator new(size_t);
0089      // Override "new"    to use "G4Allocator".
0090    inline void operator delete(void* aTrack);
0091      // Override "delete" to use "G4Allocator".
0092 
0093  private:
0094 
0095    G4AffineTransform  sTransform;
0096      // Compounded global->local transformation (takes a point in the 
0097      // global reference system to the system of the volume at this level)
0098 
0099    G4VPhysicalVolume* sPhysicalVolumePtr = nullptr;
0100      // Physical volume ptrs, for this level's volume
0101 
0102    G4int              sReplicaNo = -1;
0103    EVolume            sVolumeType;
0104      // Volume `type' 
0105 
0106    G4int              fCountRef = 1; 
0107 
0108 };
0109 
0110 #include "G4NavigationLevelRep.icc"
0111 
0112 #endif