Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -22,18 +22,19 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ShellVacancy.cc
|
||||
// GEANT4 tag $Name:
|
||||
// GEANT4 tag $Name:
|
||||
//
|
||||
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 21 Sept 2001 Elena Guardincerri Created
|
||||
// 25 Mar 2002 V.Ivanchenko Change AverageNOfIonisations int->double
|
||||
// 25 Mar 2002 V.Ivanchenko Change AverageNOfIonisations int->double
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#include "G4ShellVacancy.hh"
|
||||
#include "G4MaterialCutsCouple.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Poisson.hh"
|
||||
#include "G4VEMDataSet.hh"
|
||||
@@ -44,13 +45,13 @@ G4ShellVacancy::G4ShellVacancy()
|
||||
|
||||
G4ShellVacancy::~G4ShellVacancy()
|
||||
|
||||
{
|
||||
{
|
||||
G4int size = xsis.size();
|
||||
for (G4int k =0; k<size; k++)
|
||||
{
|
||||
delete xsis[k];
|
||||
xsis[k] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G4ShellVacancy::AddXsiTable(G4VEMDataSet* set)
|
||||
@@ -59,20 +60,20 @@ void G4ShellVacancy::AddXsiTable(G4VEMDataSet* set)
|
||||
xsis.push_back(set);
|
||||
}
|
||||
|
||||
G4std::vector<G4int> G4ShellVacancy::GenerateNumberOfIonisations(const G4Material*
|
||||
material,
|
||||
G4double
|
||||
incidentEnergy,
|
||||
G4std::vector<G4int> G4ShellVacancy::GenerateNumberOfIonisations(const G4MaterialCutsCouple*
|
||||
couple,
|
||||
G4double
|
||||
incidentEnergy,
|
||||
G4double eLoss) const
|
||||
|
||||
{
|
||||
G4std::vector<G4int> numberOfIonisations;
|
||||
|
||||
{
|
||||
G4std::vector<G4int> numberOfIonisations;
|
||||
const G4Material* material = couple->GetMaterial();
|
||||
G4int numberOfElements = material->GetNumberOfElements();
|
||||
|
||||
for (G4int i = 0; i<numberOfElements; i++)
|
||||
{
|
||||
G4double averageNumberOfIonisations = AverageNOfIonisations(material,
|
||||
G4double averageNumberOfIonisations = AverageNOfIonisations(couple,
|
||||
i,
|
||||
incidentEnergy,
|
||||
eLoss);
|
||||
@@ -82,27 +83,27 @@ G4std::vector<G4int> G4ShellVacancy::GenerateNumberOfIonisations(const G4Materia
|
||||
}
|
||||
|
||||
numberOfIonisations.push_back(ionisations);
|
||||
|
||||
|
||||
}
|
||||
return numberOfIonisations;
|
||||
return numberOfIonisations;
|
||||
|
||||
}
|
||||
|
||||
G4double G4ShellVacancy::AverageNOfIonisations(const G4Material* material,
|
||||
G4int index,
|
||||
G4double G4ShellVacancy::AverageNOfIonisations(const G4MaterialCutsCouple* couple,
|
||||
G4int index,
|
||||
G4double energy,
|
||||
G4double eLoss) const
|
||||
|
||||
{
|
||||
// G4int indexOfElementInMaterial= -1;
|
||||
|
||||
|
||||
G4double averageEnergy = energy - eLoss/2.;
|
||||
|
||||
size_t indexInMaterialTable = material->GetIndex();
|
||||
|
||||
size_t indexInMaterialTable = couple->GetIndex();
|
||||
|
||||
G4VEMDataSet* aSetOfXsi = xsis[indexInMaterialTable];
|
||||
|
||||
G4double aXsi = aSetOfXsi->FindValue(averageEnergy,index);
|
||||
|
||||
return aXsi * eLoss;
|
||||
G4double aXsi = aSetOfXsi->FindValue(averageEnergy,index);
|
||||
|
||||
return aXsi * eLoss;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user