28 std::cout <<
"CustomParticleCreationAlgorithm: cannot find pfo list " <<
m_pfoListName << std::endl;
30 return STATUS_CODE_SUCCESS;
39 std::cout <<
"CustomParticleCreationAlgorithm: cannot find vertex list " <<
m_vertexListName << std::endl;
41 return STATUS_CODE_SUCCESS;
45 const PfoList *pTempPfoList = NULL;
46 std::string tempPfoListName;
50 std::string tempVertexListName;
54 PfoList pfoList(pPfoList->begin(), pPfoList->end());
55 VertexList vertexList(pVertexList->begin(), pVertexList->end());
57 for (PfoList::const_iterator iter = pfoList.begin(), iterEnd = pfoList.end(); iter != iterEnd; ++iter)
66 if (vertexList.end() == std::find(vertexList.begin(), vertexList.end(), pInputVertex))
74 if (NULL == pOutputPfo)
88 for (ClusterList::const_iterator cIter = clusterList.begin(), cIterEnd = clusterList.end(); cIter != cIterEnd; ++cIter)
93 for (PfoList::const_iterator pIter = parentList.begin(), pIterEnd = parentList.end(); pIter != pIterEnd; ++pIter)
98 for (PfoList::const_iterator dIter = daughterList.begin(), dIterEnd = daughterList.end(); dIter != dIterEnd; ++dIter)
104 if (!pTempPfoList->empty())
110 if (!pTempVertexList->empty())
116 return STATUS_CODE_SUCCESS;
126 return STATUS_CODE_SUCCESS;
Header file for the 3D particle creation algorithm class.
Header file for the pfo helper class.
#define PANDORA_THROW_RESULT_IF(StatusCode1, Operator, Command)
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
static pandora::StatusCode ReplaceCurrentList(const pandora::Algorithm &algorithm, const std::string &newListName)
Replace the current list with a pre-saved list; use this new list as a permanent replacement for the ...
static pandora::StatusCode CreateTemporaryListAndSetCurrent(const pandora::Algorithm &algorithm, const T *&pT, std::string &temporaryListName)
Create a temporary list and set it to be the current list, enabling object creation.
static pandora::StatusCode SetPfoParentDaughterRelationship(const pandora::Algorithm &algorithm, const pandora::ParticleFlowObject *const pParentPfo, const pandora::ParticleFlowObject *const pDaughterPfo)
Set parent-daughter particle flow object relationship.
static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
static const pandora::PandoraSettings * GetSettings(const pandora::Algorithm &algorithm)
Get the pandora settings instance.
virtual void CreatePfo(const pandora::ParticleFlowObject *const pInputPfo, const pandora::ParticleFlowObject *&pOutputPfo) const =0
Create specialised Pfo from an generic input Pfo.
std::string m_pfoListName
The name of the input pfo list.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
virtual pandora::StatusCode Run()
Run the algorithm.
std::string m_vertexListName
The name of the input vertex list.
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
ParticleFlowObject class.
const PfoList & GetDaughterPfoList() const
Get the daughter pfo list.
const ClusterList & GetClusterList() const
Get the cluster list.
const PfoList & GetParentPfoList() const
Get the parent pfo list.
const VertexList & GetVertexList() const
Get the vertex list.
StatusCodeException class.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
MANAGED_CONTAINER< const Cluster * > ClusterList
MANAGED_CONTAINER< const Vertex * > VertexList
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList