Geant4  10.01.p02
G4ParameterisedNavigation.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4ParameterisedNavigation.hh 66356 2012-12-18 09:02:32Z gcosmo $
28 //
29 //
30 // class G4ParameterisedNavigation
31 //
32 // Class description:
33 //
34 // Utility for navigation in volumes containing a single G4PVParameterised
35 // volume for which voxels for the replicated volumes have been constructed.
36 // [Voxels MUST be along one axis only: NOT refined]
37 
38 // History:
39 // - Created. Paul Kent, Aug 96
40 // --------------------------------------------------------------------
41 #ifndef G4PARAMETERISEDNAVIGATION_HH
42 #define G4PARAMETERISEDNAVIGATION_HH
43 
44 #include "G4Types.hh"
45 
46 #include <vector>
47 
48 #include "G4VoxelNavigation.hh"
49 #include "G4NavigationHistory.hh"
50 #include "G4AffineTransform.hh"
51 #include "G4VPhysicalVolume.hh"
52 #include "G4VPVParameterisation.hh"
53 #include "G4LogicalVolume.hh"
54 #include "G4VSolid.hh"
55 #include "G4ThreeVector.hh"
56 #include "G4BlockingList.hh"
57 
59 {
60  public: // with description
61 
64 
66  const G4ThreeVector& localPoint );
67 
69  const G4VPhysicalVolume* blockedVol,
70  const G4int blockedNum,
71  const G4ThreeVector& globalPoint,
72  const G4ThreeVector* globalDirection,
73  const G4bool pLocatedOnEdge,
74  G4ThreeVector& localPoint );
75 
76  G4double ComputeStep( const G4ThreeVector& globalPoint,
77  const G4ThreeVector& globalDirection,
78  const G4double currentProposedStepLength,
79  G4double& newSafety,
80  G4NavigationHistory& history,
81  G4bool& validExitNormal,
82  G4ThreeVector& exitNormal,
83  G4bool& exiting,
84  G4bool& entering,
85  G4VPhysicalVolume *(*pBlockedPhysical),
86  G4int& blockedReplicaNo );
87 
88  G4double ComputeSafety( const G4ThreeVector& localPoint,
89  const G4NavigationHistory& history,
90  const G4double pProposedMaxLength=DBL_MAX );
91 
92  private:
93 
94  G4double ComputeVoxelSafety( const G4ThreeVector& localPoint,
95  const EAxis pAxis ) const;
96  G4bool LocateNextVoxel( const G4ThreeVector& localPoint,
97  const G4ThreeVector& localDirection,
98  const G4double currentStep,
99  const EAxis pAxis );
100  private:
101 
102  // Necessary to resolve cases with nested parameterisations
103 
104  inline G4VSolid* IdentifyAndPlaceSolid( G4int num,
105  G4VPhysicalVolume* apparentPhys,
106  G4VPVParameterisation* curParam );
107  // Call virtual 'Compute' methods, and copy information if nested.
108  // 'ApparentPhys' is potentially a PhysV or PhysT.
109 
111  const G4NavigationHistory& hist );
112  // Create necessary parent touchable and physical with parent.
113 
114  private:
115 
116  // Voxel Stack information (for 1D optimisation only)
117  //
123 };
124 
126 
127 #endif
CLHEP::Hep3Vector G4ThreeVector
G4double ComputeVoxelSafety(const G4ThreeVector &localPoint, const EAxis pAxis) const
G4SmartVoxelNode * ParamVoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
G4bool LocateNextVoxel(const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentStep, const EAxis pAxis)
int G4int
Definition: G4Types.hh:78
G4VSolid * IdentifyAndPlaceSolid(G4int num, G4VPhysicalVolume *apparentPhys, G4VPVParameterisation *curParam)
G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
bool G4bool
Definition: G4Types.hh:79
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
EAxis
Definition: geomdefs.hh:54
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
G4VPhysicalVolume * CreateVolumeWithParent(G4VPhysicalVolume *curPhysical, const G4NavigationHistory &hist)