W pliku      src/MyDetectorConstruction.cc    (zmiany kolorem czerwonym)

.......................................................................................................................
#include "G4Sphere.hh"
.......................................................................................................................
void MyDetectorConstruction::SetupGeometry()
{
.......................................................................................................................
////////////////////////////////////////////////////////////////////////
  // sphere
  G4double innerRadius = 40.0*cm;
  G4double outerRadius = 40.01*cm;

  G4VSolid* sphereSolid =
    new G4Sphere("Sphere_Solid",     //its name
                 innerRadius,                     //its inner radius
                 outerRadius,                     //its outer radius
                 0.0*deg,                           //its starting phi angle
                 360.0*deg,                       //its total phi angle
                 0.0*deg,                           //its starting theta angle
                 90.0*deg);                       //its total theta angle

  G4LogicalVolume* sphereLogical =
    new G4LogicalVolume(sphereSolid,              //its solid
                        air,                                              //its material
                        "Sphere_logical");                      //its name

  new G4PVPlacement(0,                         //no rotation
                    G4ThreeVector(),                 //no transition
                    sphereLogical,                     //its logical volume
                    "Sphere_physical",               //its name
                    fpWorldLogical,                   //its mather volume
                    false,                                    //true not implemented
                    0);                                        // copy number                            
////////////////////////////////////////////////////////////////////////
// Visualisation attributes
......................................................................................................................
  // Silicon monitor - grey
  G4VisAttributes* monitorAttributes = new G4VisAttributes(G4Colour::Grey());
  monitorAttributes->SetForceSolid(true);
  monitorLogical->SetVisAttributes(monitorAttributes);  
  // Sphere - white
  G4VisAttributes* sphereAttributes =
        new G4VisAttributes(G4Colour(1.0,1.0,1.0,0.5));
  sphereAttributes->SetVisibility(true);
  sphereLogical->SetVisAttributes(sphereAttributes);
}