Public Member Functions | Private Member Functions | Private Attributes | List of all members
lar_content::TwoViewClearTracksTool Class Reference

TwoViewClearTracksTool class. More...

#include <TwoViewClearTracksTool.h>

Inheritance diagram for lar_content::TwoViewClearTracksTool:
lar_content::TransverseMatrixTool

Public Member Functions

 TwoViewClearTracksTool ()
 Default constructor. More...
 
bool Run (TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix)
 Run the algorithm tool. More...
 

Private Member Functions

pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 
void CreateThreeDParticles (TwoViewTransverseTracksAlgorithm *const pAlgorithm, const MatrixType::ElementList &elementList, bool &particlesMade) const
 Create three dimensional particles for a given tensor element list. More...
 

Private Attributes

float m_minXOverlapFraction
 The min x overlap fraction value for particle creation. More...
 
float m_minMatchingScore
 The min global matching score for particle creation. More...
 
float m_minLocallyMatchedFraction
 The min locally matched fraction for particle creation. More...
 

Additional Inherited Members

- Public Types inherited from lar_content::TransverseMatrixTool
typedef TwoViewTransverseTracksAlgorithm::MatchingType::MatrixType MatrixType
 
typedef std::vector< MatrixType::ElementList::const_iteratorIteratorList
 

Detailed Description

TwoViewClearTracksTool class.

Definition at line 19 of file TwoViewClearTracksTool.h.

Constructor & Destructor Documentation

lar_content::TwoViewClearTracksTool::TwoViewClearTracksTool ( )

Default constructor.

Definition at line 20 of file TwoViewClearTracksTool.cc.

21 {
22 }
float m_minMatchingScore
The min global matching score for particle creation.
float m_minXOverlapFraction
The min x overlap fraction value for particle creation.
float m_minLocallyMatchedFraction
The min locally matched fraction for particle creation.

Member Function Documentation

void lar_content::TwoViewClearTracksTool::CreateThreeDParticles ( TwoViewTransverseTracksAlgorithm *const  pAlgorithm,
const MatrixType::ElementList elementList,
bool particlesMade 
) const
private

Create three dimensional particles for a given tensor element list.

Parameters
pAlgorithmaddress of the calling algorithm (ultimately responsible for the particles)
elementListthe tensor element list
particlesMadereceive boolean indicating whether particles have been made

Definition at line 42 of file TwoViewClearTracksTool.cc.

44 {
45  ProtoParticleVector protoParticleVector;
46 
47  for (MatrixType::ElementList::const_iterator iter = elementList.begin(), iterEnd = elementList.end(); iter != iterEnd; ++iter)
48  {
49  if (iter->GetOverlapResult().GetTwoViewXOverlap().GetXOverlapFraction0() - m_minXOverlapFraction < -1.f * std::numeric_limits<float>::epsilon())
50  continue;
51  if (iter->GetOverlapResult().GetTwoViewXOverlap().GetXOverlapFraction1() - m_minXOverlapFraction < -1.f * std::numeric_limits<float>::epsilon())
52  continue;
53 
54  if (iter->GetOverlapResult().GetMatchingScore() - m_minMatchingScore < std::numeric_limits<float>::epsilon())
55  continue;
56 
57  if (iter->GetOverlapResult().GetLocallyMatchedFraction() - m_minLocallyMatchedFraction < std::numeric_limits<float>::epsilon())
58  continue;
59 
60  ProtoParticle protoParticle;
61  protoParticle.m_clusterList.push_back(iter->GetCluster1());
62  protoParticle.m_clusterList.push_back(iter->GetCluster2());
63  protoParticleVector.push_back(protoParticle);
64  }
65 
66  particlesMade |= pAlgorithm->CreateThreeDParticles(protoParticleVector);
67 }
std::vector< ProtoParticle > ProtoParticleVector
intermediate_table::const_iterator const_iterator
float m_minXOverlapFraction
The min x overlap fraction value for particle creation.
StatusCode lar_content::TwoViewClearTracksTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 71 of file TwoViewClearTracksTool.cc.

72 {
73  PANDORA_RETURN_RESULT_IF_AND_IF(
74  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinMatchingScore", m_minMatchingScore));
75 
76  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
77  XmlHelper::ReadValue(xmlHandle, "MinLocallyMatchedFraction", m_minLocallyMatchedFraction));
78 
79  PANDORA_RETURN_RESULT_IF_AND_IF(
80  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinXOverlapFraction", m_minXOverlapFraction));
81 
82  return STATUS_CODE_SUCCESS;
83 }
float m_minMatchingScore
The min global matching score for particle creation.
float m_minXOverlapFraction
The min x overlap fraction value for particle creation.
float m_minLocallyMatchedFraction
The min locally matched fraction for particle creation.
bool lar_content::TwoViewClearTracksTool::Run ( TwoViewTransverseTracksAlgorithm *const  pAlgorithm,
MatrixType overlapMatrix 
)
virtual

Run the algorithm tool.

Parameters
pAlgorithmaddress of the calling algorithm
overlapMatrixthe overlap matrix
Returns
whether changes have been made by the tool

Implements lar_content::TransverseMatrixTool.

Definition at line 26 of file TwoViewClearTracksTool.cc.

27 {
28  if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
29  std::cout << "----> Running Algorithm Tool: " << this->GetInstanceName() << ", " << this->GetType() << std::endl;
30 
31  bool particlesMade(false);
32 
33  MatrixType::ElementList elementList;
34  overlapMatrix.GetUnambiguousElements(true, elementList);
35  this->CreateThreeDParticles(pAlgorithm, elementList, particlesMade);
36 
37  return particlesMade;
38 }
void CreateThreeDParticles(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const MatrixType::ElementList &elementList, bool &particlesMade) const
Create three dimensional particles for a given tensor element list.
QTextStream & endl(QTextStream &s)

Member Data Documentation

float lar_content::TwoViewClearTracksTool::m_minLocallyMatchedFraction
private

The min locally matched fraction for particle creation.

Definition at line 43 of file TwoViewClearTracksTool.h.

float lar_content::TwoViewClearTracksTool::m_minMatchingScore
private

The min global matching score for particle creation.

Definition at line 42 of file TwoViewClearTracksTool.h.

float lar_content::TwoViewClearTracksTool::m_minXOverlapFraction
private

The min x overlap fraction value for particle creation.

Definition at line 41 of file TwoViewClearTracksTool.h.


The documentation for this class was generated from the following files: