10 #include "Pandora/AlgorithmHeaders.h"
17 ClearTracksTool::ClearTracksTool() : m_minMatchedFraction(0.9f), m_minXOverlapFraction(0.9f)
25 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
26 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
28 bool particlesMade(
false);
49 const XOverlap &xOverlap(iter->GetOverlapResult().GetXOverlap());
51 if ((xOverlap.GetXSpanU() < std::numeric_limits<float>::epsilon()) || (xOverlap.GetXOverlapSpan() / xOverlap.GetXSpanU() <
m_minXOverlapFraction))
54 if ((xOverlap.GetXSpanV() < std::numeric_limits<float>::epsilon()) || (xOverlap.GetXOverlapSpan() / xOverlap.GetXSpanV() <
m_minXOverlapFraction))
57 if ((xOverlap.GetXSpanW() < std::numeric_limits<float>::epsilon()) || (xOverlap.GetXOverlapSpan() / xOverlap.GetXSpanW() <
m_minXOverlapFraction))
64 protoParticleVector.push_back(protoParticle);
74 PANDORA_RETURN_RESULT_IF_AND_IF(
75 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinMatchedFraction",
m_minMatchedFraction));
77 PANDORA_RETURN_RESULT_IF_AND_IF(
78 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinXOverlapFraction",
m_minXOverlapFraction));
80 return STATUS_CODE_SUCCESS;
std::vector< ProtoParticle > ProtoParticleVector
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
bool Run(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor)
Run the algorithm tool.
void CreateThreeDParticles(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const TensorType::ElementList &elementList, bool &particlesMade) const
Create three dimensional particles for a given tensor element list.
std::vector< Element > ElementList
void GetUnambiguousElements(const bool ignoreUnavailable, ElementList &elementList) const
Get unambiguous elements.
pandora::ClusterList m_clusterList
List of 2D clusters in a 3D proto particle.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch pandora
virtual bool CreateThreeDParticles(const ProtoParticleVector &protoParticleVector)
Create particles using findings from recent algorithm processing.
ThreeViewTransverseTracksAlgorithm class.
BEGIN_PROLOG could also be cout
TheTensor::const_iterator const_iterator