Geant4  10.01
G4RegularNavigation.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: G4RegularNavigation.hh 66356 2012-12-18 09:02:32Z gcosmo $
28 //
29 //
30 // class G4RegularNavigation
31 //
32 // Class description:
33 //
34 // Utility for fast navigation in volumes containing a regular
35 // parameterisation. If two contiguous voxels have the same material,
36 // navigation does not stop at the surface
37 
38 // History:
39 // - Created. P. Arce, May 2007
40 // --------------------------------------------------------------------
41 #ifndef G4RegularNavigation_HH
42 #define G4RegularNavigation_HH
43 
44 #include <vector>
45 
46 #include "G4Types.hh"
47 #include "G4ThreeVector.hh"
48 
49 class G4NormalNavigation;
50 class G4VPhysicalVolume;
51 class G4Navigator;
53 
55 {
56  public: // with description
57 
60 
62  const G4VPhysicalVolume* blockedVol,
63  const G4int blockedNum,
64  const G4ThreeVector& globalPoint,
65  const G4ThreeVector* globalDirection,
66  const G4bool pLocatedOnEdge,
67  G4ThreeVector& localPoint );
68  // Locate point using its position with respect to regular
69  // parameterisation container volume.
70 
71  G4double ComputeStep( const G4ThreeVector& globalPoint,
72  const G4ThreeVector& globalDirection,
73  const G4double currentProposedStepLength,
74  G4double& newSafety,
75  G4NavigationHistory& history,
76  G4bool& validExitNormal,
77  G4ThreeVector& exitNormal,
78  G4bool& exiting,
79  G4bool& entering,
80  G4VPhysicalVolume *(*pBlockedPhysical),
81  G4int& blockedReplicaNo );
82  // Method never called because to be called the daughter has to be a
83  // 'regular' volume. This would only happen if the track is in the
84  // mother of voxels volume. But the voxels fill completely their mother,
85  // so when a track enters the mother it automatically enters a voxel.
86 
88  G4ThreeVector& localPoint,
89  const G4ThreeVector& globalDirection,
90  const G4double currentProposedStepLength,
91  G4double& newSafety,
92  G4NavigationHistory& history,
93  G4bool& validExitNormal,
94  G4ThreeVector& exitNormal,
95  G4bool& exiting,
96  G4bool& entering,
97  G4VPhysicalVolume *(*pBlockedPhysical),
98  G4int& blockedReplicaNo,
99  G4VPhysicalVolume* pCurrentPhysical);
100  // Compute the step skipping surfaces when they separate voxels with
101  // equal materials. Loop to voxels until a different material is found:
102  // invokes G4NormalNavigation::ComputeStep() in each voxel and move the
103  // point to the next voxel.
104 
105  G4double ComputeSafety( const G4ThreeVector& localPoint,
106  const G4NavigationHistory& history,
107  const G4double pProposedMaxLength=DBL_MAX );
108  // Method never called because to be called the daughter has to be a
109  // 'regular' volume. This would only happen if the track is in the
110  // mother of voxels volume. But the voxels fill completely their mother,
111  // so when a track enters the mother it automatically enters a voxel.
112 
113  public: // without description
114 
115  // Set and Get methods
116 
117  void SetVerboseLevel(G4int level) { fverbose = level; }
118  void CheckMode(G4bool mode) { fcheck = mode; }
120  { fnormalNav = fnormnav; }
121 
122  private:
123 
126 
129 };
130 
131 #endif
void SetVerboseLevel(G4int level)
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)
CLHEP::Hep3Vector G4ThreeVector
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
int G4int
Definition: G4Types.hh:78
void SetNormalNavigation(G4NormalNavigation *fnormnav)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
bool G4bool
Definition: G4Types.hh:79
void CheckMode(G4bool mode)
G4double ComputeStepSkippingEqualMaterials(G4ThreeVector &localPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo, G4VPhysicalVolume *pCurrentPhysical)
G4NormalNavigation * fnormalNav
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83