Geant4 10.7.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=nullptr)
 
virtual const G4NavigationHistoryGetHistory () const
 

Detailed Description

Definition at line 124 of file G4PhysicalVolumeModel.hh.

Constructor & Destructor Documentation

◆ G4PhysicalVolumeModelTouchable()

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

Definition at line 1023 of file G4PhysicalVolumeModel.cc.

1024 :
1025 fFullPVPath(fullPVPath) {}

Member Function Documentation

◆ GetHistoryDepth()

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

Reimplemented from G4VTouchable.

Definition at line 133 of file G4PhysicalVolumeModel.hh.

133{return G4int(fFullPVPath.size());}
int G4int
Definition: G4Types.hh:85

◆ GetReplicaNumber()

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

Reimplemented from G4VTouchable.

Definition at line 1079 of file G4PhysicalVolumeModel.cc.

1080{
1081 size_t i = fFullPVPath.size() - depth - 1;
1082 if (i >= fFullPVPath.size()) {
1083 G4Exception("G4PhysicalVolumeModelTouchable::GetReplicaNumber",
1084 "modeling0009",
1086 "Index out of range. Asking for non-existent depth");
1087 }
1088 return fFullPVPath[i].GetCopyNo();
1089}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35

◆ GetRotation()

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

Implements G4VTouchable.

Definition at line 1041 of file G4PhysicalVolumeModel.cc.

1042{
1043 size_t i = fFullPVPath.size() - depth - 1;
1044 if (i >= fFullPVPath.size()) {
1045 G4Exception("G4PhysicalVolumeModelTouchable::GetRotation",
1046 "modeling0006",
1048 "Index out of range. Asking for non-existent depth");
1049 }
1050 static G4RotationMatrix tempRotation;
1051 tempRotation = fFullPVPath[i].GetTransform().getRotation();
1052 return &tempRotation;
1053}

◆ GetSolid()

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

Reimplemented from G4VTouchable.

Definition at line 1067 of file G4PhysicalVolumeModel.cc.

1068{
1069 size_t i = fFullPVPath.size() - depth - 1;
1070 if (i >= fFullPVPath.size()) {
1071 G4Exception("G4PhysicalVolumeModelTouchable::GetSolid",
1072 "modeling0008",
1074 "Index out of range. Asking for non-existent depth");
1075 }
1076 return fFullPVPath[i].GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
1077}

◆ GetTranslation()

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

Implements G4VTouchable.

Definition at line 1027 of file G4PhysicalVolumeModel.cc.

1028{
1029 size_t i = fFullPVPath.size() - depth - 1;
1030 if (i >= fFullPVPath.size()) {
1031 G4Exception("G4PhysicalVolumeModelTouchable::GetTranslation",
1032 "modeling0005",
1034 "Index out of range. Asking for non-existent depth");
1035 }
1036 static G4ThreeVector tempTranslation;
1037 tempTranslation = fFullPVPath[i].GetTransform().getTranslation();
1038 return tempTranslation;
1039}

◆ GetVolume()

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

Reimplemented from G4VTouchable.

Definition at line 1055 of file G4PhysicalVolumeModel.cc.

1056{
1057 size_t i = fFullPVPath.size() - depth - 1;
1058 if (i >= fFullPVPath.size()) {
1059 G4Exception("G4PhysicalVolumeModelTouchable::GetVolume",
1060 "modeling0007",
1062 "Index out of range. Asking for non-existent depth");
1063 }
1064 return fFullPVPath[i].GetPhysicalVolume();
1065}

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