Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParameterisationPolycone.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// G4ParameterisationPolycone[Rho/Phi/Z]
27//
28// Class description:
29//
30// These classes represent the parameterised positioning equivalent to
31// dividing a G4Polycone along one of each axis Rho, Phi, Z.
32
33// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
34// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
35//---------------------------------------------------------------------
36#ifndef G4PARAMETERISATIONPOLYCONE_HH
37#define G4PARAMETERISATIONPOLYCONE_HH 1
38
40#include "G4Polycone.hh"
41
43
44// Dummy declarations to get rid of warnings ...
45//
46class G4Trd;
47class G4Trap;
48class G4Cons;
49class G4Orb;
50class G4Ellipsoid;
51class G4Sphere;
52class G4Torus;
53class G4Para;
54class G4Hype;
55class G4Tubs;
56class G4Polyhedra;
57
58/**
59 * @brief G4VParameterisationPolycone is the base class for the parameterised
60 * positioning equivalent to dividing a G4Polycone along one of each axis Rho,
61 * Phi, Z.
62 */
63
65{
66 public:
67
68 /**
69 * Initialises a parameterised polycone, given the axis of parameterisation
70 * 'axis' and the number of divided slices 'nCopies'.
71 * @param[in] axis The axis along which apply the parameterisation.
72 * @param[in] nCopies The total number of divided slices.
73 * @param[in] offset Potential initial offset along the axis.
74 * @param[in] step The width of the divided slice.
75 * @param[in] pSolid Pointer to the original shape to parameterise.
76 * @param[in] divType String identifier for the kind of division.
77 */
80 G4VSolid* pSolid, DivisionType divType );
81
82 /**
83 * Default Destructor.
84 */
86};
87
88/**
89 * @brief G4ParameterisationPolyconeRho represents the parameterised positioning
90 * equivalent to dividing a G4Polycone along Rho axis.
91 */
92
94{
95 public:
96
97 /**
98 * Initialises a parameterised polycone, along the Rho axis.
99 * @param[in] axis The axis along which apply the parameterisation.
100 * @param[in] nCopies The total number of divided slices.
101 * @param[in] offset Potential initial offset along the axis.
102 * @param[in] step The width of the divided slice.
103 * @param[in] pSolid Pointer to the original shape to parameterise.
104 * @param[in] divType String identifier for the kind of division.
105 */
108 G4VSolid* pSolid,
109 DivisionType divType );
110
111 /**
112 * Default Destructor.
113 */
115
116 /**
117 * Checks the validity of parameters given in input, issuing an exception.
118 */
119 void CheckParametersValidity() override;
120
121 /**
122 * Returns the max width along Rho.
123 * @returns The maximum width of the solid to divide along the Rho axis.
124 */
125 G4double GetMaxParameter() const override;
126
127 /**
128 * Concrete methods implementing the parameterisation.
129 */
130 void ComputeTransformation( const G4int copyNo,
131 G4VPhysicalVolume* physVol ) const override;
132 void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
133 const G4VPhysicalVolume* physVol ) const override;
134
135 private: // Dummy declarations to get rid of warnings ...
136
137 void ComputeDimensions (G4Trd&,const G4int,
138 const G4VPhysicalVolume*) const override {}
139 void ComputeDimensions (G4Trap&,const G4int,
140 const G4VPhysicalVolume*) const override {}
141 void ComputeDimensions (G4Box&,const G4int,
142 const G4VPhysicalVolume*) const override {}
143 void ComputeDimensions (G4Orb&,const G4int,
144 const G4VPhysicalVolume*) const override {}
145 void ComputeDimensions (G4Ellipsoid&,const G4int,
146 const G4VPhysicalVolume*) const override {}
147 void ComputeDimensions (G4Sphere&,const G4int,
148 const G4VPhysicalVolume*) const override {}
149 void ComputeDimensions (G4Torus&,const G4int,
150 const G4VPhysicalVolume*) const override {}
151 void ComputeDimensions (G4Para&,const G4int,
152 const G4VPhysicalVolume*) const override {}
153 void ComputeDimensions (G4Hype&,const G4int,
154 const G4VPhysicalVolume*) const override {}
155 void ComputeDimensions (G4Tubs&,const G4int,
156 const G4VPhysicalVolume*) const override {}
157 void ComputeDimensions (G4Cons&,const G4int,
158 const G4VPhysicalVolume*) const override {}
159 void ComputeDimensions (G4Polyhedra&,const G4int,
160 const G4VPhysicalVolume*) const override {}
161};
162
163/**
164 * @brief G4ParameterisationPolyconePhi represents the parameterised positioning
165 * equivalent to dividing a G4Polycone along Phi axis.
166 */
167
169{
170 public:
171
172 /**
173 * Initialises a parameterised polycone, along the Phi axis.
174 * @param[in] axis The axis along which apply the parameterisation.
175 * @param[in] nCopies The total number of divided slices.
176 * @param[in] offset Potential initial offset along the axis.
177 * @param[in] step The width of the divided slice.
178 * @param[in] pSolid Pointer to the original shape to parameterise.
179 * @param[in] divType String identifier for the kind of division.
180 */
183 G4VSolid* pSolid,
184 DivisionType divType );
185
186 /**
187 * Default Destructor.
188 */
190
191 /**
192 * Returns the max width along Phi.
193 * @returns The maximum width of the solid to divide along the Phi axis.
194 */
195 G4double GetMaxParameter() const override;
196
197 /**
198 * Concrete methods implementing the parameterisation.
199 */
200 void ComputeTransformation( const G4int copyNo,
201 G4VPhysicalVolume* physVol ) const override;
202 void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
203 const G4VPhysicalVolume* physVol ) const override;
204
205 private: // Dummy declarations to get rid of warnings ...
206
207 void ComputeDimensions (G4Trd&,const G4int,
208 const G4VPhysicalVolume*) const override {}
209 void ComputeDimensions (G4Trap&,const G4int,
210 const G4VPhysicalVolume*) const override {}
211 void ComputeDimensions (G4Box&,const G4int,
212 const G4VPhysicalVolume*) const override {}
213 void ComputeDimensions (G4Orb&,const G4int,
214 const G4VPhysicalVolume*) const override {}
215 void ComputeDimensions (G4Sphere&,const G4int,
216 const G4VPhysicalVolume*) const override {}
217 void ComputeDimensions (G4Ellipsoid&,const G4int,
218 const G4VPhysicalVolume*) const override {}
219 void ComputeDimensions (G4Torus&,const G4int,
220 const G4VPhysicalVolume*) const override {}
221 void ComputeDimensions (G4Para&,const G4int,
222 const G4VPhysicalVolume*) const override {}
223 void ComputeDimensions (G4Hype&,const G4int,
224 const G4VPhysicalVolume*) const override {}
225 void ComputeDimensions (G4Tubs&,const G4int,
226 const G4VPhysicalVolume*) const override {}
227 void ComputeDimensions (G4Cons&,const G4int,
228 const G4VPhysicalVolume*) const override {}
229 void ComputeDimensions (G4Polyhedra&,const G4int,
230 const G4VPhysicalVolume*) const override {}
231};
232
233/**
234 * @brief G4ParameterisationPolyconeZ represents the parameterised positioning
235 * equivalent to dividing a G4Polycone along Z axis.
236 */
237
239{
240 public:
241
242 /**
243 * Initialises a parameterised polycone, along the Z axis.
244 * @param[in] axis The axis along which apply the parameterisation.
245 * @param[in] nCopies The total number of divided slices.
246 * @param[in] offset Potential initial offset along the axis.
247 * @param[in] step The width of the divided slice.
248 * @param[in] pSolid Pointer to the original shape to parameterise.
249 * @param[in] divType String identifier for the kind of division.
250 */
253 G4VSolid* pSolid,
254 DivisionType divType );
255
256 /**
257 * Default Destructor.
258 */
260
261 /**
262 * Checks the validity of parameters given in input, issuing an exception.
263 */
264 void CheckParametersValidity() override;
265
266 /**
267 * Returns the max width along Z.
268 * @returns The maximum width of the solid to divide along the Z axis.
269 */
270 G4double GetMaxParameter() const override;
271
272 /**
273 * Concrete methods implementing the parameterisation.
274 */
275 void ComputeTransformation( const G4int copyNo,
276 G4VPhysicalVolume* physVol ) const override;
277 void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
278 const G4VPhysicalVolume* physVol ) const override;
279
280 private:
281
282 /**
283 * Internal accessors for the original R parameters of the solid to divide.
284 */
285 G4double GetR(G4double z, G4double z1, G4double r1,
286 G4double z2, G4double r2) const;
287 G4double GetRmin(G4double z, G4int nsegment) const;
288 G4double GetRmax(G4double z, G4int nsegment) const;
289
290 // Dummy declarations to get rid of warnings ...
291
292 void ComputeDimensions (G4Trd&,const G4int,
293 const G4VPhysicalVolume*) const override {}
294 void ComputeDimensions (G4Trap&,const G4int,
295 const G4VPhysicalVolume*) const override {}
296 void ComputeDimensions (G4Box&,const G4int,
297 const G4VPhysicalVolume*) const override {}
298 void ComputeDimensions (G4Orb&,const G4int,
299 const G4VPhysicalVolume*) const override {}
300 void ComputeDimensions (G4Sphere&,const G4int,
301 const G4VPhysicalVolume*) const override {}
302 void ComputeDimensions (G4Ellipsoid&,const G4int,
303 const G4VPhysicalVolume*) const override {}
304 void ComputeDimensions (G4Torus&,const G4int,
305 const G4VPhysicalVolume*) const override {}
306 void ComputeDimensions (G4Para&,const G4int,
307 const G4VPhysicalVolume*) const override {}
308 void ComputeDimensions (G4Hype&,const G4int,
309 const G4VPhysicalVolume*) const override {}
310 void ComputeDimensions (G4Tubs&,const G4int,
311 const G4VPhysicalVolume*) const override {}
312 void ComputeDimensions (G4Cons&,const G4int,
313 const G4VPhysicalVolume*) const override {}
314 void ComputeDimensions (G4Polyhedra&,const G4int,
315 const G4VPhysicalVolume*) const override {}
316 private:
317
318 G4int fNSegment = 0;
319 G4PolyconeHistorical* fOrigParamMother = nullptr;
320};
321
322#endif
G4ThreadLocal T * G4GeomSplitter< T >::offset
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4Cons is, in the general case, a Phi segment of a cone, with half-length fDz, inner and outer radii ...
Definition G4Cons.hh:85
G4Ellipsoid is an ellipsoidal solid, optionally cut at a given Z.
G4Hype is a tube with hyperbolic profile; it describes an hyperbolic volume with curved sides paralle...
Definition G4Hype.hh:72
G4Orb represents a full sphere.
Definition G4Orb.hh:59
G4Para represents a parallelepiped, essentially a box with half lengths dx,dy,dz 'skewed' so that the...
Definition G4Para.hh:86
G4ParameterisationPolyconePhi(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const override
~G4ParameterisationPolyconePhi() override
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const override
~G4ParameterisationPolyconeRho() override
G4ParameterisationPolyconeRho(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const override
G4ParameterisationPolyconeZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
~G4ParameterisationPolyconeZ() override
G4double GetMaxParameter() const override
G4Polycone represents a composed closed shape (PCON) made of cones and cylinders, along the Z axis wi...
Definition G4Polycone.hh:82
G4Polyhedra represents a composed closed polyhedra (PGON) made of planar sizes along the Z axis,...
G4Sphere is, in the general case, a section of a spherical shell, between specified phi and theta ang...
Definition G4Sphere.hh:89
G4Torus represents a torus or torus segment with curved sides parallel to the z-axis....
Definition G4Torus.hh:102
G4Trap is a general trapezoid: the faces perpendicular to the Z planes are trapezia,...
Definition G4Trap.hh:116
G4Trd is a trapezoid with the X and Y dimensions varying along Z.
Definition G4Trd.hh:65
G4Tubs is a tube or tube segment with curved sides parallel to the Z-axis. The tube has a specified h...
Definition G4Tubs.hh:85
G4VDivisionParameterisation(EAxis axis, G4int nDiv, G4double width, G4double offset, DivisionType divType, G4VSolid *motherSolid=nullptr)
G4VParameterisationPolycone(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
~G4VParameterisationPolycone() override
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....
G4VSolid is an abstract base class for solids, physical shapes that can be tracked through....
Definition G4VSolid.hh:80
EAxis
Definition geomdefs.hh:54
const axis_t axis_to_type< N >::axis
Definition pugixml.cc:9668