LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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::NeutrinoIdBaseTool

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 19 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 48 of file SimpleNeutrinoId_tool.cc.

49 {
50 }

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::NeutrinoIdBaseTool.

Definition at line 54 of file SimpleNeutrinoId_tool.cc.

References max.

55 {
56  if (slices.empty()) return;
57 
58  // Find the most probable slice
59  float highestNuScore(-std::numeric_limits<float>::max());
60  unsigned int mostProbableSliceIndex(std::numeric_limits<unsigned int>::max());
61 
62  for (unsigned int sliceIndex = 0; sliceIndex < slices.size(); ++sliceIndex)
63  {
64  const float nuScore(slices.at(sliceIndex).GetNeutrinoScore());
65  std::cout << "Slice " << sliceIndex << " - " << nuScore << std::endl;
66  if (nuScore > highestNuScore)
67  {
68  highestNuScore = nuScore;
69  mostProbableSliceIndex = sliceIndex;
70  }
71  }
72 
73  std::cout << "Tagging slice " << mostProbableSliceIndex << std::endl;
74 
75  // Tag the most probable slice as a neutrino
76  slices.at(mostProbableSliceIndex).TagAsNeutrino();
77 }
Int_t max
Definition: plot.C:27
std::vector< TCSlice > slices
Definition: DataStructs.cxx:10

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