Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParameterisationCons.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// G4ParameterisationCons[Rho/Phi/Z]
27//
28// Class description:
29//
30// These classes represent the parameterised positioning equivalent to
31// dividing a G4Cons 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 G4PARAMETERISATIONCONS_HH
37#define G4PARAMETERISATIONCONS_HH 1
38
40
41class G4VSolid;
43
44// Dummy declarations to get rid of warnings ...
45//
46class G4Trd;
47class G4Trap;
48class G4Box;
49class G4Sphere;
50class G4Orb;
51class G4Ellipsoid;
52class G4Torus;
53class G4Para;
54class G4Hype;
55class G4Tubs;
56class G4Polycone;
57class G4Polyhedra;
58
59/**
60 * @brief G4VParameterisationCons is the base class for the parameterised
61 * positioning equivalent to dividing a G4Cons along one of each axis Rho,
62 * Phi, Z.
63 */
64
66{
67 public:
68
69 /**
70 * Initialises a parameterised cons, given the axis of parameterisation
71 * 'axis' and the number of divided slices 'nCopies'.
72 * @param[in] axis The axis along which apply the parameterisation.
73 * @param[in] nCopies The total number of divided slices.
74 * @param[in] offset Potential initial offset along the axis.
75 * @param[in] step The width of the divided slice.
76 * @param[in] pSolid Pointer to the original shape to parameterise.
77 * @param[in] divType String identifier for the kind of division.
78 */
81 G4VSolid* pSolid, DivisionType divType );
82
83 /**
84 * Default Destructor.
85 */
87};
88
89/**
90 * @brief G4ParameterisationConsRho represents the parameterised positioning
91 * equivalent to dividing a G4Cons along Rho axis.
92 */
93
95{
96 public:
97
98 /**
99 * Initialises a parameterised cons, along the Rho axis.
100 * @param[in] axis The axis along which apply the parameterisation.
101 * @param[in] nCopies The total number of divided slices.
102 * @param[in] offset Potential initial offset along the axis.
103 * @param[in] step The width of the divided slice.
104 * @param[in] pSolid Pointer to the original shape to parameterise.
105 * @param[in] divType String identifier for the kind of division.
106 */
109 G4VSolid* pSolid, DivisionType divType );
110
111 /**
112 * Default Destructor.
113 */
115
116 /**
117 * Returns the max width along Rho.
118 * @returns The maximum width of the solid to divide along the Rho axis.
119 */
120 G4double GetMaxParameter() const override;
121
122 /**
123 * Concrete methods implementing the parameterisation.
124 */
125 void ComputeTransformation( const G4int copyNo,
126 G4VPhysicalVolume* physVol ) const override;
127 void ComputeDimensions( G4Cons& tubs, const G4int copyNo,
128 const G4VPhysicalVolume* physVol) const override;
129
130 private: // Dummy declarations to get rid of warnings ...
131
132 void ComputeDimensions (G4Trd&,const G4int,
133 const G4VPhysicalVolume*) const override {}
134 void ComputeDimensions (G4Trap&,const G4int,
135 const G4VPhysicalVolume*) const override {}
136 void ComputeDimensions (G4Box&,const G4int,
137 const G4VPhysicalVolume*) const override {}
138 void ComputeDimensions (G4Sphere&,const G4int,
139 const G4VPhysicalVolume*) const override {}
140 void ComputeDimensions (G4Orb&,const G4int,
141 const G4VPhysicalVolume*) const override {}
142 void ComputeDimensions (G4Ellipsoid&,const G4int,
143 const G4VPhysicalVolume*) const override {}
144 void ComputeDimensions (G4Torus&,const G4int,
145 const G4VPhysicalVolume*) const override {}
146 void ComputeDimensions (G4Para&,const G4int,
147 const G4VPhysicalVolume*) const override {}
148 void ComputeDimensions (G4Hype&,const G4int,
149 const G4VPhysicalVolume*) const override {}
150 void ComputeDimensions (G4Tubs&,const G4int,
151 const G4VPhysicalVolume*) const override {}
152 void ComputeDimensions (G4Polycone&,const G4int,
153 const G4VPhysicalVolume*) const override {}
154 void ComputeDimensions (G4Polyhedra&,const G4int,
155 const G4VPhysicalVolume*) const override {}
156};
157
158/**
159 * @brief G4ParameterisationConsPhi represents the parameterised positioning
160 * equivalent to dividing a G4Cons along Phi axis.
161 */
162
164{
165 public:
166
167 /**
168 * Initialises a parameterised cons, along the Phi axis.
169 * @param[in] axis The axis along which apply the parameterisation.
170 * @param[in] nCopies The total number of divided slices.
171 * @param[in] offset Potential initial offset along the axis.
172 * @param[in] step The width of the divided slice.
173 * @param[in] pSolid Pointer to the original shape to parameterise.
174 * @param[in] divType String identifier for the kind of division.
175 */
178 G4VSolid* pSolid, DivisionType divType );
179
180 /**
181 * Default Destructor.
182 */
184
185 /**
186 * Returns the max width along Phi.
187 * @returns The maximum width of the solid to divide along the Phi axis.
188 */
189 G4double GetMaxParameter() const override;
190
191 /**
192 * Concrete methods implementing the parameterisation.
193 */
194 void ComputeTransformation( const G4int copyNo,
195 G4VPhysicalVolume* physVol ) const override;
196 void ComputeDimensions( G4Cons& tubs, const G4int copyNo,
197 const G4VPhysicalVolume* physVol ) const override;
198
199 private: // Dummy declarations to get rid of warnings ...
200
201 void ComputeDimensions (G4Trd&,const G4int,
202 const G4VPhysicalVolume*) const override {}
203 void ComputeDimensions (G4Trap&,const G4int,
204 const G4VPhysicalVolume*) const override {}
205 void ComputeDimensions (G4Box&,const G4int,
206 const G4VPhysicalVolume*) const override {}
207 void ComputeDimensions (G4Sphere&,const G4int,
208 const G4VPhysicalVolume*) const override {}
209 void ComputeDimensions (G4Orb&,const G4int,
210 const G4VPhysicalVolume*) const override {}
211 void ComputeDimensions (G4Ellipsoid&,const G4int,
212 const G4VPhysicalVolume*) const override {}
213 void ComputeDimensions (G4Torus&,const G4int,
214 const G4VPhysicalVolume*) const override {}
215 void ComputeDimensions (G4Para&,const G4int,
216 const G4VPhysicalVolume*) const override {}
217 void ComputeDimensions (G4Hype&,const G4int,
218 const G4VPhysicalVolume*) const override {}
219 void ComputeDimensions (G4Tubs&,const G4int,
220 const G4VPhysicalVolume*) const override {}
221 void ComputeDimensions (G4Polycone&,const G4int,
222 const G4VPhysicalVolume*) const override {}
223 void ComputeDimensions (G4Polyhedra&,const G4int,
224 const G4VPhysicalVolume*) const override {}
225};
226
227/**
228 * @brief G4ParameterisationConsZ represents the parameterised positioning
229 * equivalent to dividing a G4Cons along Z axis.
230 */
231
233{
234 public:
235
236 /**
237 * Initialises a parameterised cons, along the Z axis.
238 * @param[in] axis The axis along which apply the parameterisation.
239 * @param[in] nCopies The total number of divided slices.
240 * @param[in] offset Potential initial offset along the axis.
241 * @param[in] step The width of the divided slice.
242 * @param[in] pSolid Pointer to the original shape to parameterise.
243 * @param[in] divType String identifier for the kind of division.
244 */
247 G4VSolid* pSolid, DivisionType divType );
248
249 /**
250 * Default Destructor.
251 */
253
254 /**
255 * Returns the max width along Z.
256 * @returns The maximum width of the solid to divide along the Z axis.
257 */
258 G4double GetMaxParameter() const override;
259
260 /**
261 * Concrete methods implementing the parameterisation.
262 */
263 void ComputeTransformation( const G4int copyNo,
264 G4VPhysicalVolume* physVol ) const override;
265 void ComputeDimensions( G4Cons& tubs, const G4int copyNo,
266 const G4VPhysicalVolume* physVol ) const override;
267
268 private: // Dummy declarations to get rid of warnings ...
269
270 void ComputeDimensions (G4Trd&,const G4int,
271 const G4VPhysicalVolume*) const override {}
272 void ComputeDimensions (G4Trap&,const G4int,
273 const G4VPhysicalVolume*) const override {}
274 void ComputeDimensions (G4Box&,const G4int,
275 const G4VPhysicalVolume*) const override {}
276 void ComputeDimensions (G4Sphere&,const G4int,
277 const G4VPhysicalVolume*) const override {}
278 void ComputeDimensions (G4Orb&,const G4int,
279 const G4VPhysicalVolume*) const override {}
280 void ComputeDimensions (G4Ellipsoid&,const G4int,
281 const G4VPhysicalVolume*) const override {}
282 void ComputeDimensions (G4Torus&,const G4int,
283 const G4VPhysicalVolume*) const override {}
284 void ComputeDimensions (G4Para&,const G4int,
285 const G4VPhysicalVolume*) const override {}
286 void ComputeDimensions (G4Hype&,const G4int,
287 const G4VPhysicalVolume*) const override {}
288 void ComputeDimensions (G4Tubs&,const G4int,
289 const G4VPhysicalVolume*) const override {}
290 void ComputeDimensions (G4Polycone&,const G4int,
291 const G4VPhysicalVolume*) const override {}
292 void ComputeDimensions (G4Polyhedra&,const G4int,
293 const G4VPhysicalVolume*) const override {}
294};
295
296#endif
G4ThreadLocal T * G4GeomSplitter< T >::offset
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4Box is a cuboid of given half lengths dx,dy,dz. The Box is centred on the origin with sides paralle...
Definition G4Box.hh:58
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
void ComputeDimensions(G4Cons &tubs, const G4int copyNo, const G4VPhysicalVolume *physVol) const override
G4double GetMaxParameter() const override
~G4ParameterisationConsPhi() override
G4ParameterisationConsPhi(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
void ComputeDimensions(G4Cons &tubs, const G4int copyNo, const G4VPhysicalVolume *physVol) const override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
G4ParameterisationConsRho(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
~G4ParameterisationConsRho() override
G4double GetMaxParameter() const override
G4ParameterisationConsZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
G4double GetMaxParameter() const override
~G4ParameterisationConsZ() override
void ComputeDimensions(G4Cons &tubs, const G4int copyNo, const G4VPhysicalVolume *physVol) 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)
~G4VParameterisationCons() override
G4VParameterisationCons(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
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