Geant4 9.6.0
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 ()
 
void SetCurrentTrack (const G4Track &, const G4Navigator *a=0)
 
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 78 of file G4FastTrack.hh.

Constructor & Destructor Documentation

◆ G4FastTrack()

G4FastTrack::G4FastTrack ( G4Envelope anEnvelope,
G4bool  IsUnique 
)

Definition at line 51 of file G4FastTrack.cc.

52 :
53 fAffineTransformationDefined(false), fEnvelope(anEnvelope),
54 fIsUnique(IsUnique), fEnvelopeLogicalVolume(0), fEnvelopePhysicalVolume(0),
55 fEnvelopeSolid(0)
56{}

◆ ~G4FastTrack()

G4FastTrack::~G4FastTrack ( )

Definition at line 61 of file G4FastTrack.cc.

62{}

Member Function Documentation

◆ GetAffineTransformation()

const G4AffineTransform * G4FastTrack::GetAffineTransformation ( ) const
inline

Definition at line 233 of file G4FastTrack.hh.

234{
235 return &fAffineTransformation;
236}

◆ GetEnvelope()

G4Envelope * G4FastTrack::GetEnvelope ( ) const
inline

◆ GetEnvelopeLogicalVolume()

G4LogicalVolume * G4FastTrack::GetEnvelopeLogicalVolume ( ) const
inline

Definition at line 193 of file G4FastTrack.hh.

194{
195 return fEnvelopeLogicalVolume;
196}

◆ GetEnvelopePhysicalVolume()

G4VPhysicalVolume * G4FastTrack::GetEnvelopePhysicalVolume ( ) const
inline

Definition at line 198 of file G4FastTrack.hh.

199{
200 return fEnvelopePhysicalVolume;
201}

◆ GetEnvelopeSolid()

G4VSolid * G4FastTrack::GetEnvelopeSolid ( ) const
inline

Definition at line 203 of file G4FastTrack.hh.

204{
205 return fEnvelopeSolid;
206}

Referenced by OnTheBoundaryButExiting().

◆ GetInverseAffineTransformation()

◆ GetPrimaryTrack()

const G4Track * G4FastTrack::GetPrimaryTrack ( ) const
inline

◆ GetPrimaryTrackLocalDirection()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalDirection ( ) const
inline

Definition at line 223 of file G4FastTrack.hh.

224{
225 return fLocalTrackDirection;
226}

Referenced by OnTheBoundaryButExiting().

◆ GetPrimaryTrackLocalMomentum()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalMomentum ( ) const
inline

Definition at line 218 of file G4FastTrack.hh.

219{
220 return fLocalTrackMomentum;
221}

◆ GetPrimaryTrackLocalPolarization()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPolarization ( ) const
inline

Definition at line 228 of file G4FastTrack.hh.

229{
230 return fLocalTrackPolarization;
231}

◆ GetPrimaryTrackLocalPosition()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPosition ( ) const
inline

Definition at line 213 of file G4FastTrack.hh.

214{
215 return fLocalTrackPosition;
216}

Referenced by OnTheBoundaryButExiting().

◆ OnTheBoundaryButExiting()

G4bool G4FastTrack::OnTheBoundaryButExiting ( ) const
inline

Definition at line 243 of file G4FastTrack.hh.

244{
245 // tests if particle are on the boundary and leaving.
246 return GetEnvelopeSolid()->
247 DistanceToOut(GetPrimaryTrackLocalPosition(),
249}
G4ThreeVector GetPrimaryTrackLocalPosition() const
Definition: G4FastTrack.hh:213
G4ThreeVector GetPrimaryTrackLocalDirection() const
Definition: G4FastTrack.hh:223
G4VSolid * GetEnvelopeSolid() const
Definition: G4FastTrack.hh:203

Referenced by G4FastSimulationManager::PostStepGetFastSimulationManagerTrigger().

◆ SetCurrentTrack()

void G4FastTrack::SetCurrentTrack ( const G4Track track,
const G4Navigator a = 0 
)

Definition at line 68 of file G4FastTrack.cc.

70{
71
72 // -- Register track pointer (used everywhere):
73 fTrack = &track;
74
75 //-----------------------------------------------------
76 // First time the track enters the volume or if the
77 // Logical Volume was placed n-Times in the geometry :
78 //
79 // Records the Rotation+Translation for the Envelope !
80 // When the particle is inside or on the boundary, the
81 // NavigationHistory IS UP TO DATE.
82 //------------------------------------------------------
83 if (!fAffineTransformationDefined || !fIsUnique) FRecordsAffineTransformation(theNavigator);
84
85 //-------------------------------------------
86 // Records local position/momentum/direction
87 // of the Track.
88 // They are accessible to the user through a
89 // set of Get functions and should be useful
90 // to decide to trigger or not.
91 //-------------------------------------------
92 // -- local position:
93 fLocalTrackPosition = fAffineTransformation.TransformPoint(fTrack->GetPosition());
94 // -- local momentum:
95 fLocalTrackMomentum = fAffineTransformation.TransformAxis(fTrack->GetMomentum());
96 // -- local direction:
97 fLocalTrackDirection = fLocalTrackMomentum.unit();
98 // -- local polarization:
99 fLocalTrackPolarization = fAffineTransformation.TransformAxis(fTrack->GetPolarization());
100}
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: