From d5cad11d1afab169c4b63ba61bee696a6ff3a122 Mon Sep 17 00:00:00 2001 From: lynnt20 Date: Wed, 10 Dec 2025 11:50:53 -0600 Subject: [PATCH 1/4] add SRLightCalo and SRTrueDeposit classes --- sbnanaobj/StandardRecord/SRLightCalo.h | 27 ++++++++++++++++++++++++ sbnanaobj/StandardRecord/SRSlice.h | 3 +++ sbnanaobj/StandardRecord/SRTrueDeposit.h | 26 +++++++++++++++++++++++ sbnanaobj/StandardRecord/SRTruthBranch.h | 2 ++ sbnanaobj/StandardRecord/classes_def.xml | 7 +++++- 5 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 sbnanaobj/StandardRecord/SRLightCalo.h create mode 100644 sbnanaobj/StandardRecord/SRTrueDeposit.h diff --git a/sbnanaobj/StandardRecord/SRLightCalo.h b/sbnanaobj/StandardRecord/SRLightCalo.h new file mode 100644 index 00000000..b39a38e8 --- /dev/null +++ b/sbnanaobj/StandardRecord/SRLightCalo.h @@ -0,0 +1,27 @@ +/** + * @file sbnanaobj/StandardRecord/SRLightCalo.h + * @brief Defines data structures to store light calorimetry info (header only). + * @author Lynn Tung + * @date November 19, 2025 + */ + +#ifndef SBNANAOBJ_STANDARDRECORD_SRLIGHTCALO_H +#define SBNANAOBJ_STANDARDRECORD_SRLIGHTCALO_H + +#include "sbnanaobj/StandardRecord/SRConstants.h" + +namespace caf { + + /** + * @brief A struct to store the reconstructed visible energy, light, and charge in a recob::Slice. + * + */ + struct SRLightCalo { + float charge = caf::kSignalingNaN; // the total charge in the slice (on bestplane) [# electrons] + float light = caf::kSignalingNaN; // the reconstructed total number of photons [# photons] + float energy = caf::kSignalingNaN; // (charge+light)*scaling, [GeV] + int bestplane = caf::kUninitializedInt; // plane with most number of hits +}; +} + +#endif diff --git a/sbnanaobj/StandardRecord/SRSlice.h b/sbnanaobj/StandardRecord/SRSlice.h index abd9e62f..96cb385a 100644 --- a/sbnanaobj/StandardRecord/SRSlice.h +++ b/sbnanaobj/StandardRecord/SRSlice.h @@ -19,6 +19,7 @@ #include "sbnanaobj/StandardRecord/SRNuID.h" #include "sbnanaobj/StandardRecord/SRConstants.h" #include "sbnanaobj/StandardRecord/SRCVNScore.h" +#include "sbnanaobj/StandardRecord/SRLightCalo.h" #include @@ -54,6 +55,8 @@ namespace caf SRCorrectedOpFlash correctedOpFlash; //!< OpFlash corrected with using tpc information matched to this slice + SRLightCalo lightcalo; // !< Reconstructed visible energy, light, and charge + SRFakeReco fake_reco; bool is_clear_cosmic { false }; //!< Whether pandora marks the slice as a "clear" cosmic diff --git a/sbnanaobj/StandardRecord/SRTrueDeposit.h b/sbnanaobj/StandardRecord/SRTrueDeposit.h new file mode 100644 index 00000000..52615cd9 --- /dev/null +++ b/sbnanaobj/StandardRecord/SRTrueDeposit.h @@ -0,0 +1,26 @@ +/** + * @file sbnanaobj/StandardRecord/SrTrueDeposit.h + * @brief Defines data structures to store summed SimEnergyDeposits (header only). + * @author Lynn Tung + * @date November 18, 2025 + */ + +#ifndef SBNANAOBJ_STANDARDRECORD_SRTRUEDEPOSIT_H +#define SBNANAOBJ_STANDARDRECORD_SRTRUEDEPOSIT_H + +#include "sbnanaobj/StandardRecord/SRConstants.h" + +namespace caf { + + /** + * @brief A struct to store true deposited energy, charge, and photons for each MCTruth interaction. + * + */ + struct SRTrueDeposit { + float electrons = caf::kSignalingNaN; ///< # of electrons at the site of energy deposition (after recombination, before drift) + float photons = caf::kSignalingNaN; ///< # of photons at the site of energy deposition (after recombination, before propagation) + float energy = caf::kSignalingNaN; ///< total **deposited energy** [GeV] + }; +} + +#endif diff --git a/sbnanaobj/StandardRecord/SRTruthBranch.h b/sbnanaobj/StandardRecord/SRTruthBranch.h index c98b78f6..b65b468c 100644 --- a/sbnanaobj/StandardRecord/SRTruthBranch.h +++ b/sbnanaobj/StandardRecord/SRTruthBranch.h @@ -5,6 +5,7 @@ #define SRTRUTHBRANCH_H #include "sbnanaobj/StandardRecord/SRTrueInteraction.h" +#include "sbnanaobj/StandardRecord/SRTrueDeposit.h" #include "sbnanaobj/StandardRecord/SRMeVPrtl.h" #include @@ -19,6 +20,7 @@ namespace caf ~SRTruthBranch(); std::vector nu; ///< Vector of true nu or cosmic + std::vector dep; ///< Vector of true energy deposits (summed), same size as nu size_t nnu; ///< Number of true nu or cosmic std::vector prtl; ///< If present -- information on decay of MeV "Portal" particle diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 9b6f8fb2..8e041fc3 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -95,6 +95,7 @@ + @@ -174,6 +175,8 @@ + + @@ -215,7 +218,8 @@ - + + @@ -336,6 +340,7 @@ + From 54582eef46c242032d26f4e07097bae67d49bbfd Mon Sep 17 00:00:00 2001 From: lynnt20 Date: Wed, 14 Jan 2026 13:58:42 -0600 Subject: [PATCH 2/4] add class versions/checksums --- sbnanaobj/StandardRecord/classes_def.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 8b8d0e99..8a8de28a 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -96,8 +96,13 @@ - - + + + + + + + @@ -182,7 +187,9 @@ - + + + From c8fcd074b2285d416f8f4f9cde5131eb8c499b58 Mon Sep 17 00:00:00 2001 From: lynnt20 Date: Wed, 14 Jan 2026 13:58:54 -0600 Subject: [PATCH 3/4] update comments to doxygen style --- sbnanaobj/StandardRecord/SRLightCalo.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRLightCalo.h b/sbnanaobj/StandardRecord/SRLightCalo.h index b39a38e8..25324a39 100644 --- a/sbnanaobj/StandardRecord/SRLightCalo.h +++ b/sbnanaobj/StandardRecord/SRLightCalo.h @@ -17,10 +17,10 @@ namespace caf { * */ struct SRLightCalo { - float charge = caf::kSignalingNaN; // the total charge in the slice (on bestplane) [# electrons] - float light = caf::kSignalingNaN; // the reconstructed total number of photons [# photons] - float energy = caf::kSignalingNaN; // (charge+light)*scaling, [GeV] - int bestplane = caf::kUninitializedInt; // plane with most number of hits + float charge = caf::kSignalingNaN; ///< the total charge in the slice (on bestplane) [# electrons] + float light = caf::kSignalingNaN; ///< the reconstructed total number of photons [# photons] + float energy = caf::kSignalingNaN; ///< (charge+light)*scaling, [GeV] + int bestplane = caf::kUninitializedInt; ///< plane with most number of hits }; } From bf14337e2a361d016022425183499ab9232a1f31 Mon Sep 17 00:00:00 2001 From: lynnt20 Date: Tue, 3 Feb 2026 09:48:15 -0600 Subject: [PATCH 4/4] refine comments in SRTrueDeposit struct, clarify that each member refers to the total over the nu interaction --- sbnanaobj/StandardRecord/SRTrueDeposit.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRTrueDeposit.h b/sbnanaobj/StandardRecord/SRTrueDeposit.h index 52615cd9..e10ab109 100644 --- a/sbnanaobj/StandardRecord/SRTrueDeposit.h +++ b/sbnanaobj/StandardRecord/SRTrueDeposit.h @@ -13,13 +13,13 @@ namespace caf { /** - * @brief A struct to store true deposited energy, charge, and photons for each MCTruth interaction. + * @brief A struct to store total true deposited energy, charge, and photons for each MCTruth interaction. * */ struct SRTrueDeposit { - float electrons = caf::kSignalingNaN; ///< # of electrons at the site of energy deposition (after recombination, before drift) - float photons = caf::kSignalingNaN; ///< # of photons at the site of energy deposition (after recombination, before propagation) - float energy = caf::kSignalingNaN; ///< total **deposited energy** [GeV] + float electrons = caf::kSignalingNaN; ///< total # of electrons from the sites of energy deposition, summed per nu interaction (after recombination, before drift) + float photons = caf::kSignalingNaN; ///< total # of photons from the sites of energy deposition, summed per nu interaction (after recombination, before propagation) + float energy = caf::kSignalingNaN; ///< total **deposited energy**, summed per nu interaction [GeV] }; }