Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -32,17 +32,17 @@
|
||||
//
|
||||
// Author: Cristina Consolandi
|
||||
//
|
||||
// Creation date: 20.10.2012
|
||||
//
|
||||
// Creation date: 20.10.2012
|
||||
//
|
||||
// Class Description:
|
||||
// Single Scattering model for electron-nuclei interaction.
|
||||
// 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
|
||||
// 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
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "G4IonTable.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#include "G4EmParameters.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -87,17 +87,18 @@ G4eSingleCoulombScatteringModel::G4eSingleCoulombScatteringModel(const G4String&
|
||||
|
||||
lowEnergyLimit = 0*keV;
|
||||
recoilThreshold = 0.*eV;
|
||||
FormFactor = 0;
|
||||
particle = nullptr;
|
||||
mass=0;
|
||||
mass=0.0;
|
||||
currentMaterialIndex = -1;
|
||||
|
||||
Mottcross = new G4ScreeningMottCrossSection();
|
||||
Mottcross = new G4ScreeningMottCrossSection();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4eSingleCoulombScatteringModel::~G4eSingleCoulombScatteringModel()
|
||||
{
|
||||
{
|
||||
delete Mottcross;
|
||||
}
|
||||
|
||||
@@ -106,22 +107,24 @@ G4eSingleCoulombScatteringModel::~G4eSingleCoulombScatteringModel()
|
||||
void G4eSingleCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
|
||||
const G4DataVector& cuts)
|
||||
{
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
|
||||
SetupParticle(p);
|
||||
currentCouple = nullptr;
|
||||
currentMaterialIndex = -1;
|
||||
//cosThetaMin = cos(PolarAngleLimit());
|
||||
Mottcross->Initialise(p,cosThetaMin);
|
||||
|
||||
pCuts = &cuts;
|
||||
|
||||
pCuts = &cuts;
|
||||
//G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3);
|
||||
|
||||
|
||||
/*
|
||||
G4cout << "!!! G4eSingleCoulombScatteringModel::Initialise for "
|
||||
<< part->GetParticleName() << " cos(TetMin)= " << cosThetaMin
|
||||
G4cout << "!!! G4eSingleCoulombScatteringModel::Initialise for "
|
||||
<< part->GetParticleName() << " cos(TetMin)= " << cosThetaMin
|
||||
<< " cos(TetMax)= " << cosThetaMax <<G4endl;
|
||||
G4cout << "cut= " << (*pCuts)[0] << " cut1= " << (*pCuts)[1] << G4endl;
|
||||
*/
|
||||
|
||||
|
||||
if(!fParticleChange) {
|
||||
fParticleChange = GetParticleChangeForGamma();
|
||||
}
|
||||
@@ -129,6 +132,10 @@ void G4eSingleCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
|
||||
if(IsMaster()) {
|
||||
InitialiseElementSelectors(p,cuts);
|
||||
}
|
||||
|
||||
FormFactor=param->NuclearFormfactorType();
|
||||
|
||||
//G4cout<<"NUCLEAR FORM FACTOR: "<<FormFactor<<G4endl;
|
||||
}
|
||||
|
||||
void G4eSingleCoulombScatteringModel::InitialiseLocal(const G4ParticleDefinition*,
|
||||
@@ -140,22 +147,22 @@ void G4eSingleCoulombScatteringModel::InitialiseLocal(const G4ParticleDefinition
|
||||
|
||||
G4double G4eSingleCoulombScatteringModel::ComputeCrossSectionPerAtom(
|
||||
const G4ParticleDefinition* p,
|
||||
G4double kinEnergy,
|
||||
G4double Z,
|
||||
G4double ,
|
||||
G4double,
|
||||
G4double kinEnergy,
|
||||
G4double Z,
|
||||
G4double ,
|
||||
G4double,
|
||||
G4double )
|
||||
{
|
||||
SetupParticle(p);
|
||||
|
||||
|
||||
G4double cross =0.0;
|
||||
if(kinEnergy < lowEnergyLimit) return cross;
|
||||
|
||||
DefineMaterial(CurrentCouple());
|
||||
|
||||
//Total Cross section
|
||||
Mottcross->SetupKinematic(kinEnergy, G4lrint(Z));
|
||||
cross = Mottcross->NuclearCrossSection();
|
||||
Mottcross->SetupKinematic(kinEnergy, Z);
|
||||
cross = Mottcross->NuclearCrossSection(FormFactor);
|
||||
|
||||
//cout<< "Compute Cross Section....cross "<<G4BestUnit(cross,"Surface") << " cm2 "<< cross/cm2 <<" Z: "<<Z<<" kinEnergy: "<<kinEnergy<<endl;
|
||||
return cross;
|
||||
@@ -167,14 +174,14 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
std::vector<G4DynamicParticle*>* fvect,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
const G4DynamicParticle* dp,
|
||||
G4double cutEnergy,
|
||||
G4double cutEnergy,
|
||||
G4double)
|
||||
{
|
||||
G4double kinEnergy = dp->GetKineticEnergy();
|
||||
//cout<<"--- kinEnergy "<<kinEnergy<<endl;
|
||||
|
||||
if(kinEnergy < lowEnergyLimit) return;
|
||||
|
||||
|
||||
DefineMaterial(couple);
|
||||
SetupParticle(dp->GetDefinition());
|
||||
|
||||
@@ -183,14 +190,15 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
currentElement = SelectRandomAtom(couple,particle,
|
||||
kinEnergy,cutEnergy,kinEnergy);
|
||||
|
||||
G4int iz = currentElement->GetZasInt();
|
||||
G4double Z = currentElement->GetZ();
|
||||
G4int iz = G4int(Z);
|
||||
G4int ia = SelectIsotopeNumber(currentElement);
|
||||
G4double mass2 = G4NucleiProperties::GetNuclearMass(ia, iz);
|
||||
|
||||
//G4cout<<"..Z: "<<Z<<" ..iz: "<<iz<<" ..ia: "<<ia<<" ..mass2: "<<mass2<<G4endl;
|
||||
|
||||
Mottcross->SetupKinematic(kinEnergy, iz);
|
||||
G4double cross= Mottcross->NuclearCrossSection(); //MODIFY TO LOAD TABLE
|
||||
|
||||
Mottcross->SetupKinematic(kinEnergy, Z);
|
||||
G4double cross= Mottcross->NuclearCrossSection(FormFactor); //MODIFY TO LOAD TABLE
|
||||
if(cross == 0.0) { return; }
|
||||
//cout<< "Energy: "<<kinEnergy/MeV<<" Z: "<<Z<<"....cross "<<G4BestUnit(cross,"Surface") << " cm2 "<< cross/cm2 <<endl;
|
||||
|
||||
@@ -207,9 +215,9 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
G4double bet = ptot/(v0.e() + mass2);
|
||||
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
|
||||
|
||||
//CM Projectile
|
||||
G4double momCM = gam*(ptot - bet*e1);
|
||||
G4double eCM = gam*(e1 - bet*ptot);
|
||||
//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);
|
||||
@@ -217,13 +225,13 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
|
||||
//CM--->Lab
|
||||
G4LorentzVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM), gam*(eCM + bet*pzCM));
|
||||
|
||||
|
||||
// Rotate to global system
|
||||
G4ThreeVector dir = dp->GetMomentumDirection();
|
||||
G4ThreeVector dir = dp->GetMomentumDirection();
|
||||
G4ThreeVector newDirection = v1.vect().unit();
|
||||
newDirection.rotateUz(dir);
|
||||
|
||||
fParticleChange->ProposeMomentumDirection(newDirection);
|
||||
|
||||
fParticleChange->ProposeMomentumDirection(newDirection);
|
||||
|
||||
// recoil
|
||||
v0 -= v1;
|
||||
@@ -233,9 +241,9 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
G4double tcut = recoilThreshold;
|
||||
|
||||
//G4cout<<" Energy Transfered: "<<trec/eV<<G4endl;
|
||||
|
||||
if(pCuts) {
|
||||
tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]);
|
||||
|
||||
if(pCuts) {
|
||||
tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]);
|
||||
}
|
||||
|
||||
if(trec > tcut) {
|
||||
@@ -248,14 +256,14 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
edep = trec;
|
||||
fParticleChange->ProposeNonIonizingEnergyDeposit(edep);
|
||||
}
|
||||
|
||||
|
||||
// finelize primary energy and energy balance
|
||||
G4double finalT = v1.e() - mass;
|
||||
//G4cout<<"Final Energy: "<<finalT/eV<<G4endl;
|
||||
if(finalT <= lowEnergyLimit) {
|
||||
edep += finalT;
|
||||
if(finalT <= lowEnergyLimit) {
|
||||
edep += finalT;
|
||||
finalT = 0.0;
|
||||
}
|
||||
}
|
||||
edep = std::max(edep, 0.0);
|
||||
fParticleChange->SetProposedKineticEnergy(finalT);
|
||||
fParticleChange->ProposeLocalEnergyDeposit(edep);
|
||||
@@ -263,4 +271,3 @@ void G4eSingleCoulombScatteringModel::SampleSecondaries(
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
Reference in New Issue
Block a user