Falaise  4.0.1
SuperNEMO Software Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members
snemo::datamodel::tracker_clustering_solution Class Reference

A collection of tracker clusters. More...

#include <falaise/snemo/datamodels/tracker_clustering_solution.h>

Inheritance diagram for snemo::datamodel::tracker_clustering_solution:
datatools::i_serializable

Public Types

typedef tracker_cluster::handle_type cluster_handle_type
 Handle on tracker cluster. More...
 
typedef std::vector< cluster_handle_typecluster_col_type
 Collection of handles on tracker clusters. More...
 
typedef datatools::handle< tracker_clustering_solutionhandle_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_typehit_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::propertiesgrab_auxiliaries ()
 Return a mutable reference on the container of auxiliary properties. More...
 
const datatools::propertiesget_auxiliaries () const
 Return a non mutable reference on the container of auxiliary properties. More...
 
cluster_col_typegrab_clusters ()
 Return a mutable reference on the container of clusters. More...
 
const cluster_col_typeget_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_typegrab_unclustered_hits ()
 Return a mutable reference on the container of handles on unclustered calibrated tracker hits. More...
 
const hit_collection_typeget_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_typeget_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...
 

Detailed Description

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 | +---------------------—+

Member Typedef Documentation

◆ cluster_col_type

Collection of handles on tracker clusters.

◆ cluster_handle_type

Handle on tracker cluster.

◆ handle_type

Handle on tracker cluster solution.

◆ hit_belonging_col_type

Dictionary of hit/cluster belonging.

◆ hit_collection_type

Collection of calibrated hit handles.

Constructor & Destructor Documentation

◆ tracker_clustering_solution()

snemo::datamodel::tracker_clustering_solution::tracker_clustering_solution ( )

Default constructor.

◆ ~tracker_clustering_solution()

virtual snemo::datamodel::tracker_clustering_solution::~tracker_clustering_solution ( )
virtual

Default constructor.

Member Function Documentation

◆ clear()

void snemo::datamodel::tracker_clustering_solution::clear ( )

Empty the contents of the tracker cluster solution.

◆ compute_hit_belonging()

void snemo::datamodel::tracker_clustering_solution::compute_hit_belonging ( )

Compute hit belonging.

◆ compute_hit_belonging_from_solution()

static void snemo::datamodel::tracker_clustering_solution::compute_hit_belonging_from_solution ( const tracker_clustering_solution tcs_,
hit_belonging_col_type hbc_ 
)
static

Compute the hit belonging informations from a given clustering solution.

◆ copy_one_solution_in_one()

static int snemo::datamodel::tracker_clustering_solution::copy_one_solution_in_one ( const tracker_clustering_solution source_,
tracker_clustering_solution target_ 
)
static

Copy one clustering solution in another one.

◆ get_auxiliaries()

const datatools::properties& snemo::datamodel::tracker_clustering_solution::get_auxiliaries ( ) const

Return a non mutable reference on the container of auxiliary properties.

◆ get_clusters()

const cluster_col_type& snemo::datamodel::tracker_clustering_solution::get_clusters ( ) const

Return a non mutable reference on the container of clusters.

◆ get_hit_belonging()

const hit_belonging_col_type& snemo::datamodel::tracker_clustering_solution::get_hit_belonging ( ) const

Returns the hit belonging informations.

◆ get_solution_id()

int snemo::datamodel::tracker_clustering_solution::get_solution_id ( ) const

Get the solution ID.

◆ get_unclustered_hits()

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

◆ grab_auxiliaries()

datatools::properties& snemo::datamodel::tracker_clustering_solution::grab_auxiliaries ( )

Return a mutable reference on the container of auxiliary properties.

◆ grab_clusters()

cluster_col_type& snemo::datamodel::tracker_clustering_solution::grab_clusters ( )

Return a mutable reference on the container of clusters.

◆ grab_unclustered_hits()

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.

◆ has_hit_belonging()

bool snemo::datamodel::tracker_clustering_solution::has_hit_belonging ( ) const

Test if some hit belonging information is available.

◆ has_solution_id()

bool snemo::datamodel::tracker_clustering_solution::has_solution_id ( ) const

Check if there is a valid solution ID.

◆ has_unclustered_hits()

bool snemo::datamodel::tracker_clustering_solution::has_unclustered_hits ( ) const

Check if there is some unclustered hits.

◆ hit_belongs_to_cluster() [1/2]

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.

◆ hit_belongs_to_cluster() [2/2]

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.

◆ hit_belongs_to_several_clusters() [1/2]

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.

◆ hit_belongs_to_several_clusters() [2/2]

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.

◆ hit_is_clustered() [1/2]

bool snemo::datamodel::tracker_clustering_solution::hit_is_clustered ( const calibrated_tracker_hit hit_) const

Test if a given hit is clusterized.

◆ hit_is_clustered() [2/2]

bool snemo::datamodel::tracker_clustering_solution::hit_is_clustered ( int32_t  hit_id_) const

Test if a hit with given ID is clusterized.

◆ invalidate_solution_id()

void snemo::datamodel::tracker_clustering_solution::invalidate_solution_id ( )

Invalidate the solution ID.

◆ merge_two_solutions_in_ones()

static int snemo::datamodel::tracker_clustering_solution::merge_two_solutions_in_ones ( const tracker_clustering_solution source0_,
const tracker_clustering_solution source1_,
tracker_clustering_solution target_ 
)
static

Merge two clustering solutions in a single one (only if both are built from different sets of hits)

◆ reset()

void snemo::datamodel::tracker_clustering_solution::reset ( )

Reset the tracker cluster solution(see clear)

◆ reset_hit_belonging()

void snemo::datamodel::tracker_clustering_solution::reset_hit_belonging ( )

Clear the hit belonging informations.

◆ set_solution_id()

void snemo::datamodel::tracker_clustering_solution::set_solution_id ( int32_t  )

Set the solution ID.

◆ tree_dump()

virtual void snemo::datamodel::tracker_clustering_solution::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.


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