Set up the test beam vertex.
108 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::RemoveFromPfo(*
this, pTestBeamPfo, pInitialVertex));
109 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete<Vertex>(*
this, pInitialVertex,
m_daughterVertexListName));
111 catch (
const StatusCodeException &)
113 std::cout <<
"TestBeamParticleCreationAlgorithm::SetupTestBeamVertex - Test beam particle has no initial vertex" <<
std::endl;
119 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CreateTemporaryListAndSetCurrent(*
this, pVertexList, vertexListName));
121 PandoraContentApi::Vertex::Parameters parameters;
122 parameters.m_position = testBeamStartVertex;
123 parameters.m_vertexLabel = VERTEX_START;
124 parameters.m_vertexType = VERTEX_3D;
125 const Vertex *pTestBeamStartVertex(
nullptr);
126 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Vertex::Create(*
this, parameters, pTestBeamStartVertex));
127 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SaveList<Vertex>(*
this,
m_parentVertexListName));
128 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::AddToPfo(*
this, pTestBeamPfo, pTestBeamStartVertex));
134 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::RemoveFromPfo(*
this, pNuPfo, pNuVertex));
135 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::AddToPfo(*
this, pTestBeamPfo, pNuVertex));
138 catch (
const StatusCodeException &)
140 std::cout <<
"TestBeamParticleCreationAlgorithm::SetupTestBeamVertex - Cannot transfer interaction vertex to test beam particle" <<
std::endl;
143 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ReplaceCurrentList<Vertex>(*
this,
m_parentVertexListName));
144 return STATUS_CODE_SUCCESS;
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
std::string m_daughterVertexListName
The daughter vertex list name.
std::string m_parentVertexListName
The parent vertex list name.
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
std::list< Vertex > VertexList
QTextStream & endl(QTextStream &s)