60 delete(*theListOfSecondaries)[index];
68 : theStatusChange(right.theStatusChange)
69 , theSteppingControlFlag(right.theSteppingControlFlag)
70 , theLocalEnergyDeposit(right.theLocalEnergyDeposit)
71 , theNonIonizingEnergyDeposit(right.theNonIonizingEnergyDeposit)
72 , theTrueStepLength(right.theTrueStepLength)
73 , theParentWeight(right.theParentWeight)
75 , verboseLevel(right.verboseLevel)
76 , theFirstStepInVolume(right.theFirstStepInVolume)
77 , theLastStepInVolume(right.theLastStepInVolume)
78 , fSetSecondaryWeightByProcess(right.fSetSecondaryWeightByProcess)
79 , debugFlag(right.debugFlag)
100 delete((*theListOfSecondaries)[index]);
165 "Secondary buffer is full. The track is deleted!");
236 G4cout <<
" -----------------------------------------------" <<
G4endl;
237 G4cout <<
" G4ParticleChange Information " << std::setw(20) <<
G4endl;
238 G4cout <<
" -----------------------------------------------" <<
G4endl;
240 G4cout <<
" # of 2ndaries : " << std::setw(20)
245 G4cout <<
" Pointer to 2ndaries : " << std::setw(20)
249 G4cout <<
" -----------------------------------------------" <<
G4endl;
251 G4cout <<
" Energy Deposit (MeV): " << std::setw(20)
254 G4cout <<
" Non-ionizing Energy Deposit (MeV): " << std::setw(20)
257 G4cout <<
" Track Status : " << std::setw(20);
264 G4cout <<
" StopButAlive";
272 G4cout <<
" KillTrackAndSecondaries";
280 G4cout <<
" PostponeToNextEvent";
283 G4cout <<
" True Path Length (mm) : " << std::setw(20)
285 G4cout <<
" Stepping Control : " << std::setw(20)
305 G4bool exitWithError =
false;
309 const G4int maxError = 30;
313 G4bool itsOKforEnergy =
true;
317 itsOKforEnergy =
false;
321 if(nError < maxError)
323 G4cout <<
" G4VParticleChange::CheckIt : ";
324 G4cout <<
"the energy deposit is negative !!"
325 <<
" Difference: " << accuracy <<
"[MeV] " <<
G4endl;
326 G4cout << aTrack.GetDefinition()->GetParticleName()
327 <<
" E=" << aTrack.GetKineticEnergy() / MeV
328 <<
" pos=" << aTrack.GetPosition().x() / m <<
", "
329 << aTrack.GetPosition().y() / m <<
", "
330 << aTrack.GetPosition().z() / m <<
G4endl;
336 G4bool itsOKforStepLength =
true;
340 itsOKforStepLength =
false;
344 if(nError < maxError)
346 G4cout <<
" G4VParticleChange::CheckIt : ";
347 G4cout <<
"the true step length is negative !!"
348 <<
" Difference: " << accuracy <<
"[MeV] " <<
G4endl;
349 G4cout << aTrack.GetDefinition()->GetParticleName()
350 <<
" E=" << aTrack.GetKineticEnergy() / MeV
351 <<
" pos=" << aTrack.GetPosition().x() / m <<
", "
352 << aTrack.GetPosition().y() / m <<
", "
353 << aTrack.GetPosition().z() / m <<
G4endl;
358 if(!itsOKforStepLength || !itsOKforEnergy)
369 "Step length and/or energy deposit was illegal");
373 if(!itsOKforStepLength)
381 return (itsOKforStepLength && itsOKforEnergy);
387 G4bool exitWithError =
false;
391 const G4int maxError = 30;
395 G4bool itsOKforMomentum =
true;
401 itsOKforMomentum =
false;
405 if(nError < maxError)
407 G4cout <<
" G4VParticleChange::CheckSecondary : ";
408 G4cout <<
"the Momentum direction is not unit vector !! "
409 <<
" Difference: " << accuracy <<
G4endl;
421 G4bool itsOKforEnergy =
true;
425 itsOKforEnergy =
false;
429 if(nError < maxError)
431 G4cout <<
" G4VParticleChange::CheckSecondary : ";
432 G4cout <<
"the kinetic energy is negative !!"
433 <<
" Difference: " << accuracy <<
"[MeV] " <<
G4endl;
434 G4cout <<
" G4VParticleChange::CheckSecondary : ";
435 G4cout <<
"the global time of secondary is earlier than the parent !!"
436 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
446 G4bool itsOKforTiming =
true;
451 itsOKforTiming =
false;
455 if(nError < maxError)
457 G4cout <<
" G4VParticleChange::CheckSecondary : ";
459 <<
"the global time of secondary goes back comapared to the parent !!"
460 <<
" Difference: " << accuracy <<
"[ns] " <<
G4endl;
475 G4Exception(
"G4VParticleChange::CheckSecondary()",
"TRACK001",
479 G4bool itsOK = itsOKforMomentum && itsOKforEnergy && itsOKforTiming;
482 if(!itsOKforMomentum)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4FastVector< G4Track, G4TrackFastVectorSize > G4TrackFastVector
const G4int G4TrackFastVectorSize
@ fKillTrackAndSecondaries
G4GLOB_DLL std::ostream G4cout
void SetElement(G4int anIndex, Type *anElement)
const G4String & GetParticleName() const
void SetWeight(G4double aValue)
G4double GetWeight() const
void SetStepLength(G4double value)
void AddNonIonizingEnergyDeposit(G4double value)
void AddTotalEnergyDeposit(G4double value)
G4StepPoint * GetPreStepPoint() const
void SetControlFlag(G4SteppingControl StepControlFlag)
void ClearFirstStepFlag()
G4StepPoint * GetPostStepPoint() const
void SetWeight(G4double aValue)
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
void SetKineticEnergy(const G4double aValue)
void SetMomentumDirection(const G4ThreeVector &aValue)
G4bool theFirstStepInVolume
G4int theNumberOfSecondaries
G4bool fSetSecondaryWeightByProcess
virtual G4bool CheckIt(const G4Track &)
static const G4double accuracyForException
G4double theTrueStepLength
G4double theLocalEnergyDeposit
G4TrackStatus theStatusChange
G4TrackFastVector * theListOfSecondaries
G4SteppingControl theSteppingControlFlag
static const G4double accuracyForWarning
G4bool IsParentWeightSetByProcess() const
virtual G4Step * UpdateStepForAlongStep(G4Step *Step)
G4bool theLastStepInVolume
virtual G4Step * UpdateStepForAtRest(G4Step *Step)
G4double theNonIonizingEnergyDeposit
virtual G4Step * UpdateStepForPostStep(G4Step *Step)
G4double GetAccuracyForException() const
G4int theSizeOftheListOfSecondaries
void AddSecondary(G4Track *aSecondary)
void SetParentWeightByProcess(G4bool)
G4double GetAccuracyForWarning() const
virtual void DumpInfo() const
G4bool isParentWeightProposed
G4VParticleChange & operator=(const G4VParticleChange &right)
G4bool CheckSecondary(G4Track &)
G4Step * UpdateStepInfo(G4Step *Step)
G4Track * GetSecondary(G4int anIndex) const
G4bool operator==(const G4VParticleChange &right) const
G4double theParentGlobalTime
G4bool operator!=(const G4VParticleChange &right) const
virtual ~G4VParticleChange()