diff --git a/sbnobj/Common/Reco/CMakeLists.txt b/sbnobj/Common/Reco/CMakeLists.txt index bcdd52a1..50eebbfd 100644 --- a/sbnobj/Common/Reco/CMakeLists.txt +++ b/sbnobj/Common/Reco/CMakeLists.txt @@ -3,6 +3,7 @@ cet_make_library( CNNScore.cc CRUMBSResult.cc FlashTriggerPrimitive.cc + LightCalo.cc MVAPID.cc MergedTrackInfo.cc OpT0FinderResult.cc diff --git a/sbnobj/Common/Reco/LightCalo.cc b/sbnobj/Common/Reco/LightCalo.cc new file mode 100644 index 00000000..cf35a897 --- /dev/null +++ b/sbnobj/Common/Reco/LightCalo.cc @@ -0,0 +1 @@ +#include "sbnobj/Common/Reco/LightCalo.h" \ No newline at end of file diff --git a/sbnobj/Common/Reco/LightCalo.h b/sbnobj/Common/Reco/LightCalo.h new file mode 100644 index 00000000..75eb2efa --- /dev/null +++ b/sbnobj/Common/Reco/LightCalo.h @@ -0,0 +1,47 @@ +/** + * @file sbnobj/Common/Reco/LightCalo.h + * @brief Defines data structures for light calorimetry products. + * @author Lynn Tung + * @date December 2nd, 2025 + * + */ + +#ifndef sbnobj_LightCalo_H +#define sbnobj_LightCalo_H + +#include + +namespace sbn{ + + /** + * @brief A simple class to store reconstructed charge, light, and visible energy. + */ + + class LightCalo { + public: + + // NaN value to initialize data members + static constexpr double nan = std::numeric_limits::signaling_NaN(); + + /// @name Reconstructed charge, light, and visible energy data members. + /// @{ + double charge = nan; ///< Total charge in a reconstructed interaction (recob::Slice) [# of electrons] + double light = nan; ///< Total light in a reconstructed interaction (recob::Slice + recob::OpFlash) [# of photons] + double energy = nan; ///< Total visible energy (sum of charge+light) for a reconstructed interaction [GeV] + int bestplane = -1; ///< Plane that was used for the total charge + /// @} + + /** + * Default constructor. + */ + LightCalo() = default; + LightCalo(double charge, double light, double energy, int bestplane) + : charge(charge) + , light(light) + , energy(energy) + , bestplane(bestplane) + {} + }; +} + +#endif diff --git a/sbnobj/Common/Reco/classes.h b/sbnobj/Common/Reco/classes.h index 02760d4d..ecd981af 100644 --- a/sbnobj/Common/Reco/classes.h +++ b/sbnobj/Common/Reco/classes.h @@ -28,6 +28,7 @@ #include "sbnobj/Common/Reco/VertexHit.h" #include "sbnobj/Common/Reco/MVAPID.h" #include "sbnobj/Common/Reco/CRUMBSResult.h" +#include "sbnobj/Common/Reco/LightCalo.h" #include "sbnobj/Common/Reco/OpT0FinderResult.h" #include "sbnobj/Common/Reco/CNNScore.h" #include "sbnobj/Common/Reco/TPCPMTBarycenterMatch.h" diff --git a/sbnobj/Common/Reco/classes_def.xml b/sbnobj/Common/Reco/classes_def.xml index cacd0bb9..889a855d 100644 --- a/sbnobj/Common/Reco/classes_def.xml +++ b/sbnobj/Common/Reco/classes_def.xml @@ -78,6 +78,22 @@ + + + + + + + + + + + + + + + +