I am currently editing the rdecay01 example so I can detect the gamma particles generated by the decay of Neon-24. The detector is not only counting detections from gammas, but also electrons and neutrinos. I am not sure what I should call in order to get the particle name. I am currently retrieving the copy number of the detector and the event id, and I would like to get the particle id from each hit as well. Thanks!
`G4bool MySensitiveDetector::ProcessHits(G4Step *aStep, G4TouchableHistory *R
Ohist)
{
G4Track *track = aStep->GetTrack();
track->SetTrackStatus(fStopAndKill);
G4StepPoint *preStepPoint = aStep->GetPreStepPoint();
G4StepPoint *postStepPoint = aStep->GetPostStepPoint();
G4ThreeVector posPhoton = preStepPoint->GetPosition();
const G4VTouchable *touchable = aStep->GetPreStepPoint()->GetTouchable();
G4int copyNo = touchable->GetCopyNumber();
G4cout << "Copy number: " << copyNo << G4endl;
G4int evt = G4RunManager::GetRunManager()->GetCurrentEvent()->GetEventID();
G4cout << "Event id: " << evt << G4endl;
return true;
}`
This code is a modified version of the tutorial on Physics Matters on Youtube.