W pliku MyRun.cc (zmiany kolorem czerwonym)
............................................................
#include "G4THitsMap.hh"
#include
"G4THitsCollection.hh"
#include "G4SystemOfUnits.hh"
#include "G4PhysicalConstants.hh"
#include "MyPhotonHit.hh"
MyRun::~MyRun()
{}
void MyRun::RecordEvent(const G4Event* evt)
{
...............................................................................
frunHitsMap += *hitsMap;
G4THitsCollection<MyPhotonHit>* photonCollection =
dynamic_cast<G4THitsCollection<MyPhotonHit>*>
(hce->GetHC(fCollectionId));
for( G4int i = 0;
i< photonCollection->entries(); i++)
G4cout << "MyLog: energy and
position of photon: "
<< std::setprecision(3) <<
(*photonCollection)[i]->GetEnergy()/MeV << " "
<< std::setprecision(3) <<
(*photonCollection)[i]->GetPosition().x()/cm << " "
<< std::setprecision(3) <<
(*photonCollection)[i]->GetPosition().y()/cm << " "
<< std::setprecision(3) <<
(*photonCollection)[i]->GetPosition().z()/cm <<
G4endl;
/**
..............................................................................