MCPcopy Create free account
hub / github.com/Geant4/geant4 / GetMaterial

Method GetMaterial

source/materials/src/G4Material.cc:663–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
662
663G4Material* G4Material::GetMaterial(const G4String& materialName, G4bool warn)
664{
665 // search the material by its name
666 for (auto const & j : *GetMaterialTable()) {
667 if (j->GetName() == materialName) {
668 return j;
669 }
670 }
671
672 // the material does not exist in the table
673 if (warn) {
674 G4cout << "G4Material::GetMaterial() WARNING: The material: " << materialName
675 << " does not exist in the table. Return NULL pointer." << G4endl;
676 }
677 return nullptr;
678}
679
680//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
681

Callers 13

G4PhysicalVolumeModelMethod · 0.45
DescribeYourselfToMethod · 0.45
AddSolidMethod · 0.45
PropagateErrorMSCMethod · 0.45
PropagateErrorIoniMethod · 0.45
DumpInfoMethod · 0.45
DumpLogVolsMethod · 0.45
ProcessHitsMethod · 0.45
DumpTrackInfoMethod · 0.45
UserSteppingActionMethod · 0.45

Calls 5

GetNameMethod · 0.45
GetNumberOfElementsMethod · 0.45
GetZMethod · 0.45
GetAMethod · 0.45
GetDensityMethod · 0.45

Tested by

no test coverage detected