LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
ThreeDTransverseTracksAlgorithm class. More...
#include "ThreeDTransverseTracksAlgorithm.h"
Public Types | |
typedef OverlapTensor< TransverseOverlapResult > | TensorType |
Public Member Functions | |
ThreeDTransverseTracksAlgorithm () | |
Default constructor. More... | |
const TwoDSlidingFitResult & | GetCachedSlidingFitResult (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 | SetPfoParameters (const ProtoParticle &protoParticle, PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Calculate Pfo properties from proto particle. More... | |
virtual bool | CreateThreeDParticles (const ProtoParticleVector &protoParticleVector) |
Create particles using findings from recent algorithm processing. More... | |
virtual bool | MakeClusterMerges (const ClusterMergeMap &clusterMergeMap) |
Merge clusters together. More... | |
virtual void | RemoveUnavailableTensorElements () |
Update tensor to remove all elements that have been added to pfos and so are unavailable. More... | |
const pandora::ClusterList & | GetInputClusterListU () const |
Get the input u cluster list. More... | |
const pandora::ClusterList & | GetInputClusterListV () const |
Get the input v cluster list. More... | |
const pandora::ClusterList & | GetInputClusterListW () const |
Get the input w cluster list. More... | |
const pandora::ClusterList & | GetSelectedClusterListU () const |
Get the selected u cluster list. More... | |
const pandora::ClusterList & | GetSelectedClusterListV () const |
Get the selected v cluster list. More... | |
const pandora::ClusterList & | GetSelectedClusterListW () const |
Get the selected w cluster list. More... | |
const std::string & | GetClusterListNameU () const |
Get the name of the u cluster list. More... | |
const std::string & | GetClusterListNameV () const |
Get the name of the v cluster list. More... | |
const std::string & | GetClusterListNameW () const |
Get the name of the w cluster list. More... | |
Static Public Member Functions | |
static bool | SortSplitPositions (const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs) |
Sort split position cartesian vectors by increasing x coordinate. More... | |
Protected Member Functions | |
virtual void | PreparationStep () |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters. More... | |
virtual void | PreparationStep (pandora::ClusterList &clusterList) |
Preparation step for a specific cluster list. More... | |
virtual void | TidyUp () |
Tidy member variables in derived class. More... | |
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 | SelectAllInputClusters () |
Select a subset of input clusters for processing in this algorithm. More... | |
virtual void | PerformMainLoop () |
Main loop over cluster combinations in order to populate the tensor. Responsible for calling CalculateOverlapResult. More... | |
Protected Attributes | |
unsigned int | m_slidingFitWindow |
The layer window for the sliding linear fits. More... | |
TwoDSlidingFitResultMap | m_slidingFitResultMap |
The sliding fit result map. More... | |
unsigned int | m_minClusterCaloHits |
The min number of hits in base cluster selection method. More... | |
float | m_minClusterLengthSquared |
The min length (squared) in base cluster selection method. More... | |
const pandora::ClusterList * | m_pInputClusterListU |
Address of the input cluster list U. More... | |
const pandora::ClusterList * | m_pInputClusterListV |
Address of the input cluster list V. More... | |
const pandora::ClusterList * | m_pInputClusterListW |
Address of the input cluster list W. More... | |
pandora::ClusterList | m_clusterListU |
The selected modified cluster list U. More... | |
pandora::ClusterList | m_clusterListV |
The selected modified cluster list V. More... | |
pandora::ClusterList | m_clusterListW |
The selected modified cluster list W. More... | |
TensorType | m_overlapTensor |
The overlap tensor. More... | |
Private Types | |
typedef std::map< unsigned int, TransverseOverlapResult > | FitSegmentToOverlapResultMap |
typedef std::map< unsigned int, FitSegmentToOverlapResultMap > | FitSegmentMatrix |
typedef std::map< unsigned int, FitSegmentMatrix > | FitSegmentTensor |
typedef std::vector< TransverseTensorTool * > | 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 tensor. More... | |
pandora::StatusCode | CalculateOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, TransverseOverlapResult &overlapResult) |
Calculate the overlap result for given group of clusters. More... | |
void | GetFitSegmentTensor (const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW, FitSegmentTensor &fitSegmentTensor) const |
Get the number of matched points for three fit segments and accompanying sliding fit results. More... | |
pandora::StatusCode | GetSegmentOverlap (const FitSegment &fitSegmentU, const FitSegment &fitSegmentV, const FitSegment &fitSegmentW, const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW, TransverseOverlapResult &transverseOverlapResult) const |
Get the overlap result for three fit segments and the accompanying sliding fit results. More... | |
void | GetBestOverlapResult (const FitSegmentTensor &fitSegmentTensor, TransverseOverlapResult &bestTransverseOverlapResult) const |
Get the best overlap result, by examining the fit segment tensor. More... | |
void | GetPreviousOverlapResults (const unsigned int indexU, const unsigned int indexV, const unsigned int indexW, FitSegmentTensor &fitSegmentSumTensor, TransverseOverlapResultVector &transverseOverlapResultVector) const |
Get track overlap results for possible connected segments. More... | |
void | ExamineTensor () |
Examine contents of tensor, 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... | |
unsigned int | m_maxFitSegmentIndex |
The maximum number of fit segments used when identifying best overlap result. More... | |
float | m_pseudoChi2Cut |
The pseudo chi2 cut to identify matched sampling points. More... | |
float | m_minSegmentMatchedFraction |
The minimum segment matched sampling fraction to allow segment grouping. More... | |
unsigned int | m_minSegmentMatchedPoints |
The minimum number of matched segment sampling points to allow segment grouping. More... | |
float | m_minOverallMatchedFraction |
The minimum matched sampling fraction to allow particle creation. More... | |
unsigned int | m_minOverallMatchedPoints |
The minimum number of matched segment sampling points to allow particle creation. More... | |
float | m_minSamplingPointsPerLayer |
The minimum number of sampling points per layer to allow particle creation. More... | |
ThreeDTransverseTracksAlgorithm class.
Definition at line 28 of file ThreeDTransverseTracksAlgorithm.h.
|
private |
Definition at line 38 of file ThreeDTransverseTracksAlgorithm.h.
|
private |
Definition at line 39 of file ThreeDTransverseTracksAlgorithm.h.
|
private |
Definition at line 37 of file ThreeDTransverseTracksAlgorithm.h.
|
private |
Definition at line 106 of file ThreeDTransverseTracksAlgorithm.h.
|
inherited |
Definition at line 45 of file ThreeDBaseAlgorithm.h.
lar_content::ThreeDTransverseTracksAlgorithm::ThreeDTransverseTracksAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file ThreeDTransverseTracksAlgorithm.cc.
References CalculateOverlapResult(), f, GetBestOverlapResult(), lar_content::ThreeDTracksBaseAlgorithm< TransverseOverlapResult >::GetCachedSlidingFitResult(), GetFitSegmentTensor(), lar_content::TrackOverlapResult::GetMatchedFraction(), lar_content::TwoDSlidingFitResult::GetMaxLayer(), lar_content::TwoDSlidingFitResult::GetMinLayer(), lar_content::TrackOverlapResult::GetNMatchedSamplingPoints(), lar_content::TrackOverlapResult::GetNSamplingPoints(), lar_content::TrackOverlapResult::IsInitialized(), m_minOverallMatchedFraction, m_minOverallMatchedPoints, m_minSamplingPointsPerLayer, lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >::m_overlapTensor, and lar_content::OverlapTensor< T >::SetOverlapResult().
|
protectedinherited |
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
pCluster | address of the relevant cluster |
|
privatevirtual |
Calculate cluster overlap result and store in tensor.
pClusterU | address of U view cluster |
pClusterV | address of V view cluster |
pClusterW | address of W view cluster |
Implements lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
Referenced by ThreeDTransverseTracksAlgorithm().
|
private |
Calculate the overlap result for given group of clusters.
pClusterU | the cluster from the U view |
pClusterV | the cluster from the V view |
pClusterW | the cluster from the W view |
overlapResult | to receive the overlap result |
|
virtualinherited |
Create particles using findings from recent algorithm processing.
protoParticleVector | the proto particle vector |
whether | particles were created |
|
privatevirtual |
Examine contents of tensor, collect together best-matching 2D particles and modify clusters as required.
Implements lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
Definition at line 288 of file ThreeDTransverseTracksAlgorithm.cc.
References m_algorithmToolVector, m_nMaxTensorToolRepeats, and lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >::m_overlapTensor.
|
private |
Get the best overlap result, by examining the fit segment tensor.
fitSegmentTensor | the fit segment tensor |
bestTransverseOverlapResult | to receive the best transverse overlap result |
Definition at line 188 of file ThreeDTransverseTracksAlgorithm.cc.
References GetPreviousOverlapResults(), lar_content::TrackOverlapResult::IsInitialized(), m_maxFitSegmentIndex, max, and min.
Referenced by ThreeDTransverseTracksAlgorithm().
|
inherited |
Get a sliding fit result from the algorithm cache.
pCluster | address of the relevant cluster |
Referenced by ThreeDTransverseTracksAlgorithm().
|
inherited |
Get the name of the u cluster list.
|
inherited |
Get the name of the v cluster list.
|
inherited |
Get the name of the w cluster list.
|
private |
Get the number of matched points for three fit segments and accompanying sliding fit results.
slidingFitResultU | sliding fit result for u cluster |
slidingFitResultV | sliding fit result for v cluster |
slidingFitResultW | sliding fit result for w cluster |
fitSegmentTensor | the fit segment tensor |
Definition at line 84 of file ThreeDTransverseTracksAlgorithm.cc.
References lar_content::TwoDSlidingFitResult::GetFitSegmentList(), GetSegmentOverlap(), m_minSegmentMatchedFraction, and m_minSegmentMatchedPoints.
Referenced by ThreeDTransverseTracksAlgorithm().
|
inherited |
Get the input u cluster list.
|
inherited |
Get the input v cluster list.
|
inherited |
Get the input w cluster list.
|
private |
Get track overlap results for possible connected segments.
indexU | the index u |
indexV | the index v |
indexW | the index w |
transverseOverlapResultVector | the transverse overlap result vector |
Definition at line 260 of file ThreeDTransverseTracksAlgorithm.cc.
References lar_content::TrackOverlapResult::IsInitialized(), and x1.
Referenced by GetBestOverlapResult().
|
private |
Get the overlap result for three fit segments and the accompanying sliding fit results.
fitSegmentU | the fit segment u |
fitSegmentV | the fit segment v |
fitSegmentW | the fit segment w |
slidingFitResultU | sliding fit result for u cluster |
slidingFitResultV | sliding fit result for v cluster |
slidingFitResultW | sliding fit result for w cluster |
transverseOverlapResult | to receive the transverse overlap result |
Definition at line 118 of file ThreeDTransverseTracksAlgorithm.cc.
References f, lar_content::FitSegment::GetEndLayer(), lar_content::FitSegment::GetMaxX(), lar_content::FitSegment::GetMinX(), lar_content::FitSegment::GetStartLayer(), lar_content::TwoDSlidingFitResult::GetTransverseProjection(), m_pseudoChi2Cut, max, lar_content::LArGeometryHelper::MergeTwoPositions(), min, n, w, and x.
Referenced by GetFitSegmentTensor().
|
inherited |
Get the selected u cluster list.
|
inherited |
Get the selected v cluster list.
|
inherited |
Get the selected w cluster list.
|
inherited |
Get the layer window for the sliding linear fits.
|
virtualinherited |
Merge clusters together.
clusterMergeMap | the cluster merge map |
|
virtualinherited |
Make a cluster split.
splitPosition | the split position |
pCurrentCluster | the cluster to split |
pLowXCluster | to receive the low x cluster |
pHighXCluster | to receive the high x cluster |
|
virtualinherited |
Make cluster splits.
splitPositionMap | the split position map |
|
protectedvirtualinherited |
Main loop over cluster combinations in order to populate the tensor. Responsible for calling CalculateOverlapResult.
|
protectedvirtualinherited |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters.
Reimplemented from lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
|
protectedvirtualinherited |
Preparation step for a specific cluster list.
clusterList | the cluster list |
|
privatevirtual |
Reimplemented from lar_content::ThreeDTracksBaseAlgorithm< TransverseOverlapResult >.
Definition at line 311 of file ThreeDTransverseTracksAlgorithm.cc.
References m_algorithmToolVector, m_maxFitSegmentIndex, m_minOverallMatchedFraction, m_minOverallMatchedPoints, m_minSamplingPointsPerLayer, m_minSegmentMatchedFraction, m_minSegmentMatchedPoints, m_nMaxTensorToolRepeats, m_pseudoChi2Cut, and lar_content::ThreeDTracksBaseAlgorithm< T >::ReadSettings().
|
protectedinherited |
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
pCluster | address of the relevant cluster |
|
virtualinherited |
Update tensor to remove all elements that have been added to pfos and so are unavailable.
|
protectedvirtualinherited |
Select a subset of input clusters for processing in this algorithm.
|
virtualinherited |
Select a subset of input clusters for processing in this algorithm.
pInputClusterList | address of an input cluster list |
selectedClusterList | to receive the selected cluster list |
Implements lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
|
virtualinherited |
Calculate Pfo properties from proto particle.
protoParticle | the input proto particle |
pfoParameters | the output pfo parameters |
Implements lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
|
staticinherited |
Sort split position cartesian vectors by increasing x coordinate.
lhs | the first cartesian vector |
rhs | the second cartesian vector |
|
protectedvirtualinherited |
Tidy member variables in derived class.
Reimplemented from lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
|
virtualinherited |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Reimplemented from lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
|
virtualinherited |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Reimplemented from lar_content::ThreeDBaseAlgorithm< TransverseOverlapResult >.
|
private |
The algorithm tool vector.
Definition at line 107 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by ExamineTensor(), and ReadSettings().
|
protectedinherited |
The selected modified cluster list U.
Definition at line 196 of file ThreeDBaseAlgorithm.h.
|
protectedinherited |
The selected modified cluster list V.
Definition at line 197 of file ThreeDBaseAlgorithm.h.
|
protectedinherited |
The selected modified cluster list W.
Definition at line 198 of file ThreeDBaseAlgorithm.h.
|
private |
The maximum number of fit segments used when identifying best overlap result.
Definition at line 110 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by GetBestOverlapResult(), and ReadSettings().
|
protectedinherited |
The min number of hits in base cluster selection method.
Definition at line 121 of file ThreeDTracksBaseAlgorithm.h.
|
protectedinherited |
The min length (squared) in base cluster selection method.
Definition at line 122 of file ThreeDTracksBaseAlgorithm.h.
|
private |
The minimum matched sampling fraction to allow particle creation.
Definition at line 114 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and ThreeDTransverseTracksAlgorithm().
|
private |
The minimum number of matched segment sampling points to allow particle creation.
Definition at line 115 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and ThreeDTransverseTracksAlgorithm().
|
private |
The minimum number of sampling points per layer to allow particle creation.
Definition at line 116 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and ThreeDTransverseTracksAlgorithm().
|
private |
The minimum segment matched sampling fraction to allow segment grouping.
Definition at line 112 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by GetFitSegmentTensor(), and ReadSettings().
|
private |
The minimum number of matched segment sampling points to allow segment grouping.
Definition at line 113 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by GetFitSegmentTensor(), and ReadSettings().
|
private |
The maximum number of repeat loops over tensor tools.
Definition at line 109 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by ExamineTensor(), and ReadSettings().
|
protectedinherited |
The overlap tensor.
Definition at line 200 of file ThreeDBaseAlgorithm.h.
Referenced by ExamineTensor(), and ThreeDTransverseTracksAlgorithm().
|
protectedinherited |
Address of the input cluster list U.
Definition at line 192 of file ThreeDBaseAlgorithm.h.
|
protectedinherited |
Address of the input cluster list V.
Definition at line 193 of file ThreeDBaseAlgorithm.h.
|
protectedinherited |
Address of the input cluster list W.
Definition at line 194 of file ThreeDBaseAlgorithm.h.
|
private |
The pseudo chi2 cut to identify matched sampling points.
Definition at line 111 of file ThreeDTransverseTracksAlgorithm.h.
Referenced by GetSegmentOverlap(), and ReadSettings().
|
protectedinherited |
The sliding fit result map.
Definition at line 119 of file ThreeDTracksBaseAlgorithm.h.
|
protectedinherited |
The layer window for the sliding linear fits.
Definition at line 118 of file ThreeDTracksBaseAlgorithm.h.