Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Polycone.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//
34// G4Polycone
35//
36// Class description:
37//
38// Class implementing a CSG-like type "PCON" Geant 3.21 volume,
39// inherited from class G4VCSGfaceted:
40//
41// G4Polycone( const G4String& name,
42// G4double phiStart, // initial phi starting angle
43// G4double phiTotal, // total phi angle
44// G4int numZPlanes, // number of z planes
45// const G4double zPlane[], // position of z planes
46// const G4double rInner[], // tangent distance to inner surface
47// const G4double rOuter[]) // tangent distance to outer surface
48//
49// G4Polycone( const G4String& name,
50// G4double phiStart, // initial phi starting angle
51// G4double phiTotal, // total phi angle
52// G4int numRZ, // number corners in r,z space
53// const G4double r[], // r coordinate of these corners
54// const G4double z[]) // z coordinate of these corners
55
56// Author:
57// David C. Williams ([email protected])
58// --------------------------------------------------------------------
59
60#ifndef G4Polycone_hh
61#define G4Polycone_hh
62
63#include "G4VCSGfaceted.hh"
64#include "G4PolyconeSide.hh"
65
68class G4VCSGface;
70{
71 public:
76
83};
84
86{
87
88 public: // with description
89
90 G4Polycone( const G4String& name,
91 G4double phiStart, // initial phi starting angle
92 G4double phiTotal, // total phi angle
93 G4int numZPlanes, // number of z planes
94 const G4double zPlane[], // position of z planes
95 const G4double rInner[], // tangent distance to inner surface
96 const G4double rOuter[] ); // tangent distance to outer surface
97
98 G4Polycone( const G4String& name,
99 G4double phiStart, // initial phi starting angle
100 G4double phiTotal, // total phi angle
101 G4int numRZ, // number corners in r,z space
102 const G4double r[], // r coordinate of these corners
103 const G4double z[] ); // z coordinate of these corners
104
105 virtual ~G4Polycone();
106
107 // Methods for solid
108
109 EInside Inside( const G4ThreeVector &p ) const;
110 G4double DistanceToIn( const G4ThreeVector &p, const G4ThreeVector &v ) const;
111 G4double DistanceToIn( const G4ThreeVector &p ) const;
112
114
116 const G4int n,
117 const G4VPhysicalVolume* pRep );
118
120
121 G4VSolid* Clone() const;
122
123 std::ostream& StreamInfo(std::ostream& os) const;
124
126 G4NURBS* CreateNURBS() const;
127
128 G4bool Reset();
129
130 // Accessors
131
132 inline G4double GetStartPhi() const;
133 inline G4double GetEndPhi() const;
134 inline G4bool IsOpen() const;
135 inline G4bool IsGeneric() const;
136 inline G4int GetNumRZCorner() const;
137 inline G4PolyconeSideRZ GetCorner(G4int index) const;
140
141 public: // without description
142
143 G4Polycone(__void__&);
144 // Fake default constructor for usage restricted to direct object
145 // persistency for clients requiring preallocation of memory for
146 // persistifiable objects.
147
148 G4Polycone( const G4Polycone &source );
149 const G4Polycone &operator=( const G4Polycone &source );
150 // Copy constructor and assignment operator.
151
152 protected: // without description
153
154 // Generic initializer, called by all constructors
155
157
158 void Create( G4double phiStart, // initial phi starting angle
159 G4double phiTotal, // total phi angle
160 G4ReduciblePolygon *rz ); // r/z coordinate of these corners
161
162 void CopyStuff( const G4Polycone &source );
163
164 // Methods for random point generation
165
167 G4double fRmin2, G4double fRmax2,
168 G4double zOne, G4double zTwo,
169 G4double& totArea) const;
170
172 G4double zOne, G4double zTwo,
173 G4double& totArea) const;
174
176 G4double fRMin2, G4double fRMax2,
177 G4double zOne, G4double zTwo,
178 G4double& totArea) const;
179
181 G4double fRMin2, G4double fRMax2,
182 G4double zOne) const;
183
184 protected: // without description
185
186 // Here are our parameters
187
188 G4double startPhi; // Starting phi value (0 < phiStart < 2pi)
189 G4double endPhi; // end phi value (0 < endPhi-phiStart < 2pi)
190 G4bool phiIsOpen; // true if there is a phi segment
191 G4bool genericPcon; // true if created through the 2nd generic constructor
192 G4int numCorner; // number RZ points
193 G4PolyconeSideRZ *corners; // corner r,z points
194 G4PolyconeHistorical *original_parameters; // original input parameters
195
196 // Our quick test
197
199
200};
201
202#include "G4Polycone.icc"
203
204#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4double Opening_angle
Definition: G4Polycone.hh:78
G4double * Z_values
Definition: G4Polycone.hh:80
G4PolyconeHistorical & operator=(const G4PolyconeHistorical &right)
Definition: G4Polycone.cc:1234
G4bool phiIsOpen
Definition: G4Polycone.hh:190
G4EnclosingCylinder * enclosingCylinder
Definition: G4Polycone.hh:198
G4NURBS * CreateNURBS() const
Definition: G4Polycone.cc:1191
G4ThreeVector GetPointOnSurface() const
Definition: G4Polycone.cc:795
void SetOriginalParameters()
virtual ~G4Polycone()
Definition: G4Polycone.cc:326
G4GeometryType GetEntityType() const
Definition: G4Polycone.cc:508
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Definition: G4Polycone.cc:470
G4ThreeVector GetPointOnTubs(G4double fRMin, G4double fRMax, G4double zOne, G4double zTwo, G4double &totArea) const
Definition: G4Polycone.cc:673
G4ThreeVector GetPointOnCone(G4double fRmin1, G4double fRmax1, G4double fRmin2, G4double fRmax2, G4double zOne, G4double zTwo, G4double &totArea) const
Definition: G4Polycone.cc:577
G4double GetEndPhi() const
const G4Polycone & operator=(const G4Polycone &source)
Definition: G4Polycone.cc:347
G4Polyhedron * CreatePolyhedron() const
Definition: G4Polycone.cc:891
void Create(G4double phiStart, G4double phiTotal, G4ReduciblePolygon *rz)
Definition: G4Polycone.cc:148
EInside Inside(const G4ThreeVector &p) const
Definition: G4Polycone.cc:450
G4double endPhi
Definition: G4Polycone.hh:189
G4VSolid * Clone() const
Definition: G4Polycone.cc:516
void SetOriginalParameters(G4PolyconeHistorical *pars)
void CopyStuff(const G4Polycone &source)
Definition: G4Polycone.cc:367
G4double GetStartPhi() const
G4bool IsGeneric() const
G4bool genericPcon
Definition: G4Polycone.hh:191
G4PolyconeHistorical * GetOriginalParameters() const
G4PolyconeSideRZ * corners
Definition: G4Polycone.hh:193
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
Definition: G4Polycone.cc:498
G4bool IsOpen() const
G4bool Reset()
Definition: G4Polycone.cc:409
G4int numCorner
Definition: G4Polycone.hh:192
G4PolyconeHistorical * original_parameters
Definition: G4Polycone.hh:194
G4ThreeVector GetPointOnRing(G4double fRMin, G4double fRMax, G4double fRMin2, G4double fRMax2, G4double zOne) const
Definition: G4Polycone.cc:732
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4Polycone.cc:524
G4int GetNumRZCorner() const
G4ThreeVector GetPointOnCut(G4double fRMin1, G4double fRMax1, G4double fRMin2, G4double fRMax2, G4double zOne, G4double zTwo, G4double &totArea) const
Definition: G4Polycone.cc:776
G4PolyconeSideRZ GetCorner(G4int index) const
G4double startPhi
Definition: G4Polycone.hh:188
EInside
Definition: geomdefs.hh:58