G4ParameterisedNavigation.hh

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 // 
00030 // class G4ParameterisedNavigation
00031 //
00032 // Class description:
00033 //
00034 // Utility for navigation in volumes containing a single G4PVParameterised
00035 // volume for which voxels for the replicated volumes have been constructed.
00036 // [Voxels MUST be along one axis only: NOT refined]
00037 
00038 // History:
00039 // - Created. Paul Kent, Aug 96
00040 // --------------------------------------------------------------------
00041 #ifndef G4PARAMETERISEDNAVIGATION_HH
00042 #define G4PARAMETERISEDNAVIGATION_HH
00043 
00044 #include "G4Types.hh"
00045 
00046 #include <vector>
00047 
00048 #include "G4VoxelNavigation.hh"
00049 #include "G4NavigationHistory.hh"
00050 #include "G4AffineTransform.hh"
00051 #include "G4VPhysicalVolume.hh"
00052 #include "G4VPVParameterisation.hh"
00053 #include "G4LogicalVolume.hh"
00054 #include "G4VSolid.hh"
00055 #include "G4ThreeVector.hh"
00056 #include "G4BlockingList.hh"
00057 
00058 class G4ParameterisedNavigation : public G4VoxelNavigation
00059 {
00060   public:  // with description
00061 
00062     G4ParameterisedNavigation();
00063     ~G4ParameterisedNavigation();
00064 
00065     inline G4SmartVoxelNode* ParamVoxelLocate( G4SmartVoxelHeader* pHead,
00066                                          const G4ThreeVector& localPoint );
00067 
00068     G4bool LevelLocate( G4NavigationHistory& history,
00069                   const G4VPhysicalVolume* blockedVol,
00070                   const G4int blockedNum,
00071                   const G4ThreeVector& globalPoint,
00072                   const G4ThreeVector* globalDirection,
00073                   const G4bool pLocatedOnEdge, 
00074                         G4ThreeVector& localPoint );
00075 
00076     G4double ComputeStep( const G4ThreeVector& globalPoint,
00077                           const G4ThreeVector& globalDirection,
00078                           const G4double currentProposedStepLength,
00079                                 G4double& newSafety,
00080                                 G4NavigationHistory& history,
00081                                 G4bool& validExitNormal,
00082                                 G4ThreeVector& exitNormal,
00083                                 G4bool& exiting,
00084                                 G4bool& entering,
00085                                 G4VPhysicalVolume *(*pBlockedPhysical),
00086                                 G4int& blockedReplicaNo );
00087 
00088     G4double ComputeSafety( const G4ThreeVector& localPoint,
00089                             const G4NavigationHistory& history,
00090                             const G4double pProposedMaxLength=DBL_MAX );
00091 
00092   private:
00093 
00094     G4double ComputeVoxelSafety( const G4ThreeVector& localPoint,
00095                                  const EAxis pAxis ) const;
00096     G4bool LocateNextVoxel( const G4ThreeVector& localPoint,
00097                             const G4ThreeVector& localDirection,
00098                             const G4double currentStep,
00099                             const EAxis pAxis );
00100   private:
00101 
00102     // Necessary to resolve cases with nested parameterisations
00103 
00104     inline G4VSolid* IdentifyAndPlaceSolid( G4int num,
00105                                      G4VPhysicalVolume* apparentPhys, 
00106                                      G4VPVParameterisation* curParam );
00107        // Call virtual 'Compute' methods, and copy information if nested.
00108        // 'ApparentPhys' is potentially a PhysV or PhysT.
00109 
00110     G4VPhysicalVolume* CreateVolumeWithParent(G4VPhysicalVolume* curPhysical,
00111                                               const G4NavigationHistory& hist );
00112        // Create necessary parent touchable and physical with parent.
00113 
00114   private:
00115 
00116     //  Voxel Stack information (for 1D optimisation only)
00117     //
00118     EAxis fVoxelAxis;
00119     G4int fVoxelNoSlices;
00120     G4double fVoxelSliceWidth; 
00121     G4int fVoxelNodeNo;  
00122     G4SmartVoxelHeader* fVoxelHeader;
00123 };
00124 
00125 #include "G4ParameterisedNavigation.icc"
00126 
00127 #endif

Generated on Mon May 27 17:49:15 2013 for Geant4 by  doxygen 1.4.7