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

G4VPhysicalVolume is an abstract base class for the representation of a positioned volume. The volume is placed within a mother volume, relative to its coordinate system. Either a single positioned volume or many positioned volumes can be represented by a particular G4VPhysicalVolume. More...

#include <G4VPhysicalVolume.hh>

Inheritance diagram for G4VPhysicalVolume:

Public Member Functions

 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 EVolume VolumeType () const =0
virtual G4bool IsMany () const =0
virtual G4int GetCopyNo () const =0
virtual void SetCopyNo (G4int CopyNo)=0
virtual G4bool IsReplicated () const =0
virtual G4bool IsParameterised () const =0
virtual G4VPVParameterisationGetParameterisation () const =0
virtual void GetReplicationData (EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
virtual G4bool IsRegularStructure () const =0
virtual G4int GetRegularStructureId () const =0
virtual G4bool CheckOverlaps (G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
 G4VPhysicalVolume (__void__ &)
G4int GetInstanceID () const
EVolume DeduceVolumeType () const

Static Public Member Functions

static const G4PVManagerGetSubInstanceManager ()
static void Clean ()

Protected Member Functions

void InitialiseWorker (G4VPhysicalVolume *pMasterObject, G4RotationMatrix *pRot, const G4ThreeVector &tlate)
void TerminateWorker (G4VPhysicalVolume *pMasterObject)

Protected Attributes

G4int instanceID

Static Protected Attributes

static G4GEOM_DLL G4PVManager subInstanceManager

Detailed Description

G4VPhysicalVolume is an abstract base class for the representation of a positioned volume. The volume is placed within a mother volume, relative to its coordinate system. Either a single positioned volume or many positioned volumes can be represented by a particular G4VPhysicalVolume.

Definition at line 84 of file G4VPhysicalVolume.hh.

Constructor & Destructor Documentation

◆ G4VPhysicalVolume() [1/3]

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

Constructor for G4VPhysicalVolume; it initialises a volume, positioned in a frame which is rotated by 'pRot', relative to the coordinate system of the mother volume 'pMother'. The center of the object is then placed at 'tlate' in the new coordinates. If 'pRot' is null, the volume is unrotated with respect to its mother. The physical volume is added to the mother's logical volume. The constructor must be called by all subclasses; 'pMother' must point to a valid parent volume, except in the case of the world/top volume, when it can be a null pointer. The constructor also registers the volume within the physical volumes store.

Parameters
[in]pRotThe pointer to the rotation matrix.
[in]tlateThe translation vector coordinates.
[in]pNameThe name of the volume.
[in]pLogicalThe pointer to its logical volume.
[in]pMotherThe pointer to the mother's physical volume.

Definition at line 54 of file G4VPhysicalVolume.cc.

59 : flogical(pLogical), fname(pName)
60{
61 instanceID = subInstanceManager.CreateSubInstance();
62
63 this->SetRotation( pRot ); // G4MT_rot = pRot;
64 this->SetTranslation( tlate ); // G4MT_trans = tlate;
65
66 // Initialize 'Shadow' data structure - for use by object persistency
67 pvdata = new G4PVData();
68 pvdata->frot = pRot;
69 pvdata->tx = tlate.x();
70 pvdata->ty = tlate.y();
71 pvdata->tz = tlate.z();
72
74}
double z() const
double x() const
double y() const
double tx() const
static void Register(G4VPhysicalVolume *pVolume)
static G4GEOM_DLL G4PVManager subInstanceManager
void SetTranslation(const G4ThreeVector &v)
void SetRotation(G4RotationMatrix *)

Referenced by G4PVPlacement::CheckOverlaps(), DeduceVolumeType(), G4PVPlacement::G4PVPlacement(), G4PVPlacement::G4PVPlacement(), G4PVPlacement::G4PVPlacement(), G4PVPlacement::G4PVPlacement(), G4PVPlacement::G4PVPlacement(), G4VExternalPhysicalVolume::G4VExternalPhysicalVolume(), G4VExternalPhysicalVolume::G4VExternalPhysicalVolume(), G4VPhysicalVolume(), G4VPhysicalVolume(), InitialiseWorker(), operator=(), operator==(), and TerminateWorker().

◆ ~G4VPhysicalVolume()

G4VPhysicalVolume::~G4VPhysicalVolume ( )
virtual

Destructor, will be subclassed. Removes volume from the volume store.

Definition at line 91 of file G4VPhysicalVolume.cc.

92{
93 delete pvdata;
95}
static void DeRegister(G4VPhysicalVolume *pVolume)

◆ G4VPhysicalVolume() [2/3]

G4VPhysicalVolume::G4VPhysicalVolume ( const G4VPhysicalVolume & )
delete

Copy constructor and assignement operator not allowed.

◆ G4VPhysicalVolume() [3/3]

G4VPhysicalVolume::G4VPhysicalVolume ( __void__ & )

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

Definition at line 79 of file G4VPhysicalVolume.cc.

80 : fname("")
81{
82 // Register to store
83 //
84 instanceID = subInstanceManager.CreateSubInstance();
85
87}

Member Function Documentation

◆ CheckOverlaps()

G4bool G4VPhysicalVolume::CheckOverlaps ( G4int res = 1000,
G4double tol = 0.,
G4bool verbose = true,
G4int errMax = 1 )
virtual

Verifies if the placed volume is overlapping with the existing daughters or with the mother volume. It provides a default resolution for the number of points to be generated and verified. A concrete implementation is done and required only for placed and parameterised volumes. Returns true if the volume is overlapping.

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 (default is maximim precision).
[in]verboseVerbosity mode (default is true).
[in]errMaxMaximum of overlaps errors to report (default is 1).
Returns
True if an overlap occurs.

Reimplemented in G4PVPlacement, and G4VExternalPhysicalVolume.

Definition at line 221 of file G4VPhysicalVolume.cc.

222{
223 return false;
224}

Referenced by G4Navigator::CheckOverlapsIterative(), G4ITNavigator1::ComputeStep(), G4ITNavigator2::ComputeStep(), G4LogicalVolumeModel::DescribeYourselfTo(), and G4GeomTestVolume::TestOverlapInTree().

◆ Clean()

void G4VPhysicalVolume::Clean ( )
static

Clears the memory allocated by the MT sub-instance manager.

Definition at line 125 of file G4VPhysicalVolume.cc.

126{
127 subInstanceManager.FreeSlave();
128}

Referenced by G4PhysicalVolumeStore::~G4PhysicalVolumeStore().

◆ DeduceVolumeType()

EVolume G4VPhysicalVolume::DeduceVolumeType ( ) const
inline

Old VolumeType() method, replaced by virtual method, kept for checking.

◆ GetCopyNo()

◆ GetFrameRotation()

const G4RotationMatrix * G4VPhysicalVolume::GetFrameRotation ( ) const

Accessors returning the rotation/translation of the frame used to position this volume in its mother volume (opposite of object rot/trans).

Definition at line 208 of file G4VPhysicalVolume.cc.

209{
210 return G4MT_rot;
211}
#define G4MT_rot

Referenced by G4AdjointCrossSurfChecker::AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(), G4LatticeManager::LoadLattice(), G4LatticeManager::RegisterLattice(), and G4GDMLWriteStructure::TraverseVolumeTree().

◆ GetFrameTranslation()

G4ThreeVector G4VPhysicalVolume::GetFrameTranslation ( ) const

Definition at line 213 of file G4VPhysicalVolume.cc.

214{
216}
CLHEP::Hep3Vector G4ThreeVector
#define G4MT_ty
#define G4MT_tz
#define G4MT_tx

◆ GetInstanceID()

G4int G4VPhysicalVolume::GetInstanceID ( ) const
inline

Returns the instance ID for multi-threading.

◆ GetLogicalVolume()

G4LogicalVolume * G4VPhysicalVolume::GetLogicalVolume ( ) const
inline

Returns the associated logical volume pointer.

Referenced by G4AdjointCrossSurfChecker::AddanExtSurfaceOfAvolume(), G4PseudoScene::AddCompound(), G4VSceneHandler::AddCompound(), G4LogicalVolume::AddDaughter(), G4GMocrenFileSceneHandler::AddSolid(), G4VtkSceneHandler::AddSolid(), G4FastSimulationManagerProcess::AtRestGetPhysicalInteractionLength(), G4ReplicaNavigation::BackLocate(), G4Region::BelongsTo(), G4PhantomParameterisation::BuildContainerSolid(), G4PVPlacement::CheckOverlaps(), G4AdjointPrimaryGenerator::ComputeAccumulatedDepthVectorAlongBackRay(), G4VPVParameterisation::ComputeMaterial(), G4ITNavigator1::ComputeSafety(), G4ITNavigator2::ComputeSafety(), G4NormalNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeSafety(), G4ReplicaNavigation::ComputeSafety(), G4VoxelNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4PhantomParameterisation::ComputeSolid(), G4VNestedParameterisation::ComputeSolid(), G4VPVParameterisation::ComputeSolid(), G4ITNavigator1::ComputeStep(), G4ITNavigator2::ComputeStep(), G4Navigator::ComputeStep(), G4NormalNavigation::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), G4RegularNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4VoxelNavigation::ComputeStep(), G4RegularNavigation::ComputeStepSkippingEqualMaterials(), G4tgbVolume::ConstructG4Volumes(), G4TheRayTracer::CreateBitMap(), G4AdjointCrossSurfChecker::CrossingAnInterfaceBetweenTwoVolumes(), G4RadioactiveDecay::DecayIt(), G4VRadioactiveDecay::DecayIt(), G4RunManagerKernel::DefineWorldVolume(), G4LogicalVolumeModel::DescribeYourselfTo(), G4VFieldModel::DescribeYourselfTo(), G4TrajectoryDrawByOriginVolume::Draw(), G4VisManager::Draw(), G4tgbGeometryDumper::DumpPhysVol(), G4tgbGeometryDumper::DumpPVPlacement(), G4TrajectoryOriginVolumeFilter::Evaluate(), G4PropagatorInField::FindAndSetFieldManager(), G4Mesh::G4Mesh(), G4PVDivision(), G4PVParameterised::G4PVParameterised(), G4PVPlacement::G4PVPlacement(), G4PVPlacement::G4PVPlacement(), G4PVReplica(), G4ReplicatedSlice(), G4ReplicatedSlice(), G4ReplicatedSlice(), G4VExternalPhysicalVolume::G4VExternalPhysicalVolume(), G4GDMLRead::GeneratePhysvolName(), G4Channeling::GetMeanFreePath(), G4CoherentPairProduction::GetMeanFreePath(), G4ElNeutrinoNucleusProcess::GetMeanFreePath(), G4MuNeutrinoNucleusProcess::GetMeanFreePath(), G4NeutrinoElectronProcess::GetMeanFreePath(), G4NuVacOscProcess::GetMeanFreePath(), G4TauNeutrinoNucleusProcess::GetMeanFreePath(), G4VTransitionRadiation::GetMeanFreePath(), G4VXTRenergyLoss::GetMeanFreePath(), G4XrayReflection::GetMeanFreePath(), G4ITNavigator1::GetMotherToDaughterTransform(), G4ITNavigator2::GetMotherToDaughterTransform(), G4Navigator::GetMotherToDaughterTransform(), G4ITTransportationManager::GetParallelWorld(), G4TransportationManager::GetParallelWorld(), G4tgbGeometryDumper::GetTopPhysVol(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolumeByExtSurface(), G4BOptnForceCommonTruncatedExp::Initialize(), G4ParameterisedNavigation::LevelLocate(), G4RegularNavigation::LevelLocate(), G4LatticeManager::LoadLattice(), G4ITNavigator1::LocateGlobalPointAndSetup(), G4ITNavigator2::LocateGlobalPointAndSetup(), G4Navigator::LocateGlobalPointAndSetup(), G4ITNavigator1::LocateGlobalPointWithinVolume(), G4ITNavigator2::LocateGlobalPointWithinVolume(), G4Navigator::LocateGlobalPointWithinVolume(), G4FastSimHitMaker::make(), GFlashHitMaker::make(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteParamvol::ParamvolAlgorithmWrite(), G4GDMLWriteParamvol::ParamvolWrite(), G4GDMLWriteStructure::PhysvolWrite(), G4Channeling::PostStepDoIt(), G4ElNeutrinoNucleusProcess::PostStepDoIt(), G4ForwardXrayTR::PostStepDoIt(), G4ITTransportation::PostStepDoIt(), G4MicroElecSurface::PostStepDoIt(), G4MuNeutrinoNucleusProcess::PostStepDoIt(), G4NeutrinoElectronProcess::PostStepDoIt(), G4NuVacOscProcess::PostStepDoIt(), G4OpBoundaryProcess::PostStepDoIt(), G4ScoreSplittingProcess::PostStepDoIt(), G4TauNeutrinoNucleusProcess::PostStepDoIt(), G4VTransitionRadiation::PostStepDoIt(), G4VXTRenergyLoss::PostStepDoIt(), G4AdjointForcedInteractionForGamma::PostStepGetPhysicalInteractionLength(), G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength(), G4FastSimulationManagerProcess::PostStepGetPhysicalInteractionLength(), G4GeneralCerenkov::PostStepGetPhysicalInteractionLength(), G4LowECapture::PostStepGetPhysicalInteractionLength(), G4MaxTimeCuts::PostStepGetPhysicalInteractionLength(), G4MinEkineCuts::PostStepGetPhysicalInteractionLength(), G4StepLimiter::PostStepGetPhysicalInteractionLength(), G4UserSpecialCuts::PostStepGetPhysicalInteractionLength(), G4NavigationLogger::PreComputeStepLog(), G4PSFlatSurfaceCurrent::ProcessHits(), G4PSFlatSurfaceFlux::ProcessHits(), G4PSSphereSurfaceFlux::ProcessHits(), G4PSVolumeFlux::ProcessHits(), G4SafetyCalculator::QuickLocateWithinVolume(), G4ITNavigator2::RecheckDistanceToCurrentBoundary(), G4LatticeManager::RegisterLattice(), G4ParameterisedNavigation::RelocateWithinVolume(), G4VoxelNavigation::RelocateWithinVolume(), G4GDMLWriteStructure::ReplicavolWrite(), G4PropagatorInField::ReportLoopingParticle(), G4TransportationLogger::ReportLoopingTrack(), G4NavigationLogger::ReportOutsideMother(), G4NavigationLogger::ReportVolumeAndIntersection(), G4VoxelSafety::SafetyForVoxelHeader(), G4VoxelSafety::SafetyForVoxelNode(), G4SafetyCalculator::SafetyInCurrentVolume(), G4PolarizedAnnihilationModel::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4PolarizedIonisationModel::SampleSecondaries(), G4Region::ScanVolumeTree(), G4LogicalVolume::SetFieldManager(), G4VVisCommandGeometrySet::SetLVVisAtts(), G4VisCommandsTouchable::SetNewValue(), G4Transportation::SetTouchableInformation(), G4ScoringBox::SetupGeometry(), G4ScoringCylinder::SetupGeometry(), G4ScoringProbe::SetupGeometry(), G4ITNavigator1::SetupHierarchy(), G4ITNavigator2::SetupHierarchy(), G4Navigator::SetupHierarchy(), G4GlobalFastSimulationManager::ShowSetup(), G4VSceneHandler::StandardSpecialMeshRendering(), G4ParallelWorldProcess::SwitchMaterial(), G4GeomTestVolume::TestOverlapInTree(), G4GDMLWriteStructure::TraverseVolumeTree(), and G4MSSteppingAction::UserSteppingAction().

◆ GetMotherLogical()

◆ GetMultiplicity()

G4int G4VPhysicalVolume::GetMultiplicity ( ) const
virtual

Returns the number of object entities (1 for normal placements, n for replicas or parameterised).

Definition at line 145 of file G4VPhysicalVolume.cc.

146{
147 return 1;
148}

Referenced by G4GMocrenFileSceneHandler::AddSolid(), G4VtkSceneHandler::AddSolid(), G4GDMLWriteParamvol::ParamvolAlgorithmWrite(), G4GDMLWriteParamvol::ParamvolWrite(), and G4Region::ScanVolumeTree().

◆ GetName()

const G4String & G4VPhysicalVolume::GetName ( ) const
inline

Getter/setter for the volume's name.

Referenced by G4TransportationManager::ActivateNavigator(), G4VSceneHandler::AddCompound(), G4LogicalVolume::AddDaughter(), G4GDMLWrite::AddModule(), G4GMocrenFileSceneHandler::AddPrimitive(), G4GMocrenFileSceneHandler::AddSolid(), G4VtkSceneHandler::AddSolid(), G4CoupledTransportation::AlongStepGetPhysicalInteractionLength(), G4DNABrownianTransportation::AlongStepGetPhysicalInteractionLength(), G4GDMLWriteStructure::BorderSurfaceCache(), G4PVPlacement::CheckOverlaps(), G4Navigator::CheckOverlapsIterative(), G4SafetyCalculator::CompareSafetyValues(), G4ITNavigator1::ComputeSafety(), G4ITNavigator2::ComputeSafety(), G4VoxelNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4ITNavigator1::ComputeStep(), G4ITNavigator2::ComputeStep(), G4Navigator::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), G4PropagatorInField::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4tgbPlaceParamCircle::ComputeTransformation(), G4tgbPlaceParamLinear::ComputeTransformation(), G4tgbPlaceParamSquare::ComputeTransformation(), G4tgbDetectorConstruction::Construct(), G4tgbDetectorBuilder::ConstructDetector(), G4tgbVolume::ConstructG4PhysVol(), G4FastSimulationPhysics::ConstructProcess(), G4ITPathFinder::CreateTouchableHandle(), G4PathFinder::CreateTouchableHandle(), G4AdjointCrossSurfChecker::CrossingAnInterfaceBetweenTwoVolumes(), G4TransportationManager::DeActivateNavigator(), G4DNAMolecularDissociation::DecayIt(), G4PhysicalVolumeStore::DeRegister(), G4TransportationManager::DeRegisterNavigator(), G4PhysicalVolumeModel::DescribeAndDescend(), G4TrajectoryDrawByOriginVolume::Draw(), G4VSceneHandler::Draw3DRectMeshAsDots(), G4VSceneHandler::Draw3DRectMeshAsSurfaces(), G4VSceneHandler::DrawTetMeshAsDots(), G4VSceneHandler::DrawTetMeshAsSurfaces(), G4tgbVolumeMgr::DumpG4PhysVolLeaf(), G4LogicalBorderSurface::DumpInfo(), G4tgbGeometryDumper::DumpPVPlacement(), G4RunManagerKernel::DumpRegion(), G4HadronicProcess::DumpState(), G4tgbVolumeMgr::DumpSummary(), G4ASCIITreeSceneHandler::EndModeling(), G4TrajectoryOriginVolumeFilter::Evaluate(), G4PVParameterised::G4PVParameterised(), G4PVReplica(), G4PSDoseDeposit3D::GetIndex(), G4PSEnergyDeposit3D::GetIndex(), G4LatticeManager::GetLattice(), G4ITTransportationManager::GetNavigator(), G4TransportationManager::GetNavigator(), G4tgbVolumeMgr::GetTopPhysVol(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolume(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolumeByExtSurface(), G4LatticeManager::LoadLattice(), G4ITMultiNavigator::LocateGlobalPointAndSetup(), G4ITNavigator1::LocateGlobalPointAndSetup(), G4ITNavigator2::LocateGlobalPointAndSetup(), G4MultiNavigator::LocateGlobalPointAndSetup(), G4Navigator::LocateGlobalPointAndSetup(), G4NavigationHistory::operator<<, operator<<(), operator<<(), operator<<(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteStructure::PhysvolWrite(), G4CoupledTransportation::PostStepDoIt(), G4MicroElecSurface::PostStepDoIt(), G4OpBoundaryProcess::PostStepDoIt(), G4UCNAbsorption::PostStepDoIt(), G4UCNBoundaryProcess::PostStepDoIt(), G4UCNMultiScattering::PostStepDoIt(), G4ITSteppingVerbose::PostStepVerbose(), G4NavigationLogger::PreComputeStepLog(), G4ITMultiNavigator::PrepareNavigators(), G4MultiNavigator::PrepareNavigators(), G4ITSteppingVerbose::PreStepVerbose(), G4ITMultiNavigator::PrintLimited(), G4ITPathFinder::PrintLimited(), G4MultiNavigator::PrintLimited(), G4PropagatorInField::printStatus(), G4PhysicalVolumeStore::Register(), G4tgbVolumeMgr::RegisterMe(), G4PropagatorInField::ReportLoopingParticle(), G4PropagatorInField::ReportStuckParticle(), G4NavigationLogger::ReportVolumeAndIntersection(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VoxelSafety::SafetyForVoxelHeader(), G4SafetyCalculator::SafetyInCurrentVolume(), G4Region::ScanVolumeTree(), G4VisCommandsTouchable::SetNewValue(), G4ParallelWorldProcess::SetParallelWorld(), G4ParallelWorldScoringProcess::SetParallelWorld(), G4WeightCutOffProcess::SetParallelWorld(), G4WeightWindowProcess::SetParallelWorld(), G4FastSimulationManagerProcess::SetWorldVolume(), G4FastSimulationManagerProcess::SetWorldVolume(), G4GlobalFastSimulationManager::ShowSetup(), G4GDMLRead::StripNames(), G4ErrorGeomVolumeTarget::TargetReached(), G4GeomTestVolume::TestOverlapInTree(), G4ITSteppingVerbose::TrackingEnded(), G4ParallelWorldScoringProcess::Verbose(), G4ScoreSplittingProcess::Verbose(), G4VScoringMesh::WorkerConstruct(), and G4RunManagerKernel::WorkerUpdateWorldVolume().

◆ GetObjectRotation()

G4RotationMatrix * G4VPhysicalVolume::GetObjectRotation ( ) const

Accessors returning the rotation/translation of the object relative to the mother.

Definition at line 175 of file G4VPhysicalVolume.cc.

176{
177 static G4RotationMatrix aRotM;
178 static G4RotationMatrix IdentityRM;
179
180 G4RotationMatrix* retval = &IdentityRM;
181
182 // Insure against frot being a null pointer
183 if(this->GetRotation() != nullptr)
184 {
185 aRotM = GetRotation()->inverse();
186 retval= &aRotM;
187 }
188 return retval;
189}
CLHEP::HepRotation G4RotationMatrix
HepRotation inverse() const
const G4RotationMatrix * GetRotation() const

◆ GetObjectRotationValue()

G4RotationMatrix G4VPhysicalVolume::GetObjectRotationValue ( ) const

Definition at line 191 of file G4VPhysicalVolume.cc.

192{
193 G4RotationMatrix aRotM; // Initialised to identity
194
195 // Insure against G4MT_rot being a null pointer
196 if(G4MT_rot)
197 {
198 aRotM = G4MT_rot->inverse();
199 }
200 return aRotM;
201}

Referenced by G4GDMLWriteParamvol::ParametersWrite().

◆ GetObjectTranslation()

◆ GetParameterisation()

◆ GetRegularStructureId()

virtual G4int G4VPhysicalVolume::GetRegularStructureId ( ) const
pure virtual

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.

Implemented in G4PVPlacement, and G4VExternalPhysicalVolume.

Referenced by G4ITNavigator1::ComputeStep(), G4ITNavigator2::ComputeStep(), G4Navigator::ComputeStep(), G4ITNavigator1::GetMotherToDaughterTransform(), G4ITNavigator2::GetMotherToDaughterTransform(), G4Navigator::GetMotherToDaughterTransform(), G4ITStepProcessor::SetInitialStep(), and G4SteppingManager::SetInitialStep().

◆ GetReplicationData()

virtual void G4VPhysicalVolume::GetReplicationData ( EAxis & axis,
G4int & nReplicas,
G4double & width,
G4double & offset,
G4bool & consuming ) const
pure virtual

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).

Implemented in G4PVPlacement, and G4VExternalPhysicalVolume.

Referenced by G4GMocrenFileSceneHandler::AddSolid(), G4ParameterisedNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeTransformation(), G4ReplicaNavigation::ComputeTransformation(), G4ReplicaNavigation::DistanceToOut(), G4ReplicaNavigation::DistanceToOut(), G4ReplicaNavigation::Inside(), G4GDMLWriteStructure::ReplicavolWrite(), and G4ASCIITreeSceneHandler::RequestPrimitives().

◆ GetRotation() [1/2]

G4RotationMatrix * G4VPhysicalVolume::GetRotation ( )

Definition at line 165 of file G4VPhysicalVolume.cc.

166{
167 return G4MT_rot;
168}

◆ GetRotation() [2/2]

◆ GetSubInstanceManager()

const G4PVManager & G4VPhysicalVolume::GetSubInstanceManager ( )
static

Returns the private data instance manager for multi-threading.

Definition at line 140 of file G4VPhysicalVolume.cc.

141{
142 return subInstanceManager;
143}

Referenced by G4GeometryWorkspace::G4GeometryWorkspace().

◆ GetTranslation()

◆ InitialiseWorker()

void G4VPhysicalVolume::InitialiseWorker ( G4VPhysicalVolume * pMasterObject,
G4RotationMatrix * pRot,
const G4ThreeVector & tlate )
protected

This method is similar to the constructor. It is used by each worker thread to achieve the partial effect as that of the master thread.

Definition at line 111 of file G4VPhysicalVolume.cc.

115{
116 subInstanceManager.SlaveCopySubInstanceArray();
117
118 this->SetRotation( pRot ); // G4MT_rot = pRot;
119 this->SetTranslation( tlate ); // G4MT_trans = tlate;
120 // G4PhysicalVolumeStore::Register(this);
121}

◆ IsMany()

virtual G4bool G4VPhysicalVolume::IsMany ( ) const
pure virtual

NOT implemented. Should return true if the volume is MANY type.

Implemented in G4PVPlacement, and G4VExternalPhysicalVolume.

◆ IsParameterised()

◆ IsRegularStructure()

virtual G4bool G4VPhysicalVolume::IsRegularStructure ( ) const
pure virtual

Returns true if the underlying volume structure is regular.

Implemented in G4PVPlacement, and G4VExternalPhysicalVolume.

Referenced by G4ScoreSplittingProcess::PostStepDoIt().

◆ IsReplicated()

◆ operator=()

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

◆ operator==()

G4bool G4VPhysicalVolume::operator== ( const G4VPhysicalVolume & p) const
inline

Equality defined by equal addresses only..

◆ SetCopyNo()

◆ SetLogicalVolume()

void G4VPhysicalVolume::SetLogicalVolume ( G4LogicalVolume * pLogical)
inline

Sets the logical volume pointer. Must not be called when geometry is closed.

◆ SetMotherLogical()

◆ SetName()

void G4VPhysicalVolume::SetName ( const G4String & pName)

◆ SetRotation()

void G4VPhysicalVolume::SetRotation ( G4RotationMatrix * pRot)

Sets the rotation matrix. NOT INTENDED FOR GENERAL USE. Non constant version, used to change transformation for the replication/parameterisation mechanism.

Definition at line 170 of file G4VPhysicalVolume.cc.

171{
172 G4MT_rot = pRot;
173}

Referenced by G4VDivisionParameterisation::ChangeRotMatrix(), G4tgbPlaceParamCircle::ComputeTransformation(), G4tgbPlaceParamLinear::ComputeTransformation(), G4tgbPlaceParamSquare::ComputeTransformation(), G4PVPlacement::G4PVPlacement(), G4VPhysicalVolume(), and InitialiseWorker().

◆ SetTranslation()

void G4VPhysicalVolume::SetTranslation ( const G4ThreeVector & v)

Sets the translation vector.

Definition at line 155 of file G4VPhysicalVolume.cc.

156{
157 G4MT_tx=vec.x(); G4MT_ty=vec.y(); G4MT_tz=vec.z();
158}

Referenced by G4ParameterisationBoxX::ComputeTransformation(), G4ParameterisationBoxY::ComputeTransformation(), G4ParameterisationBoxZ::ComputeTransformation(), G4ParameterisationConsPhi::ComputeTransformation(), G4ParameterisationConsRho::ComputeTransformation(), G4ParameterisationConsZ::ComputeTransformation(), G4ParameterisationParaX::ComputeTransformation(), G4ParameterisationParaY::ComputeTransformation(), G4ParameterisationParaZ::ComputeTransformation(), G4ParameterisationPolyconePhi::ComputeTransformation(), G4ParameterisationPolyconeRho::ComputeTransformation(), G4ParameterisationPolyconeZ::ComputeTransformation(), G4ParameterisationPolyhedraPhi::ComputeTransformation(), G4ParameterisationPolyhedraRho::ComputeTransformation(), G4ParameterisationPolyhedraZ::ComputeTransformation(), G4ParameterisationTrdX::ComputeTransformation(), G4ParameterisationTrdY::ComputeTransformation(), G4ParameterisationTrdZ::ComputeTransformation(), G4ParameterisationTubsPhi::ComputeTransformation(), G4ParameterisationTubsRho::ComputeTransformation(), G4ParameterisationTubsZ::ComputeTransformation(), G4PartialPhantomParameterisation::ComputeTransformation(), G4PhantomParameterisation::ComputeTransformation(), G4ReplicaNavigation::ComputeTransformation(), G4ReplicaNavigation::ComputeTransformation(), G4tgbPlaceParamCircle::ComputeTransformation(), G4tgbPlaceParamLinear::ComputeTransformation(), G4tgbPlaceParamSquare::ComputeTransformation(), G4VPhysicalVolume(), and InitialiseWorker().

◆ TerminateWorker()

void G4VPhysicalVolume::TerminateWorker ( G4VPhysicalVolume * pMasterObject)
protected

This method is similar to the destructor. It is used by each worker thread to achieve the partial effect as that of the master thread.

Definition at line 134 of file G4VPhysicalVolume.cc.

135{
136}

◆ VolumeType()

virtual EVolume G4VPhysicalVolume::VolumeType ( ) const
pure virtual

Characterises the type of volume - normal/replicated/parameterised.

Implemented in G4PVPlacement, and G4VExternalPhysicalVolume.

Referenced by G4LogicalVolume::AddDaughter(), and G4VtkSceneHandler::AddSolid().

Member Data Documentation

◆ instanceID

G4int G4VPhysicalVolume::instanceID
protected

For use in implementing the per-thread data. It is equivalent to a pointer to a G4PVData object.

Definition at line 323 of file G4VPhysicalVolume.hh.

Referenced by G4VPhysicalVolume(), and G4VPhysicalVolume().

◆ subInstanceManager

G4PVManager G4VPhysicalVolume::subInstanceManager
staticprotected

Needed to use G4PVManager for the G4PVData per-thread objects.

Definition at line 326 of file G4VPhysicalVolume.hh.

Referenced by Clean(), G4VPhysicalVolume(), G4VPhysicalVolume(), GetSubInstanceManager(), and InitialiseWorker().


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