Skip to content

Commit

Permalink
* fix bugs in the updated decay vertex injection code [rtj]
Browse files Browse the repository at this point in the history
  • Loading branch information
rjones30 committed Dec 25, 2023
1 parent 5037ec2 commit 87974ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/GlueXSteppingAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void GlueXSteppingAction::UserSteppingAction(const G4Step* step)
G4TrackVector &secondary = *(G4TrackVector*)
step->GetSecondaryInCurrentStep();
G4TrackVector::iterator iter;
G4TrackVector decaySecondaries;
for (iter = secondary.begin(); iter != secondary.end(); ++iter) {
if ((*iter)->GetCreatorProcess()->GetProcessType() == fDecay) {
int newID = eventinfo->AssignNextGlueXTrackID();
Expand All @@ -132,13 +133,14 @@ void GlueXSteppingAction::UserSteppingAction(const G4Step* step)
trackinfo->SetGlueXTrackID(newID);
}
(*iter)->SetUserInformation(trackinfo);
decaySecondaries.push_back(*iter);
}
}
if (eventinfo) {
if (eventinfo and decaySecondaries.size() > 0) {
int mech[2];
char *cmech = (char*)mech;
snprintf(cmech, 5, "%c%c%c%c", 'D', 'C', 'A', 'Y');
eventinfo->AddSecondaryVertex(secondary, primeID, mech[0]);
eventinfo->AddSecondaryVertex(decaySecondaries, primeID, mech[0]);
}
}
}
Expand Down

0 comments on commit 87974ed

Please sign in to comment.