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

G4VExternalPhysicalVolume is a base class to represent a physical volume managed by an external sub-navigator. More...

#include <G4VExternalPhysicalVolume.hh>

Inheritance diagram for G4VExternalPhysicalVolume:

Public Member Functions

 G4VExternalPhysicalVolume (G4RotationMatrix *pRot, const G4ThreeVector &tlate, G4LogicalVolume *pCurrentLogical, const G4String &pName, G4VPhysicalVolume *pMother)
 G4VExternalPhysicalVolume (__void__ &)
 G4VExternalPhysicalVolume (const G4VExternalPhysicalVolume &)=delete
G4VExternalPhysicalVolumeoperator= (const G4VExternalPhysicalVolume &)=delete
 ~G4VExternalPhysicalVolume () override=default
G4bool CheckOverlaps (G4int res=1000, G4double tol=0., G4bool verbose=true, G4int maxErr=1) override=0
EVolume VolumeType () const final
G4bool IsMany () const final
void SetMany (G4bool overlap)
G4bool IsReplicated () const final
G4bool IsParameterised () const final
G4VPVParameterisationGetParameterisation () const final
void GetReplicationData (EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const final
G4bool IsRegularStructure () const final
G4int GetRegularStructureId () const final
Public Member Functions inherited from G4VPhysicalVolume
 G4VPhysicalVolume (G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother)
virtual ~G4VPhysicalVolume ()
 G4VPhysicalVolume (const G4VPhysicalVolume &)=delete
G4VPhysicalVolumeoperator= (const G4VPhysicalVolume &)=delete
G4bool operator== (const G4VPhysicalVolume &p) const
G4RotationMatrixGetObjectRotation () const
G4RotationMatrix GetObjectRotationValue () const
G4ThreeVector GetObjectTranslation () const
const G4RotationMatrixGetFrameRotation () const
G4ThreeVector GetFrameTranslation () const
const G4ThreeVector GetTranslation () const
const G4RotationMatrixGetRotation () const
G4RotationMatrixGetRotation ()
void SetTranslation (const G4ThreeVector &v)
void SetRotation (G4RotationMatrix *)
G4LogicalVolumeGetLogicalVolume () const
void SetLogicalVolume (G4LogicalVolume *pLogical)
G4LogicalVolumeGetMotherLogical () const
void SetMotherLogical (G4LogicalVolume *pMother)
const G4StringGetName () const
void SetName (const G4String &pName)
virtual G4int GetMultiplicity () const
virtual G4int GetCopyNo () const =0
virtual void SetCopyNo (G4int CopyNo)=0
 G4VPhysicalVolume (__void__ &)
G4int GetInstanceID () const
EVolume DeduceVolumeType () const

Additional Inherited Members

Static Public Member Functions inherited from G4VPhysicalVolume
static const G4PVManagerGetSubInstanceManager ()
static void Clean ()
Protected Member Functions inherited from G4VPhysicalVolume
void InitialiseWorker (G4VPhysicalVolume *pMasterObject, G4RotationMatrix *pRot, const G4ThreeVector &tlate)
void TerminateWorker (G4VPhysicalVolume *pMasterObject)
Protected Attributes inherited from G4VPhysicalVolume
G4int instanceID
Static Protected Attributes inherited from G4VPhysicalVolume
static G4GEOM_DLL G4PVManager subInstanceManager

Detailed Description

G4VExternalPhysicalVolume is a base class to represent a physical volume managed by an external sub-navigator.

Definition at line 50 of file G4VExternalPhysicalVolume.hh.

Constructor & Destructor Documentation

◆ G4VExternalPhysicalVolume() [1/3]

G4VExternalPhysicalVolume::G4VExternalPhysicalVolume ( G4RotationMatrix * pRot,
const G4ThreeVector & tlate,
G4LogicalVolume * pCurrentLogical,
const G4String & pName,
G4VPhysicalVolume * pMother )

Constructor implementing G4VPhysicalVolume signature.

Parameters
[in]pRotThe pointer to the rotation in the mother volume.
[in]tlateTraslation vector in the mother volume.
[in]pCurrentLogicalPointer to its logical volume.
[in]pNameThe volume name.
[in]pMotherLogicalPointer to the logical volume of the mother.

Definition at line 40 of file G4VExternalPhysicalVolume.cc.

46 : G4VPhysicalVolume(pRot, tlate, pName, pLogical, pMother)
47{
48 if (pMother != nullptr)
49 {
50 G4LogicalVolume* motherLogical = pMother->GetLogicalVolume();
51 if (pLogical == motherLogical)
52 {
53 G4Exception("G4VExternalPhysicalVolume::G4VExternalPhysicalVolume()",
54 "GeomVol0002", FatalException,
55 "Cannot place a volume inside itself!");
56 }
57 SetMotherLogical(motherLogical);
58 motherLogical->AddDaughter(this);
59 }
60}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void AddDaughter(G4VPhysicalVolume *p)
G4VPhysicalVolume(G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother)
G4LogicalVolume * GetLogicalVolume() const
void SetMotherLogical(G4LogicalVolume *pMother)

Referenced by G4VExternalPhysicalVolume(), and operator=().

◆ G4VExternalPhysicalVolume() [2/3]

G4VExternalPhysicalVolume::G4VExternalPhysicalVolume ( __void__ & a)

Fake default constructor for usage restricted to direct object persistency for clients requiring preallocation of memory for persistifiable objects.

Definition at line 66 of file G4VExternalPhysicalVolume.cc.

68{
69}

◆ G4VExternalPhysicalVolume() [3/3]

G4VExternalPhysicalVolume::G4VExternalPhysicalVolume ( const G4VExternalPhysicalVolume & )
delete

Copy constructor and assignment operator not allowed.

◆ ~G4VExternalPhysicalVolume()

G4VExternalPhysicalVolume::~G4VExternalPhysicalVolume ( )
overridedefault

Default Destructor.

Member Function Documentation

◆ CheckOverlaps()

G4bool G4VExternalPhysicalVolume::CheckOverlaps ( G4int res = 1000,
G4double tol = 0.,
G4bool verbose = true,
G4int maxErr = 1 )
overridepure virtual

Verifies if the placed volume is overlapping with existing daughters or with the mother volume. Provides default resolution for the number of points to be generated and verified. A tolerance for the precision of the overlap check can be specified, by default it is set to maximum precision. Reports a maximum of overlaps errors according to parameter in input.

Parameters
[in]resThe number of points to generate on volume's surface.
[in]tolThe precision tolerance for the overlap check, below which to ignore overlaps (deafult is maximim precision).
[in]verboseVerbosity mode (default is true).
[in]maxErrMaximum of overlaps errors to report (default is 1).
Returns
True if an overlap occurs.

Reimplemented from G4VPhysicalVolume.

◆ GetParameterisation()

G4VPVParameterisation * G4VExternalPhysicalVolume::GetParameterisation ( ) const
finalvirtual

Returns a pointer to the replicas parameterisation object/algorithm (able to compute dimensions and transformations of replicas), or a null pointer if not applicable.

Implements G4VPhysicalVolume.

Definition at line 106 of file G4VExternalPhysicalVolume.cc.

107{
108 return nullptr;
109}

Referenced by CheckOverlaps().

◆ GetRegularStructureId()

G4int G4VExternalPhysicalVolume::GetRegularStructureId ( ) const
finalvirtual

Returns non-zero code in case the underlying volume structure is regular, voxel-like. The value is an identifier for the structure type. If non-zero the volume is a candidate for specialised navigation such as 'nearest neighbour' directly on volumes.

Implements G4VPhysicalVolume.

Definition at line 135 of file G4VExternalPhysicalVolume.cc.

136{
137 return 0;
138}

Referenced by CheckOverlaps().

◆ GetReplicationData()

void G4VExternalPhysicalVolume::GetReplicationData ( EAxis & axis,
G4int & nReplicas,
G4double & width,
G4double & offset,
G4bool & consuming ) const
finalvirtual

Returns the replication information. No-op for non replicated volumes.

Parameters
[in,out]axisThe axis of replication/parameterisation.
[in,out]nReplicasThe number of replicated/parameterised objects.
[in,out]widthThe width of replicated object.
[in,out]offsetThe optional offset distance from mother's border.
[in,out]consumingFlag of replica characterisation (always true for pure replicas).

Implements G4VPhysicalVolume.

Definition at line 114 of file G4VExternalPhysicalVolume.cc.

116{
117 // No-operations
118}

Referenced by CheckOverlaps().

◆ IsMany()

G4bool G4VExternalPhysicalVolume::IsMany ( ) const
finalvirtual

Stub methods, unused for placed volumes.

Implements G4VPhysicalVolume.

Definition at line 74 of file G4VExternalPhysicalVolume.cc.

75{
76 return fMany;
77}

Referenced by CheckOverlaps().

◆ IsParameterised()

G4bool G4VExternalPhysicalVolume::IsParameterised ( ) const
finalvirtual

Returns true if the volume is parameterised (single object instance represents many real parameterised volumes), else false.

Implements G4VPhysicalVolume.

Definition at line 98 of file G4VExternalPhysicalVolume.cc.

99{
100 return false;
101}

Referenced by CheckOverlaps().

◆ IsRegularStructure()

G4bool G4VExternalPhysicalVolume::IsRegularStructure ( ) const
finalvirtual

Used only for specialised repeated volumes. Always false with Id 0.

Implements G4VPhysicalVolume.

Definition at line 125 of file G4VExternalPhysicalVolume.cc.

126{
127 return false;
128}

Referenced by CheckOverlaps().

◆ IsReplicated()

G4bool G4VExternalPhysicalVolume::IsReplicated ( ) const
finalvirtual

Returns true if the volume is replicated (single object instance represents many real volumes), else false.

Implements G4VPhysicalVolume.

Definition at line 90 of file G4VExternalPhysicalVolume.cc.

91{
92 return false;
93}

Referenced by CheckOverlaps().

◆ operator=()

G4VExternalPhysicalVolume & G4VExternalPhysicalVolume::operator= ( const G4VExternalPhysicalVolume & )
delete

◆ SetMany()

void G4VExternalPhysicalVolume::SetMany ( G4bool overlap)

Definition at line 82 of file G4VExternalPhysicalVolume.cc.

83{
84 fMany = overlap;
85}

Referenced by CheckOverlaps().

◆ VolumeType()

EVolume G4VExternalPhysicalVolume::VolumeType ( ) const
finalvirtual

Returns the volume type characterisation, i.e. kExternal.

Implements G4VPhysicalVolume.

Definition at line 145 of file G4VExternalPhysicalVolume.cc.

146{
147 return kExternal;
148}
@ kExternal
Definition geomdefs.hh:87

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