Import Geant4 11.1.2 source tree
This commit is contained in:
@@ -6,6 +6,23 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-06-13 V.Ivanchenko (emstand-V11-00-24)
|
||||
- G4LindhardSorensenIonModel - do not try to use ICRU73 data for projectile Z>80
|
||||
|
||||
## 2023-04-20 V.Ivanchenko (emstand-V11-00-23)
|
||||
- G4LindhardSorensenIonModel - updated effective charge of an ion at each
|
||||
step of simulation or at each call to G4EmCalculator
|
||||
|
||||
## 2023-04-17 V.Ivanchenko
|
||||
- G4LinhardSorensenModel - added extra protection and improved debug printout
|
||||
|
||||
## 2023-02-24 V.Ivanchenko
|
||||
- G4WentzelOKandVIxSection - fix numeric instability for the extreme case of
|
||||
very small kinetic energy (< 1 eV)
|
||||
|
||||
## 2023-02-21 V.Ivanchenko
|
||||
- G4WentzelOKandVIxSection - fix #2530, improved comments
|
||||
|
||||
## 2022-12-21 V.Ivanchenko (emstand-V11-00-22)
|
||||
- G4GoudsmithSoundersonMscModel - fixed warning when build CMSSW
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class G4WentzelOKandVIxSection
|
||||
|
||||
public:
|
||||
|
||||
explicit G4WentzelOKandVIxSection(G4bool comb=true);
|
||||
explicit G4WentzelOKandVIxSection(G4bool combined=true);
|
||||
|
||||
virtual ~G4WentzelOKandVIxSection();
|
||||
|
||||
@@ -139,7 +139,10 @@ protected:
|
||||
G4double coeff;
|
||||
G4double cosTetMaxElec = 1.0;
|
||||
G4double cosTetMaxNuc = 1.0;
|
||||
G4double cosThetaMax = -1.0;
|
||||
|
||||
// for the combined mode it is cos(thetaMax)
|
||||
// for single scattering it is cos(thetaMin)
|
||||
G4double cosThetaMax = 1.0;
|
||||
|
||||
G4double chargeSquare = 0.0;
|
||||
G4double charge3 = 0.0;
|
||||
|
||||
@@ -121,7 +121,8 @@ G4LindhardSorensenIonModel::GetChargeSquareRatio(const G4ParticleDefinition* p,
|
||||
const G4Material* mat,
|
||||
G4double kinEnergy)
|
||||
{
|
||||
return corr->EffectiveChargeSquareRatio(p,mat,kinEnergy);
|
||||
chargeSquare = corr->EffectiveChargeSquareRatio(p,mat,kinEnergy);
|
||||
return chargeSquare;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -258,15 +259,17 @@ void G4LindhardSorensenIonModel::CorrectionsAlongStep(
|
||||
const G4double q2 = corr->EffectiveChargeSquareRatio(p, mat, e);
|
||||
const G4int Z = p->GetAtomicNumber();
|
||||
|
||||
G4double res;
|
||||
G4double res = 0.0;
|
||||
if(escaled <= fElimit) {
|
||||
// data from ICRU73 or ICRU90
|
||||
res = fIonData->GetDEDX(mat, Z, escaled, G4Log(escaled));
|
||||
/*
|
||||
G4cout << "GetDEDX for Z=" << Z << " in " << mat->GetName()
|
||||
<< " Escaled=" << escaled << " E="
|
||||
<< e << " dEdx=" << res << G4endl;
|
||||
*/
|
||||
if(Z > 2 && Z <= 80) {
|
||||
res = fIonData->GetDEDX(mat, Z, escaled, G4Log(escaled));
|
||||
/*
|
||||
G4cout << "GetDEDX for Z=" << Z << " in " << mat->GetName()
|
||||
<< " Escaled=" << escaled << " E="
|
||||
<< e << " dEdx=" << res << G4endl;
|
||||
*/
|
||||
}
|
||||
if(res > 0.0) {
|
||||
auto pcuts = couple->GetProductionCuts();
|
||||
G4double cut = (nullptr == pcuts) ? tmax : pcuts->GetProductionCut(1);
|
||||
@@ -310,16 +313,16 @@ void G4LindhardSorensenIonModel::CorrectionsAlongStep(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4LindhardSorensenIonModel::SampleSecondaries(
|
||||
vector<G4DynamicParticle*>* vdp,
|
||||
std::vector<G4DynamicParticle*>* vdp,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
const G4DynamicParticle* dp,
|
||||
G4double minKinEnergy,
|
||||
G4double cut,
|
||||
G4double maxEnergy)
|
||||
{
|
||||
G4double kineticEnergy = dp->GetKineticEnergy();
|
||||
// take into account formfactor
|
||||
G4double tmax = MaxSecondaryEnergy(dp->GetDefinition(),kineticEnergy);
|
||||
|
||||
G4double minKinEnergy = std::min(cut, tmax);
|
||||
G4double maxKinEnergy = std::min(maxEnergy,tmax);
|
||||
if(minKinEnergy >= maxKinEnergy) { return; }
|
||||
|
||||
|
||||
@@ -346,34 +346,32 @@ G4WentzelOKandVIxSection::SampleSingleScattering(G4double cosTMin,
|
||||
}
|
||||
}
|
||||
if(cost1 > cost2) {
|
||||
|
||||
G4double w1 = 1. - cost1 + screenZ;
|
||||
G4double w2 = 1. - cost2 + screenZ;
|
||||
G4double z1 = w1*w2/(w1 + rndmEngineMod->flat()*(w2 - w1)) - screenZ;
|
||||
|
||||
G4double w1 = 1. - cost1;
|
||||
G4double w2 = 1. - cost2;
|
||||
G4double w3 = rndmEngineMod->flat()*(w2 - w1);
|
||||
G4double z1 = ((w2 - w3)*screenZ + w1*w2)/(screenZ + w1 + w3);
|
||||
G4double fm = 1.0;
|
||||
|
||||
if(fNucFormfactor == fExponentialNF) {
|
||||
fm += formf*z1;
|
||||
fm = 1.0/(fm*fm);
|
||||
} else if(fNucFormfactor == fGaussianNF) {
|
||||
fm = G4Exp(-2*formf*z1);
|
||||
} else if(fNucFormfactor == fFlatNF) {
|
||||
static const G4double ccoef = 0.00508/MeV;
|
||||
static const G4double ccoef = 0.00508/CLHEP::MeV;
|
||||
G4double x = std::sqrt(2.*mom2*z1)*ccoef*2.;
|
||||
fm = FlatFormfactor(x);
|
||||
fm *= FlatFormfactor(x*0.6
|
||||
*fG4pow->A13(fNistManager->GetAtomicMassAmu(targetZ)));
|
||||
fm *= FlatFormfactor(x*0.6*fG4pow->A13(fNistManager->GetAtomicMassAmu(targetZ)));
|
||||
}
|
||||
// G4cout << " fm=" << fm << " " << fMottXSection << G4endl;
|
||||
G4double grej;
|
||||
if(fMottXSection) {
|
||||
if(nullptr != fMottXSection) {
|
||||
fMottXSection->SetupKinematic(tkin, targetZ);
|
||||
grej = fMottXSection->RatioMottRutherfordCosT(std::sqrt(z1))*fm*fm;
|
||||
} else {
|
||||
grej = (1. - z1*factB + factB1*targetZ*sqrt(z1*factB)*(2. - z1))
|
||||
*fm*fm/(1.0 + z1*factD);
|
||||
}
|
||||
// G4cout << "SampleSingleScattering: E= " << tkin << " z1= "
|
||||
// << z1 << " grej= "<< grej << " mottFact= "<< fMottFactor<< G4endl;
|
||||
if(fMottFactor*rndmEngineMod->flat() <= grej ) {
|
||||
// exclude "false" scattering due to formfactor and spin effect
|
||||
G4double cost = 1.0 - z1;
|
||||
|
||||
Reference in New Issue
Block a user