9 #include "Pandora/AlgorithmHeaders.h" 20 TwoViewClearTracksTool::TwoViewClearTracksTool() :
21 m_minXOverlapFraction(0.1
f),
22 m_minMatchingScore(0.95
f),
23 m_minLocallyMatchedFraction(0.3
f)
31 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
32 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
34 bool particlesMade(
false);
52 if (iter->GetOverlapResult().GetTwoViewXOverlap().GetXOverlapFraction0() -
m_minXOverlapFraction < -1.f * std::numeric_limits<float>::epsilon())
54 if (iter->GetOverlapResult().GetTwoViewXOverlap().GetXOverlapFraction1() -
m_minXOverlapFraction < -1.f * std::numeric_limits<float>::epsilon())
57 if (iter->GetOverlapResult().GetMatchingScore() - m_minMatchingScore < std::numeric_limits<float>::epsilon())
60 if (iter->GetOverlapResult().GetLocallyMatchedFraction() - m_minLocallyMatchedFraction < std::numeric_limits<float>::epsilon())
66 protoParticleVector.push_back(protoParticle);
76 PANDORA_RETURN_RESULT_IF_AND_IF(
77 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinMatchingScore",
m_minMatchingScore));
79 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
82 PANDORA_RETURN_RESULT_IF_AND_IF(
83 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinXOverlapFraction",
m_minXOverlapFraction));
85 return STATUS_CODE_SUCCESS;
std::vector< ProtoParticle > ProtoParticleVector
float m_minMatchingScore
The min global matching score for particle creation.
TwoViewTransverseTracksAlgorithm class.
std::vector< Element > ElementList
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_minXOverlapFraction
The min x overlap fraction value for particle creation.
bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix)
Run the algorithm tool.
float m_minLocallyMatchedFraction
The min locally matched fraction for particle creation.
pandora::ClusterList m_clusterList
List of 2D clusters in a 3D proto particle.
TheMatrix::const_iterator const_iterator
void GetUnambiguousElements(const bool ignoreUnavailable, ElementList &elementList) const
Get unambiguous elements.
void CreateThreeDParticles(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const MatrixType::ElementList &elementList, bool &particlesMade) const
Create three dimensional particles for a given tensor element list.
virtual bool CreateThreeDParticles(const ProtoParticleVector &protoParticleVector)
Create particles using findings from recent algorithm processing.