Import Geant4 10.5.1 source tree
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
@@ -169,7 +168,7 @@ void G4BetheBlochModel::SetupParameters()
|
||||
if(particle->GetLeptonNumber() == 0) {
|
||||
G4int iz = G4lrint(q);
|
||||
if(iz <= 1) {
|
||||
formfact = (spin == 0.0 && mass < GeV) ? 1.181e-6 : 1.548e-6;
|
||||
formfact = (spin == 0.0 && mass < GeV) ? 1.181e-6 : 1.548e-6;
|
||||
} else {
|
||||
G4double x = nist->GetA27(iz);
|
||||
formfact = 3.969e-6*x*x;
|
||||
@@ -271,23 +270,23 @@ G4double G4BetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
|
||||
if(material != currentMaterial) {
|
||||
currentMaterial = material;
|
||||
baseMaterial = material->GetBaseMaterial()
|
||||
? material->GetBaseMaterial() : material;
|
||||
? material->GetBaseMaterial() : material;
|
||||
iICRU90 = fICRU90->GetIndex(baseMaterial);
|
||||
}
|
||||
if(iICRU90 >= 0) {
|
||||
G4double e = kineticEnergy*proton_mass_c2/mass;
|
||||
G4double dedx = 0.0;
|
||||
if(chargeSquare > 1.1 && e < fAlphaTlimit) {
|
||||
dedx = fICRU90->GetElectronicDEDXforAlpha(iICRU90, e)
|
||||
*material->GetDensity()*0.25;
|
||||
dedx = fICRU90->GetElectronicDEDXforAlpha(iICRU90, e)
|
||||
*material->GetDensity()*0.25;
|
||||
} else if(chargeSquare < 1.1 && e < fProtonTlimit) {
|
||||
dedx = fICRU90->GetElectronicDEDXforProton(iICRU90, e)
|
||||
*material->GetDensity();
|
||||
dedx = fICRU90->GetElectronicDEDXforProton(iICRU90, e)
|
||||
*material->GetDensity();
|
||||
}
|
||||
if(dedx > 0.0) {
|
||||
dedx += (G4Log(xc) + (1.0 - xc)*beta2)*twopi_mc2_rcl2
|
||||
*eDensity/beta2;
|
||||
return std::max(chargeSquare*dedx, 0.0);
|
||||
if(cutEnergy < tmax) {
|
||||
dedx += (G4Log(xc) + (1.0 - xc)*beta2)*twopi_mc2_rcl2
|
||||
*eDensity/beta2;
|
||||
return std::max(chargeSquare*dedx, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,8 +144,6 @@ G4double G4IonCoulombScatteringModel::ComputeCrossSectionPerAtom(
|
||||
ioncross->SetupKinematic(kinEnergy, tmass);
|
||||
ioncross->SetupTarget(Z, kinEnergy, heavycorr);
|
||||
cross = ioncross->NuclearCrossSection();
|
||||
|
||||
//cout<< "..........cross "<<G4BestUnit(cross,"Surface") <<endl;
|
||||
return cross;
|
||||
}
|
||||
|
||||
@@ -158,9 +156,7 @@ void G4IonCoulombScatteringModel::SampleSecondaries(
|
||||
G4double, G4double)
|
||||
{
|
||||
G4double kinEnergy = dp->GetKineticEnergy();
|
||||
|
||||
DefineMaterial(couple);
|
||||
|
||||
SetupParticle(dp->GetDefinition());
|
||||
|
||||
// Choose nucleus
|
||||
@@ -171,38 +167,42 @@ void G4IonCoulombScatteringModel::SampleSecondaries(
|
||||
G4double mass2 = G4NucleiProperties::GetNuclearMass(ia, iz);
|
||||
|
||||
ioncross->SetupKinematic(kinEnergy, mass2);
|
||||
|
||||
ioncross->SetupTarget(currentElement->GetZ(), kinEnergy, heavycorr);
|
||||
|
||||
//scattering angle, z1 == (1-cost)
|
||||
G4double z1 = ioncross->SampleCosineTheta();
|
||||
if(z1 > 2.0) { z1 = 2.0; }
|
||||
else if(z1 < 0.0) { z1 = 0.0; }
|
||||
|
||||
/*
|
||||
G4cout << "Sample: " << particle->GetParticleName()
|
||||
<< " mass(GeV)= " << mass/GeV
|
||||
<< " Ekin(MeV)= " << kinEnergy << " cost= " << 1. - z1 << G4endl;
|
||||
G4cout << " Z= " << iz << " A= " << ia
|
||||
<< " mass(GeV)= " << mass2/GeV << G4endl;
|
||||
*/
|
||||
G4double cost = 1.0 - z1;
|
||||
G4double sint = sqrt(z1*(1.0 + cost));
|
||||
G4double phi = twopi * G4UniformRand();
|
||||
|
||||
// kinematics in the Lab system
|
||||
G4double ptot = dp->GetTotalMomentum();
|
||||
G4double e1 = dp->GetTotalEnergy();
|
||||
G4double ptot = sqrt(kinEnergy*(kinEnergy + 2.0*mass));
|
||||
G4double e1 = mass + kinEnergy;
|
||||
|
||||
// Lab. system kinematics along projectile direction
|
||||
G4LorentzVector v0 = G4LorentzVector(0, 0, ptot, e1);
|
||||
G4double bet = ptot/(e1 + mass2);
|
||||
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
|
||||
|
||||
G4LorentzVector v0 = G4LorentzVector(0, 0, ptot, e1+mass2);
|
||||
G4LorentzVector v1 = G4LorentzVector(0, 0, ptot, e1);
|
||||
G4ThreeVector bst = v0.boostVector();
|
||||
v1.boost(-bst);
|
||||
// CM projectile
|
||||
G4double momCM = gam*(ptot - bet*e1);
|
||||
G4double eCM = gam*(e1 - bet*ptot);
|
||||
G4double momCM = v1.pz();
|
||||
|
||||
// Momentum after scattering of incident particle
|
||||
G4double pxCM = momCM*sint*cos(phi);
|
||||
G4double pyCM = momCM*sint*sin(phi);
|
||||
G4double pzCM = momCM*cost;
|
||||
v1.setX(momCM*sint*cos(phi));
|
||||
v1.setY(momCM*sint*sin(phi));
|
||||
v1.setZ(momCM*cost);
|
||||
|
||||
// CM--->Lab
|
||||
G4LorentzVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM), gam*(eCM + bet*pzCM));
|
||||
v1.boost(bst);
|
||||
|
||||
// Rotate to global system
|
||||
G4ThreeVector dir = dp->GetMomentumDirection();
|
||||
@@ -213,7 +213,7 @@ void G4IonCoulombScatteringModel::SampleSecondaries(
|
||||
|
||||
// recoil v0 energy is kinetic
|
||||
v0 -= v1;
|
||||
G4double trec = v0.e();
|
||||
G4double trec = std::max(v0.e() - mass2, 0.0);
|
||||
G4double edep = 0.0;
|
||||
|
||||
G4double tcut = recoilThreshold;
|
||||
@@ -241,6 +241,8 @@ void G4IonCoulombScatteringModel::SampleSecondaries(
|
||||
finalT = 0.0;
|
||||
}
|
||||
edep = std::max(edep, 0.0);
|
||||
//G4cout << "Efinal(MeV)= " << finalT << " Edep(MeV)= " << edep
|
||||
// << " Trec(MeV)= " << trec << G4endl;
|
||||
fParticleChange->SetProposedKineticEnergy(finalT);
|
||||
fParticleChange->ProposeLocalEnergyDeposit(edep);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4ModifiedTsai::G4ModifiedTsai(const G4String&)
|
||||
: G4VEmAngularDistribution("AngularGenUrban")
|
||||
: G4VEmAngularDistribution("ModifiedTsai")
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "Randomize.hh"
|
||||
|
||||
G4SauterGavrilaAngularDistribution::G4SauterGavrilaAngularDistribution()
|
||||
: G4VEmAngularDistribution("AngularGenSauterGavrila")
|
||||
: G4VEmAngularDistribution("SauterGavrila")
|
||||
{}
|
||||
|
||||
G4SauterGavrilaAngularDistribution::~G4SauterGavrilaAngularDistribution()
|
||||
|
||||
@@ -85,8 +85,8 @@ void G4eMultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
|
||||
void G4eMultipleScattering::StreamProcessInfo(std::ostream& out) const
|
||||
{
|
||||
out << " RangeFactor= " << RangeFactor()
|
||||
<< ", stepLimitType: " << StepLimitType()
|
||||
<< ", latDisplacement: " << LateralDisplasmentFlag();
|
||||
<< ", stepLimType: " << StepLimitType()
|
||||
<< ", latDisp: " << LateralDisplasmentFlag();
|
||||
if(StepLimitType() == fUseDistanceToBoundary) {
|
||||
out << ", skin= " << Skin() << ", geomFactor= " << GeomFactor();
|
||||
}
|
||||
|
||||
@@ -206,9 +206,8 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
|
||||
// Choose nucleus
|
||||
//last two :cutEnergy= min e kinEnergy=max
|
||||
currentElement = SelectRandomAtom(couple,particle,
|
||||
kinEnergy,cutEnergy,kinEnergy);
|
||||
|
||||
currentElement = SelectRandomAtom(couple, particle, kinEnergy,
|
||||
cutEnergy, kinEnergy);
|
||||
G4double Z = currentElement->GetZ();
|
||||
G4int iz = G4int(Z);
|
||||
G4int ia = SelectIsotopeNumber(currentElement);
|
||||
@@ -227,23 +226,24 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
G4double phi = twopi* G4UniformRand();
|
||||
|
||||
// kinematics in the Lab system
|
||||
G4double ptot = dp->GetTotalMomentum();
|
||||
G4double e1 = dp->GetTotalEnergy();
|
||||
G4double ptot = sqrt(kinEnergy*(kinEnergy + 2.0*mass));
|
||||
G4double e1 = mass + kinEnergy;
|
||||
|
||||
// Lab. system kinematics along projectile direction
|
||||
G4LorentzVector v0 = G4LorentzVector(0, 0, ptot, e1);
|
||||
G4double bet = ptot/(v0.e() + mass2);
|
||||
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
|
||||
G4LorentzVector v0 = G4LorentzVector(0, 0, ptot, e1+mass2);
|
||||
G4LorentzVector v1 = G4LorentzVector(0, 0, ptot, e1);
|
||||
G4ThreeVector bst = v0.boostVector();
|
||||
v1.boost(-bst);
|
||||
// CM projectile
|
||||
G4double momCM = v1.pz();
|
||||
|
||||
// Momentum after scattering of incident particle
|
||||
v1.setX(momCM*sint*cos(phi));
|
||||
v1.setY(momCM*sint*sin(phi));
|
||||
v1.setZ(momCM*cost);
|
||||
|
||||
//CM Projectile
|
||||
G4double momCM = gam*(ptot - bet*e1);
|
||||
G4double eCM = gam*(e1 - bet*ptot);
|
||||
//energy & momentum after scattering of incident particle
|
||||
G4double pxCM = momCM*sint*cos(phi);
|
||||
G4double pyCM = momCM*sint*sin(phi);
|
||||
G4double pzCM = momCM*cost;
|
||||
|
||||
//CM--->Lab
|
||||
G4LorentzVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM), gam*(eCM + bet*pzCM));
|
||||
// CM--->Lab
|
||||
v1.boost(bst);
|
||||
|
||||
// Rotate to global system
|
||||
G4ThreeVector dir = dp->GetMomentumDirection();
|
||||
@@ -254,7 +254,7 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
|
||||
// recoil
|
||||
v0 -= v1;
|
||||
G4double trec = v0.e();
|
||||
G4double trec = std::max(v0.e() - mass2, 0.0);
|
||||
G4double edep = 0.0;
|
||||
|
||||
G4double tcut = recoilThreshold;
|
||||
|
||||
@@ -92,15 +92,16 @@ void G4eplusTo2GammaOKVIModel::Initialise(const G4ParticleDefinition* p,
|
||||
f3GModel->Initialise(p, cuts);
|
||||
fCuts = &cuts;
|
||||
fGammaTh = G4EmParameters::Instance()->LowestTripletEnergy();
|
||||
f3GModel->SetDelta(fDelta);
|
||||
|
||||
if(IsMaster()) {
|
||||
if(!fCrossSection) {
|
||||
f3GModel->SetDelta(fDelta);
|
||||
G4double emin = 10*eV;
|
||||
G4double emax = 100*TeV;
|
||||
G4int nbins = 20*G4lrint(std::log10(emax/emin));
|
||||
fCrossSection = new G4PhysicsLogVector(emin, emax, nbins);
|
||||
f3GProbability= new G4PhysicsLogVector(emin, emax, nbins);
|
||||
fCrossSection = new G4PhysicsLogVector(emin, emax, nbins);
|
||||
fCrossSection3G = new G4PhysicsLogVector(emin, emax, nbins);
|
||||
f3GProbability = new G4PhysicsLogVector(emin, emax, nbins);
|
||||
fCrossSection->SetSpline(true);
|
||||
fCrossSection3G->SetSpline(true);
|
||||
f3GProbability->SetSpline(true);
|
||||
|
||||
@@ -266,24 +266,24 @@ void G4hCoulombScatteringModel::SampleSecondaries(
|
||||
wokvi->SampleSingleScattering(costmin, costmax, ratio);
|
||||
|
||||
// kinematics in the Lab system
|
||||
G4double ptot = dp->GetTotalMomentum();
|
||||
G4double e1 = dp->GetTotalEnergy();
|
||||
G4double ptot = sqrt(kinEnergy*(kinEnergy + 2.0*mass));
|
||||
G4double e1 = mass + kinEnergy;
|
||||
|
||||
// Lab. system kinematics along projectile direction
|
||||
G4LorentzVector v0 = G4LorentzVector(0, 0, ptot, e1 + mass2);
|
||||
G4double bet = ptot/v0.e();
|
||||
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
|
||||
|
||||
G4LorentzVector v0 = G4LorentzVector(0, 0, ptot, e1+mass2);
|
||||
G4LorentzVector v1 = G4LorentzVector(0, 0, ptot, e1);
|
||||
G4ThreeVector bst = v0.boostVector();
|
||||
v1.boost(-bst);
|
||||
// CM projectile
|
||||
G4double momCM = gam*(ptot - bet*e1);
|
||||
G4double eCM = gam*(e1 - bet*ptot);
|
||||
// energy & momentum after scattering of incident particle
|
||||
G4double pxCM = momCM*newDirection.x();
|
||||
G4double pyCM = momCM*newDirection.y();
|
||||
G4double pzCM = momCM*newDirection.z();
|
||||
G4double momCM = v1.pz();
|
||||
|
||||
// Momentum after scattering of incident particle
|
||||
v1.setX(momCM*newDirection.x());
|
||||
v1.setY(momCM*newDirection.y());
|
||||
v1.setZ(momCM*newDirection.z());
|
||||
|
||||
// CM--->Lab
|
||||
G4LorentzVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM), gam*(eCM + bet*pzCM));
|
||||
v1.boost(bst);
|
||||
|
||||
G4ThreeVector dir = dp->GetMomentumDirection();
|
||||
newDirection = v1.vect().unit();
|
||||
@@ -293,7 +293,7 @@ void G4hCoulombScatteringModel::SampleSecondaries(
|
||||
|
||||
// recoil
|
||||
v0 -= v1;
|
||||
G4double trec = v0.e() - mass2;
|
||||
G4double trec = std::max(v0.e() - mass2, 0.0);
|
||||
G4double edep = 0.0;
|
||||
|
||||
G4double tcut = recoilThreshold;
|
||||
|
||||
@@ -84,8 +84,8 @@ void G4hMultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
|
||||
void G4hMultipleScattering::StreamProcessInfo(std::ostream& out) const
|
||||
{
|
||||
out << " RangeFactor= " << RangeFactor()
|
||||
<< ", stepLimitType: " << StepLimitType()
|
||||
<< ", latDisplacement: " << LateralDisplasmentFlag();
|
||||
<< ", stepLimType: " << StepLimitType()
|
||||
<< ", latDisp: " << LateralDisplasmentFlag();
|
||||
if(StepLimitType() == fUseDistanceToBoundary) {
|
||||
out << ", skin= " << Skin() << ", geomFactor= " << GeomFactor();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user