Falaise
4.0.1
SuperNEMO Software Toolkit
|
A collection of tracker clusters. More...
#include <falaise/snemo/datamodels/tracker_clustering_solution.h>
Public Types | |
typedef tracker_cluster::handle_type | cluster_handle_type |
Handle on tracker cluster. More... | |
typedef std::vector< cluster_handle_type > | cluster_col_type |
Collection of handles on tracker clusters. More... | |
typedef datatools::handle< tracker_clustering_solution > | handle_type |
Handle on tracker cluster solution. More... | |
typedef calibrated_tracker_hit::collection_type | hit_collection_type |
Collection of calibrated hit handles. More... | |
typedef std::map< int32_t, cluster_col_type > | hit_belonging_col_type |
Dictionary of hit/cluster belonging. More... | |
Public Member Functions | |
tracker_clustering_solution () | |
Default constructor. More... | |
virtual | ~tracker_clustering_solution () |
Default constructor. More... | |
bool | has_solution_id () const |
Check if there is a valid solution ID. More... | |
int | get_solution_id () const |
Get the solution ID. More... | |
void | set_solution_id (int32_t) |
Set the solution ID. More... | |
void | invalidate_solution_id () |
Invalidate the solution ID. More... | |
datatools::properties & | grab_auxiliaries () |
Return a mutable reference on the container of auxiliary properties. More... | |
const datatools::properties & | get_auxiliaries () const |
Return a non mutable reference on the container of auxiliary properties. More... | |
cluster_col_type & | grab_clusters () |
Return a mutable reference on the container of clusters. More... | |
const cluster_col_type & | get_clusters () const |
Return a non mutable reference on the container of clusters. More... | |
bool | has_unclustered_hits () const |
Check if there is some unclustered hits. More... | |
hit_collection_type & | grab_unclustered_hits () |
Return a mutable reference on the container of handles on unclustered calibrated tracker hits. More... | |
const hit_collection_type & | get_unclustered_hits () const |
void | clear () |
Empty the contents of the tracker cluster solution. More... | |
void | reset () |
Reset the tracker cluster solution(see clear) More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
void | compute_hit_belonging () |
Compute hit belonging. More... | |
bool | hit_belongs_to_cluster (int32_t hit_id, int32_t cluster_id_) const |
Test if hit with given ID belongs to a cluster with a given ID. More... | |
bool | hit_belongs_to_cluster (const calibrated_tracker_hit &hit_, const tracker_cluster &cluster_) const |
Test if hit belongs to a cluster. More... | |
bool | hit_is_clustered (const calibrated_tracker_hit &hit_) const |
Test if a given hit is clusterized. More... | |
bool | hit_is_clustered (int32_t hit_id_) const |
Test if a hit with given ID is clusterized. More... | |
bool | hit_belongs_to_several_clusters (const calibrated_tracker_hit &hit_) const |
Test if a given hit belongs to several clusters. More... | |
bool | hit_belongs_to_several_clusters (int32_t hit_id_) const |
Test if a given hit with given ID belongs to several clusters. More... | |
const hit_belonging_col_type & | get_hit_belonging () const |
Returns the hit belonging informations. More... | |
void | reset_hit_belonging () |
Clear the hit belonging informations. More... | |
bool | has_hit_belonging () const |
Test if some hit belonging information is available. More... | |
Public Member Functions inherited from datatools::i_serializable | |
i_serializable () | |
virtual | ~i_serializable () |
virtual const std::string & | get_serial_tag () const=0 |
Static Public Member Functions | |
static void | compute_hit_belonging_from_solution (const tracker_clustering_solution &tcs_, hit_belonging_col_type &hbc_) |
Compute the hit belonging informations from a given clustering solution. More... | |
static int | merge_two_solutions_in_ones (const tracker_clustering_solution &source0_, const tracker_clustering_solution &source1_, tracker_clustering_solution &target_) |
static int | copy_one_solution_in_one (const tracker_clustering_solution &source_, tracker_clustering_solution &target_) |
Copy one clustering solution in another one. More... | |
A collection of tracker clusters.
A tracker clustering solution stores the possible result computed by a clustering algorithm from an original collection of tracker calibrated hits.
Original collection of Geiger hits (handled by a 'calibrated_data' object):
+---------------------—+ | o | | oo oo | | ooo ooooo | | ooooooo | | o o | | oo o | | oo | | o | +---------------------—+
A possible collection of clusters built from the source:
+---------------------—+ | 1 | Legend: 1 : hits belonging to cluster #1 | 11 11 | 0 : hits belonging to cluster #2 | 111 11111 | U : unclustered hits | 1111111 | | 0 U | | 00 U | | 00 | | 0 | +---------------------—+
Another possible collection of clusters built from the source:
+---------------------—+ | 0 | Legend: 0 : hits belonging to cluster #0 | 11 00 | 1 : hits belonging to cluster #1 | 111 00000 | U : unclustered hits | 1111100 | | 1 U | | 11 U | | 11 | | 1 | +---------------------—+
Yet another possible collection of clusters built from the source:
+---------------------—+ | 0 | Legend: 0 : hits belonging to cluster #0 | 11 00 | 1 : hits belonging to cluster #1 | 111 00000 | 2 : hits belonging to cluster #2 | 1111100 | U : unclustered hits | 2 U | | 22 U | | 22 | | 2 | +---------------------—+
typedef std::vector<cluster_handle_type> snemo::datamodel::tracker_clustering_solution::cluster_col_type |
Collection of handles on tracker clusters.
typedef tracker_cluster::handle_type snemo::datamodel::tracker_clustering_solution::cluster_handle_type |
Handle on tracker cluster.
typedef datatools::handle<tracker_clustering_solution> snemo::datamodel::tracker_clustering_solution::handle_type |
Handle on tracker cluster solution.
typedef std::map<int32_t, cluster_col_type> snemo::datamodel::tracker_clustering_solution::hit_belonging_col_type |
Dictionary of hit/cluster belonging.
typedef calibrated_tracker_hit::collection_type snemo::datamodel::tracker_clustering_solution::hit_collection_type |
Collection of calibrated hit handles.
snemo::datamodel::tracker_clustering_solution::tracker_clustering_solution | ( | ) |
Default constructor.
|
virtual |
Default constructor.
void snemo::datamodel::tracker_clustering_solution::clear | ( | ) |
Empty the contents of the tracker cluster solution.
void snemo::datamodel::tracker_clustering_solution::compute_hit_belonging | ( | ) |
Compute hit belonging.
|
static |
Compute the hit belonging informations from a given clustering solution.
|
static |
Copy one clustering solution in another one.
const datatools::properties& snemo::datamodel::tracker_clustering_solution::get_auxiliaries | ( | ) | const |
Return a non mutable reference on the container of auxiliary properties.
const cluster_col_type& snemo::datamodel::tracker_clustering_solution::get_clusters | ( | ) | const |
Return a non mutable reference on the container of clusters.
const hit_belonging_col_type& snemo::datamodel::tracker_clustering_solution::get_hit_belonging | ( | ) | const |
Returns the hit belonging informations.
int snemo::datamodel::tracker_clustering_solution::get_solution_id | ( | ) | const |
Get the solution ID.
const hit_collection_type& snemo::datamodel::tracker_clustering_solution::get_unclustered_hits | ( | ) | const |
Return a non mutable reference on the container of handles on unclustered calibrated tracker hits
datatools::properties& snemo::datamodel::tracker_clustering_solution::grab_auxiliaries | ( | ) |
Return a mutable reference on the container of auxiliary properties.
cluster_col_type& snemo::datamodel::tracker_clustering_solution::grab_clusters | ( | ) |
Return a mutable reference on the container of clusters.
hit_collection_type& snemo::datamodel::tracker_clustering_solution::grab_unclustered_hits | ( | ) |
Return a mutable reference on the container of handles on unclustered calibrated tracker hits.
bool snemo::datamodel::tracker_clustering_solution::has_hit_belonging | ( | ) | const |
Test if some hit belonging information is available.
bool snemo::datamodel::tracker_clustering_solution::has_solution_id | ( | ) | const |
Check if there is a valid solution ID.
bool snemo::datamodel::tracker_clustering_solution::has_unclustered_hits | ( | ) | const |
Check if there is some unclustered hits.
bool snemo::datamodel::tracker_clustering_solution::hit_belongs_to_cluster | ( | int32_t | hit_id, |
int32_t | cluster_id_ | ||
) | const |
Test if hit with given ID belongs to a cluster with a given ID.
bool snemo::datamodel::tracker_clustering_solution::hit_belongs_to_cluster | ( | const calibrated_tracker_hit & | hit_, |
const tracker_cluster & | cluster_ | ||
) | const |
Test if hit belongs to a cluster.
bool snemo::datamodel::tracker_clustering_solution::hit_belongs_to_several_clusters | ( | const calibrated_tracker_hit & | hit_ | ) | const |
Test if a given hit belongs to several clusters.
bool snemo::datamodel::tracker_clustering_solution::hit_belongs_to_several_clusters | ( | int32_t | hit_id_ | ) | const |
Test if a given hit with given ID belongs to several clusters.
bool snemo::datamodel::tracker_clustering_solution::hit_is_clustered | ( | const calibrated_tracker_hit & | hit_ | ) | const |
Test if a given hit is clusterized.
bool snemo::datamodel::tracker_clustering_solution::hit_is_clustered | ( | int32_t | hit_id_ | ) | const |
Test if a hit with given ID is clusterized.
void snemo::datamodel::tracker_clustering_solution::invalidate_solution_id | ( | ) |
Invalidate the solution ID.
|
static |
Merge two clustering solutions in a single one (only if both are built from different sets of hits)
void snemo::datamodel::tracker_clustering_solution::reset | ( | ) |
Reset the tracker cluster solution(see clear)
void snemo::datamodel::tracker_clustering_solution::reset_hit_belonging | ( | ) |
Clear the hit belonging informations.
void snemo::datamodel::tracker_clustering_solution::set_solution_id | ( | int32_t | ) |
Set the solution ID.
|
virtual |
Smart print.