7 G4EventManager::GetEventManager()->GetUserInformation())};
11 double track_weight_pre_step = step->GetPreStepPoint()->GetWeight();
12 double track_weight_post_step = step->GetPostStepPoint()->GetWeight();
15 double weight_of_this_step_alone =
16 track_weight_post_step / track_weight_pre_step;
18 event_info->
incWeight(weight_of_this_step_alone);
20 const std::vector<const G4Track*>* secondaries{
21 step->GetSecondaryInCurrentStep()};
31 event_info->lastStepWasPN(
false);
32 event_info->lastStepWasEN(
false);
34 double delta_energy = step->GetPreStepPoint()->GetKineticEnergy() -
35 step->GetPostStepPoint()->GetKineticEnergy();
36 for (
const G4Track* secondary : *secondaries) {
37 const G4VProcess* creator{secondary->GetCreatorProcess()};
39 const G4String& creator_name{creator->GetProcessName()};
40 if (creator_name.contains(
"photonNuclear")) {
41 event_info->addPNEnergy(delta_energy);
42 event_info->lastStepWasPN(
true);
45 if (creator_name.contains(
"electronNuclear")) {
46 event_info->addENEnergy(delta_energy);
47 event_info->lastStepWasEN(
true);
55 for (
auto& steppingAction :
steppingActions_) steppingAction->stepping(step);