ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParameterisedNavigation.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4ParameterisedNavigation.hh
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 // class G4ParameterisedNavigation
27 //
28 // Class description:
29 //
30 // Utility for navigation in volumes containing a single G4PVParameterised
31 // volume for which voxels for the replicated volumes have been constructed.
32 // [Voxels MUST be along one axis only: NOT refined]
33 
34 // History:
35 // - Created. Paul Kent, Aug 96
36 // --------------------------------------------------------------------
37 #ifndef G4PARAMETERISEDNAVIGATION_HH
38 #define G4PARAMETERISEDNAVIGATION_HH
39 
40 #include "G4Types.hh"
41 
42 #include <vector>
43 
44 #include "G4VoxelNavigation.hh"
45 #include "G4NavigationHistory.hh"
46 #include "G4AffineTransform.hh"
47 #include "G4VPhysicalVolume.hh"
48 #include "G4VPVParameterisation.hh"
49 #include "G4LogicalVolume.hh"
50 #include "G4VSolid.hh"
51 #include "G4ThreeVector.hh"
52 #include "G4BlockingList.hh"
53 
55 {
56  public: // with description
57 
60 
62  const G4ThreeVector& localPoint );
63 
65  const G4VPhysicalVolume* blockedVol,
66  const G4int blockedNum,
67  const G4ThreeVector& globalPoint,
68  const G4ThreeVector* globalDirection,
69  const G4bool pLocatedOnEdge,
70  G4ThreeVector& localPoint );
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 
84  G4double ComputeSafety( const G4ThreeVector& localPoint,
85  const G4NavigationHistory& history,
86  const G4double pProposedMaxLength=DBL_MAX );
87 
88  private:
89 
90  G4double ComputeVoxelSafety( const G4ThreeVector& localPoint,
91  const EAxis pAxis ) const;
92  G4bool LocateNextVoxel( const G4ThreeVector& localPoint,
93  const G4ThreeVector& localDirection,
94  const G4double currentStep,
95  const EAxis pAxis );
96  private:
97 
98  // Necessary to resolve cases with nested parameterisations
99 
101  G4VPhysicalVolume* apparentPhys,
102  G4VPVParameterisation* curParam );
103  // Call virtual 'Compute' methods, and copy information if nested.
104  // 'ApparentPhys' is potentially a PhysV or PhysT.
105 
107  const G4NavigationHistory& hist );
108  // Create necessary parent touchable and physical with parent.
109 
110  private:
111 
112  // Voxel Stack information (for 1D optimisation only)
113  //
117  size_t fVoxelNodeNo = 0;
119 };
120 
121 #include "G4ParameterisedNavigation.icc"
122 
123 #endif