-
Notifications
You must be signed in to change notification settings - Fork 11
Add CRT-PMT flash classification to TPC-PMT flash-matching producer #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
PetrilloAtWork
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am suggesting a change to preserve the type of the matching variable. This allows a more immediate interpretation of its value, at the cost of an added dependency¹.
[1] If adopted, please remove the (Doxygen) comment at line 19 since it will make it not possible to move MatchType to ICARUS code — it's already very hard.
|
|
||
| // 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(); |
There was a problem hiding this comment.
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.
| 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)
| 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 |
There was a problem hiding this comment.
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
| 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.
This PR (based off of
v10_00_05) adds the flash classification from the CRT-PMT matching information to the best-matched flash in the TPC-PMT barycenter flash-matching producer.Associated PRs
Review
Tagging for review @francescopoppi and @PetrilloAtWork as the CRT & light gurus. Thanks!