Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4Orb.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: G4Orb.hh 105834 2017-08-23 08:14:34Z gcosmo $
28 //
29 //
30 // --------------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 // G4Orb
34 //
35 // Class description:
36 //
37 // A G4Orb is a simple case of G4Sphere. It has only:
38 // fRmax outer radius
39 
40 // History:
41 // 08.08.17 E.Tcherniaev - revised
42 // 20.08.03 V.Grichine - created
43 // --------------------------------------------------------------------
44 
45 #ifndef G4Orb_HH
46 #define G4Orb_HH
47 
48 #if defined(G4GEOM_USE_USOLIDS)
49 #define G4GEOM_USE_UORB 1
50 #endif
51 
52 #if defined(G4GEOM_USE_UORB)
53  #define G4UOrb G4Orb
54  #include "G4UOrb.hh"
55 #else
56 
58 
59 #include "G4CSGSolid.hh"
60 #include "G4Polyhedron.hh"
61 
62 class G4Orb : public G4CSGSolid
63 {
64  public: // with description
65 
66  G4Orb(const G4String& pName, G4double pRmax);
67 
68  ~G4Orb();
69 
70  // Accessors and modifiers
71 
72  inline G4double GetRadius() const;
73  inline G4double GetRadialTolerance() const;
74 
75  inline void SetRadius(G4double newRmax);
76 
77  // Methods for solid
78 
79  inline G4double GetCubicVolume();
80  inline G4double GetSurfaceArea();
81 
83  const G4int n,
84  const G4VPhysicalVolume* pRep);
85 
86  void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
87 
88  G4bool CalculateExtent(const EAxis pAxis,
89  const G4VoxelLimits& pVoxelLimit,
90  const G4AffineTransform& pTransform,
91  G4double& pmin, G4double& pmax) const;
92 
93  EInside Inside(const G4ThreeVector& p) const;
94 
95  G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
96 
98  const G4ThreeVector& v) const;
99 
100  G4double DistanceToIn(const G4ThreeVector& p) const;
101 
103  const G4ThreeVector& v,
104  const G4bool calcNorm=G4bool(false),
105  G4bool *validNorm=0,
106  G4ThreeVector *n=0) const;
107 
108  G4double DistanceToOut(const G4ThreeVector& p) const;
109 
111 
113 
114  G4VSolid* Clone() const;
115 
116  std::ostream& StreamInfo(std::ostream& os) const;
117 
118  // Visualisation functions
119 
120  void DescribeYourselfTo (G4VGraphicsScene& scene) const;
121  G4VisExtent GetExtent () const;
122  G4Polyhedron* CreatePolyhedron () const;
123 
124  public: // without description
125 
126  G4Orb(__void__&);
127  // Fake default constructor for usage restricted to direct object
128  // persistency for clients requiring preallocation of memory for
129  // persistifiable objects
130 
131  G4Orb(const G4Orb& rhs);
132  G4Orb& operator=(const G4Orb& rhs);
133  // Copy constructor and assignment operator
134 
135  protected:
136 
137  void Initialize();
138 
139  private:
140 
144 };
145 
146 #include "G4Orb.icc"
147 
148 #endif
149 
150 #endif
G4double GetSurfaceArea()
G4double GetRadius() const
EInside Inside(const G4ThreeVector &p) const
Definition: G4Orb.cc:269
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4Orb.cc:434
G4double halfRmaxTol
Definition: G4Orb.hh:142
const char * p
Definition: xmltok.h:285
G4double sqrRmaxMinusTol
Definition: G4Orb.hh:143
G4ThreeVector GetPointOnSurface() const
Definition: G4Orb.cc:452
void SetRadius(G4double newRmax)
G4Polyhedron * CreatePolyhedron() const
Definition: G4Orb.cc:471
void Initialize()
Definition: G4Orb.cc:127
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=G4bool(false), G4bool *validNorm=0, G4ThreeVector *n=0) const
Definition: G4Orb.cc:346
G4GeometryType GetEntityType() const
Definition: G4Orb.cc:416
G4double GetCubicVolume()
G4VSolid * Clone() const
Definition: G4Orb.cc:425
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Definition: G4Orb.cc:280
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
Definition: G4Orb.cc:150
Definition: G4Orb.hh:62
G4Orb & operator=(const G4Orb &rhs)
Definition: G4Orb.cc:103
int G4int
Definition: G4Types.hh:78
EInside
Definition: geomdefs.hh:58
EAxis
Definition: geomdefs.hh:54
~G4Orb()
Definition: G4Orb.cc:85
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
Definition: G4Orb.cc:186
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Definition: G4Orb.cc:161
G4double fRmax
Definition: G4Orb.hh:141
Char_t n[5]
G4double sqrRmaxPlusTol
Definition: G4Orb.hh:143
G4VisExtent GetExtent() const
Definition: G4Orb.cc:466
G4Orb(const G4String &pName, G4double pRmax)
Definition: G4Orb.cc:64
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Definition: G4Orb.cc:291
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Definition: G4Orb.cc:461
G4double GetRadialTolerance() const