19 m_minMatchedFraction(0.2f),
20 m_minMatchingScore(0.9f),
21 m_minMatchedSamplingPoints(5),
22 m_minXOverlapFraction(0.5f)
31 std::cout <<
"----> Running Algorithm Tool: " << this->
GetInstanceName() <<
", " << this->
GetType() << std::endl;
44 overlapMatrix.GetSortedKeyClusters(sortedKeyClusters);
46 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
48 if (!pKeyCluster->IsAvailable())
51 unsigned int n0(0), n1(0);
52 MatrixType::ElementList elementList;
53 overlapMatrix.GetConnectedElements(pKeyCluster,
true, elementList, n0, n1);
55 if (elementList.empty())
58 for (MatrixType::ElementList::const_reverse_iterator iIter = elementList.rbegin(); iIter != elementList.rend(); ++iIter)
62 if ((
nullptr == iIter->GetCluster1()) || (
nullptr == iIter->GetCluster2()))
68 protoParticleVector.push_back(protoParticle);
80 if (!eIter->GetOverlapResult().IsInitialized())
92 const TwoViewXOverlap &xOverlap(eIter->GetOverlapResult().GetTwoViewXOverlap());
118 return STATUS_CODE_SUCCESS;
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
static const pandora::PandoraSettings * GetSettings(const pandora::Algorithm &algorithm)
Get the pandora settings instance.
virtual bool CreateThreeDParticles(const ProtoParticleVector &protoParticleVector)
Create particles using findings from recent algorithm processing.
TwoViewTransverseTracksAlgorithm::MatchingType::MatrixType MatrixType
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
float m_minMatchingScore
The min global matching score for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
TwoViewSimpleTracksTool()
Default constructor.
bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix)
Run the algorithm tool.
bool PassesElementCuts(MatrixType::ElementList::const_reverse_iterator eIter) const
Whether a provided (iterator to a) matrix element passes the selection cuts for particle creation.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
void FindBestTrack(const MatrixType &overlapMatrix, ProtoParticleVector &protoParticleVector) const
Find best track match as a simple way to (try to) resolve ambiguities in the matrix.
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
TwoViewTransverseTracksAlgorithm class.
float GetXOverlapFraction0() const
Get the fraction of the view 0 cluster that overlaps in x.
float GetXOverlapFraction1() const
Get the fraction of the view 1 cluster that overlaps in x.
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
const std::string & GetType() const
Get the type.
const std::string & GetInstanceName() const
Get the instance name.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
std::vector< ProtoParticle > ProtoParticleVector
pandora::ClusterList m_clusterList
List of 2D clusters in a 3D proto particle.
std::vector< const Cluster * > ClusterVector
StatusCode
The StatusCode enum.