Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::NViewDeltaRayMatchingAlgorithm< T > Class Template Referenceabstract

NViewDeltaRayMatchingAlgorithm class. More...

#include "NViewDeltaRayMatchingAlgorithm.h"

Inheritance diagram for lar_content::NViewDeltaRayMatchingAlgorithm< T >:
Collaboration diagram for lar_content::NViewDeltaRayMatchingAlgorithm< T >:

Public Types

typedef std::map< const pandora::CaloHit *, const pandora::Cluster * > HitToClusterMap
 
typedef std::map< const pandora::Cluster *, const pandora::ParticleFlowObject * > ClusterToPfoMap
 
typedef std::map< const pandora::Cluster *, pandora::ClusterListClusterProximityMap
 
typedef KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > HitKDTree2D
 
typedef KDTreeNodeInfoT< const pandora::CaloHit *, 2 > HitKDNode2D
 
typedef std::vector< HitKDNode2DHitKDNode2DList
 
typedef std::vector< pandora::HitTypeHitTypeVector
 
typedef T MatchingType
 

Public Member Functions

 NViewDeltaRayMatchingAlgorithm ()
 Default constructor.
 
pandora::StatusCode GetMuonCluster (const pandora::PfoList &commonMuonPfoList, const pandora::HitType hitType, const pandora::Cluster *&pMuonCluster) const
 Return the cluster of the common cosmic ray pfo in a given view (function demands there to be only one common CR pfo)
 
pandora::StatusCode PerformThreeViewMatching (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3, float &reducedChiSquared) const
 To determine how well three clusters (one in each view) map onto one another expressing this in terms of a chi-squared like parameter.
 
pandora::StatusCode PerformThreeViewMatching (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, float &chiSquaredSum, unsigned int &nSamplingPoints, unsigned int &nMatchedSamplingPoints, XOverlap &XOverlap) const
 To determine how well three clusters (one in each view) map onto one another expressing this in terms of a chi-squared like parameter.
 
pandora::StatusCode PerformThreeViewMatching (const pandora::CaloHitList &pCluster1, const pandora::CaloHitList &pCluster2, const pandora::CaloHitList &pCluster3, float &reducedChiSquared) const
 To determine how well three CaloHitLists (one in each view) map onto one another expressing this in terms of a chi-squared like parameter.
 
pandora::StatusCode PerformThreeViewMatching (const pandora::CaloHitList &clusterU, const pandora::CaloHitList &clusterV, const pandora::CaloHitList &clusterW, float &chiSquaredSum, unsigned int &nSamplingPoints, unsigned int &nMatchedSamplingPoints, XOverlap &XOverlap) const
 To determine how well three CaloHitLists (one for each view) map onto one another expressing this in terms of a chi-squared like parameter.
 
pandora::StatusCode ProjectMuonPositions (const pandora::HitType &thirdViewHitType, const pandora::ParticleFlowObject *const pParentMuon, pandora::CartesianPointVector &projectedPositions) const
 Use two views of a cosmic ray pfo to calculate projected positions in a given the third view.
 
pandora::StatusCode GetProjectedPositions (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, pandora::CartesianPointVector &projectedPositions) const
 Use two clusters from different views to calculate projected positions in the remaining third view.
 
pandora::StatusCode CollectHitsFromMuon (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pThirdViewCluster, const pandora::ParticleFlowObject *const pParentMuon, const float minDistanceFromMuon, const float maxDistanceToCollected, pandora::CaloHitList &collectedHits) const
 In one view, pull out any hits from a cosmic ray cluster that belong to the child delta ray cluster.
 
void CollectHitsFromMuon (const pandora::CartesianVector &positionOnMuon, const pandora::CartesianVector &muonDirection, const pandora::Cluster *const pMuonCluster, const pandora::CartesianPointVector &deltaRayProjectedPositions, const float &minDistanceFromMuon, const float maxDistanceToCollected, pandora::CaloHitList &collectedHits) const
 In one view, pull out any hits from a cosmic ray cluster that belong to the child delta ray cluster.
 
