35 const G4double *SixV = SixVec.SixVector;
38 const int precLen= 12;
39 const int precSpin= 9;
40 const int precTime= 6;
41 const int 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 ) os.precision(precTime);
58 os <<
" t_lab= " << SixVec.fLabTimeOfFlight;
59 os <<
" t_proper= " << SixVec.fProperTimeOfFlight ;
61 if( pol.
mag2() > 0.0 ){
62 os.precision(precSpin);
63 os <<
" PolV= " << pol;
65 os <<
" PolV= (0,0,0) ";
82 : fDistanceAlongCurve(curve_length),
83 fKineticEnergy(kineticEnergy),
84 fRestMass_c2(restMass_c2),
85 fLabTimeOfFlight(LaboratoryTimeOfFlight),
86 fProperTimeOfFlight(0.),
88 fChargeState( charge, magnetic_dipole_moment, pdgSpin )
110 : fDistanceAlongCurve(curve_length),
111 fKineticEnergy(kineticEnergy),
112 fRestMass_c2(restMass_c2),
113 fLabTimeOfFlight(pLaboratoryTimeOfFlight),
114 fProperTimeOfFlight(pProperTimeOfFlight),
124 if( pPolarization ) { PolarVec= *pPolarization; }
129 : fKineticEnergy(0.), fRestMass_c2(0.), fLabTimeOfFlight(0.),
133 SetCurvePnt( Zero, Zero, 0.0 );
146 magnetic_dipole_moment,
147 electric_dipole_moment,
167 G4int noVarsIntegrated)
173 for( i=0; i<noVarsIntegrated; i++){
174 valArr[i]= valArrIn[i];
176 for( i=noVarsIntegrated; i<
ncompSVEC; i++) {
180 SixVector[0]=valArr[0];
181 SixVector[1]=valArr[1];
182 SixVector[2]=valArr[2];
183 SixVector[3]=valArr[3];
184 SixVector[4]=valArr[4];
185 SixVector[5]=valArr[5];
190 fMomentumDir= Momentum.
unit();
192 fKineticEnergy = momentum_square /
193 (std::sqrt(momentum_square+fRestMass_c2*fRestMass_c2)
201 fLabTimeOfFlight=valArr[7];
202 fProperTimeOfFlight=valArr[8];
void SetPosition(G4ThreeVector nPos)
G4double GetCurveLength() const
CLHEP::Hep3Vector G4ThreeVector
void SetPolarization(const G4ThreeVector &vecPol)
void UpdateFourMomentum(G4double kineticEnergy, const G4ThreeVector &momentumDirection)
void SetChargesAndMoments(G4double charge, G4double magnetic_dipole_moment, G4double electric_dipole_moment, G4double magnetic_charge)
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)
G4ThreeVector GetPolarization() const
void LoadFromArray(const G4double valArr[ncompSVEC], G4int noVarsIntegrated)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
void SetChargeAndMoments(G4double charge, G4double magnetic_dipole_moment=DBL_MAX, G4double electric_dipole_moment=DBL_MAX, G4double magnetic_charge=DBL_MAX)
void SetPDGSpin(G4double spin)