FPFSoftware / FPFSoftware/FPFSim

Merge `primaries` and `trajectories` into a single "particles" tree

Open
#18 0 comments 0 reactions 1 assignee Claimed by @mvicenzi View on GitHub
enhancement
Dominant language
C++
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The `primaries` and `trajectories` TTrees defined in #16 could be merged into a single "particles" tree which will contain the entire particle hierarchy (not just primaries). Based on the discussion in #2 , this could serve as the ACTS-required particle tree as well.

Storing the full particle hierarchy tree is certainly interesting, as one would otherwise be somewhat blind if relying only on primaries and the hits that end up in a sensitive volume. Moreover, this would also tip things in favor of moving all pseudo-reco/reco downstream/outside of FPFSim as literally all truth info will be made available.

The only concern is the size of such a tree... which is certainly a lot if full trajectory points are saved.
And even if the trajectories points are not written to file, asking G4 to store all the tracks is quite memory intensive.

A solution could be:
- implement our own G4Trajectory class ;
- the class will have a flag to store trajectory points or not;
- then G4 would store only light-weight custom tracks, which is probably acceptable in terms of memory usage, unless we explicitly ask for full trajectory points (like for input to `FPFDisplay`);
- tracks can be recovered from storage in the AnalysisManager (like we do now) and used to fill the tree;

Comments/suggestions are welcomed!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.