pandora::StatusCode ParameteriseMuon (const pandora::ParticleFlowObject *const pParentMuon, const pandora::Cluster *const pDeltaRayCluster, pandora::CartesianVector &positionOnMuon, pandora::CartesianVector &muonDirection) const
 Parameterise the projection of a cosmic ray track in order to avoid poor/sparse projections.
 
pandora::StatusCode ParameteriseMuon (const pandora::ParticleFlowObject *const pParentMuon, const pandora::CartesianPointVector &deltaRayProjectedPositions, const pandora::HitType hitType, pandora::CartesianVector &positionOnMuon, pandora::CartesianVector &muonDirection) const
 Parameterise the projection of a cosmic ray track in order to avoid poor/sparse projections.
 
void SplitMuonCluster (const std::string &clusterListName, const pandora::Cluster *const pMuonCluster, const pandora::CaloHitList &collectedHits, const pandora::Cluster *&pDeltaRayCluster) const
 Move a list of hits from a cosmic ray cluster into the given child delta ray cluster.
 
bool CreatePfos (ProtoParticleVector &protoParticleVector)
 Create delta ray pfos maxmising completeness by searching for and merging in any stray clusters.
 
void UpdateForNewClusters (const pandora::ClusterVector &newClusterVector, const pandora::PfoVector &pfoVector)
 Add a new cluster to algorithm ownership maps and, if it a delta ray cluster, to the underlying matches container (tensor/matrix)
 
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.
 
void UpdateForNewCluster (const pandora::Cluster *const pNewCluster)
 Update to reflect addition of a new cluster to the problem space.
 
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 void CalculateOverlapResult (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3=nullptr)=0
 Calculate cluster overlap result and store in container.
 
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

virtual bool DoesClusterPassTensorThreshold (const pandora::Cluster *const pCluster) const =0
 To check whether a given cluster meets the requirements to be added into the matching container (tensor/matrix)
 
void FillStrayClusterList (const pandora::HitType hitType)
 Fill the stray cluster list with clusters that do not pass the tensor threshold requirement.
 
void GetNearbyMuonPfos (const pandora::Cluster *const pCluster, pandora::ClusterList &consideredClusters, pandora::PfoList &nearbyMuonPfos) const
 Use the cluster proximity map to travel along paths of nearby clusters finding the cosmic ray clusters on which they terminate.
 
void GetClusterSpanX (const pandora::CaloHitList &caloHitList, float &xMin, float &xMax) const
 Calculate the xSpan of a list of CaloHits.
 
pandora::StatusCode GetClusterSpanZ (const pandora::CaloHitList &caloHitList, const float xMin, const float xMax, float &zMin, float &zMax) const
 Calculate the zSpan of a list of CaloHits in a specified x range.
 
void CollectStrayClusters (const pandora::Cluster *const pClusterToEnlarge, const float rangeMinX, const float rangeMaxX, pandora::ClusterList &collectedClusters)
 Collect the stray clusters that are close to a specified cluster and that lie within a given x range.
 
void AddInStrayClusters (const pandora::Cluster *const pClusterToEnlarge, const pandora::ClusterList &collectedClusters)
 Merge in the collected stray clusters of a given delta ray cluster.
 
void TidyUp ()
 Tidy member variables in derived class.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
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 void ExamineOverlapContainer ()=0
 Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
 
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

std::string m_muonPfoListName
 The list of reconstructed cosmic ray pfos.
 
pandora::ClusterList m_strayClusterListU
 The list of U clusters that do not pass the tensor threshold requirement.
 
pandora::ClusterList m_strayClusterListV
 The list of V clusters that do not pass the tensor threshold requirement.
 
pandora::ClusterList m_strayClusterListW
 The list of W clusters that do not pass the tensor threshold requirement.
 
DeltaRayMatchingContainers m_deltaRayMatchingContainers
 The class of hit, cluster and pfo ownership and proximity maps.
 
float m_pseudoChi2Cut
 Pseudo chi2 cut for three view matching.
 
float m_xOverlapWindow
 The maximum allowed displacement in x position.
 
float m_minMatchedFraction
 The threshold matched fraction of sampling points for a good match.
 
