Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
File diff suppressed because it is too large Load Diff
@@ -91,44 +91,49 @@ G4ReactionProductVector *G4AblaInterface::DeExcite(G4Fragment &aFragment) {
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->plab[j]*std::sin(ablaResult->tetlab[j]*pi/180.0)*std::cos(ablaResult->philab[j]*pi/180.0),
ablaResult->plab[j]*std::sin(ablaResult->tetlab[j]*pi/180.0)*std::sin(ablaResult->philab[j]*pi/180.0),
ablaResult->plab[j]*std::cos(ablaResult->tetlab[j]*pi/180.0));
ablaResult->pxlab[j],
ablaResult->pylab[j],
ablaResult->pzlab[j]);
if(product)
result->push_back(product);
}
return result;
}
G4ParticleDefinition *G4AblaInterface::toG4ParticleDefinition(G4int A, G4int Z) const {
if (A == 1 && Z == 1) return G4Proton::Proton();
else if(A == 1 && Z == 0) return G4Neutron::Neutron();
else if(A == -1 && Z == 1) return G4PionPlus::PionPlus();
else if(A == -1 && Z == -1) return G4PionMinus::PionMinus();
else if(A == -1 && Z == 0) return G4PionZero::PionZero();
else if(A == 0 && Z == 0) return G4Gamma::Gamma();
else if(A == 2 && Z == 1) return G4Deuteron::Deuteron();
else if(A == 3 && Z == 1) return G4Triton::Triton();
else if(A == 3 && Z == 2) return G4He3::He3();
else if(A == 4 && Z == 2) return G4Alpha::Alpha();
else if(A > 0 && Z > 0 && A > Z) { // Returns ground state ion definition. No hyper-nucleus allows in Geant4
return G4IonTable::GetIonTable()->GetIon(Z, A, 0);
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;
return 0;
}
}
G4ReactionProduct *G4AblaInterface::toG4Particle(G4int A, G4int Z,
G4ReactionProduct *G4AblaInterface::toG4Particle(G4int A, G4int Z, G4int S,
G4double kinE,
G4double px,
G4double py, G4double pz) const {
const G4ParticleDefinition *def = toG4ParticleDefinition(A, Z);
G4ParticleDefinition *def = toG4ParticleDefinition(A, Z, S);
if(def == 0) { // Check if we have a valid particle definition
return 0;
}
const G4double energy = kinE * MeV;
const G4ThreeVector momentum(px, py, pz);
const G4ThreeVector momentumDirection = momentum.unit();
@@ -145,15 +150,18 @@ void G4AblaInterface::ModelDescription(std::ostream& outFile) const {
void G4AblaInterface::DeExciteModelDescription(std::ostream& outFile) const {
outFile
<< "ABLA++ is a statistical model for nuclear de-excitation. It simulates\n"
<< "evaporation of neutrons, protons and alpha particles, as well as fission\n"
<< "where applicable. The code included in Geant4 is a C++ translation of the\n"
<< "original Fortran code. More details about the physics are available in the\n"
<< "the Geant4 Physics Reference Manual and in the reference articles.\n\n"
<< "Reference:\n"
<< "A. Kelic, M. V. Ricciardi, and K. H. Schmidt, in Proceedings of Joint\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, 48 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. 181221.\n\n";
<< "A. Mengoni, A. Stanculescu, and G. Mank (IAEA INDC(NDS)-530, Vienna, 2008), pp. 181221.\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