LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CheatingVertexSelectionAlgorithm.cc
Go to the documentation of this file.
1 
9 #include "Pandora/AlgorithmHeaders.h"
10 
12 
13 using namespace pandora;
14 
15 namespace lar_content
16 {
17 
18 void CheatingVertexSelectionAlgorithm::GetVertexScoreList(const VertexVector &vertexVector, const BeamConstants & /*beamConstants*/,
19  HitKDTree2D & /*kdTreeU*/, HitKDTree2D & /*kdTreeV*/, HitKDTree2D & /*kdTreeW*/, VertexScoreList &vertexScoreList) const
20 {
21  const Vertex *pBestVertex(nullptr);
22  float bestVertexDr(std::numeric_limits<float>::max());
23  this->GetBestVertex(vertexVector, pBestVertex, bestVertexDr);
24  if (pBestVertex)
25  vertexScoreList.emplace_back(pBestVertex, 1.0f);
26 }
27 
28 //------------------------------------------------------------------------------------------------------------------------------------------
29 
30 StatusCode CheatingVertexSelectionAlgorithm::ReadSettings(const TiXmlHandle xmlHandle)
31 {
32  // ATTN : Need access to base class member variables at this point, so call read settings prior to end of this function
33  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, TrainedVertexSelectionAlgorithm::ReadSettings(xmlHandle));
34 
35  if (m_mcParticleListName.empty())
36  {
37  std::cout << "CheatingVertexSelectionAlgorithm: MCParticleListName required for cheated vertex selection" << std::endl;
38  return STATUS_CODE_INVALID_PARAMETER;
39  }
40 
41  return STATUS_CODE_SUCCESS;
42 }
43 
44 } // namespace lar_content
TFile f
Definition: plotHisto.C:6
Header file for the cheating vertex selection algorithm class.
std::vector< art::Ptr< recob::Vertex > > VertexVector
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25