61 nDataSetList(0), verboseLevel(0),fastPathFlags(),fastPathParams(),
62 counters(),fastPathCache()
134 requiresSlowPath=
true;
174 requiresSlowPath =
true;
186 if ( !requiresSlowPath ) {
198 if ( entry !=
nullptr && ! requiresSlowPath ) {
207 assert(requiresSlowPath==
false);
208 requiresSlowPath =
true;
212 if ( !requiresSlowPath && fast_entry !=
nullptr ) {
228 for(
G4int i=0; i<nElements; ++i) {
237 if ( entry !=
nullptr ) {
252 if ( entry !=
nullptr ) {
256 os<<
"#Cache entry for {"<<(pd!=
nullptr?pd->
GetParticleName():
"UNDEFINED")<<
",";
257 os<<(mat!=
nullptr?mat->
GetName():
"UNDEFINED")<<
"} found, but no fast path defined";
260 os<<
"#Cache entry for {"<<(pd!=
nullptr?pd->
GetParticleName():
"UNDEFINED")<<
",";
261 os<<(mat!=
nullptr?mat->
GetName():
"UNDEFINED")<<
"} not found.";
285 for(
size_t i=0; i<nElements; ++i) {
314 dataSetList[i]->IsElementApplicable(part, Z, mat)) {
332 for (
size_t j=0; j<nIso; ++j) {
333 if(abundVector[j] > 0.0) {
363 if(
dataSetList[idx]->IsIsoApplicable(part, Z, A, elm, mat) ) {
364 return dataSetList[
idx]->GetIsoCrossSection(part, Z, A, iso, elm, mat);
369 if (
dataSetList[j]->IsElementApplicable(part, Z, mat)) {
370 return dataSetList[j]->GetElementCrossSection(part, Z, mat);
371 }
else if (
dataSetList[j]->IsIsoApplicable(part, Z, A, elm, mat)) {
372 return dataSetList[j]->GetIsoCrossSection(part, Z, A, iso, elm, mat);
377 ed <<
"No isotope cross section found for "
379 <<
" off Element " << elm->
GetName()
380 <<
" in " << mat->
GetName() <<
" Z= " << Z <<
" A= " << A
382 G4Exception(
"G4CrossSectionDataStore::GetIsoCrossSection",
"had001",
397 if (
dataSetList[i]->IsIsoApplicable(part, Z, A, elm, mat) ) {
398 return dataSetList[i]->GetIsoCrossSection(part, Z, A, iso, elm, mat);
402 ed <<
"No isotope cross section found for "
404 <<
" off Element " << elm->
GetName()
405 <<
" in " << mat->
GetName() <<
" Z= " << Z <<
" A= " << A
407 G4Exception(
"G4CrossSectionDataStore::GetCrossSection",
"had001",
425 for(
size_t i=0; i<nElements; ++i) {
437 if (
dataSetList[i]->IsElementApplicable(part, Z, mat)) {
468 for (j = 0; j<nIso; ++j) {
470 if(abundVector[j] > 0.0) {
472 xsec = abundVector[j]*
479 for (j = 0; j<nIso; ++j) {
498 ed <<
"No cross section is registered for "
500 G4Exception(
"G4CrossSectionDataStore::BuildPhysicsTable",
"had001",
511 using my_value_type=G4FastPathHadronicCrossSection::G4CrossSectionDataStore_Requests::value_type;
514 [&aParticleType,
this](
const my_value_type& req) {
515 if ( aParticleType == *req.part_mat.first ) {
534 assert(pdef!=
nullptr&&mat!=
nullptr);
538 ed <<
"Attempting to request FastPath for couple: <"
539 << pdef->GetParticleName() <<
", " <<
mat->GetName()
540 <<
"> but combination already exists" <<
G4endl;
541 G4Exception(
"G4CrossSectionDataStore::ActivateFastPath",
"had001",
555 G4cout <<
"WARNING - G4CrossSectionDataStore::DumpPhysicsTable: "
556 <<
" no data sets registered" <<
G4endl;
564 <<
" Cr_sctns: " << std::setw(25) <<
dataSetList[i]->GetName() <<
": "
568 if (
dataSetList[i]->GetName() ==
"G4CrossSectionPairGG") {
577 std::ofstream& outFile)
const
584 G4String physListName(std::getenv(
"G4PhysListName"));
588 outFile <<
" <li><b><a href=\"" << physListName <<
"_"
591 << elo <<
" GeV to " << ehi <<
" GeV </b></li>\n";
598 if (ehi < defaultHi) {
599 outFile <<
" <li><b><a href=\"" <<
dataSetList[0]->GetName() <<
".html\"> "
601 << ehi <<
" GeV to " << defaultHi <<
" GeV </b></li>\n";
610 G4String dirName(std::getenv(
"G4PhysListDocDir"));
611 G4String physListName(std::getenv(
"G4PhysListName"));
615 outCS.open(pathName);
618 outCS <<
"<title>Description of " << cs->
GetName()
620 outCS <<
"</head>\n";
625 outCS <<
"</body>\n";
626 outCS <<
"</html>\n";
636 return ch ==
' ' ?
'_' : ch;
666 std::vector< G4VCrossSectionDataSet* >::iterator
it =
dataSetList.end() - i;