-
Notifications
You must be signed in to change notification settings - Fork 12
Refactor each T0 in Calibration NTupler into its own field #124
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 all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4cd4934
This commit does the following: creation of data product with the CRT…
francescopoppi 1499884
Split out t0s into separate variables.
gputnam 316a0ff
Merge branch 'develop' into feature/gp-calibntupler-v10
kjplows a543c37
Address comments and requests from Henry
francescopoppi 7d32e4d
Fixed order in the initialization
francescopoppi e9aa1f1
Addressed a final request from Henry
francescopoppi 923a8d9
Merge branch 'develop' into feature/gp-calibntupler-v10
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
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include "sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh" |
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 |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| /** | ||
| * @file sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh | ||
| * @author Francesco Poppi (poppi@bo.infn.it) | ||
| * @date January 2025 | ||
| */ | ||
|
|
||
| #ifndef SBNOBJ_COMMON_CRTHitT0TaggingInfo_hh_ | ||
| #define SBNOBJ_COMMON_CRTHitT0TaggingInfo_hh_ | ||
|
|
||
| // C/C++ standard libraries | ||
| #include <limits> | ||
| #include "larcorealg/Geometry/GeometryCore.h" | ||
| #include "larcoreobj/SimpleTypesAndConstants/geo_types.h" | ||
| #include "larcoreobj/SimpleTypesAndConstants/geo_vectors.h" | ||
| // ----------------------------------------------------------------------------- | ||
| namespace sbn::crt { | ||
| /// @brief How was the track fitted when matched with a CRT hit. | ||
|
|
||
| enum class CRTTaggingMethod { | ||
| crtHits = 0, ///< matching performed using single CRT Hits | ||
| crtTracks = 1 ///< matching performed using CRTTracks | ||
| }; | ||
|
|
||
| enum class CRTTaggingTrackFit { | ||
| pca = 0, ///< Track fitted with PCA method | ||
| startEnd = 1, ///< Track fitted from Start-End vector | ||
| kalman = 2, ///< Track fitted using Kalman Filter | ||
| others = 9 ///< Track direction evaluated in other mehods | ||
| }; | ||
|
|
||
| struct CRTHitT0TaggingInfo; | ||
| } | ||
| /** | ||
| * @brief Additional information on the matching between CRT and TPC tracks. | ||
| * | ||
| */ | ||
| struct sbn::crt::CRTHitT0TaggingInfo { | ||
|
|
||
| /// Magic value denoting the absence of DCA information. | ||
| static constexpr double NoDistance = std::numeric_limits<double>::lowest(); | ||
| static constexpr double NoTime = std::numeric_limits<double>::lowest(); | ||
|
|
||
| /// Magic value denoting the absence of CRTs. | ||
| static constexpr int NoCRT = std::numeric_limits<int>::lowest(); | ||
|
|
||
| /// Magic value denoting the absence of CRT Plane. | ||
| static constexpr int NoPlane = std::numeric_limits<int>::lowest(); | ||
|
|
||
| // --- BEGIN -- Data members ------------------------------------------------- | ||
|
|
||
| // Francesco: following a discussion with Henry Lay, we decided that is good | ||
| // to have a common object to store additional information, but at the moment | ||
| // the matching approach is different, ICARUS uses single CRT Hits to track | ||
| // matching, while SBND uses CRTTracks. Due to this difference, we decided | ||
| // to add a notation "Hit" in the member which matches tracks with single hits. | ||
| // We might at some point do more discussion and see if this can work for both. | ||
|
|
||
| /// Distance of closest approach between track extension and CRT hit [cm] | ||
| double Distance = NoDistance; | ||
|
|
||
| /// Matched CRT Hit sub detector | ||
| // e.g. ICARUS case: 0 Top, 1 Side, 2 Bottom | ||
| int Sys = NoCRT; | ||
|
|
||
| /// Matched CRT Hit region | ||
| // e.g. ICARUS case: 30-34 Top CRT, 40-48 Side CRT, 50 Bottom CRT | ||
| int Region = NoCRT; | ||
|
|
||
| /// Matched CRT Hit time w.r.t. trigger [ns] | ||
| double Time = NoTime; | ||
|
|
||
| /// Distance distinguished into its components DX, DY, DZ [cm] | ||
| double DeltaX = NoDistance; | ||
| double DeltaY = NoDistance; | ||
| double DeltaZ = NoDistance; | ||
|
|
||
| /// Extrapolated Track Projection Crossing Point onto the CRT Plane | ||
| double CrossX = NoDistance; | ||
| double CrossY = NoDistance; | ||
| double CrossZ = NoDistance; | ||
|
|
||
| /// Fix Coordinate for the CRT Plane | ||
| // e.g. ICARUS case: | ||
| // For Top CRT region 30 Y coordinate is constant: plane=0 | ||
| // For Top CRT region 31/32 and Side CRT 40/41/42/43/44/45 X coordinate is constant: plane=1 | ||
| // For Top CRT region 33/34 and Side CRT 46/47 Z coordinate is constant: plane=2 | ||
| int Plane = NoPlane; | ||
|
|
||
| // PCA Fit Fir Eigenvector | ||
| geo::Vector_t PCAEigenVector = {-1., -1., -1.}; | ||
|
|
||
| CRTTaggingTrackFit fitType; | ||
| CRTTaggingMethod taggingMethod; | ||
|
|
||
| // --- END ---- Data members ------------------------------------------------- | ||
|
|
||
| }; // sbn::crt::CRTHitT0TaggingInfo | ||
|
|
||
|
|
||
| // ----------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| #endif // SBNOBJ_COMMON_CRTHitT0TaggingInfo_hh_ | ||
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include "sbnobj/Common/CRT/CRTHitT0TaggingTruthInfo.hh" |
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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| /** | ||
| * @file sbnobj/Common/CRT/CRTHitT0TaggingTruthInfo.hh | ||
| * @author Francesco Poppi (poppi@bo.infn.it) | ||
| * @date January 2025 | ||
| */ | ||
|
|
||
| #ifndef SBNOBJ_COMMON_CRTHitT0TaggingTruthInfo_hh_ | ||
| #define SBNOBJ_COMMON_CRTHitT0TaggingTruthInfo_hh_ | ||
|
|
||
| // C/C++ standard libraries | ||
| #include <limits> | ||
|
|
||
| // ----------------------------------------------------------------------------- | ||
| namespace sbn::crt { | ||
| struct CRTHitT0TaggingTruthInfo; | ||
| } | ||
| /** | ||
| * @brief Truth information on the matching between CRT and TPC tracks. | ||
| * | ||
| */ | ||
| struct sbn::crt::CRTHitT0TaggingTruthInfo { | ||
| static constexpr double NoCoordinate = std::numeric_limits<double>::lowest(); | ||
| static constexpr int NoId = std::numeric_limits<int>::lowest(); | ||
| static constexpr int NoPdg = std::numeric_limits<int>::lowest(); | ||
|
|
||
| /// Verify that the truth level information of the track were correctly retrieved. | ||
| /// Default is false. | ||
| bool truthFound = false; | ||
|
|
||
| /// Turth level information of the match. | ||
| /// Default is false. For MC this information is filled if MC truth is available. | ||
| bool truthMatch = false; | ||
|
|
||
| /// Truth information of the particle Geant4Id. | ||
| int truthG4TrackId = NoId; | ||
|
|
||
| /// Truth information of the particle Pdg code. | ||
| int truthTrackPdgCode = NoPdg; | ||
|
|
||
| /// Truth information if the particle is associated with the neutrino interaction | ||
| /// or not (information from generator). Default is false. | ||
| bool truthIsNu = false; | ||
|
|
||
| // --- END ---- Data members ------------------------------------------------- | ||
|
|
||
| }; // sbn::crt::CRTHitT0TaggingTruthInfo | ||
|
|
||
| // ----------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| #endif // SBNOBJ_COMMON_CRTHitT0TaggingTruthInfo_hh_ |
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
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
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
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
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.