59 #include "G4ParticleChangeForDecay.hh" 67 fRemainderLifeTime(-1.0),
75 G4cout <<
"G4Decay constructor " <<
" Name:" << processName <<
G4endl;
157 pathlength = ( rKineticEnergy + 1.0)* aCtau;
158 }
else if ( rKineticEnergy <
DBL_MIN ) {
162 G4cout <<
"G4Decay::GetMeanFreePath() !!particle stops!!";
201 G4bool isPreAssigned = (o_products != 0);
211 if ( (decaytable == 0) && !isExtDecayer &&!isPreAssigned ){
213 G4cout <<
"G4Decay::DoIt : decay table not defined for ";
218 "Decay table is not defined");
232 }
else if ( isExtDecayer ) {
252 if ( decaychannel ==0) {
255 " can not determine decay channel ");
261 G4cout <<
"G4Decay::DoIt : selected decay channel addr:" 283 if (ParentEnergy < ParentMass) {
285 G4cout <<
"G4Decay::DoIt : Total Energy is less than its mass" <<
G4endl;
287 G4cout <<
" Energy:" << ParentEnergy/
MeV <<
"[MeV]";
288 G4cout <<
" Mass:" << ParentMass/
MeV <<
"[MeV]";
293 "Total Energy is less than its mass");
294 ParentEnergy = ParentMass;
301 G4double finalGlobalTime = aTrack.GetGlobalTime();
302 G4double finalLocalTime = aTrack.GetLocalTime();
303 if (aTrack.GetTrackStatus() == fStopButAlive ){
308 if (isPreAssigned) products->
Boost( ParentEnergy, ParentDirection);
311 if (!isExtDecayer) products->
Boost( ParentEnergy, ParentDirection);
322 G4cout <<
"G4Decay::DoIt : Decay vertex :";
323 G4cout <<
" Time: " << finalGlobalTime/
ns <<
"[ns]";
324 G4cout <<
" X:" << (aTrack.GetPosition()).
x() /
cm <<
"[cm]";
325 G4cout <<
" Y:" << (aTrack.GetPosition()).
y() /
cm <<
"[cm]";
326 G4cout <<
" Z:" << (aTrack.GetPosition()).
z() /
cm <<
"[cm]";
328 G4cout <<
"G4Decay::DoIt : decay products in Lab. Frame" <<
G4endl;
335 for (index=0; index < numberOfSecondaries; index++)
338 currentPosition = aTrack.GetPosition();
340 G4Track* secondary =
new G4Track( products->
PopProducts(),
344 secondary->SetGoodForTrackingFlag();
345 secondary->SetTouchableHandle(thand);
386 const G4Track&
track,
392 *condition = NotForced;
395 G4double pTime = track.GetDynamicParticle()->GetPreAssignedDecayProperTime();
396 G4double aLife = track.GetDynamicParticle()->GetDefinition()->GetPDGLifeTime();
400 if ( previousStepSize > 0.0){
413 G4cout <<
"G4Decay::PostStepGetPhysicalInteractionLength " <<
G4endl;
414 track.GetDynamicParticle()->DumpInfo();
415 G4cout <<
" in Material " << track.GetMaterial()->GetName() <<
G4endl;
445 G4double aMass = track.GetDynamicParticle()->GetMass();
446 rvalue *= track.GetDynamicParticle()->GetTotalMomentum()/aMass;
453 const G4Track&
track,
458 *condition = NotForced;
460 G4double pTime = track.GetDynamicParticle()->GetPreAssignedDecayProperTime();
483 const G4Track& aTrack,
487 if ( (aTrack.GetTrackStatus() == fStopButAlive ) ||
488 (aTrack.GetTrackStatus() == fStopAndKill ) ){
G4double condition(const G4ErrorSymMatrix &m)
virtual G4double GetMeanLifeTime(const G4Track &aTrack, G4ForceCondition *condition)
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
const G4double HighestValue
virtual G4bool IsApplicable(const G4ParticleDefinition &)
virtual G4DecayProducts * ImportDecayProducts(const G4Track &aTrack)=0
G4double GetTotalMomentum() const
G4double theNumberOfInteractionLengthLeft
G4double GetPDGLifeTime() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
G4VExtDecayer * pExtDecayer
void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection)
virtual void ResetNumberOfInteractionLengthLeft()
virtual void StartTracking(G4Track *)
void ClearNumberOfInteractionLengthLeft()
G4bool GetPDGStable() const
G4double GetTotalEnergy() const
const G4DecayProducts * GetPreAssignedDecayProducts() const
virtual G4VParticleChange * DecayIt(const G4Track &aTrack, const G4Step &aStep)
G4double fRemainderLifeTime
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
G4double GetKineticEnergy() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
void SetVerboseLevel(G4int value)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition)
G4VDecayChannel * SelectADecayChannel(G4double parentMass=-1.)
G4double currentInteractionLength
G4DecayTable * GetDecayTable() const
void SetProcessSubType(G4int)
G4Decay(const G4String &processName="Decay")
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4int GetVerboseLevel() const
static const double perMillion
const G4ThreeVector & GetMomentumDirection() const
G4double GetPDGMass() const
G4DynamicParticle * PopProducts()
G4VParticleChange * pParticleChange
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
virtual void DaughterPolarization(const G4Track &aTrack, G4DecayProducts *products)
G4ParticleDefinition * GetDefinition() const
G4int GetVerboseLevel() const
virtual G4DecayProducts * DecayIt(G4double parentMass=-1.0)=0
void SubtractNumberOfInteractionLengthLeft(G4double previousStepSize)
void SetExtDecayer(G4VExtDecayer *)
virtual void EndTracking()
G4ParticleChangeForDecay fParticleChangeForDecay