-
Notifications
You must be signed in to change notification settings - Fork 16
Standardization of caf::SRTrkChi2PID form #175
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0c900dd
Refactor SRTrkChi2PID class documentation and methods
PetrilloAtWork 299152f
Refactor SRTrkChi2PID class with default values
PetrilloAtWork 40d0db1
Typographical mispelling
PetrilloAtWork 4b02b1d
Merge branch 'develop' into feature/gp_standardizeSRTrkChi2PID
kjplows File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,20 @@ | ||
| //////////////////////////////////////////////////////////////////////// | ||
| // \file SRTrkChi2PID.cxx | ||
| // \brief An SRTrkChi2PID is a high level track ParticlePID object for | ||
| // for larana Chi2ParticleID results. | ||
| //////////////////////////////////////////////////////////////////////// | ||
| /** | ||
| * @file SRTrkChi2PID.cxx | ||
| * @brief An SRTrkChi2PID is a high level track `anab::ParticlePID` object | ||
| * for larana `pid::Chi2ParticleID` results. | ||
| * @see SRTrkChi2PID.h | ||
| */ | ||
|
|
||
| #include "sbnanaobj/StandardRecord/SRTrkChi2PID.h" | ||
|
|
||
| #include <limits> | ||
|
|
||
| namespace caf | ||
| void caf::SRTrkChi2PID::setDefault() | ||
| { | ||
| pdg = -5; | ||
| pid_ndof = -5; | ||
| chi2_muon = -5.0; | ||
| chi2_pion = -5.0; | ||
| chi2_kaon = -5.0; | ||
| chi2_proton = -5.0; | ||
| pida = -5; | ||
| } | ||
|
|
||
| SRTrkChi2PID::SRTrkChi2PID(): | ||
| pdg(-999), | ||
| pid_ndof(-99), | ||
| chi2_muon(std::numeric_limits<float>::signaling_NaN()), | ||
| chi2_pion(std::numeric_limits<float>::signaling_NaN()), | ||
| chi2_kaon(std::numeric_limits<float>::signaling_NaN()), | ||
| chi2_proton(std::numeric_limits<float>::signaling_NaN()), | ||
| pida(std::numeric_limits<float>::signaling_NaN()) | ||
| { } | ||
|
|
||
| SRTrkChi2PID::~SRTrkChi2PID(){ } | ||
|
|
||
| void SRTrkChi2PID::setDefault() | ||
| { | ||
| pdg = -5; | ||
| pid_ndof = -5; | ||
| chi2_muon = -5.0; | ||
| chi2_pion = -5.0; | ||
| chi2_kaon = -5.0; | ||
| chi2_proton = -5.0; | ||
| pida = -5; | ||
| } | ||
|
|
||
| } // end namespace caf | ||
| //////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,33 @@ | ||
| //////////////////////////////////////////////////////////////////////// | ||
| // \file SRTrkChi2PID.h | ||
| //////////////////////////////////////////////////////////////////////// | ||
| /** | ||
| * @file SRTrkChi2PID.h | ||
| * @brief An SRTrkChi2PID is a high level track `anab::ParticlePID` object | ||
| * for larana `pid::Chi2ParticleID` results. | ||
| * @see SRTrkChi2PID.cxx | ||
| */ | ||
|
|
||
| #ifndef SRTRKCHI2PID_H | ||
| #define SRTRKCHI2PID_H | ||
|
|
||
| #include "sbnanaobj/StandardRecord/SRConstants.h" | ||
|
|
||
| namespace caf | ||
| { | ||
| /// Track PID from dE/dx v. residual range Chi2 | ||
| class SRTrkChi2PID | ||
| /// Track PID from dE/dx v. residual range χ². | ||
| struct SRTrkChi2PID | ||
| { | ||
| public: | ||
|
|
||
| SRTrkChi2PID(); | ||
| virtual ~SRTrkChi2PID(); | ||
|
|
||
| int pdg; ///< Min Chi2 pdg | ||
| int pid_ndof; ///< Number of degress of freedom in Chi2 PID fit | ||
| float chi2_muon; ///< dE/dx v. residual range Chi2 (muon hypothesis) | ||
| float chi2_pion; ///< dE/dx v. residual range Chi2 (pion hypothesis) | ||
| float chi2_kaon; ///< dE/dx v. residual range Chi2 (kaon hypothesis) | ||
| float chi2_proton; ///< dE/dx v. residual range Chi2 (proton hypothesis) | ||
| int pdg = -999; ///< PDG ID of the lowest Chi2. | ||
| int pid_ndof = -99; ///< Number of degress of freedom in Chi2 PID fit. | ||
| float chi2_muon = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (muon hypothesis). | ||
| float chi2_pion = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (pion hypothesis). | ||
| float chi2_kaon = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (kaon hypothesis). | ||
| float chi2_proton = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (proton hypothesis). | ||
|
|
||
| float pida; ///< PIDA | ||
| float pida = caf::kSignalingNaN; ///< Particle identification algorithm result (PIDA). | ||
|
|
||
| void setDefault(); | ||
| }; | ||
|
|
||
| } // end namespace | ||
|
|
||
| #endif // SRTRKCHI2PID_H | ||
| ////////////////////////////////////////////////////////////////////////////// | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.