From bf17a5290ac0ce5940ec5b7c84b1a3a3308f310f Mon Sep 17 00:00:00 2001 From: Manuel Huber Date: Wed, 13 Nov 2024 21:12:50 +0100 Subject: [PATCH] output: add option for ntuple naming by volume --- docs/rmg-commands.md | 23 +- include/RMGManager.hh | 4 + include/RMGVOutputScheme.hh | 10 +- src/RMGManager.cc | 14 +- src/RMGRunAction.cc | 1 + tests/output/CMakeLists.txt | 2 +- tests/output/macros/ntuple-per-det-vol.hdf5ls | 160 +++++++++++ .../macros/ntuple-per-det-vol.hdf5ls-lh5 | 50 ++++ tests/output/macros/ntuple-per-det-vol.mac | 19 ++ tests/output/macros/ntuple-per-det.hdf5ls | 268 +++++++++--------- tests/output/macros/ntuple-per-det.hdf5ls-lh5 | 86 +++--- 11 files changed, 448 insertions(+), 189 deletions(-) create mode 100644 tests/output/macros/ntuple-per-det-vol.hdf5ls create mode 100644 tests/output/macros/ntuple-per-det-vol.hdf5ls-lh5 create mode 100644 tests/output/macros/ntuple-per-det-vol.mac diff --git a/docs/rmg-commands.md b/docs/rmg-commands.md index 268712f..18bdb9d 100644 --- a/docs/rmg-commands.md +++ b/docs/rmg-commands.md @@ -128,8 +128,9 @@ Commands for controlling the simulation output * `FileName` – Set output file name for object persistency * `NtuplePerDetector` – Create a ntuple for each sensitive detector to store hits. Otherwise, store all hits of one detector type in one ntuple. +* `NtupleUseVolumeName` – Use the sensitive volume name to name output ntuples. * `ActivateOutputScheme` – Activates the output scheme that had been registered under the given name. -* `OutputNtupleDirectory` – Change the default output directory/group for ntuples in output files. +* `NtupleDirectory` – Change the default output directory/group for ntuples in output files. ### `/RMG/Output/FileName` @@ -143,7 +144,19 @@ Set output file name for object persistency Create a ntuple for each sensitive detector to store hits. Otherwise, store all hits of one detector type in one ntuple. -* **Parameter** – `tree_per_det` +* **Parameter** – `nt_per_det` + * **Parameter type** – `b` + * **Omittable** – `False` + +### `/RMG/Output/NtupleUseVolumeName` + +Use the sensitive volume name to name output ntuples. + +:::{note} +this only works if `NtuplePerDetector` is set to false. +::: + +* **Parameter** – `nt_vol_name` * **Parameter type** – `b` * **Omittable** – `False` @@ -151,11 +164,11 @@ Create a ntuple for each sensitive detector to store hits. Otherwise, store all Activates the output scheme that had been registered under the given name. -* **Parameter** – `tree_per_det` +* **Parameter** – `oscheme` * **Parameter type** – `s` * **Omittable** – `False` -### `/RMG/Output/OutputNtupleDirectory` +### `/RMG/Output/NtupleDirectory` Change the default output directory/group for ntuples in output files. @@ -163,7 +176,7 @@ Change the default output directory/group for ntuples in output files. This setting is not respected by all output formats. ::: -* **Parameter** – `ntuple_directory` +* **Parameter** – `nt_directory` * **Parameter type** – `s` * **Omittable** – `False` diff --git a/include/RMGManager.hh b/include/RMGManager.hh index 29da163..9087d69 100644 --- a/include/RMGManager.hh +++ b/include/RMGManager.hh @@ -66,6 +66,9 @@ class RMGManager { [[nodiscard]] inline bool GetOutputNtuplePerDetector() const { return fOutputNtuplePerDetector; } + [[nodiscard]] inline bool GetOutputNtupleUseVolumeName() const { + return fOutputNtupleUseVolumeName; + } // setters inline void SetUserInit(G4RunManager* g4_manager) { @@ -151,6 +154,7 @@ class RMGManager { std::string fOutputFile = "detector-hits.root"; bool fOutputNtuplePerDetector = true; + bool fOutputNtupleUseVolumeName = false; std::string fOutputNtupleDirectory = "stp"; // track internal id of detector NTuples static G4ThreadLocal std::map fNtupleIDs; diff --git a/include/RMGVOutputScheme.hh b/include/RMGVOutputScheme.hh index a06e875..4bfb209 100644 --- a/include/RMGVOutputScheme.hh +++ b/include/RMGVOutputScheme.hh @@ -50,16 +50,19 @@ class RMGVOutputScheme { } virtual inline std::optional StackingActionNewStage(const int) { return std::nullopt; } - // hook into G4TrackingAction + // hook into G4TrackingAction. virtual inline void TrackingActionPre(const G4Track*) {}; + // only to be called by the manager, before calling AssignOutputNames. inline void SetNtuplePerDetector(bool ntuple_per_det) { fNtuplePerDetector = ntuple_per_det; } + inline void SetNtupleUseVolumeName(bool use_vol_name) { fNtupleUseVolumeName = use_vol_name; } protected: [[nodiscard]] virtual inline std::string GetNtupleName(RMGDetectorMetadata det) const { if (fNtuplePerDetector) { - return !det.name.empty() ? det.name : fmt::format("det{:03}", det.uid); + if (!det.name.empty() && fNtupleUseVolumeName) { return det.name; } + return fmt::format("det{:03}", det.uid); } return GetNtuplenameFlat(); } @@ -67,6 +70,7 @@ class RMGVOutputScheme { throw new std::logic_error("GetNtuplenameFlat not implemented"); } + // helper functions for output schemes. inline void CreateNtupleFOrDColumn(G4AnalysisManager* ana_man, int nt, std::string name, bool use_float) { if (use_float) ana_man->CreateNtupleFColumn(nt, name); @@ -78,7 +82,9 @@ class RMGVOutputScheme { else ana_man->FillNtupleDColumn(nt, col, val); } + // global options injected by manager. bool fNtuplePerDetector = true; + bool fNtupleUseVolumeName = false; }; #endif diff --git a/src/RMGManager.cc b/src/RMGManager.cc index 1162198..ba4eeff 100644 --- a/src/RMGManager.cc +++ b/src/RMGManager.cc @@ -376,18 +376,24 @@ void RMGManager::DefineCommands() { fOutputMessenger->DeclareProperty("NtuplePerDetector", fOutputNtuplePerDetector) .SetGuidance("Create a ntuple for each sensitive detector to store hits. Otherwise, store " "all hits of one detector type in one ntuple.") - .SetParameterName("tree_per_det", false) + .SetParameterName("nt_per_det", false) + .SetStates(G4State_PreInit, G4State_Idle); + + fOutputMessenger->DeclareProperty("NtupleUseVolumeName", fOutputNtupleUseVolumeName) + .SetGuidance("Use the sensitive volume name to name output ntuples.") + .SetGuidance("note: this only works if `NtuplePerDetector` is set to false.") + .SetParameterName("nt_vol_name", false) .SetStates(G4State_PreInit, G4State_Idle); fOutputMessenger->DeclareMethod("ActivateOutputScheme", &RMGManager::ActivateOptionalOutputScheme) .SetGuidance("Activates the output scheme that had been registered under the given name.") - .SetParameterName("tree_per_det", false) + .SetParameterName("oscheme", false) .SetStates(G4State_PreInit, G4State_Idle); - fOutputMessenger->DeclareMethod("OutputNtupleDirectory", &RMGManager::SetOutputNtupleDirectory) + fOutputMessenger->DeclareMethod("NtupleDirectory", &RMGManager::SetOutputNtupleDirectory) .SetGuidance("Change the default output directory/group for ntuples in output files.") .SetGuidance("note: This setting is not respected by all output formats.") - .SetParameterName("ntuple_directory", false) + .SetParameterName("nt_directory", false) .SetStates(G4State_PreInit, G4State_Idle); } diff --git a/src/RMGRunAction.cc b/src/RMGRunAction.cc index dbc8202..ebf0a1f 100644 --- a/src/RMGRunAction.cc +++ b/src/RMGRunAction.cc @@ -81,6 +81,7 @@ void RMGRunAction::SetupAnalysisManager() { fOutputDataFields.emplace_back(oscheme); oscheme->SetNtuplePerDetector(rmg_man->GetOutputNtuplePerDetector()); + oscheme->SetNtupleUseVolumeName(rmg_man->GetOutputNtupleUseVolumeName()); oscheme->AssignOutputNames(ana_man); } } diff --git a/tests/output/CMakeLists.txt b/tests/output/CMakeLists.txt index 11278fb..65f1737 100644 --- a/tests/output/CMakeLists.txt +++ b/tests/output/CMakeLists.txt @@ -24,7 +24,7 @@ foreach(_file ${_aux}) configure_file(${PROJECT_SOURCE_DIR}/${_file} ${PROJECT_BINARY_DIR}/${_file} COPYONLY) endforeach() -set(_macros ntuple-per-det.mac ntuple-flat.mac) +set(_macros ntuple-per-det.mac ntuple-per-det-vol.mac ntuple-flat.mac) foreach(_mac ${_macros}) add_test(NAME output/hdf5-${_mac} COMMAND ./run-test-hdf5.sh $ diff --git a/tests/output/macros/ntuple-per-det-vol.hdf5ls b/tests/output/macros/ntuple-per-det-vol.hdf5ls new file mode 100644 index 0000000..3266a6c --- /dev/null +++ b/tests/output/macros/ntuple-per-det-vol.hdf5ls @@ -0,0 +1,160 @@ +default_histograms +header +stp +stp/det1 +stp/det1/columns +stp/det1/edep_in_keV +stp/det1/edep_in_keV/entries +stp/det1/edep_in_keV/pages +stp/det1/entries +stp/det1/evtid +stp/det1/evtid/entries +stp/det1/evtid/pages +stp/det1/forms +stp/det1/names +stp/det1/particle +stp/det1/particle/entries +stp/det1/particle/pages +stp/det1/time_in_ns +stp/det1/time_in_ns/entries +stp/det1/time_in_ns/pages +stp/det1/xloc_in_m +stp/det1/xloc_in_m/entries +stp/det1/xloc_in_m/pages +stp/det1/yloc_in_m +stp/det1/yloc_in_m/entries +stp/det1/yloc_in_m/pages +stp/det1/zloc_in_m +stp/det1/zloc_in_m/entries +stp/det1/zloc_in_m/pages +stp/det2 +stp/det2/columns +stp/det2/edep_in_keV +stp/det2/edep_in_keV/entries +stp/det2/edep_in_keV/pages +stp/det2/entries +stp/det2/evtid +stp/det2/evtid/entries +stp/det2/evtid/pages +stp/det2/forms +stp/det2/names +stp/det2/particle +stp/det2/particle/entries +stp/det2/particle/pages +stp/det2/time_in_ns +stp/det2/time_in_ns/entries +stp/det2/time_in_ns/pages +stp/det2/xloc_in_m +stp/det2/xloc_in_m/entries +stp/det2/xloc_in_m/pages +stp/det2/yloc_in_m +stp/det2/yloc_in_m/entries +stp/det2/yloc_in_m/pages +stp/det2/zloc_in_m +stp/det2/zloc_in_m/entries +stp/det2/zloc_in_m/pages +stp/scint1 +stp/scint1/columns +stp/scint1/edep_in_keV +stp/scint1/edep_in_keV/entries +stp/scint1/edep_in_keV/pages +stp/scint1/entries +stp/scint1/evtid +stp/scint1/evtid/entries +stp/scint1/evtid/pages +stp/scint1/forms +stp/scint1/names +stp/scint1/particle +stp/scint1/particle/entries +stp/scint1/particle/pages +stp/scint1/time_in_ns +stp/scint1/time_in_ns/entries +stp/scint1/time_in_ns/pages +stp/scint1/v_post_in_m\ns +stp/scint1/v_post_in_m\ns/entries +stp/scint1/v_post_in_m\ns/pages +stp/scint1/v_pre_in_m\ns +stp/scint1/v_pre_in_m\ns/entries +stp/scint1/v_pre_in_m\ns/pages +stp/scint1/xloc_post_in_m +stp/scint1/xloc_post_in_m/entries +stp/scint1/xloc_post_in_m/pages +stp/scint1/xloc_pre_in_m +stp/scint1/xloc_pre_in_m/entries +stp/scint1/xloc_pre_in_m/pages +stp/scint1/yloc_post_in_m +stp/scint1/yloc_post_in_m/entries +stp/scint1/yloc_post_in_m/pages +stp/scint1/yloc_pre_in_m +stp/scint1/yloc_pre_in_m/entries +stp/scint1/yloc_pre_in_m/pages +stp/scint1/zloc_post_in_m +stp/scint1/zloc_post_in_m/entries +stp/scint1/zloc_post_in_m/pages +stp/scint1/zloc_pre_in_m +stp/scint1/zloc_pre_in_m/entries +stp/scint1/zloc_pre_in_m/pages +stp/scint2 +stp/scint2/columns +stp/scint2/edep_in_keV +stp/scint2/edep_in_keV/entries +stp/scint2/edep_in_keV/pages +stp/scint2/entries +stp/scint2/evtid +stp/scint2/evtid/entries +stp/scint2/evtid/pages +stp/scint2/forms +stp/scint2/names +stp/scint2/particle +stp/scint2/particle/entries +stp/scint2/particle/pages +stp/scint2/time_in_ns +stp/scint2/time_in_ns/entries +stp/scint2/time_in_ns/pages +stp/scint2/v_post_in_m\ns +stp/scint2/v_post_in_m\ns/entries +stp/scint2/v_post_in_m\ns/pages +stp/scint2/v_pre_in_m\ns +stp/scint2/v_pre_in_m\ns/entries +stp/scint2/v_pre_in_m\ns/pages +stp/scint2/xloc_post_in_m +stp/scint2/xloc_post_in_m/entries +stp/scint2/xloc_post_in_m/pages +stp/scint2/xloc_pre_in_m +stp/scint2/xloc_pre_in_m/entries +stp/scint2/xloc_pre_in_m/pages +stp/scint2/yloc_post_in_m +stp/scint2/yloc_post_in_m/entries +stp/scint2/yloc_post_in_m/pages +stp/scint2/yloc_pre_in_m +stp/scint2/yloc_pre_in_m/entries +stp/scint2/yloc_pre_in_m/pages +stp/scint2/zloc_post_in_m +stp/scint2/zloc_post_in_m/entries +stp/scint2/zloc_post_in_m/pages +stp/scint2/zloc_pre_in_m +stp/scint2/zloc_pre_in_m/entries +stp/scint2/zloc_pre_in_m/pages +stp/vertices +stp/vertices/columns +stp/vertices/entries +stp/vertices/evtid +stp/vertices/evtid/entries +stp/vertices/evtid/pages +stp/vertices/forms +stp/vertices/n_part +stp/vertices/n_part/entries +stp/vertices/n_part/pages +stp/vertices/names +stp/vertices/time_in_ns +stp/vertices/time_in_ns/entries +stp/vertices/time_in_ns/pages +stp/vertices/xloc_in_m +stp/vertices/xloc_in_m/entries +stp/vertices/xloc_in_m/pages +stp/vertices/yloc_in_m +stp/vertices/yloc_in_m/entries +stp/vertices/yloc_in_m/pages +stp/vertices/zloc_in_m +stp/vertices/zloc_in_m/entries +stp/vertices/zloc_in_m/pages diff --git a/tests/output/macros/ntuple-per-det-vol.hdf5ls-lh5 b/tests/output/macros/ntuple-per-det-vol.hdf5ls-lh5 new file mode 100644 index 0000000..f9a5a88 --- /dev/null +++ b/tests/output/macros/ntuple-per-det-vol.hdf5ls-lh5 @@ -0,0 +1,50 @@ +stp : struct{det1,det2,scint1,scint2,vertices} +stp/det1 : table{evtid,particle,edep,time,xloc,yloc,zloc} +stp/det1/edep : array<1>{real} +stp/det1/evtid : array<1>{real} +stp/det1/particle : array<1>{real} +stp/det1/time : array<1>{real} +stp/det1/xloc : array<1>{real} +stp/det1/yloc : array<1>{real} +stp/det1/zloc : array<1>{real} +stp/det2 : table{evtid,particle,edep,time,xloc,yloc,zloc} +stp/det2/edep : array<1>{real} +stp/det2/evtid : array<1>{real} +stp/det2/particle : array<1>{real} +stp/det2/time : array<1>{real} +stp/det2/xloc : array<1>{real} +stp/det2/yloc : array<1>{real} +stp/det2/zloc : array<1>{real} +stp/scint1 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} +stp/scint1/edep : array<1>{real} +stp/scint1/evtid : array<1>{real} +stp/scint1/particle : array<1>{real} +stp/scint1/time : array<1>{real} +stp/scint1/v_post : array<1>{real} +stp/scint1/v_pre : array<1>{real} +stp/scint1/xloc_post : array<1>{real} +stp/scint1/xloc_pre : array<1>{real} +stp/scint1/yloc_post : array<1>{real} +stp/scint1/yloc_pre : array<1>{real} +stp/scint1/zloc_post : array<1>{real} +stp/scint1/zloc_pre : array<1>{real} +stp/scint2 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} +stp/scint2/edep : array<1>{real} +stp/scint2/evtid : array<1>{real} +stp/scint2/particle : array<1>{real} +stp/scint2/time : array<1>{real} +stp/scint2/v_post : array<1>{real} +stp/scint2/v_pre : array<1>{real} +stp/scint2/xloc_post : array<1>{real} +stp/scint2/xloc_pre : array<1>{real} +stp/scint2/yloc_post : array<1>{real} +stp/scint2/yloc_pre : array<1>{real} +stp/scint2/zloc_post : array<1>{real} +stp/scint2/zloc_pre : array<1>{real} +stp/vertices : table{evtid,time,xloc,yloc,zloc,n_part} +stp/vertices/evtid : array<1>{real} +stp/vertices/n_part : array<1>{real} +stp/vertices/time : array<1>{real} +stp/vertices/xloc : array<1>{real} +stp/vertices/yloc : array<1>{real} +stp/vertices/zloc : array<1>{real} diff --git a/tests/output/macros/ntuple-per-det-vol.mac b/tests/output/macros/ntuple-per-det-vol.mac new file mode 100644 index 0000000..959d10c --- /dev/null +++ b/tests/output/macros/ntuple-per-det-vol.mac @@ -0,0 +1,19 @@ +/RMG/Output/NtuplePerDetector true +/RMG/Output/NtupleUseVolumeName true + +/RMG/Geometry/RegisterDetector Scintillator scint1 1 +/RMG/Geometry/RegisterDetector Scintillator scint2 2 +/RMG/Geometry/RegisterDetector Germanium det1 11 +/RMG/Geometry/RegisterDetector Germanium det2 12 + +/control/execute macros/_init.mac + +/RMG/Generator/Confine UnConfined + +/RMG/Generator/Select GPS +/gps/position 0 0 0 +/gps/ang/type iso +/gps/particle gamma +/gps/energy 200 keV + +/run/beamOn 50 diff --git a/tests/output/macros/ntuple-per-det.hdf5ls b/tests/output/macros/ntuple-per-det.hdf5ls index 3266a6c..824e3a7 100644 --- a/tests/output/macros/ntuple-per-det.hdf5ls +++ b/tests/output/macros/ntuple-per-det.hdf5ls @@ -1,140 +1,140 @@ default_histograms header stp -stp/det1 -stp/det1/columns -stp/det1/edep_in_keV -stp/det1/edep_in_keV/entries -stp/det1/edep_in_keV/pages -stp/det1/entries -stp/det1/evtid -stp/det1/evtid/entries -stp/det1/evtid/pages -stp/det1/forms -stp/det1/names -stp/det1/particle -stp/det1/particle/entries -stp/det1/particle/pages -stp/det1/time_in_ns -stp/det1/time_in_ns/entries -stp/det1/time_in_ns/pages -stp/det1/xloc_in_m -stp/det1/xloc_in_m/entries -stp/det1/xloc_in_m/pages -stp/det1/yloc_in_m -stp/det1/yloc_in_m/entries -stp/det1/yloc_in_m/pages -stp/det1/zloc_in_m -stp/det1/zloc_in_m/entries -stp/det1/zloc_in_m/pages -stp/det2 -stp/det2/columns -stp/det2/edep_in_keV -stp/det2/edep_in_keV/entries -stp/det2/edep_in_keV/pages -stp/det2/entries -stp/det2/evtid -stp/det2/evtid/entries -stp/det2/evtid/pages -stp/det2/forms -stp/det2/names -stp/det2/particle -stp/det2/particle/entries -stp/det2/particle/pages -stp/det2/time_in_ns -stp/det2/time_in_ns/entries -stp/det2/time_in_ns/pages -stp/det2/xloc_in_m -stp/det2/xloc_in_m/entries -stp/det2/xloc_in_m/pages -stp/det2/yloc_in_m -stp/det2/yloc_in_m/entries -stp/det2/yloc_in_m/pages -stp/det2/zloc_in_m -stp/det2/zloc_in_m/entries -stp/det2/zloc_in_m/pages -stp/scint1 -stp/scint1/columns -stp/scint1/edep_in_keV -stp/scint1/edep_in_keV/entries -stp/scint1/edep_in_keV/pages -stp/scint1/entries -stp/scint1/evtid -stp/scint1/evtid/entries -stp/scint1/evtid/pages -stp/scint1/forms -stp/scint1/names -stp/scint1/particle -stp/scint1/particle/entries -stp/scint1/particle/pages -stp/scint1/time_in_ns -stp/scint1/time_in_ns/entries -stp/scint1/time_in_ns/pages -stp/scint1/v_post_in_m\ns -stp/scint1/v_post_in_m\ns/entries -stp/scint1/v_post_in_m\ns/pages -stp/scint1/v_pre_in_m\ns -stp/scint1/v_pre_in_m\ns/entries -stp/scint1/v_pre_in_m\ns/pages -stp/scint1/xloc_post_in_m -stp/scint1/xloc_post_in_m/entries -stp/scint1/xloc_post_in_m/pages -stp/scint1/xloc_pre_in_m -stp/scint1/xloc_pre_in_m/entries -stp/scint1/xloc_pre_in_m/pages -stp/scint1/yloc_post_in_m -stp/scint1/yloc_post_in_m/entries -stp/scint1/yloc_post_in_m/pages -stp/scint1/yloc_pre_in_m -stp/scint1/yloc_pre_in_m/entries -stp/scint1/yloc_pre_in_m/pages -stp/scint1/zloc_post_in_m -stp/scint1/zloc_post_in_m/entries -stp/scint1/zloc_post_in_m/pages -stp/scint1/zloc_pre_in_m -stp/scint1/zloc_pre_in_m/entries -stp/scint1/zloc_pre_in_m/pages -stp/scint2 -stp/scint2/columns -stp/scint2/edep_in_keV -stp/scint2/edep_in_keV/entries -stp/scint2/edep_in_keV/pages -stp/scint2/entries -stp/scint2/evtid -stp/scint2/evtid/entries -stp/scint2/evtid/pages -stp/scint2/forms -stp/scint2/names -stp/scint2/particle -stp/scint2/particle/entries -stp/scint2/particle/pages -stp/scint2/time_in_ns -stp/scint2/time_in_ns/entries -stp/scint2/time_in_ns/pages -stp/scint2/v_post_in_m\ns -stp/scint2/v_post_in_m\ns/entries -stp/scint2/v_post_in_m\ns/pages -stp/scint2/v_pre_in_m\ns -stp/scint2/v_pre_in_m\ns/entries -stp/scint2/v_pre_in_m\ns/pages -stp/scint2/xloc_post_in_m -stp/scint2/xloc_post_in_m/entries -stp/scint2/xloc_post_in_m/pages -stp/scint2/xloc_pre_in_m -stp/scint2/xloc_pre_in_m/entries -stp/scint2/xloc_pre_in_m/pages -stp/scint2/yloc_post_in_m -stp/scint2/yloc_post_in_m/entries -stp/scint2/yloc_post_in_m/pages -stp/scint2/yloc_pre_in_m -stp/scint2/yloc_pre_in_m/entries -stp/scint2/yloc_pre_in_m/pages -stp/scint2/zloc_post_in_m -stp/scint2/zloc_post_in_m/entries -stp/scint2/zloc_post_in_m/pages -stp/scint2/zloc_pre_in_m -stp/scint2/zloc_pre_in_m/entries -stp/scint2/zloc_pre_in_m/pages +stp/det001 +stp/det001/columns +stp/det001/edep_in_keV +stp/det001/edep_in_keV/entries +stp/det001/edep_in_keV/pages +stp/det001/entries +stp/det001/evtid +stp/det001/evtid/entries +stp/det001/evtid/pages +stp/det001/forms +stp/det001/names +stp/det001/particle +stp/det001/particle/entries +stp/det001/particle/pages +stp/det001/time_in_ns +stp/det001/time_in_ns/entries +stp/det001/time_in_ns/pages +stp/det001/v_post_in_m\ns +stp/det001/v_post_in_m\ns/entries +stp/det001/v_post_in_m\ns/pages +stp/det001/v_pre_in_m\ns +stp/det001/v_pre_in_m\ns/entries +stp/det001/v_pre_in_m\ns/pages +stp/det001/xloc_post_in_m +stp/det001/xloc_post_in_m/entries +stp/det001/xloc_post_in_m/pages +stp/det001/xloc_pre_in_m +stp/det001/xloc_pre_in_m/entries +stp/det001/xloc_pre_in_m/pages +stp/det001/yloc_post_in_m +stp/det001/yloc_post_in_m/entries +stp/det001/yloc_post_in_m/pages +stp/det001/yloc_pre_in_m +stp/det001/yloc_pre_in_m/entries +stp/det001/yloc_pre_in_m/pages +stp/det001/zloc_post_in_m +stp/det001/zloc_post_in_m/entries +stp/det001/zloc_post_in_m/pages +stp/det001/zloc_pre_in_m +stp/det001/zloc_pre_in_m/entries +stp/det001/zloc_pre_in_m/pages +stp/det002 +stp/det002/columns +stp/det002/edep_in_keV +stp/det002/edep_in_keV/entries +stp/det002/edep_in_keV/pages +stp/det002/entries +stp/det002/evtid +stp/det002/evtid/entries +stp/det002/evtid/pages +stp/det002/forms +stp/det002/names +stp/det002/particle +stp/det002/particle/entries +stp/det002/particle/pages +stp/det002/time_in_ns +stp/det002/time_in_ns/entries +stp/det002/time_in_ns/pages +stp/det002/v_post_in_m\ns +stp/det002/v_post_in_m\ns/entries +stp/det002/v_post_in_m\ns/pages +stp/det002/v_pre_in_m\ns +stp/det002/v_pre_in_m\ns/entries +stp/det002/v_pre_in_m\ns/pages +stp/det002/xloc_post_in_m +stp/det002/xloc_post_in_m/entries +stp/det002/xloc_post_in_m/pages +stp/det002/xloc_pre_in_m +stp/det002/xloc_pre_in_m/entries +stp/det002/xloc_pre_in_m/pages +stp/det002/yloc_post_in_m +stp/det002/yloc_post_in_m/entries +stp/det002/yloc_post_in_m/pages +stp/det002/yloc_pre_in_m +stp/det002/yloc_pre_in_m/entries +stp/det002/yloc_pre_in_m/pages +stp/det002/zloc_post_in_m +stp/det002/zloc_post_in_m/entries +stp/det002/zloc_post_in_m/pages +stp/det002/zloc_pre_in_m +stp/det002/zloc_pre_in_m/entries +stp/det002/zloc_pre_in_m/pages +stp/det011 +stp/det011/columns +stp/det011/edep_in_keV +stp/det011/edep_in_keV/entries +stp/det011/edep_in_keV/pages +stp/det011/entries +stp/det011/evtid +stp/det011/evtid/entries +stp/det011/evtid/pages +stp/det011/forms +stp/det011/names +stp/det011/particle +stp/det011/particle/entries +stp/det011/particle/pages +stp/det011/time_in_ns +stp/det011/time_in_ns/entries +stp/det011/time_in_ns/pages +stp/det011/xloc_in_m +stp/det011/xloc_in_m/entries +stp/det011/xloc_in_m/pages +stp/det011/yloc_in_m +stp/det011/yloc_in_m/entries +stp/det011/yloc_in_m/pages +stp/det011/zloc_in_m +stp/det011/zloc_in_m/entries +stp/det011/zloc_in_m/pages +stp/det012 +stp/det012/columns +stp/det012/edep_in_keV +stp/det012/edep_in_keV/entries +stp/det012/edep_in_keV/pages +stp/det012/entries +stp/det012/evtid +stp/det012/evtid/entries +stp/det012/evtid/pages +stp/det012/forms +stp/det012/names +stp/det012/particle +stp/det012/particle/entries +stp/det012/particle/pages +stp/det012/time_in_ns +stp/det012/time_in_ns/entries +stp/det012/time_in_ns/pages +stp/det012/xloc_in_m +stp/det012/xloc_in_m/entries +stp/det012/xloc_in_m/pages +stp/det012/yloc_in_m +stp/det012/yloc_in_m/entries +stp/det012/yloc_in_m/pages +stp/det012/zloc_in_m +stp/det012/zloc_in_m/entries +stp/det012/zloc_in_m/pages stp/vertices stp/vertices/columns stp/vertices/entries diff --git a/tests/output/macros/ntuple-per-det.hdf5ls-lh5 b/tests/output/macros/ntuple-per-det.hdf5ls-lh5 index f9a5a88..1dc3ccb 100644 --- a/tests/output/macros/ntuple-per-det.hdf5ls-lh5 +++ b/tests/output/macros/ntuple-per-det.hdf5ls-lh5 @@ -1,46 +1,46 @@ -stp : struct{det1,det2,scint1,scint2,vertices} -stp/det1 : table{evtid,particle,edep,time,xloc,yloc,zloc} -stp/det1/edep : array<1>{real} -stp/det1/evtid : array<1>{real} -stp/det1/particle : array<1>{real} -stp/det1/time : array<1>{real} -stp/det1/xloc : array<1>{real} -stp/det1/yloc : array<1>{real} -stp/det1/zloc : array<1>{real} -stp/det2 : table{evtid,particle,edep,time,xloc,yloc,zloc} -stp/det2/edep : array<1>{real} -stp/det2/evtid : array<1>{real} -stp/det2/particle : array<1>{real} -stp/det2/time : array<1>{real} -stp/det2/xloc : array<1>{real} -stp/det2/yloc : array<1>{real} -stp/det2/zloc : array<1>{real} -stp/scint1 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} -stp/scint1/edep : array<1>{real} -stp/scint1/evtid : array<1>{real} -stp/scint1/particle : array<1>{real} -stp/scint1/time : array<1>{real} -stp/scint1/v_post : array<1>{real} -stp/scint1/v_pre : array<1>{real} -stp/scint1/xloc_post : array<1>{real} -stp/scint1/xloc_pre : array<1>{real} -stp/scint1/yloc_post : array<1>{real} -stp/scint1/yloc_pre : array<1>{real} -stp/scint1/zloc_post : array<1>{real} -stp/scint1/zloc_pre : array<1>{real} -stp/scint2 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} -stp/scint2/edep : array<1>{real} -stp/scint2/evtid : array<1>{real} -stp/scint2/particle : array<1>{real} -stp/scint2/time : array<1>{real} -stp/scint2/v_post : array<1>{real} -stp/scint2/v_pre : array<1>{real} -stp/scint2/xloc_post : array<1>{real} -stp/scint2/xloc_pre : array<1>{real} -stp/scint2/yloc_post : array<1>{real} -stp/scint2/yloc_pre : array<1>{real} -stp/scint2/zloc_post : array<1>{real} -stp/scint2/zloc_pre : array<1>{real} +stp : struct{det001,det002,det011,det012,vertices} +stp/det001 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} +stp/det001/edep : array<1>{real} +stp/det001/evtid : array<1>{real} +stp/det001/particle : array<1>{real} +stp/det001/time : array<1>{real} +stp/det001/v_post : array<1>{real} +stp/det001/v_pre : array<1>{real} +stp/det001/xloc_post : array<1>{real} +stp/det001/xloc_pre : array<1>{real} +stp/det001/yloc_post : array<1>{real} +stp/det001/yloc_pre : array<1>{real} +stp/det001/zloc_post : array<1>{real} +stp/det001/zloc_pre : array<1>{real} +stp/det002 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} +stp/det002/edep : array<1>{real} +stp/det002/evtid : array<1>{real} +stp/det002/particle : array<1>{real} +stp/det002/time : array<1>{real} +stp/det002/v_post : array<1>{real} +stp/det002/v_pre : array<1>{real} +stp/det002/xloc_post : array<1>{real} +stp/det002/xloc_pre : array<1>{real} +stp/det002/yloc_post : array<1>{real} +stp/det002/yloc_pre : array<1>{real} +stp/det002/zloc_post : array<1>{real} +stp/det002/zloc_pre : array<1>{real} +stp/det011 : table{evtid,particle,edep,time,xloc,yloc,zloc} +stp/det011/edep : array<1>{real} +stp/det011/evtid : array<1>{real} +stp/det011/particle : array<1>{real} +stp/det011/time : array<1>{real} +stp/det011/xloc : array<1>{real} +stp/det011/yloc : array<1>{real} +stp/det011/zloc : array<1>{real} +stp/det012 : table{evtid,particle,edep,time,xloc,yloc,zloc} +stp/det012/edep : array<1>{real} +stp/det012/evtid : array<1>{real} +stp/det012/particle : array<1>{real} +stp/det012/time : array<1>{real} +stp/det012/xloc : array<1>{real} +stp/det012/yloc : array<1>{real} +stp/det012/zloc : array<1>{real} stp/vertices : table{evtid,time,xloc,yloc,zloc,n_part} stp/vertices/evtid : array<1>{real} stp/vertices/n_part : array<1>{real}