Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParameterisationBox.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// G4ParameterisationBox[X/Y/Z]
27//
28// Class description:
29//
30// These classes represent the parameterised positioning equivalent to
31// dividing a G4Box 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 G4PARAMETERISATIONBOX_HH
37#define G4PARAMETERISATIONBOX_HH 1
38
40
41class G4VSolid;
43
44// Dummy declarations to get rid of warnings ...
45//
46class G4Cons;
47class G4Trd;
48class G4Sphere;
49class G4Orb;
50class G4Ellipsoid;
51class G4Torus;
52class G4Para;
53class G4Hype;
54class G4Tubs;
55class G4Polycone;
56class G4Polyhedra;
57
58/**
59 * @brief G4VParameterisationBox is the base class for the parameterised
60 * positioning equivalent to dividing a G4Box along one of each axis X, Y, Z.
61 */
62
64{
65 public:
66
67 /**
68 * Initialises a parameterised box, given the axis of parameterisation
69 * 'axis' and the number of divided copies 'nCopies'.
70 * @param[in] axis The axis along which apply the parameterisation.
71 * @param[in] nCopies The total number of divided copies.
72 * @param[in] offset Potential initial offset along the axis.
73 * @param[in] step The width of the divided entity.
74 * @param[in] pSolid Pointer to the original shape to parameterise.
75 * @param[in] divType String identifier for the kind of division.
76 */
79 G4VSolid* pSolid, DivisionType divType );
80
81 /**
82 * Default Destructor.
83 */
85};
86
87/**
88 * @brief G4ParameterisationBoxX represents the parameterised positioning
89 * equivalent to dividing a G4Box along X axis.
90 */
91
93{
94 public:
95
96 /**
97 * Initialises a parameterised box along X axis.
98 * @param[in] axis The axis along which apply the parameterisation.
99 * @param[in] nCopies The total number of divided copies.
100 * @param[in] offset Potential initial offset along the axis.
101 * @param[in] step The width of the divided entity.
102 * @param[in] pSolid Pointer to the original shape to parameterise.
103 * @param[in] divType String identifier for the kind of division.
104 */
107 G4VSolid* pSolid, DivisionType divType );
108
109 /**
110 * Default Destructor.
111 */
113
114 /**
115 * Returns the max width along X.
116 * @returns The maximum width of the solid to divide along the X axis.
117 */
118 G4double GetMaxParameter() const override;
119
120 /**
121 * Concrete methods implementing the parameterisation.
122 */
123 void ComputeTransformation( const G4int copyNo,
124 G4VPhysicalVolume* physVol ) const override;
125 void ComputeDimensions(G4Box& box, const G4int copyNo,
126 const G4VPhysicalVolume* physVol) const override;
127
128 private: // Dummy declarations to get rid of warnings ...
129
130 void ComputeDimensions (G4Cons&,const G4int,
131 const G4VPhysicalVolume*) const override {}
132 void ComputeDimensions (G4Trd&,const G4int,
133 const G4VPhysicalVolume*) const override {}
134 void ComputeDimensions (G4Sphere&,const G4int,
135 const G4VPhysicalVolume*) const override {}
136 void ComputeDimensions (G4Orb&,const G4int,
137 const G4VPhysicalVolume*) const override {}
138 void ComputeDimensions (G4Ellipsoid&,const G4int,
139 const G4VPhysicalVolume*) const override {}
140 void ComputeDimensions (G4Torus&,const G4int,
141 const G4VPhysicalVolume*) const override {}
142 void ComputeDimensions (G4Para&,const G4int,
143 const G4VPhysicalVolume*) const override {}
144 void ComputeDimensions (G4Trap&,const G4int,
145 const G4VPhysicalVolume*) const override {}
146 void ComputeDimensions (G4Hype&,const G4int,
147 const G4VPhysicalVolume*) const override {}
148 void ComputeDimensions (G4Tubs&,const G4int,
149 const G4VPhysicalVolume*) const override {}
150 void ComputeDimensions (G4Polycone&,const G4int,
151 const G4VPhysicalVolume*) const override {}
152 void ComputeDimensions (G4Polyhedra&,const G4int,
153 const G4VPhysicalVolume*) const override {}
154};
155
156/**
157 * @brief G4ParameterisationBoxY represents the parameterised positioning
158 * equivalent to dividing a G4Box along Y axis.
159 */
160
162{
163 public:
164
165 /**
166 * Initialises a parameterised box along Y axis.
167 * @param[in] axis The axis along which apply the parameterisation.
168 * @param[in] nCopies The total number of divided copies.
169 * @param[in] offset Potential initial offset along the axis.
170 * @param[in] step The width of the divided entity.
171 * @param[in] pSolid Pointer to the original shape to parameterise.
172 * @param[in] divType String identifier for the kind of division.
173 */
176 G4VSolid* pSolid, DivisionType divType );
177
178 /**
179 * Default Destructor.
180 */
182
183
184 /**
185 * Returns the max width along Y.
186 * @returns The maximum width of the solid to divide along the Y axis.
187 */
188 G4double GetMaxParameter() const override;
189
190 /**
191 * Concrete methods implementing the parameterisation.
192 */
193 void ComputeTransformation( const G4int copyNo,
194 G4VPhysicalVolume* physVol ) const override;
195 void ComputeDimensions(G4Box& box, const G4int copyNo,
196 const G4VPhysicalVolume* physVol) const override;
197
198 private: // Dummy declarations to get rid of warnings ...
199
200 void ComputeDimensions (G4Cons&,const G4int,
201 const G4VPhysicalVolume*) const override {}
202 void ComputeDimensions (G4Trd&,const G4int,
203 const G4VPhysicalVolume*) const override {}
204 void ComputeDimensions (G4Sphere&,const G4int,
205 const G4VPhysicalVolume*) const override {}
206 void ComputeDimensions (G4Orb&,const G4int,
207 const G4VPhysicalVolume*) const override {}
208 void ComputeDimensions (G4Ellipsoid&,const G4int,
209 const G4VPhysicalVolume*) const override {}
210 void ComputeDimensions (G4Torus&,const G4int,
211 const G4VPhysicalVolume*) const override {}
212 void ComputeDimensions (G4Para&,const G4int,
213 const G4VPhysicalVolume*) const override {}
214 void ComputeDimensions (G4Trap&,const G4int,
215 const G4VPhysicalVolume*) const override {}
216 void ComputeDimensions (G4Hype&,const G4int,
217 const G4VPhysicalVolume*) const override {}
218 void ComputeDimensions (G4Tubs&,const G4int,
219 const G4VPhysicalVolume*) const override {}
220 void ComputeDimensions (G4Polycone&,const G4int,
221 const G4VPhysicalVolume*) const override {}
222 void ComputeDimensions (G4Polyhedra&,const G4int,
223 const G4VPhysicalVolume*) const override {}
224};
225
226/**
227 * @brief G4ParameterisationBoxZ represents the parameterised positioning
228 * equivalent to dividing a G4Box along Z axis.
229 */
230
232{
233 public:
234
235 /**
236 * Initialises a parameterised box along Z axis.
237 * @param[in] axis The axis along which apply the parameterisation.
238 * @param[in] nCopies The total number of divided copies.
239 * @param[in] offset Potential initial offset along the axis.
240 * @param[in] step The width of the divided entity.
241 * @param[in] pSolid Pointer to the original shape to parameterise.
242 * @param[in] divType String identifier for the kind of division.
243 */
246 G4VSolid* pSolid, DivisionType divType );
247
248 /**
249 * Default Destructor.
250 */
252
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(G4Box& box, const G4int copyNo,
266 const G4VPhysicalVolume* physVol) const override;
267
268 private: // Dummy declarations to get rid of warnings ...
269
270 void ComputeDimensions (G4Cons&,const G4int,
271 const G4VPhysicalVolume*) const override {}
272 void ComputeDimensions (G4Trd&,const G4int,
273 const G4VPhysicalVolume*) const override {}
274 void ComputeDimensions (G4Sphere&,const G4int,
275 const G4VPhysicalVolume*) const override {}
276 void ComputeDimensions (G4Orb&,const G4int,
277 const G4VPhysicalVolume*) const override {}
278 void ComputeDimensions (G4Ellipsoid&,const G4int,
279 const G4VPhysicalVolume*) const override {}
280 void ComputeDimensions (G4Torus&,const G4int,
281 const G4VPhysicalVolume*) const override {}
282 void ComputeDimensions (G4Para&,const G4int,
283 const G4VPhysicalVolume*) const override {}
284 void ComputeDimensions (G4Trap&,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 ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
G4ParameterisationBoxX(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
~G4ParameterisationBoxX() override
void ComputeDimensions(G4Box &box, const G4int copyNo, const G4VPhysicalVolume *physVol) const override
G4double GetMaxParameter() const override
G4ParameterisationBoxY(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
G4double GetMaxParameter() const override
~G4ParameterisationBoxY() override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
void ComputeDimensions(G4Box &box, const G4int copyNo, const G4VPhysicalVolume *physVol) const override
G4double GetMaxParameter() const override
~G4ParameterisationBoxZ() override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
G4ParameterisationBoxZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
void ComputeDimensions(G4Box &box, 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
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)
G4VParameterisationBox(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
~G4VParameterisationBox() 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