Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BraggModel.cc,v 1.8 2005/05/12 11:06:43 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4BraggModel.cc,v 1.11 2005/10/18 18:46:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -31,7 +31,7 @@
|
||||
// File name: G4BraggModel
|
||||
//
|
||||
// Author: Vladimir Ivanchenko
|
||||
//
|
||||
//
|
||||
// Creation date: 03.01.2002
|
||||
//
|
||||
// Modifications:
|
||||
@@ -43,6 +43,7 @@
|
||||
// 04-06-03 Fix compilation warnings (V.Ivanchenko)
|
||||
// 12-09-04 Add lowestKinEnergy and change order of if in DEDX method (V.Ivanchenko)
|
||||
// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
|
||||
// 16-06-05 Fix problem of chemical formula (V.Ivantchenko)
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
@@ -101,9 +102,9 @@ void G4BraggModel::Initialise(const G4ParticleDefinition* p,
|
||||
if(particle->GetParticleType() == "nucleus" &&
|
||||
pname != "deuteron" && pname != "triton") isIon = true;
|
||||
|
||||
if(pParticleChange)
|
||||
if(pParticleChange)
|
||||
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
|
||||
else
|
||||
else
|
||||
fParticleChange = new G4ParticleChangeForLoss();
|
||||
}
|
||||
|
||||
@@ -173,12 +174,12 @@ G4double G4BraggModel::CrossSectionPerVolume(
|
||||
vector<G4DynamicParticle*>* G4BraggModel::SampleSecondaries(
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle* dp,
|
||||
G4double tmin,
|
||||
G4double xmin,
|
||||
G4double maxEnergy)
|
||||
{
|
||||
G4double tmax = MaxSecondaryKinEnergy(dp);
|
||||
G4double xmax = min(tmax, maxEnergy);
|
||||
G4double xmin = min(xmax,tmin);
|
||||
if(xmin >= xmax) return 0;
|
||||
|
||||
G4double kineticEnergy = dp->GetKineticEnergy();
|
||||
G4double energy = kineticEnergy + mass;
|
||||
@@ -289,11 +290,14 @@ G4double G4BraggModel::StoppingPower(const G4Material* material,
|
||||
{1.286E+1, 1.462E+1, 5.625E+3, 2.621E+3, 3.512E-2},
|
||||
{3.229E+1, 3.696E+1, 8.918E+3, 3.244E+3, 1.273E-1},
|
||||
{1.604E+1, 1.825E+1, 6.967E+3, 2.307E+3, 3.775E-2},
|
||||
{8.049E+0, 9.099E+0, 9.257E+3, 3.846E+2, 1.007E-2},
|
||||
{8.049E+0, 9.099E+0, 9.257E+3, 3.846E+2, 1.007E-2},
|
||||
{4.015E+0, 4.542E+0, 3.955E+3, 4.847E+2, 7.904E-3},
|
||||
{4.571E+0, 5.173E+0, 4.346E+3, 4.779E+2, 8.572E-3},
|
||||
{2.631E+0, 2.601E+0, 1.701E+3, 1.279E+3, 1.638E-2} };
|
||||
|
||||
|
||||
static G4double atomicWeight[11] = {
|
||||
101.96128, 44.0098, 16.0426, 28.0536, 42.0804,
|
||||
104.1512, 44.665, 60.0843, 18.0152, 18.0152, 12.0};
|
||||
|
||||
if ( T < 10.0 ) {
|
||||
ionloss = a[iMolecula][0] * sqrt(T) ;
|
||||
@@ -307,7 +311,7 @@ G4double G4BraggModel::StoppingPower(const G4Material* material,
|
||||
|
||||
if ( ionloss < 0.0) ionloss = 0.0 ;
|
||||
if ( 10 == iMolecula ) {
|
||||
if (T < 100.0) {
|
||||
if (T < 100.0) {
|
||||
ionloss *= (1.0+0.023+0.0066*log10(T));
|
||||
}
|
||||
else if (T < 700.0) {
|
||||
@@ -317,6 +321,7 @@ G4double G4BraggModel::StoppingPower(const G4Material* material,
|
||||
ionloss *=(1.0+0.089-0.0248*log10(700.-99.));
|
||||
}
|
||||
}
|
||||
ionloss /= atomicWeight[iMolecula];
|
||||
|
||||
// pure material (normally not the case for this function)
|
||||
} else if(1 == (material->GetNumberOfElements())) {
|
||||
@@ -481,21 +486,13 @@ G4double G4BraggModel::DEDX(const G4Material* material,
|
||||
const G4int numberOfElements = material->GetNumberOfElements();
|
||||
const G4double* theAtomicNumDensityVector =
|
||||
material->GetAtomicNumDensityVector();
|
||||
|
||||
|
||||
// compaund material with parametrisation
|
||||
if( HasMaterial(material) ) {
|
||||
|
||||
eloss = StoppingPower(material, kineticEnergy)
|
||||
* (material->GetTotNbOfAtomsPerVolume());
|
||||
if(1 < numberOfElements) {
|
||||
G4int nAtoms = 0;
|
||||
|
||||
const G4int* theAtomsVector = material->GetAtomsVector();
|
||||
for (G4int iel=0; iel<numberOfElements; iel++) {
|
||||
nAtoms += theAtomsVector[iel];
|
||||
}
|
||||
eloss /= nAtoms;
|
||||
}
|
||||
eloss = StoppingPower(material, kineticEnergy)*
|
||||
material->GetDensity()/amu;
|
||||
|
||||
// pure material
|
||||
} else if(1 == numberOfElements) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user