Skip to content

Commit e61415e

Browse files
committed
Merge branch 'feature/hlay_crt_taggers' into master625+632
2 parents d82f548 + 3ab2514 commit e61415e

File tree

3 files changed

+13
-26
lines changed

3 files changed

+13
-26
lines changed

sbncode/CAFMaker/CAFMaker_module.cc

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,20 +1308,7 @@ template <class T, class U>
13081308
art::FindOneP<T> CAFMaker::FindOnePStrictSingle(const U& from,
13091309
const art::Event& evt,
13101310
const art::InputTag& tag) const {
1311-
std::vector<U> vec = { from };
1312-
1313-
art::FindOneP<T> ret(vec, evt, tag);
1314-
1315-
if (!tag.label().empty() && !ret.isValid() && fParams.StrictMode()) {
1316-
std::cout << "CAFMaker: No Assn from '"
1317-
<< cet::demangle_symbol(typeid(from).name()) << "' to '"
1318-
<< cet::demangle_symbol(typeid(T).name())
1319-
<< "' found under label '" << tag << "'. "
1320-
<< "Set 'StrictMode: false' to continue anyway." << std::endl;
1321-
abort();
1322-
}
1323-
1324-
return ret;
1311+
return FindOnePStrict<T>(std::vector{ from }, evt, tag);
13251312
}
13261313

13271314
//......................................................................
@@ -1824,7 +1811,7 @@ void CAFMaker::produce(art::Event& evt) noexcept {
18241811
for (unsigned i = 0; i < crtspacepoints.size(); i++) {
18251812
srcrtspacepoints.emplace_back();
18261813
const art::Ptr<sbnd::crt::CRTCluster> crtcluster = foCRTCluster.at(i);
1827-
FillCRTSpacePoint(crtspacepoints[i], crtcluster, srcrtspacepoints.back());
1814+
FillCRTSpacePoint(crtspacepoints[i], *crtcluster, srcrtspacepoints.back());
18281815
}
18291816
}
18301817

@@ -2548,10 +2535,10 @@ void CAFMaker::produce(art::Event& evt) noexcept {
25482535

25492536
art::FindOneP<sbnd::crt::CRTCluster> foCRTCluster =
25502537
FindOnePStrictSingle<sbnd::crt::CRTCluster>(crtspacepoint, evt, fParams.CRTSpacePointLabel());
2551-
const art::Ptr<sbnd::crt::CRTCluster> crtcluster = foCRTCluster.at(0);
2538+
const art::Ptr<sbnd::crt::CRTCluster>& crtcluster = foCRTCluster.at(0);
25522539

25532540
if(crtspacepoint.isNonnull())
2554-
FillTrackCRTSpacePoint(foCRTSpacePointMatch.data(iPart).ref(), crtspacepoint, crtcluster, trk);
2541+
FillTrackCRTSpacePoint(foCRTSpacePointMatch.data(iPart).ref(), *crtspacepoint, *crtcluster, trk);
25552542
}
25562543
if(foSBNDCRTTrackMatch.isValid() && fDet == kSBND)
25572544
{

sbncode/CAFMaker/FillReco.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ namespace caf
164164
}
165165

166166
void FillCRTSpacePoint(const sbnd::crt::CRTSpacePoint &spacepoint,
167-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
167+
const sbnd::crt::CRTCluster &cluster,
168168
caf::SRCRTSpacePoint &srspacepoint,
169169
bool allowEmpty)
170170
{
@@ -174,8 +174,8 @@ namespace caf
174174
srspacepoint.time = spacepoint.Ts0();
175175
srspacepoint.time_err = spacepoint.Ts0Err();
176176
srspacepoint.complete = spacepoint.Complete();
177-
srspacepoint.nhits = cluster->NHits();
178-
srspacepoint.tagger = cluster->Tagger();
177+
srspacepoint.nhits = cluster.NHits();
178+
srspacepoint.tagger = cluster.Tagger();
179179
}
180180

181181
void FillSBNDCRTTrack(const sbnd::crt::CRTTrack &track,
@@ -816,15 +816,15 @@ namespace caf
816816
}
817817

818818
void FillTrackCRTSpacePoint(const anab::T0 &t0match,
819-
const art::Ptr<sbnd::crt::CRTSpacePoint> &spacepointmatch,
820-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
819+
const sbnd::crt::CRTSpacePoint &spacepointmatch,
820+
const sbnd::crt::CRTCluster &cluster,
821821
caf::SRTrack &srtrack,
822822
bool allowEmpty)
823823
{
824824
srtrack.crtspacepoint.matched = true;
825825
srtrack.crtspacepoint.score = t0match.fTriggerConfidence;
826826

827-
FillCRTSpacePoint(*spacepointmatch, cluster, srtrack.crtspacepoint.spacepoint);
827+
FillCRTSpacePoint(spacepointmatch, cluster, srtrack.crtspacepoint.spacepoint);
828828
}
829829

830830
void FillTrackSBNDCRTTrack(const anab::T0 &t0match,

sbncode/CAFMaker/FillReco.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ namespace caf
206206
bool allowEmpty = false);
207207

208208
void FillTrackCRTSpacePoint(const anab::T0 &t0match,
209-
const art::Ptr<sbnd::crt::CRTSpacePoint> &spacepointmatch,
210-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
209+
const sbnd::crt::CRTSpacePoint &spacepointmatch,
210+
const sbnd::crt::CRTCluster &cluster,
211211
caf::SRTrack &srtrack,
212212
bool allowEmpty = false);
213213

@@ -279,7 +279,7 @@ namespace caf
279279
bool allowEmpty = false);
280280

281281
void FillCRTSpacePoint(const sbnd::crt::CRTSpacePoint &spacepoint,
282-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
282+
const sbnd::crt::CRTCluster &cluster,
283283
caf::SRCRTSpacePoint &srspacepoint,
284284
bool allowEmpty = false);
285285

0 commit comments

Comments
 (0)