23 m_overwriteExistingId(false),
24 m_useUnavailableClusters(false)
44 if (!pClusterList || pClusterList->empty())
47 std::cout <<
"ClusterCharacterisationBaseAlgorithm: unable to find cluster list " << clusterListName << std::endl;
54 for (
const Cluster *
const pCluster : *pClusterList)
56 PandoraContentApi::Cluster::Metadata metadata;
61 return STATUS_CODE_SUCCESS;
64 for (
const Cluster *
const pCluster : *pClusterList)
72 PandoraContentApi::Cluster::Metadata metadata;
76 metadata.m_particleId = MU_MINUS;
80 metadata.m_particleId = E_MINUS;
83 if (pCluster->GetParticleId() != metadata.m_particleId.Get())
88 return STATUS_CODE_SUCCESS;
105 return STATUS_CODE_SUCCESS;
Header file for the cluster characterisation base algorithm class.
Header file for the cluster helper class.
Header file for the geometry helper class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
static bool IsAvailable(const pandora::Algorithm &algorithm, const T *const pT)
Is object, or a list of objects, available as a building block.
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.
ClusterCharacterisationBaseAlgorithm()
Default constructor.
bool m_zeroMode
Whether to zero all existing cluster particle id, overrides all other parameters.
~ClusterCharacterisationBaseAlgorithm()
Destructor.
bool m_useUnavailableClusters
Whether to consider clusters that are already constituents of a pfo.
virtual bool IsClearTrack(const pandora::Cluster *const pCluster) const =0
Whether cluster is identified as a clear track.
pandora::StatusCode Run()
Run the algorithm.
pandora::StringVector m_inputClusterListNames
The names of the input cluster lists.
bool m_overwriteExistingId
Whether to consider any clusters that already have an assigned particle id.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
StatusCode AlterMetadata(const object_creation::Cluster::Metadata &metadata)
Alter the metadata information stored in a cluster.
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
static StatusCode ReadVectorOfValues(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, std::vector< T > &vector)
Read a vector of values from a (space separated) list in an xml element.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
MANAGED_CONTAINER< const Cluster * > ClusterList
StatusCode
The StatusCode enum.