Skip to content

Commit deb9088

Browse files
committed
use NuGraphCategory enum and add more vars
1 parent d483222 commit deb9088

1 file changed

Lines changed: 39 additions & 12 deletions

File tree

sbncode/CAFMaker/FillReco.cxx

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,13 @@ namespace caf
611611
// NuGraph2 plane-by-plane slice variables
612612
for (unsigned int plane = 0; plane < 3; ++plane) {
613613

614-
int nHIPHits = 0; ///< HIP tagging at interaction vertex
615-
int nShrHits = 0; ///< shower hits in the slice
616-
int nUnclusteredShrHits = 0; ///< shower hits in the slice not belonging to a PFP
614+
int nMIPHits = 0; ///< `MIP` hits in the slice
615+
int nHIPHits = 0; ///< `HIP` hits in the slice
616+
int nShrHits = 0; ///< `Shower` hits in the slice
617+
int nMhlHits = 0; ///< `Michel` hits in the slice
618+
int nDifHits = 0; ///< `Diffuse` hits in the slice
619+
int nVtxHIPHits = 0; ///< `HIP` hits in the slice around the vertex
620+
int nUnclusteredShrHits = 0; ///< `Shower` hits in the slice not belonging to a PFP
617621

618622
for ( unsigned int i = 0; i < nHits; i++ ) {
619623
const recob::Hit& hit = *inputHits.at(i);
@@ -629,28 +633,51 @@ namespace caf
629633
std::max_element(semVec.begin(), semVec.end())
630634
);
631635

632-
// HIP tagging
633-
float dwire = std::abs(float(hit.WireID().Wire) - vtx_wire[plane]);
634-
float dtick = std::abs(hit.PeakTime() - vtx_tick[plane]);
635-
if ((highestScoreIdx == 1) && (dwire <= vtx_wire_dist) && (dtick <= vtx_tick_dist))
636+
// `MIP` hits
637+
if (highestScoreIdx == SRNuGraphScore::NuGraphCategory::MIP) {
638+
nMIPHits += 1;
639+
}
640+
641+
// `HIP` hits
642+
if (highestScoreIdx == SRNuGraphScore::NuGraphCategory::HIP) {
636643
nHIPHits += 1;
637644

638-
// shower hits
639-
if (highestScoreIdx == 2) {
645+
// `HIP` hits at vertex
646+
float dwire = std::abs(float(hit.WireID().Wire) - vtx_wire[plane]);
647+
float dtick = std::abs(hit.PeakTime() - vtx_tick[plane]);
648+
if ((dwire <= vtx_wire_dist) && (dtick <= vtx_tick_dist)) {
649+
nVtxHIPHits += 1;
650+
}
651+
}
640652

641-
// all shower hits
653+
// `Shower` hits
654+
if (highestScoreIdx == SRNuGraphScore::NuGraphCategory::Shower) {
642655
nShrHits += 1;
643656

644-
// unclustered shower hits
657+
// `Shower` hits not clustered by Pandora
645658
art::Ptr<recob::Hit> hitPtr = inputHits.at(i);
646659
if (pfpHitSet.find(hitPtr) == pfpHitSet.end()) {
647660
nUnclusteredShrHits += 1;
648661
}
649662
}
663+
664+
// `Michel` hits
665+
if (highestScoreIdx == SRNuGraphScore::NuGraphCategory::Michel) {
666+
nMhlHits += 1;
667+
}
668+
669+
// `Diffuse` hits
670+
if (highestScoreIdx == SRNuGraphScore::NuGraphCategory::Diffuse) {
671+
nDifHits += 1;
672+
}
650673
}
651674

652-
slice.ng_plane[plane].ng_vtx_hip_hits = nHIPHits;
675+
slice.ng_plane[plane].mip_hits = nMIPHits;
676+
slice.ng_plane[plane].hip_hits = nHIPHits;
653677
slice.ng_plane[plane].shr_hits = nShrHits;
678+
slice.ng_plane[plane].mhl_hits = nMhlHits;
679+
slice.ng_plane[plane].dif_hits = nDifHits;
680+
slice.ng_plane[plane].ng_vtx_hip_hits = nVtxHIPHits;
654681
slice.ng_plane[plane].unclustered_shr_hits = nUnclusteredShrHits;
655682
}
656683
}

0 commit comments

Comments
 (0)