29 #ifndef CALOHITNEIGHBORSEARCHHELPER_H
30 #define CALOHITNEIGHBORSEARCHHELPER_H
34 #include "Pandora/PandoraInternal.h"
35 #include "Pandora/StatusCodes.h"
42 #include <mlpack/core.hpp>
43 #include <mlpack/core/math/range.hpp>
44 #include <mlpack/methods/neighbor_search/neighbor_search.hpp>
46 #include <mlpack/methods/dbscan/dbscan.hpp>
48 #include <mlpack/namespace_compat.hpp>
50 namespace pandora {
class Algorithm;
class CaloHit;
class Track; }
52 namespace april_content
55 typedef mlpack::neighbor::NeighborSearch<mlpack::neighbor::NearestNeighborSort, CaloMetric, arma::mat, mlpack::tree::MeanSplitBallTree> CaloKNN;
56 typedef mlpack::dbscan::DBSCAN< mlpack::range::RangeSearch<> > MLPACKDBSCAN;
57 typedef mlpack::dbscan::DBSCAN< mlpack::range::RangeSearch<CaloMetric, arma::mat, mlpack::tree::MeanSplitBallTree> > CaloDBSCAN;
66 static pandora::StatusCode BuildNeighborSearch(
const pandora::CaloHitList *
const pCaloHitList);
67 static pandora::StatusCode BuildCaloNeighborSearch(
const pandora::CaloHitVector& caloHitVector);
70 static pandora::StatusCode SearchNeighbourHits(pandora::CartesianVector testPosition,
int nNeighbor, pandora::CaloHitList& neighborHits);
72 static pandora::StatusCode SearchNeighbourHits4D(std::vector<float> testPosition,
int nNeighbor, pandora::CaloHitList& neighborHits);
74 static pandora::StatusCode ClusteringByDBSCAN(
const pandora::CaloHitVector& caloHitVector,
75 std::vector<pandora::CaloHitVector>& hitsForCluster,
float eps,
int minPoints);
77 static pandora::StatusCode ClusteringByDBSCAN4D(
const pandora::CaloHitVector& caloHitVector,
78 std::vector<pandora::CaloHitVector>& hitsForCluster,
float eps,
int minPoints);
82 static pandora::StatusCode FillMatixFromCaloHits(
const pandora::CaloHitVector& caloHitVector, arma::mat& caloHitsMatrix);
83 static pandora::StatusCode FillMatix4DFromCaloHits(
const pandora::CaloHitVector& caloHitVector, arma::mat& caloHitsMatrix4D);
85 static arma::mat m_caloHitsMatrix;
86 static arma::mat m_caloHitsMatrix4D;
89 static const pandora::CaloHitList* m_pCaloHitList;
92 static pandora::CaloHitVector m_caloHitVector;
94 static mlpack::neighbor::KNN m_neighborSearch;
95 static CaloKNN m_neighborSearch4D;
97 static CaloDBSCAN m_caloDBSCAN;
CaloHitNeighborSearchHelper class.
Definition: CaloHitNeighborSearchHelper.h:62