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
G4EllipticalCone.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: G4EllipticalCone.hh 67011 2013-01-29 16:17:41Z gcosmo $
28
//
29
//
30
// --------------------------------------------------------------------
31
// GEANT 4 class header file
32
//
33
// G4EllipticalCone
34
//
35
// Class description:
36
//
37
// G4EllipticalCone is a full cone with elliptical base which can be cut in Z.
38
//
39
// Member Data:
40
//
41
// xSemiAxis semi-axis, x, without dimentions
42
// ySemiAxis semi-axis, y, without dimentions
43
// zheight height, z
44
// zTopCut upper cut plane level, z
45
//
46
// The height in Z corresponds to where the elliptical cone hits the
47
// Z-axis if it had no Z cut. Also the cone is centered at zero having a
48
// base at zTopCut and another at -zTopCut. The semi-major axes at the Z=0
49
// plane are given by xSemiAxis*zheight and ySemiAxis*zheight so that the
50
// curved surface of our cone satisfies the equation:
51
//
52
// ***************************************************************************
53
// * *
54
// * (x/xSemiAxis)^2 + (y/ySemiAxis)^2 = (zheight - z)^2 *
55
// * *
56
// ***************************************************************************
57
//
58
// In case you want to construct G4EllipticalCone from :
59
// 1. halflength in Z = zTopCut
60
// 2. Dx and Dy = halflength of ellipse axis at z = -zTopCut
61
// 3. dx and dy = halflength of ellipse axis at z = zTopCut
62
// ! Attention : dx/dy=Dx/Dy
63
//
64
// You need to find xSemiAxis,ySemiAxis and zheight:
65
//
66
// xSemiAxis = (Dx-dx)/(2*zTopCut)
67
// ySemiAxis = (Dy-dy)/(2*zTopCut)
68
// zheight = (Dx+dx)/(2*xSemiAxis)
69
//
70
// Author:
71
// Dionysios Anninos, 8.9.2005
72
//
73
// Revision:
74
// Lukas Lindroos, Tatiana Nikitina 20.08.2007
75
//
76
// --------------------------------------------------------------------
77
#ifndef G4EllipticalCone_HH
78
#define G4EllipticalCone_HH
79
80
#include <
CLHEP/Units/PhysicalConstants.h
>
81
82
#include "
G4VSolid.hh
"
83
84
class
G4EllipticalCone
:
public
G4VSolid
85
{
86
public
:
// with description
87
88
G4EllipticalCone
(
const
G4String
& pName,
89
G4double
pxSemiAxis,
90
G4double
pySemiAxis,
91
G4double
zMax,
92
G4double
pzTopCut);
93
94
virtual
~G4EllipticalCone
();
95
96
// Access functions
97
//
98
inline
G4double
GetSemiAxisMax
()
const
;
99
inline
G4double
GetSemiAxisX
()
const
;
100
inline
G4double
GetSemiAxisY
()
const
;
101
inline
G4double
GetZMax
()
const
;
102
inline
G4double
GetZTopCut
()
const
;
103
inline
void
SetSemiAxis
(
G4double
x
,
G4double
y
,
G4double
z
);
104
inline
void
SetZCut
(
G4double
newzTopCut);
105
106
inline
G4double
GetCubicVolume
();
107
inline
G4double
GetSurfaceArea
();
108
109
// Solid standard methods
110
//
111
G4bool
CalculateExtent
(
const
EAxis
pAxis,
112
const
G4VoxelLimits
& pVoxelLimit,
113
const
G4AffineTransform
& pTransform,
114
G4double
& pmin,
G4double
& pmax)
const
;
115
116
EInside
Inside
(
const
G4ThreeVector
&
p
)
const
;
117
118
G4ThreeVector
SurfaceNormal
(
const
G4ThreeVector
& p)
const
;
119
120
G4double
DistanceToIn
(
const
G4ThreeVector
& p,
121
const
G4ThreeVector
&
v
)
const
;
122
123
G4double
DistanceToIn
(
const
G4ThreeVector
& p)
const
;
124
125
G4double
DistanceToOut
(
const
G4ThreeVector
& p,
126
const
G4ThreeVector
& v,
127
const
G4bool
calcNorm=
G4bool
(
false
),
128
G4bool
*validNorm=0,
129
G4ThreeVector
*
n
=0)
const
;
130
131
G4double
DistanceToOut
(
const
G4ThreeVector
& p)
const
;
132
133
G4GeometryType
GetEntityType
()
const
;
134
135
G4VSolid
*
Clone
()
const
;
136
137
G4ThreeVector
GetPointOnSurface
()
const
;
138
139
std::ostream&
StreamInfo
(std::ostream& os)
const
;
140
141
// Visualisation functions
142
//
143
G4Polyhedron
*
GetPolyhedron
()
const
;
144
void
DescribeYourselfTo
(
G4VGraphicsScene
& scene)
const
;
145
G4VisExtent
GetExtent
()
const
;
146
G4Polyhedron
*
CreatePolyhedron
()
const
;
147
G4NURBS
*
CreateNURBS
()
const
;
148
149
public
:
// without description
150
151
G4EllipticalCone
(__void__&);
152
// Fake default constructor for usage restricted to direct object
153
// persistency for clients requiring preallocation of memory for
154
// persistifiable objects.
155
156
G4EllipticalCone
(
const
G4EllipticalCone
& rhs);
157
G4EllipticalCone
&
operator=
(
const
G4EllipticalCone
& rhs);
158
// Copy constructor and assignment operator.
159
160
protected
:
// without description
161
162
G4ThreeVectorList
*
CreateRotatedVertices
(
const
G4AffineTransform
& pT,
163
G4int
& noPV)
const
;
164
165
mutable
G4Polyhedron
*
fpPolyhedron
;
166
167
private
:
168
169
G4double
kRadTolerance;
170
171
G4double
fCubicVolume;
172
G4double
fSurfaceArea;
173
G4double
xSemiAxis, ySemiAxis, zheight,
174
semiAxisMax, zTopCut;
175
};
176
177
#include "G4EllipticalCone.icc"
178
179
#endif
Generated on Sat May 25 2013 14:33:14 for Geant4 by
1.8.4