All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VertexSelectionBaseAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArVertex/VertexSelectionBaseAlgorithm.h
3  *
4  * @brief Header file for the vertex selection base algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_VERTEX_SELECTION_BASE_ALGORITHM_H
9 #define LAR_VERTEX_SELECTION_BASE_ALGORITHM_H 1
10 
11 #include "Objects/Vertex.h"
12 #include "Pandora/Algorithm.h"
13 
15 
18 
19 namespace lar_content
20 {
21 
22 template <typename, unsigned int>
23 class KDTreeLinkerAlgo;
24 template <typename, unsigned int>
25 class KDTreeNodeInfoT;
26 
27 //------------------------------------------------------------------------------------------------------------------------------------------
28 
29 /**
30  * @brief VertexSelectionBaseAlgorithm class
31  */
32 class VertexSelectionBaseAlgorithm : public pandora::Algorithm
33 {
34 public:
35  /**
36  * @brief Default constructor
37  */
39 
40  /**
41  * @brief VertexScore class
42  */
44  {
45  public:
46  /**
47  * @brief Constructor
48  *
49  * @param pVertex the address of the vertex
50  * @param score the score
51  */
52  VertexScore(const pandora::Vertex *const pVertex, const float score);
53 
54  /**
55  * @brief Get the address of the vertex
56  *
57  * @return the address of the vertex
58  */
59  const pandora::Vertex *GetVertex() const;
60 
61  /**
62  * @brief Get the score
63  *
64  * @return the score
65  */
66  float GetScore() const;
67 
68  /**
69  * @brief operator<
70  *
71  * @param rhs the value for comparison
72  *
73  * @return boolean
74  */
75  bool operator<(const VertexScore &rhs) const;
76 
77  private:
78  const pandora::Vertex *m_pVertex; ///< The address of the vertex
79  float m_score; ///< The score
80  };
81 
82  typedef std::vector<VertexScore> VertexScoreList;
83 
84  /**
85  * @brief Beam constants class
86  */
88  {
89  public:
90  /**
91  * @brief Get the min z coordinate
92  *
93  * @return the min z coordinate
94  */
95  float GetMinZCoordinate() const;
96 
97  /**
98  * @brief Get the decay constant
99  *
100  * @return the decay constant
101  */
102  float GetDecayConstant() const;
103 
104  /**
105  * @brief Set the beam constants
106  *
107  * @param minZCoordinate the min z coordinate
108  * @param decayConstant the decay constant
109  */
110  void SetConstants(const float minZCoordinate, const float decayConstant);
111 
112  private:
113  pandora::InputFloat m_minZCoordinate; ///< The min z coordinate
114  pandora::InputFloat m_decayConstant; ///< The decay constant
115  };
116 
117  /**
118  * @brief Sliding fit data class.
119  */
121  {
122  public:
123  /**
124  * @brief Constructor
125  *
126  * @param pCluster pointer to the cluster
127  * @param slidingFitWindow the sliding fit window
128  * @param slidingFitPitch the sliding fit pitch
129  */
130  SlidingFitData(const pandora::Cluster *const pCluster, const int slidingFitWindow, const float slidingFitPitch);
131 
132  /**
133  * @brief Get the min layer direction
134  *
135  * @return the min layer direction
136  */
137  const pandora::CartesianVector &GetMinLayerDirection() const;
138 
139  /**
140  * @brief Get the max layer direction
141  *
142  * @return the max layer direction
143  */
144  const pandora::CartesianVector &GetMaxLayerDirection() const;
145 
146  /**
147  * @brief Get the min layer position
148  *
149  * @return the min layer position
150  */
151  const pandora::CartesianVector &GetMinLayerPosition() const;
152 
153  /**
154  * @brief Get the max layer position
155  *
156  * @return the max layer position
157  */
158  const pandora::CartesianVector &GetMaxLayerPosition() const;
159 
160  /**
161  * @brief Get a pointer to the corresponding cluster
162  *
163  * @return pointer to the corresponding cluster
164  */
165  const pandora::Cluster *GetCluster() const;
166 
167  private:
168  pandora::CartesianVector m_minLayerDirection; ///< The direction of the fit at the min layer
169  pandora::CartesianVector m_maxLayerDirection; ///< The direction of the fit at the min layer
170  pandora::CartesianVector m_minLayerPosition; ///< The position of the fit at the max layer
171  pandora::CartesianVector m_maxLayerPosition; ///< The position of the fit at the max layer
172  const pandora::Cluster *m_pCluster; ///< Pointer to the corresponding cluster
173  };
174 
175  typedef std::vector<SlidingFitData> SlidingFitDataList;
176 
177  /**
178  * @brief Shower cluster class
179  */
181  {
182  public:
183  /**
184  * @brief Constructor
185  *
186  * @param clusterList the list of clusters
187  * @param slidingFitWindow the sliding fit window
188  * @param slidingFitPitch the sliding fit pitch
189  */
190  ShowerCluster(const pandora::ClusterList &clusterList, const int slidingFitWindow, const float slidingFitPitch);
191 
192  /**
193  * @brief Get the cluster list
194  *
195  * @return the cluster list
196  */
197  const pandora::ClusterList &GetClusters() const;
198 
199  /**
200  * @brief Get the 2D sliding linear fit
201  *
202  * @return the fit
203  */
204  const TwoDSlidingFitResult &GetFit() const;
205 
206  /**
207  * @brief Get the coordinate vector for a cluster list
208  *
209  * @param clusterList the cluster list
210  *
211  * @return the coordinate vector
212  */
213  pandora::CartesianPointVector GetClusterListCoordinateVector(const pandora::ClusterList &clusterList) const;
214 
215  private:
216  pandora::ClusterList m_clusterList; ///< The list of clusters
217  pandora::CartesianPointVector m_coordinateVector; ///< The coordinate vector
218  TwoDSlidingFitResult m_twoDSlidingFitResult; ///< The fit to the hits of the cluster list
219  };
220 
221  typedef std::vector<ShowerCluster> ShowerClusterList;
222 
224  typedef std::vector<HitKDNode2D> HitKDNode2DList;
226 
227  typedef std::map<pandora::HitType, const pandora::ClusterList &> ClusterListMap; ///< Map array of cluster lists for passing to tools
228  typedef std::map<pandora::HitType, const SlidingFitDataList> SlidingFitDataListMap; ///< Map of sliding fit data lists for passing to tools
229  typedef std::map<pandora::HitType, const ShowerClusterList> ShowerClusterListMap; ///< Map of shower cluster lists for passing to tools
230  typedef std::map<pandora::HitType, const std::reference_wrapper<HitKDTree2D>> KDTreeMap; ///< Map array of hit kd trees for passing to tools
231 
232  typedef MvaFeatureTool<const VertexSelectionBaseAlgorithm *const, const pandora::Vertex *const, const SlidingFitDataListMap &,
233  const ClusterListMap &, const KDTreeMap &, const ShowerClusterListMap &, const float, float &>
234  VertexFeatureTool; ///< The base type for the vertex feature tools
235 
236 protected:
237  /**
238  * @brief Filter the input list of vertices to obtain a reduced number of vertex candidates
239  *
240  * @param pInputVertexList the address of the input vertex list
241  * @param kdTreeU the kd tree for u hits
242  * @param kdTreeV the kd tree for v hits
243  * @param kdTreeW the kd tree for w hits
244  * @param filteredVertices to receive the filtered vertex list
245  */
246  virtual void FilterVertexList(const pandora::VertexList *const pInputVertexList, HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV,
247  HitKDTree2D &kdTreeW, pandora::VertexVector &filteredVertices) const;
248 
249  /**
250  * @brief Get the beam score constants for a provided list of candidate vertices
251  *
252  * @param vertexVector the vertex vector
253  * @param beamConstants to receive the beam constants
254  */
255  virtual void GetBeamConstants(const pandora::VertexVector &vertexVector, BeamConstants &beamConstants) const;
256 
257  /**
258  * @brief Get the vertex score list for a provided list of candidate vertices
259  *
260  * @param vertexVector the vertex vector
261  * @param beamConstants the beam constants
262  * @param kdTreeU the kd tree for u hits
263  * @param kdTreeV the kd tree for v hits
264  * @param kdTreeW the kd tree for w hits
265  * @param vertexScoreList to receive the vertex score list
266  */
267  virtual void GetVertexScoreList(const pandora::VertexVector &vertexVector, const BeamConstants &beamConstants, HitKDTree2D &kdTreeU,
268  HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW, VertexScoreList &vertexScoreList) const = 0;
269 
270  /**
271  * @brief Get the cluster lists
272  *
273  * @param inputClusterListNames the input cluster list names
274  * @param clusterListU the U-view cluster list to populate
275  * @param clusterListV the V-view cluster list to populate
276  * @param clusterListW the W-view cluster list to populate
277  */
278  void GetClusterLists(const pandora::StringVector &inputClusterListNames, pandora::ClusterList &clusterListU,
279  pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const;
280 
281  /**
282  * @brief Calculate the cluster sliding fits
283  *
284  * @param inputClusterList the input cluster list
285  * @param minClusterCaloHits the minimum number of cluster calo hits
286  * @param slidingFitWindow the sliding fit window
287  * @param slidingFitDataList the list of sliding fits to fill
288  */
289  void CalculateClusterSlidingFits(const pandora::ClusterList &inputClusterList, const unsigned int minClusterCaloHits,
290  const unsigned int slidingFitWindow, SlidingFitDataList &slidingFitDataList) const;
291 
292  /**
293  * @brief Get the beam deweighting score for a vertex
294  *
295  * @param beamConstants the beam constants
296  * @param pVertex address of the vertex
297  *
298  * @return the score
299  */
300  float GetBeamDeweightingScore(const BeamConstants &beamConstants, const pandora::Vertex *const pVertex) const;
301 
302  /**
303  * @brief Whether algorithm is running in beam mode, assuming neutrinos travel in positive z-direction
304  *
305  * @return boolean
306  */
307  bool IsBeamModeOn() const;
308 
309  /**
310  * @brief Calculate the energy of a vertex candidate by summing values from all three planes
311  *
312  * @param pVertex the address of the vertex
313  * @param kdTreeMap the map of 2D hit kd trees
314  *
315  * @return the summed vertex energy
316  */
317  float GetVertexEnergy(const pandora::Vertex *const pVertex, const KDTreeMap &kdTreeMap) const;
318 
319  /**
320  * @brief Finds the energy of the nearest hit to the vertex candidate in this view
321  *
322  * @param pVertex the address of the vertex
323  * @param hitType the relevant hit type
324  * @param kdTree the kd tree of 2D hits
325  *
326  * @return the energy of the nearest hit
327  */
328  float VertexHitEnergy(const pandora::Vertex *const pVertex, const pandora::HitType hitType, HitKDTree2D &kdTree) const;
329 
330  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
331 
332 private:
333  pandora::StatusCode Run();
334 
335  /**
336  * @brief Initialize kd trees with details of hits in algorithm-configured cluster lists
337  *
338  * @param kdTreeU the kd tree for u hits
339  * @param kdTreeV the kd tree for v hits
340  * @param kdTreeW the kd tree for w hits
341  */
342  void InitializeKDTrees(HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW) const;
343 
344  /**
345  * @brief Whether the vertex lies on a hit in the specified view
346  *
347  * @param pVertex the address of the vertex
348  * @param hitType the relevant hit type
349  * @param kdTree the relevant kd tree
350  *
351  * @return boolean
352  */
353  bool IsVertexOnHit(const pandora::Vertex *const pVertex, const pandora::HitType hitType, HitKDTree2D &kdTree) const;
354 
355  /**
356  * @brief Whether the vertex lies in a registered gap
357  *
358  * @param pVertex the address of the vertex
359  * @param hitType the relevant hit type
360  *
361  * @return boolean
362  */
363  bool IsVertexInGap(const pandora::Vertex *const pVertex, const pandora::HitType hitType) const;
364 
365  /**
366  * @brief From the top-scoring candidate vertices, select a subset for further investigation
367  *
368  * @param vertexScoreList the vertex score list
369  * @param selectedVertexList to receive the selected vertex list
370  */
371  void SelectTopScoreVertices(VertexScoreList &vertexScoreList, pandora::VertexList &selectedVertexList) const;
372 
373  /**
374  * @brief Whether to accept a candidate vertex, based on its spatial position in relation to other selected candidates
375  *
376  * @param pVertex the address of the vertex
377  * @param selectedVertexList the selected vertex list
378  *
379  * @return boolean
380  */
381  bool AcceptVertexLocation(const pandora::Vertex *const pVertex, const pandora::VertexList &selectedVertexList) const;
382 
383  /**
384  * @brief Sort vertices by increasing z position
385  *
386  * @param pLhs address of the lhs vertex
387  * @param pRhs address of the rhs vertex
388  *
389  * @return whether lhs should precedes rhs
390  */
391  static bool SortByVertexZPosition(const pandora::Vertex *const pLhs, const pandora::Vertex *const pRhs);
392 
393 private:
394  pandora::StringVector m_inputCaloHitListNames; ///< The list of calo hit list names
395  std::string m_outputVertexListName; ///< The name under which to save the output vertex list
396 
397  bool m_replaceCurrentVertexList; ///< Whether to replace the current vertex list with the output list
398 
399  bool m_beamMode; ///< Whether to run in beam mode, assuming neutrinos travel in positive z-direction
400  float m_nDecayLengthsInZSpan; ///< The number of score decay lengths to use over the course of the vertex z-span
401 
402  bool m_selectSingleVertex; ///< Whether to make a final decision and select just one vertex candidate
403  unsigned int m_maxTopScoreSelections; ///< Max number of top-scoring vertex candidate to select for output
404 
405  float m_maxOnHitDisplacement; ///< Max hit-vertex displacement for declaring vertex to lie on a hit in each view
406 
407  float m_minCandidateDisplacement; ///< Ignore other top-scoring candidates located in close proximity to original
408  float m_minCandidateScoreFraction; ///< Ignore other top-scoring candidates with score less than a fraction of original
409 
410  bool m_useDetectorGaps; ///< Whether to account for registered detector gaps in vertex selection
411  float m_gapTolerance; ///< The tolerance to use when querying whether a sampling point is in a gap, units cm
412 
413  bool m_isEmptyViewAcceptable; ///< Whether views entirely empty of hits are classed as 'acceptable' for candidate filtration
414  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)
415 };
416 
417 //------------------------------------------------------------------------------------------------------------------------------------------
418 
419 inline float VertexSelectionBaseAlgorithm::GetBeamDeweightingScore(const BeamConstants &beamConstants, const pandora::Vertex *const pVertex) const
420 {
421  const float vertexMinZ(std::max(pVertex->GetPosition().GetZ(), beamConstants.GetMinZCoordinate()));
422  return (beamConstants.GetMinZCoordinate() - vertexMinZ) * beamConstants.GetDecayConstant();
423 }
424 
425 //------------------------------------------------------------------------------------------------------------------------------------------
426 
428 {
429  return m_beamMode;
430 }
431 
432 //------------------------------------------------------------------------------------------------------------------------------------------
433 //------------------------------------------------------------------------------------------------------------------------------------------
434 
435 inline VertexSelectionBaseAlgorithm::VertexScore::VertexScore(const pandora::Vertex *const pVertex, const float score) :
436  m_pVertex(pVertex),
437  m_score(score)
438 {
439 }
440 
441 //------------------------------------------------------------------------------------------------------------------------------------------
442 
443 inline const pandora::Vertex *VertexSelectionBaseAlgorithm::VertexScore::GetVertex() const
444 {
445  return m_pVertex;
446 }
447 
448 //------------------------------------------------------------------------------------------------------------------------------------------
449 
451 {
452  return m_score;
453 }
454 
455 //------------------------------------------------------------------------------------------------------------------------------------------
456 
458 {
459  return (this->GetScore() > rhs.GetScore());
460 }
461 
462 //------------------------------------------------------------------------------------------------------------------------------------------
463 //------------------------------------------------------------------------------------------------------------------------------------------
464 
466 {
467  return m_minZCoordinate.Get();
468 }
469 
470 //------------------------------------------------------------------------------------------------------------------------------------------
471 
473 {
474  return m_decayConstant.Get();
475 }
476 
477 //------------------------------------------------------------------------------------------------------------------------------------------
478 
479 inline void VertexSelectionBaseAlgorithm::BeamConstants::SetConstants(const float minZCoordinate, const float decayConstant)
480 {
481  m_minZCoordinate = minZCoordinate;
482  m_decayConstant = decayConstant;
483 }
484 
485 //------------------------------------------------------------------------------------------------------------------------------------------
486 
487 inline const pandora::CartesianVector &VertexSelectionBaseAlgorithm::SlidingFitData::GetMinLayerDirection() const
488 {
489  return m_minLayerDirection;
490 }
491 
492 //------------------------------------------------------------------------------------------------------------------------------------------
493 
494 inline const pandora::CartesianVector &VertexSelectionBaseAlgorithm::SlidingFitData::GetMaxLayerDirection() const
495 {
496  return m_maxLayerDirection;
497 }
498 
499 //------------------------------------------------------------------------------------------------------------------------------------------
500 
501 inline const pandora::CartesianVector &VertexSelectionBaseAlgorithm::SlidingFitData::GetMinLayerPosition() const
502 {
503  return m_minLayerPosition;
504 }
505 
506 //------------------------------------------------------------------------------------------------------------------------------------------
507 
508 inline const pandora::CartesianVector &VertexSelectionBaseAlgorithm::SlidingFitData::GetMaxLayerPosition() const
509 {
510  return m_maxLayerPosition;
511 }
512 
513 //------------------------------------------------------------------------------------------------------------------------------------------
514 
515 inline const pandora::Cluster *VertexSelectionBaseAlgorithm::SlidingFitData::GetCluster() const
516 {
517  return m_pCluster;
518 }
519 
520 //------------------------------------------------------------------------------------------------------------------------------------------
521 
522 inline const pandora::ClusterList &VertexSelectionBaseAlgorithm::ShowerCluster::GetClusters() const
523 {
524  return m_clusterList;
525 }
526 
527 //------------------------------------------------------------------------------------------------------------------------------------------
528 
530 {
531  return m_twoDSlidingFitResult;
532 }
533 
534 } // namespace lar_content
535 
536 #endif // #ifndef LAR_VERTEX_SELECTION_BASE_ALGORITHM_H
const pandora::Cluster * m_pCluster
Pointer to the corresponding cluster.
float m_minCandidateScoreFraction
Ignore other top-scoring candidates with score less than a fraction of original.
pandora::CartesianPointVector m_coordinateVector
The coordinate vector.
void SetConstants(const float minZCoordinate, const float decayConstant)
Set the beam constants.
KDTreeNodeInfoT< const pandora::CaloHit *, 2 > HitKDNode2D
pandora::CartesianPointVector GetClusterListCoordinateVector(const pandora::ClusterList &clusterList) const
Get the coordinate vector for a cluster list.
KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > HitKDTree2D
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.
std::string m_outputVertexListName
The name under which to save the output vertex list.
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.
pandora::StringVector m_inputCaloHitListNames
The list of calo hit list names.
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.
const pandora::CartesianVector & GetMaxLayerDirection() const
Get the max layer direction.
BEGIN_PROLOG or score(default)}sbnd_crttrackmatchingalg_crID
TwoDSlidingFitResult m_twoDSlidingFitResult
The fit to the hits of the cluster list.
pandora::CartesianVector m_minLayerPosition
The position of the fit at the max layer.
bool IsBeamModeOn() const
Whether algorithm is running in beam mode, assuming neutrinos travel in positive z-direction.
const pandora::CartesianVector & GetMinLayerPosition() const
Get the min layer position.
const pandora::ClusterList & GetClusters() const
Get the cluster list.
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.
Data stored in each KDTree node. The dim1/dim2 fields are usually the duplication of some PFRecHit va...
pandora::CartesianVector m_maxLayerDirection
The direction of the fit at the min layer.
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 can...
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.
std::map< pandora::HitType, const ShowerClusterList > ShowerClusterListMap
Map of shower cluster lists for passing to tools.
virtual void GetBeamConstants(const pandora::VertexVector &vertexVector, BeamConstants &beamConstants) const
Get the beam score constants for a provided list of candidate vertices.
ShowerCluster(const pandora::ClusterList &clusterList, const int slidingFitWindow, const float slidingFitPitch)
Constructor.
unsigned int m_maxTopScoreSelections
Max number of top-scoring vertex candidate to select for output.
pandora::CartesianVector m_minLayerDirection
The direction of the fit at the min layer.
bool IsVertexInGap(const pandora::Vertex *const pVertex, const pandora::HitType hitType) const
Whether the vertex lies in a registered gap.
Header file for the lar support vector machine class.
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.
SlidingFitData(const pandora::Cluster *const pCluster, const int slidingFitWindow, const float slidingFitPitch)
Constructor.
Header file for the lar two dimensional sliding fit result class.
std::map< pandora::HitType, const pandora::ClusterList & > ClusterListMap
Map array of cluster lists for passing to tools.
const TwoDSlidingFitResult & GetFit() const
Get the 2D sliding linear fit.
pandora::CartesianVector m_maxLayerPosition
The position of the fit at the max layer.
bool m_useDetectorGaps
Whether to account for registered detector gaps in vertex selection.
static bool SortByVertexZPosition(const pandora::Vertex *const pLhs, const pandora::Vertex *const pRhs)
Sort vertices by increasing z position.
VertexScore(const pandora::Vertex *const pVertex, const float score)
Constructor.
void InitializeKDTrees(HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW) const
Initialize kd trees with details of hits in algorithm-configured cluster lists.
const pandora::Vertex * m_pVertex
The address of the vertex.
bool operator<(const VertexScore &rhs) const
operator&lt;
const pandora::Vertex * GetVertex() const
Get the address of the vertex.
const pandora::CartesianVector & GetMaxLayerPosition() const
Get the max layer position.
bool m_beamMode
Whether to run in beam mode, assuming neutrinos travel in positive z-direction.
bool m_isEmptyViewAcceptable
Whether views entirely empty of hits are classed as &#39;acceptable&#39; for candidate filtration.
bool m_selectSingleVertex
Whether to make a final decision and select just one vertex candidate.
std::map< pandora::HitType, const SlidingFitDataList > SlidingFitDataListMap
Map of sliding fit data lists for passing to tools.
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.
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 e...
void SelectTopScoreVertices(VertexScoreList &vertexScoreList, pandora::VertexList &selectedVertexList) const
From the top-scoring candidate vertices, select a subset for further investigation.
std::map< pandora::HitType, const std::reference_wrapper< HitKDTree2D > > KDTreeMap
Map array of hit kd trees for passing to tools.
float GetBeamDeweightingScore(const BeamConstants &beamConstants, const pandora::Vertex *const pVertex) const
Get the beam deweighting score for a vertex.
float m_nDecayLengthsInZSpan
The number of score decay lengths to use over the course of the vertex z-span.
float m_minCandidateDisplacement
Ignore other top-scoring candidates located in close proximity to original.
bool m_replaceCurrentVertexList
Whether to replace the current vertex list with the output list.
MvaFeatureTool class template.
Definition: LArMvaHelper.h:33
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
const pandora::CartesianVector & GetMinLayerDirection() const
Get the min layer direction.
std::array< float, 2 > VertexVector(const recob::Vertex &vert, const geo::PlaneID &plane, const geo::GeometryCore *geo, const detinfo::DetectorPropertiesData &dprop)
std::list< Vertex > VertexList
Definition: DCEL.h:182
float m_gapTolerance
The tolerance to use when querying whether a sampling point is in a gap, units cm.
float m_maxOnHitDisplacement
Max hit-vertex displacement for declaring vertex to lie on a hit in each view.
const pandora::Cluster * GetCluster() const
Get a pointer to the corresponding cluster.