File indexing completed on 2025-01-18 09:58:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 #ifndef G4PARAMETERISEDNAVIGATION_HH
0038 #define G4PARAMETERISEDNAVIGATION_HH
0039
0040 #include "G4Types.hh"
0041
0042 #include <vector>
0043
0044 #include "G4VoxelNavigation.hh"
0045 #include "G4NavigationHistory.hh"
0046 #include "G4AffineTransform.hh"
0047 #include "G4VPhysicalVolume.hh"
0048 #include "G4VPVParameterisation.hh"
0049 #include "G4LogicalVolume.hh"
0050 #include "G4VSolid.hh"
0051 #include "G4ThreeVector.hh"
0052 #include "G4BlockingList.hh"
0053
0054 class G4ParameterisedNavigation : public G4VoxelNavigation
0055 {
0056 public:
0057
0058 G4ParameterisedNavigation();
0059 ~G4ParameterisedNavigation() override;
0060
0061 inline G4SmartVoxelNode* ParamVoxelLocate( G4SmartVoxelHeader* pHead,
0062 const G4ThreeVector& localPoint );
0063
0064 G4bool LevelLocate( G4NavigationHistory& history,
0065 const G4VPhysicalVolume* blockedVol,
0066 const G4int blockedNum,
0067 const G4ThreeVector& globalPoint,
0068 const G4ThreeVector* globalDirection,
0069 const G4bool pLocatedOnEdge,
0070 G4ThreeVector& localPoint ) override;
0071
0072 G4double ComputeStep( const G4ThreeVector& globalPoint,
0073 const G4ThreeVector& globalDirection,
0074 const G4double currentProposedStepLength,
0075 G4double& newSafety,
0076 G4NavigationHistory& history,
0077 G4bool& validExitNormal,
0078 G4ThreeVector& exitNormal,
0079 G4bool& exiting,
0080 G4bool& entering,
0081 G4VPhysicalVolume *(*pBlockedPhysical),
0082 G4int& blockedReplicaNo ) override;
0083
0084 G4double ComputeSafety( const G4ThreeVector& localPoint,
0085 const G4NavigationHistory& history,
0086 const G4double pProposedMaxLength=DBL_MAX ) override;
0087
0088 void RelocateWithinVolume( G4VPhysicalVolume* motherPhysical,
0089 const G4ThreeVector& localPoint ) override;
0090
0091 private:
0092
0093 G4double ComputeVoxelSafety( const G4ThreeVector& localPoint,
0094 const EAxis pAxis ) const;
0095 G4bool LocateNextVoxel( const G4ThreeVector& localPoint,
0096 const G4ThreeVector& localDirection,
0097 const G4double currentStep,
0098 const EAxis pAxis );
0099 private:
0100
0101
0102
0103 inline G4VSolid* IdentifyAndPlaceSolid( G4int num,
0104 G4VPhysicalVolume* apparentPhys,
0105 G4VPVParameterisation* curParam );
0106
0107
0108
0109 G4VPhysicalVolume* CreateVolumeWithParent(G4VPhysicalVolume* curPhysical,
0110 const G4NavigationHistory& hist );
0111
0112
0113 private:
0114
0115
0116
0117 EAxis fVoxelAxis = kUndefined;
0118 G4int fVoxelNoSlices = 0;
0119 G4double fVoxelSliceWidth = 0.0;
0120 std::size_t fVoxelNodeNo = 0;
0121 G4SmartVoxelHeader* fVoxelHeader = nullptr;
0122 };
0123
0124 #include "G4ParameterisedNavigation.icc"
0125
0126 #endif