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

#include <G4FastTrack.hh>

Public Member Functions

 G4FastTrack (G4Envelope *anEnvelope, G4bool IsUnique)
 
 ~G4FastTrack ()=default
 
void SetCurrentTrack (const G4Track &, const G4Navigator *a=nullptr)
 
G4bool OnTheBoundaryButExiting () const
 
const G4TrackGetPrimaryTrack () const
 
G4EnvelopeGetEnvelope () const
 
G4LogicalVolumeGetEnvelopeLogicalVolume () const
 
G4VPhysicalVolumeGetEnvelopePhysicalVolume () const
 
G4VSolidGetEnvelopeSolid () const
 
G4ThreeVector GetPrimaryTrackLocalPosition () const
 
G4ThreeVector GetPrimaryTrackLocalMomentum () const
 
G4ThreeVector GetPrimaryTrackLocalDirection () const
 
G4ThreeVector GetPrimaryTrackLocalPolarization () const
 
const G4AffineTransformGetAffineTransformation () const
 
const G4AffineTransformGetInverseAffineTransformation () const
 

Detailed Description

Definition at line 73 of file G4FastTrack.hh.

Constructor & Destructor Documentation

◆ G4FastTrack()

G4FastTrack::G4FastTrack ( G4Envelope * anEnvelope,
G4bool IsUnique )

Definition at line 51 of file G4FastTrack.cc.

52 : fEnvelope(anEnvelope), fIsUnique(IsUnique)
53{}

◆ ~G4FastTrack()

G4FastTrack::~G4FastTrack ( )
default

Member Function Documentation

◆ GetAffineTransformation()

const G4AffineTransform * G4FastTrack::GetAffineTransformation ( ) const
inline

Definition at line 218 of file G4FastTrack.hh.

219{
220 return &fAffineTransformation;
221}

◆ GetEnvelope()

G4Envelope * G4FastTrack::GetEnvelope ( ) const
inline

◆ GetEnvelopeLogicalVolume()

G4LogicalVolume * G4FastTrack::GetEnvelopeLogicalVolume ( ) const
inline

Definition at line 178 of file G4FastTrack.hh.

179{
180 return fEnvelopeLogicalVolume;
181}

Referenced by G4ChannelingFastSimModel::DoIt(), and G4ChannelingFastSimModel::ModelTrigger().

◆ GetEnvelopePhysicalVolume()

G4VPhysicalVolume * G4FastTrack::GetEnvelopePhysicalVolume ( ) const
inline

Definition at line 183 of file G4FastTrack.hh.

184{
185 return fEnvelopePhysicalVolume;
186}

◆ GetEnvelopeSolid()

G4VSolid * G4FastTrack::GetEnvelopeSolid ( ) const
inline

Definition at line 188 of file G4FastTrack.hh.

189{
190 return fEnvelopeSolid;
191}

Referenced by OnTheBoundaryButExiting().

◆ GetInverseAffineTransformation()

◆ GetPrimaryTrack()

◆ GetPrimaryTrackLocalDirection()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalDirection ( ) const
inline

Definition at line 208 of file G4FastTrack.hh.

209{
210 return fLocalTrackDirection;
211}

Referenced by G4ChannelingFastSimModel::DoIt(), G4ChannelingFastSimModel::ModelTrigger(), and OnTheBoundaryButExiting().

◆ GetPrimaryTrackLocalMomentum()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalMomentum ( ) const
inline

Definition at line 203 of file G4FastTrack.hh.

204{
205 return fLocalTrackMomentum;
206}

◆ GetPrimaryTrackLocalPolarization()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPolarization ( ) const
inline

Definition at line 213 of file G4FastTrack.hh.

214{
215 return fLocalTrackPolarization;
216}

◆ GetPrimaryTrackLocalPosition()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPosition ( ) const
inline

Definition at line 198 of file G4FastTrack.hh.

199{
200 return fLocalTrackPosition;
201}

Referenced by G4ChannelingFastSimModel::DoIt(), G4ChannelingFastSimModel::ModelTrigger(), and OnTheBoundaryButExiting().

◆ OnTheBoundaryButExiting()

G4bool G4FastTrack::OnTheBoundaryButExiting ( ) const
inline

Definition at line 228 of file G4FastTrack.hh.

229{
230 // tests if particle are on the boundary and leaving.
233 == 0.;
234}
G4ThreeVector GetPrimaryTrackLocalPosition() const
G4ThreeVector GetPrimaryTrackLocalDirection() const
G4VSolid * GetEnvelopeSolid() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0

Referenced by G4FastSimulationManager::PostStepGetFastSimulationManagerTrigger().

◆ SetCurrentTrack()

void G4FastTrack::SetCurrentTrack ( const G4Track & track,
const G4Navigator * a = nullptr )

Definition at line 59 of file G4FastTrack.cc.

60{
61 // -- Register track pointer (used everywhere):
62 fTrack = &track;
63
64 //-----------------------------------------------------
65 // First time the track enters the volume or if the
66 // Logical Volume was placed n-Times in the geometry :
67 //
68 // Records the Rotation+Translation for the Envelope !
69 // When the particle is inside or on the boundary, the
70 // NavigationHistory IS UP TO DATE.
71 //------------------------------------------------------
72 if (!fAffineTransformationDefined || !fIsUnique) FRecordsAffineTransformation(theNavigator);
73
74 //-------------------------------------------
75 // Records local position/momentum/direction
76 // of the Track.
77 // They are accessible to the user through a
78 // set of Get functions and should be useful
79 // to decide to trigger or not.
80 //-------------------------------------------
81 // -- local position:
82 fLocalTrackPosition = fAffineTransformation.TransformPoint(fTrack->GetPosition());
83 // -- local momentum:
84 fLocalTrackMomentum = fAffineTransformation.TransformAxis(fTrack->GetMomentum());
85 // -- local direction:
86 fLocalTrackDirection = fLocalTrackMomentum.unit();
87 // -- local polarization:
88 fLocalTrackPolarization = fAffineTransformation.TransformAxis(fTrack->GetPolarization());
89}
Hep3Vector unit() const
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const
const G4ThreeVector & GetPosition() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetPolarization() const

Referenced by G4FastSimulationManager::AtRestGetFastSimulationManagerTrigger(), and G4FastSimulationManager::PostStepGetFastSimulationManagerTrigger().


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