Skip to content

Commit 612ae6a

Browse files
committed
move HIP tagging params to fcl
1 parent 98a4654 commit 612ae6a

4 files changed

Lines changed: 28 additions & 8 deletions

File tree

sbncode/CAFMaker/CAFMakerParams.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,18 @@ namespace caf
373373
Comment("Whether to use the second pass Pandora outputs for NuGraph reco."),
374374
false
375375
};
376+
377+
Atom<float> NuGraphHIPTagWireDist {
378+
Name("NuGraphHIPTagWireDist"),
379+
Comment("TPC wire distance from the vertex used to count NuGraph2–tagged HIP hits."),
380+
10
381+
};
382+
383+
Atom<float> NuGraphHIPTagTickDist {
384+
Name("NuGraphHIPTagTickDist"),
385+
Comment("TPC tick distance from the vertex used to count NuGraph-2–tagged HIP hits."),
386+
50
387+
};
376388

377389
Atom<string> OpFlashLabel {
378390
Name("OpFlashLabel"),

sbncode/CAFMaker/CAFMaker_module.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2127,7 +2127,9 @@ void CAFMaker::produce(art::Event& evt) noexcept {
21272127
}
21282128

21292129
if (ng2_filter_vec.size() > 0 || ng2_semantic_vec.size() > 0) {
2130-
FillSliceNuGraph(slcHits, ng2_filter_vec, ng2_semantic_vec, fmPFPartHits, vtx_wire, vtx_tick, recslc);
2130+
FillSliceNuGraph(slcHits, ng2_filter_vec, ng2_semantic_vec, fmPFPartHits,
2131+
vtx_wire, vtx_tick, fParams.NuGraphHIPTagWireDist(), fParams.NuGraphHIPTagTickDist(),
2132+
recslc);
21312133
}
21322134
}
21332135

sbncode/CAFMaker/FillReco.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,8 @@ namespace caf
586586
const std::vector<std::vector<art::Ptr<recob::Hit>>> &fmPFPartHits,
587587
const float vtx_wire[3],
588588
const float vtx_tick[3],
589+
const float vtx_wire_dist,
590+
const float vtx_tick_dist,
589591
caf::SRSlice &slice)
590592
{
591593

@@ -628,7 +630,7 @@ namespace caf
628630
// HIP tagging
629631
float dwire = std::abs(float(hit.WireID().Wire) - vtx_wire[plane]);
630632
float dtick = std::abs(hit.PeakTime() - vtx_tick[plane]);
631-
if ((highestScoreIdx == 1) && (dwire <= 10) && (dtick <= 50))
633+
if ((highestScoreIdx == 1) && (dwire <= vtx_wire_dist) && (dtick <= vtx_tick_dist))
632634
nHIPHits += 1;
633635

634636
// shower hits

sbncode/CAFMaker/FillReco.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,21 @@ namespace caf
114114
* @param fmPFPartHits vector of pointers-to-hits lists, for each PFP
115115
* @param vtx_wire vertex coordinates projected onto wires, per plane
116116
* @param vtx_tick vertex coordinates projected onto ticks, per plane
117+
* @param vtx_wire_dist TPC wire distance from the vertex used to count NuGraph2–tagged HIP hits
118+
* @param vtx_tick_dist TPC tick distance from the vertex used to count NuGraph2–tagged HIP hits
117119
* @param[out] slice the destination slice object
118120
*
119121
* Hits with filter value (`ngFilterResult`) lower than `ng_filter_cut` are counted as background.
120122
*/
121123
void FillSliceNuGraph(const std::vector<art::Ptr<recob::Hit>> &inputHits,
122-
const std::vector<art::Ptr<anab::FeatureVector<1>>> &ngFilterResult,
123-
const std::vector<art::Ptr<anab::FeatureVector<5>>> &ngSemanticResult,
124-
const std::vector<std::vector<art::Ptr<recob::Hit>>> &fmPFPartHits,
125-
const float vtx_wire[3],
126-
const float vtx_tick[3],
127-
caf::SRSlice &slice);
124+
const std::vector<art::Ptr<anab::FeatureVector<1>>> &ngFilterResult,
125+
const std::vector<art::Ptr<anab::FeatureVector<5>>> &ngSemanticResult,
126+
const std::vector<std::vector<art::Ptr<recob::Hit>>> &fmPFPartHits,
127+
const float vtx_wire[3],
128+
const float vtx_tick[3],
129+
const float vtx_wire_dist,
130+
const float vtx_tick_dist,
131+
caf::SRSlice &slice);
128132

129133
bool SelectSlice(const caf::SRSlice &slice, bool cut_clear_cosmic);
130134

0 commit comments

Comments
 (0)