TwoViewSimpleTracksTool class.
More...
#include <TwoViewSimpleTracksTool.h>
|
void | FindBestTrack (const MatrixType &overlapMatrix, ProtoParticleVector &protoParticleVector) const |
| Find best track match as a simple way to (try to) resolve ambiguities in the matrix. More...
|
|
bool | PassesElementCuts (MatrixType::ElementList::const_reverse_iterator eIter) const |
| Whether a provided (iterator to a) matrix element passes the selection cuts for particle creation. More...
|
|
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
|
lar_content::TwoViewSimpleTracksTool::TwoViewSimpleTracksTool |
( |
| ) |
|
Default constructor.
Definition at line 18 of file TwoViewSimpleTracksTool.cc.
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.
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
Find best track match as a simple way to (try to) resolve ambiguities in the matrix.
- Parameters
-
overlapMatrix | the overlap matrix |
protoParticleVector | to receive the list of proto particles |
Definition at line 41 of file TwoViewSimpleTracksTool.cc.
44 overlapMatrix.GetSortedKeyClusters(sortedKeyClusters);
46 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
48 if (!pKeyCluster->IsAvailable())
51 unsigned int n0(0), n1(0);
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()))
65 ProtoParticle protoParticle;
66 protoParticle.m_clusterList.push_back(iIter->GetCluster1());
67 protoParticle.m_clusterList.push_back(iIter->GetCluster2());
68 protoParticleVector.push_back(protoParticle);
std::vector< Element > ElementList
bool PassesElementCuts(MatrixType::ElementList::const_reverse_iterator eIter) const
Whether a provided (iterator to a) matrix element passes the selection cuts for particle creation...
std::vector< art::Ptr< recob::Cluster > > ClusterVector
bool lar_content::TwoViewSimpleTracksTool::PassesElementCuts |
( |
MatrixType::ElementList::const_reverse_iterator |
eIter | ) |
const |
|
private |
Whether a provided (iterator to a) matrix element passes the selection cuts for particle creation.
- Parameters
-
eIter | the iterator to the matrix element |
Definition at line 78 of file TwoViewSimpleTracksTool.cc.
80 if (!eIter->GetOverlapResult().IsInitialized())
92 const TwoViewXOverlap &xOverlap(eIter->GetOverlapResult().GetTwoViewXOverlap());
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.
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
StatusCode lar_content::TwoViewSimpleTracksTool::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
Definition at line 104 of file TwoViewSimpleTracksTool.cc.
106 PANDORA_RETURN_RESULT_IF_AND_IF(
107 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinMatchedFraction",
m_minMatchedFraction));
109 PANDORA_RETURN_RESULT_IF_AND_IF(
110 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinMatchingScore",
m_minMatchingScore));
112 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
115 PANDORA_RETURN_RESULT_IF_AND_IF(
116 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinXOverlapFraction",
m_minXOverlapFraction));
118 return STATUS_CODE_SUCCESS;
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.
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
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 28 of file TwoViewSimpleTracksTool.cc.
30 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
31 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() <<
std::endl;
36 return pAlgorithm->CreateThreeDParticles(protoParticleVector);
std::vector< ProtoParticle > ProtoParticleVector
void FindBestTrack(const MatrixType &overlapMatrix, ProtoParticleVector &protoParticleVector) const
Find best track match as a simple way to (try to) resolve ambiguities in the matrix.
QTextStream & endl(QTextStream &s)
float lar_content::TwoViewSimpleTracksTool::m_minMatchedFraction |
|
private |
unsigned int lar_content::TwoViewSimpleTracksTool::m_minMatchedSamplingPoints |
|
private |
float lar_content::TwoViewSimpleTracksTool::m_minMatchingScore |
|
private |
float lar_content::TwoViewSimpleTracksTool::m_minXOverlapFraction |
|
private |
The documentation for this class was generated from the following files: