294 if (path ==
nullptr) {
296 "G4LEDATA environment variable not set");
300 std::ostringstream file;
302 (fICRU90 && (matname ==
"G4_WATER" || matname ==
"G4_AIR" || matname ==
"G4_GRAPHITE")) ?
"90"
305 file << path <<
"/" << subDir << ww <<
"/z" << atomicNumberIon <<
"_" << matname <<
".dat";
308 std::ifstream ifilestream(fileName);
310 if (! ifilestream.is_open()) {
316 if (! physicsVector->Retrieve(ifilestream,
true)) {
321 physicsVector->ScaleVector(MeV, MeV * cm2 / (0.001 * g));
322 physicsVector->FillSecondDerivatives();
326 delete physicsVector;
346 if (path ==
nullptr) {
348 "G4LEDATA environment variable not set");
351 std::ostringstream file;
353 (fICRU90 && ZIon <= 18 && (ZElem == 1 || ZElem == 6 || ZElem == 7 || ZElem == 8)) ?
"90" :
"73";
355 file << path <<
"/" << subDir << ww <<
"/z" << ZIon <<
"_" << ZElem <<
".dat";
358 std::ifstream ifilestream(fileName);
360 if (! ifilestream.is_open()) {
365 if (! physicsVector->Retrieve(ifilestream,
true)) {
370 physicsVector->ScaleVector(MeV, MeV * cm2 / (0.001 * g));
371 physicsVector->FillSecondDerivatives();
375 delete physicsVector;
388 auto iterMat = dedxMapMaterials.begin();
389 auto iterMat_end = dedxMapMaterials.end();
391 for (; iterMat != iterMat_end; iterMat++) {
397 dedxMapMaterials.clear();
399 auto iterElem = dedxMapElements.begin();
400 auto iterElem_end = dedxMapElements.end();
402 for (; iterElem != iterElem_end; iterElem++) {
408 dedxMapElements.clear();
415 auto iterMat = dedxMapMaterials.begin();
416 auto iterMat_end = dedxMapMaterials.end();
418 G4cout << std::setw(15) << std::right <<
"Atomic nmb ion" << std::setw(25) << std::right
419 <<
"Material name" <<
G4endl;
421 for (; iterMat != iterMat_end; iterMat++) {
422 G4IonDEDXKeyMat key = iterMat->first;
425 G4int atomicNumberIon = key.first;
426 G4String matIdentifier = key.second;
428 if (physicsVector !=
nullptr) {
429 G4cout << std::setw(15) << std::right << atomicNumberIon << std::setw(25) << std::right
430 << matIdentifier <<
G4endl;
434 auto iterElem = dedxMapElements.begin();
435 auto iterElem_end = dedxMapElements.end();
437 G4cout << std::setw(15) << std::right <<
"Atomic nmb ion" << std::setw(25) << std::right
438 <<
"Atomic nmb material" <<
G4endl;
440 for (; iterElem != iterElem_end; iterElem++) {
441 G4IonDEDXKeyElem key = iterElem->first;
444 G4int atomicNumberIon = key.first;
445 G4int atomicNumberElem = key.second;
447 if (physicsVector !=
nullptr) {
448 G4cout << std::setw(15) << std::right << atomicNumberIon << std::setw(25) << std::right
449 << atomicNumberElem <<
G4endl;