LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "CBAlgoCenterOfMassSmall.h"
Public Member Functions | |
CBAlgoCenterOfMassSmall () | |
Default constructor. More... | |
virtual | ~CBAlgoCenterOfMassSmall () |
Default destructor. More... | |
virtual bool | Bool (const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2) |
virtual void | Reset () |
Function to reset the algorithm instance ... maybe implemented via child class. More... | |
virtual void | Report () |
Function to report what's going on per merging iteration. More... | |
void | SetDebug (bool on) |
Function to set Debug mode of output. More... | |
void | SetMaxHitsSmallClus (size_t n) |
Function to set Max hits for small clsuters. More... | |
void | SetMaxDistance (double d) |
Function to set Max Distance for COM to be from start-end. More... | |
void | SetMaxCOMDistance (double d) |
Function to set Max Distance between COMs. More... | |
void | UseCOMInPoly (bool on) |
Use COM in Poly algo to decide merging. More... | |
void | UseCOMClose (bool on) |
Use COM in Poly algo to decide merging. More... | |
void | UseCOMNearClus (bool on) |
Use COM in Poly algo to decide merging. More... | |
void | SetLengthReach (double frac) |
Set Length Reach: How for out the cone extends as percent of cluster length. More... | |
double | ShortestDistanceSquared (double point_x, double point_y, double start_x, double start_y, double end_x, double end_y) const |
virtual void | EventBegin (const std::vector< cluster::ClusterParamsAlg > &) |
virtual void | EventEnd () |
virtual void | IterationBegin (const std::vector< cluster::ClusterParamsAlg > &) |
virtual void | IterationEnd () |
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 | _maxHits |
double | _MaxDist |
double | _MaxCOMDistSquared |
double | _lengthReach |
bool | _COMinPolyAlg |
How four out - as percent of cluster length - cone will extend from start point. More... | |
bool | _COMsClose |
bool | _COMNearClus |
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... | |
Designed mainly for small clusters (< 10 hits): Find Cluster's center of mass weighing by Q Then see if COM is in polygon/cone of a big cluster If so -> merge
Definition at line 28 of file CBAlgoCenterOfMassSmall.h.
cmtool::CBAlgoCenterOfMassSmall::CBAlgoCenterOfMassSmall | ( | ) |
Default constructor.
Definition at line 8 of file CBAlgoCenterOfMassSmall.cxx.
References SetDebug(), SetMaxCOMDistance(), SetMaxDistance(), SetMaxHitsSmallClus(), UseCOMClose(), UseCOMInPoly(), and UseCOMNearClus().
|
inlinevirtual |
|
virtual |
Core function: given the ClusterParamsAlg input, return whether a cluster should be merged or not.
Reimplemented from cmtool::CBoolAlgoBase.
Definition at line 22 of file CBAlgoCenterOfMassSmall.cxx.
References _COMinPolyAlg, _COMNearClus, _COMsClose, _debug, _MaxCOMDistSquared, _MaxDist, _maxHits, cmtool::CMAlgoBase::_verbose, Polygon2D::PointInside(), and ShortestDistanceSquared().
Referenced by ~CBAlgoCenterOfMassSmall().
|
inlinevirtualinherited |
Optional function: called at the beginning of 1st iteration. This is called per event.
Reimplemented in 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::CPAlgoArray, and cmtool::CBAlgoArray.
Definition at line 50 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::CPAlgoArray, and cmtool::CBAlgoArray.
Definition at line 57 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::CPAlgoArray, and cmtool::CBAlgoArray.
Definition at line 62 of file CMAlgoBase.h.
Referenced by cmtool::CMatchManager::IterationEnd(), and cmtool::CMergeManager::IterationEnd().
|
virtual |
Function to report what's going on per merging iteration.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 136 of file CBAlgoCenterOfMassSmall.cxx.
Referenced by Reset().
|
inlinevirtual |
Function to reset the algorithm instance ... maybe implemented via child class.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 45 of file CBAlgoCenterOfMassSmall.h.
References Report().
|
inlineinherited |
Setter function for an output plot TFile pointer.
Definition at line 72 of file CMAlgoBase.h.
References cmtool::CMAlgoBase::_fout.
Referenced by cmtool::CMergeManager::EventBegin().
|
inline |
Function to set Debug mode of output.
Definition at line 51 of file CBAlgoCenterOfMassSmall.h.
References _debug.
Referenced by CBAlgoCenterOfMassSmall().
|
inline |
Set Length Reach: How for out the cone extends as percent of cluster length.
Definition at line 72 of file CBAlgoCenterOfMassSmall.h.
References _lengthReach, and ShortestDistanceSquared().
|
inline |
Function to set Max Distance between COMs.
Definition at line 60 of file CBAlgoCenterOfMassSmall.h.
References _MaxCOMDistSquared, and d.
Referenced by CBAlgoCenterOfMassSmall().
|
inline |
Function to set Max Distance for COM to be from start-end.
Definition at line 57 of file CBAlgoCenterOfMassSmall.h.
Referenced by CBAlgoCenterOfMassSmall().
|
inline |
Function to set Max hits for small clsuters.
Definition at line 54 of file CBAlgoCenterOfMassSmall.h.
Referenced by CBAlgoCenterOfMassSmall().
|
inlinevirtualinherited |
Setter function for verbosity.
Reimplemented in cmtool::CBAlgoArray, and cmtool::CFAlgoTimeOverlap.
Definition at line 75 of file CMAlgoBase.h.
References cmtool::CMAlgoBase::_verbose.
Referenced by cmtool::CMatchManager::EventBegin(), and cmtool::CMergeManager::EventBegin().
double cmtool::CBAlgoCenterOfMassSmall::ShortestDistanceSquared | ( | double | point_x, |
double | point_y, | ||
double | start_x, | ||
double | start_y, | ||
double | end_x, | ||
double | end_y | ||
) | const |
Definition at line 140 of file CBAlgoCenterOfMassSmall.cxx.
References cmtool::CMAlgoBase::_verbose.
Referenced by Bool(), and SetLengthReach().
|
inline |
Use COM in Poly algo to decide merging.
Definition at line 66 of file CBAlgoCenterOfMassSmall.h.
References _COMsClose.
Referenced by CBAlgoCenterOfMassSmall().
|
inline |
Use COM in Poly algo to decide merging.
Definition at line 63 of file CBAlgoCenterOfMassSmall.h.
References _COMinPolyAlg.
Referenced by CBAlgoCenterOfMassSmall().
|
inline |
Use COM in Poly algo to decide merging.
Definition at line 69 of file CBAlgoCenterOfMassSmall.h.
References _COMNearClus.
Referenced by CBAlgoCenterOfMassSmall().
|
protected |
How four out - as percent of cluster length - cone will extend from start point.
Definition at line 88 of file CBAlgoCenterOfMassSmall.h.
Referenced by Bool(), and UseCOMInPoly().
|
protected |
Definition at line 90 of file CBAlgoCenterOfMassSmall.h.
Referenced by Bool(), and UseCOMNearClus().
|
protected |
Definition at line 89 of file CBAlgoCenterOfMassSmall.h.
Referenced by Bool(), and UseCOMClose().
|
protected |
Definition at line 82 of file CBAlgoCenterOfMassSmall.h.
Referenced by Bool(), and SetDebug().
|
protectedinherited |
TFile pointer to an output file.
Definition at line 79 of file CMAlgoBase.h.
Referenced by cmtool::CMAlgoBase::CMAlgoBase(), and cmtool::CMAlgoBase::SetAnaFile().
|
protected |
Definition at line 87 of file CBAlgoCenterOfMassSmall.h.
Referenced by SetLengthReach().
|
protected |
Definition at line 85 of file CBAlgoCenterOfMassSmall.h.
Referenced by Bool(), and SetMaxCOMDistance().
|
protected |
Definition at line 84 of file CBAlgoCenterOfMassSmall.h.
Referenced by Bool(), and SetMaxDistance().
|
protected |
Definition at line 83 of file CBAlgoCenterOfMassSmall.h.
Referenced by Bool(), and SetMaxHitsSmallClus().
|
protectedinherited |
Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging.
Definition at line 82 of file CMAlgoBase.h.
Referenced by cmtool::CBAlgoAngleAlign::Bool(), cmtool::CBAlgoAngleCompat::Bool(), cmtool::CBAlgoPolyOverlap::Bool(), cmtool::CBAlgoOutOfConeSeparate::Bool(), cmtool::CBAlgoAngleSeparate::Bool(), Bool(), cmtool::CBAlgoCenterOfMass::Bool(), cmtool::CBAlgoStartNearEnd::Bool(), cmtool::CBAlgoProhibitAllTracks::Bool(), cmtool::CMAlgoBase::CMAlgoBase(), cmtool::CFAlgoZOverlap::Float(), cmtool::CFAlgoQRatio::Float(), cmtool::CMAlgoBase::SetVerbose(), ShortestDistanceSquared(), and cmtool::CBAlgoCenterOfMass::ShortestDistanceSquared().