unsigned int m_minMatchedPoints
 The threshold number of matched sampling points for a good match.
 
unsigned int m_minProjectedPositions
 The threshold number of projected points for a good projection.
 
float m_maxCosmicRayHitFraction
 The maximum allowed fraction of hits to be removed from the cosmic ray track.
 
float m_maxDistanceToCluster
 the maximum distance of a projected point to the cosmic ray cluster used when parameterising the cosmic ray cluster
 
float m_maxDistanceToReferencePoint
 the maximum distance of a projected point to the cosmic ray vertex used when parameterising the cosmic ray cluster
 
float m_strayClusterSeparation
 The maximum allowed separation of a stray cluster and a delta ray cluster for merge.
 
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 Member Functions

pandora::StatusCode Run ()
 Run the algorithm.
 

Private Attributes

std::string m_outputPfoListName
 The output pfo list name.
 

Detailed Description

template<typename T>
class lar_content::NViewDeltaRayMatchingAlgorithm< T >

NViewDeltaRayMatchingAlgorithm class.

Definition at line 23 of file NViewDeltaRayMatchingAlgorithm.h.

Member Typedef Documentation

◆ ClusterProximityMap

template<typename T >
typedef std::map<const pandora::Cluster *, pandora::ClusterList> lar_content::NViewDeltaRayMatchingAlgorithm< T >::ClusterProximityMap

Definition at line 28 of file NViewDeltaRayMatchingAlgorithm.h.

◆ ClusterToPfoMap

template<typename T >
typedef std::map<const pandora::Cluster *, const pandora::ParticleFlowObject *> lar_content::NViewDeltaRayMatchingAlgorithm< T >::ClusterToPfoMap

Definition at line 27 of file NViewDeltaRayMatchingAlgorithm.h.

◆ HitKDNode2D

template<typename T >
typedef KDTreeNodeInfoT<const pandora::CaloHit *, 2> lar_content::NViewDeltaRayMatchingAlgorithm< T >::HitKDNode2D

Definition at line 31 of file NViewDeltaRayMatchingAlgorithm.h.

◆ HitKDNode2DList

template<typename T >
typedef std::vector<HitKDNode2D> lar_content::NViewDeltaRayMatchingAlgorithm< T >::HitKDNode2DList

Definition at line 32 of file NViewDeltaRayMatchingAlgorithm.h.

◆ HitKDTree2D

template<typename T >
typedef KDTreeLinkerAlgo<const pandora::CaloHit *, 2> lar_content::NViewDeltaRayMatchingAlgorithm< T >::HitKDTree2D

Definition at line 30 of file NViewDeltaRayMatchingAlgorithm.h.

◆ HitToClusterMap

template<typename T >
typedef std::map<const pandora::CaloHit *, const pandora::Cluster *> lar_content::NViewDeltaRayMatchingAlgorithm< T >::HitToClusterMap

Definition at line 26 of file NViewDeltaRayMatchingAlgorithm.h.

◆ HitTypeVector

template<typename T >
typedef std::vector<pandora::HitType> lar_content::NViewDeltaRayMatchingAlgorithm< T >::HitTypeVector

Definition at line 34 of file NViewDeltaRayMatchingAlgorithm.h.

◆ MatchingType

template<typename T >
typedef T lar_content::NViewMatchingAlgorithm< T >::MatchingType
inherited

Definition at line 23 of file NViewMatchingAlgorithm.h.

Constructor & Destructor Documentation

◆ NViewDeltaRayMatchingAlgorithm()

template<typename T >
lar_content::NViewDeltaRayMatchingAlgorithm< T >::NViewDeltaRayMatchingAlgorithm ( )

Default constructor.

Definition at line 33 of file NViewDeltaRayMatchingAlgorithm.cc.

Member Function Documentation

◆ AddInStrayClusters()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::AddInStrayClusters ( const pandora::Cluster *const  pClusterToEnlarge,
const pandora::ClusterList collectedClusters 
)
protected

Merge in the collected stray clusters of a given delta ray cluster.

Parameters
pClusterToEnlargethe delta ray cluster to enlarge
collectedClustersthe list of collected stray clusters

Definition at line 813 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ CalculateOverlapResult()

virtual void lar_content::MatchingBaseAlgorithm::CalculateOverlapResult ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
const pandora::Cluster *const  pCluster3 = nullptr 
)
pure virtualinherited

◆ CollectHitsFromMuon() [1/2]

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::CollectHitsFromMuon ( const pandora::CartesianVector positionOnMuon,
const pandora::CartesianVector muonDirection,
const pandora::Cluster *const  pMuonCluster,
const pandora::CartesianPointVector deltaRayProjectedPositions,
const float &  minDistanceFromMuon,
const float  maxDistanceToCollected,
pandora::CaloHitList collectedHits 
) const

In one view, pull out any hits from a cosmic ray cluster that belong to the child delta ray cluster.

Parameters
positionOnMuonthe parameterised cosmic ray position
muonDirectionthe parameterised cosmic ray direction
pMuonthe address of the parent cosmic ray pfo
deltaRayProjectedPositionsthe projected positions of the delta ray
minDistanceFromMuonthe minimum distance of a hit from the cosmic ray track required for removal
maxDistanceToCollectedthe maximim distance of a hit from the projected delta ray hits required for removal
collectedHitsthe list of hits to be removed from the cosmic ray

Definition at line 597 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ CollectHitsFromMuon() [2/2]

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::CollectHitsFromMuon ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
const pandora::Cluster *const  pThirdViewCluster,
const pandora::ParticleFlowObject *const  pParentMuon,
const float  minDistanceFromMuon,
const float  maxDistanceToCollected,
pandora::CaloHitList collectedHits 
) const

In one view, pull out any hits from a cosmic ray cluster that belong to the child delta ray cluster.

Parameters
pCluster1the address of a delta ray cluster in a view that is to go unmodified
pCluster2the address of a delta ray cluster in the other view that is to unmodified
pThirdViewClusterthe address of the delta ray cluster in the view in which the hit removal process will run
pParentMuonthe address of the parent cosmic ray pfo
minDistanceFromMuonthe minimum distance of a hit from the cosmic ray track required for removal
maxDistanceToCollectedthe maximim distance of a hit from the projected delta ray hits required for removal
collectedHitsthe list of hits to be removed from the cosmic ray
Returns
a status code reflecting whether the procedure ran smoothly and if the outcome is good

Definition at line 536 of file NViewDeltaRayMatchingAlgorithm.cc.

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

◆ CollectStrayClusters()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::CollectStrayClusters ( const pandora::Cluster *const  pClusterToEnlarge,
const float  rangeMinX,
const float  rangeMaxX,
pandora::ClusterList collectedClusters 
)
protected

Collect the stray clusters that are close to a specified cluster and that lie within a given x range.

Parameters
pClusterToEnlargethe specified cluster
rangeMinXthe minimum x coordinate of the region of interest
rangeMaxXthe maximum x coordinate of the region of interest
collectedClustersthe list of collected stray clusters

Definition at line 780 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ CreatePfos()

template<typename T >
bool lar_content::NViewDeltaRayMatchingAlgorithm< T >::CreatePfos ( ProtoParticleVector protoParticleVector)

Create delta ray pfos maxmising completeness by searching for and merging in any stray clusters.

Parameters
protoParticleVectorthe proto particle vector
Returns
whether any pfos were created

Definition at line 731 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:
Here is the caller 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:

◆ DoesClusterPassTensorThreshold()

template<typename T >
virtual bool lar_content::NViewDeltaRayMatchingAlgorithm< T >::DoesClusterPassTensorThreshold ( const pandora::Cluster *const  pCluster) const
protectedpure virtual

To check whether a given cluster meets the requirements to be added into the matching container (tensor/matrix)

Parameters
pClusterthe address of the input cluster
Returns
whether the checks were met

Implemented in lar_content::ThreeViewDeltaRayMatchingAlgorithm, and lar_content::TwoViewDeltaRayMatchingAlgorithm.

◆ ExamineOverlapContainer()

virtual void lar_content::MatchingBaseAlgorithm::ExamineOverlapContainer ( )
protectedpure virtualinherited

◆ FillStrayClusterList()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::FillStrayClusterList ( const pandora::HitType  hitType)
protected

Fill the stray cluster list with clusters that do not pass the tensor threshold requirement.

Parameters
hitTypethe hit type of the list to fill

Definition at line 84 of file NViewDeltaRayMatchingAlgorithm.cc.

◆ GetClusterListName()

template<typename T >
const std::string & lar_content::NViewMatchingAlgorithm< T >::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 57 of file NViewMatchingAlgorithm.cc.

Here is the caller graph for this function:

◆ GetClusterSpanX()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::GetClusterSpanX ( const pandora::CaloHitList caloHitList,
float &  xMin,
float &  xMax 
) const
protected

Calculate the xSpan of a list of CaloHits.

Parameters
caloHitListthe input list of CaloHits
xMinthe output minimum x coordinate
xMaxthe output maximum x coordinate

Definition at line 397 of file NViewDeltaRayMatchingAlgorithm.cc.

◆ GetClusterSpanZ()

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::GetClusterSpanZ ( const pandora::CaloHitList caloHitList,
const float  xMin,
const float  xMax,
float &  zMin,
float &  zMax 
) const
protected

Calculate the zSpan of a list of CaloHits in a specified x range.

Parameters
caloHitListthe input list of CaloHits
xMinthe minimum x coordinate of the region of interest
xMaxthe maximum x coordinate of the region of interest
zMinthe output minimum z coordinate
zMaxthe output maximum z coordinate

Definition at line 417 of file NViewDeltaRayMatchingAlgorithm.cc.

◆ GetInputClusterList()

template<typename T >
const pandora::ClusterList & lar_content::NViewMatchingAlgorithm< T >::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 65 of file NViewMatchingAlgorithm.cc.

Here is the caller graph for this function:

◆ 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()

template<typename T >
T & lar_content::NViewMatchingAlgorithm< T >::GetMatchingControl ( )
inlineprotectedinherited

Get the matching control.

Definition at line 59 of file NViewMatchingAlgorithm.h.

Here is the caller graph for this function:

◆ GetMuonCluster()

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::GetMuonCluster ( const pandora::PfoList commonMuonPfoList,
const pandora::HitType  hitType,
const pandora::Cluster *&  pMuonCluster 
) const

Return the cluster of the common cosmic ray pfo in a given view (function demands there to be only one common CR pfo)

Parameters
commonMuonPfoListthe element's list of common muon pfos
hitTypethe specified view
pMuonClusterthe output address of the cluster
Returns
a status code reflecting if one and only one cosmic ray cluster was found

Definition at line 99 of file NViewDeltaRayMatchingAlgorithm.cc.

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

◆ GetNearbyMuonPfos()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::GetNearbyMuonPfos ( const pandora::Cluster *const  pCluster,
pandora::ClusterList consideredClusters,
pandora::PfoList nearbyMuonPfos 
) const
protected

Use the cluster proximity map to travel along paths of nearby clusters finding the cosmic ray clusters on which they terminate.

Parameters
pClusterthe address of the input cluster
consideredClustersthe list of investigated clusters
nearbyMuonPfosthe output list of the cosmic ray pfos to which the nearby cosmic ray clusters belong

Definition at line 118 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ 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.

◆ GetProjectedPositions()

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::GetProjectedPositions ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
pandora::CartesianPointVector projectedPositions 
) const

Use two clusters from different views to calculate projected positions in the remaining third view.

Parameters
pCluster1the address of the first cluster
pCluster2the address of the second cluster
projectedPositionsthe output projected positions
Returns
a status code reflecting whether the procedure ran smoothly and if the outcome is good

Definition at line 471 of file NViewDeltaRayMatchingAlgorithm.cc.

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

◆ GetSelectedClusterList()

template<typename T >
const pandora::ClusterList & lar_content::NViewMatchingAlgorithm< T >::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 73 of file NViewMatchingAlgorithm.cc.

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:

