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 )
300 if( tMomentum > 0. ){
301 G4double inv_Momentum= 1.0 / tMomentum;
302 direction= pMomentum * inv_Momentum;
452 G4cout <<
" Mass (GeV) : "
455 G4cout <<
" Charge (eplus) : "
458 G4cout <<
" MagneticMoment : "
460 G4cout <<
" : = " << std::setw(20)
464 G4cout <<
" Position - x (mm) : "
467 G4cout <<
" Position - y (mm) : "
470 G4cout <<
" Position - z (mm) : "
476 G4cout <<
" Proper Time (ns) : "
479 G4cout <<
" Momentum Direct - x : "
482 G4cout <<
" Momentum Direct - y : "
485 G4cout <<
" Momentum Direct - z : "
488 G4cout <<
" Kinetic Energy (MeV): "
491 G4cout <<
" Velocity (/c): "
494 G4cout <<
" Polarization - x : "
497 G4cout <<
" Polarization - y : "
500 G4cout <<
" Polarization - z : "
508 G4bool exitWithError =
false;
512 const G4int maxError = 30;
519 G4bool itsOKforMomentum =
true;
523 itsOKforMomentum =
false;
527 if (nError < maxError) {
528 G4cout <<
" G4ParticleChange::CheckIt : ";
529 G4cout <<
"the Momentum Change is not unit vector !!"
530 <<
" Difference: " << accuracy <<
G4endl;
543 G4bool itsOKforGlobalTime =
true;
546 itsOKforGlobalTime =
false;
550 if (nError < maxError) {
551 G4cout <<
" G4ParticleChange::CheckIt : ";
552 G4cout <<
"the local time goes back !!"
553 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
567 G4bool itsOKforProperTime =
true;
570 itsOKforProperTime =
false;
574 if (nError < maxError) {
575 G4cout <<
" G4ParticleChange::CheckIt : ";
576 G4cout <<
"the proper time goes back !!"
577 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
592 G4bool itsOKforEnergy =
true;
595 itsOKforEnergy =
false;
599 if (nError < maxError) {
600 G4cout <<
" G4ParticleChange::CheckIt : ";
601 G4cout <<
"the kinetic energy is negative !!"
602 <<
" Difference: " << accuracy <<
"[MeV] " <<
G4endl;
614 G4bool itsOKforVelocity =
true;
616 itsOKforVelocity =
false;
618 exitWithError =
true;
620 if (nError < maxError) {
621 G4cout <<
" G4ParticleChange::CheckIt : ";
622 G4cout <<
"the velocity is negative !!"
636 itsOKforVelocity =
false;
640 if (nError < maxError) {
641 G4cout <<
" G4ParticleChange::CheckIt : ";
642 G4cout <<
"the velocity is greater than c_light !!" <<
G4endl;
654 G4bool itsOK = itsOKforMomentum && itsOKforEnergy && itsOKforVelocity && itsOKforProperTime && itsOKforGlobalTime;
666 "momentum, energy, and/or time was illegal");
669 if (!itsOKforMomentum) {
673 if (!itsOKforGlobalTime) {
676 if (!itsOKforProperTime) {
679 if (!itsOKforEnergy) {
682 if (!itsOKforVelocity) {
G4double GetLocalTime() const
G4double GetKineticEnergy() const
void AddLocalTime(const G4double aValue)
void AddSecondary(G4Track *aSecondary)
G4ThreeVector CalcMomentum(G4double energy, G4ThreeVector direction, G4double mass) const
G4ThreeVector thePolarizationChange
void SetWeight(G4double aValue)
G4double GetProperTime() const
static const G4double accuracyForWarning
static constexpr double hbar_Planck
G4TrackFastVector * theListOfSecondaries
static constexpr double MeV
G4StepPoint * GetPreStepPoint() const
void SetLocalTime(const G4double aValue)
static constexpr double mm
virtual G4bool CheckIt(const G4Track &)
const G4ThreeVector & GetMomentumDirection() const
void SetVelocity(G4double v)
void SetMass(G4double value)
const G4String & GetParticleName() const
virtual G4Step * UpdateStepForPostStep(G4Step *Step)
void SetMomentumDirection(const G4ThreeVector &aValue)
const G4TouchableHandle & GetTouchableHandle() const
G4FastVector< G4Track, G4TrackFastVectorSize > G4TrackFastVector
G4double theTrueStepLength
void AddPolarization(const G4ThreeVector &aValue)
void AddProperTime(const G4double aValue)
G4SteppingControl theSteppingControlFlag
void SetPolarization(const G4ThreeVector &aValue)
G4ParticleDefinition * GetDefinition() const
G4Step * UpdateStepInfo(G4Step *Step)
void AddSecondary(G4Track *aSecondary)
G4double GetProperTime() const
G4ThreeVector thePositionChange
virtual void Initialize(const G4Track &)
G4double CalculateVelocity() const
void SetProperTime(const G4double aValue)
G4double theLocalEnergyDeposit
virtual ~G4ParticleChange()
static constexpr double m
G4bool isParentWeightProposed
static constexpr double c_squared
void AddGlobalTime(const G4double aValue)
G4bool operator!=(const G4ParticleChange &right) const
virtual G4Step * UpdateStepForAtRest(G4Step *Step)
G4double GetProperTime() const
G4TrackStatus theStatusChange
const G4Track * theCurrentTrack
virtual void Initialize(const G4Track &)
void SetKineticEnergy(const G4double aValue)
const G4ThreeVector & GetPosition() const
G4double GetMagneticMoment() const
virtual void DumpInfo() const
G4double GetGlobalTime() const
G4double GetCharge() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4Track * GetTrack() const
const G4ThreeVector & GetPosition() const
void SetKineticEnergy(const G4double aValue)
G4StepPoint * GetPostStepPoint() const
G4double GetKineticEnergy() const
G4double GetVelocity() const
void SetGoodForTrackingFlag(G4bool value=true)
G4ParticleChange & operator=(const G4ParticleChange &right)
const G4ThreeVector & GetPolarization() const
static constexpr double eplus
void SetElement(G4int anIndex, Type *anElement)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual void DumpInfo() const
static const G4double accuracyForException
const G4ThreeVector & GetPolarization() const
static constexpr double c_light
G4double GetGlobalTime(G4double timeDelay=0.0) const
G4TrackStatus GetTrackStatus() const
G4double theVelocityChange
G4double GetKineticEnergy() const
void SetCharge(G4double value)
G4GLOB_DLL std::ostream G4cout
G4ThreeVector GetMomentum() const
void SetPosition(const G4ThreeVector &aValue)
void AddPosition(const G4ThreeVector &aValue)
G4ThreeVector theMomentumDirectionChange
virtual G4bool CheckIt(const G4Track &)
void SetMagneticMoment(G4double value)
virtual G4Step * UpdateStepForAlongStep(G4Step *Step)
G4int theNumberOfSecondaries
static constexpr double GeV
const G4DynamicParticle * GetDynamicParticle() const
G4double theMagneticMomentChange
G4bool operator==(const G4ParticleChange &right) const
G4double theProperTimeChange