CheatingVertexSelectionAlgorithm.cc
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArCheating/CheatingVertexSelectionAlgorithm.cc
3  *
4  * @brief Implementation of the cheating vertex selection algorithm class.
5  *
6  * $Log: $
7  */
8 
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
Header file for the cheating vertex selection algorithm class.
static int max(int a, int b)
std::vector< art::Ptr< recob::Vertex > > VertexVector
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
QTextStream & endl(QTextStream &s)