Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VPVParameterisation.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// G4VPVParameterisation
27//
28// Class description:
29//
30// Parameterisation abstract base class, able to compute the transformation
31// and (indirectly) the dimensions of parameterised volumes, given a
32// replication number.
33
34// Author: Paul Kent (CERN), 25.07.1996, P.Kent - Initial stub version
35// --------------------------------------------------------------------
36#ifndef G4VPVPARAMETERISATION_HH
37#define G4VPVPARAMETERISATION_HH
38
39#include "G4Types.hh"
41#include "G4VTouchable.hh"
42
44class G4VSolid;
45class G4Material;
46
47// Entities which may be parameterised/replicated
48//
49class G4Box;
50class G4Tubs;
51class G4Trd;
52class G4Trap;
53class G4Cons;
54class G4Sphere;
55class G4Orb;
56class G4Ellipsoid;
57class G4Torus;
58class G4Para;
59class G4Polycone;
60class G4Polyhedra;
61class G4Hype;
62
64
65/**
66 * @brief G4VPVParameterisation ia an abstract base class for Parameterisation,
67 * able to compute the transformation and (indirectly) the dimensions of
68 * parameterised volumes, given a replication number.
69 */
70
72{
73 public:
74
75 /**
76 * Default Constructor & Destructor.
77 */
79 virtual ~G4VPVParameterisation() = default;
80
81 /**
82 * Computes the transformation for the 'pv' volume and replica number 'no'.
83 * It is a required method, as it is the reason for this class.
84 * @param[in] pv Pointer to the current physical volume.
85 * @param[in] no The copy number index.
86 */
87 virtual void ComputeTransformation(const G4int no,
88 G4VPhysicalVolume* pv) const = 0;
89
90 /**
91 * Computes the solid for the 'pv' volume and replica number 'no'.
92 * To be optionally defined in derived classes, for parameterisation of
93 * the solid type.
94 * @param[in] no The copy number index.
95 * @param[in] pv Pointer to the current physical volume.
96 */
97 virtual G4VSolid* ComputeSolid(const G4int no, G4VPhysicalVolume* pv);
98
99 /**
100 * Computes the material for the 'currentVol' and replica number 'repNo'.
101 * Must cope with 'parentTouch' for navigator's SetupHierarchy() when
102 * used for nested parameterisations.
103 * @param[in] currentVol Pointer to the current physical volume.
104 * @param[in] repNo The copy number index.
105 * @param[in] parentTouch Pointer to the touchable of the parent volume.
106 * @returns A pointer to the associated material.
107 */
108 virtual G4Material* ComputeMaterial(const G4int repNo,
109 G4VPhysicalVolume* currentVol,
110 const G4VTouchable* parentTouch = nullptr);
111
112 /**
113 * Methods to identify nested parameterisations. Required in order
114 * to enable material scan for nested parameterisations.
115 */
116 virtual G4bool IsNested() const;
118
119 /**
120 * Dispatch methods for the specific solids where parameterisation
121 * is allowed.
122 */
123 virtual void ComputeDimensions(G4Box &,
124 const G4int,
125 const G4VPhysicalVolume *) const {}
126 virtual void ComputeDimensions(G4Tubs &,
127 const G4int,
128 const G4VPhysicalVolume *) const {}
129 virtual void ComputeDimensions(G4Trd &,
130 const G4int,
131 const G4VPhysicalVolume *) const {}
132 virtual void ComputeDimensions(G4Trap &,
133 const G4int,
134 const G4VPhysicalVolume *) const {}
135 virtual void ComputeDimensions(G4Cons &,
136 const G4int,
137 const G4VPhysicalVolume *) const {}
139 const G4int,
140 const G4VPhysicalVolume *) const {}
141 virtual void ComputeDimensions(G4Orb &,
142 const G4int,
143 const G4VPhysicalVolume *) const {}
145 const G4int,
146 const G4VPhysicalVolume *) const {}
148 const G4int,
149 const G4VPhysicalVolume *) const {}
150 virtual void ComputeDimensions(G4Para &,
151 const G4int,
152 const G4VPhysicalVolume *) const {}
154 const G4int,
155 const G4VPhysicalVolume *) const {}
157 const G4int,
158 const G4VPhysicalVolume *) const {}
159 virtual void ComputeDimensions(G4Hype &,
160 const G4int,
161 const G4VPhysicalVolume *) const {}
162};
163
164#endif
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
G4TouchableHistory G4VTouchable
G4VTouchable is a G4TouchableHistory object.
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
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
virtual void ComputeDimensions(G4Trap &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Ellipsoid &, const G4int, const G4VPhysicalVolume *) const
virtual G4VVolumeMaterialScanner * GetMaterialScanner()
virtual void ComputeDimensions(G4Hype &, const G4int, const G4VPhysicalVolume *) const
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr)
virtual void ComputeDimensions(G4Sphere &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Trd &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeTransformation(const G4int no, G4VPhysicalVolume *pv) const =0
G4VPVParameterisation()=default
virtual void ComputeDimensions(G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Cons &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Polycone &, const G4int, const G4VPhysicalVolume *) const
virtual ~G4VPVParameterisation()=default
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
virtual G4VSolid * ComputeSolid(const G4int no, G4VPhysicalVolume *pv)
virtual void ComputeDimensions(G4Tubs &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Para &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Orb &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Torus &, const G4int, const G4VPhysicalVolume *) const
virtual G4bool IsNested() const
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
G4VVolumeMaterialScanner is an interface class for repeated volumes or parameterisations that are abl...