Geant4 11.1.1
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 ()=default
 
virtual ~G4VTouchable ()=default
 
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 128 of file G4PhysicalVolumeModel.hh.

Constructor & Destructor Documentation

◆ G4PhysicalVolumeModelTouchable()

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

Definition at line 1013 of file G4PhysicalVolumeModel.cc.

1014 :
1015 fFullPVPath(fullPVPath) {}

Member Function Documentation

◆ GetHistoryDepth()

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

Reimplemented from G4VTouchable.

Definition at line 137 of file G4PhysicalVolumeModel.hh.

137{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 1069 of file G4PhysicalVolumeModel.cc.

1070{
1071 size_t i = fFullPVPath.size() - depth - 1;
1072 if (i >= fFullPVPath.size()) {
1073 G4Exception("G4PhysicalVolumeModelTouchable::GetReplicaNumber",
1074 "modeling0009",
1076 "Index out of range. Asking for non-existent depth");
1077 }
1078 return fFullPVPath[i].GetCopyNo();
1079}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59

◆ GetRotation()

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

Implements G4VTouchable.

Definition at line 1031 of file G4PhysicalVolumeModel.cc.

1032{
1033 size_t i = fFullPVPath.size() - depth - 1;
1034 if (i >= fFullPVPath.size()) {
1035 G4Exception("G4PhysicalVolumeModelTouchable::GetRotation",
1036 "modeling0006",
1038 "Index out of range. Asking for non-existent depth");
1039 }
1040 static G4RotationMatrix tempRotation;
1041 tempRotation = fFullPVPath[i].GetTransform().getRotation();
1042 return &tempRotation;
1043}

◆ GetSolid()

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

Reimplemented from G4VTouchable.

Definition at line 1057 of file G4PhysicalVolumeModel.cc.

1058{
1059 size_t i = fFullPVPath.size() - depth - 1;
1060 if (i >= fFullPVPath.size()) {
1061 G4Exception("G4PhysicalVolumeModelTouchable::GetSolid",
1062 "modeling0008",
1064 "Index out of range. Asking for non-existent depth");
1065 }
1066 return fFullPVPath[i].GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
1067}

◆ GetTranslation()

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

Implements G4VTouchable.

Definition at line 1017 of file G4PhysicalVolumeModel.cc.

1018{
1019 size_t i = fFullPVPath.size() - depth - 1;
1020 if (i >= fFullPVPath.size()) {
1021 G4Exception("G4PhysicalVolumeModelTouchable::GetTranslation",
1022 "modeling0005",
1024 "Index out of range. Asking for non-existent depth");
1025 }
1026 static G4ThreeVector tempTranslation;
1027 tempTranslation = fFullPVPath[i].GetTransform().getTranslation();
1028 return tempTranslation;
1029}

◆ GetVolume()

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

Reimplemented from G4VTouchable.

Definition at line 1045 of file G4PhysicalVolumeModel.cc.

1046{
1047 size_t i = fFullPVPath.size() - depth - 1;
1048 if (i >= fFullPVPath.size()) {
1049 G4Exception("G4PhysicalVolumeModelTouchable::GetVolume",
1050 "modeling0007",
1052 "Index out of range. Asking for non-existent depth");
1053 }
1054 return fFullPVPath[i].GetPhysicalVolume();
1055}

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