Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VNestedParameterisation.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//
27// $Id$
28//
29// class G4VNestedParameterisation
30//
31// Class description:
32//
33// Base class for parameterisations that use information from the parent
34// volume to compute the material of a copy/instance of this volume.
35// This is in addition to using the current replication number.
36//
37// Notes:
38// - Such a volume can be nested inside a placement volume or a parameterised
39// volume.
40// - The user can modify the solid type, size or transformation using only
41// the replication number of this parameterised volume.
42// He/she is NOT allowed to change these attributes using information of
43// parent volumes - otherwise incorrect results will occur.
44// Also note that the usual restrictions apply:
45// - the mother volume, in which these copies are placed, must always be
46// of the same dimensions
47
48// History:
49// 24.02.05 - J.Apostolakis - First created version.
50// --------------------------------------------------------------------
51#ifndef G4VNESTEDPARAMETERISATION_HH
52#define G4VNESTEDPARAMETERISATION_HH
53
54#include "G4Types.hh"
57
59class G4VTouchable;
60class G4VSolid;
61class G4Material;
62
63// CSG Entities which may be parameterised/replicated
64//
65class G4Box;
66class G4Tubs;
67class G4Trd;
68class G4Trap;
69class G4Cons;
70class G4Sphere;
71class G4Orb;
72class G4Torus;
73class G4Para;
74class G4Polycone;
75class G4Polyhedra;
76class G4Hype;
77
80{
81 public: // with description
82
85
86 // Methods required in derived classes
87 // -----------------------------------
88
90 const G4int repNo,
91 const G4VTouchable* parentTouch=0) = 0;
92 // Required method, as it is the reason for this class.
93 // Must cope with parentTouch=0 for navigator's SetupHierarchy.
94
95 virtual G4int GetNumberOfMaterials() const=0;
96 virtual G4Material* GetMaterial(G4int idx) const=0;
97 // Needed to define materials for instances of Nested Parameterisation
98 // Current convention: each call should return the materials
99 // of all instances with the same mother/ancestor volume.
100
101 virtual void ComputeTransformation(const G4int no,
102 G4VPhysicalVolume* currentPV) const = 0;
103
104 // Methods optional in derived classes
105 // -----------------------------------
106
107 virtual G4VSolid* ComputeSolid(const G4int no, G4VPhysicalVolume *thisVol);
108 // Additional standard parameterisation methods,
109 // which can be optionally defined, in case solid is used.
110
111 virtual void ComputeDimensions(G4Box &,
112 const G4int,
113 const G4VPhysicalVolume *) const {}
114
115 virtual void ComputeDimensions(G4Tubs &,
116 const G4int,
117 const G4VPhysicalVolume *) const {}
118
119 virtual void ComputeDimensions(G4Trd &,
120 const G4int,
121 const G4VPhysicalVolume *) const {}
122
123 virtual void ComputeDimensions(G4Trap &,
124 const G4int,
125 const G4VPhysicalVolume *) const {}
126
127 virtual void ComputeDimensions(G4Cons &,
128 const G4int,
129 const G4VPhysicalVolume *) const {}
130
132 const G4int,
133 const G4VPhysicalVolume *) const {}
134
135 virtual void ComputeDimensions(G4Orb &,
136 const G4int,
137 const G4VPhysicalVolume *) const {}
138
140 const G4int,
141 const G4VPhysicalVolume *) const {}
142
143 virtual void ComputeDimensions(G4Para &,
144 const G4int,
145 const G4VPhysicalVolume *) const {}
146
148 const G4int,
149 const G4VPhysicalVolume *) const {}
150
152 const G4int,
153 const G4VPhysicalVolume *) const {}
154
155 virtual void ComputeDimensions(G4Hype &,
156 const G4int,
157 const G4VPhysicalVolume *) const {}
158
159
160 G4Material* ComputeMaterial(const G4int repNo,
161 G4VPhysicalVolume *currentVol,
162 const G4VTouchable *parentTouch=0);
163 // Method implemented in this class in terms of the above
164 // ComputeMaterial() method.
165
166 virtual G4bool IsNested() const;
168 // Methods to identify nested parameterisations. Required in order
169 // to enable material scan for nested parameterisations.
170};
171
172#endif
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
Definition: G4Box.hh:55
Definition: G4Cons.hh:75
Definition: G4Hype.hh:67
Definition: G4Orb.hh:52
Definition: G4Para.hh:77
Definition: G4Trd.hh:63
Definition: G4Tubs.hh:77
virtual G4VSolid * ComputeSolid(const G4int no, G4VPhysicalVolume *thisVol)
virtual void ComputeDimensions(G4Trap &, const G4int, const G4VPhysicalVolume *) const
virtual G4int GetNumberOfMaterials() const =0
virtual void ComputeDimensions(G4Sphere &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeTransformation(const G4int no, G4VPhysicalVolume *currentPV) const =0
virtual void ComputeDimensions(G4Trd &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Hype &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Orb &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Tubs &, const G4int, const G4VPhysicalVolume *) const
virtual G4Material * GetMaterial(G4int idx) const =0
virtual void ComputeDimensions(G4Cons &, const G4int, const G4VPhysicalVolume *) const
virtual G4VVolumeMaterialScanner * GetMaterialScanner()
virtual void ComputeDimensions(G4Torus &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Para &, const G4int, const G4VPhysicalVolume *) const
virtual void ComputeDimensions(G4Polycone &, const G4int, const G4VPhysicalVolume *) const
virtual G4Material * ComputeMaterial(G4VPhysicalVolume *currentVol, const G4int repNo, const G4VTouchable *parentTouch=0)=0