Pandora
Pandora source code navigator
|
DeltaRayMatchingAlgorithm class. More...
#include "DeltaRayMatchingAlgorithm.h"
Classes | |
class | Particle |
Particle class. More... | |
Public Member Functions | |
DeltaRayMatchingAlgorithm () | |
Default constructor. | |
const std::string & | GetType () const |
Get the type. | |
const std::string & | GetInstanceName () const |
Get the instance name. | |
const Pandora & | GetPandora () const |
Get the associated pandora instance. | |
Protected Member Functions | |
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 | |
const Pandora * | m_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::vector< Particle > | ParticleList |
typedef KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > | HitKDTree2D |
typedef KDTreeNodeInfoT< const pandora::CaloHit *, 2 > | HitKDNode2D |
typedef std::vector< HitKDNode2D > | HitKDNode2DList |
typedef std::unordered_map< const pandora::Cluster *, pandora::ClusterList > | ClusterToClustersMap |
typedef std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > | HitToClusterMap |
typedef std::unordered_map< const pandora::Cluster *, float > | ClusterLengthMap |
typedef std::unordered_map< const pandora::ParticleFlowObject *, float > | PfoLengthMap |
Private Member Functions | |
pandora::StatusCode | Run () |
Run the algorithm. | |
void | InitializeNearbyClusterMaps () |
Initialize nearby cluster maps. | |
void | InitializeNearbyClusterMap (const std::string &clusterListName, ClusterToClustersMap &nearbyClusters) |
Initialize a nearby cluster map with details relating to a specific cluster list. | |
void | ClearNearbyClusterMaps () |
Clear nearby cluster maps. | |
void | GetAllPfos (const std::string &inputPfoListName, pandora::PfoVector &pfoVector) const |
Get a vector of all Pfos in the provided input Pfo lists. | |
void | GetTrackPfos (const std::string &inputPfoListName, pandora::PfoVector &pfoVector) const |
Get a vector of track-like Pfos in the provided input Pfo lists. | |
void | GetClusters (const std::string &clusterListName, pandora::ClusterVector &clusterVector) const |
Get a vector containing all available input clusters in the provided cluster list, storing sliding linear fits in the algorithm cache. | |
void | ThreeViewMatching (ClusterLengthMap &clusterLengthMap) const |
Match clusters using all three views. | |
void | TwoViewMatching (ClusterLengthMap &clusterLengthMap) const |
Match clusters using pairs of views. | |
void | OneViewMatching (ClusterLengthMap &clusterLengthMap) const |
Match clusters using single views. | |
void | ThreeViewMatching (const pandora::ClusterVector &clusters1, const pandora::ClusterVector &clusters2, const pandora::ClusterVector &clusters3, ClusterLengthMap &clusterLengthMap, PfoLengthMap &pfoLengthMap, ParticleList &particleList) const |
Match clusters using all three views. | |
void | TwoViewMatching (const pandora::ClusterVector &clusters1, const pandora::ClusterVector &clusters2, ClusterLengthMap &clusterLengthMap, PfoLengthMap &pfoLengthMap, ParticleList &particleList) const |
Match clusters using a pair of views. | |
void | OneViewMatching (const pandora::ClusterVector &clusters, ClusterLengthMap &clusterLengthMap, PfoLengthMap &pfoLengthMap, ParticleList &particleList) const |
Match clusters using a single view. | |
void | SelectParticles (const ParticleList &inputParticles, ClusterLengthMap &clusterLengthMap, ParticleList &outputParticles) const |
Resolve any ambiguities between candidate particles. | |
void | CreateParticles (const ParticleList &particleList) const |
Build new particle flow objects. | |
void | FindBestParentPfo (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, ClusterLengthMap &clusterLengthMap, PfoLengthMap &pfoLengthMap, const pandora::ParticleFlowObject *&pBestPfo) const |
Find best Pfo to associate a UVW triplet. | |
float | GetLengthFromCache (const pandora::Cluster *const pCluster, ClusterLengthMap &clusterLengthMap) const |
Reduce number of length (squared) calculations by caching results when they are first obtained. | |
float | GetLengthFromCache (const pandora::ParticleFlowObject *const pPfo, PfoLengthMap &pfoLengthMap) const |
Reduce number of length (squared) calculations by caching results when they are first obtained. | |
float | GetLength (const Particle &particle, ClusterLengthMap &clusterLengthMap) const |
Get the length (squared) of a candidate particle. | |
bool | AreClustersMatched (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3) const |
Look at consistency of a combination of clusters. | |
float | GetDistanceSquaredToPfo (const pandora::Cluster *const pCluster, const pandora::ParticleFlowObject *const pPfo) const |
Get displacementr between cluster and particle flow object. | |
void | CreateDaughterPfo (const pandora::ClusterList &clusterList, const pandora::ParticleFlowObject *const pParentPfo) const |
Create a new Pfo from an input cluster list and set up a parent/daughter relationship. | |
void | AddToDaughterPfo (const pandora::ClusterList &clusterList, const pandora::ParticleFlowObject *const pParentPfo) const |
Merge an input cluster list with an existing daughter Pfo. | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Read the algorithm settings. | |
Private Attributes | |
std::string | m_parentPfoListName |
The parent pfo list name. | |
std::string | m_daughterPfoListName |
The daughter pfo list name for new daughter particles. | |
std::string | m_inputClusterListNameU |
The input cluster list name for the u view. | |
std::string | m_inputClusterListNameV |
The input cluster list name for the v view. | |
std::string | m_inputClusterListNameW |
The input cluster list name for the w view. | |
unsigned int | m_minCaloHitsPerCluster |
The min number of calo hits per candidate cluster. | |
float | m_xOverlapWindow |
The maximum allowed displacement in x position. | |
float | m_distanceForMatching |
The maximum allowed distance between tracks and delta rays. | |
float | m_pseudoChi2Cut |
Pseudo chi2 cut for three view matching. | |
float | m_searchRegion1D |
Search region, applied to each dimension, for look-up from kd-trees. | |
ClusterToClustersMap | m_nearbyClustersU |
The nearby clusters map for the u view. | |
ClusterToClustersMap | m_nearbyClustersV |
The nearby clusters map for the v view. | |
ClusterToClustersMap | m_nearbyClustersW |
The nearby clusters map for the w view. | |
DeltaRayMatchingAlgorithm class.
Definition at line 28 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 145 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 99 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 96 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 97 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 95 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 100 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 93 of file DeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 146 of file DeltaRayMatchingAlgorithm.h.
lar_content::DeltaRayMatchingAlgorithm::DeltaRayMatchingAlgorithm | ( | ) |
Default constructor.
Definition at line 24 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Merge an input cluster list with an existing daughter Pfo.
clusterList | the list of clusters |
pParentPfo | address of the parent pfo |
Definition at line 696 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Look at consistency of a combination of clusters.
pCluster1 | pointer to first luster |
pCluster2 | pointer to second cluster |
pCluster3 | pointer to third cluster |
Definition at line 436 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Clear nearby cluster maps.
Definition at line 125 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Create a new Pfo from an input cluster list and set up a parent/daughter relationship.
clusterList | the list of clusters |
pParentPfo | address of the parent pfo |
Definition at line 669 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Build new particle flow objects.
particleList | the list of candidate particles |
Definition at line 385 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Find best Pfo to associate a UVW triplet.
pClusterU | pointer to U view cluster |
pClusterV | pointer to V view cluster |
pClusterW | pointer to W view cluster |
clusterLengthMap | the cluster length map |
pfoLengthMap | the pfo length map |
pBestPfo | to receive the address of the best Pfo |
Definition at line 521 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Get a vector of all Pfos in the provided input Pfo lists.
inputPfoListName | the input Pfo list name |
pfoVector | the output vector of Pfos |
Definition at line 134 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Get a vector containing all available input clusters in the provided cluster list, storing sliding linear fits in the algorithm cache.
clusterListName | the vector of cluster list names |
clusterVector | to receive the populated cluster vector |
Definition at line 170 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Get displacementr between cluster and particle flow object.
pCluster | pointer to cluster |
pPfo | pointer to particle flow object |
Definition at line 634 of file DeltaRayMatchingAlgorithm.cc.
|
inlineinherited |
|
private |
Get the length (squared) of a candidate particle.
particle | the particle |
clusterLengthMap | the cluster length map |
Definition at line 616 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Reduce number of length (squared) calculations by caching results when they are first obtained.
pCluster | the cluster |
clusterLengthMap | the cluster length map |
Definition at line 588 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Reduce number of length (squared) calculations by caching results when they are first obtained.
pPfo | the pfo |
pfoLengthMap | the pfo length map |
Definition at line 602 of file DeltaRayMatchingAlgorithm.cc.
|
inlineinherited |
|
private |
Get a vector of track-like Pfos in the provided input Pfo lists.
inputPfoListName | the input Pfo list name |
pfoVector | the output vector of Pfos |
Definition at line 150 of file DeltaRayMatchingAlgorithm.cc.
|
inlineinherited |
|
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.
|
private |
Initialize a nearby cluster map with details relating to a specific cluster list.
clusterListName | the cluster list name |
nearbyClustersMap | to receive the nearby clusters map |
Definition at line 72 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Initialize nearby cluster maps.
Definition at line 62 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Match clusters using single views.
clusterLengthMap | the cluster length map |
Definition at line 228 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Match clusters using a single view.
clusters | the list of clusters in the provided view |
clusterLengthMap | the cluster length map |
pfoLengthMap | the pfo length map |
particleList | the output list of particles |
Definition at line 315 of file DeltaRayMatchingAlgorithm.cc.
|
privatevirtual |
Read the algorithm settings.
xmlHandle | the relevant xml handle |
Implements pandora::Process.
Definition at line 779 of file DeltaRayMatchingAlgorithm.cc.
|
inlineprotectedinherited |
Register i) the pandora instance that will run the process and ii) the process type.
pPandora | address of the pandora object that will run the process |
type | the process type |
instanceName | the process instance name |
Definition at line 146 of file Process.h.
|
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.
|
privatevirtual |
Run the algorithm.
Implements pandora::Algorithm.
Definition at line 35 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Resolve any ambiguities between candidate particles.
inputParticles | the input list of candidate particles |
clusterLengthMap | the cluster length map |
outputParticles | the output list of candidate particles |
Definition at line 338 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Match clusters using all three views.
clusterLengthMap | the cluster length map |
Definition at line 194 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Match clusters using all three views.
clusters1 | the list of clusters in the first view |
clusters2 | the list of clusters in the second view |
clusters3 | the list of clusters in the third view |
clusterLengthMap | the cluster length map |
pfoLengthMap | the pfo length map |
particleList | the output list of particles |
Definition at line 247 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Match clusters using pairs of views.
clusterLengthMap | the cluster length map |
Definition at line 210 of file DeltaRayMatchingAlgorithm.cc.
|
private |
Match clusters using a pair of views.
clusters1 | the list of clusters in the first view |
clusters2 | the list of clusters in the second view |
clusterLengthMap | the cluster length map |
pfoLengthMap | the pfo length map |
particleList | the output list of particles |
Definition at line 283 of file DeltaRayMatchingAlgorithm.cc.
|
private |
The daughter pfo list name for new daughter particles.
Definition at line 300 of file DeltaRayMatchingAlgorithm.h.
|
private |
The maximum allowed distance between tracks and delta rays.
Definition at line 308 of file DeltaRayMatchingAlgorithm.h.
|
private |
The input cluster list name for the u view.
Definition at line 302 of file DeltaRayMatchingAlgorithm.h.
|
private |
The input cluster list name for the v view.
Definition at line 303 of file DeltaRayMatchingAlgorithm.h.
|
private |
The input cluster list name for the w view.
Definition at line 304 of file DeltaRayMatchingAlgorithm.h.
|
protectedinherited |
|
private |
The min number of calo hits per candidate cluster.
Definition at line 306 of file DeltaRayMatchingAlgorithm.h.
|
private |
The nearby clusters map for the u view.
Definition at line 312 of file DeltaRayMatchingAlgorithm.h.
|
private |
The nearby clusters map for the v view.
Definition at line 313 of file DeltaRayMatchingAlgorithm.h.
|
private |
The nearby clusters map for the w view.
Definition at line 314 of file DeltaRayMatchingAlgorithm.h.
|
private |
The parent pfo list name.
Definition at line 299 of file DeltaRayMatchingAlgorithm.h.
|
protectedinherited |
|
private |
Pseudo chi2 cut for three view matching.
Definition at line 309 of file DeltaRayMatchingAlgorithm.h.
|
private |
Search region, applied to each dimension, for look-up from kd-trees.
Definition at line 311 of file DeltaRayMatchingAlgorithm.h.
|
protectedinherited |
|
private |
The maximum allowed displacement in x position.
Definition at line 307 of file DeltaRayMatchingAlgorithm.h.