Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::ThreeViewShowersAlgorithm Class Reference

ThreeViewShowersAlgorithm class. More...

#include "ThreeViewShowersAlgorithm.h"

Inheritance diagram for lar_content::ThreeViewShowersAlgorithm:
Collaboration diagram for lar_content::ThreeViewShowersAlgorithm:

Classes

class  XSampling
 XSampling class. More...
 

Public Types

typedef NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > > BaseAlgorithm
 
typedef ThreeViewMatchingControl< ShowerOverlapResultMatchingType
 

Public Member Functions

 ThreeViewShowersAlgorithm ()
 Default constructor.
 
const TwoDSlidingShowerFitResultGetCachedSlidingFitResult (const pandora::Cluster *const pCluster) const
 Get a sliding shower fit result from the algorithm cache.
 
void UpdateForNewCluster (const pandora::Cluster *const pNewCluster)
 Update to reflect addition of a new cluster to the problem space.
 
void UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster)
 Update to reflect cluster deletion.
 
void SelectInputClusters (const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const
 Select a subset of input clusters for processing in this algorithm.
 
void PrepareInputClusters (pandora::ClusterList &preparedClusterList)
 Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.
 
const std::string & GetClusterListName (const pandora::HitType hitType) const
 Get the cluster list name corresponding to a specified hit type.
 
const pandora::ClusterListGetInputClusterList (const pandora::HitType hitType) const
 Get the input cluster list corresponding to a specified hit type.
 
const pandora::ClusterListGetSelectedClusterList (const pandora::HitType hitType) const
 Get the selected cluster list corresponding to a specified hit type.
 
virtual bool MakeClusterMerges (const ClusterMergeMap &clusterMergeMap)
 Merge clusters together.
 
virtual bool CreateThreeDParticles (const ProtoParticleVector &protoParticleVector)
 Create particles using findings from recent algorithm processing.
 
virtual void SetPfoParameters (const ProtoParticle &protoParticle, PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
 Set Pfo properties.
 
virtual void SetPfoParticleId (PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
 Set pfo particle id.
 
const std::string & GetType () const
 Get the type.
 
const std::string & GetInstanceName () const
 Get the instance name.
 
const PandoraGetPandora () const
 Get the associated pandora instance.
 

Protected Member Functions

MatchingTypeGetMatchingControl ()
 Get the matching control.
 
virtual void SelectAllInputClusters ()
 Select a subset of input clusters for processing in this algorithm.
 
virtual void PrepareAllInputClusters ()
 Perform any preparatory steps required, e.g. caching expensive fit results for clusters.
 
virtual void PerformMainLoop ()
 Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult.
 
virtual StatusCode Initialize ()
 Perform any operations that must occur after reading settings, but before running the process.
 
virtual StatusCode Reset ()
 Perform any operations when pandora is reset, typically at the end of each event.
 
StatusCode RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName)
 Register i) the pandora instance that will run the process and ii) the process type.
 

Protected Attributes

MatchingType m_matchingControl
 The matching control.
 
const Pandoram_pPandora
 The pandora object that will run the process.
 
std::string m_type
 The process type.
 
std::string m_instanceName
 The process instance name.
 

Private Types

typedef std::pair< ShowerPositionMap, ShowerPositionMapShowerPositionMapPair
 
typedef std::vector< ShowerTensorTool * > TensorToolVector
 

Private Member Functions

void TidyUp ()
 Tidy member variables in derived class.
 
void AddToSlidingFitCache (const pandora::Cluster *const pCluster)
 Add a new sliding fit result, for the specified cluster, to the algorithm cache.
 
void RemoveFromSlidingFitCache (const pandora::Cluster *const pCluster)
 Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
 
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.
 
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.
 
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.
 
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.
 
void ExamineOverlapContainer ()
 Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
pandora::StatusCode Run ()
 Run the algorithm.
 

Private Attributes

TensorToolVector m_algorithmToolVector
 The algorithm tool vector.
 
unsigned int m_nMaxTensorToolRepeats
 The maximum number of repeat loops over tensor tools.
 
unsigned int m_slidingFitWindow
 The layer window for the sliding linear fits.
 
TwoDSlidingShowerFitResultMap m_slidingFitResultMap
 The sliding shower fit result map.
 
bool m_ignoreUnavailableClusters
 Whether to ignore (skip-over) unavailable clusters.
 
unsigned int m_minClusterCaloHits
 The min number of hits in base cluster selection method.
 
float m_minClusterLengthSquared
 The min length (squared) in base cluster selection method.
 
float m_minShowerMatchedFraction
 The minimum shower matched sampling fraction to allow shower grouping.
 
unsigned int m_minShowerMatchedPoints
 The minimum number of matched shower sampling points to allow shower grouping.
 
