56 theMomentumDirectionChange(),
57 thePolarizationChange(),
59 theVelocityChange(0.), isVelocityChanged(false),
61 theGlobalTime0(0.), theLocalTime0(0.),
62 theTimeChange(0.), theProperTimeChange(0.),
63 theMassChange(0.), theChargeChange(0.),
64 theMagneticMomentChange(0.), theCurrentTrack(0)
72 G4cout <<
"G4ParticleChange::~G4ParticleChange() " <<
G4endl;
82 G4cout <<
"G4ParticleChange:: copy constructor is called " <<
G4endl;
106 G4cout <<
"G4ParticleChange:: assignment operator is called " <<
G4endl;
113 G4cout <<
"G4ParticleChange: assignment operator Warning ";
114 G4cout <<
"theListOfSecondaries is not empty ";
169 G4bool IsGoodForTracking )
186 G4bool IsGoodForTracking )
203 G4bool IsGoodForTracking )
298 if( tMomentum > 0. ){
299 G4double inv_Momentum= 1.0 / tMomentum;
300 direction= pMomentum * inv_Momentum;
432 G4cout <<
" Mass (GeV) : "
435 G4cout <<
" Charge (eplus) : "
438 G4cout <<
" MagneticMoment : "
440 G4cout <<
" : = " << std::setw(20)
444 G4cout <<
" Position - x (mm) : "
447 G4cout <<
" Position - y (mm) : "
450 G4cout <<
" Position - z (mm) : "
456 G4cout <<
" Proper Time (ns) : "
459 G4cout <<
" Momentum Direct - x : "
462 G4cout <<
" Momentum Direct - y : "
465 G4cout <<
" Momentum Direct - z : "
468 G4cout <<
" Kinetic Energy (MeV): "
471 G4cout <<
" Velocity (/c): "
474 G4cout <<
" Polarization - x : "
477 G4cout <<
" Polarization - y : "
480 G4cout <<
" Polarization - z : "
488 G4bool exitWithError =
false;
490 static G4int nError = 0;
492 const G4int maxError = 30;
499 G4bool itsOKforMomentum =
true;
503 itsOKforMomentum =
false;
507 if (nError < maxError) {
508 G4cout <<
" G4ParticleChange::CheckIt : ";
509 G4cout <<
"the Momentum Change is not unit vector !!"
510 <<
" Difference: " << accuracy <<
G4endl;
523 G4bool itsOKforGlobalTime =
true;
526 itsOKforGlobalTime =
false;
530 if (nError < maxError) {
531 G4cout <<
" G4ParticleChange::CheckIt : ";
532 G4cout <<
"the local time goes back !!"
533 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
547 G4bool itsOKforProperTime =
true;
550 itsOKforProperTime =
false;
554 if (nError < maxError) {
555 G4cout <<
" G4ParticleChange::CheckIt : ";
556 G4cout <<
"the proper time goes back !!"
557 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
572 G4bool itsOKforEnergy =
true;
575 itsOKforEnergy =
false;
579 if (nError < maxError) {
580 G4cout <<
" G4ParticleChange::CheckIt : ";
581 G4cout <<
"the kinetic energy is negative !!"
582 <<
" Difference: " << accuracy <<
"[MeV] " <<
G4endl;
594 G4bool itsOKforVelocity =
true;
596 itsOKforVelocity =
false;
598 exitWithError =
true;
600 if (nError < maxError) {
601 G4cout <<
" G4ParticleChange::CheckIt : ";
602 G4cout <<
"the velocity is negative !!"
616 itsOKforVelocity =
false;
620 if (nError < maxError) {
621 G4cout <<
" G4ParticleChange::CheckIt : ";
622 G4cout <<
"the velocity is greater than c_light !!" <<
G4endl;
634 G4bool itsOK = itsOKforMomentum && itsOKforEnergy && itsOKforVelocity && itsOKforProperTime && itsOKforGlobalTime;
646 "momentum, energy, and/or time was illegal");
649 if (!itsOKforMomentum) {
653 if (!itsOKforGlobalTime) {
656 if (!itsOKforProperTime) {
659 if (!itsOKforEnergy) {
662 if (!itsOKforVelocity) {
G4FastVector< G4Track, G4TrackFastVectorSize > G4TrackFastVector
G4DLLIMPORT 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 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
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)