Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
longer comment about process ordering
Browse files Browse the repository at this point in the history
trying to point future developers in the right direction
  • Loading branch information
tomeichlersmith committed Oct 26, 2023
1 parent 55f3cfa commit 9be968a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/SimCore/GammaPhysics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,24 @@ void GammaPhysics::ConstructProcess() {
modelParameters);
pn->removeExistingModel(processManager);
pn->ConstructGammaProcess(processManager);
// put the PN process first in the ordering in case PN biasing is happening
/**
* Put the PN process first in the ordering in case PN biasing is happening.
*
* Process ordering is a complicated concept and unfortunately
* its affect on biasing is poorly documented. What has been said is
* that some processes _need_ to be called _last_[1]. In addition,
* the practical experience of working on defining a custom
* process for
* [G4DarkBreM](https://github.com/LDMX-Software/G4DarkBreM)
* showed that sometimes Geant4 does
* not get through the full list of processes but it always starts
* at the beginning. For these reasons, we put the PN process first
* in the ordering so that we can insure it is always check by Geant4
* before continuing.
*
* [1]
* https://indico.cern.ch/event/58317/contributions/2047449/attachments/992300/1411062/PartDef-ProcMan-AS.pdf
*/
const auto processes{processManager->GetProcessList()};
for (int i{0}; i < processes->size(); i++) {
const auto process{(*processes)[i]};
Expand Down

0 comments on commit 9be968a

Please sign in to comment.