Detector construction for Geant 4