Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParameterisationTrd.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// G4ParameterisationTrd[X/Y/Z]
27//
28// Class description:
29//
30// This class represents the parameterised positioning equivalent to
31// dividing a trapezoid along one of each axis X, Y, Z.
32
33// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
34// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
35// --------------------------------------------------------------------
36#ifndef G4PARAMETERISATIONTRD_HH
37#define G4PARAMETERISATIONTRD_HH 1
38
39#include <vector>
40
42#include "G4VSolid.hh"
43
45
46// Dummy declarations to get rid of warnings ...
47//
48class G4Cons;
49class G4Box;
50class G4Sphere;
51class G4Orb;
52class G4Ellipsoid;
53class G4Torus;
54class G4Para;
55class G4Hype;
56class G4Tubs;
57class G4Polycone;
58class G4Polyhedra;
59
60/**
61 * @brief G4VParameterisationTrd is the base class for the parameterised
62 * positioning equivalent to dividing a trapezoid along one of each axis X, Y, Z.
63 */
64
66{
67 public:
68
69 /**
70 * Initialises a parameterised Trd, given the axis of parameterisation
71 * 'axis' and the number of divided copies 'nCopies'.
72 * @param[in] axis The axis along which apply the parameterisation.
73 * @param[in] nCopies The total number of divided copies.
74 * @param[in] offset Potential initial offset along the axis.
75 * @param[in] step The width of the divided entity.
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 protected:
89
91};
92
93/**
94 * @brief G4ParameterisationTrdX represents the parameterised positioning
95 * equivalent to dividing a G4Trd along X axis.
96 */
97
99{
100 public:
101
102 /**
103 * Initialises a parameterised Trd along X axis.
104 * @param[in] axis The axis along which apply the parameterisation.
105 * @param[in] nCopies The total number of divided copies.
106 * @param[in] offset Potential initial offset along the axis.
107 * @param[in] step The width of the divided entity.
108 * @param[in] pSolid Pointer to the original shape to parameterise.
109 * @param[in] divType String identifier for the kind of division.
110 */
112 G4double width, G4double offset,
113 G4VSolid* pSolid, DivisionType divType );
114
115 /**
116 * Default Destructor.
117 */
119
120 /**
121 * Returns the max width along X.
122 * @returns The maximum width of the solid to divide along the X axis.
123 */
124 G4double GetMaxParameter() const override;
125
126 /**
127 * Concrete methods implementing the parameterisation.
128 */
129 void ComputeTransformation(const G4int copyNo,
130 G4VPhysicalVolume* physVol) const override;
131 void ComputeDimensions(G4Trd& trd, const G4int copyNo,
132 const G4VPhysicalVolume* pv) const override;
133 void ComputeDimensions(G4Trap& trd, const G4int copyNo,
134 const G4VPhysicalVolume* pv) const override;
135
136 private: // Dummy declarations to get rid of warnings ...
137
138 void ComputeDimensions (G4Cons&,const G4int,
139 const G4VPhysicalVolume*) const override {}
140 void ComputeDimensions (G4Box&,const G4int,
141 const G4VPhysicalVolume*) const override {}
142 void ComputeDimensions (G4Sphere&,const G4int,
143 const G4VPhysicalVolume*) const override {}
144 void ComputeDimensions (G4Orb&,const G4int,
145 const G4VPhysicalVolume*) const override {}
146 void ComputeDimensions (G4Ellipsoid&,const G4int,
147 const G4VPhysicalVolume*) const override {}
148 void ComputeDimensions (G4Torus&,const G4int,
149 const G4VPhysicalVolume*) const override {}
150 void ComputeDimensions (G4Para&,const G4int,
151 const G4VPhysicalVolume*) const override {}
152 void ComputeDimensions (G4Hype&,const G4int,
153 const G4VPhysicalVolume*) const override {}
154 void ComputeDimensions (G4Tubs&,const G4int,
155 const G4VPhysicalVolume*) const override {}
156 void ComputeDimensions (G4Polycone&,const G4int,
157 const G4VPhysicalVolume*) const override {}
158 void ComputeDimensions (G4Polyhedra&,const G4int,
159 const G4VPhysicalVolume*) const override {}
160};
161
162/**
163 * @brief G4ParameterisationTrdY represents the parameterised positioning
164 * equivalent to dividing a G4Trd along Y axis.
165 */
166
168{
169 public:
170
171 /**
172 * Initialises a parameterised Trd along Y axis.
173 * @param[in] axis The axis along which apply the parameterisation.
174 * @param[in] nCopies The total number of divided copies.
175 * @param[in] offset Potential initial offset along the axis.
176 * @param[in] step The width of the divided entity.
177 * @param[in] pSolid Pointer to the original shape to parameterise.
178 * @param[in] divType String identifier for the kind of division.
179 */
181 G4double width, G4double offset,
182 G4VSolid* pSolid, DivisionType divType );
183
184 /**
185 * Default Destructor.
186 */
188
189 /**
190 * Returns the max width along Y.
191 * @returns The maximum width of the solid to divide along the Y axis.
192 */
193 G4double GetMaxParameter() const override;
194
195 /**
196 * Concrete methods implementing the parameterisation.
197 */
198 void ComputeTransformation(const G4int copyNo,
199 G4VPhysicalVolume *physVol) const override;
200 void ComputeDimensions(G4Trd& trd, const G4int copyNo,
201 const G4VPhysicalVolume* pv) const override;
202 void ComputeDimensions (G4Trap&,const G4int,
203 const G4VPhysicalVolume*) const override;
204
205 private: // Dummy declarations to get rid of warnings ...
206
207 void ComputeDimensions (G4Cons&,const G4int,
208 const G4VPhysicalVolume*) const override {}
209 void ComputeDimensions (G4Box&,const G4int,
210 const G4VPhysicalVolume*) const override {}
211 void ComputeDimensions (G4Sphere&,const G4int,
212 const G4VPhysicalVolume*) const override {}
213 void ComputeDimensions (G4Orb&,const G4int,
214 const G4VPhysicalVolume*) const override {}
215 void ComputeDimensions (G4Ellipsoid&,const G4int,
216 const G4VPhysicalVolume*) const override {}
217 void ComputeDimensions (G4Torus&,const G4int,
218 const G4VPhysicalVolume*) const override {}
219 void ComputeDimensions (G4Para&,const G4int,
220 const G4VPhysicalVolume*) const override {}
221 void ComputeDimensions (G4Hype&,const G4int,
222 const G4VPhysicalVolume*) const override {}
223 void ComputeDimensions (G4Tubs&,const G4int,
224 const G4VPhysicalVolume*) const override {}
225 void ComputeDimensions (G4Polycone&,const G4int,
226 const G4VPhysicalVolume*) const override {}
227 void ComputeDimensions (G4Polyhedra&,const G4int,
228 const G4VPhysicalVolume*) const override {}
229};
230
231/**
232 * @brief G4ParameterisationTrdZ represents the parameterised positioning
233 * equivalent to dividing a G4Trd along Z axis.
234 */
235
237{
238 public:
239
240 /**
241 * Initialises a parameterised Trd along Z axis.
242 * @param[in] axis The axis along which apply the parameterisation.
243 * @param[in] nCopies The total number of divided copies.
244 * @param[in] offset Potential initial offset along the axis.
245 * @param[in] step The width of the divided entity.
246 * @param[in] pSolid Pointer to the original shape to parameterise.
247 * @param[in] divType String identifier for the kind of division.
248 */
250 G4double width, G4double offset,
251 G4VSolid* pSolid, DivisionType divType );
252
253 /**
254 * Default Destructor.
255 */
257
258 /**
259 * Returns the max width along Z.
260 * @returns The maximum width of the solid to divide along the Z axis.
261 */
262 G4double GetMaxParameter() const override;
263
264 /**
265 * Concrete methods implementing the parameterisation.
266 */
267 void ComputeTransformation(const G4int copyNo,
268 G4VPhysicalVolume* physVol) const override;
269 void ComputeDimensions(G4Trd& trd, const G4int copyNo,
270 const G4VPhysicalVolume* pv) const override;
271
272 private: // Dummy declarations to get rid of warnings ...
273
274 void ComputeDimensions (G4Cons&,const G4int,
275 const G4VPhysicalVolume*) const override {}
276 void ComputeDimensions (G4Box&,const G4int,
277 const G4VPhysicalVolume*) const override {}
278 void ComputeDimensions (G4Sphere&,const G4int,
279 const G4VPhysicalVolume*) const override {}
280 void ComputeDimensions (G4Orb&,const G4int,
281 const G4VPhysicalVolume*) const override {}
282 void ComputeDimensions (G4Ellipsoid&,const G4int,
283 const G4VPhysicalVolume*) const override {}
284 void ComputeDimensions (G4Torus&,const G4int,
285 const G4VPhysicalVolume*) const override {}
286 void ComputeDimensions (G4Para&,const G4int,
287 const G4VPhysicalVolume*) const override {}
288 void ComputeDimensions (G4Trap&,const G4int,
289 const G4VPhysicalVolume*) const override {}
290 void ComputeDimensions (G4Hype&,const G4int,
291 const G4VPhysicalVolume*) const override {}
292 void ComputeDimensions (G4Tubs&,const G4int,
293 const G4VPhysicalVolume*) const override {}
294 void ComputeDimensions (G4Polycone&,const G4int,
295 const G4VPhysicalVolume*) const override {}
296 void ComputeDimensions (G4Polyhedra&,const G4int,
297 const G4VPhysicalVolume*) const override {}
298};
299
300#endif
G4ThreadLocal T * G4GeomSplitter< T >::offset
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
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(G4Trd &trd, const G4int copyNo, const G4VPhysicalVolume *pv) const override
G4ParameterisationTrdX(EAxis axis, G4int nCopies, G4double width, G4double offset, G4VSolid *pSolid, DivisionType divType)
G4double GetMaxParameter() const override
~G4ParameterisationTrdX() override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
G4ParameterisationTrdY(EAxis axis, G4int nCopies, G4double width, G4double offset, G4VSolid *pSolid, DivisionType divType)
G4double GetMaxParameter() const override
void ComputeDimensions(G4Trd &trd, const G4int copyNo, const G4VPhysicalVolume *pv) const override
~G4ParameterisationTrdY() override
G4double GetMaxParameter() const override
void ComputeDimensions(G4Trd &trd, const G4int copyNo, const G4VPhysicalVolume *pv) const override
~G4ParameterisationTrdZ() override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
G4ParameterisationTrdZ(EAxis axis, G4int nCopies, G4double width, G4double offset, G4VSolid *pSolid, DivisionType divType)
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)
G4VParameterisationTrd(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
~G4VParameterisationTrd() 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