#include <BgsGentleGenocide.hh>
Inheritance diagram for BgsGentleGenocide:
Public Member Functions | |
BgsGentleGenocide (G4double theMaxKineticEnergy, G4int theMinNumberSteps, const G4String &name="BgsGentleGenocide", G4ProcessType type=fUserDefined) | |
virtual | ~BgsGentleGenocide () |
virtual G4double | PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) |
virtual G4VParticleChange * | PostStepDoIt (const G4Track &track, const G4Step &step) |
virtual G4double | AlongStepGetPhysicalInteractionLength (const G4Track &, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety, G4GPILSelection *selection) |
virtual G4VParticleChange * | AlongStepDoIt (const G4Track &track, const G4Step &step) |
virtual G4double | AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *force) |
virtual G4VParticleChange * | AtRestDoIt (const G4Track &track, const G4Step &step) |
Protected Attributes | |
G4double | maxKineticEnergy |
G4int | minNumberSteps |
Definition at line 30 of file BgsGentleGenocide.hh.
BgsGentleGenocide::BgsGentleGenocide | ( | G4double | theMaxKineticEnergy, | |
G4int | theMinNumberSteps, | |||
const G4String & | name = "BgsGentleGenocide" , |
|||
G4ProcessType | type = fUserDefined | |||
) |
Definition at line 32 of file BgsGentleGenocide.cc.
00036 : BgsGenocide( name, type ), 00037 maxKineticEnergy(theMaxKineticEnergy), 00038 minNumberSteps(theMinNumberSteps) 00039 {;}
BgsGentleGenocide::~BgsGentleGenocide | ( | ) | [virtual] |
virtual G4VParticleChange* BgsGenocide::AlongStepDoIt | ( | const G4Track & | track, | |
const G4Step & | step | |||
) | [inline, virtual, inherited] |
virtual G4double BgsGenocide::AlongStepGetPhysicalInteractionLength | ( | const G4Track & | , | |
G4double | previousStepSize, | |||
G4double | currentMinimumStep, | |||
G4double & | currentSafety, | |||
G4GPILSelection * | selection | |||
) | [inline, virtual, inherited] |
virtual G4VParticleChange* BgsGenocide::AtRestDoIt | ( | const G4Track & | track, | |
const G4Step & | step | |||
) | [inline, virtual, inherited] |
virtual G4double BgsGenocide::AtRestGetPhysicalInteractionLength | ( | const G4Track & | track, | |
G4ForceCondition * | force | |||
) | [inline, virtual, inherited] |
G4VParticleChange * BgsGenocide::PostStepDoIt | ( | const G4Track & | track, | |
const G4Step & | step | |||
) | [virtual, inherited] |
Definition at line 34 of file BgsGenocide.cc.
00036 { 00037 pParticleChange->Initialize(track); 00038 00039 pParticleChange->ProposeTrackStatus( fStopAndKill ); 00040 pParticleChange->SetNumberOfSecondaries( 0 ); 00041 pParticleChange->ProposeLocalEnergyDeposit( 0 ); 00042 ClearNumberOfInteractionLengthLeft(); 00043 00044 return pParticleChange; 00045 }
G4double BgsGentleGenocide::PostStepGetPhysicalInteractionLength | ( | const G4Track & | track, | |
G4double | previousStepSize, | |||
G4ForceCondition * | condition | |||
) | [virtual] |
Reimplemented from BgsGenocide.
Definition at line 51 of file BgsGentleGenocide.cc.
References DBL_MAX, maxKineticEnergy, and minNumberSteps.
00055 { 00056 *condition = NotForced; 00057 00058 // 00059 // Do nothing if we haven't reached the minimum number of steps 00060 // 00061 if (track.GetCurrentStepNumber() < minNumberSteps) return DBL_MAX; 00062 00063 // 00064 // Do nothing if we are above the threshold kinetic energy 00065 // 00066 const G4DynamicParticle *particle = track.GetDynamicParticle(); 00067 00068 if (particle->GetKineticEnergy() > maxKineticEnergy) return DBL_MAX; 00069 00070 // 00071 // Die! 00072 // 00073 // const G4ThreeVector &pos = track.GetPosition(); 00074 00075 const G4VProcess *creator = track.GetCreatorProcess(); 00076 G4String creatorProcessName = "(none?)"; 00077 if (creator) creatorProcessName = creator->GetProcessName(); 00078 00079 /* 00080 G4cout << "BgsGentleGenocide: rogue " 00081 << particle->GetDefinition()->GetParticleName() 00082 << " terminated, created by " 00083 << creatorProcessName << G4endl; 00084 00085 G4cout << " KE = " 00086 << particle->GetKineticEnergy()/keV << " keV, " 00087 << " global coords (cm): (" 00088 << pos.x()/cm << "," 00089 << pos.y()/cm << "," 00090 << pos.z()/cm << ")" << G4endl; 00091 */ 00092 00093 *condition = NotForced; 00094 return 0; 00095 }
G4double BgsGentleGenocide::maxKineticEnergy [protected] |
Definition at line 47 of file BgsGentleGenocide.hh.
Referenced by PostStepGetPhysicalInteractionLength().
G4int BgsGentleGenocide::minNumberSteps [protected] |
Definition at line 48 of file BgsGentleGenocide.hh.
Referenced by PostStepGetPhysicalInteractionLength().