54 G4tgbMaterialMgr::G4tgbMaterialMgr()
76 G4mstgbisot::const_iterator isotcite;
77 for( isotcite = theG4tgbIsotopes.begin();
78 isotcite != theG4tgbIsotopes.end(); isotcite++)
80 delete (*isotcite).second;
82 theG4tgbIsotopes.clear();
84 G4mstgbelem::const_iterator elemcite;
85 for( elemcite = theG4tgbElements.begin();
86 elemcite != theG4tgbElements.end(); elemcite++)
88 delete (*elemcite).second;
90 theG4tgbElements.clear();
92 G4mstgbmate::const_iterator matcite;
93 for( matcite = theG4tgbMaterials.begin();
94 matcite != theG4tgbMaterials.end(); matcite++)
96 delete (*matcite).second;
98 theG4tgbMaterials.clear();
109 G4mstgrisot::const_iterator cite;
110 for( cite = tgrIsots.begin(); cite != tgrIsots.end(); cite++ )
114 theG4tgbIsotopes[tgb->
GetName()] = tgb;
124 G4mstgrelem::const_iterator cite;
125 for( cite = tgrElems.begin(); cite != tgrElems.end(); cite++ )
129 theG4tgbElements[tgb->
GetName()] = tgb;
139 G4mstgrmate::const_iterator cite;
140 for( cite = tgrMates.begin(); cite != tgrMates.end(); cite++ )
144 if( tgr->
GetType() ==
"MaterialSimple" ) {
146 }
else if( tgr->
GetType() ==
"MaterialMixtureByWeight" ) {
148 }
else if( tgr->
GetType() ==
"MaterialMixtureByNoAtoms" ) {
150 }
else if( tgr->
GetType() ==
"MaterialMixtureByVolume" ) {
155 theG4tgbMaterials[tgb->
GetName()] = tgb;
171 theG4Isotopes[isotname] = g4isot;
178 G4cout <<
" G4tgbMaterialMgr::FindOrBuildG4Isotope() -"
179 <<
" G4Isotope already built: " << g4isot->
GetName() <<
G4endl;
187 G4cout <<
" G4tgbMaterialMgr::FindOrBuildG4Isotope() - Isotope: "
200 G4msg4isot::const_iterator cite = theG4Isotopes.find( name );
201 if( cite != theG4Isotopes.end() )
203 g4isot = (*cite).second;
207 G4cout <<
" G4tgbMaterialMgr::FindBuiltG4Isotope() - Isotope: "
208 << name <<
" = " << g4isot <<
G4endl;
224 G4mstgbisot::const_iterator cite = theG4tgbIsotopes.find( name );
225 if( cite != theG4tgbIsotopes.end() )
230 G4cout <<
" G4tgbMaterialMgr::FindG4tgbIsotope() -"
231 <<
" G4tgbIsotope found: " << ( (*cite).second )->GetName()
235 isot = (*cite).second;
237 if( (isot == 0) && bMustExist )
239 G4String ErrMessage =
"Isotope " + name +
" not found !";
240 G4Exception(
"G4tgbMaterialMgr::FindG4tgbIsotope()",
259 G4cout <<
" G4NistManager::Instance()->FindOrBuildElement( " <<
G4endl;
264 if( tgbelem->
GetType() ==
"ElementSimple" )
268 else if( tgbelem->
GetType() ==
"ElementFromIsotopes" )
275 +
" does not exist !";
283 theG4Elements[g4elem->
GetName()] = g4elem;
287 G4cout <<
" G4tgbMaterialMgr::FindOrBuildG4Element() - Element: "
296 G4String ErrMessage =
"Element " + name +
" not found !";
297 G4Exception(
"G4tgbMaterialMgr::FindOrBuildG4Element()",
303 G4cout <<
" G4tgbMaterialMgr::FindOrBuildG4Element() - Element: "
304 << name <<
" not found " <<
G4endl;
314 G4cout <<
" G4tgbMaterialMgr::GetG4Element() -"
315 <<
" G4Element already built: " << g4elem->
GetName() <<
G4endl;
329 G4msg4elem::const_iterator cite = theG4Elements.find( name );
330 if( cite != theG4Elements.end() )
332 g4elem = (*cite).second;
336 G4cout <<
" G4tgbMaterialMgr::FindBuiltG4Element() - Element: "
337 << name <<
" = " << g4elem <<
G4endl;
352 G4mstgbelem::const_iterator cite = theG4tgbElements.find( name );
353 if( cite != theG4tgbElements.end() )
358 G4cout <<
" G4tgbMaterialMgr::FindG4tgbElement() -"
359 <<
" G4tgbElement found: " << ( (*cite).second )->GetName()
363 elem = (*cite).second;
365 if( (elem == 0) && bMustExist )
367 G4String ErrMessage =
"Element " + name +
" not found !";
368 G4Exception(
"G4tgbMaterialMgr::FindG4tgbElement()",
397 GetTgrMate()->GetIonisationMeanExcitationEnergy());
404 theG4Materials[g4mate->
GetName()] = g4mate;
408 G4cout <<
" G4tgbMaterialMgr::FindOrBuildG4Material() - Material: "
417 G4String ErrMessage =
"Material " + name +
" not found !";
418 G4Exception(
"G4tgbMaterialMgr::FindOrBuildG4Material()",
424 G4cout <<
" G4tgbMaterialMgr::FindOrBuildG4Material() - Element: "
425 << name <<
" not found " <<
G4endl;
435 G4cout <<
" G4tgbMaterialMgr::FindOrBuildG4Material() -"
436 <<
" G4Material already built: " << g4mate->
GetName() <<
G4endl;
450 G4msg4mate::const_iterator cite = theG4Materials.find( name );
451 if( cite != theG4Materials.end() )
453 g4mate = (*cite).second;
457 G4cout <<
" G4tgbMaterialMgr::FindBuiltG4Material() - Material: "
458 << name <<
" = " << g4mate <<
G4endl;
472 G4mstgbmate::const_iterator cite = theG4tgbMaterials.find( name );
473 if( cite != theG4tgbMaterials.end() )
475 mate = (*cite).second;
479 G4cout <<
" G4tgbMaterialMgr::FindG4tgbMaterial() -"
480 <<
" G4tgbMaterial found: " << ( (*cite).second )->GetName()
481 <<
" type " << ( (*cite).second )->GetName() <<
G4endl;
486 if( (mate == 0) && bMustExist )
488 G4String ErrMessage =
"Material " + name +
" not found !";
489 G4Exception(
"G4tgbMaterialMgr::FindG4tgbMaterial()",