LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SimpleBeamParticleId_tool.cc
Go to the documentation of this file.
1 
9 
12 
13 namespace lar_pandora {
14 
19  public:
26 
33  void ClassifySlices(SliceVector& slices, const art::Event& evt) override;
34 
35  private:
36  float m_minBDTScore;
37  };
38 
40 
41 } // namespace lar_pandora
42 
43 //------------------------------------------------------------------------------------------------------------------------------------------
44 // implementation follows
45 
46 namespace lar_pandora {
47 
49  : m_minBDTScore(pset.get<float>("MinBDTScore"))
50  {}
51 
52  //------------------------------------------------------------------------------------------------------------------------------------------
53 
55  {
56  for (Slice& slice : slices) {
57  if (slice.GetTopologicalScore() > m_minBDTScore) slice.TagAsTarget();
58  }
59  }
60 
61 } // namespace lar_pandora
Slice class.
Definition: Slice.h:17
Abstract base class for a slice ID tool.
#define DEFINE_ART_CLASS_TOOL(tool)
Definition: ToolMacros.h:42
SimpleBeamParticleId(fhicl::ParameterSet const &pset)
Default constructor.
header for the lar pandora slice ID base tool
void ClassifySlices(SliceVector &slices, const art::Event &evt) override
Classify slices as neutrino or cosmic.
std::vector< TCSlice > slices
Definition: DataStructs.cxx:13
float m_minBDTScore
The minimum BDT score to select a slice as a beam particle.
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
Definition: StdUtils.h:120
std::vector< Slice > SliceVector
Definition: Slice.h:70
header for the lar pandora slice class
Simple beam particle ID tool that selects the most likely beam particle slice using the scores from P...
TCEvent evt
Definition: DataStructs.cxx:8