Geant4
10.02.p03
G4ReplicaNavigation.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: G4ReplicaNavigation.hh 97507 2016-06-03 12:48:42Z gcosmo $
28
//
29
//
30
// class G4ReplicaNavigation
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 G4REPLICANAVIGATION_HH
42
#define G4REPLICANAVIGATION_HH
43
44
#include <
CLHEP/Units/SystemOfUnits.h
>
45
46
#include "
G4Types.hh
"
47
#include "
G4NavigationHistory.hh
"
48
#include "
G4LogicalVolume.hh
"
49
#include "
G4VPhysicalVolume.hh
"
50
#include "
G4ThreeVector.hh
"
51
#include "
G4BlockingList.hh
"
52
53
// Required for voxel handling
54
//
55
#include "
G4SmartVoxelHeader.hh
"
56
57
class
G4VSolid
;
58
59
struct
G4ExitNormal
60
{
61
// Bucket to hold value of Normal (3-vector),
62
// bools for calculated and leave-behind or 'validConvex',
63
// and exiting side.
64
65
enum
ESide
{
kNull
,
kRMin
,
kRMax
,
kSPhi
,
kEPhi
,
kPX
,
kMX
,
kPY
,
kMY
,
kPZ
,
kMZ
,
kMother
};
66
// Identity of 'Side' of Replicas. Used by DistanceToOut methods.
67
68
G4ThreeVector
exitNormal
;
69
G4bool
calculated
;
// Normal
70
G4bool
validConvex
;
// Solid locally convex
71
ESide
exitSide
;
72
73
public
:
74
75
G4ExitNormal
(
G4ThreeVector
norm
=
G4ThreeVector
(0.,0.,0.),
76
G4bool
calc =
false
,
77
G4bool
valid=
false
,
78
ESide
side =
kNull
)
79
{ exitNormal=
norm
; calculated= calc; validConvex=valid; exitSide=side;}
80
};
81
82
class
G4ReplicaNavigation
83
{
84
public
:
// with description
85
86
G4ReplicaNavigation
();
87
~
G4ReplicaNavigation
();
88
89
inline
G4bool
LevelLocate(
G4NavigationHistory
& history,
90
const
G4VPhysicalVolume
*blockedVol,
91
const
G4int
blockedNum,
92
const
G4ThreeVector
&globalPoint,
93
const
G4ThreeVector
* globalDirection,
94
const
G4bool
pLocatedOnEdge,
95
G4ThreeVector
&localPoint );
96
97
G4double
ComputeStep(
const
G4ThreeVector
&globalPoint,
98
const
G4ThreeVector
&globalDirection,
99
const
G4ThreeVector
&localPoint,
100
const
G4ThreeVector
&localDirection,
101
const
G4double
currentProposedStepLength,
102
G4double
&newSafety,
103
G4NavigationHistory
&history,
104
G4bool
&validExitNormal,
105
G4bool
&calculatedExitNormal,
106
G4ThreeVector
&exitNormal,
107
G4bool
&exiting,
108
G4bool
&entering,
109
G4VPhysicalVolume
*(*pBlockedPhysical),
110
G4int
&blockedReplicaNo );
111
112
G4double
ComputeSafety(
const
G4ThreeVector
&globalPoint,
113
const
G4ThreeVector
&localPoint,
114
G4NavigationHistory
&history,
115
const
G4double
pProposedMaxLength=
DBL_MAX
);
116
117
EInside
BackLocate(
G4NavigationHistory
&history,
118
const
G4ThreeVector
&globalPoint,
119
G4ThreeVector
&localPoint,
120
const
G4bool
&exiting,
121
G4bool
¬KnownInside )
const
;
122
123
void
ComputeTransformation(
const
G4int
replicaNo,
124
G4VPhysicalVolume
*pVol,
125
G4ThreeVector
&point )
const
;
126
void
ComputeTransformation(
const
G4int
replicaNo,
127
G4VPhysicalVolume
*pVol )
const
;
128
129
EInside
Inside(
const
G4VPhysicalVolume
*pVol,
130
const
G4int
replicaNo,
131
const
G4ThreeVector
&localPoint )
const
;
132
G4double
DistanceToOut(
const
G4VPhysicalVolume
*pVol,
133
const
G4int
replicaNo,
134
const
G4ThreeVector
&localPoint )
const
;
135
G4double
DistanceToOut(
const
G4VPhysicalVolume
*pVol,
136
const
G4int
replicaNo,
137
const
G4ThreeVector
&localPoint,
138
const
G4ThreeVector
&localDirection,
139
G4ExitNormal
& candidateNormal )
const
;
140
141
inline
G4int
GetVerboseLevel()
const
;
142
inline
void
SetVerboseLevel(
G4int
level);
143
// Get/Set Verbose(ness) level.
144
// [if level>0 && G4VERBOSE, printout can occur]
145
146
inline
void
CheckMode(
G4bool
mode);
147
// Run navigation in "check-mode", therefore using additional
148
// verifications and more strict correctness conditions.
149
// Is effective only with G4VERBOSE set.
150
151
private
:
152
153
inline
G4int
VoxelLocate(
const
G4SmartVoxelHeader
*pHead,
154
const
G4ThreeVector
&localPoint,
155
const
G4int
blocked=-1 )
const
;
156
157
G4double
DistanceToOutPhi(
const
G4ThreeVector
&localPoint,
158
const
G4ThreeVector
&localDirection,
159
const
G4double
width
,
160
G4ExitNormal
& foundNormal )
const
;
161
162
G4double
DistanceToOutRad(
const
G4ThreeVector
&localPoint,
163
const
G4ThreeVector
&localDirection,
164
const
G4double
width,
165
const
G4double
offset,
166
const
G4int
replicaNo,
167
G4ExitNormal
& foundNormal )
const
;
168
inline
void
SetPhiTransformation(
const
G4double
ang,
169
G4VPhysicalVolume
*pVol=0 )
const
;
170
private
:
171
172
// Invariants - unaltered during navigation
173
// **********
174
175
G4bool
fCheck
;
176
G4int
fVerbose
;
177
// Configuration parameters
178
179
G4double
kCarTolerance,
kRadTolerance
, kAngTolerance,
180
halfkCarTolerance, halfkRadTolerance, halfkAngTolerance,
181
fMinStep
;
182
// Local copy of constants
183
};
184
185
#include "G4ReplicaNavigation.icc"
186
187
#endif
G4ExitNormal::kMX
Definition:
G4ReplicaNavigation.hh:65
CLHEP::Hep3Vector
Definition:
ThreeVector.h:41
G4ExitNormal
Definition:
G4ReplicaNavigation.hh:59
G4ExitNormal::calculated
G4bool calculated
Definition:
G4ReplicaNavigation.hh:69
G4ExitNormal::kEPhi
Definition:
G4ReplicaNavigation.hh:65
G4ExitNormal::kMZ
Definition:
G4ReplicaNavigation.hh:65
G4Types.hh
G4ThreeVector
CLHEP::Hep3Vector G4ThreeVector
Definition:
G4ThreeVector.hh:42
G4ReplicaNavigation
Definition:
G4ReplicaNavigation.hh:82
G4VPhysicalVolume
Definition:
G4VPhysicalVolume.hh:82
norm
Float_t norm
Definition:
comparison_ascii.C:71
G4ExitNormal::kNull
Definition:
G4ReplicaNavigation.hh:65
width
#define width
G4ReplicaNavigation::kRadTolerance
G4double kRadTolerance
Definition:
G4ReplicaNavigation.hh:179
G4ExitNormal::kRMin
Definition:
G4ReplicaNavigation.hh:65
G4NavigationHistory
Definition:
G4NavigationHistory.hh:57
G4int
int G4int
Definition:
G4Types.hh:78
G4ExitNormal::kPZ
Definition:
G4ReplicaNavigation.hh:65
G4ExitNormal::kMother
Definition:
G4ReplicaNavigation.hh:65
G4ExitNormal::exitNormal
G4ThreeVector exitNormal
Definition:
G4ReplicaNavigation.hh:68
G4ExitNormal::ESide
ESide
Definition:
G4ReplicaNavigation.hh:65
G4ExitNormal::kPY
Definition:
G4ReplicaNavigation.hh:65
G4SmartVoxelHeader
Definition:
G4SmartVoxelHeader.hh:78
G4VSolid
Definition:
G4VSolid.hh:87
G4SmartVoxelHeader.hh
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4ExitNormal::kMY
Definition:
G4ReplicaNavigation.hh:65
G4ExitNormal::kRMax
Definition:
G4ReplicaNavigation.hh:65
G4ExitNormal::exitSide
ESide exitSide
Definition:
G4ReplicaNavigation.hh:71
fMinStep
#define fMinStep
Definition:
G4ITMultiNavigator.cc:53
G4LogicalVolume.hh
G4ExitNormal::G4ExitNormal
G4ExitNormal(G4ThreeVector norm=G4ThreeVector(0., 0., 0.), G4bool calc=false, G4bool valid=false, ESide side=kNull)
Definition:
G4ReplicaNavigation.hh:75
EInside
EInside
Definition:
geomdefs.hh:58
G4NavigationHistory.hh
G4BlockingList.hh
G4VPhysicalVolume.hh
G4ExitNormal::kSPhi
Definition:
G4ReplicaNavigation.hh:65
G4double
double G4double
Definition:
G4Types.hh:76
G4ExitNormal::kPX
Definition:
G4ReplicaNavigation.hh:65
G4ThreeVector.hh
G4ReplicaNavigation::fVerbose
G4int fVerbose
Definition:
G4ReplicaNavigation.hh:176
SystemOfUnits.h
DBL_MAX
#define DBL_MAX
Definition:
templates.hh:83
G4ExitNormal::validConvex
G4bool validConvex
Definition:
G4ReplicaNavigation.hh:70
G4ReplicaNavigation::fCheck
G4bool fCheck
Definition:
G4ReplicaNavigation.hh:175
Geant4
Geant4.10.02.p03
source
geometry
navigation
include
G4ReplicaNavigation.hh
Generated by
1.8.13