Import Geant4 11.4.1 source tree

This commit is contained in:
Gabriele Cosmo
2026-03-19 16:51:22 +01:00
parent b4a16de652
commit 41f2dd7996
352 changed files with 26342 additions and 24532 deletions
@@ -6,9 +6,16 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2026-02-04 Gabriele Cosmo (had-binary-V11-03-00)
- Fixed reported Coverity defects to avoid parameter string copy in
G4BinaryCascade.
## 2025-12-23 Vladimir Ivantchenko
- G4GeneratorPrecompoundInterface - added G4HadronicException header.
## 2024-08-19 Gabriele Cosmo (had-binary-V11-02-01)
- Fixed reported Coverity defects for use of std::move() in G4BinaryCascade.
Minor code optimisation (use of nullptr, use of const iterators and pre-increment)
Minor code optimisation (use of nullptr, use of const iterators and pre-increment).
## 2024-05-22 Gunter Folger (had-binary-V11-02-00)
- Address problem reported by Atlas of throwing execption if momentum cannot
@@ -39,8 +39,8 @@
//
// -----------------------------------------------------------------------------
#ifndef G4BinaryCascade_hh
#define G4BinaryCascade_hh
#ifndef G4BINARYCASCADE_HH
#define G4BINARYCASCADE_HH
#include "G4VIntraNuclearTransportModel.hh"
#include "G4ReactionProductVector.hh"
@@ -172,8 +172,8 @@ private:
G4ReactionProductVector * ProductsAddFakeGamma(G4ReactionProductVector * products );
void PrintKTVector(G4KineticTrackVector * ktv, std::string comment=std::string(""));
void PrintKTVector(G4KineticTrack* kt, std::string comment=std::string(""));
void PrintKTVector(G4KineticTrackVector * ktv, const G4String& comment=G4String(""));
void PrintKTVector(G4KineticTrack* kt, const G4String& comment=G4String(""));
void DebugApplyCollisionFail(G4CollisionInitialState * collision,
G4KineticTrackVector * products);
void DebugApplyCollision(G4CollisionInitialState * collision,
@@ -2785,7 +2785,7 @@ void G4BinaryCascade::ClearAndDestroy(G4ReactionProductVector * rpv)
}
//----------------------------------------------------------------------------
void G4BinaryCascade::PrintKTVector(G4KineticTrackVector * ktv, std::string comment)
void G4BinaryCascade::PrintKTVector(G4KineticTrackVector * ktv, const G4String& comment)
//----------------------------------------------------------------------------
{
if (comment.size() > 0 ) G4cout << "G4BinaryCascade::PrintKTVector() " << comment << G4endl;
@@ -2806,7 +2806,7 @@ void G4BinaryCascade::PrintKTVector(G4KineticTrackVector * ktv, std::string comm
}
}
//----------------------------------------------------------------------------
void G4BinaryCascade::PrintKTVector(G4KineticTrack * kt, std::string comment)
void G4BinaryCascade::PrintKTVector(G4KineticTrack * kt, const G4String& comment)
//----------------------------------------------------------------------------
{
if (comment.size() > 0 ) G4cout << "G4BinaryCascade::PrintKTVector() "<< comment << G4endl;
@@ -92,6 +92,7 @@
#include "G4PhysicsModelCatalog.hh"
#include "G4HyperNucleiProperties.hh"
//---------------------------------------------------------------------
#include "G4HadronicException.hh"
#include "Randomize.hh"
#include "G4Log.hh"
@@ -6,6 +6,11 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-12-16 Gabriele Cosmo (hadr-casc-V11-03-02)
- Directly use std::cbrt(double) in G4InuclSpecialFunctions, as now standard
and available in <cmath>, replacing old ad-hoc implementation.
Minor code formatting.
## 2025-11-26 Vladimir ivanchenko (hadr-casc-V11-03-01)
- G4BigBanger - fixed typo in the computation of probability, which is
identified by the new compiler and should not change any result.
@@ -23,21 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4InuclSpecialFunctions namespace
//
// 20100114 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
// 20100319 M. Kelsey -- Add optional mass argument to generateWithFixedTheta;
// define new generateWithRandomAngles, encapsulating code; define
// cbrt() cube-root function (in math.h, but not in <math>!)
// 20100412 M. Kelsey -- Modify paraMaker[Truncated] to take buffer as argument
// 20100914 M. Kelsey -- Migrate to integer A and Z. Discard unused binding
// energy functions
// 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings.
// 20130308 M. Kelsey -- New function to encapsulate INUCL power expansion
// 20130808 M. Kelsey -- Convert paraMaker[Truncated] to class object, to
// allow thread isolation
// 20130829 M. Kelsey -- Address Coverity #52158, 52161 for copy actions.
// 20150619 M. Kelsey -- Overload G4cbrt for case of integer arguments
// Original Author: Aatos Heikkinen, 2002
// --------------------------------------------------------------------
#ifndef G4INUCL_SPECIAL_FUNC_HH
#define G4INUCL_SPECIAL_FUNC_HH
@@ -48,8 +37,8 @@
template <int N> class G4CascadeInterpolator;
namespace G4InuclSpecialFunctions {
namespace G4InuclSpecialFunctions
{
G4double bindingEnergy(G4int A, G4int Z);
// NOTE: Used only by G4Fissioner
@@ -63,7 +52,7 @@ namespace G4InuclSpecialFunctions {
G4double csPN(G4double e);
G4double G4cbrt(G4double x); // Can't use "cbrt" name, clashes with <math.h>
G4double G4cbrt(G4double x); // Use std::cbrt from <cmath>
G4double G4cbrt(G4int n); // Use G4Pow::powN() here for speedup
G4double randomInuclPowers(G4double ekin, // Power series in Ekin, S
@@ -84,24 +73,26 @@ namespace G4InuclSpecialFunctions {
G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.);
// This is an object to be instantiated by client code
class paraMaker {
public:
paraMaker(G4int verbose=0);
~paraMaker();
class paraMaker
{
public:
// NOTE: Passing Z as double here, to be used as interpolation argument
void getParams(G4double Z, std::pair<std::vector<G4double>,
std::vector<G4double> >& parms);
paraMaker(G4int verbose=0);
~paraMaker();
void getTruncated(G4double Z, std::pair<G4double, G4double>& parms);
paraMaker(const paraMaker& right) = delete;
paraMaker& operator=(const paraMaker& right) = delete;
private:
G4int verboseLevel;
G4CascadeInterpolator<5>* interp;
// NOTE: Passing Z as double here, to be used as interpolation argument
void getParams(G4double Z, std::pair<std::vector<G4double>,
std::vector<G4double> >& parms);
// No copy actions
paraMaker(const paraMaker& right);
paraMaker& operator=(const paraMaker& right);
void getTruncated(G4double Z, std::pair<G4double, G4double>& parms);
private:
G4int verboseLevel;
G4CascadeInterpolator<5>* interp;
};
}
@@ -23,17 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4InuclSpecialFunctions namespace implementation
//
// 20100114 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
// 20100914 M. Kelsey -- Migrate to integer A and Z. Discard pointless
// verbosity.
// 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings.
// 20130308 M. Kelsey -- New function to compute INUCL-style random value
// 20130314 M. Kelsey -- Restore null initializer and if-block for _TLS_.
// 20130924 M. Kelsey -- Use G4Log, G4Exp, G4Pow for CPU speedup
// 20150619 M. Kelsey -- Define G4cbrt(int) to use G4Pow::Z13, rearrange
// FermiEnergy() to use G4Pow::Z23.
// 20150622 M. Kelsey -- Use G4AutoDelete for _TLS_ buffers.
// Original Author: Aatos Heikkinen, 2002
// --------------------------------------------------------------------
#include <cmath>
@@ -52,7 +45,8 @@
G4double
G4InuclSpecialFunctions::randomInuclPowers(G4double ekin,
const G4double (&coeff)[4][4]) {
const G4double (&coeff)[4][4])
{
G4Pow* theG4Pow = G4Pow::GetInstance();
G4double S = G4UniformRand(); // Random fraction for expansion
@@ -75,11 +69,13 @@ G4InuclSpecialFunctions::randomInuclPowers(G4double ekin,
G4double G4InuclSpecialFunctions::getAL(G4int A) {
G4double G4InuclSpecialFunctions::getAL(G4int A)
{
return 0.76 + 2.2 / G4cbrt(A);
}
G4double G4InuclSpecialFunctions::csNN(G4double e) {
G4double G4InuclSpecialFunctions::csNN(G4double e)
{
G4double snn;
if (e < 40.0) {
@@ -91,7 +87,8 @@ G4double G4InuclSpecialFunctions::csNN(G4double e) {
return snn;
}
G4double G4InuclSpecialFunctions::csPN(G4double e) {
G4double G4InuclSpecialFunctions::csPN(G4double e)
{
G4double spn;
if (e < 40.0) {
@@ -105,7 +102,8 @@ G4double G4InuclSpecialFunctions::csPN(G4double e) {
// calculates the nuclei Fermi energy for 0 - neutron and 1 - proton
G4double G4InuclSpecialFunctions::FermiEnergy(G4int A, G4int Z, G4int ntype) {
G4double G4InuclSpecialFunctions::FermiEnergy(G4int A, G4int Z, G4int ntype)
{
G4Pow* g4pow = G4Pow::GetInstance();
const G4double C = 55.4 / g4pow->Z23(A);
G4double arg = (ntype==0) ? g4pow->Z23(A-Z) : g4pow->Z23(Z);
@@ -113,16 +111,18 @@ G4double G4InuclSpecialFunctions::FermiEnergy(G4int A, G4int Z, G4int ntype) {
return C * arg;
}
G4double G4InuclSpecialFunctions::G4cbrt(G4double x) {
return x==0 ? 0. : (x<0?-1.:1.)*G4Exp(G4Log(std::fabs(x))/3.);
G4double G4InuclSpecialFunctions::G4cbrt(G4double x)
{
return std::cbrt(x);
}
G4double G4InuclSpecialFunctions::G4cbrt(G4int n) {
G4double G4InuclSpecialFunctions::G4cbrt(G4int n)
{
return n==0 ? 0. : (n<0?-1.:1.)*G4Pow::GetInstance()->Z13(std::abs(n));
}
G4double G4InuclSpecialFunctions::randomGauss(G4double sigma) {
G4double G4InuclSpecialFunctions::randomGauss(G4double sigma)
{
const G4double eps = 1.0e-6;
G4double r1 = G4UniformRand();
r1 = r1 > eps ? r1 : eps;
@@ -133,11 +133,13 @@ G4double G4InuclSpecialFunctions::randomGauss(G4double sigma) {
return sigma * std::sin(twopi * r1) * std::sqrt(-2.0 * G4Log(r2));
}
G4double G4InuclSpecialFunctions::randomPHI() {
G4double G4InuclSpecialFunctions::randomPHI()
{
return twopi*G4UniformRand();
}
std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN() {
std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN()
{
G4double CT = 1.0 - 2.0*G4UniformRand();
return std::pair<G4double, G4double>(CT, std::sqrt(1.0 - CT*CT));
@@ -145,7 +147,8 @@ std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN() {
G4LorentzVector
G4InuclSpecialFunctions::generateWithFixedTheta(G4double ct, G4double p,
G4double mass) {
G4double mass)
{
G4double phi = randomPHI();
G4double pt = p * std::sqrt(std::fabs(1.0 - ct * ct));
@@ -171,7 +174,8 @@ G4InuclSpecialFunctions::generateWithFixedTheta(G4double ct, G4double p,
}
G4LorentzVector
G4InuclSpecialFunctions::generateWithRandomAngles(G4double p, G4double mass) {
G4InuclSpecialFunctions::generateWithRandomAngles(G4double p, G4double mass)
{
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
G4double phi = randomPHI();
G4double pt = p * COS_SIN.second;
@@ -6,6 +6,12 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2026-01-05 Vladimir Ivanchenko (hadr-cohe-V11-03-06)
- G4ChargeExchange - fixed bug in sampling of scattering angle for kaons
## 2025-12-17 Vladimir Ivanchenko
- G4ChargeExchange, G4HadronElastic, G4LMsdGenerator - minor optimisation
## 2025-11-25 Vladimir Ivanchenko (hadr-cohe-V11-03-05)
- G4NuclNuclDiffuseElastic, G4DiffuseElastic, G4AntiNuclElastic - fixed
compilation warnings.
@@ -83,7 +83,6 @@ G4ChargeExchange::~G4ChargeExchange()
G4HadFinalState* G4ChargeExchange::ApplyYourself(
const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
{
theParticleChange.Clear();
auto part = aTrack.GetDefinition();
G4double ekin = aTrack.GetKineticEnergy();
@@ -303,8 +302,8 @@ G4double G4ChargeExchange::SampleT(const G4ParticleDefinition*,
}
G4double q1 = 1.0 - G4Exp(-std::min(bb*tmax, numLimit));
G4double q2 = 1.0 - G4Exp(-std::min(dd*tmax, numLimit));
G4double s1 = q1*aa;
G4double s2 = q2*cc;
G4double s1 = q1*aa/bb;
G4double s2 = q2*cc/dd;
if ((s1 + s2)*G4UniformRand() < s2) {
q1 = q2;
bb = dd;
@@ -66,7 +66,6 @@ G4HadronElastic::G4HadronElastic(const G4String& name)
G4HadronElastic::~G4HadronElastic()
{}
void G4HadronElastic::ModelDescription(std::ostream& outFile) const
{
outFile << "G4HadronElastic is the base class for all hadron-nucleus\n"
@@ -81,8 +80,6 @@ void G4HadronElastic::ModelDescription(std::ostream& outFile) const
G4HadFinalState* G4HadronElastic::ApplyYourself(
const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
{
theParticleChange.Clear();
const G4HadProjectile* aParticle = &aTrack;
G4double ekin = aParticle->GetKineticEnergy();
@@ -49,14 +49,10 @@ G4LMsdGenerator::G4LMsdGenerator(const G4String& name)
{
fPDGencoding = 0;
secID = G4PhysicsModelCatalog::GetModelID( "model_LMsdGenerator" );
// theParticleChange = new G4HadFinalState;
}
G4LMsdGenerator::~G4LMsdGenerator()
{
// delete theParticleChange;
}
{}
void G4LMsdGenerator::ModelDescription(std::ostream& outFile) const
{
@@ -114,8 +110,6 @@ G4HadFinalState*
G4LMsdGenerator::ApplyYourself( const G4HadProjectile& aTrack,
G4Nucleus& targetNucleus )
{
theParticleChange.Clear();
const G4HadProjectile* aParticle = &aTrack;
G4double eTkin = aParticle->GetKineticEnergy();
@@ -6,6 +6,11 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2026-02-18 Gabriele Cosmo (hadr-fission-V11-03-00)
- Fixed reported Coverity defects in G4fissioner for avoiding unnecessary
copy of strings.
- Fixed layout of G4fissionEvent class.
## 2024-08-21 Gabriele Cosmo (hadr-fission-V11-02-01)
- Fixed reported Coverity defects for use of std::move().
@@ -53,40 +53,16 @@
// UCRL-CODE-224807
//
//
#ifndef G4fissionEvent_hh
#define G4fissionEvent_hh
#ifndef G4FISSIONEVENT_HH
#define G4FISSIONEVENT_HH
#include "globals.hh"
#include <string>
class G4fissionEvent {
private:
G4int neutronNu; // number of neutrons in this fission event
G4double* neutronEnergies;
G4double* neutronVelocities;
G4double* neutronDircosu;
G4double* neutronDircosv;
G4double* neutronDircosw;
G4double* neutronAges;
G4int photonNu; // number of photons in this fission event
G4double* photonEnergies;
G4double* photonVelocities;
G4double* photonDircosu;
G4double* photonDircosv;
G4double* photonDircosw;
G4double* photonAges;
// options
static G4int delayoption;
static G4int correlationoption;
static G4int nudistoption;
static G4int Cf252ndistoption;
static G4int Cf252nengoption;
static G4double (*rngdptr)(void);
static float (*rngfptr)(void);
class G4fissionEvent
{
public:
// These are all the methods of this class accessible to the caller of the object
G4fissionEvent(G4int isotope, G4double time, G4double nubar, G4double eng);
~G4fissionEvent();
@@ -167,6 +143,32 @@ class G4fissionEvent {
private:
G4int neutronNu; // number of neutrons in this fission event
G4double* neutronEnergies;
G4double* neutronVelocities;
G4double* neutronDircosu;
G4double* neutronDircosv;
G4double* neutronDircosw;
G4double* neutronAges;
G4int photonNu; // number of photons in this fission event
G4double* photonEnergies;
G4double* photonVelocities;
G4double* photonDircosu;
G4double* photonDircosv;
G4double* photonDircosw;
G4double* photonAges;
// options
static G4int delayoption;
static G4int correlationoption;
static G4int nudistoption;
static G4int Cf252ndistoption;
static G4int Cf252nengoption;
static G4double (*rngdptr)(void);
static G4float (*rngfptr)(void);
G4int G4SmpNuDistDataU232_234_236_238(G4double nubar);
G4int G4SmpNuDistDataU232_234_236_238_MC(G4double nubar);
G4int G4SmpNuDistDataU233_235(G4double nubar);
@@ -187,7 +189,7 @@ class G4fissionEvent {
G4int G4SmpSpNugDistData(G4int isotope);
G4double G4SmpTerrell(G4double nubar);
G4double G4SmpWatt(G4double ePart, G4int iso);
void G4fissionerr(G4int iSever, std::string chSubNam, std::string chMsg);
void G4fissionerr(G4int iSever, const G4String& chSubNam, const G4String& chMsg);
static G4double fisslibrng(void);
static G4double rngf2d(void);
};
@@ -178,7 +178,8 @@ G4fissionEvent::G4fissionEvent(G4int isotope, G4double time,
}
}
G4fissionEvent::~G4fissionEvent() {
G4fissionEvent::~G4fissionEvent()
{
if (neutronNu > 0) {
delete [] neutronEnergies;
delete [] neutronVelocities;
@@ -61,7 +61,7 @@
std::string itoa(const G4int& x);
void G4fissionEvent::G4fissionerr(G4int iSever, std::string chSubNam, std::string chMsg)
void G4fissionEvent::G4fissionerr(G4int iSever, const G4String& chSubNam, const G4String& chMsg)
/*
Description
@@ -80,7 +80,7 @@ void G4fissionEvent::G4fissionerr(G4int iSever, std::string chSubNam, std::strin
{
G4int doExit;
std::string ExitMsg;
G4String ExitMsg;
if (iSever <= 5) { /* warning */
@@ -92,7 +92,7 @@ void G4fissionEvent::G4fissionerr(G4int iSever, std::string chSubNam, std::strin
ExitMsg = "Error in Function "+chSubNam+", Severity=" + itoa(iSever) + " : "+chMsg;
std::cerr << "Fission " << ExitMsg << std::endl;
G4cerr << "Fission " << ExitMsg << G4endl;
if (doExit == 1) G4Exception("G4fissionEvent::G4fissionerr()", "601",
FatalException, "Fatal Error");
@@ -6,6 +6,18 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2026-02-20 Alberto Ribon (hadr-inclxx-V11-03-04)
Two independent bug-fixes provided by Jean-Christophe David and Jason Hirtz :
- G4INCLNNToNSK2piChannel.cc : replaced "if(iso==-2)" with "else if(iso==-2)".
(The problem was reported by Julia Yarba).
- G4INCLCrossSectionsAntiparticles.cc : correct wrong formulae with isospins
concerning the cross sections N Nbar -> N Nbar + 2 pions.
The fix consists in exchanging the lines number 509 and 513.
## 2025-12-09 Gabriele Cosmo
- Fixed reported Coverity defects for use of std::move() in G4INCLCascade.cc
and G4INCLNbarAtrestEntryChannel.cc. Use G4 types consistently.
## 2025-11-06 Gabriele Cosmo (hadr-inclxx-V11-03-03)
- Fixed compilation warning for implicit type conversion on macOS/XCode
in G4INCLAntinucleiAtrestEntryChannel::getAnnihilationPosition().
@@ -219,7 +219,7 @@ namespace G4INCL {
//G4double AnnihilationBarrier = kineticEnergy;
if((projectileSpecies.theType == antiProton && kineticEnergy <= theConfig->getAtrestThreshold()) || (projectileSpecies.theType == antiNeutron && kineticEnergy <= theConfig->getnbAtrestThreshold())){
double SpOverSn;
G4double SpOverSn;
if(projectileSpecies.theType == antiProton)
SpOverSn = 1.331;//from experiments with deuteron (E.Klempt)
else if(projectileSpecies.theType == antiNeutron)
@@ -258,16 +258,16 @@ namespace G4INCL {
if(Z > 30)
isModelA=false;
else if(Z > 9 && Z <=30){ //Maybe change and add another dependance than Z
double rndmA = Random::shoot();
G4double rndmA = Random::shoot();
if(rndmA > 0.5)//Random threshold : should be improved to take into account the orbit in which the separation takes place.
isModelA=false;
}
if(isModelA){
//Antideuteron Model A case : 2 annihilation at the same time
double pbarSpOverSn = 1.331;
double nbarSpOverSn = 1./1.331;
double pbarneutronprob;
double nbarneutronprob;
G4double pbarSpOverSn = 1.331;
G4double nbarSpOverSn = 1./1.331;
G4double pbarneutronprob;
G4double nbarneutronprob;
if(theConfig->isNaturalTarget()){
theA = ParticleTable::drawRandomNaturalIsotope(Z) - 2;
nbarneutronprob = (theA + 2 - Z)/(theA + 2 - Z + nbarSpOverSn*Z);
@@ -299,8 +299,8 @@ namespace G4INCL {
}
}
} else if (!isModelA){//Model B : Antiproton is detached from antideuteron
double SpOverSn = 1.331;
double neutronprob;
G4double SpOverSn = 1.331;
G4double neutronprob;
if(theConfig->isNaturalTarget()){
theA = ParticleTable::drawRandomNaturalIsotope(Z) - 1;
neutronprob = (theA + 1 - Z)/(theA + 1 - Z + SpOverSn*Z);
@@ -312,7 +312,7 @@ namespace G4INCL {
theS = S;
double rndm = Random::shoot();
G4double rndm = Random::shoot();
if(rndm >= neutronprob){ //proton is annihilated
theEventInfo.annihilationP = true;
theZ = Z - 1;
@@ -649,7 +649,7 @@ namespace G4INCL {
G4double SpOverSn = 1./1.331; //from experiments with deuteron (E.Klempt)
ThreeVector dummy(0.,0.,0.);
double rndm = Random::shoot()*(SpOverSn+1);
G4double rndm = Random::shoot()*(SpOverSn+1);
if (rndm <= SpOverSn) { //proton is annihilated
theEventInfo.annihilationP = true;
Particle *p2 = new Particle(Neutron, dummy, dummy);
@@ -690,27 +690,27 @@ namespace G4INCL {
INCL_DEBUG("Reading nbarp kaonic final states" << dataPathnbarpk << '\n');
#endif
//read probabilities and particle types from file
std::vector<double> probabilities; //will store each FS yield
std::vector<G4double> probabilities; //will store each FS yield
std::vector<std::vector<G4String>> particle_types; //will store particle names
double sum = 0.0; //will contain a sum of probabilities of all FS in the file
double kaonicFSprob=0.05; //probability to kave kaonic FS
G4double sum = 0.0; //will contain a sum of probabilities of all FS in the file
G4double kaonicFSprob=0.05; //probability to kave kaonic FS
ParticleList starlist;
ThreeVector mommy; //momentum to be assigned later
double rdm = Random::shoot();
G4double rdm = Random::shoot();
ThreeVector annihilationPosition(0.,0.,0.);
if (rdm < (1.-kaonicFSprob)) { // pionic FS was chosen
INCL_DEBUG("pionic nn final state chosen" << '\n');
if (targetA==1 || (targetA==2 && theEventInfo.annihilationP))
{sum = read_file(dataPathnbarp, probabilities, particle_types);}
{sum = read_file(std::move(dataPathnbarp), probabilities, particle_types);}
else
{sum = read_file(dataPathnbarn, probabilities, particle_types);}
{sum = read_file(std::move(dataPathnbarn), probabilities, particle_types);}
rdm = (rdm/(1.-kaonicFSprob))*sum; //99.88 normalize by the sum of probabilities in the file
//now get the line number in the file where the FS particles are stored:
G4int n = findStringNumber(rdm, probabilities)-1;
G4int n = findStringNumber(rdm, std::move(probabilities))-1;
if ( n < 0 ) return theEventInfo;
for (G4int j = 0; j < static_cast<int>(particle_types[n].size()); j++) {
for (G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++) {
if (particle_types[n][j] == "pi0") {
Particle *p = new Particle(PiZero, mommy, annihilationPosition);
starlist.push_back(p);
@@ -743,7 +743,7 @@ namespace G4INCL {
starlist.push_back(pp);
} else {
INCL_ERROR("Some non-existing FS particle detected when reading pbar FS files");
for (int jj = 0; jj < static_cast<int>(particle_types[n].size()); jj++) {
for (G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++) {
#ifdef INCLXX_IN_GEANT4_MODE
G4cout << "gotcha! " << particle_types[n][jj] << G4endl;
#else
@@ -760,14 +760,14 @@ namespace G4INCL {
} else {
INCL_DEBUG("kaonic pp final state chosen" << '\n');
if (targetA==1 || (targetA==2 && theEventInfo.annihilationP))
{sum = read_file(dataPathnbarpk, probabilities, particle_types);}
{sum = read_file(std::move(dataPathnbarpk), probabilities, particle_types);}
else
{sum = read_file(dataPathnbarnk, probabilities, particle_types);}
{sum = read_file(std::move(dataPathnbarnk), probabilities, particle_types);}
rdm = ((1.-rdm)/kaonicFSprob)*sum; //2670 normalize by the sum of probabilities in the file
//now get the line number in the file where the FS particles are stored:
G4int n = findStringNumber(rdm, probabilities)-1;
G4int n = findStringNumber(rdm, std::move(probabilities))-1;
if ( n < 0 ) return theEventInfo;
for (G4int j = 0; j < static_cast<int>(particle_types[n].size()); j++) {
for (G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++) {
if (particle_types[n][j] == "pi0") {
Particle *p = new Particle(PiZero, mommy, annihilationPosition);
starlist.push_back(p);
@@ -797,7 +797,7 @@ namespace G4INCL {
starlist.push_back(p);
} else {
INCL_ERROR("Some non-existing FS particle detected when reading pbar FS files");
for (int jj = 0; jj < static_cast<int>(particle_types[n].size()); jj++) {
for (G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++) {
#ifdef INCLXX_IN_GEANT4_MODE
G4cout << "gotcha! " << particle_types[n][jj] << G4endl;
#else
@@ -506,11 +506,11 @@ namespace G4INCL {
const G4double pLab = 0.001*KinematicsUtils::momentumInLab(antinucleon, nucleon); // GeV
if(iso == 2 || iso == -2){ // pnbar or npbar
sigma = KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(std::move(BFMM167), pLab) + KinematicsUtils::compute_xs(std::move(BFMM198), pLab);
sigma = KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(std::move(BFMM492), pLab) + KinematicsUtils::compute_xs(std::move(BFMM494), pLab);
return sigma;
}
else{ // ppbar or nnbar
sigma = KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(std::move(BFMM492), pLab) + KinematicsUtils::compute_xs(std::move(BFMM494), pLab);
sigma = KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(BFMM490, pLab) + KinematicsUtils::compute_xs(std::move(BFMM167), pLab) + KinematicsUtils::compute_xs(std::move(BFMM198), pLab);
return sigma;
}
}
@@ -97,7 +97,7 @@ namespace G4INCL{
while (iss >>type){
types.push_back(type);
}
particle_types.push_back(types);
particle_types.push_back(std::move(types));
}
}
else std::cout << "ERROR no fread_file " << filename << std::endl;
@@ -306,10 +306,10 @@ namespace G4INCL{
INCL_DEBUG("Proton is the victim" << '\n');
if(rdm < (1.-kaonicFSprob)){ // pionic FS was chosen
INCL_DEBUG("pionic pp final state chosen" << '\n');
sum = read_file(dataPathnbarp, probabilities, particle_types);
sum = read_file(std::move(dataPathnbarp), probabilities, particle_types);
rdm = (rdm/(1.-kaonicFSprob))*sum; //99.88 normalize by the sum of probabilities in the file
//now get the line number in the file where the FS particles are stored:
G4int n = findStringNumber(rdm, probabilities)-1;
G4int n = findStringNumber(rdm, std::move(probabilities))-1;
if ( n < 0 ) return starlist;
for(G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
if(particle_types[n][j] == "pi0"){
@@ -361,10 +361,10 @@ namespace G4INCL{
}
else{
INCL_DEBUG("kaonic pp final state chosen" << '\n');
sum = read_file(dataPathnbarpk, probabilities, particle_types);
sum = read_file(std::move(dataPathnbarpk), probabilities, particle_types);
rdm = ((1-rdm)/kaonicFSprob)*sum;//2670 normalize by the sum of probabilities in the file
//now get the line number in the file where the FS particles are stored:
G4int n = findStringNumber(rdm, probabilities)-1;
G4int n = findStringNumber(rdm, std::move(probabilities))-1;
if ( n < 0 ) return starlist;
for(G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
if(particle_types[n][j] == "pi0"){
@@ -417,10 +417,10 @@ namespace G4INCL{
INCL_DEBUG("Neutron is the victim" << '\n');
if(rdm < (1.-kaonicFSprob)){ // pionic/kaonic choice
INCL_DEBUG("pionic np final state chosen" << '\n');
sum = read_file(dataPathnbarn, probabilities, particle_types);
sum = read_file(std::move(dataPathnbarn), probabilities, particle_types);
rdm = (rdm/(1.-kaonicFSprob))*sum; //99.95 normalize by the sum of probabilities in the file
//now get the line number in the file where the FS particles are stored:
G4int n = findStringNumber(rdm, probabilities)-1;
G4int n = findStringNumber(rdm, std::move(probabilities))-1;
if ( n < 0 ) return starlist;
for(G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
if(particle_types[n][j] == "pi0"){
@@ -472,10 +472,10 @@ namespace G4INCL{
}
else{
INCL_DEBUG("kaonic np final state chosen" << '\n');
sum = read_file(dataPathnbarnk, probabilities, particle_types);
sum = read_file(std::move(dataPathnbarnk), probabilities, particle_types);
rdm = ((1-rdm)/kaonicFSprob)*sum;//3837 normalize by the sum of probabilities in the file
//now get the line number in the file where the FS particles are stored:
G4int n = findStringNumber(rdm, probabilities)-1;
G4int n = findStringNumber(rdm, std::move(probabilities))-1;
if ( n < 0 ) return starlist;
for(G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
if(particle_types[n][j] == "pi0"){
@@ -679,4 +679,4 @@ namespace G4INCL{
fs->setTotalEnergyBeforeInteraction(energyBefore);
}
}
}
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2026-02-18 Gabriele Cosmo (hadr-nudex-V11-03-01)
- Fixed reported Coverity defects in G4NuDEXPSF for avoiding unnecessary
copy of strings.
## 2025-03-04 Ben Morgan (hadr-nudex-V11-03-00)
- Address maybe-unitialized warnings when building/linking with LTO
- Identified by ATLAS.
@@ -243,11 +243,12 @@ G4bool G4NuDEXPSF::TakePSFFromIAEA01(const char* fname){
PSFType_E1[nR_E1]=11;
nR_E1++;
in>>dum;
if(std::string(dum)==std::string("beta=")){
G4String s_dum(dum);
if(s_dum==G4String("beta=")){
in>>beta;
break;
}
else if(std::string(dum)==std::string("Er2")){
else if(s_dum==G4String("Er2")){
in>>dum>>E_E1[nR_E1]>>dum>>dum>>G_E1[nR_E1]>>dum>>dum>>s_E1[nR_E1]>>dum>>beta;
PSFType_E1[nR_E1]=11;
nR_E1++;
@@ -309,8 +310,9 @@ G4bool G4NuDEXPSF::TakePSFFromInputFile(const char* fname){
std::ifstream in(fname);
while(in>>word){
if(word[0]=='#'){in.ignore(10000,'\n');}
if(std::string(word)==std::string("END")){break;}
if(std::string(word)==std::string("PSF")){
G4String s_word(word);
if(s_word==G4String("END")){break;}
if(s_word==G4String("PSF")){
result=true;
in>>nR_E1;
for(G4int i=0;i<nR_E1;i++){
@@ -6,6 +6,17 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2026-02-23 Dmitri Konstantinov (hadr-hpp-V11-03-06)
- G4ParticleHPContAngularPar - reduced allocator fragmentation and memory
churn in BuildByInterpolation() by removing unconditional deep copies
of input angular distributions. Copies are now created only in case of
self-aliasing (this == &angparX), preserving correctness while avoiding
excessive per-call heap allocations.
## 2025-12-23 Vladimir Ivanchenko (hadr-hpp-V11-03-05)
- G4ParticleHPNBodyPhaseSpace, G4ParticleHPInelasticCompFS - added
G4HadronicException header.
## 2025-09-27 Vladimir Ivanchenko (hadr-hpp-V11-03-04)
- G4FissionFragmentGenerator, G4FissionFragmentGenerator, G4ParticleHPElementData,
G4ParticleHPKallbachMannSyst, G4ParticleHPThermalScattering,
@@ -663,14 +663,18 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
// interaction the existing table should be used
if (!fCache.Get().fresh) return;
// Make copies of angpar1 and angpar2. Since these are given by reference
// it can not be excluded that one of them is "this". Hence this code uses
// potentially the old "this" for creating the new this - which leads to
// memory corruption if the old is not stored as separarte object for lookup
const G4ParticleHPContAngularPar copyAngpar1(angpar1), copyAngpar2(angpar2);
// Guard against self-aliasing: if either source happens to be "this",
// copy it before we start overwriting our own members. In the standard
// call path (fCacheAngular vs theAngular[]) aliasing cannot occur, so
// tmp1/tmp2 remain empty and the copies cost nothing.
std::unique_ptr<G4ParticleHPContAngularPar> tmp1, tmp2;
if (this == &angpar1) { tmp1 = std::make_unique<G4ParticleHPContAngularPar>(angpar1); }
if (this == &angpar2) { tmp2 = std::make_unique<G4ParticleHPContAngularPar>(angpar2); }
const G4ParticleHPContAngularPar& p1 = tmp1 ? *tmp1 : angpar1;
const G4ParticleHPContAngularPar& p2 = tmp2 ? *tmp2 : angpar2;
nAngularParameters = copyAngpar1.nAngularParameters;
theManager = copyAngpar1.theManager;
nAngularParameters = p1.nAngularParameters;
theManager = p1.theManager;
theEnergy = anEnergy;
theMinEner = DBL_MAX; // min and max will be re-calculated after interpolation
theMaxEner = -DBL_MAX;
@@ -681,8 +685,8 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
// needs to call the explicit Set() method instead.
// First, average probabilities for those lines that are in both sets
const std::map<G4double, G4int> discEnerOwn1 = copyAngpar1.GetDiscreteEnergiesOwn();
const std::map<G4double, G4int> discEnerOwn2 = copyAngpar2.GetDiscreteEnergiesOwn();
const std::map<G4double, G4int> discEnerOwn1 = p1.GetDiscreteEnergiesOwn();
const std::map<G4double, G4int> discEnerOwn2 = p2.GetDiscreteEnergiesOwn();
std::map<G4double, G4int>::const_iterator itedeo1;
std::map<G4double, G4int>::const_iterator itedeo2;
std::vector<G4ParticleHPList*> vAngular(discEnerOwn1.size());
@@ -704,18 +708,18 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
ie2 = itedeo2->second;
}
vAngular[ie1] = new G4ParticleHPList();
vAngular[ie1]->SetLabel(copyAngpar1.theAngular[ie1].GetLabel());
vAngular[ie1]->SetLabel(p1.theAngular[ie1].GetLabel());
G4double val1, val2;
for (G4int ip = 0; ip < nAngularParameters; ++ip) {
val1 = copyAngpar1.theAngular[ie1].GetValue(ip);
val1 = p1.theAngular[ie1].GetValue(ip);
if (ie2 != -1) {
val2 = copyAngpar2.theAngular[ie2].GetValue(ip);
val2 = p2.theAngular[ie2].GetValue(ip);
}
else {
val2 = 0.;
}
G4double value = theInt.Interpolate(aScheme, anEnergy, copyAngpar1.theEnergy,
copyAngpar2.theEnergy, val1, val2);
G4double value = theInt.Interpolate(aScheme, anEnergy, p1.theEnergy,
p2.theEnergy, val1, val2);
vAngular[ie1]->SetValue(ip, value);
}
} // itedeo1 loop
@@ -745,7 +749,7 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
for (itv = vAngular.cbegin(); itv != vAngular.cend(); ++itv, ++ie) {
if (discEner2 > (*itv)->GetLabel()) {
itv = vAngular.insert(itv, new G4ParticleHPList);
(*itv)->SetLabel(copyAngpar2.theAngular[ie2].GetLabel());
(*itv)->SetLabel(p2.theAngular[ie2].GetLabel());
isInserted = true;
break;
}
@@ -753,16 +757,16 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
if (!isInserted) {
ie = (G4int)vAngular.size();
vAngular.push_back(new G4ParticleHPList);
vAngular[ie]->SetLabel(copyAngpar2.theAngular[ie2].GetLabel());
vAngular[ie]->SetLabel(p2.theAngular[ie2].GetLabel());
isInserted = true;
}
G4double val1, val2;
for (G4int ip = 0; ip < nAngularParameters; ++ip) {
val1 = 0;
val2 = copyAngpar2.theAngular[ie2].GetValue(ip);
G4double value = theInt.Interpolate(aScheme, anEnergy, copyAngpar1.theEnergy,
copyAngpar2.theEnergy, val1, val2);
val2 = p2.theAngular[ie2].GetValue(ip);
G4double value = theInt.Interpolate(aScheme, anEnergy, p1.theEnergy,
p2.theEnergy, val1, val2);
vAngular[ie]->SetValue(ip, value);
}
} // end if(notFound)
@@ -794,26 +798,25 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
// Get minimum and maximum energy interpolating
// Don't use theMinEner or theMaxEner here, since the transformed energies
// need the interpolated range from the original Angpar
G4double interMinEner = copyAngpar1.GetMinEner()
+ (theEnergy - copyAngpar1.GetEnergy())
* (copyAngpar2.GetMinEner() - copyAngpar1.GetMinEner())
/ (copyAngpar2.GetEnergy() - copyAngpar1.GetEnergy());
G4double interMaxEner = copyAngpar1.GetMaxEner()
+ (theEnergy - copyAngpar1.GetEnergy())
* (copyAngpar2.GetMaxEner() - copyAngpar1.GetMaxEner())
/ (copyAngpar2.GetEnergy() - copyAngpar1.GetEnergy());
G4double interMinEner = p1.GetMinEner()
+ (theEnergy - p1.GetEnergy())
* (p2.GetMinEner() - p1.GetMinEner())
/ (p2.GetEnergy() - p1.GetEnergy());
G4double interMaxEner = p1.GetMaxEner()
+ (theEnergy - p1.GetEnergy())
* (p2.GetMaxEner() - p1.GetMaxEner())
/ (p2.GetEnergy() - p1.GetEnergy());
// Loop to energies of new set
theEnergiesTransformed.clear();
G4int nEnergies1 = copyAngpar1.GetNEnergies();
G4int nDiscreteEnergies1 = copyAngpar1.GetNDiscreteEnergies();
G4double minEner1 = copyAngpar1.GetMinEner();
G4double maxEner1 = copyAngpar1.GetMaxEner();
G4int nEnergies2 = copyAngpar2.GetNEnergies();
G4int nDiscreteEnergies2 = copyAngpar2.GetNDiscreteEnergies();
G4double minEner2 = copyAngpar2.GetMinEner();
G4double maxEner2 = copyAngpar2.GetMaxEner();
G4int nEnergies1 = p1.GetNEnergies();
G4int nDiscreteEnergies1 = p1.GetNDiscreteEnergies();
G4double minEner1 = p1.GetMinEner();
G4double maxEner1 = p1.GetMaxEner();
G4int nEnergies2 = p2.GetNEnergies();
G4int nDiscreteEnergies2 = p2.GetNDiscreteEnergies();
G4double minEner2 = p2.GetMinEner();
G4double maxEner2 = p2.GetMaxEner();
// First build the list of transformed energies normalized
// to the new min max by assuming that the min-max range of
@@ -823,7 +826,7 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
G4double e1(0.);
G4double eTNorm1(0.);
for (ie1 = nDiscreteEnergies1; ie1 < nEnergies1; ++ie1) {
e1 = copyAngpar1.theAngular[ie1].GetLabel();
e1 = p1.theAngular[ie1].GetLabel();
eTNorm1 = (e1 - minEner1);
if (maxEner1 != minEner1) eTNorm1 /= (maxEner1 - minEner1);
if (eTNorm1 >= 0 && eTNorm1 <= 1) theEnergiesTransformed.insert(eTNorm1);
@@ -832,7 +835,7 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
G4double e2(0.);
G4double eTNorm2(0.);
for (ie2 = nDiscreteEnergies2; ie2 < nEnergies2; ++ie2) {
e2 = copyAngpar2.theAngular[ie2].GetLabel();
e2 = p2.theAngular[ie2].GetLabel();
eTNorm2 = (e2 - minEner2);
if (maxEner2 != minEner2) eTNorm2 /= (maxEner2 - minEner2);
if (eTNorm2 >= 0 && eTNorm2 <= 1) theEnergiesTransformed.insert(eTNorm2);
@@ -870,7 +873,7 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
e1Interp = (maxEner1 - minEner1) * eT + minEner1;
//----- Get parameter value corresponding to this e1Interp
for (ie1 = nDiscreteEnergies1; ie1 < nEnergies1; ++ie1) {
if ((copyAngpar1.theAngular[ie1].GetLabel() - e1Interp) > 1.E-10 * e1Interp) break;
if ((p1.theAngular[ie1].GetLabel() - e1Interp) > 1.E-10 * e1Interp) break;
}
ie1Prev = ie1 - 1;
if (ie1 == 0) ++ie1Prev;
@@ -883,7 +886,7 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
e2Interp = (maxEner2 - minEner2) * eT + minEner2;
//----- Get parameter value corresponding to this e2Interp
for (ie2 = nDiscreteEnergies2; ie2 < nEnergies2; ++ie2) {
if ((copyAngpar2.theAngular[ie2].GetLabel() - e2Interp) > 1.E-10 * e2Interp) break;
if ((p2.theAngular[ie2].GetLabel() - e2Interp) > 1.E-10 * e2Interp) break;
}
ie2Prev = ie2 - 1;
if (ie2 == 0) ++ie2Prev;
@@ -908,17 +911,17 @@ void G4ParticleHPContAngularPar::BuildByInterpolation(G4double anEnergy,
G4double value(0.);
for (G4int ip = 0; ip < nAngularParameters; ++ip) {
val1 = theInt.Interpolate2(
theManager.GetScheme(ie), e1Interp, copyAngpar1.theAngular[ie1Prev].GetLabel(),
copyAngpar1.theAngular[ie1].GetLabel(), copyAngpar1.theAngular[ie1Prev].GetValue(ip),
copyAngpar1.theAngular[ie1].GetValue(ip))
theManager.GetScheme(ie), e1Interp, p1.theAngular[ie1Prev].GetLabel(),
p1.theAngular[ie1].GetLabel(), p1.theAngular[ie1Prev].GetValue(ip),
p1.theAngular[ie1].GetValue(ip))
* (maxEner1 - minEner1);
val2 = theInt.Interpolate2(
theManager.GetScheme(ie), e2Interp, copyAngpar2.theAngular[ie2Prev].GetLabel(),
copyAngpar2.theAngular[ie2].GetLabel(), copyAngpar2.theAngular[ie2Prev].GetValue(ip),
copyAngpar2.theAngular[ie2].GetValue(ip))
theManager.GetScheme(ie), e2Interp, p2.theAngular[ie2Prev].GetLabel(),
p2.theAngular[ie2].GetLabel(), p2.theAngular[ie2Prev].GetValue(ip),
p2.theAngular[ie2].GetValue(ip))
* (maxEner2 - minEner2);
value = theInt.Interpolate(aScheme, anEnergy, copyAngpar1.theEnergy, copyAngpar2.theEnergy,
value = theInt.Interpolate(aScheme, anEnergy, p1.theEnergy, p2.theEnergy,
val1, val2);
if (interMaxEner != interMinEner) {
value /= (interMaxEner - interMinEner);
@@ -65,6 +65,7 @@
#include "G4ParticleHPDataUsed.hh"
#include "G4ParticleHPManager.hh"
#include "G4RandomDirection.hh"
#include "G4HadronicException.hh"
#include "G4SystemOfUnits.hh"
#include <fstream>
@@ -40,6 +40,7 @@
#include "G4Proton.hh"
#include "G4ThreeVector.hh"
#include "G4Triton.hh"
#include "G4HadronicException.hh"
#include "Randomize.hh"
G4ReactionProduct* G4ParticleHPNBodyPhaseSpace::Sample(G4double anEnergy, G4double massCode,
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-12-23 Vladimir Ivanchenko (hadr-partonstring-mgt-V11-03-00)
- G4VSplitableHadron - added G4HadronicException header.
## 2022-11-11 Alberto Ribon (hadr-partonstring-mgt-V11-00-03)
- G4VPartonStringModel : added debugging information on the number of lambdas
for residual projectile hypernuclei.
@@ -37,9 +37,10 @@
#include "G4VSplitableHadron.hh"
#include "G4Nucleon.hh"
#include "G4VKineticNucleon.hh"
#include "G4HadronicException.hh"
G4VSplitableHadron::G4VSplitableHadron()
: theDefinition(NULL), TimeOfCreation(0.), theCollisionCount(0), curStatus(0), isSplit(false)
: theDefinition(nullptr), TimeOfCreation(0.), theCollisionCount(0), curStatus(0), isSplit(false)
{
}
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-12-23 Vladimir Ivanchenko (hadr-qgsm-V11-03-00)
- G4GammaParticipants, G4QGSParticipants, G4QGSMSplitableHadron - added
G4HadronicException header.
## 2023-03-09 Vladimir Ivanchenko (hadr-qgsm-V11-01-01)
- G4BaryonSplitter, G4MesonSplitter, G4QGSMSplittableHadron, G4SPBaryon -
attempt make code more uniform in order to reduce probability of warnings
@@ -27,6 +27,7 @@
#include "G4GammaParticipants.hh"
#include "G4LorentzVector.hh"
#include "G4V3DNucleus.hh"
#include "G4HadronicException.hh"
#include <utility>
// Class G4GammaParticipants
@@ -33,6 +33,7 @@
#include "G4PionZero.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4HadronicException.hh"
#include "G4Log.hh"
#include "G4Pow.hh"
@@ -33,6 +33,7 @@
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4HadronicException.hh"
#include "G4Exp.hh"
#include "G4Log.hh"
@@ -1,8 +1,13 @@
# Category had-theo-HE History
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-12-23 Vladimir Ivanchenko (had-theo-HE-V11-03-01)
- G4TheoFSGenerator : added G4HadronicException header.
## 2025-08-14 Alberto Ribon (had-theo-HE-V11-03-00)
- G4TheoFSGenerator : introduced the ID model identification for FTF inelastic
@@ -38,7 +38,7 @@
#include "G4HadronicParameters.hh"
#include "G4CRCoalescence.hh"
#include "G4HadronicInteractionRegistry.hh"
#include "G4HadronicException.hh"
G4TheoFSGenerator::G4TheoFSGenerator( const G4String& name )
: G4HadronicInteraction( name )