Pandora
Pandora source code navigator
|
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. | |
typedef std::map< pandora::HitType, const SlidingFitDataList > | SlidingFitDataListMap |
Map of sliding fit data lists for passing to tools. | |
typedef std::map< pandora::HitType, const ShowerClusterList > | ShowerClusterListMap |
Map of shower cluster lists for passing to tools. | |
typedef std::map< pandora::HitType, const std::reference_wrapper< HitKDTree2D > > | KDTreeMap |
Map array of hit kd trees for passing to tools. | |
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. | |
Public Member Functions | |
VertexSelectionBaseAlgorithm () | |
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 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. | |
virtual void | GetBeamConstants (const pandora::VertexVector &vertexVector, BeamConstants &beamConstants) const |
Get the beam score constants for a provided list of candidate vertices. | |
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. | |
void | GetClusterLists (const pandora::StringVector &inputClusterListNames, pandora::ClusterList &clusterListU, pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const |
Get the cluster lists. | |
void | CalculateClusterSlidingFits (const pandora::ClusterList &inputClusterList, const unsigned int minClusterCaloHits, const unsigned int slidingFitWindow, SlidingFitDataList &slidingFitDataList) const |
Calculate the cluster sliding fits. | |
float | GetBeamDeweightingScore (const BeamConstants &beamConstants, const pandora::Vertex *const pVertex) const |
Get the beam deweighting score for a vertex. | |
bool | IsBeamModeOn () const |
Whether algorithm is running in beam mode, assuming neutrinos travel in positive z-direction. | |
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. | |
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. | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Read the algorithm settings. | |
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 Member Functions | |
pandora::StatusCode | Run () |
Run the algorithm. | |
void | InitializeKDTrees (HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW) const |
Initialize kd trees with details of hits in algorithm-configured cluster lists. | |
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. | |
bool | IsVertexInGap (const pandora::Vertex *const pVertex, const pandora::HitType hitType) const |
Whether the vertex lies in a registered gap. | |
void | SelectTopScoreVertices (VertexScoreList &vertexScoreList, pandora::VertexList &selectedVertexList) const |
From the top-scoring candidate vertices, select a subset for further investigation. | |
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. | |
Static Private Member Functions | |
static bool | SortByVertexZPosition (const pandora::Vertex *const pLhs, const pandora::Vertex *const pRhs) |
Sort vertices by increasing z position. | |
Private Attributes | |
pandora::StringVector | m_inputCaloHitListNames |
The list of calo hit list names. | |
std::string | m_outputVertexListName |
The name under which to save the output vertex list. | |
bool | m_replaceCurrentVertexList |
Whether to replace the current vertex list with the output list. | |
bool | m_beamMode |
Whether to run in beam mode, assuming neutrinos travel in positive z-direction. | |
float | m_nDecayLengthsInZSpan |
The number of score decay lengths to use over the course of the vertex z-span. | |
bool | m_selectSingleVertex |
Whether to make a final decision and select just one vertex candidate. | |
unsigned int | m_maxTopScoreSelections |
Max number of top-scoring vertex candidate to select for output. | |
float | m_maxOnHitDisplacement |
Max hit-vertex displacement for declaring vertex to lie on a hit in each view. | |
float | m_minCandidateDisplacement |
Ignore other top-scoring candidates located in close proximity to original. | |
float | m_minCandidateScoreFraction |
Ignore other top-scoring candidates with score less than a fraction of original. | |
bool | m_useDetectorGaps |
Whether to account for registered detector gaps in vertex selection. | |
float | m_gapTolerance |
The tolerance to use when querying whether a sampling point is in a gap, units cm. | |
bool | m_isEmptyViewAcceptable |
Whether views entirely empty of hits are classed as 'acceptable' for candidate filtration. | |
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) | |
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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::CheatingVertexSelectionAlgorithm, lar_content::EnergyKickVertexSelectionAlgorithm, lar_content::HitAngleVertexSelectionAlgorithm, lar_content::MvaVertexSelectionAlgorithm< T >, and lar_content::TrainedVertexSelectionAlgorithm.
|
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 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.
|
protectedvirtual |
Read the algorithm settings.
xmlHandle | the relevant xml handle |
Implements pandora::Process.
Definition at line 393 of file VertexSelectionBaseAlgorithm.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 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.
|
protectedinherited |
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
|
private |
Whether to account for registered detector gaps in vertex selection.
Definition at line 410 of file VertexSelectionBaseAlgorithm.h.