37 if (!pVertexList || pVertexList->empty())
40 std::cout <<
"NeutrinoCreationAlgorithm: unable to find vertex list " <<
m_vertexListName << std::endl;
42 return STATUS_CODE_SUCCESS;
45 std::string neutrinoPfoListName;
46 const PfoList *pNeutrinoPfoList(
nullptr);
49 for (VertexList::const_iterator vIter = pVertexList->begin(), vIterEnd = pVertexList->end(); vIter != vIterEnd; ++vIter)
51 const Vertex *
const pVertex = *vIter;
57 PandoraContentApi::ParticleFlowObject::Parameters pfoParameters;
59 pfoParameters.m_vertexList.push_back(pVertex);
62 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::Create(*
this, pfoParameters, pNeutrinoPfo));
65 if ((!pNeutrinoPfoList) || pNeutrinoPfoList->empty())
71 return STATUS_CODE_SUCCESS;
78 std::string neutrinoPfoListName;
79 const PfoList *pNeutrinoPfoList(
nullptr);
82 PandoraContentApi::ParticleFlowObject::Parameters pfoParameters;
86 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::Create(*
this, pfoParameters, pNeutrinoPfo));
88 if ((!pNeutrinoPfoList) || pNeutrinoPfoList->empty())
94 return STATUS_CODE_SUCCESS;
101 pfoParameters.m_particleId = NU_MU;
104 pfoParameters.m_energy = 0.f;
106 pfoParameters.m_propertiesToAdd[
"IsNeutrino"] = 1.f;
120 return STATUS_CODE_SUCCESS;
Header file for the cluster helper class.
Header file for the neutrino creation algorithm class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, 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 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.
std::string m_neutrinoPfoListName
The name of the neutrino pfo list.
void FillDefaultNeutrinoParameters(PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
Fill provided pfo parameters with default/dummy values for later refinement.
pandora::StatusCode ForceSingleEmptyNeutrino() const
Force creation of a single neutrino, with no vertex, regardless of number of input vertices.
std::string m_vertexListName
The name of the neutrino vertex list.
bool m_forceSingleEmptyNeutrino
Whether to force creation of a single neutrino, with no vertex, regardless of number of input vertice...
NeutrinoCreationAlgorithm()
Default constructor.
pandora::StatusCode Run()
Run the algorithm.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
ParticleFlowObject class.
static float GetParticleMass(const int pdgCode)
Get the mass of a particle type.
static int GetParticleCharge(const int pdgCode)
Get the charge of a particle type.
StatusCodeException class.
VertexType GetVertexType() const
Get the vertex type.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
MANAGED_CONTAINER< const Vertex * > VertexList
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList