LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
ThreeViewShowersAlgorithm class. More...
#include "ThreeViewShowersAlgorithm.h"
Classes | |
class | XSampling |
XSampling class. More... | |
Public Types | |
typedef NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > > | BaseAlgorithm |
typedef ThreeViewMatchingControl< ShowerOverlapResult > | MatchingType |
Public Member Functions | |
ThreeViewShowersAlgorithm () | |
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 | PrepareInputClusters (pandora::ClusterList &preparedClusterList) |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results. 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... | |
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... | |
virtual void | SetPfoParticleId (PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Set pfo particle id. More... | |
Protected Member Functions | |
MatchingType & | GetMatchingControl () |
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 | |
MatchingType | m_matchingControl |
The matching control. More... | |
Private Types | |
typedef std::pair< ShowerPositionMap, ShowerPositionMap > | ShowerPositionMapPair |
typedef std::vector< ShowerTensorTool * > | TensorToolVector |
Private Member Functions | |
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 container. 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 | 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... | |
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... | |
bool | m_visualize |
Visualize cluster matching procedure. More... | |
ThreeViewShowersAlgorithm class.
Definition at line 29 of file ThreeViewShowersAlgorithm.h.
typedef NViewMatchingAlgorithm<ThreeViewMatchingControl<ShowerOverlapResult> > lar_content::ThreeViewShowersAlgorithm::BaseAlgorithm |
Definition at line 32 of file ThreeViewShowersAlgorithm.h.
|
inherited |
Definition at line 23 of file NViewMatchingAlgorithm.h.
|
private |
Definition at line 118 of file ThreeViewShowersAlgorithm.h.
|
private |
Definition at line 150 of file ThreeViewShowersAlgorithm.h.
lar_content::ThreeViewShowersAlgorithm::ThreeViewShowersAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file ThreeViewShowersAlgorithm.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 136 of file ThreeViewShowersAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), lar_content::LArGeometryHelper::GetWirePitch(), m_slidingFitResultMap, and m_slidingFitWindow.
Referenced by PrepareInputClusters(), and UpdateForNewCluster().
|
privatevirtual |
Calculate cluster overlap result and store in container.
pCluster1 | address of cluster1 |
pCluster2 | address of cluster2 |
pCluster3 | address of cluster3 |
Implements lar_content::MatchingBaseAlgorithm.
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 |
Definition at line 88 of file MatchingBaseAlgorithm.cc.
Referenced by lar_content::NViewDeltaRayMatchingAlgorithm< T >::CreatePfos(), lar_content::ClearRemnantsTool::CreateThreeDParticles(), lar_content::ClearTracksTool::CreateThreeDParticles(), lar_content::TwoViewClearTracksTool::CreateThreeDParticles(), lar_content::ClearLongitudinalTracksTool::CreateThreeDParticles(), lar_content::ClearTrackFragmentsTool::FindTrackFragments(), lar_content::MatchedEndPointsTool::Run(), lar_content::SimpleShowersTool::Run(), lar_content::ConnectedRemnantsTool::Run(), lar_content::MopUpRemnantsTool::Run(), lar_content::TwoViewSimpleTracksTool::Run(), lar_content::MissingTrackTool::Run(), lar_content::TracksCrossingGapsTool::Run(), lar_content::MissingTrackSegmentTool::Run(), lar_content::LongTracksTool::Run(), lar_content::TwoViewLongTracksTool::Run(), and lar_content::ClearShowersTool::Run().
|
privatevirtual |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 323 of file ThreeViewShowersAlgorithm.cc.
References m_algorithmToolVector, and m_nMaxTensorToolRepeats.
|
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 282 of file ThreeViewShowersAlgorithm.cc.
References lar_content::ThreeViewShowersAlgorithm::XSampling::GetBin(), lar_content::ThreeViewShowersAlgorithm::XSampling::m_maxX, lar_content::ThreeViewShowersAlgorithm::XSampling::m_minX, x, and z.
Referenced by RemoveFromSlidingFitCache().
const TwoDSlidingShowerFitResult & lar_content::ThreeViewShowersAlgorithm::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 35 of file ThreeViewShowersAlgorithm.cc.
References m_slidingFitResultMap.
Referenced by lar_content::SplitShowersTool::CheckClusterVertexRelations(), lar_content::SplitShowersTool::GetSplitXDetails(), RemoveFromSlidingFitCache(), and lar_content::SplitShowersTool::SpecifyClusterMerges().
|
virtualinherited |
Get the cluster list name corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
|
virtualinherited |
Get the input cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
|
protectedinherited |
Get the matching control.
Referenced by RemoveFromSlidingFitCache().
|
virtualinherited |
Get the selected cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
|
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 219 of file ThreeViewShowersAlgorithm.cc.
References lar_content::ThreeViewShowersAlgorithm::XSampling::GetBin(), lar_content::TwoDSlidingShowerFitResult::GetShowerEdges(), lar_content::ThreeViewShowersAlgorithm::XSampling::m_maxX, lar_content::ThreeViewShowersAlgorithm::XSampling::m_minX, lar_content::ThreeViewShowersAlgorithm::XSampling::m_nPoints, lar_content::LArGeometryHelper::MergeTwoPositions(), n, and x.
Referenced by RemoveFromSlidingFitCache().
|
virtualinherited |
Merge clusters together.
clusterMergeMap | the cluster merge map |
Definition at line 48 of file MatchingBaseAlgorithm.cc.
Referenced by lar_content::SplitShowersTool::ApplyChanges(), lar_content::ThreeDKinkBaseTool::ApplyChanges(), lar_content::TwoViewThreeDKinkTool::ApplyChanges(), lar_content::ConnectedRemnantsTool::Run(), and lar_content::MissingTrackSegmentTool::Run().
|
protectedvirtualinherited |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult.
Implements lar_content::MatchingBaseAlgorithm.
|
protectedvirtualinherited |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters.
Implements lar_content::MatchingBaseAlgorithm.
|
virtual |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.
preparedClusterList | to receive the prepared cluster list, non const so as to be able to modify input selected list |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 100 of file ThreeViewShowersAlgorithm.cc.
References AddToSlidingFitCache(), and m_visualize.
|
privatevirtual |
Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >.
Definition at line 383 of file ThreeViewShowersAlgorithm.cc.
References m_algorithmToolVector, m_ignoreUnavailableClusters, m_minClusterCaloHits, m_minClusterLengthSquared, m_minShowerMatchedFraction, m_minShowerMatchedPoints, m_nMaxTensorToolRepeats, m_slidingFitWindow, m_visualize, and lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::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 147 of file ThreeViewShowersAlgorithm.cc.
References CalculateOverlapResult(), GetBestHitOverlapFraction(), GetCachedSlidingFitResult(), lar_content::ShowerOverlapResult::GetMatchedFraction(), lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::GetMatchingControl(), lar_content::ShowerOverlapResult::GetNMatchedSamplingPoints(), lar_content::ThreeViewMatchingControl< T >::GetOverlapTensor(), lar_content::TwoDSlidingShowerFitResult::GetShowerFitResult(), GetShowerPositionMaps(), lar_content::ShowerOverlapResult::IsInitialized(), m_minShowerMatchedFraction, m_minShowerMatchedPoints, m_slidingFitResultMap, m_visualize, and lar_content::OverlapTensor< T >::SetOverlapResult().
Referenced by UpdateUponDeletion().
|
protectedvirtualinherited |
Select a subset of input clusters for processing in this algorithm.
Implements lar_content::MatchingBaseAlgorithm.
|
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 |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 74 of file ThreeViewShowersAlgorithm.cc.
References lar_content::LArClusterHelper::GetLengthSquared(), m_ignoreUnavailableClusters, m_minClusterCaloHits, m_minClusterLengthSquared, and m_visualize.
|
virtualinherited |
Set Pfo properties.
protoParticle | the input proto particle |
pfoParameters | the output pfo parameters |
Definition at line 116 of file MatchingBaseAlgorithm.cc.
References f, and lar_content::ProtoParticle::m_clusterList.
|
virtualinherited |
Set pfo particle id.
pfoParameters | the output pfo parameters |
Reimplemented in lar_content::NViewTrackMatchingAlgorithm< T >, lar_content::NViewTrackMatchingAlgorithm< TwoViewMatchingControl< TwoViewTransverseOverlapResult > >, lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< FragmentOverlapResult > >, lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >, and lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > >.
Definition at line 128 of file MatchingBaseAlgorithm.cc.
|
privatevirtual |
Tidy member variables in derived class.
Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >.
Definition at line 128 of file ThreeViewShowersAlgorithm.cc.
References m_slidingFitResultMap, and lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::TidyUp().
|
virtual |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 47 of file ThreeViewShowersAlgorithm.cc.
References AddToSlidingFitCache(), and lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::UpdateForNewCluster().
|
virtual |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 66 of file ThreeViewShowersAlgorithm.cc.
References RemoveFromSlidingFitCache(), and lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::UpdateUponDeletion().
|
private |
The algorithm tool vector.
Definition at line 151 of file ThreeViewShowersAlgorithm.h.
Referenced by ExamineOverlapContainer(), and ReadSettings().
|
private |
Whether to ignore (skip-over) unavailable clusters.
Definition at line 157 of file ThreeViewShowersAlgorithm.h.
Referenced by ReadSettings(), and SelectInputClusters().
|
protectedinherited |
The matching control.
Definition at line 53 of file NViewMatchingAlgorithm.h.
|
private |
The min number of hits in base cluster selection method.
Definition at line 158 of file ThreeViewShowersAlgorithm.h.
Referenced by ReadSettings(), and SelectInputClusters().
|
private |
The min length (squared) in base cluster selection method.
Definition at line 159 of file ThreeViewShowersAlgorithm.h.
Referenced by ReadSettings(), and SelectInputClusters().
|
private |
The minimum shower matched sampling fraction to allow shower grouping.
Definition at line 161 of file ThreeViewShowersAlgorithm.h.
Referenced by ReadSettings(), and RemoveFromSlidingFitCache().
|
private |
The minimum number of matched shower sampling points to allow shower grouping.
Definition at line 162 of file ThreeViewShowersAlgorithm.h.
Referenced by ReadSettings(), and RemoveFromSlidingFitCache().
|
private |
The maximum number of repeat loops over tensor tools.
Definition at line 152 of file ThreeViewShowersAlgorithm.h.
Referenced by ExamineOverlapContainer(), and ReadSettings().
|
private |
The sliding shower fit result map.
Definition at line 155 of file ThreeViewShowersAlgorithm.h.
Referenced by AddToSlidingFitCache(), GetCachedSlidingFitResult(), RemoveFromSlidingFitCache(), and TidyUp().
|
private |
The layer window for the sliding linear fits.
Definition at line 154 of file ThreeViewShowersAlgorithm.h.
Referenced by AddToSlidingFitCache(), and ReadSettings().
|
private |
Visualize cluster matching procedure.
Definition at line 163 of file ThreeViewShowersAlgorithm.h.
Referenced by PrepareInputClusters(), ReadSettings(), RemoveFromSlidingFitCache(), and SelectInputClusters().