#include <ClusterMergeAlg.h>
|
| ClusterMergeAlg (fhicl::ParameterSet const &pset) |
| Default constructor with fhicl parameters. More...
|
|
void | VerboseMode (bool on) |
| Method to set verbose mode. More...
|
|
void | ReportConfig () const |
| Method to report the current configuration. More...
|
|
void | SetAngleCut (double angle) |
| Method to set cut value in degrees for angle compatibility test. More...
|
|
void | SetSquaredDistanceCut (double d) |
| Method to set cut value in cm^2 for distance compatibility test. More...
|
|
void | AppendClusterInfo (const recob::Cluster &in_cluster, const std::vector< art::Ptr< recob::Hit > > &in_hit_v) |
| Method to add a cluster information for processing. More...
|
|
void | AppendClusterInfo (const art::Ptr< recob::Cluster > in_cluster, const std::vector< art::Ptr< recob::Hit > > &in_hit_v) |
| Method to add a cluster information for processing. More...
|
|
void | ClearEventInfo () |
| Method to clear event-wise information (both input cluster info & output merged cluster sets) More...
|
|
void | ProcessMergeAlg () |
|
const std::vector< std::vector
< unsigned int > > | GetClusterSets () const |
| Method to extract resulting set of cluster IDs for merging computed by ProcessMergeAlg() function. More...
|
|
bool | CompareClusters (const cluster_merge_info &clus_info_A, const cluster_merge_info &clus_info_B) |
| Method to compare a compatibility between two clusters. More...
|
|
bool | Angle2DCompatibility (const cluster_merge_info &clus_info_A, const cluster_merge_info &clus_info_B) const |
|
bool | ShortestDistanceCompatibility (const cluster_merge_info &clus_info_A, const cluster_merge_info &clus_info_B) const |
|
double | ShortestDistanceSquared (double point_x, double point_y, double start_x, double start_y, double end_x, double end_y) const |
|
void | PrintClusterVars (cluster_merge_info clus_info) const |
|
int | isInClusterSets (unsigned int index) const |
|
Definition at line 78 of file ClusterMergeAlg.h.
cluster::ClusterMergeAlg::ClusterMergeAlg |
( |
fhicl::ParameterSet const & |
pset | ) |
|
Default constructor with fhicl parameters.
Function to compare the 2D angles of two clusters and return true if they are within the maximum allowed parameter. Includes shifting by 180 for backwards clusters. This is called within CompareClusters().
void cluster::ClusterMergeAlg::AppendClusterInfo |
( |
const recob::Cluster & |
in_cluster, |
|
|
const std::vector< art::Ptr< recob::Hit > > & |
in_hit_v |
|
) |
| |
Method to add a cluster information for processing.
void cluster::ClusterMergeAlg::AppendClusterInfo |
( |
const art::Ptr< recob::Cluster > |
in_cluster, |
|
|
const std::vector< art::Ptr< recob::Hit > > & |
in_hit_v |
|
) |
| |
Method to add a cluster information for processing.
Method to fill hit-array-related information.
int cluster::ClusterMergeAlg::AppendToClusterSets |
( |
unsigned int |
cluster_index, |
|
|
int |
merged_index = -1 |
|
) |
| |
|
protected |
A function to add a cluster to a merged sets (_cluster_sets_v)
For a given pair of clusters, this function calls CompareClusters() and append to the resulting merged cluster sets (_cluster_sets_v) by calling AppendToClusterSets() when they are compatible.
void cluster::ClusterMergeAlg::ClearEventInfo |
( |
| ) |
|
Method to clear event-wise information (both input cluster info & output merged cluster sets)
void cluster::ClusterMergeAlg::ClearInputInfo |
( |
| ) |
|
|
protected |
Method to clear input cluster information.
void cluster::ClusterMergeAlg::ClearOutputInfo |
( |
| ) |
|
|
protected |
Method to clear output merged cluster sets (_cluster_sets_v)
void cluster::ClusterMergeAlg::ClearTTreeInfo |
( |
| ) |
|
|
protected |
Method to clear quality control TTree variables.
Method to compare a compatibility between two clusters.
void cluster::ClusterMergeAlg::FinalizeClusterSets |
( |
| ) |
|
|
protected |
Function to loop through _cluster_sets_v and add in the un-mergable clusters individually, because BuildClusterSets wouldn't have included them anywhere
const std::vector<std::vector<unsigned int> > cluster::ClusterMergeAlg::GetClusterSets |
( |
| ) |
const |
|
inline |
Method to extract resulting set of cluster IDs for merging computed by ProcessMergeAlg() function.
Definition at line 116 of file ClusterMergeAlg.h.
std::vector< std::vector< unsigned int > > _cluster_sets_v
int cluster::ClusterMergeAlg::isInClusterSets |
( |
unsigned int |
index | ) |
const |
Utility function to check if an index is already somewhere inside of _cluster_sets_v vector returns the location of the element vector in _cluster_sets_v that contains the index and returns -1 if the index is not in _cluster_sets_v anywhere
void cluster::ClusterMergeAlg::PrepareDetParams |
( |
| ) |
|
|
protected |
Method to prepare detector parameters.
void cluster::ClusterMergeAlg::PrepareTTree |
( |
| ) |
|
|
protected |
Method to prepare quality control TTree.
Function to print to screen a specific cluser's info from ClusterPrepAna module. Used for debugging.
void cluster::ClusterMergeAlg::ProcessMergeAlg |
( |
| ) |
|
Method to execute the algorithm. All parameter configuration + adding input cluster information should be done before calling this function. This function generate a resulting set of cluster IDs for merging, which can be accessed through GetClusterSets() function.
void cluster::ClusterMergeAlg::ReportConfig |
( |
| ) |
const |
Method to report the current configuration.
void cluster::ClusterMergeAlg::SetAngleCut |
( |
double |
angle | ) |
|
|
inline |
Method to set cut value in degrees for angle compatibility test.
Definition at line 92 of file ClusterMergeAlg.h.
double _max_allowed_2D_angle_diff
finds tracks best matching by angle
void cluster::ClusterMergeAlg::SetSquaredDistanceCut |
( |
double |
d | ) |
|
|
inline |
Method to set cut value in cm^2 for distance compatibility test.
Definition at line 95 of file ClusterMergeAlg.h.
void cluster::ClusterMergeAlg::SetTime2Cm |
( |
double |
f | ) |
|
|
inlineprotected |
Method to set a conversion factor from time to cm scale.
Definition at line 166 of file ClusterMergeAlg.h.
double _time_2_cm
Conversion factor from time to cm scale.
void cluster::ClusterMergeAlg::SetWire2Cm |
( |
double |
f | ) |
|
|
inlineprotected |
Method to set a conversion factor from wire to cm scale.
Definition at line 163 of file ClusterMergeAlg.h.
double _wire_2_cm
Conversion factor from wire number to cm scale.
Function to compare the 2D distance of two clusters and return true if they are within the maximum allowed distance.The distance-squared is computed by another function, ShortestDistanceSquared(). This is called within CompareClusters().
double cluster::ClusterMergeAlg::ShortestDistanceSquared |
( |
double |
point_x, |
|
|
double |
point_y, |
|
|
double |
start_x, |
|
|
double |
start_y, |
|
|
double |
end_x, |
|
|
double |
end_y |
|
) |
| const |
Function to compute a distance between a 2D point (point_x, point_y) to a 2D finite line segment (start_x, start_y) => (end_x, end_y).
void cluster::ClusterMergeAlg::VerboseMode |
( |
bool |
on | ) |
|
|
inline |
Method to set verbose mode.
Definition at line 86 of file ClusterMergeAlg.h.
bool _verbose
Verbose mode boolean.
std::vector<int> cluster::ClusterMergeAlg::_cluster_merged_index |
|
protected |
Book-keeping vector which length is same as input cluster array's length. The stored value is the merged cluster sets' index (_cluster_sets_v). For instance, given 5 clusters (0, 1, 2, 3, 4) as an input among which 1,2,3 are to be merged. _cluster_merged_index may hold contents like [1,0,0,0,2] when _cluster_sets_v contents are [[1,2,3],[0],[4]].
Definition at line 216 of file ClusterMergeAlg.h.
std::vector<std::vector<unsigned int> > cluster::ClusterMergeAlg::_cluster_sets_v |
|
protected |
The result container of ProcessMergeAlg() function. The structure is such that the inner vector holds the cluster IDs to be merged into one cluster. Naturally we expect multiple merged clusters, hence it's a vector of vector.
Definition at line 223 of file ClusterMergeAlg.h.
bool cluster::ClusterMergeAlg::_det_params_prepared |
|
protected |
Boolean to keep track of detector parameter preparation.
Definition at line 206 of file ClusterMergeAlg.h.
double cluster::ClusterMergeAlg::_max_2D_dist2 |
|
protected |
double cluster::ClusterMergeAlg::_max_allowed_2D_angle_diff |
|
protected |
TTree* cluster::ClusterMergeAlg::_merge_tree |
|
protected |
double cluster::ClusterMergeAlg::_min_distance_unit |
|
protected |
double cluster::ClusterMergeAlg::_time_2_cm |
|
protected |
bool cluster::ClusterMergeAlg::_verbose |
|
protected |
double cluster::ClusterMergeAlg::_wire_2_cm |
|
protected |
The documentation for this class was generated from the following file: