Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 ( 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 ( )

Definition at line 61 of file G4FastTrack.cc.

62 {}

Member Function Documentation

const G4AffineTransform * G4FastTrack::GetAffineTransformation ( ) const
inline

Definition at line 233 of file G4FastTrack.hh.

234 {
235  return &fAffineTransformation;
236 }
G4Envelope * G4FastTrack::GetEnvelope ( ) const
inline
G4LogicalVolume * G4FastTrack::GetEnvelopeLogicalVolume ( ) const
inline

Definition at line 193 of file G4FastTrack.hh.

194 {
195  return fEnvelopeLogicalVolume;
196 }
G4VPhysicalVolume * G4FastTrack::GetEnvelopePhysicalVolume ( ) const
inline

Definition at line 198 of file G4FastTrack.hh.

199 {
200  return fEnvelopePhysicalVolume;
201 }
G4VSolid * G4FastTrack::GetEnvelopeSolid ( ) const
inline

Definition at line 203 of file G4FastTrack.hh.

Referenced by Par01PiModel::DoIt(), and OnTheBoundaryButExiting().

204 {
205  return fEnvelopeSolid;
206 }
const G4AffineTransform * G4FastTrack::GetInverseAffineTransformation ( ) const
inline
const G4Track * G4FastTrack::GetPrimaryTrack ( ) const
inline
G4ThreeVector G4FastTrack::GetPrimaryTrackLocalDirection ( ) const
inline

Definition at line 223 of file G4FastTrack.hh.

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

224 {
225  return fLocalTrackDirection;
226 }
G4ThreeVector G4FastTrack::GetPrimaryTrackLocalMomentum ( ) const
inline

Definition at line 218 of file G4FastTrack.hh.

219 {
220  return fLocalTrackMomentum;
221 }
G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPolarization ( ) const
inline

Definition at line 228 of file G4FastTrack.hh.

229 {
230  return fLocalTrackPolarization;
231 }
G4ThreeVector G4FastTrack::GetPrimaryTrackLocalPosition ( ) const
inline

Definition at line 213 of file G4FastTrack.hh.

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

214 {
215  return fLocalTrackPosition;
216 }
G4bool G4FastTrack::OnTheBoundaryButExiting ( ) const
inline

Definition at line 243 of file G4FastTrack.hh.

References GetEnvelopeSolid(), GetPrimaryTrackLocalDirection(), and GetPrimaryTrackLocalPosition().

Referenced by G4FastSimulationManager::PostStepGetFastSimulationManagerTrigger().

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
void G4FastTrack::SetCurrentTrack ( const G4Track track,
const G4Navigator a = 0 
)

Definition at line 68 of file G4FastTrack.cc.

References G4Track::GetMomentum(), G4Track::GetPolarization(), G4Track::GetPosition(), G4AffineTransform::TransformAxis(), G4AffineTransform::TransformPoint(), and CLHEP::Hep3Vector::unit().

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

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 }
const G4ThreeVector & GetPolarization() const
const G4ThreeVector & GetPosition() const
G4ThreeVector GetMomentum() const
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
Hep3Vector unit() const
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const

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