Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable Class Reference

#include <G4PhysicalVolumeModel.hh>

Inheritance diagram for G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable:
G4VTouchable

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 ()
 
G4int GetCopyNumber (G4int depth=0) 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

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

Definition at line 906 of file G4PhysicalVolumeModel.cc.

906  :
907  fFullPVPath(fullPVPath) {}

Member Function Documentation

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

Reimplemented from G4VTouchable.

Definition at line 128 of file G4PhysicalVolumeModel.hh.

128 {return fFullPVPath.size();}
G4int G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetReplicaNumber ( G4int  depth) const
virtual

Reimplemented from G4VTouchable.

Definition at line 961 of file G4PhysicalVolumeModel.cc.

References FatalErrorInArgument, G4PhysicalVolumeModel::fFullPVPath, and G4Exception().

962 {
963  size_t i = fFullPVPath.size() - depth - 1;
964  if (i >= fFullPVPath.size()) {
965  G4Exception("G4PhysicalVolumeModelTouchable::GetReplicaNumber",
966  "modeling0009",
968  "Index out of range. Asking for non-existent depth");
969  }
970  return fFullPVPath[i].GetCopyNo();
971 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4RotationMatrix * G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetRotation ( G4int  depth) const
virtual

Implements G4VTouchable.

Definition at line 923 of file G4PhysicalVolumeModel.cc.

References FatalErrorInArgument, G4PhysicalVolumeModel::fFullPVPath, and G4Exception().

924 {
925  size_t i = fFullPVPath.size() - depth - 1;
926  if (i >= fFullPVPath.size()) {
927  G4Exception("G4PhysicalVolumeModelTouchable::GetRotation",
928  "modeling0006",
930  "Index out of range. Asking for non-existent depth");
931  }
932  static G4RotationMatrix tempRotation;
933  tempRotation = fFullPVPath[i].GetTransform().getRotation();
934  return &tempRotation;
935 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4VSolid * G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetSolid ( G4int  depth) const
virtual

Reimplemented from G4VTouchable.

Definition at line 949 of file G4PhysicalVolumeModel.cc.

References FatalErrorInArgument, G4PhysicalVolumeModel::fFullPVPath, and G4Exception().

950 {
951  size_t i = fFullPVPath.size() - depth - 1;
952  if (i >= fFullPVPath.size()) {
953  G4Exception("G4PhysicalVolumeModelTouchable::GetSolid",
954  "modeling0008",
956  "Index out of range. Asking for non-existent depth");
957  }
958  return fFullPVPath[i].GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
959 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4ThreeVector & G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetTranslation ( G4int  depth) const
virtual

Implements G4VTouchable.

Definition at line 909 of file G4PhysicalVolumeModel.cc.

References FatalErrorInArgument, and G4Exception().

910 {
911  size_t i = fFullPVPath.size() - depth - 1;
912  if (i >= fFullPVPath.size()) {
913  G4Exception("G4PhysicalVolumeModelTouchable::GetTranslation",
914  "modeling0005",
916  "Index out of range. Asking for non-existent depth");
917  }
918  static G4ThreeVector tempTranslation;
919  tempTranslation = fFullPVPath[i].GetTransform().getTranslation();
920  return tempTranslation;
921 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4VPhysicalVolume * G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetVolume ( G4int  depth) const
virtual

Reimplemented from G4VTouchable.

Definition at line 937 of file G4PhysicalVolumeModel.cc.

References FatalErrorInArgument, G4PhysicalVolumeModel::fFullPVPath, and G4Exception().

938 {
939  size_t i = fFullPVPath.size() - depth - 1;
940  if (i >= fFullPVPath.size()) {
941  G4Exception("G4PhysicalVolumeModelTouchable::GetVolume",
942  "modeling0007",
944  "Index out of range. Asking for non-existent depth");
945  }
946  return fFullPVPath[i].GetPhysicalVolume();
947 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

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