Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -58,11 +58,16 @@
|
||||
// 4 June 2004, J.P. Wellisch, CERN, Switzerland
|
||||
// resolving technical portability issues.
|
||||
//
|
||||
// 12 June 2012, A. Ribon, CERN, Switzerland
|
||||
// Fixing trivial warning errors of shadowed variables.
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
#include "G4NuclearAbrasionGeometry.hh"
|
||||
#include "G4WilsonRadius.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
G4NuclearAbrasionGeometry::G4NuclearAbrasionGeometry (G4double AP1,
|
||||
@@ -116,26 +121,26 @@ G4double G4NuclearAbrasionGeometry::P ()
|
||||
// whether the projectile is larger or smaller than the target and these radii
|
||||
// in relation to the impact parameter.
|
||||
//
|
||||
G4double P = 0.0;
|
||||
G4double valueP = 0.0;
|
||||
|
||||
if (rT > rP)
|
||||
{
|
||||
if (rT-rP<=r && r<=rT+rP) P = 0.125*R*U*S - 0.125*(0.5*R*U+1.0)*T;
|
||||
else P = -1.0;
|
||||
if (rT-rP<=r && r<=rT+rP) valueP = 0.125*R*U*S - 0.125*(0.5*R*U+1.0)*T;
|
||||
else valueP = -1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rP-rT<=r && r<=rP+rT) P = 0.125*R*U*S - 0.125*(0.5*std::sqrt(n/m)*U-
|
||||
if (rP-rT<=r && r<=rP+rT) valueP = 0.125*R*U*S - 0.125*(0.5*std::sqrt(n/m)*U-
|
||||
(std::sqrt(1.0-m*m)/n - 1.0)*std::sqrt((2.0-m)/std::pow(m,5.0)))*T;
|
||||
else P = (std::sqrt(1.0-m*m)/n-1.0)*std::sqrt(1.0-b*b/n/n);
|
||||
else valueP = (std::sqrt(1.0-m*m)/n-1.0)*std::sqrt(1.0-b*b/n/n);
|
||||
}
|
||||
|
||||
if (!(P <= 1.0 && P>= -1.0))
|
||||
if (!(valueP <= 1.0 && valueP>= -1.0))
|
||||
{
|
||||
if (P > 1.0) P = 1.0;
|
||||
else P = -1.0;
|
||||
if (valueP > 1.0) valueP = 1.0;
|
||||
else valueP = -1.0;
|
||||
}
|
||||
return P;
|
||||
return valueP;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -147,26 +152,26 @@ G4double G4NuclearAbrasionGeometry::F ()
|
||||
// whether the projectile is larger or smaller than the target and these radii
|
||||
// in relation to the impact parameter.
|
||||
//
|
||||
G4double F = 0.0;
|
||||
G4double valueF = 0.0;
|
||||
|
||||
if (rT > rP)
|
||||
{
|
||||
if (rT-rP<=r && r<=rT+rP) F = 0.75*R*S - 0.125*(3.0*R-1.0)*T;
|
||||
else F = 1.0;
|
||||
if (rT-rP<=r && r<=rT+rP) valueF = 0.75*R*S - 0.125*(3.0*R-1.0)*T;
|
||||
else valueF = 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rP-rT<=r && r<=rP+rT) F = 0.75*R*S - 0.125*(3.0*std::sqrt(n/m)-
|
||||
if (rP-rT<=r && r<=rP+rT) valueF = 0.75*R*S - 0.125*(3.0*std::sqrt(n/m)-
|
||||
(1.0-std::pow(1.0-m*m,3.0/2.0))*std::sqrt(1.0-std::pow(1.0-m,2.0))/std::pow(m,3.0))*T;
|
||||
else F = (1.0-std::pow(1.0-m*m,3.0/2.0))*std::sqrt(1.0-b*b/n/n);
|
||||
else valueF = (1.0-std::pow(1.0-m*m,3.0/2.0))*std::sqrt(1.0-b*b/n/n);
|
||||
}
|
||||
|
||||
if (!(F <= 1.0 && F>= 0.0))
|
||||
if (!(valueF <= 1.0 && valueF>= 0.0))
|
||||
{
|
||||
if (F > 1.0) F = 1.0;
|
||||
else F = 0.0;
|
||||
if (valueF > 1.0) valueF = 1.0;
|
||||
else valueF = 0.0;
|
||||
}
|
||||
return F;
|
||||
return valueF;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
// algorithm not properly defined if either:
|
||||
// rT > rP && rsq < rTsq - rPsq) or (rP > rT && rsq < rPsq - rTsq)
|
||||
//
|
||||
// 12 June 2012, A. Ribon, CERN, Switzerland
|
||||
// Fixing trivial warning errors of shadowed variables.
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -83,6 +86,8 @@
|
||||
#include "G4NuclearAbrasionGeometry.hh"
|
||||
#include "G4WilsonAblationModel.hh"
|
||||
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4Evaporation.hh"
|
||||
#include "G4FermiBreakUp.hh"
|
||||
@@ -100,8 +105,8 @@
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4bool useAblation1)
|
||||
:G4HadronicInteraction("G4WilsonAbrasion")
|
||||
G4WilsonAbrasionModel::G4WilsonAbrasionModel(G4bool useAblation1)
|
||||
:G4HadronicInteraction("G4WilsonAbrasion")
|
||||
{
|
||||
// Send message to stdout to advise that the G4Abrasion model is being used.
|
||||
PrintWelcomeMessage();
|
||||
@@ -159,20 +164,31 @@ G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4bool useAblation1)
|
||||
conserveMomentum = true;
|
||||
}
|
||||
|
||||
|
||||
G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4ExcitationHandler *aExcitationHandler)
|
||||
void G4WilsonAbrasionModel::ModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << "G4WilsonAbrasionModel is a macroscopic treatment of\n"
|
||||
<< "nucleus-nucleus collisions using simple geometric arguments.\n"
|
||||
<< "The smaller projectile nucleus gouges out a part of the larger\n"
|
||||
<< "target nucleus, leaving a residual nucleus and a fireball\n"
|
||||
<< "region where the projectile and target intersect. The fireball"
|
||||
<< "is then treated as a highly excited nuclear fragment. This\n"
|
||||
<< "model is based on the NUCFRG2 model and is valid for all\n"
|
||||
<< "projectile energies between 70 MeV/n and 10.1 GeV/n. \n";
|
||||
}
|
||||
|
||||
G4WilsonAbrasionModel::G4WilsonAbrasionModel(G4ExcitationHandler* aExcitationHandler)
|
||||
{
|
||||
//
|
||||
//
|
||||
// Send message to stdout to advise that the G4Abrasion model is being used.
|
||||
//
|
||||
|
||||
PrintWelcomeMessage();
|
||||
//
|
||||
//
|
||||
|
||||
// Set the default verbose level to 0 - no output.
|
||||
//
|
||||
|
||||
verboseLevel = 0;
|
||||
//
|
||||
|
||||
theAblation = NULL; //A.R. 26-Jul-2012 Coverity fix.
|
||||
useAblation = false; //A.R. 14-Aug-2012 Coverity fix.
|
||||
|
||||
//
|
||||
// The user is able to provide the excitation handler as well as an argument
|
||||
// which is provided in this instantiation is used to determine
|
||||
@@ -198,6 +214,7 @@ G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4ExcitationHandler *aExcitationHa
|
||||
// npK, when mutiplied by the nuclear Fermi momentum, determines the range of
|
||||
// momentum over which the secondary nucleon momentum is sampled.
|
||||
//
|
||||
r0sq = 0.0; //A.R. 14-Aug-2012 Coverity fix.
|
||||
npK = 5.0;
|
||||
B = 10.0 * MeV;
|
||||
third = 1.0 / 3.0;
|
||||
@@ -553,14 +570,14 @@ G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
|
||||
if (fragmentP != NULL)
|
||||
{
|
||||
G4LorentzVector lorentzVector = fragmentP->GetMomentum();
|
||||
G4double m = lorentzVector.m();
|
||||
G4double fragmentM = lorentzVector.m();
|
||||
if (conserveMomentum)
|
||||
fragmentP->SetMomentum
|
||||
(G4LorentzVector(pBalance,std::sqrt(pBalance.mag2()+m*m+1.0*eV*eV)));
|
||||
(G4LorentzVector(pBalance,std::sqrt(pBalance.mag2()+fragmentM*fragmentM+1.0*eV*eV)));
|
||||
else
|
||||
{
|
||||
G4double mg = fragmentP->GetGroundStateMass();
|
||||
fragmentP->SetMomentum(lorentzVector.boost(-boost * mg/m));
|
||||
G4double fragmentGroundStateM = fragmentP->GetGroundStateMass();
|
||||
fragmentP->SetMomentum(lorentzVector.boost(-boost * fragmentGroundStateM/fragmentM));
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -703,7 +720,7 @@ G4Fragment *G4WilsonAbrasionModel::GetAbradedNucleons (G4int Dabr, G4double A,
|
||||
//
|
||||
//
|
||||
// Initialise variables. tau is the Fermi radius of the nucleus. The variables
|
||||
// p..., C... and g(amma) are used to help sample the secondary nucleon
|
||||
// p..., C... and gamma are used to help sample the secondary nucleon
|
||||
// spectrum.
|
||||
//
|
||||
|
||||
@@ -716,7 +733,7 @@ G4Fragment *G4WilsonAbrasionModel::GetAbradedNucleons (G4int Dabr, G4double A,
|
||||
G4double C1 = 1.0;
|
||||
G4double C2 = 0.03;
|
||||
G4double C3 = 0.0002;
|
||||
G4double g = 90.0 * MeV;
|
||||
G4double gamma = 90.0 * MeV;
|
||||
G4double maxn = C1 + C2 + C3;
|
||||
//
|
||||
//
|
||||
@@ -746,7 +763,7 @@ G4Fragment *G4WilsonAbrasionModel::GetAbradedNucleons (G4int Dabr, G4double A,
|
||||
while (p <= 0.0) p = npK * pK * G4UniformRand();
|
||||
G4double psq = p * p;
|
||||
found = maxn * G4UniformRand() < C1*std::exp(-psq/p1sq/2.0) +
|
||||
C2*std::exp(-psq/p2sq/2.0) + C3*std::exp(-psq/p3sq/2.0) + p/g/std::sinh(p/g);
|
||||
C2*std::exp(-psq/p2sq/2.0) + C3*std::exp(-psq/p3sq/2.0) + p/gamma/std::sinh(p/gamma);
|
||||
}
|
||||
//
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user