bool m_visualize
 Visualize cluster matching procedure.
 
std::string m_outputPfoListName
 The output pfo list name.
 

Detailed Description

ThreeViewShowersAlgorithm class.

Definition at line 29 of file ThreeViewShowersAlgorithm.h.

Member Typedef Documentation

◆ BaseAlgorithm

◆ MatchingType

◆ ShowerPositionMapPair

◆ TensorToolVector

Constructor & Destructor Documentation

◆ ThreeViewShowersAlgorithm()

lar_content::ThreeViewShowersAlgorithm::ThreeViewShowersAlgorithm ( )

Default constructor.

Definition at line 21 of file ThreeViewShowersAlgorithm.cc.

Member Function Documentation

◆ AddToSlidingFitCache()

void lar_content::ThreeViewShowersAlgorithm::AddToSlidingFitCache ( const pandora::Cluster *const  pCluster)
private

Add a new sliding fit result, for the specified cluster, to the algorithm cache.

Parameters
pClusteraddress of the relevant cluster

Definition at line 136 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateOverlapResult() [1/2]

void lar_content::ThreeViewShowersAlgorithm::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.

Definition at line 157 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateOverlapResult() [2/2]

StatusCode lar_content::ThreeViewShowersAlgorithm::CalculateOverlapResult ( const pandora::Cluster *const  pClusterU,
const pandora::Cluster *const  pClusterV,
const pandora::Cluster *const  pClusterW,
ShowerOverlapResult 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

Definition at line 169 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:

◆ CreateThreeDParticles()

bool lar_content::MatchingBaseAlgorithm::CreateThreeDParticles ( const ProtoParticleVector protoParticleVector)
virtualinherited

Create particles using findings from recent algorithm processing.

Parameters
protoParticleVectorthe proto particle vector
whetherparticles were created

Definition at line 88 of file MatchingBaseAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExamineOverlapContainer()

void lar_content::ThreeViewShowersAlgorithm::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 323 of file ThreeViewShowersAlgorithm.cc.

◆ GetBestHitOverlapFraction()

void lar_content::ThreeViewShowersAlgorithm::GetBestHitOverlapFraction ( const pandora::Cluster *const  pCluster,
const XSampling xSampling,
const ShowerPositionMapPair positionMaps,
unsigned int &  nSampledHits,
unsigned int &  nMatchedHits 
) const
private

Get the best fraction of hits, in the common x-overlap range, contained within the provided pair of shower boundaries.

Parameters
pClusterthe address of the candidate cluster
xSamplingthe x sampling details
positionMapsthe shower edge position maps
nSampledHitsto receive the number of hits in the common x-overlap range
nMatchedHitsto receive the number of sampled hits contained within the shower edges

Definition at line 282 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCachedSlidingFitResult()

const TwoDSlidingShowerFitResult & lar_content::ThreeViewShowersAlgorithm::GetCachedSlidingFitResult ( const pandora::Cluster *const  pCluster) const

Get a sliding shower fit result from the algorithm cache.

Parameters
pClusteraddress of the relevant cluster

Definition at line 35 of file ThreeViewShowersAlgorithm.cc.

Here is the caller graph for this function:

◆ GetClusterListName()

const std::string & lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::GetClusterListName ( const pandora::HitType  hitType) const
virtualinherited

Get the cluster list name corresponding to a specified hit type.

Parameters
hitTypethe hit type
Returns
the cluster list name

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 37 of file NViewMatchingAlgorithm.cc.

◆ GetInputClusterList()

const pandora::ClusterList & lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::GetInputClusterList ( const pandora::HitType  hitType) const
virtualinherited

Get the input cluster list corresponding to a specified hit type.

Parameters
hitTypethe hit type
Returns
the input cluster list

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 38 of file NViewMatchingAlgorithm.cc.

◆ GetInstanceName()

const std::string & pandora::Process::GetInstanceName ( ) const
inlineinherited

Get the instance name.

Returns
The instance name

Definition at line 109 of file Process.h.

◆ GetMatchingControl()

Get the matching control.

Definition at line 45 of file NViewMatchingAlgorithm.h.

◆ GetPandora()

const Pandora & pandora::Process::GetPandora ( ) const
inlineinherited

Get the associated pandora instance.

Returns
the associated pandora instance

Definition at line 116 of file Process.h.

◆ GetSelectedClusterList()

const pandora::ClusterList & lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::GetSelectedClusterList ( const pandora::HitType  hitType) const
virtualinherited

Get the selected cluster list corresponding to a specified hit type.

Parameters
hitTypethe hit type
Returns
the selected cluster list

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 39 of file NViewMatchingAlgorithm.cc.

◆ GetShowerPositionMaps()

void lar_content::ThreeViewShowersAlgorithm::GetShowerPositionMaps ( const TwoDSlidingShowerFitResult fitResultU,
const TwoDSlidingShowerFitResult fitResultV,
const TwoDSlidingShowerFitResult fitResultW,
const XSampling xSampling,
ShowerPositionMapPair positionMapsU,
ShowerPositionMapPair positionMapsV,
ShowerPositionMapPair positionMapsW 
) const
private

Get the shower position maps.

Parameters
fitResultUthe sliding shower fit result for the u view
fitResultVthe sliding shower fit result for the v view
fitResultWthe sliding shower fit result for the w view
xSamplingthe x sampling details
positionMapsUto receive the shower position maps for the u view
positionMapsVto receive the shower position maps for the v view
positionMapsWto receive the shower position maps for the w view

Definition at line 219 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetType()

const std::string & pandora::Process::GetType ( ) const
inlineinherited

Get the type.

Returns
The type

Definition at line 102 of file Process.h.

◆ Initialize()

StatusCode pandora::Process::Initialize ( )
inlineprotectedvirtualinherited

Perform any operations that must occur after reading settings, but before running the process.

Reimplemented in lar_content::BdtBeamParticleIdTool, lar_content::BeamParticleIdTool, lar_content::CosmicRayTaggingTool, lar_content::EventReadingAlgorithm, lar_content::EventWritingAlgorithm, lar_content::LArPseudoLayerPlugin, lar_content::LArRotationalTransformationPlugin, EventReadingAlgorithm, and EventWritingAlgorithm.

Definition at line 126 of file Process.h.

Here is the caller graph for this function:

◆ MakeClusterMerges()

bool lar_content::MatchingBaseAlgorithm::MakeClusterMerges ( const ClusterMergeMap clusterMergeMap)
virtualinherited

Merge clusters together.

Parameters
clusterMergeMapthe cluster merge map
Returns
whether changes to the overlap container have been made

Definition at line 48 of file MatchingBaseAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PerformMainLoop()

void lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::PerformMainLoop ( )
protectedvirtualinherited

Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult.

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 49 of file NViewMatchingAlgorithm.cc.

◆ PrepareAllInputClusters()

void lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::PrepareAllInputClusters ( )
protectedvirtualinherited

Perform any preparatory steps required, e.g. caching expensive fit results for clusters.

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 48 of file NViewMatchingAlgorithm.cc.

◆ PrepareInputClusters()

void lar_content::ThreeViewShowersAlgorithm::PrepareInputClusters ( pandora::ClusterList preparedClusterList)
virtual

Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.

Parameters
preparedClusterListto 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.

Here is the call graph for this function:

◆ ReadSettings()

StatusCode lar_content::ThreeViewShowersAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >.

Definition at line 383 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:

◆ RegisterDetails()

StatusCode pandora::Process::RegisterDetails ( const Pandora *const  pPandora,
const std::string &  type,
const std::string &  instanceName 
)
inlineprotectedinherited

Register i) the pandora instance that will run the process and ii) the process type.

Parameters
pPandoraaddress of the pandora object that will run the process
typethe process type
instanceNamethe process instance name

Definition at line 146 of file Process.h.

Here is the caller graph for this function:

◆ RemoveFromSlidingFitCache()

void lar_content::ThreeViewShowersAlgorithm::RemoveFromSlidingFitCache ( const pandora::Cluster *const  pCluster)
private

Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.

Parameters
pClusteraddress of the relevant cluster

Definition at line 147 of file ThreeViewShowersAlgorithm.cc.

Here is the caller graph for this function:

◆ Reset()

StatusCode pandora::Process::Reset ( )
inlineprotectedvirtualinherited

Perform any operations when pandora is reset, typically at the end of each event.

Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.

Definition at line 133 of file Process.h.

Here is the caller graph for this function:

◆ Run()

StatusCode lar_content::MatchingBaseAlgorithm::Run ( )
privatevirtualinherited

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 135 of file MatchingBaseAlgorithm.cc.

Here is the call graph for this function:

◆ SelectAllInputClusters()

void lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >::SelectAllInputClusters ( )
protectedvirtualinherited

Select a subset of input clusters for processing in this algorithm.

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 47 of file NViewMatchingAlgorithm.cc.

◆ SelectInputClusters()

void lar_content::ThreeViewShowersAlgorithm::SelectInputClusters ( const pandora::ClusterList *const  pInputClusterList,
pandora::ClusterList selectedClusterList 
) const
virtual

Select a subset of input clusters for processing in this algorithm.

Parameters
pInputClusterListaddress of an input cluster list
selectedClusterListto receive the selected cluster list

Reimplemented from lar_content::MatchingBaseAlgorithm.

Definition at line 74 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:

◆ SetPfoParameters()

