W pliku MyDetectorConstruction.cc         (zmiany kolorem czerwonym)
.................................................................
#include "MyPhotonSD.hh"
..................................................................
void MyDetectorConstruction::SetupScoring(G4LogicalVolume* scoringVolume)
{
.................................................................
// Attach detector to scoring volume
//  scoringVolume->SetSensitiveDetector(detector);

// Create a new sensitive detector named "Photon"
  MyPhotonSD* photonSD =  new MyPhotonSD("Photon");
  manager->AddNewDetector(photonSD);
  scoringVolume->SetSensitiveDetector(photonSD);

................................................................