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

#include <G4FieldTrack.hh>

Public Types

enum  { ncompSVEC = 12 }
 

Public Member Functions

 G4FieldTrack (const G4ThreeVector &pPosition, G4double LaboratoryTimeOfFlight, const G4ThreeVector &pMomentumDirection, G4double kineticEnergy, G4double restMass_c2, G4double charge, const G4ThreeVector &pSpin, G4double magnetic_dipole_moment=0.0, G4double curve_length=0.0)
 
 G4FieldTrack (const G4FieldTrack &pFieldTrack)
 
 G4FieldTrack (char)
 
 ~G4FieldTrack ()
 
void UpdateState (const G4ThreeVector &pPosition, G4double LaboratoryTimeOfFlight, const G4ThreeVector &pMomentumDirection, G4double kineticEnergy)
 
void UpdateFourMomentum (G4double kineticEnergy, const G4ThreeVector &momentumDirection)
 
void SetChargeAndMoments (G4double charge, G4double magnetic_dipole_moment=DBL_MAX, G4double electric_dipole_moment=DBL_MAX, G4double magnetic_charge=DBL_MAX)
 
 G4FieldTrack (const G4ThreeVector &pPosition, const G4ThreeVector &pMomentumDirection, G4double curve_length, G4double kineticEnergy, const G4double restMass_c2, G4double velocity, G4double LaboratoryTimeOfFlight=0.0, G4double ProperTimeOfFlight=0.0, const G4ThreeVector *pSpin=0)
 
G4FieldTrackoperator= (const G4FieldTrack &rStVec)
 
G4ThreeVector GetMomentum () const
 
G4ThreeVector GetPosition () const
 
const G4ThreeVectorGetMomentumDir () const
 
G4ThreeVector GetMomentumDirection () const
 
G4double GetCurveLength () const
 
G4ThreeVector GetSpin () const
 
G4double GetLabTimeOfFlight () const
 
G4double GetProperTimeOfFlight () const
 
G4double GetKineticEnergy () const
 
G4double GetCharge () const
 
void SetPosition (G4ThreeVector nPos)
 
void SetMomentum (G4ThreeVector nMomDir)
 
void SetMomentumDir (G4ThreeVector nMomDir)
 
void SetRestMass (G4double Mass_c2)
 
void SetCurveLength (G4double nCurve_s)
 
void SetKineticEnergy (G4double nEnergy)
 
void SetSpin (G4ThreeVector nSpin)
 
void SetLabTimeOfFlight (G4double nTOF)
 
void SetProperTimeOfFlight (G4double nTOF)
 
void InitialiseSpin (const G4ThreeVector &Spin)
 
void DumpToArray (G4double valArr[ncompSVEC]) const
 
void LoadFromArray (const G4double valArr[ncompSVEC], G4int noVarsIntegrated)
 
const G4ChargeState * GetChargeState () const
 

Friends

std::ostream & operator<< (std::ostream &os, const G4FieldTrack &SixVec)
 

Detailed Description

Definition at line 53 of file G4FieldTrack.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ncompSVEC 

Definition at line 143 of file G4FieldTrack.hh.

143{ ncompSVEC = 12 };

Constructor & Destructor Documentation

◆ G4FieldTrack() [1/4]

G4FieldTrack::G4FieldTrack ( const G4ThreeVector pPosition,
G4double  LaboratoryTimeOfFlight,
const G4ThreeVector pMomentumDirection,
G4double  kineticEnergy,
G4double  restMass_c2,
G4double  charge,
const G4ThreeVector pSpin,
G4double  magnetic_dipole_moment = 0.0,
G4double  curve_length = 0.0 
)

Definition at line 49 of file G4FieldTrack.cc.

58: fDistanceAlongCurve(curve_length),
59 fKineticEnergy(kineticEnergy),
60 fRestMass_c2(restMass_c2),
61 fLabTimeOfFlight(LaboratoryTimeOfFlight),
62 fProperTimeOfFlight(0.),
63 // fMomentumDir(pMomentumDirection),
64 fChargeState( charge, magnetic_dipole_moment )
65{
66 UpdateFourMomentum( kineticEnergy, pMomentumDirection );
67 // Sets momentum direction as well.
68
69 SetPosition( pPosition );
70
71 InitialiseSpin( Spin );
72}
void UpdateFourMomentum(G4double kineticEnergy, const G4ThreeVector &momentumDirection)
void InitialiseSpin(const G4ThreeVector &Spin)
void SetPosition(G4ThreeVector nPos)

◆ G4FieldTrack() [2/4]

G4FieldTrack::G4FieldTrack ( const G4FieldTrack pFieldTrack)

◆ G4FieldTrack() [3/4]

G4FieldTrack::G4FieldTrack ( char  )

Definition at line 101 of file G4FieldTrack.cc.

102 : fKineticEnergy(0.), fRestMass_c2(0.), fLabTimeOfFlight(0.),
103 fProperTimeOfFlight(0.), fChargeState( DBL_MAX )
104{
105 G4ThreeVector Zero(0.0, 0.0, 0.0);
106 SetCurvePnt( Zero, Zero, 0.0 );
107 InitialiseSpin( Zero );
108 // fInitialMomentumMag= 0.00; // Invalid
109 // fLastMomentumMag= 0.0;
110}
#define DBL_MAX
Definition: templates.hh:83

◆ ~G4FieldTrack()

G4FieldTrack::~G4FieldTrack ( )

◆ G4FieldTrack() [4/4]

G4FieldTrack::G4FieldTrack ( const G4ThreeVector pPosition,
const G4ThreeVector pMomentumDirection,
G4double  curve_length,
G4double  kineticEnergy,
const G4double  restMass_c2,
G4double  velocity,
G4double  LaboratoryTimeOfFlight = 0.0,
G4double  ProperTimeOfFlight = 0.0,
const G4ThreeVector pSpin = 0 
)

Definition at line 74 of file G4FieldTrack.cc.

83 : fDistanceAlongCurve(curve_length),
84 fKineticEnergy(kineticEnergy),
85 fRestMass_c2(restMass_c2),
86 fLabTimeOfFlight(pLaboratoryTimeOfFlight),
87 fProperTimeOfFlight(pProperTimeOfFlight),
88 // fMomentumDir(pMomentumDirection),
89 fChargeState( DBL_MAX ) // charge not set
90{
91 UpdateFourMomentum( kineticEnergy, pMomentumDirection );
92 // Sets momentum direction as well.
93
94 SetPosition( pPosition );
95
96 G4ThreeVector Spin(0.0, 0.0, 0.0);
97 if( pSpin ) Spin= *pSpin;
98 InitialiseSpin( Spin );
99}

Member Function Documentation

◆ DumpToArray()

void G4FieldTrack::DumpToArray ( G4double  valArr[ncompSVEC]) const
inline

◆ GetCharge()

G4double G4FieldTrack::GetCharge ( ) const
inline

◆ GetChargeState()

const G4ChargeState * G4FieldTrack::GetChargeState ( ) const
inline

Definition at line 209 of file G4FieldTrack.hh.

209{ return &fChargeState; }

◆ GetCurveLength()

◆ GetKineticEnergy()

◆ GetLabTimeOfFlight()

◆ GetMomentum()

G4ThreeVector G4FieldTrack::GetMomentum ( ) const
inline

◆ GetMomentumDir()

◆ GetMomentumDirection()

◆ GetPosition()

◆ GetProperTimeOfFlight()

G4double G4FieldTrack::GetProperTimeOfFlight ( ) const
inline

◆ GetSpin()

◆ InitialiseSpin()

void G4FieldTrack::InitialiseSpin ( const G4ThreeVector Spin)
inline

