Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding gamma-nuclear interaction. #113

Merged
merged 19 commits into from
Nov 19, 2024
Merged

Adding gamma-nuclear interaction. #113

merged 19 commits into from
Nov 19, 2024

Conversation

mnovak42
Copy link
Owner

Gamma-nuclear cross sections are available now and used in the HepEm physics during the step limit calculations for gamma photons. The interaction itself is performed using the corresponding native Geant4 photonNuclear, G4HadronInelasticProcess in the HepEm tracking manager: the PostStepDoIt of this process is invoked whenever gamma-nuclear limited the step but only if the photonNuclear process was attached to gamma in the physics list.

The HepEm tracking manager tries to find the photonNuclear process at initialisation by checking the processes attached to the gamma process manager. If it is found, the pointer to this process is stored locally in the tracking manager such that the process is available during the gamma tracking. If it is not found (i.e. no gamma-nuclear process attached to gamma), then this field stays nullptr. The process is obviously not invoked in this case but everything still works fine, i.e. the step might be limited by gamma-nuclear but delta interaction happens (no change, the original gamma keeps on going). The same happens when the G4HepEmGammaManager::Perform method is invoked for the interaction, i.e. no interaction happens when gamma-nuclear limited the step. So everything works fine even when gamma-nuclear process is not attached to the G4Gamma or when using HepEm also to perform the interaction: no interaction happens in this case.

The gamma-nucler cross section is available now in HepEm. Not copied
to the device yet and not used on the CPU in the step limit yet. This
is the next step, i.e. including the gamma-nuclear in the stepping loop
(on the CPU).
…ing the Geant4 process.

The gamma-nuclear cross sections are used now in the HepEm step
limit (HowFar).

But HepEm itself do not perform the gamma-nuclear interaction in
its Perform method. So when gamma-nuclear limits the step, HepEm
leaves the primary track the same in its Perform interaction. This
should let all previous usage work fine (just some additional step
limits that does nothing).

However, the G4HepEmTrackingManager handles now gamma-nuclear
interaction by:
  - obtaining the pointer to the Geant4 gamma nuclear process
    at initialisation (if the user attached any to gamma)
  - this native Geant4 process is used then to perform the gamma-
    nuclear interaction, whenever gamma-nuclear limits the step,
    (i.e. HepEm Perform is not invoked in this case).
Removing unnecesary options while adding now the G4EmExtraPhysics
that adds the Geant4 gamma-nuclear and lepton-nuclear processes.
(The later, i.e. electron and positron nuclear, is still deactivated
as long we don't have them in HepEm.)
Only the new gamma cross section array, that contains the gamma-nuclear
as well, is used now everywhere.
… before G4-v-11.2.0.

The G4GammaNuclearXS data are uploaded in its constructor from G4-v-11.2.0
while it is done in the BuildPhysicsTable interface before G4-v-11.2.0.
This modification works fine with all G4 versions (from 11.0.0).
@mnovak42 mnovak42 merged commit aaa6a35 into master Nov 19, 2024
5 checks passed
@mnovak42 mnovak42 deleted the addGNuclear branch November 19, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant