|
void | add_at_position (const FKDPoint< TYPE, numberOfDimensions > &point, const unsigned int position) |
|
void | add_at_position (FKDPoint< TYPE, numberOfDimensions > &&point, const unsigned int position) |
|
bool | intersects (unsigned int index, const FKDPoint< TYPE, numberOfDimensions > &minPoint, const FKDPoint< TYPE, numberOfDimensions > &maxPoint, int dimension) const |
|
bool | is_in_the_box (unsigned int index, const FKDPoint< TYPE, numberOfDimensions > &minPoint, const FKDPoint< TYPE, numberOfDimensions > &maxPoint) const |
|
unsigned int | leftSonIndex (unsigned int index) const |
|
unsigned int | partition_complete_kdtree (unsigned int length) |
|
unsigned int | rightSonIndex (unsigned int index) const |
|
template<class TYPE, unsigned int numberOfDimensions>
class FKDTree< TYPE, numberOfDimensions >
Definition at line 35 of file FKDTree.h.
template<class TYPE , unsigned int numberOfDimensions>
void FKDTree< TYPE, numberOfDimensions >::build |
( |
std::vector< FKDPoint< TYPE, numberOfDimensions > > & |
points | ) |
|
|
inline |
Definition at line 109 of file FKDTree.h.
References a, FKDTree< TYPE, numberOfDimensions >::add_at_position(), b, hcalRecHitTable_cff::depth, pat::helper::ParametrizationHelper::dimension(), mps_fire::i, trklet::ilog2(), HLT_2023v12_cff::maxDepth, FKDTree< TYPE, numberOfDimensions >::partition_complete_kdtree(), hiPixelPairStep_cff::points, FKDTree< TYPE, numberOfDimensions >::theDepth, FKDTree< TYPE, numberOfDimensions >::theDimensions, FKDTree< TYPE, numberOfDimensions >::theIds, FKDTree< TYPE, numberOfDimensions >::theIntervalLength, FKDTree< TYPE, numberOfDimensions >::theIntervalMin, and FKDTree< TYPE, numberOfDimensions >::theNumberOfPoints.
Referenced by psClasses.BuildThread::run().
115 for (
unsigned int i = 0;
i < numberOfDimensions; ++
i)
130 unsigned int firstIndexInDepth = (1 <<
depth) - 1;
132 for (
unsigned int indexInDepth = 0; indexInDepth <
maxDepth; ++indexInDepth) {
133 unsigned int indexInArray = firstIndexInDepth + indexInDepth;
134 unsigned int leftSonIndexInArray = 2 * indexInArray + 1;
135 unsigned int rightSonIndexInArray = leftSonIndexInArray + 1;
148 return a.getId() <
b.getId();
168 unsigned int firstIndexInDepth = (1 <<
theDepth) - 1;
169 for (
unsigned int indexInArray = firstIndexInDepth; indexInArray <
theNumberOfPoints; ++indexInArray) {
std::array< std::vector< TYPE >, numberOfDimensions > theDimensions
std::vector< unsigned int > theIds
std::vector< unsigned int > theIntervalMin
unsigned int partition_complete_kdtree(unsigned int length)
unsigned int theNumberOfPoints
void add_at_position(const FKDPoint< TYPE, numberOfDimensions > &point, const unsigned int position)
std::vector< unsigned int > theIntervalLength
uint32_t dimension(pat::CandKinResolution::Parametrization parametrization)
Returns the number of free parameters in a parametrization (3 or 4)
template<class TYPE , unsigned int numberOfDimensions>
void FKDTree< TYPE, numberOfDimensions >::search |
( |
const FKDPoint< TYPE, numberOfDimensions > & |
minPoint, |
|
|
const FKDPoint< TYPE, numberOfDimensions > & |
maxPoint, |
|
|
std::vector< unsigned int > & |
foundPoints |
|
) |
| |
|
inline |
Definition at line 50 of file FKDTree.h.
References hcalRecHitTable_cff::depth, pat::helper::ParametrizationHelper::dimension(), reco::helper::VirtualJetProducerHelper::intersection(), FKDTree< TYPE, numberOfDimensions >::intersects(), FKDTree< TYPE, numberOfDimensions >::is_in_the_box(), FKDTree< TYPE, numberOfDimensions >::leftSonIndex(), SiStripPI::min, FQueue< T >::pop_front(), FQueue< T >::push_back(), FQueue< T >::size(), FKDTree< TYPE, numberOfDimensions >::theDepth, FKDTree< TYPE, numberOfDimensions >::theDimensions, FKDTree< TYPE, numberOfDimensions >::theIds, and FKDTree< TYPE, numberOfDimensions >::theNumberOfPoints.
60 indicesToVisit.push_back(0);
64 unsigned int numberOfindicesToVisitThisDepth;
65 unsigned int numberOfSonsToVisitNext;
66 unsigned int firstSonToVisitNext;
72 numberOfindicesToVisitThisDepth = indicesToVisit.size();
74 for (
unsigned int visitedindicesThisDepth = 0; visitedindicesThisDepth < numberOfindicesToVisitThisDepth;
75 visitedindicesThisDepth++) {
76 index = indicesToVisit[visitedindicesThisDepth];
87 numberOfSonsToVisitNext =
93 numberOfSonsToVisitNext =
98 for (
unsigned int whichSon = 0; whichSon < numberOfSonsToVisitNext; ++whichSon) {
99 indicesToVisit.push_back(firstSonToVisitNext + whichSon);
103 indicesToVisit.pop_front(numberOfindicesToVisitThisDepth);
std::array< std::vector< TYPE >, numberOfDimensions > theDimensions
std::vector< unsigned int > theIds
double intersection(double r12)
unsigned int theNumberOfPoints
bool intersects(unsigned int index, const FKDPoint< TYPE, numberOfDimensions > &minPoint, const FKDPoint< TYPE, numberOfDimensions > &maxPoint, int dimension) const
unsigned int leftSonIndex(unsigned int index) const
uint32_t dimension(pat::CandKinResolution::Parametrization parametrization)
Returns the number of free parameters in a parametrization (3 or 4)
bool is_in_the_box(unsigned int index, const FKDPoint< TYPE, numberOfDimensions > &minPoint, const FKDPoint< TYPE, numberOfDimensions > &maxPoint) const