Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -6,6 +6,25 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-11-18 I. Hrivnacova (hadr-man-V11-01-08)
|
||||
- G4HadronicProcess, G4HadXSHelper - fixed memory leak at exit
|
||||
|
||||
## 2023-11-17 Vladimir Ivanchenko (hadr-man-V11-01-07)
|
||||
- G4HadronicProcessStore - fixed memory leak at exit
|
||||
|
||||
## 2023-11-06 Vladimir Ivanchenko (hadr-man-V11-01-06)
|
||||
- G4HadronicProcessStore - added printouts for neutrino processes
|
||||
G4HadronicProcessType - added new types for neutrino interactions
|
||||
|
||||
## 2023-08-16 Vladimir Ivanchenko (hadr-man-V11-01-05)
|
||||
- G4HadronicProcessStore - removed extra not needed empty lines from
|
||||
information printout
|
||||
|
||||
## 2023-07-14 Alberto Ribon (hadr-man-V11-01-04)
|
||||
- G4HadronicProcess : reduced the number of warnings concerning kaon0 and
|
||||
anti_kaon0 (which are transformed in kaon0S and kaon0L) to max 1 warning
|
||||
per thread.
|
||||
(This is useful for Fluka-Cern because it produces kaon0 and anti_kaon0.)
|
||||
|
||||
## 2023-03-29 Vladimir Ivanchenko (hadr-man-V11-01-03)
|
||||
- G4HadronicProcess - added extra G4Exception for the case if worker cannot
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4HadronicProcessType.hh
|
||||
@@ -49,6 +47,9 @@ enum G4HadronicProcessType
|
||||
fHadronAtRest = 151,
|
||||
fLeptonAtRest = 152,
|
||||
fChargeExchange = 161,
|
||||
fNuOscillation = 165,
|
||||
fNuElectron = 166,
|
||||
fNuNucleus = 167,
|
||||
fRadioactiveDecay = 210,
|
||||
fEMDissociation = 310
|
||||
};
|
||||
|
||||
@@ -195,6 +195,9 @@ G4HadXSHelper::FillPeaksStructure(G4HadronicProcess* p,
|
||||
}
|
||||
// case of no 1st peak in all vectors
|
||||
if(!isDeep) {
|
||||
for (auto& x : *ptr) {
|
||||
delete x;
|
||||
}
|
||||
delete ptr;
|
||||
ptr = nullptr;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,11 @@ G4HadronicProcess::~G4HadronicProcess()
|
||||
delete theTotalResult;
|
||||
delete theCrossSectionDataStore;
|
||||
if(isMaster) {
|
||||
if (fXSpeaks != nullptr) {
|
||||
for (auto const& e : *fXSpeaks ) {
|
||||
delete e;
|
||||
}
|
||||
}
|
||||
delete fXSpeaks;
|
||||
delete theEnergyOfCrossSectionMax;
|
||||
}
|
||||
@@ -220,6 +225,11 @@ void G4HadronicProcess::BuildPhysicsTable(const G4ParticleDefinition& p)
|
||||
delete theEnergyOfCrossSectionMax;
|
||||
theEnergyOfCrossSectionMax = nullptr;
|
||||
if(fXSType == fHadTwoPeaks) {
|
||||
if (fXSpeaks != nullptr) {
|
||||
for (auto const& e : *fXSpeaks ) {
|
||||
delete e;
|
||||
}
|
||||
}
|
||||
delete fXSpeaks;
|
||||
fXSpeaks =
|
||||
G4HadXSHelper::FillPeaksStructure(this, &p, minKinEnergy, tmax);
|
||||
@@ -436,6 +446,8 @@ G4HadronicProcess::PostStepDoIt(const G4Track& aTrack, const G4Step&)
|
||||
// with equal, 50% probability, keeping their dynamical masses (and
|
||||
// the other kinematical properties).
|
||||
// When this happens - very rarely - a "JustWarning" exception is thrown.
|
||||
// Because Fluka-Cern produces kaon0 and anti_kaon0, we reduce the number
|
||||
// of warnings to max 1 per thread.
|
||||
G4int nSec = (G4int)result->GetNumberOfSecondaries();
|
||||
if ( nSec > 0 ) {
|
||||
for ( G4int i = 0; i < nSec; ++i ) {
|
||||
@@ -444,10 +456,10 @@ G4HadronicProcess::PostStepDoIt(const G4Track& aTrack, const G4Step&)
|
||||
if ( part == G4KaonZero::Definition() ||
|
||||
part == G4AntiKaonZero::Definition() ) {
|
||||
G4ParticleDefinition* newPart;
|
||||
if( G4UniformRand() > 0.5 ) { newPart = G4KaonZeroShort::Definition(); }
|
||||
if ( G4UniformRand() > 0.5 ) { newPart = G4KaonZeroShort::Definition(); }
|
||||
else { newPart = G4KaonZeroLong::Definition(); }
|
||||
dynamicParticle->SetDefinition( newPart );
|
||||
if(nKaonWarn < 5) {
|
||||
if ( nKaonWarn < 1 ) {
|
||||
++nKaonWarn;
|
||||
G4ExceptionDescription ed;
|
||||
ed << " Hadronic model " << theInteraction->GetModelName() << G4endl;
|
||||
|
||||
@@ -83,14 +83,17 @@ G4HadronicProcessStore::~G4HadronicProcessStore()
|
||||
|
||||
void G4HadronicProcessStore::Clean()
|
||||
{
|
||||
for(auto& itr : process)
|
||||
for (auto const& itr : process)
|
||||
delete itr;
|
||||
process.clear();
|
||||
|
||||
for(auto& itr : extraProcess)
|
||||
for (auto const& itr : extraProcess)
|
||||
delete itr;
|
||||
extraProcess.clear();
|
||||
|
||||
for (auto const& it : ep_map)
|
||||
delete it.second;
|
||||
|
||||
m_map.clear();
|
||||
p_map.clear();
|
||||
|
||||
@@ -756,6 +759,10 @@ void G4HadronicProcessStore::Dump(G4int verb)
|
||||
pname == "gamma" ||
|
||||
pname == "e+" ||
|
||||
pname == "e-" ||
|
||||
pname == "nu_e" ||
|
||||
pname == "anti_nu_e" ||
|
||||
pname == "nu_mu" ||
|
||||
pname == "anti_nu_mu" ||
|
||||
pname == "mu+" ||
|
||||
pname == "mu-" ||
|
||||
pname == "kaon+" ||
|
||||
@@ -795,19 +802,16 @@ void G4HadronicProcessStore::Dump(G4int verb)
|
||||
if(itp->first == part) {
|
||||
G4VProcess* proc = (itp->second);
|
||||
if (wasPrinted[i] == 0) {
|
||||
G4cout << "\n---------------------------------------------------\n"
|
||||
<< std::setw(50) << "Hadronic Processes for "
|
||||
<< part->GetParticleName() << "\n";
|
||||
G4cout << "-------------------------------------------------------------------------\n"
|
||||
<< std::setw(50) << "Hadronic Processes for "
|
||||
<< part->GetParticleName() << "\n";
|
||||
wasPrinted[i] = 1;
|
||||
}
|
||||
G4cout << "\n Process: " << proc->GetProcessName() << G4endl;
|
||||
G4cout << " Process: " << proc->GetProcessName() << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4cout << "\n================================================================"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -818,13 +822,13 @@ void G4HadronicProcessStore::Print(G4int idxProc, G4int idxPart)
|
||||
const G4ParticleDefinition* part = particle[idxPart];
|
||||
if(part == nullptr || proc == nullptr) { return; }
|
||||
if (wasPrinted[idxPart] == 0) {
|
||||
G4cout << "\n---------------------------------------------------\n"
|
||||
G4cout << "-----------------------------------------------------------------------\n"
|
||||
<< std::setw(50) << "Hadronic Processes for "
|
||||
<< part->GetParticleName() << "\n";
|
||||
wasPrinted[idxPart] = 1;
|
||||
}
|
||||
|
||||
G4cout << "\n Process: " << proc->GetProcessName();
|
||||
G4cout << " Process: " << proc->GetProcessName();
|
||||
|
||||
// Append the string "/n" (i.e. "per nucleon") on the kinetic energy of ions.
|
||||
G4String stringEnergyPerNucleon = "";
|
||||
@@ -869,9 +873,10 @@ void G4HadronicProcessStore::Print(G4int idxProc, G4int idxPart)
|
||||
if(model[i] == hi) { break; }
|
||||
}
|
||||
G4cout << "\n Model: " << std::setw(25) << modelName[i] << ": "
|
||||
<< G4BestUnit(hi->GetMinEnergy(), "Energy") << stringEnergyPerNucleon
|
||||
<< " ---> "
|
||||
<< G4BestUnit(hi->GetMaxEnergy(), "Energy") << stringEnergyPerNucleon;
|
||||
<< G4BestUnit(hi->GetMinEnergy(), "Energy")
|
||||
<< stringEnergyPerNucleon << " ---> "
|
||||
<< G4BestUnit(hi->GetMaxEnergy(), "Energy")
|
||||
<< stringEnergyPerNucleon;
|
||||
}
|
||||
}
|
||||
G4cout << G4endl;
|
||||
|
||||
Reference in New Issue
Block a user