LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
ThreeDShowersAlgorithm class. More...
#include "ThreeDShowersAlgorithm.h"
Classes | |
class | XSampling |
XSampling class. More... | |
Public Types | |
typedef OverlapTensor< ShowerOverlapResult > | TensorType |
Public Member Functions | |
ThreeDShowersAlgorithm () | |
Default constructor. More... | |
const TwoDSlidingShowerFitResult & | GetCachedSlidingFitResult (const pandora::Cluster *const pCluster) const |
Get a sliding shower fit result from the algorithm cache. More... | |
void | UpdateForNewCluster (const pandora::Cluster *const pNewCluster) |
Update to reflect addition of a new cluster to the problem space. More... | |
void | UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster) |
Update to reflect cluster deletion. More... | |
void | SelectInputClusters (const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const |
Select a subset of input clusters for processing in this algorithm. More... | |
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... | |
Protected Member Functions | |
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 | |
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::pair< ShowerPositionMap, ShowerPositionMap > | ShowerPositionMapPair |
typedef std::vector< ShowerTensorTool * > | TensorToolVector |
Private Member Functions | |
void | PreparationStep () |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters. More... | |
void | PreparationStep (pandora::ClusterList &clusterList) |
Preparation step for a specific cluster list. More... | |
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... | |
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, ShowerOverlapResult &overlapResult) |
Calculate the overlap result for given group of clusters. More... | |
void | GetShowerPositionMaps (const TwoDSlidingShowerFitResult &fitResultU, const TwoDSlidingShowerFitResult &fitResultV, const TwoDSlidingShowerFitResult &fitResultW, const XSampling &xSampling, ShowerPositionMapPair &positionMapsU, ShowerPositionMapPair &positionMapsV, ShowerPositionMapPair &positionMapsW) const |
Get the shower position maps. More... | |
void | GetBestHitOverlapFraction (const pandora::Cluster *const pCluster, const XSampling &xSampling, const ShowerPositionMapPair &positionMaps, unsigned int &nSampledHits, unsigned int &nMatchedHits) const |
Get the best fraction of hits, in the common x-overlap range, contained within the provided pair of shower boundaries. 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_slidingFitWindow |
The layer window for the sliding linear fits. More... | |
TwoDSlidingShowerFitResultMap | m_slidingFitResultMap |
The sliding shower fit result map. More... | |
bool | m_ignoreUnavailableClusters |
Whether to ignore (skip-over) unavailable clusters. 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... | |
float | m_minShowerMatchedFraction |
The minimum shower matched sampling fraction to allow shower grouping. More... | |
unsigned int | m_minShowerMatchedPoints |
The minimum number of matched shower sampling points to allow shower grouping. More... | |
ThreeDShowersAlgorithm class.
Definition at line 28 of file ThreeDShowersAlgorithm.h.
|
private |
Definition at line 124 of file ThreeDShowersAlgorithm.h.
|
private |
Definition at line 155 of file ThreeDShowersAlgorithm.h.
|
inherited |
Definition at line 45 of file ThreeDBaseAlgorithm.h.
lar_content::ThreeDShowersAlgorithm::ThreeDShowersAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file ThreeDShowersAlgorithm.cc.
|
private |
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 149 of file ThreeDShowersAlgorithm.cc.
References lar_content::LArGeometryHelper::GetWireZPitch(), m_slidingFitResultMap, and m_slidingFitWindow.
Referenced by PreparationStep(), and UpdateForNewCluster().
|
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< ShowerOverlapResult >.
Referenced by RemoveFromSlidingFitCache().
|
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< ShowerOverlapResult >.
Definition at line 325 of file ThreeDShowersAlgorithm.cc.
References m_algorithmToolVector, m_nMaxTensorToolRepeats, and lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >::m_overlapTensor.
|
private |
Get the best fraction of hits, in the common x-overlap range, contained within the provided pair of shower boundaries.
pCluster | the address of the candidate cluster |
xSampling | the x sampling details |
positionMaps | the shower edge position maps |
nSampledHits | to receive the number of hits in the common x-overlap range |
nMatchedHits | to receive the number of sampled hits contained within the shower edges |
Definition at line 285 of file ThreeDShowersAlgorithm.cc.
References lar_content::ThreeDShowersAlgorithm::XSampling::GetBin(), lar_content::ThreeDShowersAlgorithm::XSampling::m_maxX, lar_content::ThreeDShowersAlgorithm::XSampling::m_minX, max, x, and z.
Referenced by RemoveFromSlidingFitCache().
const TwoDSlidingShowerFitResult & lar_content::ThreeDShowersAlgorithm::GetCachedSlidingFitResult | ( | const pandora::Cluster *const | pCluster | ) | const |
Get a sliding shower fit result from the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 34 of file ThreeDShowersAlgorithm.cc.
References m_slidingFitResultMap.
Referenced by lar_content::SplitShowersTool::CheckClusterVertexRelations(), lar_content::SplitShowersTool::GetSplitXDetails(), RemoveFromSlidingFitCache(), and lar_content::SplitShowersTool::SpecifyClusterMerges().
|
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.
|
inherited |
Get the input u cluster list.
|
inherited |
Get the input v cluster list.
|
inherited |
Get the input w cluster list.
|
inherited |
Get the selected u cluster list.
|
inherited |
Get the selected v cluster list.
|
inherited |
Get the selected w cluster list.
|
private |
Get the shower position maps.
fitResultU | the sliding shower fit result for the u view |
fitResultV | the sliding shower fit result for the v view |
fitResultW | the sliding shower fit result for the w view |
xSampling | the x sampling details |
positionMapsU | to receive the shower position maps for the u view |
positionMapsV | to receive the shower position maps for the v view |
positionMapsW | to receive the shower position maps for the w view |
Definition at line 222 of file ThreeDShowersAlgorithm.cc.
References lar_content::ThreeDShowersAlgorithm::XSampling::GetBin(), lar_content::TwoDSlidingShowerFitResult::GetShowerEdges(), lar_content::ThreeDShowersAlgorithm::XSampling::m_maxX, lar_content::ThreeDShowersAlgorithm::XSampling::m_minX, lar_content::ThreeDShowersAlgorithm::XSampling::m_nPoints, lar_content::LArGeometryHelper::MergeTwoPositions(), n, and x.
Referenced by RemoveFromSlidingFitCache().
|
virtualinherited |
Merge clusters together.
clusterMergeMap | the cluster merge map |
|
protectedvirtualinherited |
Main loop over cluster combinations in order to populate the tensor. Responsible for calling CalculateOverlapResult.
|
privatevirtual |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters.
Reimplemented from lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >.
Definition at line 109 of file ThreeDShowersAlgorithm.cc.
References AddToSlidingFitCache(), lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >::m_clusterListU, lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >::m_clusterListV, and lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >::m_clusterListW.
|
private |
Preparation step for a specific cluster list.
clusterList | the cluster list |
|
privatevirtual |
Reimplemented from lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >.
Definition at line 382 of file ThreeDShowersAlgorithm.cc.
References m_algorithmToolVector, m_ignoreUnavailableClusters, m_minClusterCaloHits, m_minClusterLengthSquared, m_minShowerMatchedFraction, m_minShowerMatchedPoints, m_nMaxTensorToolRepeats, m_slidingFitWindow, and lar_content::ThreeDBaseAlgorithm< T >::ReadSettings().
|
private |
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 160 of file ThreeDShowersAlgorithm.cc.
References CalculateOverlapResult(), GetBestHitOverlapFraction(), GetCachedSlidingFitResult(), lar_content::ShowerOverlapResult::GetMatchedFraction(), lar_content::ShowerOverlapResult::GetNMatchedSamplingPoints(), lar_content::TwoDSlidingShowerFitResult::GetShowerFitResult(), GetShowerPositionMaps(), lar_content::ShowerOverlapResult::IsInitialized(), m_minShowerMatchedFraction, m_minShowerMatchedPoints, lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >::m_overlapTensor, m_slidingFitResultMap, and lar_content::OverlapTensor< T >::SetOverlapResult().
Referenced by UpdateUponDeletion().
|
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.
|
virtual |
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< ShowerOverlapResult >.
Definition at line 73 of file ThreeDShowersAlgorithm.cc.
References lar_content::LArClusterHelper::GetLengthSquared(), m_ignoreUnavailableClusters, m_minClusterCaloHits, and m_minClusterLengthSquared.
|
virtual |
Calculate Pfo properties from proto particle.
protoParticle | the input proto particle |
pfoParameters | the output pfo parameters |
Implements lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >.
Definition at line 94 of file ThreeDShowersAlgorithm.cc.
References f, lar_content::ProtoParticle::m_clusterListU, lar_content::ProtoParticle::m_clusterListV, and lar_content::ProtoParticle::m_clusterListW.
|
privatevirtual |
Tidy member variables in derived class.
Reimplemented from lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >.
Definition at line 141 of file ThreeDShowersAlgorithm.cc.
References m_slidingFitResultMap, and lar_content::ThreeDBaseAlgorithm< T >::TidyUp().
|
virtual |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Reimplemented from lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >.
Definition at line 46 of file ThreeDShowersAlgorithm.cc.
References AddToSlidingFitCache(), and lar_content::ThreeDBaseAlgorithm< T >::UpdateForNewCluster().
|
virtual |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Reimplemented from lar_content::ThreeDBaseAlgorithm< ShowerOverlapResult >.
Definition at line 65 of file ThreeDShowersAlgorithm.cc.
References RemoveFromSlidingFitCache(), and lar_content::ThreeDBaseAlgorithm< T >::UpdateUponDeletion().
|
private |
The algorithm tool vector.
Definition at line 156 of file ThreeDShowersAlgorithm.h.
Referenced by ExamineTensor(), and ReadSettings().
|
protectedinherited |
The selected modified cluster list U.
Definition at line 196 of file ThreeDBaseAlgorithm.h.
Referenced by PreparationStep().
|
protectedinherited |
The selected modified cluster list V.
Definition at line 197 of file ThreeDBaseAlgorithm.h.
Referenced by PreparationStep().
|
protectedinherited |
The selected modified cluster list W.
Definition at line 198 of file ThreeDBaseAlgorithm.h.
Referenced by PreparationStep().
|
private |
Whether to ignore (skip-over) unavailable clusters.
Definition at line 162 of file ThreeDShowersAlgorithm.h.
Referenced by ReadSettings(), and SelectInputClusters().
|
private |
The min number of hits in base cluster selection method.
Definition at line 163 of file ThreeDShowersAlgorithm.h.
Referenced by ReadSettings(), and SelectInputClusters().
|
private |
The min length (squared) in base cluster selection method.
Definition at line 164 of file ThreeDShowersAlgorithm.h.
Referenced by ReadSettings(), and SelectInputClusters().
|
private |
The minimum shower matched sampling fraction to allow shower grouping.
Definition at line 166 of file ThreeDShowersAlgorithm.h.
Referenced by ReadSettings(), and RemoveFromSlidingFitCache().
|
private |
The minimum number of matched shower sampling points to allow shower grouping.
Definition at line 167 of file ThreeDShowersAlgorithm.h.
Referenced by ReadSettings(), and RemoveFromSlidingFitCache().
|
private |
The maximum number of repeat loops over tensor tools.
Definition at line 157 of file ThreeDShowersAlgorithm.h.
Referenced by ExamineTensor(), and ReadSettings().
|
protectedinherited |
The overlap tensor.
Definition at line 200 of file ThreeDBaseAlgorithm.h.
Referenced by ExamineTensor(), and RemoveFromSlidingFitCache().
|
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 sliding shower fit result map.
Definition at line 160 of file ThreeDShowersAlgorithm.h.
Referenced by AddToSlidingFitCache(), GetCachedSlidingFitResult(), RemoveFromSlidingFitCache(), and TidyUp().
|
private |
The layer window for the sliding linear fits.
Definition at line 159 of file ThreeDShowersAlgorithm.h.
Referenced by AddToSlidingFitCache(), and ReadSettings().