◆ ParameteriseMuon() [1/2]

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::ParameteriseMuon ( const pandora::ParticleFlowObject *const  pParentMuon,
const pandora::CartesianPointVector deltaRayProjectedPositions,
const pandora::HitType  hitType,
pandora::CartesianVector positionOnMuon,
pandora::CartesianVector muonDirection 
) const

Parameterise the projection of a cosmic ray track in order to avoid poor/sparse projections.

Parameters
pParentMuonthe address of the cosmic ray pfo
deltaRayProjectedPositionsthe projected positions of the delta ray
hitTypethe view in which the projection is made
positionOnMuonthe output position to localise the parameterisation in space
muonDirectionthe output cosmic ray direction
Returns
a status code reflecting whether the procedure ran smoothly and if the outcome is good

Definition at line 653 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ ParameteriseMuon() [2/2]

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::ParameteriseMuon ( const pandora::ParticleFlowObject *const  pParentMuon,
const pandora::Cluster *const  pDeltaRayCluster,
pandora::CartesianVector positionOnMuon,
pandora::CartesianVector muonDirection 
) const

Parameterise the projection of a cosmic ray track in order to avoid poor/sparse projections.

Parameters
pParentMuonthe address of the cosmic ray pfo
pDeltaRayClusterthe address of the delta ray cluster in the projected view
positionOnMuonthe output position to localise the parameterisation in space
muonDirectionthe output cosmic ray direction
Returns
a status code reflecting whether the procedure ran smoothly and if the outcome is good

Definition at line 635 of file NViewDeltaRayMatchingAlgorithm.cc.

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

◆ PerformMainLoop()

template<typename T >
void lar_content::NViewMatchingAlgorithm< T >::PerformMainLoop ( )
protectedvirtualinherited

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

Implements lar_content::MatchingBaseAlgorithm.

Reimplemented in lar_content::ThreeViewTrackFragmentsAlgorithm.

Definition at line 105 of file NViewMatchingAlgorithm.cc.

◆ PerformThreeViewMatching() [1/4]

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::PerformThreeViewMatching ( const pandora::CaloHitList clusterU,
const pandora::CaloHitList clusterV,
const pandora::CaloHitList clusterW,
float &  chiSquaredSum,
unsigned int &  nSamplingPoints,
unsigned int &  nMatchedSamplingPoints,
XOverlap XOverlap 
) const

To determine how well three CaloHitLists (one for each view) map onto one another expressing this in terms of a chi-squared like parameter.

Parameters
clusterUthe U CaloHitList (if the xOverlap object is to be retained this must be the u cluster - for labels to make sense)
clusterVthe V CaloHitList
clusterWthe W CaloHitList
chiSquaredSumthe sum of the chi-squared values of the sampled points
nSamplingPointsthe number of sampled points
nMatchedSamplingPointsthe number of matched sampled points
xOverlapthe xOverlap object
Returns
a status code reflecting whether the matching procedure ran smoothly and if the outcome is good

Definition at line 297 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ PerformThreeViewMatching() [2/4]

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::PerformThreeViewMatching ( const pandora::CaloHitList pCluster1,
const pandora::CaloHitList pCluster2,
const pandora::CaloHitList pCluster3,
float &  reducedChiSquared 
) const

To determine how well three CaloHitLists (one in each view) map onto one another expressing this in terms of a chi-squared like parameter.

Parameters
pCluster1the first CaloHitList
pCluster2the second CaloHitList
pCluster3the third CaloHitList
reducedChiSquaredthe reduced chi squared
Returns
a status code reflecting whether the matching procedure ran smoothly and if the outcome is good

Definition at line 275 of file NViewDeltaRayMatchingAlgorithm.cc.

◆ PerformThreeViewMatching() [3/4]

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::PerformThreeViewMatching ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
const pandora::Cluster *const  pCluster3,
float &  reducedChiSquared 
) const

To determine how well three clusters (one in each view) map onto one another expressing this in terms of a chi-squared like parameter.

Parameters
pCluster1the first cluster
pCluster2the second cluster
pCluster3the third cluster
reducedChiSquaredthe reduced chi squared
Returns
a status code reflecting whether the matching procedure ran smoothly and if the outcome is good

