Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4EllipticalCone.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 //
27 // $Id: G4EllipticalCone.hh 105324 2017-07-21 07:34:10Z 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 // First implementation:
71 // Dionysios Anninos, 8.9.2005
72 //
73 // Revisions:
74 // Lukas Lindroos, Tatiana Nikitina, 20.08.2007
75 // Evgueni Tcherniaev, 20.07.2017
76 //
77 // --------------------------------------------------------------------
78 #ifndef G4EllipticalCone_HH
79 #define G4EllipticalCone_HH
80 
82 
83 #include "G4VSolid.hh"
84 #include "G4Polyhedron.hh"
85 
86 class G4EllipticalCone : public G4VSolid
87 {
88  public: // with description
89 
90  G4EllipticalCone(const G4String& pName,
91  G4double pxSemiAxis,
92  G4double pySemiAxis,
93  G4double zMax,
94  G4double pzTopCut);
95 
96  virtual ~G4EllipticalCone();
97 
98  // Access functions
99  //
100  inline G4double GetSemiAxisMin () const;
101  inline G4double GetSemiAxisMax () const;
102  inline G4double GetSemiAxisX () const;
103  inline G4double GetSemiAxisY () const;
104  inline G4double GetZMax() const;
105  inline G4double GetZTopCut() const;
106  inline void SetSemiAxis (G4double x, G4double y, G4double z);
107  inline void SetZCut (G4double newzTopCut);
108 
111 
112  // Solid standard methods
113  //
114  void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
115 
116  G4bool CalculateExtent(const EAxis pAxis,
117  const G4VoxelLimits& pVoxelLimit,
118  const G4AffineTransform& pTransform,
119  G4double& pMin, G4double& pMax) const;
120 
121  EInside Inside(const G4ThreeVector& p) const;
122 
123  G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
124 
126  const G4ThreeVector& v) const;
127 
128  G4double DistanceToIn(const G4ThreeVector& p) const;
129 
131  const G4ThreeVector& v,
132  const G4bool calcNorm=G4bool(false),
133  G4bool *validNorm=0,
134  G4ThreeVector *n=0) const;
135 
136  G4double DistanceToOut(const G4ThreeVector& p) const;
137 
139 
140  G4VSolid* Clone() const;
141 
143 
144  std::ostream& StreamInfo(std::ostream& os) const;
145 
146  // Visualisation functions
147  //
148  G4Polyhedron* GetPolyhedron () const;
149  void DescribeYourselfTo(G4VGraphicsScene& scene) const;
150  G4VisExtent GetExtent() const;
152 
153  public: // without description
154 
155  G4EllipticalCone(__void__&);
156  // Fake default constructor for usage restricted to direct object
157  // persistency for clients requiring preallocation of memory for
158  // persistifiable objects.
159 
162  // Copy constructor and assignment operator.
163 
164  protected: // without description
165 
168 
169  private:
170 
172  // Algorithm for SurfaceNormal() following the original
173  // specification for points not on the surface
174 
175  private:
176 
182 };
183 
184 #include "G4EllipticalCone.icc"
185 
186 #endif
Float_t x
Definition: compare.C:6
virtual ~G4EllipticalCone()
G4double GetSemiAxisMax() const
Float_t y
Definition: compare.C:6
const char * p
Definition: xmltok.h:285
Double_t z
G4EllipticalCone & operator=(const G4EllipticalCone &rhs)
G4double GetSurfaceArea()
G4VisExtent GetExtent() const
G4double GetZMax() const
G4double GetSemiAxisY() const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=G4bool(false), G4bool *validNorm=0, G4ThreeVector *n=0) const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetZCut(G4double newzTopCut)
EInside Inside(const G4ThreeVector &p) const
G4ThreeVector GetPointOnSurface() const
G4double GetZTopCut() const
G4VSolid * Clone() const
G4Polyhedron * fpPolyhedron
G4EllipticalCone(const G4String &pName, G4double pxSemiAxis, G4double pySemiAxis, G4double zMax, G4double pzTopCut)
std::ostream & StreamInfo(std::ostream &os) const
G4Polyhedron * CreatePolyhedron() const
G4GeometryType GetEntityType() const
G4double GetSemiAxisX() const
EInside
Definition: geomdefs.hh:58
EAxis
Definition: geomdefs.hh:54
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double GetCubicVolume()
void SetSemiAxis(G4double x, G4double y, G4double z)
Char_t n[5]
G4ThreeVector ApproxSurfaceNormal(const G4ThreeVector &p) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4double GetSemiAxisMin() const
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4Polyhedron * GetPolyhedron() const