Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VNestedParameterisation Class Referenceabstract

G4VNestedParameterisation is a base class for parameterisations that use information from the parent volume to compute the material of a copy/instance of this volume. This is in addition to using the current replication number. Such a volume can be nested inside a placement volume or a parameterised volume. The user can modify the solid type, size or transformation using only the replication number of this parameterised volume; it is NOT allowed to change these attributes using information of the parent volumes, otherwise incorrect results will occur. More...

#include <G4VNestedParameterisation.hh>

Inheritance diagram for G4VNestedParameterisation:

Public Member Functions

 G4VNestedParameterisation ()=default
 ~G4VNestedParameterisation () override=default
virtual G4MaterialComputeMaterial (G4VPhysicalVolume *currentVol, const G4int repNo, const G4VTouchable *parentTouch=nullptr)=0
G4int GetNumberOfMaterials () const override=0
G4MaterialGetMaterial (G4int idx) const override=0
void ComputeTransformation (const G4int no, G4VPhysicalVolume *currentPV) const override=0
G4VSolidComputeSolid (const G4int no, G4VPhysicalVolume *thisVol) override
G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr) override
G4bool IsNested () const override
G4VVolumeMaterialScannerGetMaterialScanner () override
void ComputeDimensions (G4Box &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Tubs &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Trd &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Trap &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Cons &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Sphere &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Orb &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Ellipsoid &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Torus &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Para &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Polycone &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const override
void ComputeDimensions (G4Hype &, const G4int, const G4VPhysicalVolume *) const override
Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()=default
virtual ~G4VPVParameterisation ()=default
Public Member Functions inherited from G4VVolumeMaterialScanner
 G4VVolumeMaterialScanner ()=default
virtual ~G4VVolumeMaterialScanner ()=default

Detailed Description

G4VNestedParameterisation is a base class for parameterisations that use information from the parent volume to compute the material of a copy/instance of this volume. This is in addition to using the current replication number. Such a volume can be nested inside a placement volume or a parameterised volume. The user can modify the solid type, size or transformation using only the replication number of this parameterised volume; it is NOT allowed to change these attributes using information of the parent volumes, otherwise incorrect results will occur.

Definition at line 86 of file G4VNestedParameterisation.hh.

Constructor & Destructor Documentation

◆ G4VNestedParameterisation()

G4VNestedParameterisation::G4VNestedParameterisation ( )
default

Default Constructor & Destructor.

◆ ~G4VNestedParameterisation()

G4VNestedParameterisation::~G4VNestedParameterisation ( )
overridedefault

Member Function Documentation

◆ ComputeDimensions() [1/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Box & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Dispatch methods for the specific solids where parameterisation is allowed.

Reimplemented from G4VPVParameterisation.

Definition at line 160 of file G4VNestedParameterisation.hh.

162 {}

Referenced by G4GMocrenFileSceneHandler::AddSolid().

◆ ComputeDimensions() [2/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Cons & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 176 of file G4VNestedParameterisation.hh.

178 {}

◆ ComputeDimensions() [3/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Ellipsoid & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 188 of file G4VNestedParameterisation.hh.

190 {}

◆ ComputeDimensions() [4/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Hype & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 208 of file G4VNestedParameterisation.hh.

210 {}

◆ ComputeDimensions() [5/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Orb & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 184 of file G4VNestedParameterisation.hh.

186 {}

◆ ComputeDimensions() [6/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Para & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 196 of file G4VNestedParameterisation.hh.

198 {}

◆ ComputeDimensions() [7/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Polycone & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 200 of file G4VNestedParameterisation.hh.

202 {}

◆ ComputeDimensions() [8/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Polyhedra & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 204 of file G4VNestedParameterisation.hh.

206 {}

◆ ComputeDimensions() [9/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Sphere & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 180 of file G4VNestedParameterisation.hh.

182 {}

◆ ComputeDimensions() [10/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Torus & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 192 of file G4VNestedParameterisation.hh.

194 {}

◆ ComputeDimensions() [11/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Trap & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 172 of file G4VNestedParameterisation.hh.

174 {}

◆ ComputeDimensions() [12/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Trd & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 168 of file G4VNestedParameterisation.hh.

170 {}

◆ ComputeDimensions() [13/13]

void G4VNestedParameterisation::ComputeDimensions ( G4Tubs & ,
const G4int ,
const G4VPhysicalVolume *  ) const
inlineoverridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 164 of file G4VNestedParameterisation.hh.

166 {}

◆ ComputeMaterial() [1/2]

G4Material * G4VNestedParameterisation::ComputeMaterial ( const G4int repNo,
G4VPhysicalVolume * currentVol,
const G4VTouchable * parentTouch = nullptr )
overridevirtual

Method implemented in this class in terms of the above ComputeMaterial().

Reimplemented from G4VPVParameterisation.

Definition at line 57 of file G4VNestedParameterisation.cc.

60{
61 return ComputeMaterial( currentVol, repNo, parentTouch );
62}
virtual G4Material * ComputeMaterial(G4VPhysicalVolume *currentVol, const G4int repNo, const G4VTouchable *parentTouch=nullptr)=0

◆ ComputeMaterial() [2/2]

virtual G4Material * G4VNestedParameterisation::ComputeMaterial ( G4VPhysicalVolume * currentVol,
const G4int repNo,
const G4VTouchable * parentTouch = nullptr )
pure virtual

Computes the material for the 'currentVol' and replica number 'repNo'. It is a required method, as it is the reason for this class. Must cope with parentTouch=nullptr for navigator's SetupHierarchy().

Parameters
[in]currentVolPointer to the current physical volume.
[in]repNoThe copy number index.
[in]parentTouchPointer to the touchable of the parent volume.
Returns
A pointer to the associated material.

Referenced by G4GMocrenFileSceneHandler::AddSolid(), and ComputeMaterial().

◆ ComputeSolid()

G4VSolid * G4VNestedParameterisation::ComputeSolid ( const G4int no,
G4VPhysicalVolume * thisVol )
overridevirtual

Computes the solid for the 'thisVol' volume and replica number 'no'. To be optionally defined in derived classes, for parameterisation of the solid type.

Parameters
[in]noThe copy number index.
[in]thisVolPointer to the current physical volume.

Reimplemented from G4VPVParameterisation.

Definition at line 37 of file G4VNestedParameterisation.cc.

39{
40 return pvol->GetLogicalVolume()->GetSolid();
41}

◆ ComputeTransformation()

void G4VNestedParameterisation::ComputeTransformation ( const G4int no,
G4VPhysicalVolume * currentPV ) const
overridepure virtual

Computes the transformation for the 'currentPV' and replica number 'no'. It is a required method, as it is the reason for this class. Must cope with parentTouch=nullptr for navigator's SetupHierarchy().

Parameters
[in]currentPVPointer to the current physical volume.
[in]noThe copy number index.

Implements G4VPVParameterisation.

Referenced by G4GMocrenFileSceneHandler::AddSolid().

◆ GetMaterial()

G4Material * G4VNestedParameterisation::GetMaterial ( G4int idx) const
overridepure virtual

Method to return a pointer to the material, given an index.

Implements G4VVolumeMaterialScanner.

◆ GetMaterialScanner()

G4VVolumeMaterialScanner * G4VNestedParameterisation::GetMaterialScanner ( )
overridevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 50 of file G4VNestedParameterisation.cc.

51{
52 return this;
53}

◆ GetNumberOfMaterials()

G4int G4VNestedParameterisation::GetNumberOfMaterials ( ) const
overridepure virtual

Accessors needed to define materials for instances of a Nested Parameterisation. Eeach call should return the materials of all instances with the same mother/ancestor volume.

Implements G4VVolumeMaterialScanner.

◆ IsNested()

G4bool G4VNestedParameterisation::IsNested ( ) const
overridevirtual

Methods to identify nested parameterisations. Required in order to enable material scan for nested parameterisations.

Reimplemented from G4VPVParameterisation.

Definition at line 44 of file G4VNestedParameterisation.cc.

45{
46 return true;
47}

The documentation for this class was generated from the following files: