Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -86,13 +86,13 @@ void G4EmBiasingManager::Initialise(const G4ParticleDefinition& part,
|
||||
// << " and " << procName << G4endl;
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
if(0 < nForcedRegions) { idxForcedCouple.resize(numOfCouples, -1); }
|
||||
if(0 < nSecBiasedRegions) { idxSecBiasedCouple.resize(numOfCouples, -1); }
|
||||
|
||||
// Deexcitation
|
||||
for (size_t j=0; j<numOfCouples; ++j) {
|
||||
for (G4int j=0; j<numOfCouples; ++j) {
|
||||
const G4MaterialCutsCouple* couple =
|
||||
theCoupleTable->GetMaterialCutsCouple(j);
|
||||
const G4ProductionCuts* pcuts = couple->GetProductionCuts();
|
||||
@@ -298,7 +298,7 @@ G4EmBiasingManager::ApplySecondaryBiasing(
|
||||
G4int index = idxSecBiasedCouple[coupleIdx];
|
||||
G4double weight = 1.;
|
||||
if(0 <= index) {
|
||||
size_t n = vd.size();
|
||||
std::size_t n = vd.size();
|
||||
|
||||
// the check cannot be applied per secondary particle
|
||||
// because weight correction is common, so the first
|
||||
@@ -351,7 +351,7 @@ G4EmBiasingManager::ApplySecondaryBiasing(
|
||||
G4int index = idxSecBiasedCouple[coupleIdx];
|
||||
G4double weight = 1.;
|
||||
if(0 <= index) {
|
||||
size_t n = vd.size();
|
||||
std::size_t n = vd.size();
|
||||
|
||||
// the check cannot be applied per secondary particle
|
||||
// because weight correction is common, so the first
|
||||
@@ -398,7 +398,7 @@ G4EmBiasingManager::ApplySecondaryBiasing(std::vector<G4Track*>& track,
|
||||
G4int index = idxSecBiasedCouple[coupleIdx];
|
||||
G4double weight = 1.;
|
||||
if(0 <= index) {
|
||||
size_t n = track.size();
|
||||
std::size_t n = track.size();
|
||||
|
||||
// the check cannot be applied per secondary particle
|
||||
// because weight correction is common, so the first
|
||||
@@ -410,7 +410,7 @@ G4EmBiasingManager::ApplySecondaryBiasing(std::vector<G4Track*>& track,
|
||||
// Russian Roulette only
|
||||
if(1 == nsplit) {
|
||||
weight = secBiasedWeight[index];
|
||||
for(size_t k=0; k<n; ++k) {
|
||||
for(std::size_t k=0; k<n; ++k) {
|
||||
if(G4UniformRand()*weight > 1.0) {
|
||||
const G4Track* t = track[k];
|
||||
delete t;
|
||||
@@ -430,13 +430,13 @@ G4EmBiasingManager::ApplyRangeCut(std::vector<G4DynamicParticle*>& vd,
|
||||
const G4Track& track,
|
||||
G4double& eloss, G4double safety)
|
||||
{
|
||||
size_t n = vd.size();
|
||||
std::size_t n = vd.size();
|
||||
if(!eIonisation) {
|
||||
eIonisation =
|
||||
G4LossTableManager::Instance()->GetEnergyLossProcess(theElectron);
|
||||
}
|
||||
if(eIonisation) {
|
||||
for(size_t k=0; k<n; ++k) {
|
||||
for(std::size_t k=0; k<n; ++k) {
|
||||
const G4DynamicParticle* dp = vd[k];
|
||||
if(dp->GetDefinition() == theElectron) {
|
||||
G4double e = dp->GetKineticEnergy();
|
||||
@@ -476,7 +476,7 @@ G4EmBiasingManager::ApplySplitting(std::vector<G4DynamicParticle*>& vd,
|
||||
// method is applied only if 1 secondary created PostStep
|
||||
// in the case of many secondaries there is a contradiction
|
||||
G4double weight = 1.;
|
||||
size_t n = vd.size();
|
||||
std::size_t n = vd.size();
|
||||
G4double w = secBiasedWeight[index];
|
||||
|
||||
if(1 != n || 1.0 <= w) { return weight; }
|
||||
@@ -499,7 +499,7 @@ G4EmBiasingManager::ApplySplitting(std::vector<G4DynamicParticle*>& vd,
|
||||
tmpSecondaries.clear();
|
||||
currentModel->SampleSecondaries(&tmpSecondaries, couple, dynParticle,
|
||||
tcut);
|
||||
for (size_t kk=0; kk<tmpSecondaries.size(); ++kk) {
|
||||
for (std::size_t kk=0; kk<tmpSecondaries.size(); ++kk) {
|
||||
vd.push_back(tmpSecondaries[kk]);
|
||||
}
|
||||
}
|
||||
@@ -555,7 +555,7 @@ G4EmBiasingManager::ApplyDirectionalSplitting(
|
||||
track.GetMaterialCutsCouple(),
|
||||
track.GetDynamicParticle(), tcut);
|
||||
}
|
||||
for (size_t kk=0; kk<tmpSecondaries.size(); ++kk) {
|
||||
for (std::size_t kk=0; kk<tmpSecondaries.size(); ++kk) {
|
||||
if (tmpSecondaries[kk]->GetParticleDefinition() == theGamma) {
|
||||
if (CheckDirection(pos, tmpSecondaries[kk]->GetMomentumDirection())){
|
||||
vd.push_back(tmpSecondaries[kk]);
|
||||
@@ -615,7 +615,7 @@ G4EmBiasingManager::ApplyDirectionalSplitting(
|
||||
partChange->SetProposedKineticEnergy(primaryEnergy);
|
||||
partChange->ProposeMomentumDirection(primaryMomdir);
|
||||
} else {
|
||||
for (size_t i = 0; i < vd.size(); ++i) {
|
||||
for (std::size_t i = 0; i < vd.size(); ++i) {
|
||||
fDirectionalSplittingWeights.push_back(1.);
|
||||
}
|
||||
}
|
||||
@@ -677,7 +677,7 @@ G4EmBiasingManager::ApplyDirectionalSplitting(
|
||||
track.GetDynamicParticle(), tcut);
|
||||
}
|
||||
//for (auto sec : tmpSecondaries) {
|
||||
for (size_t kk=0; kk < tmpSecondaries.size(); ++kk) {
|
||||
for (std::size_t kk=0; kk < tmpSecondaries.size(); ++kk) {
|
||||
if (CheckDirection(pos, tmpSecondaries[kk]->GetMomentumDirection())) {
|
||||
vd.push_back(tmpSecondaries[kk]);
|
||||
fDirectionalSplittingWeights.push_back(1.);
|
||||
@@ -691,7 +691,7 @@ G4EmBiasingManager::ApplyDirectionalSplitting(
|
||||
}
|
||||
} // end of loop over nsplit
|
||||
} else { // no splitting was done; still need weights
|
||||
for (size_t i = 0; i < vd.size(); ++i) {
|
||||
for (std::size_t i = 0; i < vd.size(); ++i) {
|
||||
fDirectionalSplittingWeights.push_back(1.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user