source: trunk/source/geometry/navigation/include/G4RegularNavigation.hh @ 1202

Last change on this file since 1202 was 921, checked in by garnier, 15 years ago

en test de gl2ps. Problemes de libraries

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