Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4Orb.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$
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// 20.08.03 V.Grichine - created
42// --------------------------------------------------------------------
43
44#ifndef G4Orb_HH
45#define G4Orb_HH
46
48
49#include "G4CSGSolid.hh"
50
51class G4Orb : public G4CSGSolid
52{
53 public: // with description
54
55 G4Orb(const G4String& pName, G4double pRmax);
56
57 virtual ~G4Orb() ;
58
59 // Accessors
60
61 inline G4double GetRadius() const;
62
63 // Modifiers
64
65 inline void SetRadius(G4double newRmax);
66
67 // Methods for solid
68
71
73 const G4int n,
74 const G4VPhysicalVolume* pRep);
75
76 G4bool CalculateExtent(const EAxis pAxis,
77 const G4VoxelLimits& pVoxelLimit,
78 const G4AffineTransform& pTransform,
79 G4double& pmin, G4double& pmax) const;
80
81 EInside Inside(const G4ThreeVector& p) const;
82
84
86 const G4ThreeVector& v) const;
87
88 G4double DistanceToIn(const G4ThreeVector& p) const;
89
91 const G4ThreeVector& v,
92 const G4bool calcNorm=G4bool(false),
93 G4bool *validNorm=0,
94 G4ThreeVector *n=0) const;
95
96 G4double DistanceToOut(const G4ThreeVector& p) const;
97
99
101
102 G4VSolid* Clone() const;
103
104 std::ostream& StreamInfo(std::ostream& os) const;
105
106 // Visualisation functions
107
108 void DescribeYourselfTo(G4VGraphicsScene& scene) const;
110 G4NURBS* CreateNURBS() const;
111
112 public: // without description
113
114 G4Orb(__void__&);
115 // Fake default constructor for usage restricted to direct object
116 // persistency for clients requiring preallocation of memory for
117 // persistifiable objects.
118
119 G4Orb(const G4Orb& rhs);
120 G4Orb& operator=(const G4Orb& rhs);
121 // Copy constructor and assignment operator.
122
123 protected:
124
125 // Used by distanceToOut
126
128
129 // used by normal
130
131 enum ENorm {kNRMax};
132
133 private:
134
135 G4double fRmax;
136 G4double fRmaxTolerance;
137};
138
139#include "G4Orb.icc"
140
141#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
Definition: G4Orb.hh:52
G4double GetSurfaceArea()
void SetRadius(G4double newRmax)
G4ThreeVector GetPointOnSurface() const
Definition: G4Orb.cc:696
ESide
Definition: G4Orb.hh:127
@ kNull
Definition: G4Orb.hh:127
@ kRMax
Definition: G4Orb.hh:127
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Definition: G4Orb.cc:355
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
Definition: G4Orb.cc:149
G4VSolid * Clone() const
Definition: G4Orb.cc:667
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=G4bool(false), G4bool *validNorm=0, G4ThreeVector *n=0) const
Definition: G4Orb.cc:495
G4NURBS * CreateNURBS() const
Definition: G4Orb.cc:726
G4double GetRadius() const
EInside Inside(const G4ThreeVector &p) const
Definition: G4Orb.cc:323
G4GeometryType GetEntityType() const
Definition: G4Orb.cc:658
virtual ~G4Orb()
Definition: G4Orb.cc:109
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Definition: G4Orb.cc:385
G4Polyhedron * CreatePolyhedron() const
Definition: G4Orb.cc:721
ENorm
Definition: G4Orb.hh:131
@ kNRMax
Definition: G4Orb.hh:131
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Definition: G4Orb.cc:716
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4Orb.cc:676
G4double GetCubicVolume()
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
Definition: G4Orb.cc:160
G4Orb & operator=(const G4Orb &rhs)
Definition: G4Orb.cc:126
EAxis
Definition: geomdefs.hh:54
EInside
Definition: geomdefs.hh:58