Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -14,6 +14,14 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
31-Oct-2017 V.Ivanchenko hadr-pre-V10-03-03
- G4PreCompoundEmission - used G4RandomDirection() if angular sampling
is disabled
22-Sept-2017 V.Ivanchenko hadr-pre-V10-03-02
- G4PreCompoundModel - added isActive flag, which can be defined via
G4DeexPrecoParameters interface
23-Jun-2017 Gunter Folger hadr-pre-V10-03-01
- Fix memory leak introduced in tag below.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PreCompoundEmission.hh 100378 2016-10-19 15:03:27Z gcosmo $
// $Id: G4PreCompoundEmission.hh 107062 2017-11-01 15:01:02Z gcosmo $
//
// Hadronic Process: Nuclear Preequilibrium
// by V. Lara
@@ -95,6 +95,7 @@ private:
// Momentum of emitted fragment
G4ThreeVector theFinalMomentum;
G4bool fUseAngularGenerator;
};
inline G4double
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PreCompoundModel.hh 96527 2016-04-20 08:51:00Z gcosmo $
// $Id: G4PreCompoundModel.hh 106233 2017-09-22 21:34:41Z gcosmo $
//
// by V. Lara
//
@@ -125,6 +125,7 @@ private:
//for the rest of external choices
G4bool useSCO;
G4bool isInitialised;
G4bool isActive;
G4int minZ;
G4int minA;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PreCompoundEmission.cc 100378 2016-10-19 15:03:27Z gcosmo $
// $Id: G4PreCompoundEmission.cc 107062 2017-11-01 15:01:02Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -49,6 +49,7 @@
#include "G4Exp.hh"
#include "G4Log.hh"
#include "Randomize.hh"
#include "G4RandomDirection.hh"
#include "G4PreCompoundEmissionFactory.hh"
#include "G4HETCEmissionFactory.hh"
#include "G4HadronicException.hh"
@@ -65,6 +66,7 @@ G4PreCompoundEmission::G4PreCompoundEmission()
G4NuclearLevelData::GetInstance()->GetParameters() ;
fLevelDensity = param->GetLevelDensity();
fFermiEnergy = param->GetFermiEnergy();
fUseAngularGenerator = param->UseAngularGen();
}
G4PreCompoundEmission::~G4PreCompoundEmission()
@@ -117,16 +119,17 @@ G4PreCompoundEmission::PerformEmission(G4Fragment & aFragment)
// Kinetic Energy of emitted fragment
G4double kinEnergy = thePreFragment->SampleKineticEnergy(aFragment);
// if(kinEnergy < MeV) {
// G4cout << "Chosen fragment: " << G4endl;
// G4cout << *thePreFragment << G4endl;
// G4cout << "Ekin= " << kinEnergy << G4endl;
// }
kinEnergy = std::max(kinEnergy, 0.0);
// Calculate the fragment momentum (three vector)
AngularDistribution(thePreFragment,aFragment,kinEnergy);
if(fUseAngularGenerator) {
AngularDistribution(thePreFragment,aFragment,kinEnergy);
} else {
G4double pmag =
std::sqrt(kinEnergy*(kinEnergy + 2.0*thePreFragment->GetNuclearMass()));
theFinalMomentum = pmag*G4RandomDirection();
}
// Mass of emittef fragment
G4double EmittedMass = thePreFragment->GetNuclearMass();
// Now we can calculate the four momentum
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PreCompoundModel.cc 104867 2017-06-23 14:00:18Z gcosmo $
// $Id: G4PreCompoundModel.cc 106233 2017-09-22 21:34:41Z gcosmo $
//
// by V. Lara
//
@@ -70,7 +70,7 @@
G4PreCompoundModel::G4PreCompoundModel(G4ExcitationHandler* ptr)
: G4VPreCompoundModel(ptr,"PRECO"),theEmission(nullptr),theTransition(nullptr),
useSCO(false),isInitialised(false),minZ(3),minA(5)
useSCO(false),isInitialised(false),isActive(true),minZ(3),minA(5)
{
//G4cout << "### NEW PrecompoundModel " << this << G4endl;
if(!ptr) { SetExcitationHandler(new G4ExcitationHandler()); }
@@ -127,6 +127,8 @@ void G4PreCompoundModel::InitialiseModel()
theTransition->UseNGB(param->NeverGoBack());
theTransition->UseCEMtr(param->UseCEM());
if(param->PrecoDummy()) { isActive = false; }
GetExcitationHandler()->Initialise();
}
@@ -211,7 +213,7 @@ G4ReactionProductVector* G4PreCompoundModel::DeExcite(G4Fragment& aFragment)
//G4cout << aFragment << G4endl;
// Perform Equilibrium Emission
if ((Z < minZ && A < minA) || Eex < fLimitEnergy*A) {
if (!isActive || (Z < minZ && A < minA) || Eex < fLimitEnergy*A) {
PerformEquilibriumEmission(aFragment, Result);
return Result;
}