Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -39,10 +39,11 @@
// Suitable for high energy electrons and low scattering angles.
//
//
// Reference:
// M.J. Boschini et al.
// "Non Ionizing Energy Loss induced by Electrons in the Space Environment"
// Proc. of the 13th International Conference on Particle Physics and Advanced Technology
// Reference:
// M.J. Boschini et al. "Non Ionizing Energy Loss induced by Electrons
// in the Space Environment" Proc. of the 13th International Conference
// on Particle Physics and Advanced Technology
//
// (13th ICPPAT, Como 3-7/10/2011), World Scientific (Singapore).
// Available at: http://arxiv.org/abs/1111.4042v4
//
@@ -59,6 +60,9 @@
#include "G4Proton.hh"
#include "G4ProductionCutsTable.hh"
#include "G4NucleiProperties.hh"
#include "G4NistManager.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4UnitsTable.hh"
@@ -74,7 +78,7 @@ G4eSingleCoulombScatteringModel::G4eSingleCoulombScatteringModel(const G4String&
isInitialised(false)
{
fNistManager = G4NistManager::Instance();
theParticleTable = G4ParticleTable::GetParticleTable();
theIonTable = G4ParticleTable::GetParticleTable()->GetIonTable();
fParticleChange = 0;
pCuts=0;
@@ -92,7 +96,6 @@ G4eSingleCoulombScatteringModel::G4eSingleCoulombScatteringModel(const G4String&
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eSingleCoulombScatteringModel::~G4eSingleCoulombScatteringModel()
@@ -156,15 +159,15 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
G4double kinEnergy = dp->GetKineticEnergy();
//cout<<"--- kinEnergy "<<kinEnergy<<endl;
if(kinEnergy < lowEnergyLimit) return;
DefineMaterial(couple);
SetupParticle(dp->GetDefinition());
// Choose nucleus
//last two :cutEnergy= min e kinEnergy=max
currentElement = SelectRandomAtom(couple,particle,
kinEnergy,cutEnergy,kinEnergy);//last two :cutEnergy= min e kinEnergy=max
kinEnergy,cutEnergy,kinEnergy);
G4double Z = currentElement->GetZ();
G4int iz = G4int(Z);
@@ -174,8 +177,7 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
G4double cross= Mottcross->GetTotalCross();
if(cross == 0.0)return;
if(cross == 0.0) { return; }
G4ThreeVector dir = dp->GetMomentumDirection(); //old direction
G4ThreeVector newDirection=Mottcross->GetNewDirection();//new direction
@@ -185,42 +187,42 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
//Recoil energy
G4double trec= Mottcross->GetTrec();
//Energy after scattering
G4double finalT = kinEnergy - trec;
//Energy after scattering
if(trec > kinEnergy) { trec = kinEnergy; }
G4double finalT = kinEnergy - trec;
G4double edep = 0.0;
if(finalT <= lowEnergyLimit) {
trec = kinEnergy;
finalT = 0.0;
}
fParticleChange->SetProposedKineticEnergy(finalT);
G4double tcut = recoilThreshold;
if(pCuts) {
tcut= std::min(tcut,(*pCuts)[currentMaterialIndex]);
}
G4double tcut = recoilThreshold;
if(pCuts) { tcut= std::min(tcut,(*pCuts)[currentMaterialIndex]);
}
if(trec > tcut) {
if(trec > tcut) {
//cout<<"Trec "<<trec/eV<<endl;
G4ParticleDefinition* ion = theIonTable->GetIon(iz, ia, 0);
//cout<<"Trec "<<trec/eV<<endl;
G4ParticleDefinition* ion = theParticleTable->GetIon(iz, ia, 0.0);
//incident before scattering
G4double ptot=sqrt(Mottcross->GetMom2Lab());
//incident after scattering
G4double plab = sqrt(finalT*(finalT + 2.0*mass));
G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
//secondary particle
G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, trec);
fvect->push_back(newdp);
}
else if(trec > 0.0) {
fParticleChange->ProposeNonIonizingEnergyDeposit(trec);
if(trec< tcut) fParticleChange->ProposeLocalEnergyDeposit(trec);
}
//incident before scattering
G4double ptot=sqrt(Mottcross->GetMom2Lab());
//incident after scattering
G4double plab = sqrt(finalT*(finalT + 2.0*mass));
G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
//secondary particle
G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, trec);
fvect->push_back(newdp);
} else if(trec > 0.0) {
edep = trec;
fParticleChange->ProposeNonIonizingEnergyDeposit(trec);
}
// finelize primary energy and energy balance
if(finalT <= lowEnergyLimit) {
edep += finalT;
finalT = 0.0;
}
fParticleChange->SetProposedKineticEnergy(finalT);
fParticleChange->ProposeLocalEnergyDeposit(edep);
}