W pliku MyRun.hh (zmiany kolorem czerwonym)
............................................................
//Method
void RecordEvent(const
G4Event*);
//Data
G4int fMapId;
};
#endif
oooooooooooooooooooooooooooooooooooooooooooo
W pliku MyRun.cc (zmiany kolorem czerwonym)
........................................................................
#include
"G4VTrajectory.hh"
#include <iomanip>
#include
"G4SDManager.hh"
MyRun::MyRun()
{
G4SDManager* manager =
G4SDManager::GetSDMpointer();
fMapId =
manager->GetCollectionID("MyDetector/MyScorer");
G4cout <<
"MyLog: MyRun constructor: index of photon scorer map: "
<< fMapId
<< G4endl;
}
BeamTestRun::~BeamTestRun()
{}
void BeamTestRun::RecordEvent(const G4Event* evt)
{
numberOfEvent++;
/**
G4TrajectoryContainer* container =
evt->GetTrajectoryContainer();
G4cout << "MyLog: number of particle processed in
this
event "
<<
container->size() << G4endl;
for (G4int i = 0; i < container->size(); i++)
{
G4VTrajectory* traj = (*container)[i];
G4cout << "MyLog: particle name "
<<
std::setw(8) << traj->GetParticleName()
<<
" initial momentum: " << std::setprecision(2)
<< std::setw(4) << traj->GetInitialMomentum()
<<
G4endl;
}
**/