1+ /* *
2+ * @file sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh
3+ * @author Francesco Poppi (poppi@bo.infn.it)
4+ * @date January 2025
5+ */
6+
7+ #ifndef SBNOBJ_COMMON_CRTHitT0TaggingInfo_hh_
8+ #define SBNOBJ_COMMON_CRTHitT0TaggingInfo_hh_
9+
10+ // C/C++ standard libraries
11+ #include < limits>
12+ #include " larcorealg/Geometry/GeometryCore.h"
13+ #include " larcoreobj/SimpleTypesAndConstants/geo_types.h"
14+ #include " larcoreobj/SimpleTypesAndConstants/geo_vectors.h"
15+ // -----------------------------------------------------------------------------
16+ namespace sbn ::crt {
17+ // / @brief How was the track fitted when matched with a CRT hit.
18+
19+ enum class CRTTaggingMethod {
20+ crtHits = 0 , // /< matching performed using single CRT Hits
21+ crtTracks = 1 // /< matching performed using CRTTracks
22+ };
23+
24+ enum class CRTTaggingTrackFit {
25+ pca = 0 , // /< Track fitted with PCA method
26+ startEnd = 1 , // /< Track fitted from Start-End vector
27+ kalman = 2 , // /< Track fitted using Kalman Filter
28+ others = 9 // /< Track direction evaluated in other mehods
29+ };
30+
31+ struct CRTHitT0TaggingInfo ;
32+ }
33+ /* *
34+ * @brief Additional information on the matching between CRT and TPC tracks.
35+ *
36+ */
37+ struct sbn ::crt::CRTHitT0TaggingInfo {
38+
39+ // / Magic value denoting the absence of DCA information.
40+ static constexpr double NoDistance = std::numeric_limits<double >::lowest();
41+ static constexpr double NoTime = std::numeric_limits<double >::lowest();
42+
43+ // / Magic value denoting the absence of CRTs.
44+ static constexpr int NoCRT = std::numeric_limits<int >::lowest();
45+
46+ // / Magic value denoting the absence of CRT Plane.
47+ static constexpr int NoPlane = std::numeric_limits<int >::lowest();
48+
49+ // --- BEGIN -- Data members -------------------------------------------------
50+
51+ // Francesco: following a discussion with Henry Lay, we decided that is good
52+ // to have a common object to store additional information, but at the moment
53+ // the matching approach is different, ICARUS uses single CRT Hits to track
54+ // matching, while SBND uses CRTTracks. Due to this difference, we decided
55+ // to add a notation "Hit" in the member which matches tracks with single hits.
56+ // We might at some point do more discussion and see if this can work for both.
57+
58+ // / Distance of closest approach between track extension and CRT hit [cm]
59+ double Distance = NoDistance;
60+
61+ // / Matched CRT Hit sub detector
62+ // e.g. ICARUS case: 0 Top, 1 Side, 2 Bottom
63+ int Sys = NoCRT;
64+
65+ // / Matched CRT Hit region
66+ // e.g. ICARUS case: 30-34 Top CRT, 40-48 Side CRT, 50 Bottom CRT
67+ int Region = NoCRT;
68+
69+ // / Matched CRT Hit time w.r.t. trigger [ns]
70+ double Time = NoTime;
71+
72+ // / Distance distinguished into its components DX, DY, DZ [cm]
73+ double DeltaX = NoDistance;
74+ double DeltaY = NoDistance;
75+ double DeltaZ = NoDistance;
76+
77+ // / Extrapolated Track Projection Crossing Point onto the CRT Plane
78+ double CrossX = NoDistance;
79+ double CrossY = NoDistance;
80+ double CrossZ = NoDistance;
81+
82+ // / Fix Coordinate for the CRT Plane
83+ // e.g. ICARUS case:
84+ // For Top CRT region 30 Y coordinate is constant: plane=0
85+ // For Top CRT region 31/32 and Side CRT 40/41/42/43/44/45 X coordinate is constant: plane=1
86+ // For Top CRT region 33/34 and Side CRT 46/47 Z coordinate is constant: plane=2
87+ int Plane = NoPlane;
88+
89+ // PCA Fit Fir Eigenvector
90+ geo::Vector_t PCAEigenVector = {-1 ., -1 ., -1 .};
91+
92+ CRTTaggingTrackFit fitType;
93+ CRTTaggingMethod taggingMethod;
94+
95+ // --- END ---- Data members -------------------------------------------------
96+
97+ }; // sbn::crt::CRTHitT0TaggingInfo
98+
99+
100+ // -----------------------------------------------------------------------------
101+
102+
103+ #endif // SBNOBJ_COMMON_CRTHitT0TaggingInfo_hh_
0 commit comments