Skip to content

Implement event batching #230

Description

@ggalgoczi

When handing photons (gensteps) from Geant4 to the GPU, we need a way to identify which G4 event each photon belongs to after GPU ray tracing completes.

Approach: Encode the event ID into the photon's hit time by adding eventID*M, where M is a large multiplier. After GPU ray tracing, the original event ID can be recovered from each hit via hitTime / M (integer division), and the actual hit time via hitTime % M.

Constraint: M must be larger than the maximum possible hit time (i.e., longer than the longest-lived particle's lifetime) to avoid collisions between the encoded event ID and the real time value.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions