EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
kdfinder.hpp File Reference
#include "nanoflann.hpp"
#include <algorithm>
#include <chrono>
#include <cmath>
#include <fstream>
#include <iostream>
#include <limits>
#include <sstream>
#include <thread>
#include <tuple>
#include <vector>
+ Include dependency graph for kdfinder.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kdfinder::TVector< T >
 
class  kdfinder::Helix< T >
 
class  kdfinder::Data< T >
 
struct  kdfinder::Circle< T >
 
struct  kdfinder::Line< T >
 
class  kdfinder::CircleFit< T >
 
class  kdfinder::LinearFit< T >
 
struct  kdfinder::KDPointCloud< T >
 
struct  kdfinder::KDTriplet< T >
 
class  kdfinder::TrackCandidate< T >
 

Namespaces

namespace  kdfinder
 

Functions

template<typename T >
T kdfinder::rnd_gauss (T mean, T stddev)
 
template<class T >
T kdfinder::abs (const TVector< T > &v)
 
template<class T >
TVector< Tkdfinder::cross_product (const TVector< T > &v1, const TVector< T > &v2)
 
template<class T >
TVector< Tkdfinder::operator+ (const TVector< T > &v1, const TVector< T > &v2)
 
template<class T >
TVector< Tkdfinder::operator- (const TVector< T > &v1, const TVector< T > &v2)
 
template<class T >
T kdfinder::operator* (const TVector< T > &v1, const TVector< T > &v2)
 
template<class T >
TVector< Tkdfinder::operator* (const TVector< T > &v, double c)
 
template<class T >
TVector< Tkdfinder::operator* (T c, const TVector< T > &v)
 
template<class T >
TVector< Tkdfinder::operator/ (const TVector< T > &v, double c)
 
template<typename T >
T kdfinder::DistanceToCircle (Circle< T > *circle, T x, T y)
 
template<typename T >
T kdfinder::DistanceToCircle (T a, T b, T r, T x, T y)
 
template<typename T >
T kdfinder::DistanceToLine (T a, T b, T x, T y)
 
template<typename T >
bool kdfinder::pointsort (std::vector< T > a, std::vector< T > b)
 
template<typename T >
bool kdfinder::tripletsort (KDTriplet< T > a, KDTriplet< T > b)
 
template<typename T >
T kdfinder::angle_between_vectors (T x1, T y1, T z1, T x2, T y2, T z2)
 
template<typename T >
void kdfinder::make_triplets (size_t triplet_begin, size_t triplet_end, std::vector< std::vector< double >> &hits, nanoflann::KDTreeSingleIndexAdaptor< nanoflann::L2_Simple_Adaptor< T, KDPointCloud< T >>, KDPointCloud< T >, 3 > &index, std::vector< std::vector< KDTriplet< T >>> &triplets, T search_radius=10, T search_angle=M_PI/8)
 
template<typename T >
std::vector< std::vector
< std::vector< T > > > 
kdfinder::find_tracks (std::vector< std::vector< T >> &points, std::vector< std::vector< T >> &unused_hits, T search_radius=10, T search_angle=M_PI/8, size_t min_track_size=10, size_t nthreads=1, bool stats=false)
 
template<typename T >
std::vector< std::vector
< std::vector< T > > > 
kdfinder::find_tracks_iterative (std::vector< std::vector< T >> &hits, std::vector< std::vector< T >> &unused_hits, T search_radius1=10, T search_angle1=M_PI/8, size_t min_track_size1=10, T search_radius2=12, T search_angle2=M_PI/8, size_t min_track_size2=6, size_t nthreads=1, bool stats=false)
 
template<typename T >
std::vector< TrackCandidate< T > * > kdfinder::get_track_candidates (std::vector< std::vector< std::vector< T >>> &tracks, T B, bool stats=false)
 
template<typename T >
bool kdfinder::candidatesort (const TrackCandidate< T > *a, const TrackCandidate< T > *b)
 
template<typename T >
bool kdfinder::candidatesortradius (const TrackCandidate< T > *a, const TrackCandidate< T > *b)
 
template<typename T >
bool kdfinder::ismergedcandidate (const TrackCandidate< T > *o)
 
template<typename T >
std::vector< TrackCandidate< T > * > kdfinder::merge_track_candidates (std::vector< TrackCandidate< T > * > &candidates, T c_tanl=5.0, T c_xy=5.0, T c_dist=60.0, bool stats=false)
 
template<typename T >
bool kdfinder::elementsort (const std::tuple< T, Helix< T > *, size_t > a, const std::tuple< T, Helix< T > *, size_t > b)
 
template<typename T >
bool kdfinder::vertexsort (const std::pair< std::vector< T >, std::vector< size_t >> a, const std::pair< std::vector< T >, std::vector< size_t >> b)
 
template<typename T >
std::vector< std::pair
< std::vector< T >
, std::vector< size_t > > > 
kdfinder::find_vertex_seeds (std::vector< TrackCandidate< T > * > &candidates, T x0=0, T y0=0, T c_z_dist=0.5, T c_xy_dist=2.0, T c_min_tracks=3, bool stats=false)
 
template<typename T >
size_t kdfinder::get_track_color (T pt)
 
template<typename T >
std::string kdfinder::export_candidates_json (std::vector< TrackCandidate< T > * > &candidates, std::vector< std::vector< T >> &hits, size_t run=0, size_t event_number=0, size_t evt_time=0, double B=-0.5)
 
template<typename T >
std::string kdfinder::export_json (std::vector< std::vector< std::vector< T >>> &tracks, std::vector< std::vector< T >> &hits, size_t run=0, size_t event_number=0, size_t evt_time=0, double B=-0.5)
 
template<typename T >
std::string kdfinder::export_candidates_json_old (std::vector< TrackCandidate< T > * > &candidates, std::vector< ulong > &trigger_ids, size_t run=0, size_t event_number=0, size_t evt_time=0, T B=-0.5, bool round=false)