Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -1318,8 +1318,8 @@ c Clear BU_TAB (array of multifragmentation products)
|
||||
EV_TAB[i][4] = VZOUT;
|
||||
}
|
||||
if(IMULTBU>200)std::cout << "IMULTBU>200 " << IMULTBU << std::endl;
|
||||
delete problamb;
|
||||
delete Nblamb;
|
||||
delete[] problamb;
|
||||
delete[] Nblamb;
|
||||
}// if(T_diff>0.1)
|
||||
// End of multi-fragmentation
|
||||
mult7777:
|
||||
@@ -7793,32 +7793,65 @@ G4double G4Abla::gethyperseparation(G4double A, G4double Z, G4int ny){
|
||||
if(A<1.)return 1.e38;
|
||||
// For light nuclei we take experimental values
|
||||
// Journal of Physics G, Nucl Part Phys 32,363 (2006)
|
||||
if(ny==1){
|
||||
if(Z==1 && A==4) return 2.04;
|
||||
else if(Z==2 && A==4) return 2.39;
|
||||
else if(Z==2 && A==5) return 3.12;
|
||||
else if(Z==2 && A==6) return 4.18;
|
||||
else if(Z==2 && A==7) return 5.23;
|
||||
else if(Z==2 && A==8) return 7.16;
|
||||
else if(Z==3 && A==6) return 4.50;
|
||||
else if(Z==3 && A==7) return 5.58;
|
||||
else if(Z==3 && A==8) return 6.80;
|
||||
else if(Z==3 && A==9) return 8.50;
|
||||
else if(Z==4 && A==7) return 5.16;
|
||||
else if(Z==4 && A==8) return 6.84;
|
||||
else if(Z==4 && A==9) return 6.71;
|
||||
else if(Z==4 && A==10) return 9.11;
|
||||
else if(Z==5 && A==9) return 8.29;
|
||||
else if(Z==5 && A==10) return 8.89;
|
||||
else if(Z==5 && A==11) return 10.24;
|
||||
else if(Z==5 && A==12) return 11.37;
|
||||
else if(Z==6 && A==12) return 10.76;
|
||||
else if(Z==6 && A==13) return 11.69;
|
||||
else if(Z==6 && A==14) return 12.17;
|
||||
else if(Z==14 && A==28) return 16.0;
|
||||
else if(Z==39 && A==89) return 22.1;
|
||||
else if(Z==57 && A==139) return 23.8;
|
||||
else if(Z==82 && A==208) return 26.5;
|
||||
if (ny == 1) {
|
||||
if (Z == 1 && A == 4)
|
||||
return 2.04;
|
||||
else if (Z == 2 && A == 4)
|
||||
return 2.39;
|
||||
else if (Z == 2 && A == 5)
|
||||
return 3.12;
|
||||
else if (Z == 2 && A == 6)
|
||||
return 4.18;
|
||||
else if (Z == 2 && A == 7)
|
||||
return 5.23;
|
||||
else if (Z == 2 && A == 8)
|
||||
return 7.16;
|
||||
else if (Z == 3 && A == 6)
|
||||
return 4.50;
|
||||
else if (Z == 3 && A == 7)
|
||||
return 5.58;
|
||||
else if (Z == 3 && A == 8)
|
||||
return 6.80;
|
||||
else if (Z == 3 && A == 9)
|
||||
return 8.50;
|
||||
else if (Z == 4 && A == 7)
|
||||
return 5.16;
|
||||
else if (Z == 4 && A == 8)
|
||||
return 6.84;
|
||||
else if (Z == 4 && A == 9)
|
||||
return 6.71;
|
||||
else if (Z == 4 && A == 10)
|
||||
return 9.11;
|
||||
else if (Z == 5 && A == 9)
|
||||
return 8.29;
|
||||
else if (Z == 5 && A == 10)
|
||||
return 9.01;
|
||||
else if (Z == 5 && A == 11)
|
||||
return 10.29;
|
||||
else if (Z == 5 && A == 12)
|
||||
return 11.43;
|
||||
else if (Z == 6 && A == 12)
|
||||
return 10.95;
|
||||
else if (Z == 6 && A == 13)
|
||||
return 11.81;
|
||||
else if (Z == 6 && A == 14)
|
||||
return 12.50;
|
||||
else if (Z == 7 && A == 14)
|
||||
return 12.17;
|
||||
else if (Z == 7 && A == 15)
|
||||
return 13.59;
|
||||
else if (Z == 8 && A == 16)
|
||||
return 12.50;
|
||||
else if (Z == 8 && A == 17)
|
||||
return 13.59;
|
||||
else if (Z == 14 && A == 28)
|
||||
return 16.0;
|
||||
else if (Z == 39 && A == 89)
|
||||
return 22.1;
|
||||
else if (Z == 57 && A == 139)
|
||||
return 23.8;
|
||||
else if (Z == 82 && A == 208)
|
||||
return 26.5;
|
||||
}//ny==1
|
||||
// For other nuclei we take Bethe-Weizsacker mass formula
|
||||
return gethyperbinding(A, Z, ny)-gethyperbinding(A-1., Z, ny-1);
|
||||
|
||||
@@ -31,11 +31,9 @@
|
||||
// Aatos Heikkinen, HIP (project coordination)
|
||||
//
|
||||
|
||||
#define ABLAXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifdef ABLAXX_IN_GEANT4_MODE
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
|
||||
#include "G4AblaInterface.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
@@ -45,92 +43,135 @@
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4HyperTriton.hh"
|
||||
#include "G4HyperH4.hh"
|
||||
#include "G4HyperAlpha.hh"
|
||||
#include "G4DoubleHyperH4.hh"
|
||||
#include "G4DoubleHyperDoubleNeutron.hh"
|
||||
#include "G4HyperHe5.hh"
|
||||
|
||||
G4AblaInterface::G4AblaInterface() :
|
||||
G4VPreCompoundModel(NULL, "ABLA"),
|
||||
G4AblaInterface::G4AblaInterface(G4ExcitationHandler* ptr) :
|
||||
G4VPreCompoundModel(ptr, "ABLAXX"),
|
||||
ablaResult(new G4VarNtp),
|
||||
volant(new G4Volant),
|
||||
theABLAModel(new G4Abla(volant, ablaResult)),
|
||||
eventNumber(0)
|
||||
eventNumber(0),
|
||||
secID(-1),
|
||||
isInitialised(false)
|
||||
{
|
||||
theABLAModel->initEvapora();
|
||||
theABLAModel->SetParameters();
|
||||
secID = G4PhysicsModelCatalog::GetModelID("model_" + GetModelName());
|
||||
// G4cout << "### NEW PrecompoundModel " << this << G4endl;
|
||||
if (!ptr) SetExcitationHandler(new G4ExcitationHandler);
|
||||
InitialiseModel();
|
||||
G4cout << G4endl << "G4AblaInterface::InitialiseModel() was right." << G4endl;
|
||||
}
|
||||
|
||||
G4AblaInterface::~G4AblaInterface() {
|
||||
G4AblaInterface::~G4AblaInterface()
|
||||
{
|
||||
delete volant;
|
||||
delete ablaResult;
|
||||
delete theABLAModel;
|
||||
delete GetExcitationHandler();
|
||||
}
|
||||
|
||||
G4ReactionProductVector *G4AblaInterface::DeExcite(G4Fragment &aFragment) {
|
||||
void G4AblaInterface::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
InitialiseModel();
|
||||
}
|
||||
|
||||
void G4AblaInterface::InitialiseModel()
|
||||
{
|
||||
if (isInitialised) return;
|
||||
isInitialised = true;
|
||||
theABLAModel->initEvapora();
|
||||
theABLAModel->SetParameters();
|
||||
GetExcitationHandler()->Initialise();
|
||||
}
|
||||
|
||||
G4ReactionProductVector *G4AblaInterface::DeExcite(G4Fragment& aFragment) {
|
||||
if (!isInitialised) InitialiseModel();
|
||||
|
||||
volant->clear();
|
||||
ablaResult->clear();
|
||||
|
||||
const G4int ARem = aFragment.GetA_asInt();
|
||||
const G4int ZRem = aFragment.GetZ_asInt();
|
||||
const G4int SRem = -aFragment.GetNumberOfLambdas(); // Strangeness = - (Number of lambdas)
|
||||
const G4double eStarRem = aFragment.GetExcitationEnergy() / MeV;
|
||||
const G4double jRem = aFragment.GetAngularMomentum().mag() / hbar_Planck;
|
||||
const G4LorentzVector &pRem = aFragment.GetMomentum();
|
||||
const G4double pxRem = pRem.x() / MeV;
|
||||
const G4double pyRem = pRem.y() / MeV;
|
||||
const G4double pzRem = pRem.z() / MeV;
|
||||
const G4double jRem = aFragment.GetAngularMomentum().mag() / hbar_Planck;
|
||||
const G4LorentzVector& pRem = aFragment.GetMomentum();
|
||||
const G4double pxRem = pRem.x() / MeV;
|
||||
const G4double pyRem = pRem.y() / MeV;
|
||||
const G4double pzRem = pRem.z() / MeV;
|
||||
|
||||
eventNumber++;
|
||||
|
||||
theABLAModel->DeexcitationAblaxx(ARem, ZRem,
|
||||
eStarRem,
|
||||
jRem,
|
||||
pxRem,
|
||||
pyRem,
|
||||
pzRem,
|
||||
eventNumber);
|
||||
theABLAModel->DeexcitationAblaxx(ARem, ZRem, eStarRem, jRem, pxRem, pyRem,
|
||||
pzRem, eventNumber, SRem);
|
||||
|
||||
G4ReactionProductVector *result = new G4ReactionProductVector;
|
||||
G4ReactionProductVector* result = new G4ReactionProductVector;
|
||||
|
||||
for(int j = 0; j < ablaResult->ntrack; ++j) { // Copy ABLA result to the EventInfo
|
||||
|
||||
G4ReactionProduct *product = toG4Particle(ablaResult->avv[j],
|
||||
ablaResult->zvv[j],
|
||||
ablaResult->svv[j],
|
||||
ablaResult->enerj[j],
|
||||
ablaResult->pxlab[j],
|
||||
ablaResult->pylab[j],
|
||||
ablaResult->pzlab[j]);
|
||||
for(int j = 0; j < ablaResult->ntrack; ++j)
|
||||
{ // Copy ABLA result to the EventInfo
|
||||
G4ReactionProduct* product =
|
||||
toG4Particle(ablaResult->avv[j], ablaResult->zvv[j], ablaResult->svv[j],
|
||||
ablaResult->enerj[j], ablaResult->pxlab[j],
|
||||
ablaResult->pylab[j], ablaResult->pzlab[j]);
|
||||
if(product)
|
||||
{
|
||||
product->SetCreatorModelID(secID);
|
||||
result->push_back(product);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
G4ParticleDefinition *G4AblaInterface::toG4ParticleDefinition(G4int A, G4int Z, G4int S) const {
|
||||
if (A == 1 && Z == 1 && S == 0) return G4Proton::Proton();
|
||||
else if(A == 1 && Z == 0 && S == 0) return G4Neutron::Neutron();
|
||||
else if(A == 1 && Z == 0 && S == -1) return G4Lambda::Lambda();
|
||||
else if(A == -1 && Z == 1 && S == 0) return G4PionPlus::PionPlus();
|
||||
else if(A == -1 && Z == -1 && S == 0) return G4PionMinus::PionMinus();
|
||||
else if(A == -1 && Z == 0 && S == 0) return G4PionZero::PionZero();
|
||||
else if(A == 0 && Z == 0 && S == 0) return G4Gamma::Gamma();
|
||||
else if(A == 2 && Z == 1 && S == 0) return G4Deuteron::Deuteron();
|
||||
else if(A == 3 && Z == 1 && S == 0) return G4Triton::Triton();
|
||||
else if(A == 3 && Z == 2 && S == 0) return G4He3::He3();
|
||||
else if(A == 4 && Z == 2 && S == 0) return G4Alpha::Alpha();
|
||||
else if(A > 0 && Z > 0 && A > Z) { // Returns ground state ion definition.
|
||||
return G4IonTable::GetIonTable()->GetIon(Z, A, std::abs(S));//S is the number of lambdas
|
||||
} else { // Error, unrecognized particle
|
||||
G4cout << "Can't convert particle with A=" << A << ", Z=" << Z << ", S=" << S << " to G4ParticleDefinition, trouble ahead" << G4endl;
|
||||
if (A == 1 && Z == 1 && S == 0 ) return G4Proton::Proton();
|
||||
else if(A == 1 && Z == 0 && S == 0 ) return G4Neutron::Neutron();
|
||||
else if(A == 1 && Z == 0 && S == -1) return G4Lambda::Lambda();
|
||||
else if(A == -1 && Z == 1 && S == 0 ) return G4PionPlus::PionPlus();
|
||||
else if(A == -1 && Z == -1 && S == 0 ) return G4PionMinus::PionMinus();
|
||||
else if(A == -1 && Z == 0 && S == 0 ) return G4PionZero::PionZero();
|
||||
else if(A == 0 && Z == 0 && S == 0 ) return G4Gamma::Gamma();
|
||||
else if(A == 2 && Z == 1 && S == 0 ) return G4Deuteron::Deuteron();
|
||||
else if(A == 3 && Z == 1 && S == 0 ) return G4Triton::Triton();
|
||||
else if(A == 3 && Z == 2 && S == 0 ) return G4He3::He3();
|
||||
else if(A == 3 && Z == 1 && S == -1) return G4HyperTriton::Definition();
|
||||
else if(A == 4 && Z == 2 && S == 0 ) return G4Alpha::Alpha();
|
||||
else if(A == 4 && Z == 1 && S == -1) return G4HyperH4::Definition();
|
||||
else if(A == 4 && Z == 2 && S == -1) return G4HyperAlpha::Definition();
|
||||
else if(A == 4 && Z == 1 && S == -2) return G4DoubleHyperH4::Definition();
|
||||
else if(A == 4 && Z == 0 && S == -2) return G4DoubleHyperDoubleNeutron::Definition();
|
||||
else if(A == 5 && Z == 2 && S == -1) return G4HyperHe5::Definition();
|
||||
else if(A > 0 && Z > 0 && A > Z )
|
||||
{ // Returns ground state ion definition.
|
||||
auto ionfromtable = G4IonTable::GetIonTable()->GetIon(Z, A, std::abs(S), 0); // S is the number of lambdas
|
||||
if(ionfromtable)
|
||||
return ionfromtable;
|
||||
else
|
||||
{
|
||||
G4cout << "Can't convert particle with A=" << A << ", Z=" << Z << ", S=" << S
|
||||
<< " to G4ParticleDefinition, trouble ahead" << G4endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // Error, unrecognized particle
|
||||
G4cout << "Can't convert particle with A=" << A << ", Z=" << Z << ", S=" << S
|
||||
<< " to G4ParticleDefinition, trouble ahead" << G4endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
G4ReactionProduct *G4AblaInterface::toG4Particle(G4int A, G4int Z, G4int S,
|
||||
G4double kinE,
|
||||
G4double px,
|
||||
G4ReactionProduct* G4AblaInterface::toG4Particle(G4int A, G4int Z, G4int S,
|
||||
G4double kinE, G4double px,
|
||||
G4double py, G4double pz) const {
|
||||
G4ParticleDefinition *def = toG4ParticleDefinition(A, Z, S);
|
||||
if(def == 0) { // Check if we have a valid particle definition
|
||||
G4ParticleDefinition* def = toG4ParticleDefinition(A, Z, S);
|
||||
if(def == 0)
|
||||
{ // Check if we have a valid particle definition
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -138,30 +179,36 @@ G4ReactionProduct *G4AblaInterface::toG4Particle(G4int A, G4int Z, G4int S,
|
||||
const G4ThreeVector momentum(px, py, pz);
|
||||
const G4ThreeVector momentumDirection = momentum.unit();
|
||||
G4DynamicParticle p(def, momentumDirection, energy);
|
||||
G4ReactionProduct *r = new G4ReactionProduct(def);
|
||||
G4ReactionProduct* r = new G4ReactionProduct(def);
|
||||
(*r) = p;
|
||||
return r;
|
||||
}
|
||||
|
||||
void G4AblaInterface::ModelDescription(std::ostream& outFile) const {
|
||||
outFile << "ABLA++ does not provide an implementation of the ApplyYourself method!\n\n";
|
||||
void G4AblaInterface::ModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << "ABLA++ does not provide an implementation of the ApplyYourself method!\n\n";
|
||||
}
|
||||
|
||||
void G4AblaInterface::DeExciteModelDescription(std::ostream& outFile) const {
|
||||
outFile
|
||||
<< "ABLA++ is a statistical model for nuclear de-excitation. It simulates\n"
|
||||
<< "the gamma emission and the evaporation of neutrons, light charged particles\n"
|
||||
<< "and IMFs, as well as fission where applicable. The code included in Geant4\n"
|
||||
<< "is a C++ translation of the original Fortran code ABLA07. Although the model\n"
|
||||
<< "has been recently extended to hypernuclei by including the evaporation of lambda\n"
|
||||
<< "particles. More details about the physics are available in the\n"
|
||||
<< "Geant4 Physics Reference Manual and in the reference articles.\n\n"
|
||||
<< "References:\n"
|
||||
<< "(1) A. Kelic, M. V. Ricciardi, and K. H. Schmidt, in Proceedings of Joint\n"
|
||||
<< "ICTP-IAEA Advanced Workshop on Model Codes for Spallation Reactions,\n"
|
||||
<< "ICTP Trieste, Italy, 4–8 February 2008, edited by D. Filges, S. Leray, Y. Yariv,\n"
|
||||
<< "A. Mengoni, A. Stanculescu, and G. Mank (IAEA INDC(NDS)-530, Vienna, 2008), pp. 181–221.\n\n"
|
||||
<< "(2) J.L. Rodriguez-Sanchez, J.-C. David et al., Phys. Rev. C 98, 021602 (2018)\n\n";
|
||||
void G4AblaInterface::DeExciteModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile
|
||||
<< "ABLA++ is a statistical model for nuclear de-excitation. It simulates\n"
|
||||
<< "the gamma emission and the evaporation of neutrons, light charged\n"
|
||||
<< "particles and IMFs, as well as fission where applicable. The code\n"
|
||||
<< "included in Geant4 is a C++ translation of the original Fortran\n"
|
||||
<< "code ABLA07. Although the model has been recently extended to\n"
|
||||
<< "hypernuclei by including the evaporation of lambda particles.\n"
|
||||
<< "More details about the physics are available in the Geant4\n"
|
||||
<< "Physics Reference Manual and in the reference articles.\n\n"
|
||||
<< "References:\n"
|
||||
<< "(1) A. Kelic, M. V. Ricciardi, and K. H. Schmidt, in Proceedings of "
|
||||
"Joint\n"
|
||||
<< "ICTP-IAEA Advanced Workshop on Model Codes for Spallation Reactions,\n"
|
||||
<< "ICTP Trieste, Italy, 4–8 February 2008, edited by D. Filges, S. Leray, "
|
||||
"Y. Yariv,\n"
|
||||
<< "A. Mengoni, A. Stanculescu, and G. Mank (IAEA INDC(NDS)-530, Vienna, "
|
||||
"2008), pp. 181–221.\n\n"
|
||||
<< "(2) J.L. Rodriguez-Sanchez, J.-C. David et al., Phys. Rev. C 98, "
|
||||
"021602 (2018)\n\n";
|
||||
}
|
||||
|
||||
#endif // ABLAXX_IN_GEANT4_MODE
|
||||
|
||||
Reference in New Issue
Block a user