Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable Class Reference

#include <G4PhysicalVolumeModel.hh>

+ Inheritance diagram for G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable:

Public Member Functions

 G4PhysicalVolumeModelTouchable (const std::vector< G4PhysicalVolumeNodeID > &fullPVPath)
 
const G4ThreeVectorGetTranslation (G4int depth) const
 
const G4RotationMatrixGetRotation (G4int depth) const
 
G4VPhysicalVolumeGetVolume (G4int depth) const
 
G4VSolidGetSolid (G4int depth) const
 
G4int GetReplicaNumber (G4int depth) const
 
G4int GetHistoryDepth () const
 
- Public Member Functions inherited from G4VTouchable
 G4VTouchable ()
 
virtual ~G4VTouchable ()
 
virtual const G4ThreeVectorGetTranslation (G4int depth=0) const =0
 
virtual const G4RotationMatrixGetRotation (G4int depth=0) const =0
 
virtual G4VPhysicalVolumeGetVolume (G4int depth=0) const
 
virtual G4VSolidGetSolid (G4int depth=0) const
 
virtual G4int GetReplicaNumber (G4int depth=0) const
 
G4int GetCopyNumber (G4int depth=0) const
 
virtual G4int GetHistoryDepth () const
 
virtual G4int MoveUpHistory (G4int num_levels=1)
 
virtual void UpdateYourself (G4VPhysicalVolume *pPhysVol, const G4NavigationHistory *history=0)
 
virtual const G4NavigationHistoryGetHistory () const
 

Detailed Description

Definition at line 119 of file G4PhysicalVolumeModel.hh.

Constructor & Destructor Documentation

◆ G4PhysicalVolumeModelTouchable()

G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::G4PhysicalVolumeModelTouchable ( const std::vector< G4PhysicalVolumeNodeID > &  fullPVPath)

Definition at line 902 of file G4PhysicalVolumeModel.cc.

903 :
904 fFullPVPath(fullPVPath) {}

Member Function Documentation

◆ GetHistoryDepth()

G4int G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetHistoryDepth ( ) const
inlinevirtual

Reimplemented from G4VTouchable.

Definition at line 128 of file G4PhysicalVolumeModel.hh.

128{return fFullPVPath.size();}

◆ GetReplicaNumber()

G4int G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetReplicaNumber ( G4int  depth) const
virtual

Reimplemented from G4VTouchable.

Definition at line 958 of file G4PhysicalVolumeModel.cc.

959{
960 size_t i = fFullPVPath.size() - depth - 1;
961 if (i >= fFullPVPath.size()) {
962 G4Exception("G4PhysicalVolumeModelTouchable::GetReplicaNumber",
963 "modeling0009",
965 "Index out of range. Asking for non-existent depth");
966 }
967 return fFullPVPath[i].GetCopyNo();
968}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ GetRotation()

const G4RotationMatrix * G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetRotation ( G4int  depth) const
virtual

Implements G4VTouchable.

Definition at line 920 of file G4PhysicalVolumeModel.cc.

921{
922 size_t i = fFullPVPath.size() - depth - 1;
923 if (i >= fFullPVPath.size()) {
924 G4Exception("G4PhysicalVolumeModelTouchable::GetRotation",
925 "modeling0006",
927 "Index out of range. Asking for non-existent depth");
928 }
929 static G4RotationMatrix tempRotation;
930 tempRotation = fFullPVPath[i].GetTransform().getRotation();
931 return &tempRotation;
932}

◆ GetSolid()

G4VSolid * G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetSolid ( G4int  depth) const
virtual

Reimplemented from G4VTouchable.

Definition at line 946 of file G4PhysicalVolumeModel.cc.

947{
948 size_t i = fFullPVPath.size() - depth - 1;
949 if (i >= fFullPVPath.size()) {
950 G4Exception("G4PhysicalVolumeModelTouchable::GetSolid",
951 "modeling0008",
953 "Index out of range. Asking for non-existent depth");
954 }
955 return fFullPVPath[i].GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
956}

◆ GetTranslation()

const G4ThreeVector & G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetTranslation ( G4int  depth) const
virtual

Implements G4VTouchable.

Definition at line 906 of file G4PhysicalVolumeModel.cc.

907{
908 size_t i = fFullPVPath.size() - depth - 1;
909 if (i >= fFullPVPath.size()) {
910 G4Exception("G4PhysicalVolumeModelTouchable::GetTranslation",
911 "modeling0005",
913 "Index out of range. Asking for non-existent depth");
914 }
915 static G4ThreeVector tempTranslation;
916 tempTranslation = fFullPVPath[i].GetTransform().getTranslation();
917 return tempTranslation;
918}

◆ GetVolume()

G4VPhysicalVolume * G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetVolume ( G4int  depth) const
virtual

Reimplemented from G4VTouchable.

Definition at line 934 of file G4PhysicalVolumeModel.cc.

935{
936 size_t i = fFullPVPath.size() - depth - 1;
937 if (i >= fFullPVPath.size()) {
938 G4Exception("G4PhysicalVolumeModelTouchable::GetVolume",
939 "modeling0007",
941 "Index out of range. Asking for non-existent depth");
942 }
943 return fFullPVPath[i].GetPhysicalVolume();
944}

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