Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -129,7 +129,7 @@ const std::vector<G4double>* G4LossTableBuilder::GetDensityFactors() const
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4LossTableBuilder::GetFlag(size_t idx)
|
||||
G4bool G4LossTableBuilder::GetFlag(std::size_t idx)
|
||||
{
|
||||
if(theFlag->empty()) { InitialiseBaseMaterials(); }
|
||||
return (idx < theFlag->size()) ? (*theFlag)[idx] : false;
|
||||
@@ -150,22 +150,22 @@ G4LossTableBuilder::BuildDEDXTable(G4PhysicsTable* dedxTable,
|
||||
const std::vector<G4PhysicsTable*>& list)
|
||||
{
|
||||
InitialiseBaseMaterials(dedxTable);
|
||||
size_t n_processes = list.size();
|
||||
std::size_t n_processes = list.size();
|
||||
if(1 >= n_processes) { return; }
|
||||
|
||||
size_t nCouples = dedxTable->size();
|
||||
std::size_t nCouples = dedxTable->size();
|
||||
//G4cout << "Nproc= " << n_processes << " nCouples=" << nCouples << " Nv= "
|
||||
// << dedxTable->size() << G4endl;
|
||||
if(0 >= nCouples) { return; }
|
||||
|
||||
for (size_t i=0; i<nCouples; ++i) {
|
||||
for (std::size_t i=0; i<nCouples; ++i) {
|
||||
auto pv0 = static_cast<G4PhysicsLogVector*>((*(list[0]))[i]);
|
||||
if(pv0 == nullptr) { continue; }
|
||||
size_t npoints = pv0->GetVectorLength();
|
||||
std::size_t npoints = pv0->GetVectorLength();
|
||||
auto pv = new G4PhysicsLogVector(*pv0);
|
||||
for (size_t j=0; j<npoints; ++j) {
|
||||
for (std::size_t j=0; j<npoints; ++j) {
|
||||
G4double dedx = 0.0;
|
||||
for (size_t k=0; k<n_processes; ++k) {
|
||||
for (std::size_t k=0; k<n_processes; ++k) {
|
||||
const G4PhysicsVector* pv1 = (*(list[k]))[i];
|
||||
dedx += (*pv1)[j];
|
||||
}
|
||||
@@ -304,7 +304,7 @@ void G4LossTableBuilder::InitialiseBaseMaterials(const G4PhysicsTable* table)
|
||||
*/
|
||||
// define base material flag
|
||||
if(isBaseMatActive && !baseMatFlag) {
|
||||
for(std::size_t i=0; i<nCouples; ++i) {
|
||||
for(G4int i=0; i<(G4int)nCouples; ++i) {
|
||||
if(nullptr != theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial()->GetBaseMaterial()) {
|
||||
baseMatFlag = true;
|
||||
isInitialized = false;
|
||||
@@ -326,14 +326,14 @@ void G4LossTableBuilder::InitialiseBaseMaterials(const G4PhysicsTable* table)
|
||||
}
|
||||
|
||||
// define default flag and index of used material cut couple
|
||||
for(std::size_t i=0; i<nCouples; ++i) {
|
||||
for(G4int i=0; i<(G4int)nCouples; ++i) {
|
||||
(*theFlag)[i] = table->GetFlag(i);
|
||||
if(baseMatFlag) { (*theDensityIdx)[i] = i; }
|
||||
}
|
||||
isInitialized = true;
|
||||
if(baseMatFlag) {
|
||||
// use base materials
|
||||
for(std::size_t i=0; i<nCouples; ++i) {
|
||||
for(G4int i=0; i<(G4int)nCouples; ++i) {
|
||||
// base material is needed only for a couple which is not
|
||||
// initialised and for which tables will be computed
|
||||
auto couple = theCoupleTable->GetMaterialCutsCouple(i);
|
||||
@@ -343,7 +343,7 @@ void G4LossTableBuilder::InitialiseBaseMaterials(const G4PhysicsTable* table)
|
||||
|
||||
// base material exists - find it and check if it can be reused
|
||||
if(nullptr != bmat) {
|
||||
for(std::size_t j=0; j<nCouples; ++j) {
|
||||
for(G4int j=0; j<(G4int)nCouples; ++j) {
|
||||
if(j == i) { continue; }
|
||||
auto bcouple = theCoupleTable->GetMaterialCutsCouple(j);
|
||||
|
||||
@@ -368,7 +368,7 @@ void G4LossTableBuilder::InitialiseBaseMaterials(const G4PhysicsTable* table)
|
||||
/*
|
||||
G4cout << "### G4LossTableBuilder::InitialiseBaseMaterials: flag="
|
||||
<< baseMatFlag << G4endl;
|
||||
for(size_t i=0; i<nCouples; ++i) {
|
||||
for(std::size_t i=0; i<nCouples; ++i) {
|
||||
G4cout << "CoupleIdx=" << i << " Flag= " << (*theFlag)[i] << " "
|
||||
<< theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial()->GetName()
|
||||
<< " TableFlag= " << table->GetFlag(i)
|
||||
@@ -406,7 +406,7 @@ G4LossTableBuilder::BuildTableForModel(G4PhysicsTable* aTable,
|
||||
|
||||
G4PhysicsLogVector* aVector = nullptr;
|
||||
|
||||
for(std::size_t i=0; i<numOfCouples; ++i) {
|
||||
for(G4int i=0; i<(G4int)numOfCouples; ++i) {
|
||||
if ((*theFlag)[i]) {
|
||||
|
||||
// create physics vector and fill it
|
||||
|
||||
Reference in New Issue
Block a user