LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "CBAlgoShortestDistNonEndPoint.h"
Public Member Functions | |
CBAlgoShortestDistNonEndpoint () | |
Default constructor. More... | |
virtual | ~CBAlgoShortestDistNonEndpoint () |
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 | SetVerbose (bool on) |
Method to set verbose mode. More... | |
void | SetDebug (bool on) |
Method to set debug mode. More... | |
void | SetMinHits (int n) |
Set Minimum 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... | |
Protected Attributes | |
bool | _verbose |
bool | _debug |
bool to suppress lots of output if you want More... | |
size_t | _minHits |
bool to suppress lots of output if you want More... | |
double | _min_distance_unit |
Min Number of hits for cluster to be considered. 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... | |
User defined class CBAlgoShortestDistNonEndpoint ... these comments are used to generate doxygen documentation!
Definition at line 26 of file CBAlgoShortestDistNonEndPoint.h.
cmtool::CBAlgoShortestDistNonEndpoint::CBAlgoShortestDistNonEndpoint | ( | ) |
Default constructor.
Definition at line 9 of file CBAlgoShortestDistNonEndPoint.cxx.
References _min_distance_unit, SetDebug(), SetMinHits(), SetSquaredDistanceCut(), and SetVerbose().
|
inlinevirtual |
Default destructor.
Definition at line 34 of file CBAlgoShortestDistNonEndPoint.h.
References Bool().
|
virtual |
Overloaded (from CBoolAlgoBase) Bool function.
Reimplemented from cmtool::CBoolAlgoBase.
Definition at line 22 of file CBAlgoShortestDistNonEndPoint.cxx.
References _debug, _max_2D_dist2, _minHits, _verbose, and ShortestDistanceSquared().
Referenced by ~CBAlgoShortestDistNonEndpoint().
|
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 48 of file CBAlgoShortestDistNonEndPoint.h.
References _debug.
Referenced by CBAlgoShortestDistNonEndpoint().
|
inline |
Set Minimum Number of Hits to consider Cluster.
Definition at line 51 of file CBAlgoShortestDistNonEndPoint.h.
References _minHits, n, and ShortestDistanceSquared().
Referenced by CBAlgoShortestDistNonEndpoint().
|
inline |
Method to set cut value in cm^2 for distance compatibility test.
Definition at line 42 of file CBAlgoShortestDistNonEndPoint.h.
References _max_2D_dist2, and d.
Referenced by CBAlgoShortestDistNonEndpoint().
|
inlinevirtual |
Method to set verbose mode.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 45 of file CBAlgoShortestDistNonEndPoint.h.
References _verbose.
Referenced by CBAlgoShortestDistNonEndpoint().
double cmtool::CBAlgoShortestDistNonEndpoint::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 101 of file CBAlgoShortestDistNonEndPoint.cxx.
References _min_distance_unit, and _verbose.
Referenced by Bool(), and SetMinHits().
|
protected |
bool to suppress lots of output if you want
Definition at line 67 of file CBAlgoShortestDistNonEndPoint.h.
Referenced by Bool(), and SetDebug().
|
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 73 of file CBAlgoShortestDistNonEndPoint.h.
Referenced by Bool(), and SetSquaredDistanceCut().
|
protected |
Min Number of hits for cluster to be considered.
Definition at line 71 of file CBAlgoShortestDistNonEndPoint.h.
Referenced by CBAlgoShortestDistNonEndpoint(), and ShortestDistanceSquared().
|
protected |
bool to suppress lots of output if you want
Definition at line 69 of file CBAlgoShortestDistNonEndPoint.h.
Referenced by Bool(), and SetMinHits().
|
protected |
Definition at line 65 of file CBAlgoShortestDistNonEndPoint.h.
Referenced by Bool(), SetVerbose(), and ShortestDistanceSquared().