LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_pandora::SimpleNeutrinoId Class Reference

Simple neutrino ID tool that selects the most likely neutrino slice using the scores from Pandora. More...

Inheritance diagram for lar_pandora::SimpleNeutrinoId:
lar_pandora::SliceIdBaseTool

Public Member Functions

 SimpleNeutrinoId (fhicl::ParameterSet const &pset)
 Default constructor. More...
 
void ClassifySlices (SliceVector &slices, const art::Event &evt) override
 Classify slices as neutrino or cosmic. More...
 

Detailed Description

Simple neutrino ID tool that selects the most likely neutrino slice using the scores from Pandora.

Definition at line 18 of file SimpleNeutrinoId_tool.cc.

Constructor & Destructor Documentation

lar_pandora::SimpleNeutrinoId::SimpleNeutrinoId ( fhicl::ParameterSet const &  pset)

Default constructor.

Parameters
psetFHiCL parameter set

Definition at line 45 of file SimpleNeutrinoId_tool.cc.

45 {}

Member Function Documentation

void lar_pandora::SimpleNeutrinoId::ClassifySlices ( SliceVector slices,
const art::Event evt 
)
overridevirtual

Classify slices as neutrino or cosmic.

Parameters
slicesthe input vector of slices to classify
evtthe art event

Implements lar_pandora::SliceIdBaseTool.

Definition at line 49 of file SimpleNeutrinoId_tool.cc.

50  {
51  if (slices.empty()) return;
52 
53  // Find the most probable slice
54  float highestNuScore(-std::numeric_limits<float>::max());
55  unsigned int mostProbableSliceIndex(std::numeric_limits<unsigned int>::max());
56 
57  for (unsigned int sliceIndex = 0; sliceIndex < slices.size(); ++sliceIndex) {
58  const float nuScore(slices.at(sliceIndex).GetTopologicalScore());
59  if (nuScore > highestNuScore) {
60  highestNuScore = nuScore;
61  mostProbableSliceIndex = sliceIndex;
62  }
63  }
64 
65  // Tag the most probable slice as a neutrino
66  slices.at(mostProbableSliceIndex).TagAsTarget();
67  }
std::vector< TCSlice > slices
Definition: DataStructs.cxx:13

The documentation for this class was generated from the following file: