Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions sbnobj/Common/Reco/TPCPMTBarycenterMatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace sbn {

// NaN value to initialize data members
static constexpr float fDefault = std::numeric_limits<float>::signaling_NaN();
static constexpr int fIntDefault = std::numeric_limits<int>::signaling_NaN();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no such thing as an integer NaN.

Suggested change
static constexpr int fIntDefault = std::numeric_limits<int>::signaling_NaN();
static constexpr int fIntDefault = std::numeric_limits<int>::lowest();

(but see my other comment instead)


/// @name Data members related to the slice barycenter determination
/// @{
Expand All @@ -33,12 +34,13 @@ namespace sbn {

/// @name Data members related to matched recob::OpFlash, also reachable by association
/// @{
float flashTime { fDefault }; ///< Matched OpFlash time (us)
float flashFirstHit { fDefault }; ///< Time of first OpHit in matched OpFlash (us)
float flashPEs { fDefault }; ///< Total PEs in matched flash
float flashAsymmetry { fDefault }; ///< East-West asymmetry of PEs in matched flash
geo::Point_t flashCenter { fDefault, fDefault, fDefault }; ///< Weighted mean ophit position in X,Y,Z [no meaingful X info for ophits] (cm)
geo::Vector_t flashWidth { fDefault, fDefault, fDefault }; ///< Weighted standard devitation of ophit position in X,Y,Z [no meaingful X info for ophits] (cm)
float flashTime { fDefault }; ///< Matched OpFlash time (us)
float flashFirstHit { fDefault }; ///< Time of first OpHit in matched OpFlash (us)
float flashPEs { fDefault }; ///< Total PEs in matched flash
float flashAsymmetry { fDefault }; ///< East-West asymmetry of PEs in matched flash
geo::Point_t flashCenter { fDefault, fDefault, fDefault }; ///< Weighted mean ophit position in X,Y,Z [no meaingful X info for ophits] (cm)
geo::Vector_t flashWidth { fDefault, fDefault, fDefault }; ///< Weighted standard devitation of ophit position in X,Y,Z [no meaingful X info for ophits] (cm)
int flashClassification { fIntDefault }; ///< Flash classification according to the CRT-PMT matching
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer the meaning of this variable not to be lost.
That means to add a dependency: #include "sbnobj/Common/CRT/CRTPMTMatching.hh" (not clear if sbnobj::Common_CRT will need to be added to the link list in CMakeLists.txt) and then declare

Suggested change
int flashClassification { fIntDefault }; ///< Flash classification according to the CRT-PMT matching
sbn::crt::MatchType flashClassification { sbn::crt::MatchType::unknown }; ///< Flash classification according to the CRT-PMT matching

I am also recommending to add unknown = -1 as value of sbn::crt::MatchType.

/// @}


Expand Down
3 changes: 2 additions & 1 deletion sbnobj/Common/Reco/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@
<class name="art::Wrapper<art::Assns<sbn::MVAPID, recob::PFParticle>>" />
<class name="art::Wrapper<art::Assns<sbn::MVAPID, recob::PFParticle, recob::Track>>" />

<class name="sbn::TPCPMTBarycenterMatch" ClassVersion="10">
<class name="sbn::TPCPMTBarycenterMatch" ClassVersion="11">
<version ClassVersion="11" checksum="1090705183"/>
<version ClassVersion="10" checksum="3504890228"/>
</class>
<class name="std::vector<sbn::TPCPMTBarycenterMatch>" />
Expand Down