MCPcopy Create free account
hub / github.com/Geant4/geant4 / PreUserTrackingAction

Method PreUserTrackingAction

source/tracking/src/G4AdjointTrackingAction.cc:47–61  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

45// --------------------------------------------------------------------
46//
47void 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//

Callers

nothing calls this directly

Calls 5

SetPrimWeightMethod · 0.80
GetParticleTypeMethod · 0.45
GetParticleDefinitionMethod · 0.45
GetWeightMethod · 0.45

Tested by

no test coverage detected