TwoViewLongTracksTool class.
More...
#include <TwoViewLongTracksTool.h>
lar_content::TwoViewLongTracksTool::TwoViewLongTracksTool |
( |
| ) |
|
Default constructor.
Definition at line 18 of file TwoViewLongTracksTool.cc.
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minMatchingScore
The min global matching score for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
unsigned int m_minMatchedSamplingPointRatio
The min ratio between 1st and 2nd highest msps for simple ambiguity resolution.
Find long tracks, hidden by simple ambiguities in the matrix.
- Parameters
-
overlapMatrix | the overlap matrix |
protoParticleVector | to receive the list of proto particles |
Definition at line 84 of file TwoViewLongTracksTool.cc.
86 ClusterSet usedClusters;
88 overlapMatrix.GetSortedKeyClusters(sortedKeyClusters);
90 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
92 if (!pKeyCluster->IsAvailable())
95 unsigned int n0(0), n1(0);
97 overlapMatrix.GetConnectedElements(pKeyCluster,
true, elementList, n0, n1);
103 for (IteratorList::const_iterator iIter = iteratorList.begin(), iIterEnd = iteratorList.end(); iIter != iIterEnd; ++iIter)
111 ProtoParticle protoParticle;
112 protoParticle.m_clusterList.push_back((*iIter)->GetCluster1());
113 protoParticle.m_clusterList.push_back((*iIter)->GetCluster2());
114 protoParticleVector.push_back(protoParticle);
116 usedClusters.insert((*iIter)->GetCluster1());
117 usedClusters.insert((*iIter)->GetCluster2());
static bool HasLongDirectConnections(IteratorList::const_iterator iIter, const IteratorList &iteratorList)
Whether a long element shares clusters with any other long elements.
static bool IsLongerThanDirectConnections(IteratorList::const_iterator iIter, const MatrixType::ElementList &elementList, const unsigned int minMatchedSamplingPointRatio, const pandora::ClusterSet &usedClusters)
Whether a long element is significantly longer that other elements with which it shares a cluster...
std::vector< Element > ElementList
unsigned int m_minMatchedSamplingPointRatio
The min ratio between 1st and 2nd highest msps for simple ambiguity resolution.
void SelectLongElements(const MatrixType::ElementList &elementList, const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const
Select a list of long track-like elements from a set of connected matrix elements.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
std::vector< MatrixType::ElementList::const_iterator > IteratorList
bool lar_content::TwoViewLongTracksTool::HasLongDirectConnections |
( |
IteratorList::const_iterator |
iIter, |
|
|
const IteratorList & |
iteratorList |
|
) |
| |
|
static |
Whether a long element shares clusters with any other long elements.
- Parameters
-
iIter | specifies the long element under consideration |
iteratorList | list of iterators to other long elements |
- Returns
- boolean
Definition at line 29 of file TwoViewLongTracksTool.cc.
31 for (IteratorList::const_iterator iIter2 = iteratorList.begin(), iIter2End = iteratorList.end(); iIter2 != iIter2End; ++iIter2)
36 if (((*iIter)->GetCluster1() == (*iIter2)->GetCluster1()) || ((*iIter)->GetCluster2() == (*iIter2)->GetCluster2()))
bool lar_content::TwoViewLongTracksTool::IsLongerThanDirectConnections |
( |
IteratorList::const_iterator |
iIter, |
|
|
const MatrixType::ElementList & |
elementList, |
|
|
const unsigned int |
minMatchedSamplingPointRatio, |
|
|
const pandora::ClusterSet & |
usedClusters |
|
) |
| |
|
static |
Whether a long element is significantly longer that other elements with which it shares a cluster.
- Parameters
-
iIter | specifies the long element under consideration |
elementList | the full list of connected matrix elements |
minMatchedSamplingPointRatio | the min ratio between 1st and 2nd highest msps for simple ambiguity resolution |
usedClusters | the list of clusters already marked as to be added to a pfo |
Definition at line 45 of file TwoViewLongTracksTool.cc.
48 const unsigned int nMatchedReUpsampledSamplingPoints((*iIter)->GetOverlapResult().GetNMatchedReUpsampledSamplingPoints());
50 for (MatrixType::ElementList::const_iterator eIter = elementList.begin(); eIter != elementList.end(); ++eIter)
52 if ((*iIter) == eIter)
55 if (usedClusters.count(eIter->GetCluster1()) || usedClusters.count(eIter->GetCluster2()))
58 if (((*iIter)->GetCluster1() != eIter->GetCluster1()) && ((*iIter)->GetCluster2() != eIter->GetCluster2()))
61 if (nMatchedReUpsampledSamplingPoints < minMatchedSamplingPointRatio * eIter->GetOverlapResult().GetNMatchedReUpsampledSamplingPoints())
StatusCode lar_content::TwoViewLongTracksTool::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
Definition at line 152 of file TwoViewLongTracksTool.cc.
154 PANDORA_RETURN_RESULT_IF_AND_IF(
155 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinMatchedFraction",
m_minMatchedFraction));
157 PANDORA_RETURN_RESULT_IF_AND_IF(
158 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinMatchingScore",
m_minMatchingScore));
160 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
163 PANDORA_RETURN_RESULT_IF_AND_IF(
164 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinXOverlapFraction",
m_minXOverlapFraction));
166 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
169 return STATUS_CODE_SUCCESS;
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minMatchingScore
The min global matching score for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
unsigned int m_minMatchedSamplingPointRatio
The min ratio between 1st and 2nd highest msps for simple ambiguity resolution.
Run the algorithm tool.
- Parameters
-
pAlgorithm | address of the calling algorithm |
overlapMatrix | the overlap matrix |
- Returns
- whether changes have been made by the tool
Implements lar_content::TransverseMatrixTool.
Definition at line 70 of file TwoViewLongTracksTool.cc.
72 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
73 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
78 const bool particlesMade(pAlgorithm->CreateThreeDParticles(protoParticleVector));
std::vector< ProtoParticle > ProtoParticleVector
void FindLongTracks(const MatrixType &overlapMatrix, ProtoParticleVector &protoParticleVector) const
Find long tracks, hidden by simple ambiguities in the matrix.
BEGIN_PROLOG could also be cout
void lar_content::TwoViewLongTracksTool::SelectLongElements |
( |
const MatrixType::ElementList & |
elementList, |
|
|
const pandora::ClusterSet & |
usedClusters, |
|
|
IteratorList & |
iteratorList |
|
) |
| const |
|
private |
Select a list of long track-like elements from a set of connected matrix elements.
- Parameters
-
elementList | the full list of connected matrix elements |
usedClusters | the list of clusters already marked as to be added to a pfo |
iteratorList | to receive a list of iterators to long track-like elements |
Definition at line 124 of file TwoViewLongTracksTool.cc.
127 for (MatrixType::ElementList::const_iterator eIter = elementList.begin(); eIter != elementList.end(); ++eIter)
129 if (usedClusters.count(eIter->GetCluster1()) || usedClusters.count(eIter->GetCluster2()))
141 const TwoViewXOverlap &xOverlap(eIter->GetOverlapResult().GetTwoViewXOverlap());
145 iteratorList.push_back(eIter);
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minMatchingScore
The min global matching score for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
float lar_content::TwoViewLongTracksTool::m_minMatchedFraction |
|
private |
unsigned int lar_content::TwoViewLongTracksTool::m_minMatchedSamplingPointRatio |
|
private |
The min ratio between 1st and 2nd highest msps for simple ambiguity resolution.
Definition at line 74 of file TwoViewLongTracksTool.h.
unsigned int lar_content::TwoViewLongTracksTool::m_minMatchedSamplingPoints |
|
private |
float lar_content::TwoViewLongTracksTool::m_minMatchingScore |
|
private |
float lar_content::TwoViewLongTracksTool::m_minXOverlapFraction |
|
private |
The documentation for this class was generated from the following files: