Repository navigation
Conversation
fix(positronium) command names
fix(digitizer): keep sourceID when the interaction volume name is empty
…-output fix(multiphoton) event without output
fix(output): do not index the hit tree vector after the run cleared it
…ration feat(multiphoton) septal penetration
…ounting fix(multiphoton) interaction counting
fix(geometry): refuse crystal SD attachment before creating the detector
…es-policy fix(digitizer): store the single good pair instead of the whole multiple
…and-coincidences feat: decay fields in singles and coincidences
|
This pull request is cumulative: its diff contains #773 The title names one of the five - the decay information reaching the Singles and Coincidences trees. Everything is backed by simulations and tests kept in a separate repository, which builds both https://github.com/MateuszBala/opengate-gate-multiphoton-analysis-verification
The commits 1. The main defect: interaction counting of GateMultiPhotonAnalysis
Running one macro twice and changing only
Two further differences were found while reading the code and are fixed in the same commit: the The scattering volume names were never written at all on this path. An empty string is worse than a Hits whose ancestor photon cannot be resolved are no longer skipped. They used to leave The same result holds across six simulations - with and without a phantom, with two phantom volumes, 2. The septal penetration counter was never written
The configuration - Simulation There is no "before" distribution to compare against: the values were not merely wrong, they were 3. The decay information reaches the detector responseThis is the item the title names, and the only one of the five that is an extension of
They now travel through the digitizer into the Singles and Coincidences trees, with merging rules
The rule is extracted into
Reading older ROOT files is safe. Scope of the merging rules. A Deliberately out of scope: the old digitizer chain ( Measured on
The single sentinel is worth a comment. The "different - sentinel" rule can only fire when hits of The Coincidences tree was checked separately, on a variant with a coincidence sorter: all ten 4. The coincidence sorter did not respect its own filterUnder if ((m_multiplesPolicy == kTakeWinnerIfOnlyOneGood) && (nGoods == 1))
{
m_OutputCoincidenceDigiCollection->insert(coincidence); // the whole multiple, N > 2 digis
return true;
}
Three scenes differing only in the value of
The number of coincidences does not change - the branch now picks the good pair out of the multiple 5. A refused attachCrystalSD still registered the sensitive detectorCalling The check now happens before the sensitive detector is created Both scenes keep the offending volume in the macro; only the build differs:
No regression for legitimate multi-detector configurations: a two-layer scene recomputed from 6. Documentation
Deliberate changes of behaviourTwo items for the release notes (a third, the command rename, belongs to #773):
Everything else is additive: new fields, new branches, and code paths that used to produce nothing VerificationThe repository linked above contains 15 simulation configurations run in both analysis variants
git clone https://github.com/MateuszBala/opengate-gate-multiphoton-analysis-verification.git
cd opengate-gate-multiphoton-analysis-verification
make env
cp external/scripts/environment.sh.template .environment.sh # set GEANT4 and ROOT
make clone-gate
make build-ref-develop
make build-ref-fix
make run-set SET_DIR=simulations/ref-develop/gate-analysis
make run-set SET_DIR=simulations/ref-develop/gate-multi-photon-analysis
make run-set SET_DIR=simulations/ref-fix/gate-analysis
make run-set SET_DIR=simulations/ref-fix/gate-multi-photon-analysis
make run-attach-sd-sims
make run-multiples-policy-sims
make testsPer-defect descriptions, each with its symptom, cause, fix, before/after comparison and the exact Not in this pull requestOne fix of the same series is still open on the fork and will follow as a separate pull request: Two further items are documented in that repository and deliberately left out of the series:
|




The code was prepared by @MateuszBala.
Some of the variables used by PositroniumSource were not propagated properly in the case of Singles and Coincidences. It was not a bug, but some of the information was not accessible for Singles and Coincidences. This PR fix it.
The PR is built on top of #773 so it should be merged as a second.
The detailed description is given in the first comment.