LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "CBAlgoShortestDistSmallCluster.h"
Public Member Functions | |
CBAlgoShortestDistSmallCluster () | |
Default constructor. More... | |
virtual | ~CBAlgoShortestDistSmallCluster () |
Default destructor. More... | |
virtual bool | Bool (const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2) |
Overloaded (from CBoolAlgoBase) Bool function. More... | |
void | SetSquaredDistanceCut (double d) |
Method to set cut value in cm^2 for distance compatibility test. More... | |
void | SetDebug (bool on) |
Method to set debug mode. More... | |
void | SetMinHits (size_t n) |
Set Minimum Number of Hits to consider Cluster. More... | |
void | SetMaxHits (size_t n) |
Set Maximum Number of Hits to consider Cluster. More... | |
double | ShortestDistanceSquared (double point_x, double point_y, double start_x, double start_y, double end_x, double end_y) const |
virtual void | Reset () |
Function to reset the algorithm instance called within CMergeManager/CMatchManager's Reset() ... maybe implemented via child class. More... | |
virtual void | EventBegin (const std::vector< cluster::ClusterParamsAlg > &clusters) |
virtual void | EventEnd () |
virtual void | IterationBegin (const std::vector< cluster::ClusterParamsAlg > &clusters) |
virtual void | IterationEnd () |
virtual void | Report () |
void | SetAnaFile (TFile *fout) |
Setter function for an output plot TFile pointer. More... | |
virtual void | SetVerbose (bool doit=true) |
Setter function for verbosity. More... | |
Protected Attributes | |
bool | _debug |
size_t | _minHits |
bool to suppress lots of output if you want More... | |
size_t | _maxHits |
Min Number of hits for cluster to be considered. More... | |
double | _wire_2_cm |
Max Number of hits for cluster to be considered. More... | |
double | _time_2_cm |
double | _min_distance_unit |
Conversion factors ogtten from GeometryUtilities. More... | |
double | _max_2D_dist2 |
minimum distance b/t start and end point of cluster to use it More... | |
TFile * | _fout |
TFile pointer to an output file. More... | |
bool | _verbose |
Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging. More... | |
User defined class CBAlgoShortestDistSmallCluster ... these comments are used to generate doxygen documentation!
Definition at line 27 of file CBAlgoShortestDistSmallCluster.h.
cmtool::CBAlgoShortestDistSmallCluster::CBAlgoShortestDistSmallCluster | ( | ) |
Default constructor.
Definition at line 8 of file CBAlgoShortestDistSmallCluster.cxx.
References _debug, _min_distance_unit, _time_2_cm, cmtool::CMAlgoBase::_verbose, _wire_2_cm, SetDebug(), SetMinHits(), SetSquaredDistanceCut(), util::GeometryUtilities::TimeToCm(), and util::GeometryUtilities::WireToCm().
|
inlinevirtual |
Default destructor.
Definition at line 35 of file CBAlgoShortestDistSmallCluster.h.
References Bool().
|
virtual |
Overloaded (from CBoolAlgoBase) Bool function.
Reimplemented from cmtool::CBoolAlgoBase.
Definition at line 30 of file CBAlgoShortestDistSmallCluster.cxx.
References _debug, _max_2D_dist2, _maxHits, _minHits, cmtool::CMAlgoBase::_verbose, and ShortestDistanceSquared().
Referenced by ~CBAlgoShortestDistSmallCluster().
|
inlinevirtualinherited |
Optional function: called at the beginning of 1st iteration. This is called per event.
Reimplemented in cmtool::CFAlgoArray, cmtool::CPAlgoArray, cmtool::CBAlgoArray, and cmtool::CBAlgoPolyShortestDist.
Definition at line 45 of file CMAlgoBase.h.
Referenced by cmtool::CMergeManager::EventBegin().
|
inlinevirtualinherited |
Optional function: called at the end of event ... after the last merging iteration is over.
Reimplemented in cmtool::CFAlgoArray, cmtool::CPAlgoArray, and cmtool::CBAlgoArray.
Definition at line 51 of file CMAlgoBase.h.
Referenced by cmtool::CMatchManager::EventEnd(), and cmtool::CMergeManager::EventEnd().
|
inlinevirtualinherited |
Optional function: called at the beggining of each iteration over all pairs of clusters. This provides all clusters' information in case the algorithm need them. Note this is called per iteration which may be more than once per event.
Reimplemented in cmtool::CFAlgoArray, cmtool::CPAlgoArray, and cmtool::CBAlgoArray.
Definition at line 59 of file CMAlgoBase.h.
Referenced by cmtool::CMatchManager::EventBegin(), cmtool::CMatchManager::IterationBegin(), and cmtool::CMergeManager::IterationBegin().
|
inlinevirtualinherited |
Optional function: called at the end of each iteration over all pairs of clusters.
Reimplemented in cmtool::CFAlgoArray, cmtool::CPAlgoArray, and cmtool::CBAlgoArray.
Definition at line 65 of file CMAlgoBase.h.
Referenced by cmtool::CMatchManager::IterationEnd(), and cmtool::CMergeManager::IterationEnd().
|
inlinevirtualinherited |
Optional function: called after Bool() function is called for all possible cluster pairs by CMergeManager/CMatchManager IFF run with verbosity level kPerIteration. Maybe useful for debugging.
Reimplemented in cmtool::CFAlgoArray, cmtool::CPAlgoArray, cmtool::CBAlgoArray, cmtool::CBAlgoStartTrack, cmtool::CBAlgoPolyShortestDist, cmtool::CBAlgoProhibitAllTracks, cmtool::CBAlgoOutOfConeSeparate, cmtool::CBAlgoTrackSeparate, cmtool::CBAlgoAngleSeparate, cmtool::CFAlgo3DAngle, cmtool::CBAlgoMergeTinyWithBig, cmtool::CFAlgoShowerCompat, cmtool::CFAlgoTimeOverlap, cmtool::CBAlgoStartNearEnd, cmtool::CFAlgoVolumeOverlap, cmtool::CFAlgoWireOverlap, cmtool::CBAlgoProhibitBigClusters, cmtool::CFAlgoStartPointCompat, cmtool::CFAlgoStartPointMatch, cmtool::CFAlgoStartTimeCompat, cmtool::CFAlgoChargeDistrib, cmtool::CFAlgoQRatio, cmtool::CFAlgoZOverlap, cmtool::CPAlgoIgnoreTracks, cmtool::CBAlgoCenterOfMass, cmtool::CBAlgoCenterOfMassSmall, and cmtool::CFAlgoTimeProf.
Definition at line 73 of file CMAlgoBase.h.
Referenced by cmtool::CMergeManager::IterationEnd(), cmtool::CMatchManager::IterationProcess(), and cmtool::CMergeManager::IterationProcess().
|
inlinevirtualinherited |
Function to reset the algorithm instance called within CMergeManager/CMatchManager's Reset() ... maybe implemented via child class.
Reimplemented in cmtool::CBAlgoArray, cmtool::CFAlgoArray, cmtool::CPAlgoArray, cmtool::CBAlgoStartTrack, cmtool::CBAlgoPolyShortestDist, cmtool::CBAlgoProhibitAllTracks, cmtool::CBAlgoOutOfConeSeparate, cmtool::CBAlgoTrackSeparate, cmtool::CBAlgoMergeTinyWithBig, cmtool::CFAlgoShowerCompat, cmtool::CFAlgo3DAngle, cmtool::CFAlgoTimeOverlap, cmtool::CBAlgoAngleSeparate, cmtool::CFAlgoVolumeOverlap, cmtool::CFAlgoWireOverlap, cmtool::CBAlgoProhibitBigClusters, cmtool::CFAlgoStartPointCompat, cmtool::CFAlgoStartPointMatch, cmtool::CFAlgoStartTimeCompat, cmtool::CFAlgoChargeDistrib, cmtool::CFAlgoQRatio, cmtool::CFAlgoZOverlap, cmtool::CPAlgoIgnoreTracks, cmtool::CBAlgoStartNearEnd, cmtool::CBAlgoCenterOfMass, cmtool::CBAlgoCenterOfMassSmall, cmtool::CFAlgoTimeProf, cmtool::CBAlgoFake, and cmtool::CBAlgoMergeAll.
Definition at line 40 of file CMAlgoBase.h.
Referenced by cmtool::CMergeManager::Reset(), cmtool::CMatchManager::Reset(), and cmtool::CMManagerBase::Reset().
|
inlineinherited |
Setter function for an output plot TFile pointer.
Definition at line 77 of file CMAlgoBase.h.
References cmtool::CMAlgoBase::_fout.
Referenced by cmtool::CMergeManager::EventBegin().
|
inline |
Method to set debug mode.
Definition at line 46 of file CBAlgoShortestDistSmallCluster.h.
References _debug.
Referenced by CBAlgoShortestDistSmallCluster().
|
inline |
Set Maximum Number of Hits to consider Cluster.
Definition at line 52 of file CBAlgoShortestDistSmallCluster.h.
References _maxHits, n, and ShortestDistanceSquared().
|
inline |
Set Minimum Number of Hits to consider Cluster.
Definition at line 49 of file CBAlgoShortestDistSmallCluster.h.
Referenced by CBAlgoShortestDistSmallCluster().
|
inline |
Method to set cut value in cm^2 for distance compatibility test.
Definition at line 43 of file CBAlgoShortestDistSmallCluster.h.
References _max_2D_dist2, and d.
Referenced by CBAlgoShortestDistSmallCluster().
|
inlinevirtualinherited |
Setter function for verbosity.
Reimplemented in cmtool::CBAlgoArray, cmtool::CFAlgoChargeDistrib, cmtool::CFAlgoVolumeOverlap, cmtool::CFAlgoWireOverlap, cmtool::CFAlgoStartPointCompat, cmtool::CFAlgoStartTimeCompat, cmtool::CFAlgoTimeOverlap, cmtool::CBAlgoStartInCone, cmtool::CBAlgoShortestDistNonEndpoint, and cmtool::CBAlgoTrackSeparate.
Definition at line 80 of file CMAlgoBase.h.
References cmtool::CMAlgoBase::_verbose.
Referenced by cmtool::CMatchManager::EventBegin(), cmtool::CMergeManager::EventBegin(), and cluster::SimpleClusterMerger::SimpleClusterMerger().
double cmtool::CBAlgoShortestDistSmallCluster::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).
Definition at line 114 of file CBAlgoShortestDistSmallCluster.cxx.
References _debug, _min_distance_unit, and cmtool::CMAlgoBase::_verbose.
Referenced by Bool(), and SetMaxHits().
|
protected |
Definition at line 66 of file CBAlgoShortestDistSmallCluster.h.
Referenced by Bool(), CBAlgoShortestDistSmallCluster(), SetDebug(), and ShortestDistanceSquared().
|
protectedinherited |
TFile pointer to an output file.
Definition at line 85 of file CMAlgoBase.h.
Referenced by cmtool::CMAlgoBase::CMAlgoBase(), and cmtool::CMAlgoBase::SetAnaFile().
|
protected |
minimum distance b/t start and end point of cluster to use it
Definition at line 76 of file CBAlgoShortestDistSmallCluster.h.
Referenced by Bool(), and SetSquaredDistanceCut().
|
protected |
Min Number of hits for cluster to be considered.
Definition at line 70 of file CBAlgoShortestDistSmallCluster.h.
Referenced by Bool(), and SetMaxHits().
|
protected |
Conversion factors ogtten from GeometryUtilities.
Definition at line 74 of file CBAlgoShortestDistSmallCluster.h.
Referenced by CBAlgoShortestDistSmallCluster(), and ShortestDistanceSquared().
|
protected |
bool to suppress lots of output if you want
Definition at line 68 of file CBAlgoShortestDistSmallCluster.h.
Referenced by Bool(), and SetMinHits().
|
protected |
Definition at line 72 of file CBAlgoShortestDistSmallCluster.h.
Referenced by CBAlgoShortestDistSmallCluster().
|
protectedinherited |
Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging.
Definition at line 88 of file CMAlgoBase.h.
Referenced by cmtool::CBAlgoAngleAlign::Bool(), cmtool::CBAlgoAngleCompat::Bool(), Bool(), cmtool::CBAlgoShortestDist::Bool(), cmtool::CBAlgoOutOfConeSeparate::Bool(), cmtool::CBAlgoPolyOverlap::Bool(), cmtool::CBAlgoAngleSeparate::Bool(), cmtool::CBAlgoCenterOfMassSmall::Bool(), cmtool::CBAlgoCenterOfMass::Bool(), cmtool::CBAlgoStartInPoly::Bool(), cmtool::CBAlgoStartNearEnd::Bool(), cmtool::CBAlgoProhibitAllTracks::Bool(), cmtool::CBAlgoShortestDist::CBAlgoShortestDist(), CBAlgoShortestDistSmallCluster(), cmtool::CMAlgoBase::CMAlgoBase(), cmtool::CFAlgoZOverlap::Float(), cmtool::CFAlgoQRatio::Float(), cmtool::CFAlgoStartPointMatch::Float(), cmtool::CMAlgoBase::SetVerbose(), cmtool::CBAlgoShortestDist::ShortestDistanceSquared(), ShortestDistanceSquared(), cmtool::CBAlgoCenterOfMass::ShortestDistanceSquared(), and cmtool::CBAlgoCenterOfMassSmall::ShortestDistanceSquared().
|
protected |
Max Number of hits for cluster to be considered.
Definition at line 72 of file CBAlgoShortestDistSmallCluster.h.
Referenced by CBAlgoShortestDistSmallCluster().