Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParameterisationPara.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// G4ParameterisationPara[X,Y,Z]
27//
28// Class description:
29//
30// These classes represent the parameterised positioning equivalent to
31// dividing a G4Para 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 G4PARAMETERISATIONPARA_HH
37#define G4PARAMETERISATIONPARA_HH 1
38
40
41class G4VSolid;
43
44// Dummy declarations to get rid of warnings ...
45//
46class G4Cons;
47class G4Cons;
48class G4Sphere;
49class G4Orb;
50class G4Ellipsoid;
51class G4Torus;
52class G4Trd;
53class G4Hype;
54class G4Tubs;
55class G4Polycone;
56class G4Polyhedra;
57
58/**
59 * @brief G4VParameterisationPara is the base class for the parameterised
60 * positioning equivalent to dividing a G4Para along one of each axis X, Y, Z.
61 */
62
64{
65 public:
66
67 /**
68 * Initialises a parameterised para, 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 G4ParameterisationParaX represents the parameterised positioning
89 * equivalent to dividing a G4Para along X axis.
90 */
91
93{
94 public:
95
96 /**
97 * Initialises a parameterised para 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(G4Para& para, const G4int copyNo,
126 const G4VPhysicalVolume* pv) const override;
127
128
129 private: // Dummy declarations to get rid of warnings ...
130
131 void ComputeDimensions (G4Cons&,const G4int,
132 const G4VPhysicalVolume*) const override {}
133 void ComputeDimensions (G4Box&,const G4int,
134 const G4VPhysicalVolume*) const override {}
135 void ComputeDimensions (G4Sphere&,const G4int,
136 const G4VPhysicalVolume*) const override {}
137 void ComputeDimensions (G4Orb&,const G4int,
138 const G4VPhysicalVolume*) const override {}
139 void ComputeDimensions (G4Ellipsoid&,const G4int,
140 const G4VPhysicalVolume*) const override {}
141 void ComputeDimensions (G4Torus&,const G4int,
142 const G4VPhysicalVolume*) const override {}
143 void ComputeDimensions (G4Trd&,const G4int,
144 const G4VPhysicalVolume*) const override {}
145 void ComputeDimensions (G4Trap&,const G4int,
146 const G4VPhysicalVolume*) const override {}
147 void ComputeDimensions (G4Hype&,const G4int,
148 const G4VPhysicalVolume*) const override {}
149 void ComputeDimensions (G4Tubs&,const G4int,
150 const G4VPhysicalVolume*) const override {}
151 void ComputeDimensions (G4Polycone&,const G4int,
152 const G4VPhysicalVolume*) const override {}
153 void ComputeDimensions (G4Polyhedra&,const G4int,
154 const G4VPhysicalVolume*) const override {}
155};
156
157
158/**
159 * @brief G4ParameterisationParaY represents the parameterised positioning
160 * equivalent to dividing a G4Para along Y axis.
161 */
162
164{
165 public:
166
167 /**
168 * Initialises a parameterised para along Y axis.
169 * @param[in] axis The axis along which apply the parameterisation.
170 * @param[in] nCopies The total number of divided copies.
171 * @param[in] offset Potential initial offset along the axis.
172 * @param[in] step The width of the divided entity.
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* msolid, DivisionType divType );
179
180 /**
181 * Default Destructor.
182 */
184
185 /**
186 * Returns the max width along Y.
187 * @returns The maximum width of the solid to divide along the Y 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(G4Para& para, const G4int copyNo,
197 const G4VPhysicalVolume* pv) const override;
198
199
200 private: // Dummy declarations to get rid of warnings ...
201
202 void ComputeDimensions (G4Cons&,const G4int,
203 const G4VPhysicalVolume*) const override {}
204 void ComputeDimensions (G4Box&,const G4int,
205 const G4VPhysicalVolume*) const override {}
206 void ComputeDimensions (G4Sphere&,const G4int,
207 const G4VPhysicalVolume*) const override {}
208 void ComputeDimensions (G4Orb&,const G4int,
209 const G4VPhysicalVolume*) const override {}
210 void ComputeDimensions (G4Ellipsoid&,const G4int,
211 const G4VPhysicalVolume*) const override {}
212 void ComputeDimensions (G4Torus&,const G4int,
213 const G4VPhysicalVolume*) const override {}
214 void ComputeDimensions (G4Trd&,const G4int,
215 const G4VPhysicalVolume*) const override {}
216 void ComputeDimensions (G4Trap&,const G4int,
217 const G4VPhysicalVolume*) const override {}
218 void ComputeDimensions (G4Hype&,const G4int,
219 const G4VPhysicalVolume*) const override {}
220 void ComputeDimensions (G4Tubs&,const G4int,
221 const G4VPhysicalVolume*) const override {}
222 void ComputeDimensions (G4Polycone&,const G4int,
223 const G4VPhysicalVolume*) const override {}
224 void ComputeDimensions (G4Polyhedra&,const G4int,
225 const G4VPhysicalVolume*) const override {}
226};
227
228
229/**
230 * @brief G4ParameterisationParaZ represents the parameterised positioning
231 * equivalent to dividing a G4Para along Z axis.
232 */
233
235{
236 public:
237
238 /**
239 * Initialises a parameterised para along Z axis.
240 * @param[in] axis The axis along which apply the parameterisation.
241 * @param[in] nCopies The total number of divided copies.
242 * @param[in] offset Potential initial offset along the axis.
243 * @param[in] step The width of the divided entity.
244 * @param[in] pSolid Pointer to the original shape to parameterise.
245 * @param[in] divType String identifier for the kind of division.
246 */
249 G4VSolid* msolid, DivisionType divType );
250
251 /**
252 * Default Destructor.
253 */
255
256 /**
257 * Returns the max width along Z.
258 * @returns The maximum width of the solid to divide along the Z axis.
259 */
260 G4double GetMaxParameter() const override;
261
262 /**
263 * Concrete methods implementing the parameterisation.
264 */
265 void ComputeTransformation( const G4int copyNo,
266 G4VPhysicalVolume* physVol ) const override;
267 void ComputeDimensions(G4Para& para, const G4int copyNo,
268 const G4VPhysicalVolume* pv) const override;
269
270
271 private: // Dummy declarations to get rid of warnings ...
272
273 void ComputeDimensions (G4Cons&,const G4int,
274 const G4VPhysicalVolume*) const override {}
275 void ComputeDimensions (G4Box&,const G4int,
276 const G4VPhysicalVolume*) const override {}
277 void ComputeDimensions (G4Sphere&,const G4int,
278 const G4VPhysicalVolume*) const override {}
279 void ComputeDimensions (G4Orb&,const G4int,
280 const G4VPhysicalVolume*) const override {}
281 void ComputeDimensions (G4Ellipsoid&,const G4int,
282 const G4VPhysicalVolume*) const override {}
283 void ComputeDimensions (G4Torus&,const G4int,
284 const G4VPhysicalVolume*) const override {}
285 void ComputeDimensions (G4Trd&,const G4int,
286 const G4VPhysicalVolume*) const override {}
287 void ComputeDimensions (G4Trap&,const G4int,
288 const G4VPhysicalVolume*) const override {}
289 void ComputeDimensions (G4Hype&,const G4int,
290 const G4VPhysicalVolume*) const override {}
291 void ComputeDimensions (G4Tubs&,const G4int,
292 const G4VPhysicalVolume*) const override {}
293 void ComputeDimensions (G4Polycone&,const G4int,
294 const G4VPhysicalVolume*) const override {}
295 void ComputeDimensions (G4Polyhedra&,const G4int,
296 const G4VPhysicalVolume*) const override {}
297};
298
299#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
G4ParameterisationParaX(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
G4double GetMaxParameter() const override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
void ComputeDimensions(G4Para &para, const G4int copyNo, const G4VPhysicalVolume *pv) const override
~G4ParameterisationParaX() override
~G4ParameterisationParaY() override
void ComputeDimensions(G4Para &para, const G4int copyNo, const G4VPhysicalVolume *pv) const override
G4double GetMaxParameter() const override
G4ParameterisationParaY(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
void ComputeDimensions(G4Para &para, const G4int copyNo, const G4VPhysicalVolume *pv) const override
~G4ParameterisationParaZ() override
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const override
G4double GetMaxParameter() const override
G4ParameterisationParaZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, 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
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)
G4VParameterisationPara(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
~G4VParameterisationPara() 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