9 #include "Pandora/AlgorithmHeaders.h" 17 MissingTrackTool::MissingTrackTool() :
18 m_minMatchedSamplingPoints(15),
19 m_minMatchedFraction(0.95
f),
20 m_maxReducedChiSquared(0.707
f),
21 m_minXOverlapFraction(0.75
f)
29 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
30 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
43 ClusterSet usedClusters;
47 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
49 unsigned int nU(0), nV(0), nW(0);
55 const bool includeU(eIter->GetClusterU()->IsAvailable() && !usedClusters.count(eIter->GetClusterU()));
56 const bool includeV(eIter->GetClusterV()->IsAvailable() && !usedClusters.count(eIter->GetClusterV()));
57 const bool includeW(eIter->GetClusterW()->IsAvailable() && !usedClusters.count(eIter->GetClusterW()));
59 unsigned int nAvailable(0);
60 if (includeU) ++nAvailable;
61 if (includeV) ++nAvailable;
62 if (includeW) ++nAvailable;
78 if ((overlapResult.GetXOverlap().GetXSpanU() < std::numeric_limits<float>::epsilon()) ||
79 (overlapResult.GetXOverlap().GetXSpanV() < std::numeric_limits<float>::epsilon()) ||
80 (overlapResult.GetXOverlap().GetXSpanW() < std::numeric_limits<float>::epsilon()))
85 const float xOverlapSpan(overlapResult.GetXOverlap().GetXOverlapSpan());
97 if (includeU) protoParticle.
m_clusterListU.push_back(eIter->GetClusterU());
98 if (includeV) protoParticle.
m_clusterListV.push_back(eIter->GetClusterV());
99 if (includeW) protoParticle.
m_clusterListW.push_back(eIter->GetClusterW());
101 protoParticleVector.push_back(protoParticle);
102 usedClusters.insert(eIter->GetClusterU());
103 usedClusters.insert(eIter->GetClusterV());
104 usedClusters.insert(eIter->GetClusterW());
113 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
116 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
119 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
122 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
125 return STATUS_CODE_SUCCESS;
std::vector< ProtoParticle > ProtoParticleVector
virtual bool CreateThreeDParticles(const ProtoParticleVector &protoParticleVector)
Create particles using findings from recent algorithm processing.
void GetConnectedElements(const pandora::Cluster *const pCluster, const bool ignoreUnavailable, ElementList &elementList) const
Get a list of elements connected to a specified cluster.
float m_maxReducedChiSquared
The max reduced chi squared value for the unavailable tensor element.
float m_minMatchedFraction
The min matched sampling point fraction for the unavailable tensor element.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
pandora::ClusterList m_clusterListW
List of 2D W clusters in a 3D proto particle.
float m_minXOverlapFraction
The min x overlap fraction for the two available clusters in the tensor element.
std::vector< Element > ElementList
pandora::ClusterList m_clusterListV
List of 2D V clusters in a 3D proto particle.
pandora::ClusterList m_clusterListU
List of 2D U clusters in a 3D proto particle.
void GetSortedKeyClusters(pandora::ClusterVector &sortedKeyClusters) const
Get a sorted vector of key clusters (U clusters with current implementation)
TransverseOverlapResult class.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
void FindMissingTracks(const TensorType &overlapTensor, ProtoParticleVector &protoParticleVector) const
Find missing tracks, due to merging of multiple particle deposits into single hits during hit creatio...
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for the unavailable tensor element.
ThreeDTransverseTracksAlgorithm class.
TheTensor::const_iterator const_iterator
bool Run(ThreeDTransverseTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor)
Run the algorithm tool.