Skip to content

Merge primaries and trajectories into a single "particles" tree #18

@mvicenzi

Description

@mvicenzi

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!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions