All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
lar_content::ThreeViewLongitudinalTracksAlgorithm Class Reference

ThreeViewLongitudinalTracksAlgorithm class. More...

#include <ThreeViewLongitudinalTracksAlgorithm.h>

Inheritance diagram for lar_content::ThreeViewLongitudinalTracksAlgorithm:
lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > > lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > > lar_content::MatchingBaseAlgorithm

Public Types

typedef
NViewTrackMatchingAlgorithm
< ThreeViewMatchingControl
< LongitudinalOverlapResult > > 
BaseAlgorithm
 
- Public Types inherited from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >
typedef
ThreeViewMatchingControl
< LongitudinalOverlapResult
MatchingType
 

Public Member Functions

 ThreeViewLongitudinalTracksAlgorithm ()
 Default constructor. More...
 
- Public Member Functions inherited from lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >
 NViewTrackMatchingAlgorithm ()
 Default constructor. More...
 
virtual ~NViewTrackMatchingAlgorithm ()
 Destructor. More...
 
const TwoDSlidingFitResultGetCachedSlidingFitResult (const pandora::Cluster *const pCluster) const
 Get a sliding fit result from the algorithm cache. More...
 
unsigned int GetSlidingFitWindow () const
 Get the layer window for the sliding linear fits. More...
 
virtual bool MakeClusterSplits (const SplitPositionMap &splitPositionMap)
 Make cluster splits. More...
 
virtual bool MakeClusterSplit (const pandora::CartesianVector &splitPosition, const pandora::Cluster *&pCurrentCluster, const pandora::Cluster *&pLowXCluster, const pandora::Cluster *&pHighXCluster) const
 Make a cluster split. More...
 
virtual void UpdateForNewCluster (const pandora::Cluster *const pNewCluster)
 Update to reflect addition of a new cluster to the problem space. More...
 
virtual void UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster)
 Update to reflect cluster deletion. More...
 
virtual void SelectInputClusters (const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const
 Select a subset of input clusters for processing in this algorithm. More...
 
virtual void PrepareInputClusters (pandora::ClusterList &preparedClusterList)
 Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results. More...
 
virtual void SetPfoParticleId (PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
 Set pfo particle id. More...
 
- Public Member Functions inherited from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >
 NViewMatchingAlgorithm ()
 Default constructor. More...
 
virtual ~NViewMatchingAlgorithm ()
 Destructor. More...
 
const std::string & GetClusterListName (const pandora::HitType hitType) const
 Get the cluster list name corresponding to a specified hit type. More...
 
const pandora::ClusterList & GetInputClusterList (const pandora::HitType hitType) const
 Get the input cluster list corresponding to a specified hit type. More...
 
const pandora::ClusterList & GetSelectedClusterList (const pandora::HitType hitType) const
 Get the selected cluster list corresponding to a specified hit type. More...
 
- Public Member Functions inherited from lar_content::MatchingBaseAlgorithm
 MatchingBaseAlgorithm ()
 Default constructor. More...
 
virtual ~MatchingBaseAlgorithm ()
 Destructor. More...
 
virtual bool MakeClusterMerges (const ClusterMergeMap &clusterMergeMap)
 Merge clusters together. More...
 
virtual bool CreateThreeDParticles (const ProtoParticleVector &protoParticleVector)
 Create particles using findings from recent algorithm processing. More...
 
virtual void SetPfoParameters (const ProtoParticle &protoParticle, PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
 Set Pfo properties. More...
 

Private Types

typedef std::vector
< LongitudinalTensorTool * > 
TensorToolVector
 

Private Member Functions

void CalculateOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
 Calculate cluster overlap result and store in container. More...
 
void CalculateOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, LongitudinalOverlapResult &overlapResult)
 Calculate the overlap result for given group of clusters. More...
 
void CalculateOverlapResult (const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW, const pandora::CartesianVector &vtxMerged3D, const pandora::CartesianVector &endMerged3D, TrackOverlapResult &overlapResult) const
 Calculate the overlap result for given 3D vertex and end positions. More...
 
void ExamineOverlapContainer ()
 Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required. More...
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Private Attributes

TensorToolVector m_algorithmToolVector
 The algorithm tool vector. More...
 
unsigned int m_nMaxTensorToolRepeats
 The maximum number of repeat loops over tensor tools. More...
 
float m_vertexChi2Cut
 The maximum allowed chi2 for associating end points from three views. More...
 
float m_reducedChi2Cut
 The maximum allowed chi2 for associating hit positions from three views. More...
 
float m_samplingPitch
 Pitch used to generate sampling points along tracks. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >
static bool SortSplitPositions (const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs)
 Sort split position cartesian vectors by increasing x coordinate. More...
 
- Protected Member Functions inherited from lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >
void AddToSlidingFitCache (const pandora::Cluster *const pCluster)
 Add a new sliding fit result, for the specified cluster, to the algorithm cache. More...
 
void RemoveFromSlidingFitCache (const pandora::Cluster *const pCluster)
 Remova an existing sliding fit result, for the specified cluster, from the algorithm cache. More...
 
virtual void TidyUp ()
 Tidy member variables in derived class. More...
 
- Protected Member Functions inherited from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >
MatchingTypeGetMatchingControl ()
 Get the matching control. More...
 
virtual void SelectAllInputClusters ()
 Select a subset of input clusters for processing in this algorithm. More...
 
virtual void PrepareAllInputClusters ()
 Perform any preparatory steps required, e.g. caching expensive fit results for clusters. More...
 
virtual void PerformMainLoop ()
 Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult. More...
 
- Protected Attributes inherited from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >
MatchingType m_matchingControl
 The matching control. More...
 

Detailed Description

ThreeViewLongitudinalTracksAlgorithm class.

Definition at line 29 of file ThreeViewLongitudinalTracksAlgorithm.h.

Member Typedef Documentation

Definition at line 32 of file ThreeViewLongitudinalTracksAlgorithm.h.

Definition at line 71 of file ThreeViewLongitudinalTracksAlgorithm.h.

Constructor & Destructor Documentation

lar_content::ThreeViewLongitudinalTracksAlgorithm::ThreeViewLongitudinalTracksAlgorithm ( )

Default constructor.

Definition at line 21 of file ThreeViewLongitudinalTracksAlgorithm.cc.

21  :
23  m_vertexChi2Cut(10.f),
24  m_reducedChi2Cut(5.f),
25  m_samplingPitch(1.f)
26 {
27 }
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
float m_samplingPitch
Pitch used to generate sampling points along tracks.
float m_vertexChi2Cut
The maximum allowed chi2 for associating end points from three views.
float m_reducedChi2Cut
The maximum allowed chi2 for associating hit positions from three views.

Member Function Documentation

void lar_content::ThreeViewLongitudinalTracksAlgorithm::CalculateOverlapResult ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
const pandora::Cluster *const  pCluster3 
)
privatevirtual

Calculate cluster overlap result and store in container.

Parameters
pCluster1address of cluster1
pCluster2address of cluster2
pCluster3address of cluster3

Implements lar_content::MatchingBaseAlgorithm.

void lar_content::ThreeViewLongitudinalTracksAlgorithm::CalculateOverlapResult ( const pandora::Cluster *const  pClusterU,
const pandora::Cluster *const  pClusterV,
const pandora::Cluster *const  pClusterW,
LongitudinalOverlapResult overlapResult 
)
private

Calculate the overlap result for given group of clusters.

Parameters
pClusterUthe cluster from the U view
pClusterVthe cluster from the V view
pClusterWthe cluster from the W view
overlapResultto receive the overlap result
void lar_content::ThreeViewLongitudinalTracksAlgorithm::CalculateOverlapResult ( const TwoDSlidingFitResult slidingFitResultU,
const TwoDSlidingFitResult slidingFitResultV,
const TwoDSlidingFitResult slidingFitResultW,
const pandora::CartesianVector &  vtxMerged3D,
const pandora::CartesianVector &  endMerged3D,
TrackOverlapResult overlapResult 
) const
private

Calculate the overlap result for given 3D vertex and end positions.

Parameters
slidingFitResultUthe sliding fit result u
slidingFitResultVthe sliding fit result v
slidingFitResultWthe sliding fit result w
vtxMerged3Dthe 3D vertex position
endMerged3Dthe 3D end position
overlapResultto receive the overlap result
void lar_content::ThreeViewLongitudinalTracksAlgorithm::ExamineOverlapContainer ( )
privatevirtual

Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 201 of file ThreeViewLongitudinalTracksAlgorithm.cc.

202 {
203  unsigned int repeatCounter(0);
204 
205  for (TensorToolVector::const_iterator iter = m_algorithmToolVector.begin(), iterEnd = m_algorithmToolVector.end(); iter != iterEnd;)
206  {
207  if ((*iter)->Run(this, this->GetMatchingControl().GetOverlapTensor()))
208  {
209  iter = m_algorithmToolVector.begin();
210 
211  if (++repeatCounter > m_nMaxTensorToolRepeats)
212  break;
213  }
214  else
215  {
216  ++iter;
217  }
218  }
219 }
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
TensorToolVector m_algorithmToolVector
The algorithm tool vector.
createEngine this
StatusCode lar_content::ThreeViewLongitudinalTracksAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Reimplemented from lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >.

Definition at line 223 of file ThreeViewLongitudinalTracksAlgorithm.cc.

224 {
225  AlgorithmToolVector algorithmToolVector;
226  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmToolList(*this, xmlHandle, "TrackTools", algorithmToolVector));
227 
228  for (AlgorithmToolVector::const_iterator iter = algorithmToolVector.begin(), iterEnd = algorithmToolVector.end(); iter != iterEnd; ++iter)
229  {
230  LongitudinalTensorTool *const pLongitudinalTensorTool(dynamic_cast<LongitudinalTensorTool *>(*iter));
231 
232  if (!pLongitudinalTensorTool)
233  return STATUS_CODE_INVALID_PARAMETER;
234 
235  m_algorithmToolVector.push_back(pLongitudinalTensorTool);
236  }
237 
238  PANDORA_RETURN_RESULT_IF_AND_IF(
239  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "NMaxTensorToolRepeats", m_nMaxTensorToolRepeats));
240 
241  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "VertexChi2Cut", m_vertexChi2Cut));
242 
243  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ReducedChi2Cut", m_reducedChi2Cut));
244 
245  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "SamplingPitch", m_samplingPitch));
246 
247  if (m_samplingPitch < std::numeric_limits<float>::epsilon())
248  return STATUS_CODE_INVALID_PARAMETER;
249 
250  return BaseAlgorithm::ReadSettings(xmlHandle);
251 }
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
float m_samplingPitch
Pitch used to generate sampling points along tracks.
TensorToolVector m_algorithmToolVector
The algorithm tool vector.
float m_vertexChi2Cut
The maximum allowed chi2 for associating end points from three views.
float m_reducedChi2Cut
The maximum allowed chi2 for associating hit positions from three views.

Member Data Documentation

TensorToolVector lar_content::ThreeViewLongitudinalTracksAlgorithm::m_algorithmToolVector
private

The algorithm tool vector.

Definition at line 72 of file ThreeViewLongitudinalTracksAlgorithm.h.

unsigned int lar_content::ThreeViewLongitudinalTracksAlgorithm::m_nMaxTensorToolRepeats
private

The maximum number of repeat loops over tensor tools.

Definition at line 74 of file ThreeViewLongitudinalTracksAlgorithm.h.

float lar_content::ThreeViewLongitudinalTracksAlgorithm::m_reducedChi2Cut
private

The maximum allowed chi2 for associating hit positions from three views.

Definition at line 76 of file ThreeViewLongitudinalTracksAlgorithm.h.

float lar_content::ThreeViewLongitudinalTracksAlgorithm::m_samplingPitch
private

Pitch used to generate sampling points along tracks.

Definition at line 77 of file ThreeViewLongitudinalTracksAlgorithm.h.

float lar_content::ThreeViewLongitudinalTracksAlgorithm::m_vertexChi2Cut
private

The maximum allowed chi2 for associating end points from three views.

Definition at line 75 of file ThreeViewLongitudinalTracksAlgorithm.h.


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