Message: Track lengths of secondaries and tertiaries | Not Logged In (login) |
|
|
Good evening, my dear friends and comrades!
Lately I've been investigating a problem where a primary particle (hadron) is striking a series of detectors and I've been running the same process for a million iterations. While I have no problem in obtaining the energy deposit, energy from secondaries and energy from tertiaries graphs, the Root graphs for the respective track lengths (for primary, secondaries, tertiaries) is never getting filled. Inside EventAction.hh I have the following voids:
void AddPrimaryTrackLength(G4double strack) {fPrimaryTrackLength += strack;}; void AddSecondaryTrackLength(G4double strack) {fSecondaryTrackLength += strack;}; void AddTertiaryTrackLength(G4double strack) {fTertiaryTrackLength += strack;}; I fill the respective graphs inside EventAction.cc the same way I fill the energy graphs:
analysisManager->FillH1(18, fSecondaryTrackLength); analysisManager->FillH1(19, fTertiaryTrackLength);
analysisManager->FillH1(26, fPrimaryTrackLength); I call the above voids from StackingAction::ClassifyNewTrack(const G4Track* track) of StackingAction.cc as follows:
length = track->GetTrackLength();
if (track->GetTrackID() == 1) { fEventaction->AddPrimaryTrackLength(length); }
if (track->GetParentID() == 1) { fEventaction->AddSecondaryTrackLength(length); }
if (track->GetParentID() > 1) { fEventaction->AddTertiaryTrackLength(length); } The same commands when applied to energies work just fine. I can't understand what am I getting wrong down here! Any advice would be kindly appreciated! Thank you for your time!
|
Inline Depth: |
|
|
Outline Depth: |
|
|
|
Add message: ![]() |
|
to: |
|