35 const G4double* SixV = SixVec.SixVector;
36 const G4int precPos= 9;
37 const G4int precEp= 9;
38 const G4int precLen= 12;
39 const G4int precSpin= 9;
40 const G4int precTime= 6;
41 const G4int oldpr= os.precision(precPos);
43 os <<
" X= " << SixV[0] <<
" " << SixV[1] <<
" "
46 os <<
" P= " << SixV[3] <<
" " << SixV[4] <<
" "
50 os <<
" Ekin= " << SixVec.fKineticEnergy ;
51 os.precision(precLen);
54 os <<
" m0= " << SixVec.fRestMass_c2;
55 os <<
" (Pdir-1)= " << SixVec.fMomentumDir.
mag()-1.0;
56 if( SixVec.fLabTimeOfFlight > 0.0 )
58 os.precision(precTime);
64 os <<
" t_lab= " << SixVec.fLabTimeOfFlight;
65 os <<
" t_proper= " << SixVec.fProperTimeOfFlight ;
67 if( pol.
mag2() > 0.0 )
69 os.precision(precSpin);
70 os <<
" PolV= " << pol;
74 os <<
" PolV= (0,0,0) ";
91: fDistanceAlongCurve(curve_length),
92 fKineticEnergy(kineticEnergy),
93 fRestMass_c2(restMass_c2),
94 fLabTimeOfFlight(LaboratoryTimeOfFlight),
95 fProperTimeOfFlight(0.),
97 fChargeState( charge, magnetic_dipole_moment, pdgSpin )
118 : fDistanceAlongCurve(curve_length),
119 fKineticEnergy(kineticEnergy),
120 fRestMass_c2(restMass_c2),
121 fLabTimeOfFlight(pLaboratoryTimeOfFlight),
122 fProperTimeOfFlight(pProperTimeOfFlight),
132 if( pPolarization ) { PolarVec= *pPolarization; }
137 : fKineticEnergy(0.), fRestMass_c2(0.), fLabTimeOfFlight(0.),
141 SetCurvePnt( Zero, Zero, 0.0 );
154 magnetic_dipole_moment,
155 electric_dipole_moment,
176 G4int noVarsIntegrated)
181 for(
G4int i=0; i<noVarsIntegrated; ++i)
183 valArr[i] = valArrIn[i];
190 SixVector[0] = valArr[0];
191 SixVector[1] = valArr[1];
192 SixVector[2] = valArr[2];
193 SixVector[3] = valArr[3];
194 SixVector[4] = valArr[4];
195 SixVector[5] = valArr[5];
199 G4double momentum_square= Momentum.mag2();
200 fMomentumDir= Momentum.unit();
202 fKineticEnergy = momentum_square
203 / (std::sqrt(momentum_square+fRestMass_c2*fRestMass_c2)
211 fLabTimeOfFlight = valArr[7];
212 fProperTimeOfFlight = valArr[8];
std::ostream & operator<<(std::ostream &os, const G4FieldTrack &SixVec)
CLHEP::Hep3Vector G4ThreeVector
void SetChargesAndMoments(G4double charge, G4double magnetic_dipole_moment, G4double electric_dipole_moment, G4double magnetic_charge)
void SetPDGSpin(G4double spin)
G4FieldTrack(const G4ThreeVector &pPosition, G4double LaboratoryTimeOfFlight, const G4ThreeVector &pMomentumDirection, G4double kineticEnergy, G4double restMass_c2, G4double charge, const G4ThreeVector &polarization, G4double magnetic_dipole_moment=0.0, G4double curve_length=0.0, G4double PDGspin=-1.0)
void UpdateFourMomentum(G4double kineticEnergy, const G4ThreeVector &momentumDirection)
G4double GetCurveLength() const
G4ThreeVector GetPolarization() const
void SetPolarization(const G4ThreeVector &vecPol)
void SetChargeAndMoments(G4double charge, G4double magnetic_dipole_moment=DBL_MAX, G4double electric_dipole_moment=DBL_MAX, G4double magnetic_charge=DBL_MAX)
void SetPosition(G4ThreeVector nPos)
void LoadFromArray(const G4double valArr[ncompSVEC], G4int noVarsIntegrated)