LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "CBAlgoCenterOfMass.h"
Public Member Functions | |
CBAlgoCenterOfMass () | |
Default constructor. More... | |
virtual | ~CBAlgoCenterOfMass () |
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 | SetMinHitsBigClus (size_t n) |
Function to se Min hits for big clusters. More... | |
void | SetMaxDistance (double d) |
Function to set Max Distance for COM to be from start-end. More... | |
void | UseCOMInPoly (bool on) |
Use COM in Poly algo to decide merging. More... | |
void | UseCOMInCone (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 > &clusters) |
virtual void | EventEnd () |
virtual void | IterationBegin (const std::vector< cluster::ClusterParamsAlg > &clusters) |
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 | _minHits |
size_t | _maxHits |
double | _MaxDist |
double | _lengthReach |
bool | _COMinPolyAlg |
How four out - as percent of cluster length - cone will extend from start point. More... | |
bool | _COMinConeAlg |
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 29 of file CBAlgoCenterOfMass.h.
cmtool::CBAlgoCenterOfMass::CBAlgoCenterOfMass | ( | ) |
Default constructor.
Definition at line 9 of file CBAlgoCenterOfMass.cxx.
References SetDebug(), SetLengthReach(), SetMaxDistance(), SetMaxHitsSmallClus(), SetMinHitsBigClus(), UseCOMInCone(), 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 25 of file CBAlgoCenterOfMass.cxx.
References _COMinConeAlg, _COMinPolyAlg, _COMNearClus, _debug, _lengthReach, _MaxDist, _maxHits, _minHits, cmtool::CMAlgoBase::_verbose, Polygon2D::PointInside(), and ShortestDistanceSquared().
Referenced by ~CBAlgoCenterOfMass().
|
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().
|
virtual |
Function to report what's going on per merging iteration.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 138 of file CBAlgoCenterOfMass.cxx.
Referenced by Reset().
|
inlinevirtual |
Function to reset the algorithm instance ... maybe implemented via child class.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 47 of file CBAlgoCenterOfMass.h.
References Report().
|
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 |
Function to set Debug mode of output.
Definition at line 53 of file CBAlgoCenterOfMass.h.
References _debug.
Referenced by CBAlgoCenterOfMass().
|
inline |
Set Length Reach: How for out the cone extends as percent of cluster length.
Definition at line 74 of file CBAlgoCenterOfMass.h.
References _lengthReach, and ShortestDistanceSquared().
Referenced by CBAlgoCenterOfMass().
|
inline |
Function to set Max Distance for COM to be from start-end.
Definition at line 62 of file CBAlgoCenterOfMass.h.
Referenced by CBAlgoCenterOfMass().
|
inline |
Function to set Max hits for small clsuters.
Definition at line 56 of file CBAlgoCenterOfMass.h.
Referenced by CBAlgoCenterOfMass().
|
inline |
Function to se Min hits for big clusters.
Definition at line 59 of file CBAlgoCenterOfMass.h.
Referenced by CBAlgoCenterOfMass().
|
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::CBAlgoCenterOfMass::ShortestDistanceSquared | ( | double | point_x, |
double | point_y, | ||
double | start_x, | ||
double | start_y, | ||
double | end_x, | ||
double | end_y | ||
) | const |
Definition at line 144 of file CBAlgoCenterOfMass.cxx.
References cmtool::CMAlgoBase::_verbose.
Referenced by Bool(), and SetLengthReach().
|
inline |
Use COM in Poly algo to decide merging.
Definition at line 68 of file CBAlgoCenterOfMass.h.
References _COMinConeAlg.
Referenced by CBAlgoCenterOfMass().
|
inline |
Use COM in Poly algo to decide merging.
Definition at line 65 of file CBAlgoCenterOfMass.h.
References _COMinPolyAlg.
Referenced by CBAlgoCenterOfMass().
|
inline |
Use COM in Poly algo to decide merging.
Definition at line 71 of file CBAlgoCenterOfMass.h.
References _COMNearClus.
Referenced by CBAlgoCenterOfMass().
|
protected |
Definition at line 89 of file CBAlgoCenterOfMass.h.
Referenced by Bool(), and UseCOMInCone().
|
protected |
How four out - as percent of cluster length - cone will extend from start point.
Definition at line 88 of file CBAlgoCenterOfMass.h.
Referenced by Bool(), and UseCOMInPoly().
|
protected |
Definition at line 90 of file CBAlgoCenterOfMass.h.
Referenced by Bool(), and UseCOMNearClus().
|
protected |
Definition at line 83 of file CBAlgoCenterOfMass.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 |
Definition at line 87 of file CBAlgoCenterOfMass.h.
Referenced by Bool(), and SetLengthReach().
|
protected |
Definition at line 86 of file CBAlgoCenterOfMass.h.
Referenced by Bool(), and SetMaxDistance().
|
protected |
Definition at line 85 of file CBAlgoCenterOfMass.h.
Referenced by Bool(), and SetMaxHitsSmallClus().
|
protected |
Definition at line 84 of file CBAlgoCenterOfMass.h.
Referenced by Bool(), and SetMinHitsBigClus().
|
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(), cmtool::CBAlgoShortestDistSmallCluster::Bool(), cmtool::CBAlgoShortestDist::Bool(), cmtool::CBAlgoOutOfConeSeparate::Bool(), cmtool::CBAlgoPolyOverlap::Bool(), cmtool::CBAlgoAngleSeparate::Bool(), cmtool::CBAlgoCenterOfMassSmall::Bool(), Bool(), cmtool::CBAlgoStartInPoly::Bool(), cmtool::CBAlgoStartNearEnd::Bool(), cmtool::CBAlgoProhibitAllTracks::Bool(), cmtool::CBAlgoShortestDist::CBAlgoShortestDist(), cmtool::CBAlgoShortestDistSmallCluster::CBAlgoShortestDistSmallCluster(), cmtool::CMAlgoBase::CMAlgoBase(), cmtool::CFAlgoQRatio::Float(), cmtool::CFAlgoZOverlap::Float(), cmtool::CFAlgoStartPointMatch::Float(), cmtool::CMAlgoBase::SetVerbose(), cmtool::CBAlgoShortestDist::ShortestDistanceSquared(), cmtool::CBAlgoShortestDistSmallCluster::ShortestDistanceSquared(), cmtool::CBAlgoCenterOfMassSmall::ShortestDistanceSquared(), and ShortestDistanceSquared().