SimpleBeamParticleId_tool.cc
Go to the documentation of this file.
1 /**
2  * @file larpandora/LArPandoraEventBuilding/LArPandoraSimpleBeamParticleId_tool.cc
3  *
4  * @brief implementation of the lar pandora simple beam particle id tool
5  */
6 
9 
12 
13 namespace lar_pandora
14 {
15 
16 /**
17  * @brief Simple beam particle ID tool that selects the most likely beam particle slice using the scores from Pandora
18  */
20 {
21 public:
22  /**
23  * @brief Default constructor
24  *
25  * @param pset FHiCL parameter set
26  */
28 
29  /**
30  * @brief Classify slices as neutrino or cosmic
31  *
32  * @param slices the input vector of slices to classify
33  * @param evt the art event
34  */
35  void ClassifySlices(SliceVector &slices, const art::Event &evt) override;
36 
37 private:
38  float m_minBDTScore; ///< The minimum BDT score to select a slice as a beam particle
39 
40 };
41 
43 
44 } // namespace lar_pandora
45 
46 //------------------------------------------------------------------------------------------------------------------------------------------
47 // implementation follows
48 
49 namespace lar_pandora
50 {
51 
53  m_minBDTScore(pset.get<float>("MinBDTScore"))
54 {
55 }
56 
57 //------------------------------------------------------------------------------------------------------------------------------------------
58 
60 {
61  for (Slice &slice : slices)
62  {
63  if (slice.GetTopologicalScore() > m_minBDTScore)
64  slice.TagAsTarget();
65  }
66 }
67 
68 } // namespace lar_pandora
Slice class.
Definition: Slice.h:18
Abstract base class for a slice ID tool.
#define DEFINE_ART_CLASS_TOOL(tool)
Definition: ToolMacros.h:42
header for the lar pandora slice ID base tool
SimpleBeamParticleId(fhicl::ParameterSet const &pset)
Default constructor.
header for the lar pandora slice class
void ClassifySlices(SliceVector &slices, const art::Event &evt) override
Classify slices as neutrino or cosmic.
std::vector< TCSlice > slices
Definition: DataStructs.cxx:12
float m_minBDTScore
The minimum BDT score to select a slice as a beam particle.
std::vector< Slice > SliceVector
Definition: Slice.h:68
Simple beam particle ID tool that selects the most likely beam particle slice using the scores from P...
TCEvent evt
Definition: DataStructs.cxx:7
auto const & get(AssnsNode< L, R, D > const &r)
Definition: AssnsNode.h:115