Definition at line 153 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the caller graph for this function:

◆ PerformThreeViewMatching() [4/4]

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::PerformThreeViewMatching ( const pandora::Cluster *const  pClusterU,
const pandora::Cluster *const  pClusterV,
const pandora::Cluster *const  pClusterW,
float &  chiSquaredSum,
unsigned int &  nSamplingPoints,
unsigned int &  nMatchedSamplingPoints,
XOverlap XOverlap 
) const

To determine how well three clusters (one in each view) map onto one another expressing this in terms of a chi-squared like parameter.

Parameters
pClusterUthe U cluster (if the xOverlap object is to be retained this must be the u cluster - for labels to make sense)
pClusterVthe V cluster
pClusterWthe W cluster
chiSquaredSumthe sum of the chi-squared values of the sampled points
nSamplingPointsthe number of sampled points
nMatchedSamplingPointsthe number of matched sampled points
xOverlapthe xOverlap object
Returns
a status code reflecting whether the matching procedure ran smoothly and if the outcome is good

Definition at line 175 of file NViewDeltaRayMatchingAlgorithm.cc.

◆ PrepareAllInputClusters()

template<typename T >
void lar_content::NViewMatchingAlgorithm< T >::PrepareAllInputClusters ( )
protectedvirtualinherited

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

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 89 of file NViewMatchingAlgorithm.cc.

◆ PrepareInputClusters()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::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 61 of file NViewDeltaRayMatchingAlgorithm.cc.

◆ ProjectMuonPositions()

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::ProjectMuonPositions ( const pandora::HitType thirdViewHitType,
const pandora::ParticleFlowObject *const  pParentMuon,
pandora::CartesianPointVector projectedPositions 
) const

Use two views of a cosmic ray pfo to calculate projected positions in a given the third view.

Parameters
thirdViewHitTypethe view to be projected into
pParentMuonthe input cosmic ray pfo
projectedPositionsthe output projected positions
Returns
a status code reflecting whether the procedure ran smoothly and if the outcome is good

Definition at line 450 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ ReadSettings()

template<typename T >
StatusCode lar_content::NViewDeltaRayMatchingAlgorithm< T >::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
protectedvirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::NViewMatchingAlgorithm< T >.

Reimplemented in lar_content::ThreeViewDeltaRayMatchingAlgorithm, and lar_content::TwoViewDeltaRayMatchingAlgorithm.

Definition at line 885 of file NViewDeltaRayMatchingAlgorithm.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:

◆ 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()

template<typename T >
void lar_content::NViewMatchingAlgorithm< T >::SelectAllInputClusters ( )
protectedvirtualinherited

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

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 81 of file NViewMatchingAlgorithm.cc.

◆ SelectInputClusters()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::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 49 of file NViewDeltaRayMatchingAlgorithm.cc.

◆ 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

◆ SplitMuonCluster()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::SplitMuonCluster ( const std::string &  clusterListName,
const pandora::Cluster *const  pMuonCluster,
const pandora::CaloHitList collectedHits,
const pandora::Cluster *&  pDeltaRayCluster 
) const

Move a list of hits from a cosmic ray cluster into the given child delta ray cluster.

Parameters
clusterListNamethe pandora list to which the cosmic ray and delta ray clusters belong
pMuonClusterthe address of the cosmic ray cluster
collectedHitsthe list of hits to reassign
pDeltaRayClusterthe address of the delta ray cluster (may be a nullptr if cluster is yet to be made)

Definition at line 691 of file NViewDeltaRayMatchingAlgorithm.cc.

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

◆ TidyUp()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::TidyUp ( )
protectedvirtual

Tidy member variables in derived class.

Reimplemented from lar_content::NViewMatchingAlgorithm< T >.

Definition at line 871 of file NViewDeltaRayMatchingAlgorithm.cc.

Here is the call graph for this function:

◆ UpdateForNewCluster()

◆ UpdateForNewClusters()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::UpdateForNewClusters ( const pandora::ClusterVector newClusterVector,
const pandora::PfoVector pfoVector 
)

