Skip to content

Commit 78a0667

Browse files
committed
FEATURE: implemented CAFMaker compatibility with PandoraAfterNuGraph.
1 parent 762e6ed commit 78a0667

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

sbncode/CAFMaker/CAFMakerParams.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,12 @@ namespace caf
368368
"" //Empty by default, please set to e.g. art::InputTag("NuGraph","semantic")
369369
};
370370

371+
Atom<bool> UsePandoraAfterNuGraph {
372+
Name("UsePandoraAfterNuGraph"),
373+
Comment("Whether to use the second pass Pandora outputs for NuGraph reco."),
374+
false
375+
};
376+
371377
Atom<string> OpFlashLabel {
372378
Name("OpFlashLabel"),
373379
Comment("Label of PMT flash."),

sbncode/CAFMaker/CAFMaker_module.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,8 +1727,10 @@ void CAFMaker::produce(art::Event& evt) noexcept {
17271727
GetByLabelStrict(evt, fParams.PFParticleLabel() + pandora_tag_suffix, thisSlices);
17281728
if (thisSlices.isValid()) {
17291729
art::fill_ptr_vector(slices, thisSlices);
1730-
const std::vector<art::Ptr<recob::Slice>>& tempNuGraphSlices = evt.getProduct<std::vector<art::Ptr<recob::Slice>>>(fParams.NuGraphSlicesLabel().label() + pandora_tag_suffix);
1731-
nuGraphSlices.insert(nuGraphSlices.end(), tempNuGraphSlices.begin(), tempNuGraphSlices.end());
1730+
nuGraphSlices = evt.getProduct<std::vector<art::Ptr<recob::Slice>>>(fParams.NuGraphSlicesLabel().label() + pandora_tag_suffix);
1731+
if (fParams.UsePandoraAfterNuGraph()) {
1732+
nuGraphSlices = slices;
1733+
}
17321734
for (unsigned i = 0; i < thisSlices->size(); i++) {
17331735
slice_tag_suffixes.push_back(pandora_tag_suffix);
17341736
slice_tag_indices.push_back(i_tag);

0 commit comments

Comments
 (0)