This document describes the current ScintiPix HDF5 output structure.
It covers:
- simulation output written by
scintipix - optical transport output written by
src/optics/OpticalTransport.py
The current intensifier module consumes this transport output in memory. It can also optionally write a separate persisted intensifier-stage HDF5 dataset. A downstream Timepix sensor stage can also write a persisted sensor HDF5 dataset.
This is a reference for the current writer schema. It does not describe legacy aliases or older ad hoc outputs.
Simulation output is written under the simulatedPhotons/ stage.
Typical paths:
<run_root>/simulatedPhotons/photon_optical_interface_hits.h5<run_root>/simulatedPhotons/photon_optical_interface_hits_<subrun>.h5
Optical transport output is written under the transportedPhotons/ stage.
Typical paths:
<run_root>/transportedPhotons/photons_intensifier_hits.h5<run_root>/transportedPhotons/photons_intensifier_hits_<subrun>.h5
Optional intensifier output is written under the sensor/ stage.
Typical paths:
<run_root>/sensor/intensifier_output_events_<subrun>.h5<run_root>/sensor/timepix_hits_<subrun>.h5
Simulation HDF5 files contain these datasets:
/primaries/secondaries/photons
Selection semantics:
/primariescontains primaries that created at least one secondary in the scintillator volume./secondariescontains secondaries linked to at least one detected optical-interface photon hit./photonscontains one row per detected optical-interface photon hit.
Fields:
gun_call_idprimary_track_idprimary_speciesprimary_x_mmprimary_y_mmprimary_energy_MeVprimary_interaction_time_nsprimary_created_secondary_countprimary_generated_optical_photon_countprimary_detected_optical_interface_photon_count
Notes:
gun_call_idis the Geant4 event ID.primary_track_idis the event-local Geant4 track ID of the primary.primary_interaction_time_nsis the first recorded scintillator interaction time for the primary in the Geant4 global time frame and is written asNaNwhen no such interaction time was recorded. Source creation and pulse timing values are used internally to set the Geant4 primary vertex time; they are not persisted in/primaries.- The three
*_countfields summarize activity attributed to the primary ancestry inside the scintillator.
Fields:
gun_call_idprimary_track_idsecondary_track_idsecondary_speciessecondary_origin_x_mmsecondary_origin_y_mmsecondary_origin_z_mmsecondary_origin_energy_MeVsecondary_end_x_mmsecondary_end_y_mmsecondary_end_z_mm
Notes:
secondary_track_idis the event-local Geant4 track ID of the secondary.secondary_end_*_mmis written asNaNwhen no usable end position was recorded for that secondary.
Fields:
gun_call_idprimary_track_idsecondary_track_idphoton_track_idphoton_creation_time_nsphoton_origin_x_mmphoton_origin_y_mmphoton_origin_z_mmphoton_scint_exit_x_mmphoton_scint_exit_y_mmphoton_scint_exit_z_mmoptical_interface_hit_x_mmoptical_interface_hit_y_mmoptical_interface_hit_time_nsoptical_interface_hit_dir_xoptical_interface_hit_dir_yoptical_interface_hit_dir_zoptical_interface_hit_pol_xoptical_interface_hit_pol_yoptical_interface_hit_pol_zoptical_interface_hit_energy_eVoptical_interface_hit_wavelength_nm
Notes:
/photonsstores one row per detected optical-interface crossing.photon_creation_time_nsandoptical_interface_hit_time_nsshare the same Geant4 event-local global-time basis.photon_scint_exit_*_mmis written asNaNwhen no scintillator-exit crossing was recorded for that photon.- The
optical_interface_hit_*fields capture position, time, direction, polarization, energy, and wavelength at the optical-interface crossing.
Transport HDF5 files contain:
- copied
/primaries - copied
/secondaries /transported_photons
Fields:
source_photon_indexgun_call_idprimary_track_idsecondary_track_idphoton_track_idintensifier_hit_x_mmintensifier_hit_y_mmintensifier_hit_z_mmreached_intensifierin_bounds
Notes:
source_photon_indexis the row index in the source/photonsdataset used for transport.intensifier_hit_*_mmis written asNaNwhen the photon misses the lens or sensor in transport.reached_intensifierisTruewhen transport produced a finite hit on the intensifier plane.in_boundsisTruewhen the hit falls inside the configured intensifier input screen. If no input screen is defined, reached hits are treated as in-bounds by definition.
Transport HDF5 files also write root-level attributes describing provenance and transport assumptions.
Common attributes:
source_hdf5run_idlens_namelens_zmx_pathobject_planeoptical_interface_representstransport_enginetransport_chunk_rowstransport_chunk_target_mibgenerated_utc
Optional attributes:
lens_smx_pathintensifier_modelintensifier_input_screen_definedintensifier_input_screen_diameter_mmintensifier_input_screen_center_mmintensifier_input_screen_magnificationintensifier_input_screen_coordinate_frame
Notes:
intensifier_input_screen_definedisFalsewhen no input screen geometry is configured.- When an input screen is configured, the related diameter, center, magnification, and coordinate-frame attributes are also written.
When intensifier.write_output_hdf5 is true, the intensifier pipeline also
writes a standalone HDF5 file under sensor/.
Intensifier output HDF5 files contain:
- copied
/primaries - copied
/secondaries /intensifier_output_events
Fields:
source_photon_indexgun_call_idprimary_track_idsecondary_track_idphoton_track_idoutput_x_mmoutput_y_mmoutput_time_nssignal_amplitude_arbtotal_gainwavelength_nm
Notes:
/intensifier_output_eventsstores one row per final in-memory intensifier output event.source_photon_indexlinks the event back to the source/photonsrow used by optical transport.signal_amplitude_arbis the current sensor-agnostic output amplitude from the phosphor stage.total_gainis the combined gain after the simplified dual-stage MCP model.
Common attributes:
source_hdf5transport_hdf5run_idintensifier_modelgenerated_utc
The Timepix sensor pipeline writes a standalone HDF5 file under sensor/.
Timepix output HDF5 files contain:
- copied
/primaries - copied
/secondaries /timepix_hits
Fields:
gun_call_idprimary_track_idsecondary_track_idx_pixely_pixeltime_of_arrival_nstime_over_threshold_nscontribution_count
Notes:
/timepix_hitsstores one row per final merged Timepix pixel hit.gun_call_id,primary_track_id, andsecondary_track_idare currently representative IDs from the first contributing intensifier event in that merged pixel hit.time_of_arrival_nsis currently written as0.0for every row. The current Timepix stage uses intensifier event times internally for merge and dead-time behavior, but does not yet persist a calibrated downstream ToA.time_over_threshold_nsis currently a ToT-like proxy derived from phosphor-stagesignal_amplitude_arband clipped by the configuredmax_tot_ns.contribution_countrecords how many mapped intensifier events were merged into the final pixel-hit row.
Common attributes:
source_hdf5transport_hdf5run_idintensifier_modelsensor_modelgenerated_utc
The current writer schema is defined in:
sim/include/structures.hhsim/src/SimIO.ccsrc/optics/OpticalTransport.pysrc/common/hdf5_schema.py