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,15 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
19 Oct 2017 - A.Ribon (hadr-cohe-V10-03-06)
--------------------------------------------------------
- G4NuclNuclDiffuseElastic : Grichine's simplification of this class to
avoid reproducibility violations in ion-ion elastic scattering.
On-the-fly sampling of the nucleus-nucleus elastic scattering is done
according to the Coulomb law in the limits 0 < theta < thetaC, where
thetaC is the Coulomb grazing angle: this means that hadron elastic
works like Coulomb in the limits.
23 Jun 2017 - Dennis Wright (hadr-cohe-V10-03-05)
--------------------------------------------------------
- G4NuclNuclDiffuseElastic ctor: variables fCofAlphaMax and fCofAlphaCoulomb
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4NuclNuclDiffuseElastic.hh 94676 2015-12-02 09:51:20Z gunter $
// $Id: G4NuclNuclDiffuseElastic.hh 106722 2017-10-20 09:48:19Z gcosmo $
//
//
// G4 Model: optical elastic scattering with 4-momentum balance
@@ -95,7 +95,9 @@ public:
G4double SampleTableT(const G4ParticleDefinition* aParticle,
G4double p, G4double Z, G4double A);
G4double SampleThetaCMS(const G4ParticleDefinition* aParticle, G4double p, G4double A);
G4double SampleThetaCMS( const G4ParticleDefinition* aParticle, G4double p, G4double A);
G4double SampleCoulombMuCMS( const G4ParticleDefinition* aParticle, G4double p);
G4double SampleTableThetaCMS(const G4ParticleDefinition* aParticle, G4double p,
G4double Z, G4double A);
@@ -358,6 +360,7 @@ private:
G4double fEtaRatio;
G4double fReZ;
G4double fCoulombMuC;
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NuclNuclDiffuseElastic.cc 104887 2017-06-26 07:12:43Z gcosmo $
// $Id: G4NuclNuclDiffuseElastic.cc 106722 2017-10-20 09:48:19Z gcosmo $
//
//
// Physics model class G4NuclNuclDiffuseElastic
@@ -120,6 +120,7 @@ G4NuclNuclDiffuseElastic::G4NuclNuclDiffuseElastic()
fMaxL = 0;
fNuclearRadiusCof = 1.0;
fCoulombMuC = 0.0;
}
//////////////////////////////////////////////////////////////////////////////
@@ -771,13 +772,16 @@ G4NuclNuclDiffuseElastic::SampleThetaCMS(const G4ParticleDefinition* particle,
////////////////////////////////////////////////////////////////////////////
//
// Return inv momentum transfer -t > 0 from initialisation table
// Interface function. Return inv momentum transfer -t > 0 from initialisation table
G4double G4NuclNuclDiffuseElastic::SampleInvariantT( const G4ParticleDefinition* aParticle, G4double p,
G4int Z, G4int A)
{
fParticle = aParticle;
G4double m1 = fParticle->GetPDGMass();
fAtomicNumber = G4double(Z);
fAtomicWeight = G4double(A);
G4double t(0.), m1 = fParticle->GetPDGMass();
G4double totElab = std::sqrt(m1*m1+p*p);
G4double mass2 = G4NucleiProperties::GetNuclearMass(A, Z);
G4LorentzVector lv1(p,0.0,0.0,totElab);
@@ -790,10 +794,45 @@ G4double G4NuclNuclDiffuseElastic::SampleInvariantT( const G4ParticleDefinition*
G4ThreeVector p1 = lv1.vect();
G4double momentumCMS = p1.mag();
G4double t = SampleTableT( aParticle, momentumCMS, G4double(Z), G4double(A) ); // sample theta2 in cms
// t = SampleTableT( aParticle, momentumCMS, G4double(Z), G4double(A) ); // sample theta2 in cms
t = SampleCoulombMuCMS( aParticle, momentumCMS); // sample theta2 in cms
return t;
}
////////////////////////////////////////////////////////////////////////////
//
// Return inv momentum transfer -t > 0 as Coulomb scattering <= thetaC
G4double G4NuclNuclDiffuseElastic::SampleCoulombMuCMS( const G4ParticleDefinition* aParticle, G4double p)
{
G4double t(0.), rand(0.), mu(0.);
G4double A1 = G4double( aParticle->GetBaryonNumber() );
G4double R1 = CalculateNuclearRad(A1);
fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
fNuclearRadius += R1;
InitDynParameters(fParticle, p);
fCoulombMuC = fHalfRutThetaTg2/(1.+fHalfRutThetaTg2);
rand = G4UniformRand();
// sample (1-cosTheta) in 0 < Theta < ThetaC as Coulomb scattering
mu = fCoulombMuC*rand*fAm;
mu /= fAm + fCoulombMuC*( 1. - rand );
t = 4.*p*p*mu;
return t;
}
////////////////////////////////////////////////////////////////////////////
//
// Return inv momentum transfer -t > 0 from initialisation table