Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -88,18 +88,18 @@ G4double G4CompositeDataSet::FindValue(G4double energy, G4int componentId) const
|
||||
|
||||
void G4CompositeDataSet::PrintData(void) const
|
||||
{
|
||||
const size_t n(NumberOfComponents());
|
||||
const G4int n = (G4int)NumberOfComponents();
|
||||
|
||||
G4cout << "The data set has " << n << " components" << G4endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
size_t i(0);
|
||||
G4int i(0);
|
||||
|
||||
while (i<n)
|
||||
{
|
||||
G4cout << "--- Component " << i << " ---" << G4endl;
|
||||
GetComponent(i)->PrintData();
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ G4bool G4CompositeDataSet::LoadData(const G4String& argFileName)
|
||||
{
|
||||
CleanUpComponents();
|
||||
|
||||
for (G4int z(minZ); z<maxZ; z++)
|
||||
for (G4int z(minZ); z<maxZ; ++z)
|
||||
{
|
||||
G4IDataSet* component = new G4DataSet(z, algorithm->Clone(), unitEnergies, unitData);
|
||||
if (!component->LoadData(argFileName))
|
||||
@@ -144,7 +144,7 @@ G4bool G4CompositeDataSet::LoadData(const G4String& argFileName)
|
||||
|
||||
G4bool G4CompositeDataSet::SaveData(const G4String& argFileName) const
|
||||
{
|
||||
for (G4int z=minZ; z<maxZ; z++)
|
||||
for (G4int z=minZ; z<maxZ; ++z)
|
||||
{
|
||||
const G4IDataSet* component(GetComponent(z-minZ));
|
||||
|
||||
|
||||
@@ -119,10 +119,10 @@ G4double G4DataSet::FindValue(G4double energy, G4int /* componentId */) const
|
||||
if (energies->empty()) return 0;
|
||||
if (energy <= (*energies)[0]) return (*data)[0];
|
||||
|
||||
size_t i = energies->size()-1;
|
||||
std::size_t i = energies->size()-1;
|
||||
if (energy >= (*energies)[i]) return (*data)[i];
|
||||
|
||||
G4double interpolated = algorithm->Calculate(energy,FindLowerBound(energy),*energies,*data);
|
||||
G4double interpolated = algorithm->Calculate(energy,(G4int)FindLowerBound(energy),*energies,*data);
|
||||
return interpolated;
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ void G4DataSet::PrintData(void) const
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t size = energies->size();
|
||||
for (size_t i(0); i<size; i++)
|
||||
std::size_t size = energies->size();
|
||||
for (std::size_t i(0); i<size; i++)
|
||||
{
|
||||
G4cout << "Point: " << ((*energies)[i]/unitEnergies)
|
||||
<< " - Data value: " << ((*data)[i]/unitData);
|
||||
@@ -299,14 +299,14 @@ G4bool G4DataSet::SaveData(const G4String& name) const
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t G4DataSet::FindLowerBound(G4double x) const
|
||||
std::size_t G4DataSet::FindLowerBound(G4double x) const
|
||||
{
|
||||
size_t lowerBound = 0;
|
||||
size_t upperBound(energies->size() - 1);
|
||||
std::size_t lowerBound = 0;
|
||||
std::size_t upperBound(energies->size() - 1);
|
||||
|
||||
while (lowerBound <= upperBound)
|
||||
{
|
||||
size_t midBin((lowerBound + upperBound) / 2);
|
||||
std::size_t midBin((lowerBound + upperBound) / 2);
|
||||
|
||||
if (x < (*energies)[midBin]) upperBound = midBin - 1;
|
||||
else lowerBound = midBin + 1;
|
||||
@@ -316,14 +316,14 @@ size_t G4DataSet::FindLowerBound(G4double x) const
|
||||
}
|
||||
|
||||
|
||||
size_t G4DataSet::FindLowerBound(G4double x, G4DataVector* values) const
|
||||
std::size_t G4DataSet::FindLowerBound(G4double x, G4DataVector* values) const
|
||||
{
|
||||
size_t lowerBound = 0;;
|
||||
size_t upperBound(values->size() - 1);
|
||||
std::size_t lowerBound = 0;;
|
||||
std::size_t upperBound(values->size() - 1);
|
||||
|
||||
while (lowerBound <= upperBound)
|
||||
{
|
||||
size_t midBin((lowerBound + upperBound) / 2);
|
||||
std::size_t midBin((lowerBound + upperBound) / 2);
|
||||
|
||||
if (x < (*values)[midBin]) upperBound = midBin - 1;
|
||||
else lowerBound = midBin + 1;
|
||||
@@ -354,11 +354,11 @@ void G4DataSet::BuildPdf()
|
||||
pdf = new G4DataVector;
|
||||
G4Integrator <G4DataSet, G4double(G4DataSet::*)(G4double)> integrator;
|
||||
|
||||
G4int nData = data->size();
|
||||
std::size_t nData = data->size();
|
||||
pdf->push_back(0.);
|
||||
|
||||
// Integrate the data distribution
|
||||
G4int i;
|
||||
std::size_t i;
|
||||
G4double totalSum = 0.;
|
||||
for (i=1; i<nData; i++)
|
||||
{
|
||||
@@ -393,7 +393,7 @@ G4double G4DataSet::RandomSelect(G4int /* componentId */) const
|
||||
G4double x = G4UniformRand();
|
||||
|
||||
// Locate the random value in the X vector based on the PDF
|
||||
size_t bin = FindLowerBound(x,pdf);
|
||||
G4int bin = (G4int)FindLowerBound(x,pdf);
|
||||
|
||||
// Interpolate the PDF to calculate the X value:
|
||||
// linear interpolation in the first bin (to avoid problem with 0),
|
||||
@@ -414,7 +414,7 @@ G4double G4DataSet::IntegrationFunction(G4double x)
|
||||
G4double y = 0;
|
||||
|
||||
// Locate the random value in the X vector based on the PDF
|
||||
size_t bin = FindLowerBound(x);
|
||||
G4int bin = (G4int)FindLowerBound(x);
|
||||
|
||||
// Interpolate to calculate the X value:
|
||||
// linear interpolation in the first bin (to avoid problem with 0),
|
||||
|
||||
@@ -54,7 +54,7 @@ G4double G4LinInterpolator::Calculate(G4double x, G4int bin,
|
||||
const G4DataVector& points,
|
||||
const G4DataVector& data) const
|
||||
{
|
||||
G4int nBins = data.size() - 1;
|
||||
G4int nBins = G4int(data.size() - 1);
|
||||
G4double value = 0.;
|
||||
if (x < points[0])
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ G4double G4LogLogInterpolator::Calculate(G4double x, G4int bin,
|
||||
const G4DataVector& points,
|
||||
const G4DataVector& data) const
|
||||
{
|
||||
G4int nBins = data.size() - 1;
|
||||
G4int nBins = G4int(data.size() - 1);
|
||||
// ---- MGP ---- To be verified; value = 0. is redundant here
|
||||
G4double value = 0.;
|
||||
if (x < points[0] || x == 0.)
|
||||
|
||||
@@ -112,8 +112,8 @@ G4PixeCrossSectionHandler::~G4PixeCrossSectionHandler()
|
||||
|
||||
if (crossSections != 0)
|
||||
{
|
||||
size_t n = crossSections->size();
|
||||
for (size_t i=0; i<n; i++)
|
||||
std::size_t n = crossSections->size();
|
||||
for (std::size_t i=0; i<n; ++i)
|
||||
{
|
||||
delete (*crossSections)[i];
|
||||
}
|
||||
@@ -178,8 +178,8 @@ void G4PixeCrossSectionHandler::PrintData() const
|
||||
|
||||
void G4PixeCrossSectionHandler::LoadShellData(const G4String& fileName)
|
||||
{
|
||||
size_t nZ = activeZ.size();
|
||||
for (size_t i=0; i<nZ; i++)
|
||||
std::size_t nZ = activeZ.size();
|
||||
for (std::size_t i=0; i<nZ; ++i)
|
||||
{
|
||||
G4int Z = (G4int) activeZ[i];
|
||||
G4IInterpolator* algo = interpolation->Clone();
|
||||
@@ -271,7 +271,7 @@ G4double G4PixeCrossSectionHandler::FindValue(G4int Z, G4double energy,
|
||||
G4IDataSet* dataSet = (*pos).second;
|
||||
if (shellIndex >= 0)
|
||||
{
|
||||
G4int nComponents = dataSet->NumberOfComponents();
|
||||
G4int nComponents = (G4int)dataSet->NumberOfComponents();
|
||||
if(shellIndex < nComponents)
|
||||
// The value is the cross section for shell component at given energy
|
||||
value = dataSet->GetComponent(shellIndex)->FindValue(energy);
|
||||
@@ -302,9 +302,9 @@ G4double G4PixeCrossSectionHandler::ValueForMaterial(const G4Material* material,
|
||||
|
||||
const G4ElementVector* elementVector = material->GetElementVector();
|
||||
const G4double* nAtomsPerVolume = material->GetVecNbOfAtomsPerVolume();
|
||||
G4int nElements = material->GetNumberOfElements();
|
||||
std::size_t nElements = material->GetNumberOfElements();
|
||||
|
||||
for (G4int i=0 ; i<nElements ; i++)
|
||||
for (std::size_t i=0 ; i<nElements ; ++i)
|
||||
{
|
||||
G4int Z = (G4int) (*elementVector)[i]->GetZ();
|
||||
G4double elementValue = FindValue(Z,energy);
|
||||
@@ -365,10 +365,10 @@ G4double G4PixeCrossSectionHandler::ValueForMaterial(const G4Material* material,
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
std::size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
|
||||
|
||||
for (size_t m=0; m<numOfCouples; m++)
|
||||
for (std::size_t m=0; m<numOfCouples; m++)
|
||||
{
|
||||
energies = new G4DataVector;
|
||||
data = new G4DataVector;
|
||||
@@ -450,7 +450,7 @@ G4int G4PixeCrossSectionHandler::SelectRandomAtom(const G4Material* material,
|
||||
// Select randomly an element within the material, according to the weight
|
||||
// determined by the cross sections in the data set
|
||||
|
||||
G4int nElements = material->GetNumberOfElements();
|
||||
G4int nElements = (G4int)material->GetNumberOfElements();
|
||||
|
||||
// Special case: the material consists of one element
|
||||
if (nElements == 1)
|
||||
@@ -462,13 +462,13 @@ G4int G4PixeCrossSectionHandler::SelectRandomAtom(const G4Material* material,
|
||||
// Composite material
|
||||
|
||||
const G4ElementVector* elementVector = material->GetElementVector();
|
||||
size_t materialIndex = material->GetIndex();
|
||||
std::size_t materialIndex = material->GetIndex();
|
||||
|
||||
G4IDataSet* materialSet = (*crossSections)[materialIndex];
|
||||
G4double materialCrossSection0 = 0.0;
|
||||
G4DataVector cross;
|
||||
cross.clear();
|
||||
for ( G4int i=0; i < nElements; i++ )
|
||||
for ( G4int i=0; i < nElements; ++i )
|
||||
{
|
||||
G4double cr = materialSet->GetComponent(i)->FindValue(e);
|
||||
materialCrossSection0 += cr;
|
||||
@@ -477,7 +477,7 @@ G4int G4PixeCrossSectionHandler::SelectRandomAtom(const G4Material* material,
|
||||
|
||||
G4double random = G4UniformRand() * materialCrossSection0;
|
||||
|
||||
for (G4int k=0 ; k < nElements ; k++ )
|
||||
for (G4int k=0 ; k < nElements ; ++k )
|
||||
{
|
||||
if (random <= cross[k]) return (G4int) (*elementVector)[k]->GetZ();
|
||||
}
|
||||
@@ -507,7 +507,7 @@ G4int G4PixeCrossSectionHandler::SelectRandomAtom(const G4Material* material,
|
||||
{
|
||||
// Composite material
|
||||
|
||||
size_t materialIndex = couple->GetIndex();
|
||||
std::size_t materialIndex = couple->GetIndex();
|
||||
|
||||
G4IDataSet* materialSet = (*crossSections)[materialIndex];
|
||||
G4double materialCrossSection0 = 0.0;
|
||||
@@ -557,8 +557,8 @@ G4int G4PixeCrossSectionHandler::SelectRandomShell(G4int Z, G4double e) const
|
||||
// if (pos != dataMap.end()) dataSet = pos->second;
|
||||
if (pos != dataMap.end()) dataSet = (*pos).second;
|
||||
|
||||
size_t nShells = dataSet->NumberOfComponents();
|
||||
for (size_t i=0; i<nShells; i++)
|
||||
G4int nShells = (G4int)dataSet->NumberOfComponents();
|
||||
for (G4int i=0; i<nShells; ++i)
|
||||
{
|
||||
const G4IDataSet* shellDataSet = dataSet->GetComponent(i);
|
||||
if (shellDataSet != 0)
|
||||
@@ -581,15 +581,15 @@ void G4PixeCrossSectionHandler::ActiveElements()
|
||||
FatalException,
|
||||
"no MaterialTable found");
|
||||
|
||||
G4int nMaterials = G4Material::GetNumberOfMaterials();
|
||||
std::size_t nMaterials = G4Material::GetNumberOfMaterials();
|
||||
|
||||
for (G4int mat=0; mat<nMaterials; mat++)
|
||||
for (std::size_t mat=0; mat<nMaterials; ++mat)
|
||||
{
|
||||
const G4Material* material= (*materialTable)[mat];
|
||||
const G4ElementVector* elementVector = material->GetElementVector();
|
||||
const G4int nElements = material->GetNumberOfElements();
|
||||
const std::size_t nElements = material->GetNumberOfElements();
|
||||
|
||||
for (G4int iEl=0; iEl<nElements; iEl++)
|
||||
for (std::size_t iEl=0; iEl<nElements; ++iEl)
|
||||
{
|
||||
G4double Z = (*elementVector)[iEl]->GetZ();
|
||||
if (!(activeZ.contains(Z)) && Z >= zMin && Z <= zMax)
|
||||
@@ -615,7 +615,7 @@ G4int G4PixeCrossSectionHandler::NumberOfComponents(G4int Z) const
|
||||
if (pos!= dataMap.end())
|
||||
{
|
||||
G4IDataSet* dataSet = (*pos).second;
|
||||
n = dataSet->NumberOfComponents();
|
||||
n = (G4int)dataSet->NumberOfComponents();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -636,9 +636,9 @@ G4PixeCrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& en
|
||||
std::vector<G4IDataSet*>* matCrossSections = new std::vector<G4IDataSet*>;
|
||||
|
||||
//const G4ProductionCutsTable* theCoupleTable=G4ProductionCutsTable::GetProductionCutsTable();
|
||||
//size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
//std::size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
|
||||
size_t nOfBins = energyVector.size();
|
||||
std::size_t nOfBins = energyVector.size();
|
||||
const G4IInterpolator* interpolationAlgo = CreateInterpolation();
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
@@ -648,12 +648,12 @@ G4PixeCrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& en
|
||||
FatalException,
|
||||
"no MaterialTable found");
|
||||
|
||||
G4int nMaterials = G4Material::GetNumberOfMaterials();
|
||||
std::size_t nMaterials = G4Material::GetNumberOfMaterials();
|
||||
|
||||
for (G4int mat=0; mat<nMaterials; mat++)
|
||||
for (std::size_t mat=0; mat<nMaterials; ++mat)
|
||||
{
|
||||
const G4Material* material = (*materialTable)[mat];
|
||||
G4int nElements = material->GetNumberOfElements();
|
||||
G4int nElements = (G4int)material->GetNumberOfElements();
|
||||
const G4ElementVector* elementVector = material->GetElementVector();
|
||||
const G4double* nAtomsPerVolume = material->GetAtomicNumDensityVector();
|
||||
|
||||
@@ -661,7 +661,7 @@ G4PixeCrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& en
|
||||
|
||||
G4IDataSet* setForMat = new G4CompositeDataSet(algo,1.,1.);
|
||||
|
||||
for (G4int i=0; i<nElements; i++) {
|
||||
for (G4int i=0; i<nElements; ++i) {
|
||||
|
||||
G4int Z = (G4int) (*elementVector)[i]->GetZ();
|
||||
G4double density = nAtomsPerVolume[i];
|
||||
@@ -670,7 +670,7 @@ G4PixeCrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& en
|
||||
data = new G4DataVector;
|
||||
|
||||
|
||||
for (size_t bin=0; bin<nOfBins; bin++)
|
||||
for (std::size_t bin=0; bin<nOfBins; ++bin)
|
||||
{
|
||||
G4double e = energyVector[bin];
|
||||
energies->push_back(e);
|
||||
|
||||
@@ -69,9 +69,9 @@ G4PixeShellDataSet::G4PixeShellDataSet(G4int zeta,
|
||||
shellName.push_back("l");
|
||||
shellName.push_back("m");
|
||||
|
||||
size_t sizeK = modelK.size();
|
||||
size_t sizeL = modelL.size();
|
||||
size_t sizeM = modelM.size();
|
||||
std::size_t sizeK = modelK.size();
|
||||
std::size_t sizeL = modelL.size();
|
||||
std::size_t sizeM = modelM.size();
|
||||
|
||||
if (sizeK > 0) subShellName.push_back("k");
|
||||
|
||||
@@ -118,18 +118,18 @@ G4double G4PixeShellDataSet::FindValue(G4double energy, G4int /* componentId */)
|
||||
|
||||
void G4PixeShellDataSet::PrintData(void) const
|
||||
{
|
||||
const size_t n = NumberOfComponents();
|
||||
const G4int n = (G4int)NumberOfComponents();
|
||||
|
||||
G4cout << "The data set has " << n << " components" << G4endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
size_t i = 0;
|
||||
G4int i = 0;
|
||||
|
||||
while (i < n)
|
||||
{
|
||||
G4cout << "--- Component " << i << " ---" << G4endl;
|
||||
GetComponent(i)->PrintData();
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,9 +162,9 @@ G4bool G4PixeShellDataSet::LoadData(const G4String& file)
|
||||
|
||||
// Load shell cross sections
|
||||
|
||||
G4int nShells = subShellName.size();
|
||||
std::size_t nShells = subShellName.size();
|
||||
|
||||
for (G4int subShellIndex=0; subShellIndex<nShells; subShellIndex++)
|
||||
for (std::size_t subShellIndex=0; subShellIndex<nShells; ++subShellIndex)
|
||||
{
|
||||
G4String subName = subShellName[subShellIndex];
|
||||
G4String fullFileName = FullFileName(file,subName);
|
||||
|
||||
@@ -247,12 +247,12 @@ void G4hImpactIonisation::BuildPhysicsTable(const G4ParticleDefinition& particle
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
cutForDelta.clear();
|
||||
cutForGamma.clear();
|
||||
|
||||
for (size_t j=0; j<numOfCouples; j++) {
|
||||
for (G4int j=0; j<numOfCouples; ++j) {
|
||||
|
||||
// get material parameters needed for the energy loss calculation
|
||||
const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(j);
|
||||
@@ -368,7 +368,7 @@ void G4hImpactIonisation::BuildLossTable(const G4ParticleDefinition& particleDef
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
if ( theLossTable)
|
||||
{
|
||||
@@ -379,7 +379,7 @@ void G4hImpactIonisation::BuildLossTable(const G4ParticleDefinition& particleDef
|
||||
theLossTable = new G4PhysicsTable(numOfCouples);
|
||||
|
||||
// loop for materials
|
||||
for (size_t j=0; j<numOfCouples; j++) {
|
||||
for (G4int j=0; j<numOfCouples; ++j) {
|
||||
|
||||
// create physics vector and fill it
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(LowestKineticEnergy,
|
||||
@@ -461,7 +461,7 @@ void G4hImpactIonisation::BuildLambdaTable(const G4ParticleDefinition& particleD
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
|
||||
if (theMeanFreePathTable) {
|
||||
@@ -473,7 +473,7 @@ void G4hImpactIonisation::BuildLambdaTable(const G4ParticleDefinition& particleD
|
||||
|
||||
// loop for materials
|
||||
|
||||
for (size_t j=0 ; j < numOfCouples; j++) {
|
||||
for (G4int j=0 ; j < numOfCouples; ++j) {
|
||||
|
||||
//create physics vector then fill it ....
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(LowestKineticEnergy,
|
||||
@@ -486,7 +486,7 @@ void G4hImpactIonisation::BuildLambdaTable(const G4ParticleDefinition& particleD
|
||||
|
||||
const G4ElementVector* theElementVector = material->GetElementVector() ;
|
||||
const G4double* theAtomicNumDensityVector = material->GetAtomicNumDensityVector();
|
||||
const G4int numberOfElements = material->GetNumberOfElements() ;
|
||||
const G4int numberOfElements = (G4int)material->GetNumberOfElements() ;
|
||||
|
||||
// get the electron kinetic energy cut for the actual material,
|
||||
// it will be used in ComputeMicroscopicCrossSection
|
||||
@@ -1040,13 +1040,13 @@ G4VParticleChange* G4hImpactIonisation::PostStepDoIt(const G4Track& track,
|
||||
|
||||
// fill aParticleChange
|
||||
G4double finalKineticEnergy = kineticEnergy - deltaKineticEnergy;
|
||||
size_t totalNumber = 1;
|
||||
std::size_t totalNumber = 1;
|
||||
|
||||
// Atomic relaxation
|
||||
|
||||
// ---- MGP ---- Temporary limitation: currently PIXE only for incident protons
|
||||
|
||||
size_t nSecondaries = 0;
|
||||
std::size_t nSecondaries = 0;
|
||||
std::vector<G4DynamicParticle*>* secondaryVector = 0;
|
||||
|
||||
if (definition == G4Proton::ProtonDefinition())
|
||||
@@ -1127,7 +1127,7 @@ G4VParticleChange* G4hImpactIonisation::PostStepDoIt(const G4Track& track,
|
||||
if (secondaryVector != 0)
|
||||
{
|
||||
nSecondaries = secondaryVector->size();
|
||||
for (size_t i = 0; i<nSecondaries; i++)
|
||||
for (std::size_t i = 0; i<nSecondaries; i++)
|
||||
{
|
||||
G4DynamicParticle* aSecondary = (*secondaryVector)[i];
|
||||
if (aSecondary)
|
||||
@@ -1218,7 +1218,7 @@ G4VParticleChange* G4hImpactIonisation::PostStepDoIt(const G4Track& track,
|
||||
|
||||
aParticleChange.ProposeEnergy(finalKineticEnergy);
|
||||
aParticleChange.ProposeLocalEnergyDeposit (eDeposit);
|
||||
aParticleChange.SetNumberOfSecondaries(totalNumber);
|
||||
aParticleChange.SetNumberOfSecondaries((G4int)totalNumber);
|
||||
aParticleChange.AddSecondary(deltaRay);
|
||||
|
||||
// ---- Debug ----
|
||||
@@ -1235,7 +1235,7 @@ G4VParticleChange* G4hImpactIonisation::PostStepDoIt(const G4Track& track,
|
||||
|
||||
if (secondaryVector != 0)
|
||||
{
|
||||
for (size_t l = 0; l < nSecondaries; l++)
|
||||
for (std::size_t l = 0; l < nSecondaries; l++)
|
||||
{
|
||||
G4DynamicParticle* secondary = (*secondaryVector)[l];
|
||||
if (secondary) aParticleChange.AddSecondary(secondary);
|
||||
@@ -1371,7 +1371,7 @@ G4double G4hImpactIonisation::BarkasTerm(const G4Material* material,
|
||||
//G4double AMaterial = 0.0;
|
||||
G4double ZMaterial = 0.0;
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
G4int numberOfElements = material->GetNumberOfElements();
|
||||
G4int numberOfElements = (G4int)material->GetNumberOfElements();
|
||||
|
||||
for (G4int i = 0; i<numberOfElements; i++) {
|
||||
|
||||
@@ -1571,7 +1571,7 @@ G4double G4hImpactIonisation::ElectronicLossFluctuation(
|
||||
p3 = std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
p3 = (G4int)G4Poisson(a3);
|
||||
|
||||
loss = p3*e0 ;
|
||||
|
||||
@@ -1590,7 +1590,7 @@ G4double G4hImpactIonisation::ElectronicLossFluctuation(
|
||||
p3 = std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
p3 = (G4int)G4Poisson(a3);
|
||||
|
||||
if(p3 > 0)
|
||||
{
|
||||
@@ -1599,7 +1599,7 @@ G4double G4hImpactIonisation::ElectronicLossFluctuation(
|
||||
{
|
||||
dp3 = G4float(p3) ;
|
||||
corrfac = dp3/G4float(nmaxCont2) ;
|
||||
p3 = nmaxCont2 ;
|
||||
p3 = G4int(nmaxCont2) ;
|
||||
}
|
||||
else
|
||||
corrfac = 1. ;
|
||||
@@ -1619,7 +1619,7 @@ G4double G4hImpactIonisation::ElectronicLossFluctuation(
|
||||
p1 = std::max(0,G4int(G4RandGauss::shoot(a1,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p1 = G4Poisson(a1);
|
||||
p1 = (G4int)G4Poisson(a1);
|
||||
|
||||
// excitation type 2
|
||||
if(a2>alim)
|
||||
@@ -1628,7 +1628,7 @@ G4double G4hImpactIonisation::ElectronicLossFluctuation(
|
||||
p2 = std::max(0,G4int(G4RandGauss::shoot(a2,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p2 = G4Poisson(a2);
|
||||
p2 = (G4int)G4Poisson(a2);
|
||||
|
||||
loss = p1*e1Fluct+p2*e2Fluct;
|
||||
|
||||
@@ -1647,7 +1647,7 @@ G4double G4hImpactIonisation::ElectronicLossFluctuation(
|
||||
p3 = std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
p3 = (G4int)G4Poisson(a3);
|
||||
|
||||
lossc = 0.;
|
||||
if(p3 > 0)
|
||||
@@ -1741,11 +1741,11 @@ void G4hImpactIonisation::PrintInfoDefinition() const
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
// loop for materials
|
||||
|
||||
for (size_t j=0 ; j < numOfCouples; j++) {
|
||||
for (G4int j=0 ; j < numOfCouples; ++j) {
|
||||
|
||||
const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(j);
|
||||
const G4Material* material= couple->GetMaterial();
|
||||
|
||||
@@ -257,7 +257,7 @@ void G4hRDEnergyLoss::BuildDEDXTable(const G4ParticleDefinition& aParticleType)
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
std::size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
|
||||
// create/fill proton or antiproton tables depending on the charge
|
||||
Charge = aParticleType.GetPDGCharge()/eplus;
|
||||
@@ -309,7 +309,7 @@ void G4hRDEnergyLoss::BuildDEDXTable(const G4ParticleDefinition& aParticleType)
|
||||
G4bool isOutRange ;
|
||||
G4PhysicsTable* pointer ;
|
||||
|
||||
for (size_t J=0; J<numOfCouples; J++)
|
||||
for (std::size_t J=0; J<numOfCouples; ++J)
|
||||
{
|
||||
// create physics vector and fill it
|
||||
G4PhysicsLogVector* aVector =
|
||||
@@ -387,7 +387,7 @@ void G4hRDEnergyLoss::BuildRangeTable(const G4ParticleDefinition& aParticleType)
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
if( Charge >0.)
|
||||
{
|
||||
@@ -408,7 +408,7 @@ void G4hRDEnergyLoss::BuildRangeTable(const G4ParticleDefinition& aParticleType)
|
||||
|
||||
// loop for materials
|
||||
|
||||
for (size_t J=0; J<numOfCouples; J++)
|
||||
for (G4int J=0; J<numOfCouples; ++J)
|
||||
{
|
||||
G4PhysicsLogVector* aVector;
|
||||
aVector = new G4PhysicsLogVector(LowestKineticEnergy,
|
||||
@@ -425,7 +425,7 @@ void G4hRDEnergyLoss::BuildTimeTables(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
if(&aParticleType == G4Proton::Proton())
|
||||
{
|
||||
@@ -457,7 +457,7 @@ void G4hRDEnergyLoss::BuildTimeTables(const G4ParticleDefinition& aParticleType)
|
||||
theProperTimeTable = theProperTimepbarTable ;
|
||||
}
|
||||
|
||||
for (size_t J=0; J<numOfCouples; J++)
|
||||
for (G4int J=0; J<numOfCouples; ++J)
|
||||
{
|
||||
G4PhysicsLogVector* aVector;
|
||||
G4PhysicsLogVector* bVector;
|
||||
@@ -773,7 +773,7 @@ void G4hRDEnergyLoss::BuildRangeCoeffATable( const G4ParticleDefinition& )
|
||||
// Build tables of coefficients for the energy loss calculation
|
||||
// create table for coefficients "A"
|
||||
|
||||
G4int numOfCouples = G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize();
|
||||
G4int numOfCouples = (G4int)G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize();
|
||||
|
||||
if(Charge>0.)
|
||||
{
|
||||
@@ -857,7 +857,7 @@ void G4hRDEnergyLoss::BuildRangeCoeffBTable( const G4ParticleDefinition& )
|
||||
// create table for coefficients "B"
|
||||
|
||||
G4int numOfCouples =
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize();
|
||||
(G4int)G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize();
|
||||
|
||||
if(Charge>0.)
|
||||
{
|
||||
@@ -933,7 +933,7 @@ void G4hRDEnergyLoss::BuildRangeCoeffCTable( const G4ParticleDefinition& )
|
||||
// create table for coefficients "C"
|
||||
|
||||
G4int numOfCouples =
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize();
|
||||
(G4int)G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize();
|
||||
|
||||
if(Charge>0.)
|
||||
{
|
||||
@@ -1007,7 +1007,7 @@ BuildInverseRangeTable(const G4ParticleDefinition& aParticleType)
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
std::size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
|
||||
if(&aParticleType == G4Proton::Proton())
|
||||
{
|
||||
@@ -1038,11 +1038,11 @@ BuildInverseRangeTable(const G4ParticleDefinition& aParticleType)
|
||||
}
|
||||
|
||||
// loop for materials
|
||||
for (size_t i=0; i<numOfCouples; i++)
|
||||
for (std::size_t i=0; i<numOfCouples; ++i)
|
||||
{
|
||||
|
||||
G4PhysicsVector* pv = (*theRangeTable)[i];
|
||||
size_t nbins = pv->GetVectorLength();
|
||||
std::size_t nbins = pv->GetVectorLength();
|
||||
G4double elow = pv->GetLowEdgeEnergy(0);
|
||||
G4double ehigh = pv->GetLowEdgeEnergy(nbins-1);
|
||||
G4double rlow = pv->GetValue(elow, b);
|
||||
@@ -1069,10 +1069,10 @@ BuildInverseRangeTable(const G4ParticleDefinition& aParticleType)
|
||||
G4double range1 = rlow;
|
||||
G4double energy2 = elow;
|
||||
G4double range2 = rlow;
|
||||
size_t ilow = 0;
|
||||
size_t ihigh;
|
||||
std::size_t ilow = 0;
|
||||
std::size_t ihigh;
|
||||
|
||||
for (size_t j=1; j<nbins; j++) {
|
||||
for (std::size_t j=1; j<nbins; ++j) {
|
||||
|
||||
G4double range = v->GetLowEdgeEnergy(j);
|
||||
|
||||
@@ -1156,9 +1156,9 @@ G4bool G4hRDEnergyLoss::CutsWhereModified()
|
||||
G4bool wasModified = false;
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
for (size_t j=0; j<numOfCouples; j++){
|
||||
for (G4int j=0; j<numOfCouples; ++j){
|
||||
if (theCoupleTable->GetMaterialCutsCouple(j)->IsRecalcNeeded()) {
|
||||
wasModified = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user