Skip to content

Commit ffd1b1e

Browse files
committed
Merge branch 'release/v10_00_09'
2 parents 86c14aa + 208952a commit ffd1b1e

16 files changed

Lines changed: 232 additions & 29 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
1515

1616
find_package(cetmodules 3.20.00 REQUIRED)
17-
project(sbnobj VERSION 10.00.08 LANGUAGES CXX)
17+
project(sbnobj VERSION 10.00.09 LANGUAGES CXX)
1818

1919
message(STATUS
2020
"\n-- ============================================================================="

sbnobj/Common/CRT/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ cet_make_library(
44
CRTPMTMatching.cxx
55
CRTTrack.cc
66
CRTTzero.cc
7-
LIBRARIES
7+
CRTHitT0TaggingInfo.cc
8+
CRTHitT0TaggingTruthInfo.cc
9+
LIBRARIES
810
cetlib_except::cetlib_except
911
lardataobj::Simulation
12+
larcorealg::Geometry
1013
)
1114

1215
art_dictionary(DICTIONARY_LIBRARIES sbnobj::Common_CRT)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh"
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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_
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "sbnobj/Common/CRT/CRTHitT0TaggingTruthInfo.hh"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* @file sbnobj/Common/CRT/CRTHitT0TaggingTruthInfo.hh
3+
* @author Francesco Poppi (poppi@bo.infn.it)
4+
* @date January 2025
5+
*/
6+
7+
#ifndef SBNOBJ_COMMON_CRTHitT0TaggingTruthInfo_hh_
8+
#define SBNOBJ_COMMON_CRTHitT0TaggingTruthInfo_hh_
9+
10+
// C/C++ standard libraries
11+
#include <limits>
12+
13+
// -----------------------------------------------------------------------------
14+
namespace sbn::crt {
15+
struct CRTHitT0TaggingTruthInfo;
16+
}
17+
/**
18+
* @brief Truth information on the matching between CRT and TPC tracks.
19+
*
20+
*/
21+
struct sbn::crt::CRTHitT0TaggingTruthInfo {
22+
static constexpr double NoCoordinate = std::numeric_limits<double>::lowest();
23+
static constexpr int NoId = std::numeric_limits<int>::lowest();
24+
static constexpr int NoPdg = std::numeric_limits<int>::lowest();
25+
26+
/// Verify that the truth level information of the track were correctly retrieved.
27+
/// Default is false.
28+
bool truthFound = false;
29+
30+
/// Turth level information of the match.
31+
/// Default is false. For MC this information is filled if MC truth is available.
32+
bool truthMatch = false;
33+
34+
/// Truth information of the particle Geant4Id.
35+
int truthG4TrackId = NoId;
36+
37+
/// Truth information of the particle Pdg code.
38+
int truthTrackPdgCode = NoPdg;
39+
40+
/// Truth information if the particle is associated with the neutrino interaction
41+
/// or not (information from generator). Default is false.
42+
bool truthIsNu = false;
43+
44+
// --- END ---- Data members -------------------------------------------------
45+
46+
}; // sbn::crt::CRTHitT0TaggingTruthInfo
47+
48+
// -----------------------------------------------------------------------------
49+
50+
51+
#endif // SBNOBJ_COMMON_CRTHitT0TaggingTruthInfo_hh_

sbnobj/Common/CRT/classes.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#include "canvas/Persistency/Common/Wrapper.h"
22
#include "canvas/Persistency/Common/Assns.h"
3+
#include "lardataobj/RecoBase/Track.h"
4+
#include "lardataobj/RecoBase/PFParticle.h"
35
#include "lardataobj/AnalysisBase/T0.h"
46
#include "lardataobj/Simulation/AuxDetSimChannel.h"
7+
#include "lardataobj/RecoBase/Track.h"
8+
#include "lardataobj/RecoBase/PFParticle.h"
59
#include "sbnobj/Common/CRT/CRTHit.hh"
610
#include "sbnobj/Common/CRT/CRTTrack.hh"
711
#include "lardataobj/AnalysisBase/T0.h"
@@ -11,6 +15,8 @@
1115
#include "sbnobj/Common/CRT/CRTHit_Legacy.hh"
1216
#include "sbnobj/Common/CRT/CRTTrack_Legacy.hh"
1317
#include "sbnobj/Common/CRT/CRTTzero_Legacy.hh"
18+
#include "sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh"
19+
#include "sbnobj/Common/CRT/CRTHitT0TaggingTruthInfo.hh"
1420
#include <vector>
1521
#include <map>
1622
#include <utility>

sbnobj/Common/CRT/classes_def.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
</class>
1919
<class name="std::vector<sbn::crt::CRTTzero>"/>
2020
<class name="art::Wrapper< std::vector<sbn::crt::CRTTzero> >"/>
21+
2122

2223
<class name="sbn::crt::CRTTrack" ClassVersion="12">
2324
<version ClassVersion="12" checksum="197963098"/>
@@ -159,4 +160,34 @@
159160
<!--<class name="art::Assns<recob::OpFlash,sbn::crt::CRTHit,sbn::crt::CRTPMTMatchingInfo>"/>
160161
<class name="art::Wrapper<art::Assns<recob::OpFlash,sbn::crt::CRTHit,sbn::crt::CRTPMTMatchingInfo> >"/>
161162
<class name="art::Wrapper<art::Assns<sbn::crt::CRTHit,recob::OpFlash,sbn::crt::CRTPMTMatchingInfo> >"/>-->
163+
<!-- CRTT0Tagging Information -->
164+
<enum name="sbn::crt::CRTTaggingMethod"/>
165+
<enum name="sbn::crt::CRTTaggingTrackFit"/>
166+
<class name="sbn::crt::CRTHitT0TaggingInfo" ClassVersion="10">
167+
<version ClassVersion="10" checksum="836791263"/>
168+
</class>
169+
<class name="std::vector<sbn::crt::CRTHitT0TaggingInfo>"/>
170+
<class name="art::Wrapper<std::vector<sbn::crt::CRTHitT0TaggingInfo>>"/>
171+
172+
<class name="sbn::crt::CRTHitT0TaggingTruthInfo" ClassVersion="10">
173+
<version ClassVersion="10" checksum="443868831"/>
174+
</class>
175+
<class name="std::vector<sbn::crt::CRTHitT0TaggingTruthInfo>"/>
176+
<class name="art::Wrapper<std::vector<sbn::crt::CRTHitT0TaggingTruthInfo>>"/>
177+
178+
<class name="art::Assns<sbn::crt::CRTHitT0TaggingInfo , sbn::crt::CRTHitT0TaggingTruthInfo , void>"/>
179+
<class name="art::Assns<sbn::crt::CRTHitT0TaggingTruthInfo , sbn::crt::CRTHitT0TaggingInfo , void>"/>
180+
<class name="art::Wrapper<art::Assns<sbn::crt::CRTHitT0TaggingInfo , sbn::crt::CRTHitT0TaggingTruthInfo> >"/>
181+
<class name="art::Wrapper<art::Assns<sbn::crt::CRTHitT0TaggingTruthInfo , sbn::crt::CRTHitT0TaggingInfo> >"/>
182+
183+
<class name="art::Assns<recob::Track , sbn::crt::CRTHitT0TaggingInfo , void>"/>
184+
<class name="art::Wrapper<art::Assns<recob::Track , sbn::crt::CRTHitT0TaggingInfo>>"/>
185+
<class name="art::Assns<sbn::crt::CRTHitT0TaggingInfo , recob::Track, void>"/>
186+
<class name="art::Wrapper<art::Assns<sbn::crt::CRTHitT0TaggingInfo, recob::Track>>"/>
187+
188+
<class name="art::Assns<recob::PFParticle , sbn::crt::CRTHitT0TaggingInfo , void>"/>
189+
<class name="art::Wrapper<art::Assns<recob::PFParticle , sbn::crt::CRTHitT0TaggingInfo>>"/>
190+
<class name="art::Assns<sbn::crt::CRTHitT0TaggingInfo , recob::PFParticle, void>"/>
191+
<class name="art::Wrapper<art::Assns<sbn::crt::CRTHitT0TaggingInfo, recob::PFParticle>>"/>
192+
162193
</lcgdict>

sbnobj/Common/Calibration/TrackCaloSkimmerObj.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,17 @@ namespace sbn {
261261
std::vector<WireInfo> wires1; //!< List of wire information on plane 1
262262
std::vector<WireInfo> wires2; //!< List of wire information on plane 2
263263

264-
float t0; //!< T0 of track [ns]
265-
float t0CRT; //!< T0 of track from CRT-TPC matching [ns]
266-
int whicht0; //!< Which T0 producer was used to tag
264+
float t0PFP; //!< Particle-Flow-Particle (Pandora) T0. Derived from cathode crossing
265+
float t0CRTTrack; //!< t0 from CRT Track
266+
float t0CRTHit; //!< t0 from CRT Hit
267+
int whicht0; //!< Which T0 producer was used to tag. 0 is Pandora, 1 is CRTTrack 2 is CRTHit
267268
int id; //!< ID of track
268269
int cryostat; //!< Cryostat number of track
269270
bool clear_cosmic_muon; //!< Whether Pandora thinks the track is "clearly" a cosmic
270271
Vector3D start; //!< Start position of track [cm]
271272
Vector3D end; //!< End position of track [cm]
272273
Vector3D dir; //!< Direction of track
274+
Vector3D PCAdir; //!< Track Direction as fitted from PCA
273275
float length; //!< Length of track [cm]
274276

275277
float hit_min_time_p0_tpcE; //!< Min hit time of track on plane 0 TPC E
@@ -312,8 +314,9 @@ namespace sbn {
312314
TrackTruth truth; //!< Truth-matching information
313315

314316
TrackInfo():
315-
t0(-1),
316-
t0CRT(-1),
317+
t0PFP(std::numeric_limits<float>::lowest()),
318+
t0CRTTrack(std::numeric_limits<float>::lowest()),
319+
t0CRTHit(std::numeric_limits<float>::lowest()),
317320
id(-1),
318321
cryostat(-1),
319322
clear_cosmic_muon(false),

sbnobj/Common/Calibration/classes_def.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
<version ClassVersion="11" checksum="903476586"/>
1515
<version ClassVersion="10" checksum="118230262"/>
1616
</class>
17-
<class name="sbn::TrackInfo" ClassVersion="14">
17+
<class name="sbn::TrackInfo" ClassVersion="16">
18+
<version ClassVersion="16" checksum="2134249071"/>
19+
<version ClassVersion="15" checksum="1667792945"/>
1820
<version ClassVersion="14" checksum="3729960902"/>
1921
<version ClassVersion="13" checksum="1962204283"/>
2022
<version ClassVersion="12" checksum="2151440214"/>

0 commit comments

Comments
 (0)