Referenced by G4FieldTrack().

◆ LoadFromArray()

void G4FieldTrack::LoadFromArray ( const G4double  valArr[ncompSVEC],
G4int  noVarsIntegrated 
)
inline

◆ operator=()

G4FieldTrack & G4FieldTrack::operator= ( const G4FieldTrack rStVec)
inline

◆ SetChargeAndMoments()

void G4FieldTrack::SetChargeAndMoments ( G4double  charge,
G4double  magnetic_dipole_moment = DBL_MAX,
G4double  electric_dipole_moment = DBL_MAX,
G4double  magnetic_charge = DBL_MAX 
)

Definition at line 112 of file G4FieldTrack.cc.

117{
118 fChargeState.SetChargeAndMoments( charge, magnetic_dipole_moment,
119 electric_dipole_moment, magnetic_charge );
120
121 // fpChargeState->SetChargeAndMoments( charge, magnetic_dipole_moment,
122 // electric_dipole_moment, magnetic_charge );
123
124 // TO-DO: Improve the implementation using handles
125 // -- and handle to the old one (which can be shared by other copies) and
126 // must not be left to hang loose
127 //
128 // fpChargeState= new G4ChargeState( charge, magnetic_dipole_moment,
129 // electric_dipole_moment, magnetic_charge );
130}

Referenced by G4CoupledTransportation::AlongStepGetPhysicalInteractionLength(), and G4FieldTrackUpdator::Update().

◆ SetCurveLength()

void G4FieldTrack::SetCurveLength ( G4double  nCurve_s)
inline

◆ SetKineticEnergy()

void G4FieldTrack::SetKineticEnergy ( G4double  nEnergy)
inline

◆ SetLabTimeOfFlight()

void G4FieldTrack::SetLabTimeOfFlight ( G4double  nTOF)
inline

◆ SetMomentum()

void G4FieldTrack::SetMomentum ( G4ThreeVector  nMomDir)
inline

◆ SetMomentumDir()

void G4FieldTrack::SetMomentumDir ( G4ThreeVector  nMomDir)
inline

◆ SetPosition()

◆ SetProperTimeOfFlight()

void G4FieldTrack::SetProperTimeOfFlight ( G4double  nTOF)
inline

◆ SetRestMass()

void G4FieldTrack::SetRestMass ( G4double  Mass_c2)
inline

Definition at line 127 of file G4FieldTrack.hh.

127{ fRestMass_c2= Mass_c2; }

Referenced by G4FieldTrackUpdator::Update().

◆ SetSpin()

void G4FieldTrack::SetSpin ( G4ThreeVector  nSpin)
inline

◆ UpdateFourMomentum()

void G4FieldTrack::UpdateFourMomentum ( G4double  kineticEnergy,
const G4ThreeVector momentumDirection 
)
inline

Referenced by G4FieldTrack().

◆ UpdateState()

void G4FieldTrack::UpdateState ( const G4ThreeVector pPosition,
G4double  LaboratoryTimeOfFlight,
const G4ThreeVector pMomentumDirection,
G4double  kineticEnergy 
)
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4FieldTrack SixVec 
)
friend

Definition at line 33 of file G4FieldTrack.cc.

34{
35 const G4double *SixV = SixVec.SixVector;
36 os << " ( ";
37 os << " X= " << SixV[0] << " " << SixV[1] << " "
38 << SixV[2] << " "; // Position
39 os << " V= " << SixV[3] << " " << SixV[4] << " "
40 << SixV[5] << " "; // Momentum
41 os << " v2= "
42 << G4ThreeVector(SixV[3], SixV[4], SixV[5]).mag(); // mom magnitude
43 os << " mdm= " << SixVec.fMomentumDir.mag();
44 os << " l= " << SixVec.GetCurveLength();
45 os << " ) ";
46 return os;
47}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64
double mag() const
G4double GetCurveLength() const

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