Skip to content

Commit b62c15d

Browse files
committed
Merge branch 'release/v10_06_00'
2 parents 7cbf66a + 177d467 commit b62c15d

7 files changed

Lines changed: 47 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
1717

1818
find_package(cetmodules 3.20.00 REQUIRED)
19-
project(sbncode VERSION 10.05.00 LANGUAGES CXX)
19+
project(sbncode VERSION 10.06.00 LANGUAGES CXX)
2020

2121
message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================")
2222

sbncode/CAFMaker/CAFMakerParams.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ namespace caf
278278
"pandoraTrackCRTHit"
279279
};
280280

281+
Atom<string> CRTHitMatchInfoLabel {
282+
Name("CRTHitMatchInfoLabel"),
283+
Comment("Base label of additional information on track to CRT hit matching producer."),
284+
"CRTT0Tagging"
285+
};
286+
281287
Atom<string> CRTTrackMatchLabel {
282288
Name("CRTTrackMatchLabel"),
283289
Comment("Base label of track to CRT track matching producer."),

sbncode/CAFMaker/CAFMaker_module.cc

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
#include "nusimdata/SimulationBase/MCNeutrino.h"
102102
#include "nusimdata/SimulationBase/GTruth.h"
103103

104+
#include "sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh"
104105
#include "sbnobj/Common/EventGen/MeVPrtl/MeVPrtlTruth.h"
105106
#include "sbnobj/Common/Reco/RangeP.h"
106107
#include "sbnobj/Common/SBNEventWeight/EventWeightMap.h"
@@ -1950,9 +1951,14 @@ void CAFMaker::produce(art::Event& evt) noexcept {
19501951

19511952
// NOTE: The sbn::crt::CRTHit is associated to the T0. It's a bit awkward to
19521953
// access that here, so we do it per-track (see code where fmCRTHitMatch is accessed below)
1954+
19531955
art::FindManyP<anab::T0> fmCRTHitMatch =
19541956
FindManyPStrict<anab::T0>(slcTracks, evt,
1955-
fParams.CRTHitMatchLabel() + slice_tag_suff);
1957+
fParams.CRTHitMatchLabel());
1958+
1959+
art::FindManyP<sbn::crt::CRTHitT0TaggingInfo> fmCRTHitMatchInfo =
1960+
FindManyPStrict<sbn::crt::CRTHitT0TaggingInfo>(slcTracks, evt,
1961+
fParams.CRTHitMatchInfoLabel());
19561962

19571963
// TODO: also save the sbn::crt::CRTTrack in the matching so that CAFMaker has access to it
19581964
art::FindManyP<anab::T0> fmCRTTrackMatch =
@@ -2191,14 +2197,19 @@ void CAFMaker::produce(art::Event& evt) noexcept {
21912197
fParams.TrackHitFillRRStartCut(), fParams.TrackHitFillRREndCut(),
21922198
dprop, trk);
21932199
}
2200+
21942201
if (fmCRTHitMatch.isValid() && fDet == kICARUS) {
21952202
art::FindManyP<sbn::crt::CRTHit> CRTT02Hit = FindManyPStrict<sbn::crt::CRTHit>
2196-
(fmCRTHitMatch.at(iPart), evt, fParams.CRTHitMatchLabel() + slice_tag_suff);
2203+
(fmCRTHitMatch.at(iPart), evt, fParams.CRTHitMatchLabel());
21972204

21982205
std::vector<art::Ptr<sbn::crt::CRTHit>> crthitmatch;
2199-
if (CRTT02Hit.isValid() && CRTT02Hit.size() == 1) crthitmatch = CRTT02Hit.at(0);
2200-
2201-
FillTrackCRTHit(fmCRTHitMatch.at(iPart), crthitmatch, fParams.CRTUseTS0(), CRT_T0_reference_time, CRT_T1_reference_time, trk);
2206+
std::vector<art::Ptr<sbn::crt::CRTHitT0TaggingInfo>> crthittagginginfo;
2207+
if(CRTT02Hit.isValid() && CRTT02Hit.size() == 1){
2208+
crthitmatch = CRTT02Hit.at(0);
2209+
crthittagginginfo = fmCRTHitMatchInfo.at(iPart);
2210+
}
2211+
2212+
FillTrackCRTHit(fmCRTHitMatch.at(iPart), crthitmatch, crthittagginginfo, fParams.CRTUseTS0(), CRT_T0_reference_time, CRT_T1_reference_time, trk);
22022213
}
22032214
// NOTE: SEE TODO AT fmCRTTrackMatch
22042215
if (fmCRTTrackMatch.isValid() && fDet == kICARUS) {

sbncode/CAFMaker/FillReco.cxx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,18 +581,37 @@ namespace caf
581581

582582
//......................................................................
583583

584+
584585
void FillTrackCRTHit(const std::vector<art::Ptr<anab::T0>> &t0match,
585586
const std::vector<art::Ptr<sbn::crt::CRTHit>> &hitmatch,
587+
const std::vector<art::Ptr<sbn::crt::CRTHitT0TaggingInfo>> &hitmatchinfo,
586588
bool use_ts0,
587589
int64_t CRT_T0_reference_time, // ns, signed
588590
double CRT_T1_reference_time, // us
589591
caf::SRTrack &srtrack,
590592
bool allowEmpty)
591593
{
594+
// Francesco Poppi: In the current implementation, hitmatch and hitmatchinfo are
595+
// vectors of pointers, but currently they are vector of size 1.
596+
// The reason behind the current implementation is that we only store the
597+
// best CRT candidate in the selection, eventually, we can store a vector
598+
// of "good" candidates and fill additional infos for all of them.
599+
// This is a TODO.
592600
if (t0match.size()) {
593601
assert(t0match.size() == 1);
594602
srtrack.crthit.distance = t0match[0]->fTriggerConfidence;
603+
srtrack.crthit.region = t0match[0]->fID;
604+
srtrack.crthit.sys = t0match[0]->fTriggerBits;
605+
if(hitmatchinfo.size() == 1){
606+
srtrack.crthit.deltaX = hitmatchinfo[0]->DeltaX;
607+
srtrack.crthit.deltaY = hitmatchinfo[0]->DeltaY;
608+
srtrack.crthit.deltaZ = hitmatchinfo[0]->DeltaZ;
609+
srtrack.crthit.crossX = hitmatchinfo[0]->CrossX;
610+
srtrack.crthit.crossY = hitmatchinfo[0]->CrossY;
611+
srtrack.crthit.crossZ = hitmatchinfo[0]->CrossZ;
612+
}
595613
srtrack.crthit.hit.time = t0match[0]->fTime / 1e3; /* ns -> us */
614+
srtrack.crthit.hit.plane = t0match[0]->fID;
596615
}
597616
if (hitmatch.size()) {
598617
FillCRTHit(*hitmatch[0], use_ts0, CRT_T0_reference_time, CRT_T1_reference_time, srtrack.crthit.hit, allowEmpty);

sbncode/CAFMaker/FillReco.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "sbnobj/SBND/CRT/CRTSpacePoint.hh"
4141
#include "sbnobj/SBND/CRT/CRTTrack.hh"
4242
#include "sbnobj/Common/CRT/CRTPMTMatching.hh"
43+
#include "sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh"
4344
#include "nusimdata/SimulationBase/MCParticle.h"
4445
#include "nusimdata/SimulationBase/MCTruth.h"
4546

@@ -132,6 +133,7 @@ namespace caf
132133

133134
void FillTrackCRTHit(const std::vector<art::Ptr<anab::T0>> &t0match,
134135
const std::vector<art::Ptr<sbn::crt::CRTHit>> &hitmatch,
136+
const std::vector<art::Ptr<sbn::crt::CRTHitT0TaggingInfo>> &hitmatchinfo,
135137
bool use_ts0,
136138
int64_t CRT_T0_reference_time, // ns, signed
137139
double CRT_T1_reference_time, // us

sbncode/HitFinder/ChannelROIToWire_module.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void ChannelROIToWire::produce(art::Event& evt)
141141

142142
std::vector<float> dataVec(range.data().size());
143143

144-
for(size_t binIdx = 0; binIdx < range.data().size(); binIdx++) dataVec[binIdx] = std::round(range.data()[binIdx] * ADCScaleFactor);
144+
for(size_t binIdx = 0; binIdx < range.data().size(); binIdx++) dataVec[binIdx] = std::round(range.data()[binIdx] / ADCScaleFactor);
145145

146146
ROIVec.add_range(startTick, std::move(dataVec));
147147
}

ups/product_deps

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ libdir fq_dir lib
254254
product version qual flags <table_format=2>
255255
genie_xsec v3_04_00 -
256256
larcv2 v2_2_6 -
257-
larsoft v10_05_00 -
258-
sbnalg v10_05_00 -
257+
larsoft v10_06_00 -
258+
sbnalg v10_06_00 -
259259
sbndaq_artdaq_core v1_10_06 -
260260
sbndata v01_07 -
261261
systematicstools v01_04_04 -

0 commit comments

Comments
 (0)