Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
SimpleBeamParticleId_tool.cc
Go to the documentation of this file.
1
7#include "art/Utilities/ToolMacros.h"
8#include "fhiclcpp/ParameterSet.h"
9
12
13namespace lar_pandora {
14
19 public:
25 SimpleBeamParticleId(fhicl::ParameterSet const& pset);
26
33 void ClassifySlices(SliceVector& slices, const art::Event& evt) override;
34
35 private:
37 };
38
39 DEFINE_ART_CLASS_TOOL(SimpleBeamParticleId)
40
41} // namespace lar_pandora
42
43//------------------------------------------------------------------------------------------------------------------------------------------
44// implementation follows
45
46namespace lar_pandora {
47
48 SimpleBeamParticleId::SimpleBeamParticleId(fhicl::ParameterSet const& pset)
49 : m_minBDTScore(pset.get<float>("MinBDTScore"))
50 {}
51
52 //------------------------------------------------------------------------------------------------------------------------------------------
53
54 void SimpleBeamParticleId::ClassifySlices(SliceVector& slices, const art::Event& /*evt*/)
55 {
56 for (Slice& slice : slices) {
57 if (slice.GetTopologicalScore() > m_minBDTScore) slice.TagAsTarget();
58 }
59 }
60
61} // namespace lar_pandora
header for the lar pandora slice class
header for the lar pandora slice ID base tool
Simple beam particle ID tool that selects the most likely beam particle slice using the scores from P...
float m_minBDTScore
The minimum BDT score to select a slice as a beam particle.
SimpleBeamParticleId(fhicl::ParameterSet const &pset)
Default constructor.
void ClassifySlices(SliceVector &slices, const art::Event &evt) override
Classify slices as neutrino or cosmic.
Slice class.
Definition Slice.h:17
Abstract base class for a slice ID tool.
std::vector< Slice > SliceVector
Definition Slice.h:70