64 subDir(dir), fICRU90(val) {
76 G4int atomicNumberIon,
77 G4int atomicNumberElem
90 G4int atomicNumberIon,
104 G4int atomicNumberIon,
105 G4int atomicNumberElem
118 G4int atomicNumberIon,
133 G4int atomicNumberIon,
134 G4int atomicNumberElem
142 (iter->second)->Value( kinEnergyPerNucleon) : 0.0;
149 G4int atomicNumberIon,
158 (iter->second)->Value(kinEnergyPerNucleon) : 0.0;
165 G4int atomicNumberIon,
169 if(physicsVector ==
nullptr) {
170 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material",
172 "Pointer to vector is null-pointer.");
176 if(matIdentifier.empty()) {
177 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material",
182 if(atomicNumberIon <= 0) {
183 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material",
192 ed <<
"Vector with Z1 = " << atomicNumberIon <<
", mat = "
194 <<
"already exists. Remove first before replacing.";
195 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material",
209 G4int atomicNumberIon,
210 G4int atomicNumberElem
213 if(physicsVector ==
nullptr) {
214 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element",
"mat037",
219 if(atomicNumberIon <= 0) {
220 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element",
"mat038",
225 if(atomicNumberElem <= 0) {
226 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element",
"mat039",
235 ed <<
"Vector with Z1 = " << atomicNumberIon <<
", Z= "
237 <<
"already exists. Remove first before replacing.";
238 G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element",
"mat040",
251 G4int atomicNumberIon,
260 G4Exception (
"G4IonStoppingData::RemovePhysicsVector() for material",
271 delete physicsVector;
279 G4int atomicNumberIon,
280 G4int atomicNumberElem
287 G4Exception (
"G4IonStoppingData::RemovePhysicsVector() for element",
298 delete physicsVector;
306 G4int atomicNumberIon,
310 if(
IsApplicable(atomicNumberIon, matname) )
return true;
312 const char* path = std::getenv(
"G4LEDATA");
314 G4Exception(
"G4IonStoppingData::BuildPhysicsVector()",
"mat521",
319 std::ostringstream
file;
321 matname ==
"G4_AIR" ||
322 matname ==
"G4_GRAPHITE")) ?
"90" :
"73";
325 << atomicNumberIon <<
"_" << matname <<
".dat";
328 std::ifstream ifilestream( fileName );
330 if ( !ifilestream.is_open() )
return false;
334 if( !physicsVector -> Retrieve(ifilestream,
true) ) {
340 physicsVector -> ScaleVector(
MeV,
MeV *
cm2 /( 0.001 *
g) );
341 physicsVector -> FillSecondDerivatives();
345 delete physicsVector;
363 char* path = std::getenv(
"G4LEDATA");
365 G4Exception(
"G4IonStoppingData::BuildPhysicsVector()",
"mat522",
369 std::ostringstream
file;
371 (ZElem == 1 || ZElem == 6 ||
372 ZElem == 7 || ZElem == 8)) ?
"90" :
"73";
375 << ZIon <<
"_" << ZElem <<
".dat";
378 std::ifstream ifilestream( fileName );
380 if ( !ifilestream.is_open() )
return false;
383 if( !physicsVector -> Retrieve(ifilestream,
true) ) {
388 physicsVector -> ScaleVector(
MeV,
MeV *
cm2 /( 0.001 *
g) );
389 physicsVector -> FillSecondDerivatives();
393 delete physicsVector;
409 for(;iterMat != iterMat_end; iterMat++) {
413 if(vec != 0)
delete vec;
421 for(;iterElem != iterElem_end; iterElem++) {
425 if(vec != 0)
delete vec;
438 G4cout << std::setw(15) << std::right
440 << std::setw(25) << std::right
444 for(;iterMat != iterMat_end; iterMat++) {
448 G4int atomicNumberIon = key.first;
449 G4String matIdentifier = key.second;
451 if(physicsVector != 0) {
452 G4cout << std::setw(15) << std::right
454 << std::setw(25) << std::right
463 G4cout << std::setw(15) << std::right
465 << std::setw(25) << std::right
466 <<
"Atomic nmb material"
469 for(;iterElem != iterElem_end; iterElem++) {
473 G4int atomicNumberIon = key.first;
474 G4int atomicNumberElem = key.second;
476 if(physicsVector != 0) {
477 G4cout << std::setw(15) << std::right
479 << std::setw(25) << std::right
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static constexpr double cm2
static constexpr double second
static constexpr double g
static constexpr double MeV
G4GLOB_DLL std::ostream G4cout
G4PhysicsVector * GetPhysicsVector(G4int atomicNumberIon, G4int atomicNumberElem)
G4IonDEDXMapElem dedxMapElements
G4IonDEDXMapMat dedxMapMaterials
std::pair< G4int, G4String > G4IonDEDXKeyMat
G4bool IsApplicable(G4int atomicNumberIon, G4int atomicNumberElem)
G4bool RemovePhysicsVector(G4int atomicNumberIon, const G4String &matIdentifier)
G4double GetDEDX(G4double kinEnergyPerNucleon, G4int atomicNumberIon, G4int atomicNumberElem)
G4bool AddPhysicsVector(G4PhysicsVector *physicsVector, G4int atomicNumberIon, const G4String &matIdentifier)
G4IonStoppingData(const G4String &dir, G4bool icru)
std::pair< G4int, G4int > G4IonDEDXKeyElem
G4bool BuildPhysicsVector(G4int ionZ, const G4String &matName)
virtual ~G4IonStoppingData()