void lar_content::MatchingBaseAlgorithm::SetPfoParameters ( const ProtoParticle protoParticle,
PandoraContentApi::ParticleFlowObject::Parameters &  pfoParameters 
) const
virtualinherited

Set Pfo properties.

Parameters
protoParticlethe input proto particle
pfoParametersthe output pfo parameters

Definition at line 116 of file MatchingBaseAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPfoParticleId()

void lar_content::MatchingBaseAlgorithm::SetPfoParticleId ( PandoraContentApi::ParticleFlowObject::Parameters &  pfoParameters) const
virtualinherited

◆ TidyUp()

void lar_content::ThreeViewShowersAlgorithm::TidyUp ( )
privatevirtual

Tidy member variables in derived class.

Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >.

Definition at line 128 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:

◆ UpdateForNewCluster()

void lar_content::ThreeViewShowersAlgorithm::UpdateForNewCluster ( const pandora::Cluster *const  pNewCluster)
virtual

Update to reflect addition of a new cluster to the problem space.

Parameters
pNewClusteraddress of the new cluster

Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >.

Definition at line 47 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:

◆ UpdateUponDeletion()

void lar_content::ThreeViewShowersAlgorithm::UpdateUponDeletion ( const pandora::Cluster *const  pDeletedCluster)
virtual

Update to reflect cluster deletion.

Parameters
pDeletedClusteraddress of the deleted cluster

Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > >.

Definition at line 66 of file ThreeViewShowersAlgorithm.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_algorithmToolVector

TensorToolVector lar_content::ThreeViewShowersAlgorithm::m_algorithmToolVector
private

The algorithm tool vector.

Definition at line 151 of file ThreeViewShowersAlgorithm.h.

◆ m_ignoreUnavailableClusters

bool lar_content::ThreeViewShowersAlgorithm::m_ignoreUnavailableClusters
private

Whether to ignore (skip-over) unavailable clusters.

Definition at line 157 of file ThreeViewShowersAlgorithm.h.

◆ m_instanceName

std::string pandora::Process::m_instanceName
protectedinherited

The process instance name.

Definition at line 89 of file Process.h.

◆ m_matchingControl

The matching control.

Definition at line 53 of file NViewMatchingAlgorithm.h.

◆ m_minClusterCaloHits

unsigned int lar_content::ThreeViewShowersAlgorithm::m_minClusterCaloHits
private

The min number of hits in base cluster selection method.

Definition at line 158 of file ThreeViewShowersAlgorithm.h.

◆ m_minClusterLengthSquared

float lar_content::ThreeViewShowersAlgorithm::m_minClusterLengthSquared
private

The min length (squared) in base cluster selection method.

Definition at line 159 of file ThreeViewShowersAlgorithm.h.

◆ m_minShowerMatchedFraction

float lar_content::ThreeViewShowersAlgorithm::m_minShowerMatchedFraction
private

The minimum shower matched sampling fraction to allow shower grouping.

Definition at line 161 of file ThreeViewShowersAlgorithm.h.

◆ m_minShowerMatchedPoints

unsigned int lar_content::ThreeViewShowersAlgorithm::m_minShowerMatchedPoints
private

The minimum number of matched shower sampling points to allow shower grouping.

Definition at line 162 of file ThreeViewShowersAlgorithm.h.

◆ m_nMaxTensorToolRepeats

unsigned int lar_content::ThreeViewShowersAlgorithm::m_nMaxTensorToolRepeats
private

The maximum number of repeat loops over tensor tools.

Definition at line 152 of file ThreeViewShowersAlgorithm.h.

◆ m_outputPfoListName

std::string lar_content::MatchingBaseAlgorithm::m_outputPfoListName
privateinherited

The output pfo list name.

Definition at line 181 of file MatchingBaseAlgorithm.h.

◆ m_pPandora

const Pandora* pandora::Process::m_pPandora
protectedinherited

The pandora object that will run the process.

Definition at line 87 of file Process.h.

◆ m_slidingFitResultMap

TwoDSlidingShowerFitResultMap lar_content::ThreeViewShowersAlgorithm::m_slidingFitResultMap
private

The sliding shower fit result map.

Definition at line 155 of file ThreeViewShowersAlgorithm.h.

◆ m_slidingFitWindow

unsigned int lar_content::ThreeViewShowersAlgorithm::m_slidingFitWindow
private

The layer window for the sliding linear fits.

Definition at line 154 of file ThreeViewShowersAlgorithm.h.

◆ m_type

std::string pandora::Process::m_type
protectedinherited

The process type.

Definition at line 88 of file Process.h.

◆ m_visualize

bool lar_content::ThreeViewShowersAlgorithm::m_visualize
private

Visualize cluster matching procedure.

Definition at line 163 of file ThreeViewShowersAlgorithm.h.


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