00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
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:
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
00103
00104 inline G4VSolid* IdentifyAndPlaceSolid( G4int num,
00105 G4VPhysicalVolume* apparentPhys,
00106 G4VPVParameterisation* curParam );
00107
00108
00109
00110 G4VPhysicalVolume* CreateVolumeWithParent(G4VPhysicalVolume* curPhysical,
00111 const G4NavigationHistory& hist );
00112
00113
00114 private:
00115
00116
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