Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
/// \file electromagnetic/TestEm15/src/DetectorConstruction.cc
|
||||
/// \brief Implementation of the DetectorConstruction class
|
||||
//
|
||||
// $Id: DetectorConstruction.cc 68315 2013-03-21 18:26:24Z maire $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -44,6 +43,8 @@
|
||||
#include "G4LogicalVolumeStore.hh"
|
||||
#include "G4SolidStore.hh"
|
||||
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
@@ -227,8 +228,10 @@ void DetectorConstruction::PrintParameters()
|
||||
void DetectorConstruction::SetMaterial(G4String materialChoice)
|
||||
{
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
|
||||
if (pttoMaterial) {
|
||||
G4Material* pttoMaterial =
|
||||
G4NistManager::Instance()->FindOrBuildMaterial(materialChoice);
|
||||
|
||||
if (pttoMaterial) {
|
||||
fMaterial = pttoMaterial;
|
||||
UpdateGeometry();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user