Geant4 11.2.2
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)
 
virtual ~G4TouchableHistory ()
 
virtual G4VPhysicalVolumeGetVolume (G4int depth=0) const
 
virtual G4VSolidGetSolid (G4int depth=0) const
 
virtual const G4ThreeVectorGetTranslation (G4int depth=0) const
 
virtual const G4RotationMatrixGetRotation (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
 
void * operator new (std::size_t)
 
void operator delete (void *aTH)
 

Detailed Description

Definition at line 103 of file G4TouchableHistory.hh.

Constructor & Destructor Documentation

◆ G4TouchableHistory() [1/2]

G4TouchableHistory::G4TouchableHistory ( )

Definition at line 39 of file G4TouchableHistory.cc.

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

◆ G4TouchableHistory() [2/2]

G4TouchableHistory::G4TouchableHistory ( const G4NavigationHistory & history)

Definition at line 46 of file G4TouchableHistory.cc.

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

◆ ~G4TouchableHistory()

G4TouchableHistory::~G4TouchableHistory ( )
virtualdefault

Member Function Documentation

◆ GetCopyNumber()

G4int G4TouchableHistory::GetCopyNumber ( G4int depth = 0) const
inline

◆ GetHistory()

◆ GetHistoryDepth()

virtual G4int G4TouchableHistory::GetHistoryDepth ( ) const
inlinevirtual

◆ GetReplicaNumber()

◆ GetRotation()

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

Reimplemented in G4GMocrenTouchable, and G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable.

Definition at line 77 of file G4TouchableHistory.cc.

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

Referenced by G4Channeling::PosToLattice(), G4Channeling::PostStepDoIt(), G4ElNeutrinoNucleusProcess::PostStepDoIt(), G4MuNeutrinoNucleusProcess::PostStepDoIt(), G4NeutrinoElectronProcess::PostStepDoIt(), G4TauNeutrinoNucleusProcess::PostStepDoIt(), and G4VXTRenergyLoss::PostStepDoIt().

◆ GetSolid()

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

◆ GetTranslation()

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

Reimplemented in G4GMocrenTouchable, and G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable.

Definition at line 57 of file G4TouchableHistory.cc.

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

Referenced by G4Channeling::PosToLattice(), G4ElNeutrinoNucleusProcess::PostStepDoIt(), G4MuNeutrinoNucleusProcess::PostStepDoIt(), G4NeutrinoElectronProcess::PostStepDoIt(), G4TauNeutrinoNucleusProcess::PostStepDoIt(), and G4VXTRenergyLoss::PostStepDoIt().

◆ GetVolume()

◆ MoveUpHistory()

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

◆ operator delete()

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

◆ operator new()

void * G4TouchableHistory::operator new ( std::size_t )
inline

◆ UpdateYourself()


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