Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -147,12 +147,12 @@ void G4Cerenkov::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
return;
|
||||
|
||||
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
||||
G4int numOfMaterials = G4Material::GetNumberOfMaterials();
|
||||
std::size_t numOfMaterials = G4Material::GetNumberOfMaterials();
|
||||
|
||||
thePhysicsTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
// loop over materials
|
||||
for(G4int i = 0; i < numOfMaterials; ++i)
|
||||
for(std::size_t i = 0; i < numOfMaterials; ++i)
|
||||
{
|
||||
G4PhysicsFreeVector* cerenkovIntegral = nullptr;
|
||||
|
||||
@@ -186,7 +186,7 @@ void G4Cerenkov::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
|
||||
// loop over all (photon energy, refraction index)
|
||||
// pairs stored for this material
|
||||
for(size_t ii = 1; ii < refractiveIndex->GetVectorLength(); ++ii)
|
||||
for(std::size_t ii = 1; ii < refractiveIndex->GetVectorLength(); ++ii)
|
||||
{
|
||||
currentRI = (*refractiveIndex)[ii];
|
||||
currentPM = refractiveIndex->Energy(ii);
|
||||
@@ -407,7 +407,7 @@ G4double G4Cerenkov::PostStepGetPhysicalInteractionLength(
|
||||
fNumPhotons = 0;
|
||||
|
||||
const G4Material* aMaterial = aTrack.GetMaterial();
|
||||
G4int materialIndex = aMaterial->GetIndex();
|
||||
std::size_t materialIndex = aMaterial->GetIndex();
|
||||
|
||||
// If Physics Vector is not defined no Cerenkov photons
|
||||
if(!(*thePhysicsTable)[materialIndex])
|
||||
@@ -514,12 +514,12 @@ G4double G4Cerenkov::GetAverageNumberOfPhotons(
|
||||
// Vectors used in computation of Cerenkov Angle Integral:
|
||||
// - Refraction Indices for the current material
|
||||
// - new G4PhysicsFreeVector allocated to hold CAI's
|
||||
G4int materialIndex = aMaterial->GetIndex();
|
||||
std::size_t materialIndex = aMaterial->GetIndex();
|
||||
|
||||
// Retrieve the Cerenkov Angle Integrals for this material
|
||||
G4PhysicsVector* CerenkovAngleIntegrals = ((*thePhysicsTable)(materialIndex));
|
||||
|
||||
G4int length = CerenkovAngleIntegrals->GetVectorLength();
|
||||
std::size_t length = CerenkovAngleIntegrals->GetVectorLength();
|
||||
if(0 == length)
|
||||
return 0.0;
|
||||
|
||||
@@ -604,7 +604,7 @@ void G4Cerenkov::SetStackPhotons(const G4bool stackingFlag)
|
||||
void G4Cerenkov::DumpPhysicsTable() const
|
||||
{
|
||||
G4cout << "Dump Physics Table!" << G4endl;
|
||||
for(size_t i = 0; i < thePhysicsTable->entries(); ++i)
|
||||
for(std::size_t i = 0; i < thePhysicsTable->entries(); ++i)
|
||||
{
|
||||
(*thePhysicsTable)[i]->DumpValues();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ G4ForwardXrayTR::G4ForwardXrayTR(const G4String& matName1,
|
||||
G4int iMat;
|
||||
const G4ProductionCutsTable* theCoupleTable =
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
G4int numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
G4bool build = true;
|
||||
|
||||
@@ -170,7 +170,7 @@ void G4ForwardXrayTR::BuildXrayTRtables()
|
||||
G4int iMat, jMat, iTkin, iTR, iPlace;
|
||||
const G4ProductionCutsTable* theCoupleTable =
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
G4int numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
fGammaCutInKineticEnergy = theCoupleTable->GetEnergyCutsVector(idxG4GammaCut);
|
||||
|
||||
@@ -493,7 +493,7 @@ G4VParticleChange* G4ForwardXrayTR::PostStepDoIt(const G4Track& aTrack,
|
||||
|
||||
if(iTkin == fTotBin) // TR plato, try from left
|
||||
{
|
||||
numOfTR = G4Poisson(
|
||||
numOfTR = (G4int)G4Poisson(
|
||||
((*(*fEnergyDistrTable)(iPlace))(0) + (*(*fAngleDistrTable)(iPlace))(0)) *
|
||||
chargeSq * 0.5);
|
||||
if(numOfTR == 0)
|
||||
@@ -557,13 +557,13 @@ G4VParticleChange* G4ForwardXrayTR::PostStepDoIt(const G4Track& aTrack,
|
||||
W1 = (E2 - TkinScaled) * W;
|
||||
W2 = (TkinScaled - E1) * W;
|
||||
|
||||
numOfTR = G4Poisson((((*(*fEnergyDistrTable)(iPlace))(0) +
|
||||
(*(*fAngleDistrTable)(iPlace))(0)) *
|
||||
W1 +
|
||||
((*(*fEnergyDistrTable)(iPlace + 1))(0) +
|
||||
(*(*fAngleDistrTable)(iPlace + 1))(0)) *
|
||||
W2) *
|
||||
chargeSq * 0.5);
|
||||
numOfTR = (G4int)G4Poisson((((*(*fEnergyDistrTable)(iPlace))(0) +
|
||||
(*(*fAngleDistrTable)(iPlace))(0)) *
|
||||
W1 +
|
||||
((*(*fEnergyDistrTable)(iPlace + 1))(0) +
|
||||
(*(*fAngleDistrTable)(iPlace + 1))(0)) *
|
||||
W2) *
|
||||
chargeSq * 0.5);
|
||||
if(numOfTR == 0)
|
||||
{
|
||||
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
@@ -640,7 +640,7 @@ G4double G4ForwardXrayTR::GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable =
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
G4int numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
// The case of equal or approximate (in terms of plasma energy) materials
|
||||
// No TR photons ?!
|
||||
@@ -679,7 +679,7 @@ G4double G4ForwardXrayTR::GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const
|
||||
|
||||
if(iTkin == fTotBin) // TR plato, try from left
|
||||
{
|
||||
numOfTR = G4Poisson((*energyVector1)(0));
|
||||
numOfTR = (G4int)G4Poisson((*energyVector1)(0));
|
||||
if(numOfTR == 0)
|
||||
{
|
||||
return energyTR;
|
||||
@@ -708,7 +708,7 @@ G4double G4ForwardXrayTR::GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const
|
||||
{ // use trivial mean half/half
|
||||
W1 = 0.5;
|
||||
W2 = 0.5;
|
||||
numOfTR = G4Poisson((*energyVector1)(0) * W1 + (*energyVector2)(0) * W2);
|
||||
numOfTR = (G4int)G4Poisson((*energyVector1)(0) * W1 + (*energyVector2)(0) * W2);
|
||||
if(numOfTR == 0)
|
||||
{
|
||||
return energyTR;
|
||||
|
||||
@@ -197,7 +197,7 @@ void G4Scintillation::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
}
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
size_t numOfMaterials = G4Material::GetNumberOfMaterials();
|
||||
std::size_t numOfMaterials = G4Material::GetNumberOfMaterials();
|
||||
|
||||
// create new physics table
|
||||
if(!fIntegralTable1)
|
||||
@@ -207,7 +207,7 @@ void G4Scintillation::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
if(!fIntegralTable3)
|
||||
fIntegralTable3 = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
for(size_t i = 0; i < numOfMaterials; ++i)
|
||||
for(std::size_t i = 0; i < numOfMaterials; ++i)
|
||||
{
|
||||
auto vector1 = new G4PhysicsFreeVector();
|
||||
auto vector2 = new G4PhysicsFreeVector();
|
||||
@@ -241,7 +241,7 @@ void G4Scintillation::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
|
||||
// loop over all (photon energy, intensity)
|
||||
// pairs stored for this material
|
||||
for(size_t ii = 1; ii < MPV->GetVectorLength(); ++ii)
|
||||
for(std::size_t ii = 1; ii < MPV->GetVectorLength(); ++ii)
|
||||
{
|
||||
currentPM = MPV->Energy(ii);
|
||||
currentIN = (*MPV)[ii];
|
||||
@@ -277,7 +277,7 @@ void G4Scintillation::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
|
||||
// loop over all (photon energy, intensity)
|
||||
// pairs stored for this material
|
||||
for(size_t ii = 1; ii < MPV->GetVectorLength(); ++ii)
|
||||
for(std::size_t ii = 1; ii < MPV->GetVectorLength(); ++ii)
|
||||
{
|
||||
currentPM = MPV->Energy(ii);
|
||||
currentIN = (*MPV)[ii];
|
||||
@@ -312,7 +312,7 @@ void G4Scintillation::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
|
||||
// loop over all (photon energy, intensity)
|
||||
// pairs stored for this material
|
||||
for(size_t ii = 1; ii < MPV->GetVectorLength(); ++ii)
|
||||
for(std::size_t ii = 1; ii < MPV->GetVectorLength(); ++ii)
|
||||
{
|
||||
currentPM = MPV->Energy(ii);
|
||||
currentIN = (*MPV)[ii];
|
||||
@@ -444,11 +444,11 @@ G4VParticleChange* G4Scintillation::PostStepDoIt(const G4Track& aTrack,
|
||||
aParticleChange.ProposeTrackStatus(fSuspend);
|
||||
}
|
||||
|
||||
G4int materialIndex = aMaterial->GetIndex();
|
||||
G4int materialIndex = (G4int)aMaterial->GetIndex();
|
||||
|
||||
// Retrieve the Scintillation Integral for this material
|
||||
// new G4PhysicsFreeVector allocated to hold CII's
|
||||
size_t numPhot = fNumPhotons;
|
||||
std::size_t numPhot = fNumPhotons;
|
||||
G4double scintTime = 0.;
|
||||
G4double riseTime = 0.;
|
||||
G4PhysicsFreeVector* scintIntegral = nullptr;
|
||||
@@ -513,7 +513,7 @@ G4VParticleChange* G4Scintillation::PostStepDoIt(const G4Track& aTrack,
|
||||
continue;
|
||||
|
||||
G4double CIImax = scintIntegral->GetMaxValue();
|
||||
for(size_t i = 0; i < numPhot; ++i)
|
||||
for(std::size_t i = 0; i < numPhot; ++i)
|
||||
{
|
||||
// Determine photon energy
|
||||
G4double CIIvalue = G4UniformRand() * CIImax;
|
||||
@@ -832,21 +832,21 @@ void G4Scintillation::DumpPhysicsTable() const
|
||||
{
|
||||
if(fIntegralTable1)
|
||||
{
|
||||
for(size_t i = 0; i < fIntegralTable1->entries(); ++i)
|
||||
for(std::size_t i = 0; i < fIntegralTable1->entries(); ++i)
|
||||
{
|
||||
((G4PhysicsFreeVector*) (*fIntegralTable1)[i])->DumpValues();
|
||||
}
|
||||
}
|
||||
if(fIntegralTable2)
|
||||
{
|
||||
for(size_t i = 0; i < fIntegralTable2->entries(); ++i)
|
||||
for(std::size_t i = 0; i < fIntegralTable2->entries(); ++i)
|
||||
{
|
||||
((G4PhysicsFreeVector*) (*fIntegralTable2)[i])->DumpValues();
|
||||
}
|
||||
}
|
||||
if(fIntegralTable3)
|
||||
{
|
||||
for(size_t i = 0; i < fIntegralTable3->entries(); ++i)
|
||||
for(std::size_t i = 0; i < fIntegralTable3->entries(); ++i)
|
||||
{
|
||||
((G4PhysicsFreeVector*) (*fIntegralTable3)[i])->DumpValues();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ G4StrawTubeXTRadiator::G4StrawTubeXTRadiator(G4LogicalVolume* anEnvelope,
|
||||
}
|
||||
|
||||
// index of medium material
|
||||
fMatIndex3 = mediumMat->GetIndex();
|
||||
fMatIndex3 = (G4int)mediumMat->GetIndex();
|
||||
if(verboseLevel > 0)
|
||||
G4cout << "medium material = " << mediumMat->GetName() << G4endl;
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ G4double G4SynchrotronRadiation::GetRandomEnergySR(G4double gamma,
|
||||
// mean and rms of photon energy
|
||||
G4double Emean = 8. / (15. * std::sqrt(3.)) * Ecr;
|
||||
G4double E_rms = std::sqrt(211. / 675.) * Ecr;
|
||||
G4int prec = G4cout.precision();
|
||||
G4long prec = G4cout.precision();
|
||||
G4cout << "G4SynchrotronRadiation::GetRandomEnergySR :" << '\n'
|
||||
<< std::setprecision(4) << " Ecr = " << G4BestUnit(Ecr, "Energy")
|
||||
<< '\n'
|
||||
|
||||
@@ -131,12 +131,12 @@ G4VXTRenergyLoss::G4VXTRenergyLoss(G4LogicalVolume* anEnvelope,
|
||||
<< G4endl;
|
||||
|
||||
// index of plate material
|
||||
fMatIndex1 = foilMat->GetIndex();
|
||||
fMatIndex1 = (G4int)foilMat->GetIndex();
|
||||
if(verboseLevel > 0)
|
||||
G4cout << "plate material = " << foilMat->GetName() << G4endl;
|
||||
|
||||
// index of gas material
|
||||
fMatIndex2 = gasMat->GetIndex();
|
||||
fMatIndex2 = (G4int)gasMat->GetIndex();
|
||||
if(verboseLevel > 0)
|
||||
G4cout << "gas material = " << gasMat->GetName() << G4endl;
|
||||
|
||||
@@ -342,12 +342,8 @@ void G4VXTRenergyLoss::BuildEnergyTable()
|
||||
fGamma =
|
||||
1.0 + (fProtonEnergyVector->GetLowEdgeEnergy(iTkin) / proton_mass_c2);
|
||||
|
||||
fMaxThetaTR = 25. * 2500.0 / (fGamma * fGamma); // theta^2
|
||||
|
||||
if(fMaxThetaTR > fTheMaxAngle)
|
||||
fMaxThetaTR = fTheMaxAngle;
|
||||
else if(fMaxThetaTR < fTheMinAngle)
|
||||
fMaxThetaTR = fTheMinAngle;
|
||||
// if(fMaxThetaTR > fTheMaxAngle) fMaxThetaTR = fTheMaxAngle;
|
||||
// else if(fMaxThetaTR < fTheMinAngle) fMaxThetaTR = fTheMinAngle;
|
||||
|
||||
energySum = 0.0;
|
||||
|
||||
@@ -1192,7 +1188,7 @@ G4double G4VXTRenergyLoss::GetPlateCompton(G4double omega)
|
||||
G4double xSection = 0., nowZ, sumZ = 0.;
|
||||
|
||||
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
||||
numberOfElements = (*theMaterialTable)[fMatIndex1]->GetNumberOfElements();
|
||||
numberOfElements = (G4int)(*theMaterialTable)[fMatIndex1]->GetNumberOfElements();
|
||||
|
||||
for(i = 0; i < numberOfElements; ++i)
|
||||
{
|
||||
@@ -1213,7 +1209,7 @@ G4double G4VXTRenergyLoss::GetGasCompton(G4double omega)
|
||||
G4double xSection = 0., nowZ, sumZ = 0.;
|
||||
|
||||
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
||||
numberOfElements = (*theMaterialTable)[fMatIndex2]->GetNumberOfElements();
|
||||
numberOfElements = (G4int)(*theMaterialTable)[fMatIndex2]->GetNumberOfElements();
|
||||
|
||||
for(i = 0; i < numberOfElements; ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user