Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDecayChannel.cc 95906 2016-03-02 10:56:50Z gcosmo $
|
||||
// $Id: G4VDecayChannel.cc 98352 2016-07-08 08:21:00Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -420,6 +420,7 @@ void G4VDecayChannel::FillDaughters()
|
||||
// check sum of daghter mass
|
||||
G4double widthMass = std::sqrt(G4MT_parent->GetPDGWidth()*G4MT_parent->GetPDGWidth()+sumofdaughterwidthsq);
|
||||
if ( (G4MT_parent->GetParticleType() != "nucleus") &&
|
||||
(numberOfDaughters !=1) &&
|
||||
(sumofdaughtermass > parentmass + rangeMass*widthMass) ){
|
||||
// !!! illegal mass !!!
|
||||
#ifdef G4VERBOSE
|
||||
@@ -566,6 +567,7 @@ const G4String& G4VDecayChannel::GetNoName() const
|
||||
#include "Randomize.hh"
|
||||
G4double G4VDecayChannel::DynamicalMass(G4double massPDG, G4double width, G4double maxDev ) const
|
||||
{
|
||||
if (width<=0.0) return massPDG;
|
||||
if (maxDev >rangeMass) maxDev = rangeMass;
|
||||
if (maxDev <=-1.*rangeMass) return massPDG; // can not calculate
|
||||
|
||||
@@ -586,10 +588,12 @@ G4bool G4VDecayChannel::IsOKWithParentMass(G4double parentMass)
|
||||
G4double sumOfDaughterMassMin=0.0;
|
||||
CheckAndFillParent();
|
||||
CheckAndFillDaughters();
|
||||
|
||||
// skip one body decay
|
||||
if (numberOfDaughters==1) return true;
|
||||
|
||||
for (G4int index=0; index < numberOfDaughters; index++) {
|
||||
sumOfDaughterMassMin +=
|
||||
G4MT_daughters_mass[index] -rangeMass*G4MT_daughters_width[index];
|
||||
}
|
||||
return (parentMass > sumOfDaughterMassMin);
|
||||
return (parentMass >= sumOfDaughterMassMin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user