In the file GateDetectorConstruction in the creator you are using a hand created material as air, it would be better if you use an already available Air material from NIST Database, cannot use user Air since it may be not air at all, and even worse at this point the user material database is not yet loaded, so solution would be
//-------------------------------------------------------------------------
// Create default material (air) for the world
/- G4String AirName = "Air";
/- G4Material* Air = theMaterialDatabase.GetMaterial(AirName);
/- if (!Air)//will never enter here
/- {
/- G4String AirName = "worldDefaultAir";
/+ G4String AirName = "Air";
/+ G4Material* Air = G4NistManager::Instance()->FindOrBuildMaterial(AirName);
/+ if (Air==NULL)//will never enter here
/+ {
/+ AirName = "worldDefaultAir";
G4Element* N = new G4Element("worldDefaultN","N" , 7., 14.01g/mole );
G4Element O = new G4Element("worldDefaultO" ,"O" , 8., 16.00g/mole);
G4Material Air = new G4Material(AirName , 1.290*mg/cm3, 2);
Air->AddElement(N, 0.7);
Air->AddElement(O, 0.3);
/+ }
//-------------------------------------------------------------------------
/+ pworld = new GateBox("world", AirName, pworld_x, pworld_y, pworld_z, true);
In the file GateDetectorConstruction in the creator you are using a hand created material as air, it would be better if you use an already available Air material from NIST Database, cannot use user Air since it may be not air at all, and even worse at this point the user material database is not yet loaded, so solution would be
--------------- source/geometry/src/GateDetectorConstruction.cc --------------- index 30e5716..f61051c 100644 @@ -69,17 +69,17 @@ GateDetectorConstruction::GateDetectorConstruction()
//------------------------------------------------------------------------- // Create default material (air) for the world /- G4String AirName = "Air"; /- G4Material* Air = theMaterialDatabase.GetMaterial(AirName); /- if (!Air)//will never enter here /- { /- G4String AirName = "worldDefaultAir"; /+ G4String AirName = "Air"; /+ G4Material* Air = G4NistManager::Instance()->FindOrBuildMaterial(AirName); /+ if (Air==NULL)//will never enter here /+ { /+ AirName = "worldDefaultAir"; G4Element* N = new G4Element("worldDefaultN","N" , 7., 14.01g/mole ); G4Element O = new G4Element("worldDefaultO" ,"O" , 8., 16.00g/mole); G4Material Air = new G4Material(AirName , 1.290*mg/cm3, 2); Air->AddElement(N, 0.7); Air->AddElement(O, 0.3); /+ } //-------------------------------------------------------------------------
/+ pworld = new GateBox("world", AirName, pworld_x, pworld_y, pworld_z, true);