82 delete(*theListOfSecondaries)[index];
139 if(IsGoodForTracking)
158 if(IsGoodForTracking)
176 if(IsGoodForTracking)
265 G4double inv_Momentum = 1.0 / tMomentum;
266 direction = pMomentum * inv_Momentum;
429 G4cout <<
" Charge (eplus) : " << std::setw(20)
431 G4cout <<
" MagneticMoment : " << std::setw(20)
433 G4cout <<
" : = " << std::setw(20)
436 <<
"*[e hbar]/[2 m]" <<
G4endl;
437 G4cout <<
" Position - x (mm) : " << std::setw(20)
439 G4cout <<
" Position - y (mm) : " << std::setw(20)
441 G4cout <<
" Position - z (mm) : " << std::setw(20)
443 G4cout <<
" Time (ns) : " << std::setw(20)
445 G4cout <<
" Proper Time (ns) : " << std::setw(20)
447 G4cout <<
" Momentum Direct - x : " << std::setw(20)
449 G4cout <<
" Momentum Direct - y : " << std::setw(20)
451 G4cout <<
" Momentum Direct - z : " << std::setw(20)
453 G4cout <<
" Kinetic Energy (MeV): " << std::setw(20)
455 G4cout <<
" Velocity (/c): " << std::setw(20)
457 G4cout <<
" Polarization - x : " << std::setw(20)
459 G4cout <<
" Polarization - y : " << std::setw(20)
461 G4cout <<
" Polarization - z : " << std::setw(20)
469 G4bool exitWithError =
false;
473 const G4int maxError = 30;
481 G4bool itsOKforMomentum =
true;
487 itsOKforMomentum =
false;
491 if(nError < maxError)
493 G4cout <<
" G4ParticleChange::CheckIt : ";
494 G4cout <<
"the Momentum Change is not unit vector !!"
495 <<
" Difference: " << accuracy <<
G4endl;
507 G4bool itsOKforGlobalTime =
true;
511 itsOKforGlobalTime =
false;
515 if(nError < maxError)
517 G4cout <<
" G4ParticleChange::CheckIt : ";
518 G4cout <<
"the local time goes back !!"
519 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
532 G4bool itsOKforProperTime =
true;
536 itsOKforProperTime =
false;
540 if(nError < maxError)
542 G4cout <<
" G4ParticleChange::CheckIt : ";
543 G4cout <<
"the proper time goes back !!"
544 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
558 G4bool itsOKforEnergy =
true;
562 itsOKforEnergy =
false;
566 if(nError < maxError)
568 G4cout <<
" G4ParticleChange::CheckIt : ";
569 G4cout <<
"the kinetic energy is negative !!"
570 <<
" Difference: " << accuracy <<
"[MeV] " <<
G4endl;
581 G4bool itsOKforVelocity =
true;
584 itsOKforVelocity =
false;
586 exitWithError =
true;
588 if(nError < maxError)
590 G4cout <<
" G4ParticleChange::CheckIt : ";
591 G4cout <<
"the velocity is negative !!"
605 itsOKforVelocity =
false;
609 if(nError < maxError)
611 G4cout <<
" G4ParticleChange::CheckIt : ";
612 G4cout <<
"the velocity is greater than c_light !!" <<
G4endl;
623 G4bool itsOK = itsOKforMomentum && itsOKforEnergy && itsOKforVelocity &&
624 itsOKforProperTime && itsOKforGlobalTime;
637 "momentum, energy, and/or time was illegal");
640 if(!itsOKforMomentum)
645 if(!itsOKforGlobalTime)
649 if(!itsOKforProperTime)
657 if(!itsOKforVelocity)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4FastVector< G4Track, G4TrackFastVectorSize > G4TrackFastVector
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4double GetCharge() const
G4double GetKineticEnergy() const
G4double GetProperTime() const
G4double GetMagneticMoment() const
const G4ThreeVector & GetPolarization() const
void SetElement(G4int anIndex, Type *anElement)
G4double theVelocityChange
virtual G4Step * UpdateStepForAtRest(G4Step *Step)
void AddSecondary(G4Track *aSecondary)
G4bool operator==(const G4ParticleChange &right) const
G4ThreeVector CalcMomentum(G4double energy, G4ThreeVector direction, G4double mass) const
virtual void DumpInfo() const
virtual ~G4ParticleChange()
G4ThreeVector thePositionChange
G4ThreeVector theMomentumDirectionChange
G4Step * UpdateStepInfo(G4Step *Step)
G4double theProperTimeChange
virtual G4Step * UpdateStepForPostStep(G4Step *Step)
virtual G4bool CheckIt(const G4Track &)
G4ThreeVector thePolarizationChange
virtual G4Step * UpdateStepForAlongStep(G4Step *Step)
G4double theMagneticMomentChange
G4bool operator!=(const G4ParticleChange &right) const
virtual void Initialize(const G4Track &)
const G4Track * theCurrentTrack
G4ParticleChange & operator=(const G4ParticleChange &right)
G4double GetGlobalTime(G4double timeDelay=0.0) const
const G4String & GetParticleName() const
void AddPolarization(const G4ThreeVector &aValue)
void SetLocalTime(const G4double aValue)
void SetMagneticMoment(G4double value)
void SetKineticEnergy(const G4double aValue)
void SetWeight(G4double aValue)
void SetMass(G4double value)
void SetCharge(G4double value)
G4double GetProperTime() const
void AddProperTime(const G4double aValue)
void SetVelocity(G4double v)
void AddPosition(const G4ThreeVector &aValue)
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetPosition() const
void SetProperTime(const G4double aValue)
void AddGlobalTime(const G4double aValue)
void SetPosition(const G4ThreeVector &aValue)
const G4ThreeVector & GetPolarization() const
G4double GetKineticEnergy() const
void AddLocalTime(const G4double aValue)
void SetMomentumDirection(const G4ThreeVector &aValue)
void SetPolarization(const G4ThreeVector &aValue)
G4Track * GetTrack() const
G4StepPoint * GetPreStepPoint() const
G4StepPoint * GetPostStepPoint() const
G4double GetVelocity() const
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
G4double GetProperTime() const
G4double GetLocalTime() const
G4ParticleDefinition * GetDefinition() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
G4double GetKineticEnergy() const
G4double CalculateVelocity() const
void SetKineticEnergy(const G4double aValue)
void SetGoodForTrackingFlag(G4bool value=true)
G4int theNumberOfSecondaries
virtual G4bool CheckIt(const G4Track &)
static const G4double accuracyForException
G4double theTrueStepLength
G4double theLocalEnergyDeposit
G4TrackStatus theStatusChange
G4TrackFastVector * theListOfSecondaries
G4SteppingControl theSteppingControlFlag
static const G4double accuracyForWarning
virtual void Initialize(const G4Track &)
void AddSecondary(G4Track *aSecondary)
virtual void DumpInfo() const
G4bool isParentWeightProposed
G4TrackStatus GetTrackStatus() const