VertexSelectionBaseAlgorithm class. More...
#include <VertexSelectionBaseAlgorithm.h>
Classes | |
class | BeamConstants |
Beam constants class. More... | |
class | ShowerCluster |
Shower cluster class. More... | |
class | SlidingFitData |
Sliding fit data class. More... | |
class | VertexScore |
VertexScore class. More... | |
Public Types | |
typedef std::vector< VertexScore > | VertexScoreList |
typedef std::vector < SlidingFitData > | SlidingFitDataList |
typedef std::vector < ShowerCluster > | ShowerClusterList |
typedef KDTreeNodeInfoT< const pandora::CaloHit *, 2 > | HitKDNode2D |
typedef std::vector< HitKDNode2D > | HitKDNode2DList |
typedef KDTreeLinkerAlgo < const pandora::CaloHit *, 2 > | HitKDTree2D |
typedef std::map < pandora::HitType, const pandora::ClusterList & > | ClusterListMap |
Map array of cluster lists for passing to tools. More... | |
typedef std::map < pandora::HitType, const SlidingFitDataList > | SlidingFitDataListMap |
Map of sliding fit data lists for passing to tools. More... | |
typedef std::map < pandora::HitType, const ShowerClusterList > | ShowerClusterListMap |
Map of shower cluster lists for passing to tools. More... | |
typedef std::map < pandora::HitType, const std::reference_wrapper < HitKDTree2D > > | KDTreeMap |
Map array of hit kd trees for passing to tools. More... | |
typedef MvaFeatureTool< const VertexSelectionBaseAlgorithm *const, const pandora::Vertex *const, const SlidingFitDataListMap &, const ClusterListMap &, const KDTreeMap &, const ShowerClusterListMap &, const float, float & > | VertexFeatureTool |
The base type for the vertex feature tools. More... | |
Public Member Functions | |
VertexSelectionBaseAlgorithm () | |
Default constructor. More... | |
Protected Member Functions | |
virtual void | FilterVertexList (const pandora::VertexList *const pInputVertexList, HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW, pandora::VertexVector &filteredVertices) const |
Filter the input list of vertices to obtain a reduced number of vertex candidates. More... | |
virtual void | GetBeamConstants (const pandora::VertexVector &vertexVector, BeamConstants &beamConstants) const |
Get the beam score constants for a provided list of candidate vertices. More... | |
virtual void | GetVertexScoreList (const pandora::VertexVector &vertexVector, const BeamConstants &beamConstants, HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW, VertexScoreList &vertexScoreList) const =0 |
Get the vertex score list for a provided list of candidate vertices. More... | |
void | GetClusterLists (const pandora::StringVector &inputClusterListNames, pandora::ClusterList &clusterListU, pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const |
Get the cluster lists. More... | |
void | CalculateClusterSlidingFits (const pandora::ClusterList &inputClusterList, const unsigned int minClusterCaloHits, const unsigned int slidingFitWindow, SlidingFitDataList &slidingFitDataList) const |
Calculate the cluster sliding fits. More... | |
float | GetBeamDeweightingScore (const BeamConstants &beamConstants, const pandora::Vertex *const pVertex) const |
Get the beam deweighting score for a vertex. More... | |
bool | IsBeamModeOn () const |
Whether algorithm is running in beam mode, assuming neutrinos travel in positive z-direction. More... | |
float | GetVertexEnergy (const pandora::Vertex *const pVertex, const KDTreeMap &kdTreeMap) const |
Calculate the energy of a vertex candidate by summing values from all three planes. More... | |
float | VertexHitEnergy (const pandora::Vertex *const pVertex, const pandora::HitType hitType, HitKDTree2D &kdTree) const |
Finds the energy of the nearest hit to the vertex candidate in this view. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Member Functions | |
pandora::StatusCode | Run () |
void | InitializeKDTrees (HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW) const |
Initialize kd trees with details of hits in algorithm-configured cluster lists. More... | |
bool | IsVertexOnHit (const pandora::Vertex *const pVertex, const pandora::HitType hitType, HitKDTree2D &kdTree) const |
Whether the vertex lies on a hit in the specified view. More... | |
bool | IsVertexInGap (const pandora::Vertex *const pVertex, const pandora::HitType hitType) const |
Whether the vertex lies in a registered gap. More... | |
void | SelectTopScoreVertices (VertexScoreList &vertexScoreList, pandora::VertexList &selectedVertexList) const |
From the top-scoring candidate vertices, select a subset for further investigation. More... | |
bool | AcceptVertexLocation (const pandora::Vertex *const pVertex, const pandora::VertexList &selectedVertexList) const |
Whether to accept a candidate vertex, based on its spatial position in relation to other selected candidates. More... | |
Static Private Member Functions | |
static bool | SortByVertexZPosition (const pandora::Vertex *const pLhs, const pandora::Vertex *const pRhs) |
Sort vertices by increasing z position. More... | |
Private Attributes | |
pandora::StringVector | m_inputCaloHitListNames |
The list of calo hit list names. More... | |
std::string | m_outputVertexListName |
The name under which to save the output vertex list. More... | |
bool | m_replaceCurrentVertexList |
Whether to replace the current vertex list with the output list. More... | |
bool | m_beamMode |
Whether to run in beam mode, assuming neutrinos travel in positive z-direction. More... | |
float | m_nDecayLengthsInZSpan |
The number of score decay lengths to use over the course of the vertex z-span. More... | |
bool | m_selectSingleVertex |
Whether to make a final decision and select just one vertex candidate. More... | |
unsigned int | m_maxTopScoreSelections |
Max number of top-scoring vertex candidate to select for output. More... | |
float | m_maxOnHitDisplacement |
Max hit-vertex displacement for declaring vertex to lie on a hit in each view. More... | |
float | m_minCandidateDisplacement |
Ignore other top-scoring candidates located in close proximity to original. More... | |
float | m_minCandidateScoreFraction |
Ignore other top-scoring candidates with score less than a fraction of original. More... | |
bool | m_useDetectorGaps |
Whether to account for registered detector gaps in vertex selection. More... | |
float | m_gapTolerance |
The tolerance to use when querying whether a sampling point is in a gap, units cm. More... | |
bool | m_isEmptyViewAcceptable |
Whether views entirely empty of hits are classed as 'acceptable' for candidate filtration. More... | |
unsigned int | m_minVertexAcceptableViews |
The minimum number of views in which a candidate must sit on/near a hit or in a gap (or view can be empty) More... | |
VertexSelectionBaseAlgorithm class.
Definition at line 32 of file VertexSelectionBaseAlgorithm.h.
typedef std::map<pandora::HitType, const pandora::ClusterList &> lar_content::VertexSelectionBaseAlgorithm::ClusterListMap |
Map array of cluster lists for passing to tools.
Definition at line 227 of file VertexSelectionBaseAlgorithm.h.
typedef KDTreeNodeInfoT<const pandora::CaloHit *, 2> lar_content::VertexSelectionBaseAlgorithm::HitKDNode2D |
Definition at line 223 of file VertexSelectionBaseAlgorithm.h.
typedef std::vector<HitKDNode2D> lar_content::VertexSelectionBaseAlgorithm::HitKDNode2DList |
Definition at line 224 of file VertexSelectionBaseAlgorithm.h.
typedef KDTreeLinkerAlgo<const pandora::CaloHit *, 2> lar_content::VertexSelectionBaseAlgorithm::HitKDTree2D |
Definition at line 225 of file VertexSelectionBaseAlgorithm.h.
typedef std::map<pandora::HitType, const std::reference_wrapper<HitKDTree2D> > lar_content::VertexSelectionBaseAlgorithm::KDTreeMap |
Map array of hit kd trees for passing to tools.
Definition at line 230 of file VertexSelectionBaseAlgorithm.h.
typedef std::vector<ShowerCluster> lar_content::VertexSelectionBaseAlgorithm::ShowerClusterList |
Definition at line 221 of file VertexSelectionBaseAlgorithm.h.
typedef std::map<pandora::HitType, const ShowerClusterList> lar_content::VertexSelectionBaseAlgorithm::ShowerClusterListMap |
Map of shower cluster lists for passing to tools.
Definition at line 229 of file VertexSelectionBaseAlgorithm.h.
typedef std::vector<SlidingFitData> lar_content::VertexSelectionBaseAlgorithm::SlidingFitDataList |
Definition at line 175 of file VertexSelectionBaseAlgorithm.h.
typedef std::map<pandora::HitType, const SlidingFitDataList> lar_content::VertexSelectionBaseAlgorithm::SlidingFitDataListMap |
Map of sliding fit data lists for passing to tools.
Definition at line 228 of file VertexSelectionBaseAlgorithm.h.
typedef MvaFeatureTool<const VertexSelectionBaseAlgorithm *const, const pandora::Vertex *const, const SlidingFitDataListMap &, const ClusterListMap &, const KDTreeMap &, const ShowerClusterListMap &, const float, float &> lar_content::VertexSelectionBaseAlgorithm::VertexFeatureTool |
The base type for the vertex feature tools.
Definition at line 234 of file VertexSelectionBaseAlgorithm.h.
typedef std::vector<VertexScore> lar_content::VertexSelectionBaseAlgorithm::VertexScoreList |
Definition at line 82 of file VertexSelectionBaseAlgorithm.h.
lar_content::VertexSelectionBaseAlgorithm::VertexSelectionBaseAlgorithm | ( | ) |
Default constructor.
Definition at line 22 of file VertexSelectionBaseAlgorithm.cc.
|
private |
Whether to accept a candidate vertex, based on its spatial position in relation to other selected candidates.
pVertex | the address of the vertex |
selectedVertexList | the selected vertex list |
Definition at line 314 of file VertexSelectionBaseAlgorithm.cc.
|
protected |
Calculate the cluster sliding fits.
inputClusterList | the input cluster list |
minClusterCaloHits | the minimum number of cluster calo hits |
slidingFitWindow | the sliding fit window |
slidingFitDataList | the list of sliding fits to fill |
Definition at line 120 of file VertexSelectionBaseAlgorithm.cc.
|
protectedvirtual |
Filter the input list of vertices to obtain a reduced number of vertex candidates.
pInputVertexList | the address of the input vertex list |
kdTreeU | the kd tree for u hits |
kdTreeV | the kd tree for v hits |
kdTreeW | the kd tree for w hits |
filteredVertices | to receive the filtered vertex list |
Definition at line 40 of file VertexSelectionBaseAlgorithm.cc.
|
protectedvirtual |
Get the beam score constants for a provided list of candidate vertices.
vertexVector | the vertex vector |
beamConstants | to receive the beam constants |
Definition at line 65 of file VertexSelectionBaseAlgorithm.cc.
|
inlineprotected |
Get the beam deweighting score for a vertex.
beamConstants | the beam constants |
pVertex | address of the vertex |
Definition at line 419 of file VertexSelectionBaseAlgorithm.h.
|
protected |
Get the cluster lists.
inputClusterListNames | the input cluster list names |
clusterListU | the U-view cluster list to populate |
clusterListV | the V-view cluster list to populate |
clusterListW | the W-view cluster list to populate |
Definition at line 91 of file VertexSelectionBaseAlgorithm.cc.
|
protected |
Calculate the energy of a vertex candidate by summing values from all three planes.
pVertex | the address of the vertex |
kdTreeMap | the map of 2D hit kd trees |
Definition at line 243 of file VertexSelectionBaseAlgorithm.cc.
|
protectedpure virtual |
Get the vertex score list for a provided list of candidate vertices.
vertexVector | the vertex vector |
beamConstants | the beam constants |
kdTreeU | the kd tree for u hits |
kdTreeV | the kd tree for v hits |
kdTreeW | the kd tree for w hits |
vertexScoreList | to receive the vertex score list |
Implemented in lar_content::TrainedVertexSelectionAlgorithm, lar_content::MvaVertexSelectionAlgorithm< T >, lar_content::EnergyKickVertexSelectionAlgorithm, lar_content::HitAngleVertexSelectionAlgorithm, and lar_content::CheatingVertexSelectionAlgorithm.
|
private |
Initialize kd trees with details of hits in algorithm-configured cluster lists.
kdTreeU | the kd tree for u hits |
kdTreeV | the kd tree for v hits |
kdTreeW | the kd tree for w hits |
Definition at line 186 of file VertexSelectionBaseAlgorithm.cc.
|
inlineprotected |
Whether algorithm is running in beam mode, assuming neutrinos travel in positive z-direction.
Definition at line 427 of file VertexSelectionBaseAlgorithm.h.
|
private |
Whether the vertex lies in a registered gap.
pVertex | the address of the vertex |
hitType | the relevant hit type |
Definition at line 233 of file VertexSelectionBaseAlgorithm.cc.
|
private |
Whether the vertex lies on a hit in the specified view.
pVertex | the address of the vertex |
hitType | the relevant hit type |
kdTree | the relevant kd tree |
Definition at line 220 of file VertexSelectionBaseAlgorithm.cc.
|
protected |
Definition at line 393 of file VertexSelectionBaseAlgorithm.cc.
|
private |
Definition at line 142 of file VertexSelectionBaseAlgorithm.cc.
|
private |
From the top-scoring candidate vertices, select a subset for further investigation.
vertexScoreList | the vertex score list |
selectedVertexList | to receive the selected vertex list |
Definition at line 286 of file VertexSelectionBaseAlgorithm.cc.
|
staticprivate |
Sort vertices by increasing z position.
pLhs | address of the lhs vertex |
pRhs | address of the rhs vertex |
Definition at line 333 of file VertexSelectionBaseAlgorithm.cc.
|
protected |
Finds the energy of the nearest hit to the vertex candidate in this view.
pVertex | the address of the vertex |
hitType | the relevant hit type |
kdTree | the kd tree of 2D hits |
Definition at line 261 of file VertexSelectionBaseAlgorithm.cc.
|
private |
Whether to run in beam mode, assuming neutrinos travel in positive z-direction.
Definition at line 399 of file VertexSelectionBaseAlgorithm.h.
|
private |
The tolerance to use when querying whether a sampling point is in a gap, units cm.
Definition at line 411 of file VertexSelectionBaseAlgorithm.h.
|
private |
The list of calo hit list names.
Definition at line 394 of file VertexSelectionBaseAlgorithm.h.
|
private |
Whether views entirely empty of hits are classed as 'acceptable' for candidate filtration.
Definition at line 413 of file VertexSelectionBaseAlgorithm.h.
|
private |
Max hit-vertex displacement for declaring vertex to lie on a hit in each view.
Definition at line 405 of file VertexSelectionBaseAlgorithm.h.
|
private |
Max number of top-scoring vertex candidate to select for output.
Definition at line 403 of file VertexSelectionBaseAlgorithm.h.
|
private |
Ignore other top-scoring candidates located in close proximity to original.
Definition at line 407 of file VertexSelectionBaseAlgorithm.h.
|
private |
Ignore other top-scoring candidates with score less than a fraction of original.
Definition at line 408 of file VertexSelectionBaseAlgorithm.h.
|
private |
The minimum number of views in which a candidate must sit on/near a hit or in a gap (or view can be empty)
Definition at line 414 of file VertexSelectionBaseAlgorithm.h.
|
private |
The number of score decay lengths to use over the course of the vertex z-span.
Definition at line 400 of file VertexSelectionBaseAlgorithm.h.
|
private |
The name under which to save the output vertex list.
Definition at line 395 of file VertexSelectionBaseAlgorithm.h.
|
private |
Whether to replace the current vertex list with the output list.
Definition at line 397 of file VertexSelectionBaseAlgorithm.h.
|
private |
Whether to make a final decision and select just one vertex candidate.
Definition at line 402 of file VertexSelectionBaseAlgorithm.h.
|
private |
Whether to account for registered detector gaps in vertex selection.
Definition at line 410 of file VertexSelectionBaseAlgorithm.h.