Geant4-11
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes
G4TouchableHistory Class Reference

#include <G4TouchableHistory.hh>

Inheritance diagram for G4TouchableHistory:
G4VTouchable

Public Member Functions

 G4TouchableHistory ()
 
 G4TouchableHistory (const G4NavigationHistory &history)
 
G4int GetCopyNumber (G4int depth=0) const
 
const G4NavigationHistoryGetHistory () const
 
G4int GetHistoryDepth () const
 
G4int GetReplicaNumber (G4int depth=0) const
 
const G4RotationMatrixGetRotation (G4int depth=0) const
 
G4VSolidGetSolid (G4int depth=0) const
 
const G4ThreeVectorGetTranslation (G4int depth=0) const
 
G4VPhysicalVolumeGetVolume (G4int depth=0) const
 
G4int MoveUpHistory (G4int num_levels=1)
 
void operator delete (void *aTH)
 
void * operator new (size_t)
 
void UpdateYourself (G4VPhysicalVolume *pPhysVol, const G4NavigationHistory *history=nullptr)
 
 ~G4TouchableHistory ()
 

Private Member Functions

G4int CalculateHistoryIndex (G4int stackDepth) const
 

Private Attributes

G4NavigationHistory fhistory
 
G4RotationMatrix frot
 
G4ThreeVector ftlate
 

Detailed Description

Definition at line 48 of file G4TouchableHistory.hh.

Constructor & Destructor Documentation

◆ G4TouchableHistory() [1/2]

G4TouchableHistory::G4TouchableHistory ( )

Definition at line 39 of file G4TouchableHistory.cc.

41 ftlate(G4ThreeVector(0.,0.,0.)),
42 fhistory()
43{
44 fhistory.SetFirstEntry(nullptr);
45}
CLHEP::HepRotation G4RotationMatrix
CLHEP::Hep3Vector G4ThreeVector
void SetFirstEntry(G4VPhysicalVolume *pVol)
G4RotationMatrix frot
G4NavigationHistory fhistory

References fhistory, and G4NavigationHistory::SetFirstEntry().

◆ G4TouchableHistory() [2/2]

G4TouchableHistory::G4TouchableHistory ( const G4NavigationHistory history)

Definition at line 47 of file G4TouchableHistory.cc.

49{
53}
G4ThreeVector InverseNetTranslation() const
G4RotationMatrix InverseNetRotation() const
const G4AffineTransform & GetTopTransform() const
def history()
Definition: g4zmq.py:84

References fhistory, frot, ftlate, G4NavigationHistory::GetTopTransform(), G4AffineTransform::InverseNetRotation(), and G4AffineTransform::InverseNetTranslation().

◆ ~G4TouchableHistory()

G4TouchableHistory::~G4TouchableHistory ( )

Definition at line 55 of file G4TouchableHistory.cc.

56{
57}

Member Function Documentation

◆ CalculateHistoryIndex()

G4int G4TouchableHistory::CalculateHistoryIndex ( G4int  stackDepth) const
inlineprivate

Referenced by GetRotation(), and GetTranslation().

◆ GetCopyNumber()

G4int G4VTouchable::GetCopyNumber ( G4int  depth = 0) const
inlineinherited

◆ GetHistory()

const G4NavigationHistory * G4TouchableHistory::GetHistory ( ) const
inlinevirtual

◆ GetHistoryDepth()

G4int G4TouchableHistory::GetHistoryDepth ( ) const
inlinevirtual

Reimplemented from G4VTouchable.

◆ GetReplicaNumber()

G4int G4TouchableHistory::GetReplicaNumber ( G4int  depth = 0) const
inlinevirtual

Reimplemented from G4VTouchable.

Referenced by G4VPrimitiveScorer::GetIndex().

◆ GetRotation()

const G4RotationMatrix * G4TouchableHistory::GetRotation ( G4int  depth = 0) const
virtual

Implements G4VTouchable.

Definition at line 80 of file G4TouchableHistory.cc.

81{
82 // The value returned will change at the next call
83 // Copy it if you want to use it!
84 //
85 static G4ThreadLocal G4RotationMatrix* rotM = nullptr;
86 if ( rotM == nullptr ) { rotM = new G4RotationMatrix; }
87
88 if(depth==0.0)
89 {
90 return &frot;
91 }
92 else
93 {
95 return rotM;
96 }
97}
G4RotationMatrix NetRotation() const
const G4AffineTransform & GetTransform(G4int n) const
G4int CalculateHistoryIndex(G4int stackDepth) const
#define G4ThreadLocal
Definition: tls.hh:77

References CalculateHistoryIndex(), fhistory, frot, G4ThreadLocal, G4NavigationHistory::GetTransform(), and G4AffineTransform::NetRotation().

Referenced by G4Channeling::PosToLattice(), G4Channeling::PostStepDoIt(), and G4Channeling::UpdateParameters().

◆ GetSolid()

G4VSolid * G4TouchableHistory::GetSolid ( G4int  depth = 0) const
inlinevirtual

Reimplemented from G4VTouchable.

◆ GetTranslation()

const G4ThreeVector & G4TouchableHistory::GetTranslation ( G4int  depth = 0) const
virtual

Implements G4VTouchable.

Definition at line 60 of file G4TouchableHistory.cc.

61{
62 // The value returned will change at the next call
63 // Copy it if you want to use it!
64 //
65 static G4ThreadLocal G4ThreeVector* ctrans = nullptr;
66 if ( ctrans == nullptr ) { ctrans = new G4ThreeVector; }
67 if(depth==0.0)
68 {
69 return ftlate;
70 }
71 else
72 {
73 *ctrans =
75 return *ctrans;
76 }
77}
G4ThreeVector NetTranslation() const

References CalculateHistoryIndex(), fhistory, ftlate, G4ThreadLocal, G4NavigationHistory::GetTransform(), and G4AffineTransform::NetTranslation().

Referenced by G4Channeling::PosToLattice().

◆ GetVolume()

G4VPhysicalVolume * G4TouchableHistory::GetVolume ( G4int  depth = 0) const
inlinevirtual

Reimplemented from G4VTouchable.

Referenced by G4VReadOutGeometry::FindROTouchable().

◆ MoveUpHistory()

G4int G4TouchableHistory::MoveUpHistory ( G4int  num_levels = 1)
virtual

◆ operator delete()

void G4TouchableHistory::operator delete ( void *  aTH)
inline

◆ operator new()

void * G4TouchableHistory::operator new ( size_t  )
inline

◆ UpdateYourself()

void G4TouchableHistory::UpdateYourself ( G4VPhysicalVolume pPhysVol,
const G4NavigationHistory history = nullptr 
)
virtual

Field Documentation

◆ fhistory

G4NavigationHistory G4TouchableHistory::fhistory
private

Definition at line 94 of file G4TouchableHistory.hh.

Referenced by G4TouchableHistory(), GetRotation(), and GetTranslation().

◆ frot

G4RotationMatrix G4TouchableHistory::frot
private

Definition at line 92 of file G4TouchableHistory.hh.

Referenced by G4TouchableHistory(), and GetRotation().

◆ ftlate

G4ThreeVector G4TouchableHistory::ftlate
private

Definition at line 93 of file G4TouchableHistory.hh.

Referenced by G4TouchableHistory(), and GetTranslation().


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