ra4_draw
4bd0201e3d922d42bd545d4b045ed44db33454a4
|
#include <clusterizer.hpp>
Public Member Functions | |
Clusterizer (const TH2D &hist_template, long max_points=-1) | |
void | AddPoint (float x, float y, float w) |
void | SetPoints (const std::vector< Point > &points) |
void | SetPoints (const TH2D &h) |
TH2D | GetHistogram (double luminosity) const |
TGraph | GetGraph (double luminosity, bool keep_in_frame=true) const |
Private Member Functions | |
void | InsertPoint (float x, float y, float w) const |
void | InsertPoint (const Point &p) const |
void | RemovePoint (std::list< Node >::iterator node) const |
std::list< Node >::iterator | NearestNeighbors () const |
void | EmptyHistogram () |
void | ConvertToHist () |
void | Cluster (double luminosity) const |
void | SetupNodes (double luminosity) const |
void | MergeNodes () const |
void | MergeNodes (std::list< Node >::iterator a, std::list< Node >::iterator b) const |
void | SplitNode () const |
Static Private Member Functions | |
static void | Link (std::list< Node >::iterator node, std::list< Node >::iterator neighbor, float dist) |
Private Attributes | |
long | max_points_ |
bool | hist_mode_ |
TH2D | hist_ |
std::vector< Point > | orig_points_ |
std::list< Node > | nodes_ |
std::vector< Point > | final_points_ |
float | clustered_lumi_ |
Static Private Attributes | |
static std::mt19937_64 | prng_ = InitializePRNG() |
static std::uniform_real_distribution< float > | urd_ |
Definition at line 38 of file clusterizer.hpp.
|
explicit |
Definition at line 61 of file clusterizer.cpp.
References hist_, and max_points_.
void Clusterizer::AddPoint | ( | float | x, |
float | y, | ||
float | w | ||
) |
Definition at line 74 of file clusterizer.cpp.
References clustered_lumi_, hist_, hist_mode_, max_points_, and orig_points_.
Referenced by Hist2D::SingleHist2D::RecordEvent().
|
private |
Definition at line 266 of file clusterizer.cpp.
References clustered_lumi_, MergeNodes(), and SetupNodes().
Referenced by GetGraph().
|
private |
|
private |
TGraph Clusterizer::GetGraph | ( | double | luminosity, |
bool | keep_in_frame = true |
||
) | const |
Definition at line 118 of file clusterizer.cpp.
References Cluster(), final_points_, FullTitle(), hist_, Clustering::Point::x_, and Clustering::Point::y_.
TH2D Clusterizer::GetHistogram | ( | double | luminosity | ) | const |
|
private |
Definition at line 153 of file clusterizer.cpp.
Referenced by MergeNodes(), SetupNodes(), and SplitNode().
|
private |
Definition at line 157 of file clusterizer.cpp.
References Link(), nodes_, and Clustering::WeightedDistance().
|
staticprivate |
Definition at line 243 of file clusterizer.cpp.
Referenced by InsertPoint(), and RemovePoint().
|
private |
Definition at line 330 of file clusterizer.cpp.
References final_points_, NearestNeighbors(), nodes_, and SplitNode().
Referenced by Cluster(), and MergeNodes().
|
private |
Definition at line 351 of file clusterizer.cpp.
References final_points_, InsertPoint(), MergeNodes(), RemovePoint(), and Clustering::Point::w_.
|
private |
Definition at line 221 of file clusterizer.cpp.
Referenced by MergeNodes().
|
private |
Definition at line 185 of file clusterizer.cpp.
References Link(), nodes_, and Clustering::WeightedDistance().
Referenced by MergeNodes(), and SplitNode().
void Clusterizer::SetPoints | ( | const std::vector< Point > & | points | ) |
Definition at line 87 of file clusterizer.cpp.
References clustered_lumi_, EmptyHistogram(), hist_, hist_mode_, max_points_, and orig_points_.
void Clusterizer::SetPoints | ( | const TH2D & | h | ) |
Definition at line 102 of file clusterizer.cpp.
References clustered_lumi_, EmptyHistogram(), hist_, hist_mode_, and max_points_.
|
private |
Definition at line 275 of file clusterizer.cpp.
References final_points_, hist_, hist_mode_, InsertPoint(), nodes_, orig_points_, prng_, and urd_.
Referenced by Cluster().
|
private |
Definition at line 413 of file clusterizer.cpp.
References final_points_, InsertPoint(), nodes_, RemovePoint(), Clustering::Point::w_, Clustering::WeightedDistance(), Clustering::Point::x_, and Clustering::Point::y_.
Referenced by MergeNodes().
|
mutableprivate |
Definition at line 58 of file clusterizer.hpp.
Referenced by AddPoint(), Cluster(), and SetPoints().
|
mutableprivate |
Definition at line 57 of file clusterizer.hpp.
Referenced by GetGraph(), MergeNodes(), SetupNodes(), and SplitNode().
|
private |
Definition at line 54 of file clusterizer.hpp.
Referenced by AddPoint(), Clusterizer(), EmptyHistogram(), GetGraph(), GetHistogram(), SetPoints(), and SetupNodes().
|
private |
Definition at line 53 of file clusterizer.hpp.
Referenced by AddPoint(), SetPoints(), and SetupNodes().
|
private |
Definition at line 52 of file clusterizer.hpp.
Referenced by AddPoint(), Clusterizer(), and SetPoints().
|
mutableprivate |
Definition at line 56 of file clusterizer.hpp.
Referenced by InsertPoint(), MergeNodes(), NearestNeighbors(), RemovePoint(), SetupNodes(), and SplitNode().
|
private |
Definition at line 55 of file clusterizer.hpp.
Referenced by AddPoint(), SetPoints(), and SetupNodes().
|
staticprivate |
Definition at line 60 of file clusterizer.hpp.
Referenced by Clustering::Node::operator<(), and SetupNodes().
|
staticprivate |
Definition at line 61 of file clusterizer.hpp.
Referenced by Clustering::Node::operator<(), and SetupNodes().