Add a new cluster to algorithm ownership maps and, if it a delta ray cluster, to the underlying matches container (tensor/matrix)

Parameters
newClusterVectorthe vector of clusters to add - the order must match the pfoVector
pfoVectorthe vector of cosmic ray pfos to which the new clusters belong (nullptr for delta ray cluster)

Definition at line 853 of file NViewDeltaRayMatchingAlgorithm.cc.

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

◆ UpdateUponDeletion()

template<typename T >
void lar_content::NViewDeltaRayMatchingAlgorithm< T >::UpdateUponDeletion ( const pandora::Cluster *const  pDeletedCluster)
virtual

Update to reflect cluster deletion.

Parameters
pDeletedClusteraddress of the deleted cluster

Implements lar_content::MatchingBaseAlgorithm.

Definition at line 832 of file NViewDeltaRayMatchingAlgorithm.cc.

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

Member Data Documentation

◆ m_deltaRayMatchingContainers

template<typename T >
DeltaRayMatchingContainers lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_deltaRayMatchingContainers
protected

The class of hit, cluster and pfo ownership and proximity maps.

Definition at line 300 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_matchingControl

template<typename T >
MatchingType lar_content::NViewMatchingAlgorithm< T >::m_matchingControl
protectedinherited

The matching control.

Definition at line 53 of file NViewMatchingAlgorithm.h.

◆ m_maxCosmicRayHitFraction

template<typename T >
float lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_maxCosmicRayHitFraction
protected

The maximum allowed fraction of hits to be removed from the cosmic ray track.

Definition at line 306 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_maxDistanceToCluster

template<typename T >
float lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_maxDistanceToCluster
protected

the maximum distance of a projected point to the cosmic ray cluster used when parameterising the cosmic ray cluster

Definition at line 307 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_maxDistanceToReferencePoint

template<typename T >
float lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_maxDistanceToReferencePoint
protected

the maximum distance of a projected point to the cosmic ray vertex used when parameterising the cosmic ray cluster

Definition at line 308 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_minMatchedFraction

template<typename T >
float lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_minMatchedFraction
protected

The threshold matched fraction of sampling points for a good match.

Definition at line 303 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_minMatchedPoints

template<typename T >
unsigned int lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_minMatchedPoints
protected

The threshold number of matched sampling points for a good match.

Definition at line 304 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_minProjectedPositions

template<typename T >
unsigned int lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_minProjectedPositions
protected

The threshold number of projected points for a good projection.

Definition at line 305 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_muonPfoListName

template<typename T >
std::string lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_muonPfoListName
protected

The list of reconstructed cosmic ray pfos.

Definition at line 296 of file NViewDeltaRayMatchingAlgorithm.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_pseudoChi2Cut

template<typename T >
float lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_pseudoChi2Cut
protected

Pseudo chi2 cut for three view matching.

Definition at line 301 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_strayClusterListU

template<typename T >
pandora::ClusterList lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_strayClusterListU
protected

The list of U clusters that do not pass the tensor threshold requirement.

Definition at line 297 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_strayClusterListV

template<typename T >
pandora::ClusterList lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_strayClusterListV
protected

The list of V clusters that do not pass the tensor threshold requirement.

Definition at line 298 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_strayClusterListW

template<typename T >
pandora::ClusterList lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_strayClusterListW
protected

The list of W clusters that do not pass the tensor threshold requirement.

Definition at line 299 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_strayClusterSeparation

template<typename T >
float lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_strayClusterSeparation
protected

The maximum allowed separation of a stray cluster and a delta ray cluster for merge.

Definition at line 309 of file NViewDeltaRayMatchingAlgorithm.h.

◆ m_type

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

The process type.

Definition at line 88 of file Process.h.

◆ m_xOverlapWindow

template<typename T >
float lar_content::NViewDeltaRayMatchingAlgorithm< T >::m_xOverlapWindow
protected

The maximum allowed displacement in x position.

Definition at line 302 of file NViewDeltaRayMatchingAlgorithm.h.


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