8 #include "G4PrimaryVertex.hh"
9 #include "G4PrimaryParticle.hh"
18 _sum_edep(0), _sum_eesc(0)
29 for (
int iv = 0; iv < anEvent->GetNumberOfPrimaryVertex(); ++iv) {
30 const G4PrimaryVertex*
v = anEvent->GetPrimaryVertex(iv);
31 for (
int ip = 0;
ip <
v->GetNumberOfParticle(); ++
ip) {
32 const G4PrimaryParticle*
p =
v->GetPrimary(
ip);
35 eprim +=
p->GetMomentum().mag();
46 <<
"initial = " << eprim/
CLHEP::GeV <<
" GeV, "
47 <<
"final = " << efinal/
CLHEP::GeV <<
" GeV" );
61 if (aStep->GetPostStepPoint()->GetPhysicalVolume() != 0) {
62 const double edep = aStep->GetTotalEnergyDeposit();
66 const double eesc = aStep->GetPostStepPoint()->GetTotalEnergy();