45 :
G4Material(name,baseMaterial->GetDensity(),baseMaterial,
46 baseMaterial->GetState(),baseMaterial->GetTemperature(),
47 baseMaterial->GetPressure())
55 :
G4Material(name,z,a,density,state,temp,pressure)
66 :
G4Material(name,density,nComponents,state,temp,pressure)
76 :
G4Material(name,density,bmat,state,temp,pressure)
86 auto iter = fExtensionMap.find(extension->GetName());
87 if(iter!=fExtensionMap.end())
90 msg <<
"G4ExtendedMaterial <"<<
GetName()<<
"> already has extension for "
91 << extension->GetName()
92 <<
". Extension is replaced.";
95 fExtensionMap.insert(std::make_pair(extension->GetName(),std::move(extension)));
104 const auto iter = fExtensionMap.find(name);
105 if(iter!=fExtensionMap.end())
106 {
return iter->second.get(); }
110 msg <<
"G4ExtendedMAterial <"<<
GetName()<<
"> cannot find extension for "
126 flux <<
"\n Registered material extensions :\n";
127 auto iter = fExtensionMap.begin();
128 for(;iter!=fExtensionMap.end();iter++)
129 { flux <<
" " << iter->first <<
"\n"; }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4ExtendedMaterial(const G4String &name, const G4Material *baseMaterial)
void Print(std::ostream &flux) const
void RegisterExtension(std::unique_ptr< G4VMaterialExtension > extension)
G4bool IsExtended() const override
G4VMaterialExtension * RetrieveExtension(const G4String &name)
const G4String & GetName() const