ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Clustering::Clusterizer Class Reference

#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< Pointorig_points_
 
std::list< Nodenodes_
 
std::vector< Pointfinal_points_
 
float clustered_lumi_
 

Static Private Attributes

static std::mt19937_64 prng_ = InitializePRNG()
 
static std::uniform_real_distribution< float > urd_
 

Detailed Description

Definition at line 38 of file clusterizer.hpp.

Constructor & Destructor Documentation

Clusterizer::Clusterizer ( const TH2D &  hist_template,
long  max_points = -1 
)
explicit

Definition at line 61 of file clusterizer.cpp.

References hist_, and max_points_.

Member Function Documentation

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().

void Clusterizer::Cluster ( double  luminosity) const
private

Definition at line 266 of file clusterizer.cpp.

References clustered_lumi_, MergeNodes(), and SetupNodes().

Referenced by GetGraph().

void Clustering::Clusterizer::ConvertToHist ( )
private
void Clusterizer::EmptyHistogram ( )
private

Definition at line 258 of file clusterizer.cpp.

References hist_.

Referenced by SetPoints().

TGraph Clusterizer::GetGraph ( double  luminosity,
bool  keep_in_frame = true 
) const
TH2D Clusterizer::GetHistogram ( double  luminosity) const

Definition at line 112 of file clusterizer.cpp.

References hist_.

Referenced by Hist2D::AddEntry().

void Clusterizer::InsertPoint ( float  x,
float  y,
float  w 
) const
private

Definition at line 153 of file clusterizer.cpp.

Referenced by MergeNodes(), SetupNodes(), and SplitNode().

void Clusterizer::InsertPoint ( const Point p) const
private

Definition at line 157 of file clusterizer.cpp.

References Link(), nodes_, and Clustering::WeightedDistance().

void Clusterizer::Link ( std::list< Node >::iterator  node,
std::list< Node >::iterator  neighbor,
float  dist 
)
staticprivate

Definition at line 243 of file clusterizer.cpp.

Referenced by InsertPoint(), and RemovePoint().

void Clusterizer::MergeNodes ( ) const
private

Definition at line 330 of file clusterizer.cpp.

References final_points_, NearestNeighbors(), nodes_, and SplitNode().

Referenced by Cluster(), and MergeNodes().

void Clusterizer::MergeNodes ( std::list< Node >::iterator  a,
std::list< Node >::iterator  b 
) const
private
list< Node >::iterator Clusterizer::NearestNeighbors ( ) const
private

Definition at line 221 of file clusterizer.cpp.

References ERROR, and nodes_.

Referenced by MergeNodes().

void Clusterizer::RemovePoint ( std::list< Node >::iterator  node) const
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_.

void Clusterizer::SetupNodes ( double  luminosity) const
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().

void Clusterizer::SplitNode ( ) const
private

Member Data Documentation

float Clustering::Clusterizer::clustered_lumi_
mutableprivate

Definition at line 58 of file clusterizer.hpp.

Referenced by AddPoint(), Cluster(), and SetPoints().

std::vector<Point> Clustering::Clusterizer::final_points_
mutableprivate

Definition at line 57 of file clusterizer.hpp.

Referenced by GetGraph(), MergeNodes(), SetupNodes(), and SplitNode().

TH2D Clustering::Clusterizer::hist_
private
bool Clustering::Clusterizer::hist_mode_
private

Definition at line 53 of file clusterizer.hpp.

Referenced by AddPoint(), SetPoints(), and SetupNodes().

long Clustering::Clusterizer::max_points_
private

Definition at line 52 of file clusterizer.hpp.

Referenced by AddPoint(), Clusterizer(), and SetPoints().

std::list<Node> Clustering::Clusterizer::nodes_
mutableprivate
std::vector<Point> Clustering::Clusterizer::orig_points_
private

Definition at line 55 of file clusterizer.hpp.

Referenced by AddPoint(), SetPoints(), and SetupNodes().

mt19937_64 Clusterizer::prng_ = InitializePRNG()
staticprivate

Definition at line 60 of file clusterizer.hpp.

Referenced by Clustering::Node::operator<(), and SetupNodes().

uniform_real_distribution< float > Clusterizer::urd_
staticprivate

Definition at line 61 of file clusterizer.hpp.

Referenced by Clustering::Node::operator<(), and SetupNodes().


The documentation for this class was generated from the following files: