24 m_updateClusterIds(true),
25 m_postBranchAddition(false),
26 m_useThreeDInformation(true),
27 m_minTrackLikeViews(2)
41 PfoList tracksToShowers, showersToTracks;
45 const PfoList *pPfoList(
nullptr);
48 if (!pPfoList || pPfoList->empty())
51 std::cout <<
"PfoCharacterisationBaseAlgorithm: unable to find pfo list " << pfoListName << std::endl;
58 PandoraContentApi::ParticleFlowObject::Metadata pfoMetadata;
63 pfoMetadata.m_particleId = MU_MINUS;
66 showersToTracks.push_back(pPfo);
70 pfoMetadata.m_particleId = E_MINUS;
73 tracksToShowers.push_back(pPfo);
76 if (pPfo->GetParticleId() != pfoMetadata.m_particleId.Get())
85 for (
const Cluster *
const pCluster : twoDClusterList)
87 if (pCluster->GetParticleId() == pfoMetadata.m_particleId.Get())
90 PandoraContentApi::Cluster::Metadata clusterMetadata;
91 clusterMetadata.m_particleId = pfoMetadata.m_particleId.Get();
97 if (!tracksToShowers.empty())
100 if (!showersToTracks.empty())
103 return STATUS_CODE_SUCCESS;
113 typedef std::set<pandora::HitType> HitTypeSet;
114 HitTypeSet hitTypeSet;
116 unsigned int nTrackLikeViews(0);
117 for (
const Cluster *
const pCluster : twoDClusterList)
120 if (!hitTypeSet.insert(hitType).second)
152 return STATUS_CODE_SUCCESS;
Header file for the cluster helper class.
Header file for the pfo helper class.
Header file for the pfo characterisation base algorithm class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
static pandora::StatusCode SaveList(const pandora::Algorithm &algorithm, const T &t, const std::string &newListName)
Save a provided input object list under a new name.
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.
static pandora::HitType GetClusterHitType(const pandora::Cluster *const pCluster)
Get the hit type associated with a two dimensional cluster.
static void GetTwoDClusterList(const pandora::ParticleFlowObject *const pPfo, pandora::ClusterList &clusterList)
Get the list of 2D clusters from an input pfo.
pandora::StatusCode Run()
Run the algorithm.
virtual bool IsClearTrack3x2D(const pandora::ParticleFlowObject *const pPfo) const
Whether pfo is identified as a clear track using its three clusters.
virtual bool IsClearTrack(const pandora::ParticleFlowObject *const pPfo) const =0
Whether pfo is identified as a clear track.
std::string m_trackPfoListName
The track pfo list name.
pandora::StringVector m_inputPfoListNames
The names of the input pfo lists.
bool m_updateClusterIds
Whether to update daughter cluster particle id labels to match pfo id.
PfoCharacterisationBaseAlgorithm()
Default constructor.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
virtual ~PfoCharacterisationBaseAlgorithm()
Destructor.
std::string m_showerPfoListName
The shower pfo list name.
bool m_useThreeDInformation
Whether to use PFO and 3D information or clusters for characterisation.
unsigned int m_minTrackLikeViews
The minimum number of track-like views to declare a pfo as track-like.
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.
ParticleFlowObject class.
StatusCode AlterMetadata(const object_creation::ParticleFlowObject::Metadata &metadata)
Alter particle flow object metadata parameters.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
HitType
Calorimeter hit type enum.
MANAGED_CONTAINER< const Cluster * > ClusterList
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList