Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
geometry
solids
specific
include
G4Polycone.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: G4Polycone.hh 67011 2013-01-29 16:17:41Z gcosmo $
28
//
29
//
30
// --------------------------------------------------------------------
31
// GEANT 4 class header file
32
//
33
//
34
// G4Polycone
35
//
36
// Class description:
37
//
38
// Class implementing a CSG-like type "PCON" Geant 3.21 volume,
39
// inherited from class G4VCSGfaceted:
40
//
41
// G4Polycone( const G4String& name,
42
// G4double phiStart, // initial phi starting angle
43
// G4double phiTotal, // total phi angle
44
// G4int numZPlanes, // number of z planes
45
// const G4double zPlane[], // position of z planes
46
// const G4double rInner[], // tangent distance to inner surface
47
// const G4double rOuter[]) // tangent distance to outer surface
48
//
49
// G4Polycone( const G4String& name,
50
// G4double phiStart, // initial phi starting angle
51
// G4double phiTotal, // total phi angle
52
// G4int numRZ, // number corners in r,z space
53
// const G4double r[], // r coordinate of these corners
54
// const G4double z[]) // z coordinate of these corners
55
56
// Author:
57
// David C. Williams (davidw@scipp.ucsc.edu)
58
// --------------------------------------------------------------------
59
60
#ifndef G4Polycone_hh
61
#define G4Polycone_hh
62
63
#include "
G4VCSGfaceted.hh
"
64
#include "
G4PolyconeSide.hh
"
65
66
class
G4EnclosingCylinder
;
67
class
G4ReduciblePolygon
;
68
class
G4VCSGface
;
69
class
G4PolyconeHistorical
70
{
71
public
:
72
G4PolyconeHistorical
();
73
~G4PolyconeHistorical
();
74
G4PolyconeHistorical
(
const
G4PolyconeHistorical
& source );
75
G4PolyconeHistorical
&
operator=
(
const
G4PolyconeHistorical
&
right
);
76
77
G4double
Start_angle
;
78
G4double
Opening_angle
;
79
G4int
Num_z_planes
;
80
G4double
*
Z_values
;
81
G4double
*
Rmin
;
82
G4double
*
Rmax
;
83
};
84
85
class
G4Polycone
:
public
G4VCSGfaceted
86
{
87
88
public
:
// with description
89
90
G4Polycone
(
const
G4String
&
name
,
91
G4double
phiStart,
// initial phi starting angle
92
G4double
phiTotal,
// total phi angle
93
G4int
numZPlanes,
// number of z planes
94
const
G4double
zPlane[],
// position of z planes
95
const
G4double
rInner[],
// tangent distance to inner surface
96
const
G4double
rOuter[] );
// tangent distance to outer surface
97
98
G4Polycone
(
const
G4String
& name,
99
G4double
phiStart,
// initial phi starting angle
100
G4double
phiTotal,
// total phi angle
101
G4int
numRZ,
// number corners in r,z space
102
const
G4double
r
[],
// r coordinate of these corners
103
const
G4double
z
[] );
// z coordinate of these corners
104
105
virtual
~G4Polycone
();
106
107
// Methods for solid
108
109
EInside
Inside
(
const
G4ThreeVector
&
p
)
const
;
110
G4double
DistanceToIn
(
const
G4ThreeVector
&p,
const
G4ThreeVector
&
v
)
const
;
111
G4double
DistanceToIn
(
const
G4ThreeVector
&p )
const
;
112
113
G4ThreeVector
GetPointOnSurface
()
const
;
114
115
void
ComputeDimensions
(
G4VPVParameterisation
* p,
116
const
G4int
n
,
117
const
G4VPhysicalVolume
* pRep );
118
119
G4GeometryType
GetEntityType
()
const
;
120
121
G4VSolid
*
Clone
()
const
;
122
123
std::ostream&
StreamInfo
(std::ostream& os)
const
;
124
125
G4Polyhedron
*
CreatePolyhedron
()
const
;
126
G4NURBS
*
CreateNURBS
()
const
;
127
128
G4bool
Reset
();
129
130
// Accessors
131
132
inline
G4double
GetStartPhi
()
const
;
133
inline
G4double
GetEndPhi
()
const
;
134
inline
G4bool
IsOpen
()
const
;
135
inline
G4bool
IsGeneric
()
const
;
136
inline
G4int
GetNumRZCorner
()
const
;
137
inline
G4PolyconeSideRZ
GetCorner
(
G4int
index
)
const
;
138
inline
G4PolyconeHistorical
*
GetOriginalParameters
()
const
;
139
inline
void
SetOriginalParameters
(
G4PolyconeHistorical
* pars);
140
141
public
:
// without description
142
143
G4Polycone
(__void__&);
144
// Fake default constructor for usage restricted to direct object
145
// persistency for clients requiring preallocation of memory for
146
// persistifiable objects.
147
148
G4Polycone
(
const
G4Polycone
&source );
149
const
G4Polycone
&
operator=
(
const
G4Polycone
&source );
150
// Copy constructor and assignment operator.
151
152
protected
:
// without description
153
154
// Generic initializer, called by all constructors
155
156
inline
void
SetOriginalParameters
();
157
158
void
Create
(
G4double
phiStart,
// initial phi starting angle
159
G4double
phiTotal,
// total phi angle
160
G4ReduciblePolygon
*rz );
// r/z coordinate of these corners
161
162
void
CopyStuff
(
const
G4Polycone
&source );
163
164
// Methods for random point generation
165
166
G4ThreeVector
GetPointOnCone
(
G4double
fRmin1,
G4double
fRmax1,
167
G4double
fRmin2,
G4double
fRmax2,
168
G4double
zOne,
G4double
zTwo,
169
G4double
& totArea)
const
;
170
171
G4ThreeVector
GetPointOnTubs
(
G4double
fRMin,
G4double
fRMax,
172
G4double
zOne,
G4double
zTwo,
173
G4double
& totArea)
const
;
174
175
G4ThreeVector
GetPointOnCut
(
G4double
fRMin1,
G4double
fRMax1,
176
G4double
fRMin2,
G4double
fRMax2,
177
G4double
zOne,
G4double
zTwo,
178
G4double
& totArea)
const
;
179
180
G4ThreeVector
GetPointOnRing
(
G4double
fRMin,
G4double
fRMax,
181
G4double
fRMin2,
G4double
fRMax2,
182
G4double
zOne)
const
;
183
184
protected
:
// without description
185
186
// Here are our parameters
187
188
G4double
startPhi
;
// Starting phi value (0 < phiStart < 2pi)
189
G4double
endPhi
;
// end phi value (0 < endPhi-phiStart < 2pi)
190
G4bool
phiIsOpen
;
// true if there is a phi segment
191
G4bool
genericPcon
;
// true if created through the 2nd generic constructor
192
G4int
numCorner
;
// number RZ points
193
G4PolyconeSideRZ
*
corners
;
// corner r,z points
194
G4PolyconeHistorical
*
original_parameters
;
// original input parameters
195
196
// Our quick test
197
198
G4EnclosingCylinder
*
enclosingCylinder
;
199
200
};
201
202
#include "G4Polycone.icc"
203
204
#endif
Generated on Sat May 25 2013 14:33:14 for Geant4 by
1.8.4