--------------------------------------------------------------------
| 45 | // -------------------------------------------------------------------- |
| 46 | // |
| 47 | void G4AdjointTrackingAction::PreUserTrackingAction(const G4Track* aTrack) |
| 48 | { |
| 49 | G4String partType = aTrack->GetParticleDefinition()->GetParticleType(); |
| 50 | if (G4StrUtil::contains(partType, "adjoint")) { |
| 51 | is_adjoint_tracking_mode = true; |
| 52 | theAdjointSteppingAction->SetPrimWeight(aTrack->GetWeight()); |
| 53 | } |
| 54 | else { |
| 55 | is_adjoint_tracking_mode = false; |
| 56 | if (theUserFwdTrackingAction != nullptr) { |
| 57 | theUserFwdTrackingAction->PreUserTrackingAction(aTrack); |
| 58 | } |
| 59 | } |
| 60 | theAdjointSteppingAction->SetAdjointTrackingMode(is_adjoint_tracking_mode); |
| 61 | } |
| 62 | |
| 63 | // -------------------------------------------------------------------- |
| 64 | // |
nothing calls this directly
no test coverage detected