56 fFastTrack=&fastTrack;
79 theWeightChange = currentTrack.
GetWeight();
104 if (localCoordinates)
108 thePositionChange = globalPosition;
130 if (localCoordinates)
132 TransformAxis(momentum);
134 SetMomentumChange(globalMomentum.
unit());
156 if (localCoordinates)
158 TransformAxis(direction);
160 SetMomentumChange(globalDirection.
unit());
183 if (localCoordinates)
185 TransformAxis(globalPolarization);
187 thePolarizationChange = globalPolarization;
242 if (localCoordinates)
246 GetInverseAffineTransformation()->
247 TransformAxis(globalDynamics->
248 GetMomentumDirection()));
254 globalPolarization.
x(),
255 globalPolarization.
y(),
256 globalPolarization.
z()
261 TransformPoint(globalPosition);
289 tellWhatIsWrong <<
"G4FastStep can be initialised only through G4FastTrack."
291 G4Exception(
"G4FastStep::Initialize(const G4Track&)",
331 theMomentumChange = right.theMomentumChange;
332 thePolarizationChange = right.thePolarizationChange;
333 thePositionChange = right.thePositionChange;
334 theProperTimeChange = right.theProperTimeChange;
335 theTimeChange = right.theTimeChange;
336 theEnergyChange = right.theEnergyChange;
340 theWeightChange = right.theWeightChange;
341 fFastTrack = right.fFastTrack;
392 pPostStepPoint->
SetWeight( theWeightChange );
425 pPostStepPoint->
SetWeight( theWeightChange );
448 G4cout <<
" Momentum Direct - x : " << std::setw(20) << theMomentumChange.
x() <<
G4endl;
449 G4cout <<
" Momentum Direct - y : " << std::setw(20) << theMomentumChange.
y() <<
G4endl;
450 G4cout <<
" Momentum Direct - z : " << std::setw(20) << theMomentumChange.
z() <<
G4endl;
454 G4cout <<
" Polarization - x : " << std::setw(20) << thePolarizationChange.
x() <<
G4endl;
455 G4cout <<
" Polarization - y : " << std::setw(20) << thePolarizationChange.
y() <<
G4endl;
456 G4cout <<
" Polarization - z : " << std::setw(20) << thePolarizationChange.
z() <<
G4endl;
481 G4bool exitWithError =
false;
489 ed <<
"The energy becomes larger than the initial value, difference = " << accuracy <<
" MeV" <<
G4endl;
490 G4Exception(
"G4FastStep::CheckIt(const G4Track& aTrack)",
497 G4bool itsOKforMomentum =
true;
498 if ( theEnergyChange >0.)
500 accuracy = std::abs(theMomentumChange.
mag2()-1.0);
504 ed <<
"The Momentum Change is not a unit vector, difference = " << accuracy <<
G4endl;
505 G4Exception(
"G4FastStep::CheckIt(const G4Track& aTrack)",
508 itsOK = itsOKforMomentum =
false;
517 ed <<
"The global time is getting backward, difference = " << accuracy <<
" ns" <<
G4endl;
518 G4Exception(
"G4FastStep::CheckIt(const G4Track& aTrack)",
528 ed <<
"The proper time is getting backward, difference = " << accuracy <<
" ns" <<
G4endl;
529 G4Exception(
"G4FastStep::CheckIt(const G4Track& aTrack)",
546 ed <<
"An inaccuracy in G4FastStep is beyond tolerance." <<
G4endl;
547 G4Exception(
"G4FastStep::CheckIt(const G4Track& aTrack)",
553 if (!itsOKforMomentum) {
555 theMomentumChange = (1./vmag)*theMomentumChange;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
void SetPolarization(const G4ThreeVector &)
void SetMomentumDirection(const G4ThreeVector &aDirection)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4double GetProperTime() const
const G4ThreeVector & GetPolarization() const
G4FastStep & operator=(const G4FastStep &right)
void SetPrimaryTrackFinalKineticEnergyAndDirection(G4double, const G4ThreeVector &, G4bool localCoordinates=true)
G4Step * UpdateStepForPostStep(G4Step *Step)
void SetPrimaryTrackFinalPosition(const G4ThreeVector &, G4bool localCoordinates=true)
G4bool operator==(const G4FastStep &right) const
G4bool operator!=(const G4FastStep &right) const
void SetPrimaryTrackFinalPolarization(const G4ThreeVector &, G4bool localCoordinates=true)
void ProposePrimaryTrackFinalKineticEnergyAndDirection(G4double, const G4ThreeVector &, G4bool localCoordinates=true)
void SetPrimaryTrackFinalMomentum(const G4ThreeVector &, G4bool localCoordinates=true)
G4bool CheckIt(const G4Track &)
void ProposePrimaryTrackFinalPosition(const G4ThreeVector &, G4bool localCoordinates=true)
void SetPrimaryTrackFinalKineticEnergy(G4double)
void ProposePrimaryTrackFinalPolarization(const G4ThreeVector &, G4bool localCoordinates=true)
void ProposePrimaryTrackFinalMomentumDirection(const G4ThreeVector &, G4bool localCoordinates=true)
G4Step * UpdateStepForAtRest(G4Step *Step)
G4Track * CreateSecondaryTrack(const G4DynamicParticle &, G4ThreeVector, G4ThreeVector, G4double, G4bool localCoordinates=true)
void Initialize(const G4FastTrack &)
const G4Track * GetPrimaryTrack() const
const G4AffineTransform * GetInverseAffineTransformation() const
void SetKineticEnergy(const G4double aValue)
void SetWeight(G4double aValue)
void SetProperTime(const G4double aValue)
void SetGlobalTime(const G4double aValue)
void SetPosition(const G4ThreeVector &aValue)
void AddLocalTime(const G4double aValue)
void SetMomentumDirection(const G4ThreeVector &aValue)
void SetPolarization(const G4ThreeVector &aValue)
G4Track * GetTrack() const
G4StepPoint * GetPostStepPoint() const
G4double GetWeight() const
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
G4double GetProperTime() const
const G4DynamicParticle * GetDynamicParticle() const
G4double GetKineticEnergy() const
G4int theNumberOfSecondaries
virtual G4bool CheckIt(const G4Track &)
G4double theTrueStepLength
G4double theLocalEnergyDeposit
void ProposeTrackStatus(G4TrackStatus status)
G4TrackStatus theStatusChange
G4TrackFastVector * theListOfSecondaries
G4SteppingControl theSteppingControlFlag
virtual void Initialize(const G4Track &)
G4double GetAccuracyForException() const
G4int theSizeOftheListOfSecondaries
void AddSecondary(G4Track *aSecondary)
G4double GetAccuracyForWarning() const
virtual void DumpInfo() const
G4VParticleChange & operator=(const G4VParticleChange &right)
G4Step * UpdateStepInfo(G4Step *Step)