Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4EllipticalTube.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: G4EllipticalTube.hh 104316 2017-05-24 13:04:23Z gcosmo $
28 //
29 // --------------------------------------------------------------------
30 // GEANT 4 class header file
31 //
32 // G4EllipticalTube
33 //
34 // Class description:
35 //
36 // Declaration of a CSG volume representing a tube with elliptical
37 // cross section (geant3 solid 'ELTU'):
38 //
39 // G4EllipticalTube( const G4String& name,
40 // G4double Dx,
41 // G4double Dy,
42 // G4double Dz )
43 //
44 // The equation of the surface in x/y is 1.0 = (x/dx)**2 + (y/dy)**2
45 
46 // Author:
47 // David C. Williams (davidw@scipp.ucsc.edu)
48 // --------------------------------------------------------------------
49 
50 #ifndef G4EllipticalTube_hh
51 #define G4EllipticalTube_hh
52 
53 #include "G4VSolid.hh"
54 #include "G4Polyhedron.hh"
55 
56 class G4EllipticalTube : public G4VSolid
57 {
58  public: // with description
59 
61  G4double theDx,
62  G4double theDy,
63  G4double theDz );
64 
65  virtual ~G4EllipticalTube();
66 
67  // Standard solid methods
68 
69  void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
70 
71  G4bool CalculateExtent( const EAxis pAxis,
72  const G4VoxelLimits& pVoxelLimit,
73  const G4AffineTransform& pTransform,
74  G4double& pmin, G4double& pmax ) const;
75 
76  EInside Inside( const G4ThreeVector& p ) const;
77 
78  G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const;
79 
81  const G4ThreeVector& v ) const;
82  G4double DistanceToIn( const G4ThreeVector& p ) const;
84  const G4ThreeVector& v,
85  const G4bool calcNorm=false,
86  G4bool *validNorm=0,
87  G4ThreeVector *n=0 ) const;
88  G4double DistanceToOut( const G4ThreeVector& p ) const;
89 
91 
92  G4VSolid* Clone() const;
93 
94  std::ostream& StreamInfo(std::ostream& os) const;
95 
98 
100 
101  // Visualisation methods
102 
104  G4Polyhedron* GetPolyhedron () const;
105  void DescribeYourselfTo( G4VGraphicsScene& scene ) const;
106  G4VisExtent GetExtent() const;
107 
108  // Accessors
109 
110  inline G4double GetDx() const;
111  inline G4double GetDy() const;
112  inline G4double GetDz() const;
113 
114  inline void SetDx( const G4double newDx );
115  inline void SetDy( const G4double newDy );
116  inline void SetDz( const G4double newDz );
117 
118  public: // without description
119 
120  G4EllipticalTube(__void__&);
121  // Fake default constructor for usage restricted to direct object
122  // persistency for clients requiring preallocation of memory for
123  // persistifiable objects.
124 
127  // Copy constructor and assignment operator.
128 
129  protected: // without description
130 
132 
133  // Utility
134 
135  inline G4double CheckXY( const G4double x,
136  const G4double y,
137  const G4double toler ) const;
138  inline G4double CheckXY( const G4double x, const G4double y ) const;
139 
140  G4int IntersectXY( const G4ThreeVector &p,
141  const G4ThreeVector &v, G4double s[2] ) const;
142 
143  private:
144 
146  // Algorithm for SurfaceNormal() following the original
147  // specification for points not on the surface.
148 
150 
155 };
156 
157 #include "G4EllipticalTube.icc"
158 
159 #endif
Float_t x
Definition: compare.C:6
virtual ~G4EllipticalTube()
const XML_Char * name
Definition: expat.h:151
G4double GetDx() const
void SetDz(const G4double newDz)
G4EllipticalTube & operator=(const G4EllipticalTube &rhs)
EInside Inside(const G4ThreeVector &p) const
Float_t y
Definition: compare.C:6
const char * p
Definition: xmltok.h:285
G4double GetDz() const
G4VSolid * Clone() const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
G4Polyhedron * fpPolyhedron
G4ThreeVector ApproxSurfaceNormal(const G4ThreeVector &p) const
void DescribeYourselfTo(G4VGraphicsScene &scene) const
const XML_Char * s
Definition: expat.h:262
G4ThreeVector GetPointOnSurface() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4double GetCubicVolume()
G4VisExtent GetExtent() const
G4EllipticalTube(const G4String &name, G4double theDx, G4double theDy, G4double theDz)
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4double GetDy() const
G4Polyhedron * CreatePolyhedron() const
void SetDx(const G4double newDx)
G4double CheckXY(const G4double x, const G4double y, const G4double toler) const
G4double GetSurfaceArea()
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
int G4int
Definition: G4Types.hh:78
EInside
Definition: geomdefs.hh:58
EAxis
Definition: geomdefs.hh:54
void SetDy(const G4double newDy)
Char_t n[5]
G4int IntersectXY(const G4ThreeVector &p, const G4ThreeVector &v, G4double s[2]) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
G4GeometryType GetEntityType() const
std::ostream & StreamInfo(std::ostream &os) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4Polyhedron * GetPolyhedron() const