Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
@@ -0,0 +1,18 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4hadronic_binary
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4hadronic_binary
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:55:53 bmorgan Exp $
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
@@ -13,6 +13,35 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
11 Nov 2010, G.Folger had-binary-V09-03-05
- fix compilation errors and warnings in G4BinaryCascade.
10 Nov 2010, G.Folger had-binary-V09-03-04
- *** lower CaptureThreshold in G4GeneratorPrecompoundInterface.cc
from 80 to 10 MeV.
- G4BinaryCascade: disable G4Exception in StepParticlesOut() introduced in
previous tag. Need to investigate why this happens first.
3 Nov 2010, G.Folger had-binary-V09-03-03
- Fix coverity warnings
- in Propagate(), mem leak for products
- in StepParticlesOut, check return code of GetSphereInter....
- Scatter1H1(0 always check secs
8 Sep 2010, G.Folger had-binary-V09-03-02
- Binary{LightIon}Cascade: use integer (A,Z) interface of nucleus
- *Field.cc: use integer A,Z from G4V3DNucleus, and for G4FermiMomentum
31-Aug-2010, V.Ivanchenko had-binary-V09-03-01
- G4GeneratorPrecompoundInterface - define default deexcitation with
G4PreCompoundModel in the constructor
of the class
28-Aug-2010, V.Ivanchenko had-binary-V09-03-00
- G4GeneratorPrecompoundInterface - minor cleanup as a part of PreCompound
model cleanup: use integer Z and A,
added pointers to proton and neutron
4-Dec-2009, Gunter Folger had-binary-V09-02-06
- Bug fix in G4BinaryCascade::ApplyCollision; decay products outside
nucleus were nevertheless counted in currentZ/A as if these were within
@@ -36,9 +65,8 @@ code and to keep track of all tags.
1. Shift of particle's formation times that the min. time=0.
2. Including of captured particles (Due to absend of the options there
were
a large energy-non-conservation).
2. Including of captured particles (Due to absence of the options there
were a large energy-non-conservation).
3. GetExcitationEnergy() - correction for the case when all nucleons are
ejected.
@@ -84,13 +84,23 @@ private:
G4int GetTotalCharge(std::vector<G4KineticTrack *> & aV)
{
G4cout<<"GetTotalCharge(std::vector<G4KineticTrack *> & aV)"<<G4endl; // Uzhi
G4int result = 0;
std::vector<G4KineticTrack *>::iterator i;
for(i = aV.begin(); i != aV.end(); ++i)
{
result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
G4cout<<(*i)->GetDefinition()->GetParticleName()<<" "<<(*i)->GetDefinition()->GetPDGCharge()<<G4endl; // Uzhi
}
return result;
}
G4int GetTotalBaryonCharge(std::vector<G4KineticTrack *> & aV)
{
G4int result = 0;
std::vector<G4KineticTrack *>::iterator i;
for(i = aV.begin(); i != aV.end(); ++i)
{
if ( (*i)->GetDefinition()->GetBaryonNumber() != 0 ){
result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
}
}
return result;
}
@@ -23,44 +23,72 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4GeneratorPrecompoundInterface_h
#define G4GeneratorPrecompoundInterface_h 1
#include "G4Fancy3DNucleus.hh"
#include "G4Nucleon.hh"
#include "G4Nucleus.hh"
#include "G4VIntraNuclearTransportModel.hh"
#include "G4KineticTrackVector.hh"
#include "G4FragmentVector.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
//
// $Id: G4GeneratorPrecompoundInterface.hh,v 1.6 2010/08/31 16:16:51 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
//
// History: first implementation
// HPW, 10DEC 98, the decay part originally written by Gunter Folger
// in his FTF-test-program.
//
//
// -----------------------------------------------------------------------------
//
// Class Description
// Trivial implementation of an intra-nuclear transport. It pworvides coupling
// of high energy generators with pre equilibrium decay models.
// To be used in your physics list in case you need this physics.
// Class Description - End
#ifndef G4GeneratorPrecompoundInterface_h
#define G4GeneratorPrecompoundInterface_h 1
#include "G4VIntraNuclearTransportModel.hh"
#include "G4ReactionProductVector.hh"
#include "G4HadProjectile.hh"
#include "G4Nucleus.hh"
#include "globals.hh"
class G4KineticTrackVector;
class G4V3DNucleus;
class G4ParticleDefinition;
class G4GeneratorPrecompoundInterface : public G4VIntraNuclearTransportModel
{
public:
G4GeneratorPrecompoundInterface();
~G4GeneratorPrecompoundInterface(){}
G4GeneratorPrecompoundInterface(G4VPreCompoundModel* p = 0);
virtual ~G4GeneratorPrecompoundInterface();
virtual G4HadFinalState*
ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus );
virtual G4ReactionProductVector*
Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
inline void SetCaptureThreshold(G4double);
private:
G4int operator==(G4GeneratorPrecompoundInterface& right) {return (this == &right);}
G4int operator!=(G4GeneratorPrecompoundInterface& right) {return (this != &right);}
public:
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus );
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
G4double SetCaptureThreshold(G4double);
private:
G4double CaptureThreshold;
G4GeneratorPrecompoundInterface(const G4GeneratorPrecompoundInterface& right);
const G4GeneratorPrecompoundInterface& operator=(const G4GeneratorPrecompoundInterface &right);
G4int operator==(G4GeneratorPrecompoundInterface& right) {return (this == &right);}
G4int operator!=(G4GeneratorPrecompoundInterface& right) {return (this != &right);}
G4double CaptureThreshold;
const G4ParticleDefinition* proton;
const G4ParticleDefinition* neutron;
};
inline
void G4GeneratorPrecompoundInterface::SetCaptureThreshold(G4double value)
{
CaptureThreshold=value;
}
#endif // G4GeneratorPrecompoundInterface_h
@@ -76,8 +76,8 @@ private:
}
G4FermiMomentum theFermi;
G4double theA;
G4double theZ;
G4int theA;
G4int theZ;
const G4VNuclearDensity * theDensity;
G4double theR;
@@ -75,8 +75,8 @@ private:
return theFermi.GetFermiMomentum(aDensity);
}
G4double theA;
G4double theZ;
G4int theA;
G4int theZ;
G4double theBarrier;
G4double theRadius;
G4FermiMomentum theFermi;
@@ -0,0 +1,152 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4hadronic_binary
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4hadronic_binary
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
# $Id: sources.cmake,v 1.1 2010/09/29 18:56:01 bmorgan Exp $
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/magneticfield/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/shortlived/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/evaporation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fermi_breakup/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/handler/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/multifragmentation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/photon_evaporation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/util/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/im_r_matrix/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/pre_equilibrium/exciton_model/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/util/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/processes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4hadronic_binary
HEADERS
G4Absorber.hh
G4AntiProtonField.hh
G4BCLateParticle.hh
G4BinaryCascade.hh
G4BinaryLightIonReaction.hh
G4FieldPropagation.hh
G4GeneratorPrecompoundInterface.hh
G4KM_DummyField.hh
G4KM_NucleonEqRhs.hh
G4KM_OpticalEqRhs.hh
G4KaonMinusField.hh
G4KaonPlusField.hh
G4KaonZeroField.hh
G4NeutronField.hh
G4PionMinusField.hh
G4PionPlusField.hh
G4PionZeroField.hh
G4ProtonField.hh
G4RKFieldIntegrator.hh
G4RKPropagation.hh
G4SigmaMinusField.hh
G4SigmaPlusField.hh
G4SigmaZeroField.hh
G4VFieldPropagation.hh
G4VKM_NuclearDensity.hh
G4VNuclearField.hh
SOURCES
G4Absorber.cc
G4AntiProtonField.cc
G4BinaryCascade.cc
G4BinaryLightIonReaction.cc
G4FieldPropagation.cc
G4GeneratorPrecompoundInterface.cc
G4KM_NucleonEqRhs.cc
G4KM_OpticalEqRhs.cc
G4KaonMinusField.cc
G4KaonPlusField.cc
G4KaonZeroField.cc
G4NeutronField.cc
G4PionMinusField.cc
G4PionPlusField.cc
G4PionZeroField.cc
G4ProtonField.cc
G4RKFieldIntegrator.cc
G4RKPropagation.cc
G4SigmaMinusField.cc
G4SigmaPlusField.cc
G4SigmaZeroField.cc
G4VFieldPropagation.cc
G4VNuclearField.cc
GRANULAR_DEPENDENCIES
G4baryons
G4bosons
G4geometrymng
G4globman
G4had_im_r_matrix
G4had_mod_man
G4had_mod_util
G4had_preequ_exciton
G4hadronic_deex_evaporation
G4hadronic_deex_fermi_breakup
G4hadronic_deex_handler
G4hadronic_deex_management
G4hadronic_deex_multifragmentation
G4hadronic_deex_photon_evaporation
G4hadronic_deex_util
G4hadronic_mgt
G4hadronic_proc
G4hadronic_util
G4hadronic_xsect
G4hepnumerics
G4ions
G4leptons
G4magneticfield
G4materials
G4mesons
G4partman
G4procman
G4shortlived
G4track
G4volumes
GLOBAL_DEPENDENCIES
G4geometry
G4global
G4materials
G4particles
G4track
LINK_LIBRARIES
)
# List any source specific properties here
@@ -84,9 +84,9 @@ G4double G4AntiProtonField::GetField(const G4ThreeVector & aPosition)
G4ParticleDefinition *anAntiProton = G4AntiProton::AntiProtonDefinition();
G4double antiProtonMass = anAntiProton->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = antiProtonMass*nucleusMass/(antiProtonMass+nucleusMass);
@@ -98,8 +98,8 @@ G4double G4AntiProtonField::GetField(const G4ThreeVector & aPosition)
G4double G4AntiProtonField::GetBarrier()
{
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
return -coulombBarrier;
}
@@ -151,6 +151,14 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
G4Nucleus & aNucleus)
{
static G4int eventcounter=0;
// if ( eventcounter == 0 ) {
// SetEpReportLevel(3); // report non conservation with model etc.
// G4double relativeLevel = 1*perCent;
// G4double absoluteLevel = 2*MeV;
// SetEnergyMomentumCheckLevels(relativeLevel,absoluteLevel);
// }
//if(eventcounter == 100*(eventcounter/100) )
eventcounter++;
if(getenv("BCDEBUG") ) G4cerr << " ######### Binary Cascade Reaction number starts ######### "<<eventcounter<<G4endl;
@@ -205,7 +213,7 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
products=0;
}
the3DNucleus->Init(aNucleus.GetN(), aNucleus.GetZ());
the3DNucleus->Init(aNucleus.GetA_asInt(), aNucleus.GetZ_asInt());
thePropagator->Init(the3DNucleus);
// GF Leak on kt??? but where to delete?
G4KineticTrack * kt;// = new G4KineticTrack(definition, 0., initialPosition, initial4Momentum);
@@ -277,6 +285,16 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
#ifdef debug_BIC_Propagate
G4cout << "G4BinaryCascade Propagate starting -------------------------------------------------------" <<G4endl;
#endif
// *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply....
if(nucleus->GetMassNumber() == 1) // 1H1 is special case
{
#ifdef debug_BIC_Propagate
G4cout << " special case 1H1.... " << G4endl;
#endif
return Propagate1H1(secondaries,nucleus);
}
G4ReactionProductVector * products = new G4ReactionProductVector;
the3DNucleus = nucleus;
theOuterRadius = the3DNucleus->GetOuterRadius();
@@ -289,15 +307,6 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
ClearAndDestroy(&theFinalState);
std::vector<G4KineticTrack *>::iterator iter;
// *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply....
if(nucleus->GetMassNumber() == 1) // 1H1 is special case
{
#ifdef debug_BIC_Propagate
G4cout << " special case 1H1.... " << G4endl;
#endif
return Propagate1H1(secondaries,nucleus);
}
BuildTargetList();
#ifdef debug_BIC_GetExcitationEnergy
@@ -1067,9 +1076,8 @@ G4bool G4BinaryCascade::ApplyCollision(G4CollisionInitialState * collision)
PrintKTVector(&debug,std::string("primay- ..."));
PrintKTVector(&target_collection,std::string("... targets"));
//*GF* throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCasacde::ApplyCollision()");
#else
return false;
#endif
return false;
}
G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;
@@ -1117,6 +1125,8 @@ G4bool G4BinaryCascade::ApplyCollision(G4CollisionInitialState * collision)
G4KineticTrackVector * products=0;
products = collision->GetFinalState();
G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;
#ifdef debug_BIC_ApplyCollision
G4bool havePion=false;
for ( std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
@@ -1138,10 +1148,9 @@ G4bool G4BinaryCascade::ApplyCollision(G4CollisionInitialState * collision)
}
PrintKTVector(&collision->GetTargetCollection(),std::string(" Target particles"));
}
#endif
G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;
// if ( lateParticleCollision ) G4cout << " Added late particle--------------------------"<<G4endl;
// if ( lateParticleCollision && products ) PrintKTVector(products, " reaction products");
#endif
//****************************************
// reset primary to initial state
@@ -1560,14 +1569,20 @@ void G4BinaryCascade::StepParticlesOut()
if( kt->GetState() == G4KineticTrack::inside )
{
nsec++;
G4double tStep(0), tdummy(0);
((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep);
G4double tStep(0), tdummy(0);
G4bool intersect =
((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep);
#ifdef debug_BIC_StepParticlesOut
G4cout << " minTimeStep, tStep Particle " <<minTimeStep << " " <<tStep
<< " " <<kt->GetDefinition()->GetParticleName()
<< " 4mom " << kt->GetTrackingMomentum()<<G4endl;
if ( ! intersect );
{
PrintKTVector(&theSecondaryList, std::string(" state ERROR....."));
throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCascade::StepParticlesOut() particle not in nucleus");
}
#endif
if(tStep<minTimeStep && tStep> 0 )
if(intersect && tStep<minTimeStep && tStep> 0 )
{
minTimeStep = tStep;
}
@@ -2461,7 +2476,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate1H1(
// G4cout << G4endl;
}
size_t current(0);
for(current=0; current<secs->size(); current++)
for(current=0; secs && current<secs->size(); current++)
{
if((*secs)[current]->GetDefinition()->IsShortLived())
{
@@ -2707,7 +2722,6 @@ void G4BinaryCascade::PrintWelcomeMessage()
void G4BinaryCascade::DebugApplyCollision(G4CollisionInitialState * collision,
G4KineticTrackVector * products)
{
G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;
G4KineticTrackVector debug1;
debug1.push_back(collision->GetPrimary());
@@ -2715,12 +2729,15 @@ void G4BinaryCascade::DebugApplyCollision(G4CollisionInitialState * collision,
PrintKTVector(&collision->GetTargetCollection(),std::string(" Target particles"));
PrintKTVector(products,std::string(" Scatterer products"));
#ifdef dontUse
G4double thisExcitation(0);
// excitation energy from this collision
// initial state:
G4double initial(0);
G4KineticTrack * kt=collision->GetPrimary();
initial += kt->Get4Momentum().e();
G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;
initial += RKprop->GetField(kt->GetDefinition()->GetPDGEncoding(),kt->GetPosition());
initial -= RKprop->GetBarrier(kt->GetDefinition()->GetPDGEncoding());
@@ -2788,7 +2805,7 @@ void G4BinaryCascade::DebugApplyCollision(G4CollisionInitialState * collision,
<< currentInitialEnergy - final - mass_out
<< G4endl;
currentInitialEnergy-=final;
#endif
}
//----------------------------------------------------------------------------
@@ -52,10 +52,10 @@ G4HadFinalState *G4BinaryLightIonReaction::
eventcounter++;
if(getenv("BLICDEBUG") ) G4cerr << " ######### Binary Light Ion Reaction number starts ######### "<<eventcounter<<G4endl;
G4ping debug("debug_G4BinaryLightIonReaction");
G4double a1=aTrack.GetDefinition()->GetBaryonNumber();
G4double z1=aTrack.GetDefinition()->GetPDGCharge();
G4double a2=targetNucleus.GetN();
G4double z2=targetNucleus.GetZ();
G4int a1=aTrack.GetDefinition()->GetBaryonNumber();
G4int z1=G4lrint(aTrack.GetDefinition()->GetPDGCharge());
G4int a2=targetNucleus.GetA_asInt();
G4int z2=targetNucleus.GetZ_asInt();
debug.push_back(a1);
debug.push_back(z1);
debug.push_back(a2);
@@ -69,29 +69,21 @@ G4HadFinalState *G4BinaryLightIonReaction::
G4bool swapped = false;
if(a2<a1)
{
debug.push_back("swapping....");
swapped = true;
G4double tmp(0);
G4int tmp(0);
tmp = a2; a2=a1; a1=tmp;
tmp = z2; z2=z1; z1=tmp;
G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z1),G4lrint(a1));
G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z1,a1);
G4LorentzVector it(m1, G4ThreeVector(0,0,0));
mom = toBreit*it;
}
debug.push_back("After swap");
debug.push_back(a1);
debug.push_back(z1);
debug.push_back(a2);
debug.push_back(z2);
debug.push_back(mom);
debug.dump();
G4ReactionProductVector * result = NULL;
G4ReactionProductVector * cascaders= new G4ReactionProductVector;
G4double m_nucl(0); // to check energy balance
// G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z1),G4lrint(a1));
// G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z1,a1);
// G4cout << "Entering the decision point "
// << (mom.t()-mom.mag())/a1 << " "
// << a1<<" "<< z1<<" "
@@ -106,17 +98,17 @@ G4HadFinalState *G4BinaryLightIonReaction::
G4Fragment aPreFrag;
aPreFrag.SetA(a1+a2);
aPreFrag.SetZ(z1+z2);
aPreFrag.SetNumberOfParticles(G4lrint(a1));
aPreFrag.SetNumberOfCharged(G4lrint(z1));
aPreFrag.SetNumberOfParticles(a1);
aPreFrag.SetNumberOfCharged(z1);
aPreFrag.SetNumberOfHoles(0);
G4ThreeVector plop(0.,0., mom.vect().mag());
G4double m2=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z2),G4lrint(a2));
G4double m2=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z2,a2);
m_nucl=m2;
G4LorentzVector aL(mom.t()+m2, plop);
aPreFrag.SetMomentum(aL);
G4ParticleDefinition * preFragDef;
preFragDef = G4ParticleTable::GetParticleTable()
->FindIon(G4lrint(z1+z2),G4lrint(a1+a2),0,G4lrint(z1+z2));
->FindIon(z1+z2,a1+a2,0,z1+z2);
aPreFrag.SetParticleDefinition(preFragDef);
// G4cout << "Fragment INFO "<< a1+a2 <<" "<<z1+z2<<" "
@@ -224,8 +216,8 @@ G4HadFinalState *G4BinaryLightIonReaction::
<< "," << aTrack.GetDefinition()->GetPDGCharge() << ") "
<< ", kinetic energy " << aTrack.GetKineticEnergy()
<< G4endl;
G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetN()
<< "," << targetNucleus.GetZ() << G4endl;
G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetA_asInt()
<< "," << targetNucleus.GetZ_asInt() << G4endl;
G4cerr << " if frequent, please submit above information as bug report"
<< G4endl << G4endl;
@@ -398,7 +390,7 @@ G4HadFinalState *G4BinaryLightIonReaction::
aProRes.SetZ(resZ);
aProRes.SetNumberOfParticles(0);
aProRes.SetNumberOfCharged(0);
aProRes.SetNumberOfHoles(G4lrint(a1)-resA);
aProRes.SetNumberOfHoles(a1-resA);
G4double mFragment=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(resZ,resA);
G4LorentzVector pFragment(0,0,0,mFragment+std::max(0.,theStatisticalExEnergy) );
aProRes.SetMomentum(pFragment);
@@ -419,8 +411,8 @@ G4HadFinalState *G4BinaryLightIonReaction::
<< "," << aTrack.GetDefinition()->GetPDGCharge() << ") "
<< ", kinetic energy " << aTrack.GetKineticEnergy()
<< G4endl;
G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetN()
<< "," << targetNucleus.GetZ() << G4endl;
G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetA_asInt()
<< "," << targetNucleus.GetZ_asInt() << G4endl;
G4cerr << " if frequent, please submit above information as bug report"
<< G4endl << G4endl;
@@ -23,177 +23,176 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4GeneratorPrecompoundInterface.cc,v 1.11 2010/11/10 17:04:35 gunter Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class file
//
// History: first implementation
// HPW, 10DEC 98, the decay part originally written by Gunter Folger
// in his FTF-test-program.
//
//
// -----------------------------------------------------------------------------
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4DynamicParticleVector.hh"
#include "G4IonTable.hh"
#include "G4KineticTrackVector.hh"
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include "G4V3DNucleus.hh"
#include "G4Nucleon.hh"
#include "G4FragmentVector.hh"
#include "G4ReactionProduct.hh"
#include "G4PreCompoundModel.hh"
#include "G4ExcitationHandler.hh"
//
// HPW, 10DEC 98, the decay part originally written by Gunter Folger in his FTF-test-program.
//
G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface()
: CaptureThreshold(80*MeV)
{}
G4HadFinalState* G4GeneratorPrecompoundInterface::
ApplyYourself(const G4HadProjectile &, G4Nucleus & )
{
std::cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."<< G4endl;
std::cout << "This class is only a mediator between generator and precompound"<<G4endl;
std::cout << "Please remove from your physics list."<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
return new G4HadFinalState;
}
G4ReactionProductVector* G4GeneratorPrecompoundInterface::
Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
{
G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundModel* p)
: CaptureThreshold(10*MeV)
{
proton = G4Proton::Proton();
neutron = G4Neutron::Neutron();
if(p) { SetDeExcitation(p); }
else { SetDeExcitation(new G4PreCompoundModel(new G4ExcitationHandler())); }
}
G4GeneratorPrecompoundInterface::~G4GeneratorPrecompoundInterface()
{}
G4ReactionProductVector* G4GeneratorPrecompoundInterface::
Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
{
G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
// decay the strong resonances
G4KineticTrackVector *result1, *secondaries, *result;
result1=theSecondaries;
result=new G4KineticTrackVector();
for (unsigned int aResult=0; aResult < result1->size(); aResult++)
{
G4ParticleDefinition * pdef;
pdef=result1->operator[](aResult)->GetDefinition();
secondaries=NULL;
if ( pdef->IsShortLived() )
{
// decay the strong resonances
G4KineticTrackVector *result1, *secondaries, *result;
result1=theSecondaries;
result=new G4KineticTrackVector();
//G4cout << "### G4GeneratorPrecompoundInterface::Propagate "
// << result1->size() << " tracks " << theDeExcitation << G4endl;
for (unsigned int aResult=0; aResult < result1->size(); ++aResult)
{
G4ParticleDefinition * pdef;
pdef=result1->operator[](aResult)->GetDefinition();
secondaries=0;
if ( pdef->IsShortLived() )
{
secondaries = result1->operator[](aResult)->Decay();
}
if ( secondaries == NULL )
{
}
if ( 0 == secondaries )
{
result->push_back(result1->operator[](aResult));
result1->operator[](aResult)=NULL; //protect for clearAndDestroy
}
else
{
for (unsigned int aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
{
result1->push_back(secondaries->operator[](aSecondary));
}
delete secondaries;
}
}
std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
delete result1;
}
else
{
unsigned int amax = secondaries->size();
for (unsigned int aSecondary=0; aSecondary<amax; ++aSecondary)
{
result1->push_back(secondaries->operator[](aSecondary));
}
delete secondaries;
}
}
//G4cout << "Delete tracks" << G4endl;
std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
delete result1;
// prepare the fragment
G4int anA=theNucleus->GetMassNumber();
G4int aZ=theNucleus->GetCharge();
G4int numberOfEx = 0;
G4int numberOfCh = 0;
G4int numberOfHoles = 0;
G4double exEnergy = 0.0;
G4double R = theNucleus->GetNuclearRadius();
G4ThreeVector exciton3Momentum(0.,0.,0.);
// loop over secondaries
unsigned int amax = result->size();
for(unsigned int list=0; list<amax; ++list)
{
G4KineticTrack *aTrack = result->operator[](list);
G4ParticleDefinition* part = aTrack->GetDefinition();
G4double e = aTrack->Get4Momentum().e();
G4double mass = aTrack->Get4Momentum().mag();
G4ThreeVector mom = aTrack->Get4Momentum().vect();
if((part != proton && part != neutron) ||
(e > mass + CaptureThreshold) ||
(aTrack->GetPosition().mag() > R))
{
G4ReactionProduct * theNew = new G4ReactionProduct(part);
theNew->SetMomentum(mom);
theNew->SetTotalEnergy(e);
theTotalResult->push_back(theNew);
}
else
{
// within the nucleus, neutron or proton
// now calculate A, Z of the fragment, momentum, number of exciton states
++anA;
++numberOfEx;
G4int Z = G4int(part->GetPDGCharge()/eplus + 0.1);
aZ += Z;
numberOfCh += Z;
exciton3Momentum += mom;
exEnergy += (e - mass);
}
}
// prepare the fragment
G4Fragment anInitialState;
G4int anA=theNucleus->GetMassNumber();
G4int aZ=theNucleus->GetCharge();
G4int numberOfEx = 0;
G4int numberOfCh = 0;
G4int numberOfHoles = 0;
G4double exEnergy = 0;
G4ThreeVector exciton3Momentum(0,0,0);
// loop over secondaries
for(unsigned int list=0; list < result->size(); list++)
{
G4KineticTrack *aTrack = result->operator[](list);
if(aTrack->GetDefinition() != G4Proton::Proton() &&
aTrack->GetDefinition() != G4Neutron::Neutron())
{
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
theNew->SetMomentum(aTrack->Get4Momentum().vect());
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
theTotalResult->push_back(theNew);
}
else if(aTrack->Get4Momentum().t() - aTrack->Get4Momentum().mag()>CaptureThreshold)
{
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
theNew->SetMomentum(aTrack->Get4Momentum().vect());
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
theTotalResult->push_back(theNew);
}
else if(aTrack->GetPosition().mag() > theNucleus->GetNuclearRadius())
{
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
theNew->SetMomentum(aTrack->Get4Momentum().vect());
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
theTotalResult->push_back(theNew);
}
else
{
// within the nucleus, neutron or proton
// now calculate A, Z of the fragment, momentum, number of exciton states
anA++;;
numberOfEx++;
aZ += G4int(aTrack->GetDefinition()->GetPDGCharge());
numberOfCh += G4int(aTrack->GetDefinition()->GetPDGCharge());
exciton3Momentum += aTrack->Get4Momentum().vect();
exEnergy += (aTrack->Get4Momentum().t()-aTrack->Get4Momentum().m());
}
}
// loop over wounded nucleus
G4Nucleon * theCurrentNucleon = theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : NULL;
while(theCurrentNucleon != NULL)
{
if(theCurrentNucleon->AreYouHit())
{
numberOfHoles++;
numberOfEx++;
anA--;
aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge());
exciton3Momentum -= theCurrentNucleon->Get4Momentum().vect();
exEnergy+=theCurrentNucleon->GetBindingEnergy();
}
theCurrentNucleon = theNucleus->GetNextNucleon();
}
// loop over wounded nucleus
G4Nucleon * theCurrentNucleon =
theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
while(0 != theCurrentNucleon)
{
if(theCurrentNucleon->AreYouHit())
{
++numberOfHoles;
++numberOfEx;
--anA;
aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/eplus + 0.1);
exciton3Momentum -= theCurrentNucleon->Get4Momentum().vect();
exEnergy += theCurrentNucleon->GetBindingEnergy();
}
theCurrentNucleon = theNucleus->GetNextNucleon();
}
if(!theDeExcitation)
{
// throw G4HadronicException(__FILE__, __LINE__, "Please register an evaporation phase with G4GeneratorPrecompoundInterface.");
}
else if(0!=anA && 0!=aZ)
{
G4double residualMass =
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(aZ ,anA);
residualMass += exEnergy;
if(0!=anA && 0!=aZ)
{
G4double fMass = G4NucleiProperties::GetNuclearMass(anA, aZ);
fMass += exEnergy;
G4LorentzVector exciton4Momentum(exciton3Momentum,
std::sqrt(exciton3Momentum.mag2()+residualMass*residualMass));
G4LorentzVector exciton4Momentum(exciton3Momentum,
std::sqrt(exciton3Momentum.mag2() + fMass*fMass));
anInitialState.SetA(anA);
anInitialState.SetZ(aZ);
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
anInitialState.SetNumberOfCharged(numberOfCh);
anInitialState.SetNumberOfHoles(numberOfHoles);
anInitialState.SetMomentum(exciton4Momentum);
// anInitialState.SetExcitationEnergy(exEnergy); // now a redundant call.
G4Fragment anInitialState(anA, aZ, exciton4Momentum);
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
anInitialState.SetNumberOfCharged(numberOfCh);
anInitialState.SetNumberOfHoles(numberOfHoles);
G4ReactionProductVector * aPreResult = theDeExcitation->DeExcite(anInitialState);
// call pre-compound
const G4Fragment aFragment(anInitialState);
G4ReactionProductVector * aPreResult = theDeExcitation->DeExcite(aFragment);
// fill pre-compound part into the result, and return
for(unsigned int ll=0; ll<aPreResult->size(); ll++)
{
theTotalResult->push_back(aPreResult->operator[](ll));
}
// fill pre-compound part into the result, and return
unsigned int amax = aPreResult->size();
for(unsigned int ll=0; ll<amax; ++ll)
{
theTotalResult->push_back(aPreResult->operator[](ll));
}
delete aPreResult;
}
else
{
// throw G4HadronicException(__FILE__, __LINE__, "Please register an evaporation phase with G4GeneratorPrecompoundInterface.");
}
// now return
}
std::for_each(result->begin(), result->end(), DeleteKineticTrack());
delete result;
return theTotalResult;
}
G4double G4GeneratorPrecompoundInterface::SetCaptureThreshold(G4double value)
{
G4double old=CaptureThreshold;
CaptureThreshold=value;
return old;
std::for_each(result->begin(), result->end(), DeleteKineticTrack());
delete result;
return theTotalResult;
}
G4HadFinalState* G4GeneratorPrecompoundInterface::
ApplyYourself(const G4HadProjectile &, G4Nucleus & )
{
G4cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
<< G4endl;
G4cout << "This class is only a mediator between generator and precompound"<<G4endl;
G4cout << "Please remove from your physics list."<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
return new G4HadFinalState;
}
@@ -82,9 +82,9 @@ G4double G4KaonMinusField::GetField(const G4ThreeVector & aPosition)
G4double kaonMass = G4KaonMinus::KaonMinus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
@@ -96,8 +96,8 @@ G4double G4KaonMinusField::GetField(const G4ThreeVector & aPosition)
G4double G4KaonMinusField::GetBarrier()
{
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
return -coulombBarrier;
}
@@ -82,9 +82,9 @@ G4double G4KaonPlusField::GetField(const G4ThreeVector & aPosition)
G4double kaonMass = G4KaonPlus::KaonPlus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
@@ -95,8 +95,8 @@ G4double G4KaonPlusField::GetField(const G4ThreeVector & aPosition)
G4double G4KaonPlusField::GetBarrier()
{
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
return coulombBarrier;
}
@@ -82,9 +82,9 @@ G4double G4KaonZeroField::GetField(const G4ThreeVector & aPosition)
G4double kaonMass = G4KaonZero::KaonZero()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
@@ -79,8 +79,8 @@ G4double G4PionMinusField::GetField(const G4ThreeVector & aPosition)
// Field is 0 out of the nucleus!
if(aPosition.mag() >= radius) return 0.0;
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double pionMinusMass = G4PionMinus::PionMinus()->GetPDGMass();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
@@ -95,8 +95,8 @@ G4double G4PionMinusField::GetField(const G4ThreeVector & aPosition)
G4double G4PionMinusField::GetBarrier()
{
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
return -coulombBarrier;
}
@@ -82,9 +82,9 @@ G4double G4PionPlusField::GetField(const G4ThreeVector & aPosition)
G4double pionPlusMass = G4PionPlus::PionPlus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = pionPlusMass*nucleusMass/(pionPlusMass+nucleusMass);
@@ -97,8 +97,8 @@ G4double G4PionPlusField::GetField(const G4ThreeVector & aPosition)
G4double G4PionPlusField::GetBarrier()
{
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
return coulombBarrier;
}
@@ -81,10 +81,10 @@ G4double G4PionZeroField::GetField(const G4ThreeVector & aPosition)
if(aPosition.mag() >= radius) return 0.0;
G4double pionZeroMass = G4PionZero::PionZero()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = pionZeroMass*nucleusMass/(pionZeroMass+nucleusMass);
@@ -81,9 +81,9 @@ G4double G4SigmaMinusField::GetField(const G4ThreeVector & aPosition)
G4double sigmaMinusMass = G4SigmaMinus::SigmaMinus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = sigmaMinusMass*nucleusMass/(sigmaMinusMass+nucleusMass);
@@ -82,9 +82,9 @@ G4double G4SigmaPlusField::GetField(const G4ThreeVector & aPosition)
G4double sigmaPlusMass = G4SigmaPlus::SigmaPlus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = sigmaPlusMass*nucleusMass/(sigmaPlusMass+nucleusMass);
@@ -82,9 +82,9 @@ G4double G4SigmaZeroField::GetField(const G4ThreeVector & aPosition)
G4double sigmaZeroMass = G4SigmaZero::SigmaZero()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
G4int A = theNucleus->GetMassNumber();
G4int Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = sigmaZeroMass*nucleusMass/(sigmaZeroMass+nucleusMass);