diff --git a/sbnobj/Common/CRT/CRTHit.hh b/sbnobj/Common/CRT/CRTHit.hh index 21499ab1..a5667774 100644 --- a/sbnobj/Common/CRT/CRTHit.hh +++ b/sbnobj/Common/CRT/CRTHit.hh @@ -22,29 +22,29 @@ namespace sbn::crt { struct CRTHit{ - std::vector feb_id; ///< FEB address - std::map< uint8_t, std::vector > > pesmap; ///< Saves signal hit information (FEB, local-channel and PE) . - float peshit; ///< Total photo-electron (PE) in a crt hit. + std::vector feb_id{}; ///< FEB address + std::map< uint8_t, std::vector > > pesmap{}; ///< Saves signal hit information (FEB, local-channel and PE) . + float peshit{0.f}; ///< Total photo-electron (PE) in a crt hit. - uint64_t ts0_s; ///< Second-only part of timestamp T0. - double ts0_s_corr; ///< [Honestly, not sure at this point, it was there since long time (BB)] - double ts0_ns; ///< Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch. - double ts0_ns_corr; ///< [Honestly, not sure at this point, it was there since long time (BB)] + uint64_t ts0_s{0}; ///< Second-only part of timestamp T0. + double ts0_s_corr{0.0}; ///< [Honestly, not sure at this point, it was there since long time (BB)] + double ts0_ns{0.0}; ///< Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch. + double ts0_ns_corr{0.0}; ///< [Honestly, not sure at this point, it was there since long time (BB)] - double ts1_ns; ///< Timestamp T1 ([signal time w.r.t. Trigger time]), + double ts1_ns{0.0}; ///< Timestamp T1 ([signal time w.r.t. Trigger time]), - int plane; ///< Name of the CRT wall (in the form of numbers). + int plane{0}; ///< Name of the CRT wall (in the form of numbers). - float x_pos; ///< position in x-direction (cm). - float x_err; ///< position uncertainty in x-direction (cm). - float y_pos; ///< position in y-direction (cm). - float y_err; ///< position uncertainty in y-direction (cm). - float z_pos; ///< position in z-direction (cm). - float z_err; ///< position uncertainty in z-direction (cm). + float x_pos{0.f}; ///< position in x-direction (cm). + float x_err{0.f}; ///< position uncertainty in x-direction (cm). + float y_pos{0.f}; ///< position in y-direction (cm). + float y_err{0.f}; ///< position uncertainty in y-direction (cm). + float z_pos{0.f}; ///< position in z-direction (cm). + float z_err{0.f}; ///< position uncertainty in z-direction (cm). - std::string tagger; ///< Name of the CRT wall (in the form of strings). + std::string tagger{}; ///< Name of the CRT wall (in the form of strings). - CRTHit() {} + CRTHit() = default; int64_t ts0() const { return static_cast(ts0_s) * 1'000'000'000LL + static_cast(ts0_ns); } // T1 is a relative time not a timestamp, so we don't need second-part.