Geant4 10.7.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 76 of file G4FastTrack.hh.

Constructor & Destructor Documentation

◆ G4FastTrack()

G4FastTrack::G4FastTrack ( G4Envelope anEnvelope,
G4bool  IsUnique 
)

Definition at line 50 of file G4FastTrack.cc.

51 : fTrack ( nullptr ),
52 fAffineTransformationDefined( false ),
53 fEnvelope ( anEnvelope ),
54 fIsUnique ( IsUnique ),
55 fEnvelopeLogicalVolume ( nullptr ),
56 fEnvelopePhysicalVolume ( nullptr ),
57 fEnvelopeSolid ( nullptr )
58{}

◆ ~G4FastTrack()

G4FastTrack::~G4FastTrack ( )

Definition at line 63 of file G4FastTrack.cc.

64{}

Member Function Documentation

◆ GetAffineTransformation()

const G4AffineTransform * G4FastTrack::GetAffineTransformation ( ) const
inline

Definition at line 231 of file G4FastTrack.hh.

232{
233 return &fAffineTransformation;
234}

◆ GetEnvelope()

G4Envelope * G4FastTrack::GetEnvelope ( ) const
inline

◆ GetEnvelopeLogicalVolume()

G4LogicalVolume * G4FastTrack::GetEnvelopeLogicalVolume ( ) const
inline

Definition at line 191 of file G4FastTrack.hh.

192{
193 return fEnvelopeLogicalVolume;
194}

◆ GetEnvelopePhysicalVolume()

G4VPhysicalVolume * G4FastTrack::GetEnvelopePhysicalVolume ( ) const
inline

Definition at line 196 of file G4FastTrack.hh.

197{
198 return fEnvelopePhysicalVolume;
199}

◆ GetEnvelopeSolid()

G4VSolid * G4FastTrack::GetEnvelopeSolid ( ) const
inline

Definition at line 201 of file G4FastTrack.hh.

202{
203 return fEnvelopeSolid;
204}

Referenced by OnTheBoundaryButExiting().

◆ GetInverseAffineTransformation()

◆ GetPrimaryTrack()

◆ GetPrimaryTrackLocalDirection()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalDirection ( ) const
inline

Definition at line 221 of file G4FastTrack.hh.

222{
223 return fLocalTrackDirection;
224}

Referenced by OnTheBoundaryButExiting().

◆ GetPrimaryTrackLocalMomentum()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalMomentum ( ) const
inline

Definition at line 216 of file G4FastTrack.hh.

217{
218 return fLocalTrackMomentum;
219}

◆ GetPrimaryTrackLocalPolarization()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPolarization ( ) const
inline

Definition at line 226 of file G4FastTrack.hh.

227{
228 return fLocalTrackPolarization;
229}

◆ GetPrimaryTrackLocalPosition()

G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPosition ( ) const
inline

Definition at line 211 of file G4FastTrack.hh.

212{
213 return fLocalTrackPosition;
214}

Referenced by OnTheBoundaryButExiting().

◆ OnTheBoundaryButExiting()

G4bool G4FastTrack::OnTheBoundaryButExiting ( ) const
inline

Definition at line 241 of file G4FastTrack.hh.

242{
243 // tests if particle are on the boundary and leaving.
244 return GetEnvelopeSolid()->
245 DistanceToOut(GetPrimaryTrackLocalPosition(),
247}
G4ThreeVector GetPrimaryTrackLocalPosition() const
Definition: G4FastTrack.hh:211
G4ThreeVector GetPrimaryTrackLocalDirection() const
Definition: G4FastTrack.hh:221
G4VSolid * GetEnvelopeSolid() const
Definition: G4FastTrack.hh:201

Referenced by G4FastSimulationManager::PostStepGetFastSimulationManagerTrigger().

◆ SetCurrentTrack()

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

Definition at line 70 of file G4FastTrack.cc.

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