9 #include "Pandora/AlgorithmHeaders.h" 22 CheatingSecondaryVertexAlgorithm::CheatingSecondaryVertexAlgorithm() :
23 m_inputCaloHitListName(
"CaloHitList2D")
31 const CaloHitList *pCaloHitList2D{
nullptr};
32 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*
this,
m_inputCaloHitListName, pCaloHitList2D));
36 CartesianPointVector vertices;
40 std::string temporaryListName;
41 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CreateTemporaryListAndSetCurrent(*
this, pVertexList, temporaryListName));
43 for (
const CartesianVector &position : vertices)
45 PandoraContentApi::Vertex::Parameters parameters;
46 parameters.m_position = position;
47 parameters.m_vertexLabel = VERTEX_INTERACTION;
48 parameters.m_vertexType = VERTEX_3D;
50 const Vertex *pVertex(
nullptr);
51 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Vertex::Create(*
this, parameters, pVertex));
53 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SaveList<Vertex>(*
this,
m_outputVertexListName));
55 return STATUS_CODE_SUCCESS;
62 PANDORA_RETURN_RESULT_IF_AND_IF(
63 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"CaloHitList2D",
m_inputCaloHitListName));
64 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle,
"OutputVertexListName",
m_outputVertexListName));
66 return STATUS_CODE_SUCCESS;
Header file for the cheating vertex creation algorithm class.
pandora::StatusCode Run()
std::string m_outputVertexListName
The name under which to save the output vertex list.
void GetVertices(pandora::CartesianPointVector &vertices) const
Extract the clear topological vertices from the event.
void ConstructVisibleHierarchy()
Construct a particle hierarchy based on the key topological features in an event. ...
Header file for lar event topology.
Header file for the geometry helper class.
Header file for the lar monte carlo particle helper helper class.
std::string m_inputCaloHitListName
The name of the input calo hit list.
void PruneHierarchy()
Fold or remove particles that aren't substantive parts of the hierarchy.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
std::list< Vertex > VertexList