Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TouchableHistory Class Reference

#include <G4TouchableHistory.hh>

+ Inheritance diagram for G4TouchableHistory:

Public Member Functions

 G4TouchableHistory ()
 
 G4TouchableHistory (const G4NavigationHistory &history)
 
 ~G4TouchableHistory ()
 
G4VPhysicalVolumeGetVolume (G4int depth=0) const
 
G4VSolidGetSolid (G4int depth=0) const
 
const G4ThreeVectorGetTranslation (G4int depth=0) const
 
const G4RotationMatrixGetRotation (G4int depth=0) const
 
G4int GetReplicaNumber (G4int depth=0) const
 
G4int GetHistoryDepth () const
 
G4int MoveUpHistory (G4int num_levels=1)
 
void UpdateYourself (G4VPhysicalVolume *pPhysVol, const G4NavigationHistory *history=nullptr)
 
const G4NavigationHistoryGetHistory () const
 
void * operator new (size_t)
 
void operator delete (void *aTH)
 
- 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 48 of file G4TouchableHistory.hh.

Constructor & Destructor Documentation

◆ G4TouchableHistory() [1/2]

G4TouchableHistory::G4TouchableHistory ( )

Definition at line 39 of file G4TouchableHistory.cc.

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

◆ G4TouchableHistory() [2/2]

G4TouchableHistory::G4TouchableHistory ( const G4NavigationHistory history)

Definition at line 47 of file G4TouchableHistory.cc.

48 : fhistory(history)
49{
50 const G4AffineTransform& tf = fhistory.GetTopTransform();
51 ftlate = tf.InverseNetTranslation();
52 frot = tf.InverseNetRotation();
53}
G4ThreeVector InverseNetTranslation() const
G4RotationMatrix InverseNetRotation() const
const G4AffineTransform & GetTopTransform() const

◆ ~G4TouchableHistory()

G4TouchableHistory::~G4TouchableHistory ( )

Definition at line 55 of file G4TouchableHistory.cc.

56{
57}

Member Function Documentation

◆ GetHistory()

◆ 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 {
94 *rotM = fhistory.GetTransform(CalculateHistoryIndex(depth)).NetRotation();
95 return rotM;
96 }
97}
G4RotationMatrix NetRotation() const
const G4AffineTransform & GetTransform(G4int n) const
#define G4ThreadLocal
Definition: tls.hh:77

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

◆ 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 =
74 fhistory.GetTransform(CalculateHistoryIndex(depth)).NetTranslation();
75 return *ctrans;
76 }
77}
G4ThreeVector NetTranslation() const

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()


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