Factor out nuclear interactions: available now for external users. #124
Merged
Factor out nuclear interactions: available now for external users. #124
Conversation
…well (can be invoked now from outside of the G4HepEmTrackingManager)
…can be used to check if they are null or available).
The `PerformNuclear` method can be used to invoke the gamma/electron/positron - nuclear interactions now depending on the `particleID` input parameter value (2/0/1 for gamma/ electron/positron - nuclear interaction). The method is self contained, i.e. everything that is needed to invoke the corresponding `G4HadronInelasticProcess` is done inside the method. The interaction is invoked, the step and track are updated to their post- interaction state, the secondaries are stacked to the secondary track vector of the input step and the energy deposited during the interaction (or due to applying the cut) is returned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nuclear (gamma/electron/positron) interactions can be invoked now easily using the
PerformNuclearmethod, even from outside of theG4HepEmTrackingManager, making them available for external users as well.The type of the interaction is determined by the
partileIDinput argument(={2/0/1} --> gamma/electron/positron - nuclear). The correspondingG4HadronInelasticProcessis invoked, the input track and step are updated, the secondaries are stacked to the secondary track vector of the input step and the energy deposited during the interaction (or due to applying the cuts on the secondaries) is returned. The method is self contained, i.e. includes all preparations required to perform the interactions.Additional methods are provided to make the pointers of the gamma/electron/positron - nuclear
G4VProcessavailable. These can be used to check if the corresponding process is available (i.e. notnullptr) before invokingPerformNuclear.