LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "CMatchManager.h"
Public Types | |
enum | CMMSGLevel_t { kPerMerging, kPerIteration, kPerEvent, kNone } |
Enum to specify message output level. More... | |
Public Member Functions | |
CMatchManager (size_t nplanes) | |
virtual | ~CMatchManager () |
Default destructor. More... | |
virtual void | Reset () |
Method to reset itself. More... | |
void | AddMatchAlgo (CFloatAlgoBase *algo) |
A simple method to add an algorithm for merging. More... | |
const CMatchBookKeeper & | GetBookKeeper () const |
A method to obtain book keeper. More... | |
void | DebugMode (CMMSGLevel_t level) |
Method to enable debug mode (lots of couts) More... | |
void | ReportTimings (bool time_report=true) |
Method to enable timing profile cout. More... | |
void | AddPriorityAlgo (CPriorityAlgoBase *algo) |
Setter to add an algorithm for priority determination. More... | |
void | MergeTillConverge (bool doit=true) |
Switch to continue merging till converges. More... | |
void | SetClusters (const std::vector< std::vector< util::PxHit > > &clusters) |
A simple method to add a cluster. More... | |
void | SetClusters (const std::vector< cluster::ClusterParamsAlg > &clusters) |
A simple method to add a cluster. More... | |
const std::vector< cluster::ClusterParamsAlg > & | GetInputClusters () const |
A getter for input clusters. More... | |
void | SetMinNHits (unsigned int n) |
A setter for minimum # of hits ... passed onto ClusterParamsAlg. More... | |
void | Process () |
A method to execute the main action, to be called per event. More... | |
void | SetAnaFile (TFile *fout) |
A setter for an analysis output file. More... | |
Protected Member Functions | |
virtual void | EventBegin () |
FMWK function called @ beginning of Process() More... | |
virtual void | IterationBegin () |
FMWK function called @ beginning of iterative loop inside Process() More... | |
virtual bool | IterationProcess () |
FMWK function called @ iterative loop inside Process() More... | |
virtual void | IterationEnd () |
FMWK function called @ end of iterative loop inside Process() More... | |
virtual void | EventEnd () |
FMWK function called @ end of Process() More... | |
void | ComputePriority (const std::vector< cluster::ClusterParamsAlg > &clusters) |
Function to compute priority. More... | |
Protected Attributes | |
CMatchBookKeeper | _book_keeper |
Book keeper instance. More... | |
::cmtool::CFloatAlgoBase * | _match_algo |
Merging algorithm. More... | |
size_t | _nplanes |
Number of planes. More... | |
bool | _time_report |
Timing verbosity flag. More... | |
unsigned int | _min_nhits |
Minimum number of hits: the limit set for ClusterParamsAlg. More... | |
CMMSGLevel_t | _debug_mode |
Debug mode switch. More... | |
std::vector< cluster::ClusterParamsAlg > | _in_clusters |
Input clusters. More... | |
::cmtool::CPriorityAlgoBase * | _priority_algo |
Priority algorithm. More... | |
TFile * | _fout |
Output analysis plot TFile. More... | |
std::multimap< float, size_t > | _priority |
Priority record. More... | |
bool | _merge_till_converge |
Iteration loop switch. More... | |
std::set< UChar_t > | _planes |
A holder for # of unique planes in the clusters, computed in ComputePriority() function. More... | |
Private Member Functions | |
CMatchManager () | |
Default constructor is private because we need an argument to configure w/ # planes in the detector. More... | |
A class that instantiates merging algorithm(s) and run. The book-keeping of merged cluster sets are done by CMatchBookKeeper.
Definition at line 30 of file CMatchManager.h.
|
inherited |
Enum to specify message output level.
Enumerator | |
---|---|
kPerMerging |
Extremely verbose (cout per individual algorithm execution) |
kPerIteration |
Somewhat verbose (cout per merging iteration) |
kPerEvent |
Bit verbose (cout per event) |
kNone |
Normal. |
Definition at line 34 of file CMManagerBase.h.
|
private |
Default constructor is private because we need an argument to configure w/ # planes in the detector.
Definition at line 8 of file CMatchManager.cxx.
cmtool::CMatchManager::CMatchManager | ( | size_t | nplanes | ) |
Definition at line 13 of file CMatchManager.cxx.
References _match_algo, _nplanes, and Reset().
|
inlinevirtual |
|
inline |
A simple method to add an algorithm for merging.
Definition at line 48 of file CMatchManager.h.
References _match_algo.
Referenced by ShowerReco3D::ShowerReco3D().
|
inlineinherited |
Setter to add an algorithm for priority determination.
Definition at line 63 of file CMManagerBase.h.
References cmtool::CMManagerBase::_priority_algo.
Referenced by cluster::FuzzyClusterMerger::FuzzyClusterMerger(), and ShowerReco3D::ShowerReco3D().
|
protectedinherited |
Function to compute priority.
Definition at line 147 of file CMManagerBase.cxx.
References cmtool::CMManagerBase::_planes, cmtool::CMManagerBase::_priority, cmtool::CMManagerBase::_priority_algo, cmtool::CMManagerBase::_time_report, and cmtool::CPriorityAlgoBase::Priority().
Referenced by IterationProcess(), cmtool::CMergeManager::IterationProcess(), and cmtool::CMManagerBase::SetAnaFile().
|
inlineinherited |
Method to enable debug mode (lots of couts)
Definition at line 54 of file CMManagerBase.h.
References cmtool::CMManagerBase::_debug_mode.
Referenced by cluster::SimpleClusterMerger::SimpleClusterMerger().
|
protectedvirtual |
FMWK function called @ beginning of Process()
Reimplemented from cmtool::CMManagerBase.
Definition at line 28 of file CMatchManager.cxx.
References cmtool::CMManagerBase::_debug_mode, cmtool::CMManagerBase::_in_clusters, _match_algo, cmtool::CMManagerBase::_priority_algo, cmtool::CMAlgoBase::IterationBegin(), cmtool::CMManagerBase::kPerMerging, and cmtool::CMAlgoBase::SetVerbose().
Referenced by GetBookKeeper().
|
protectedvirtual |
FMWK function called @ end of Process()
Reimplemented from cmtool::CMManagerBase.
Definition at line 51 of file CMatchManager.cxx.
References _match_algo, cmtool::CMManagerBase::_priority_algo, and cmtool::CMAlgoBase::EventEnd().
Referenced by GetBookKeeper().
|
inline |
A method to obtain book keeper.
Definition at line 51 of file CMatchManager.h.
References _book_keeper, EventBegin(), EventEnd(), IterationBegin(), IterationEnd(), and IterationProcess().
Referenced by showerreco::ShowerRecoManager::Reconstruct().
|
inlineinherited |
A getter for input clusters.
Definition at line 76 of file CMManagerBase.h.
References cmtool::CMManagerBase::_in_clusters.
Referenced by showerreco::ShowerRecoManager::Process().
|
protectedvirtual |
FMWK function called @ beginning of iterative loop inside Process()
Reimplemented from cmtool::CMManagerBase.
Definition at line 39 of file CMatchManager.cxx.
References cmtool::CMManagerBase::_in_clusters, _match_algo, cmtool::CMManagerBase::_priority_algo, and cmtool::CMAlgoBase::IterationBegin().
Referenced by GetBookKeeper().
|
protectedvirtual |
FMWK function called @ end of iterative loop inside Process()
Reimplemented from cmtool::CMManagerBase.
Definition at line 45 of file CMatchManager.cxx.
References _match_algo, cmtool::CMManagerBase::_priority_algo, and cmtool::CMAlgoBase::IterationEnd().
Referenced by GetBookKeeper().
|
protectedvirtual |
FMWK function called @ iterative loop inside Process()
Implements cmtool::CMManagerBase.
Definition at line 156 of file CMatchManager.cxx.
References _book_keeper, cmtool::CMManagerBase::_debug_mode, cmtool::CMManagerBase::_in_clusters, _match_algo, _nplanes, cmtool::CMManagerBase::_planes, cmtool::CMManagerBase::_priority, cmtool::CMManagerBase::_priority_algo, cmtool::CMManagerBase::ComputePriority(), cmtool::CFloatAlgoBase::Float(), cmtool::CMManagerBase::kPerIteration, cmtool::CMManagerBase::kPerMerging, cmtool::CMatchBookKeeper::Match(), cmtool::PlaneClusterCombinations(), cmtool::CMAlgoBase::Report(), and seed.
Referenced by GetBookKeeper().
|
inlineinherited |
Switch to continue merging till converges.
Definition at line 66 of file CMManagerBase.h.
References cmtool::CMManagerBase::_merge_till_converge, cmtool::CMManagerBase::SetClusters(), and lar::dump::vector().
Referenced by cluster::FuzzyClusterMerger::FuzzyClusterMerger(), and cluster::SimpleClusterMerger::SimpleClusterMerger().
|
inherited |
A method to execute the main action, to be called per event.
Definition at line 83 of file CMManagerBase.cxx.
References cmtool::CMManagerBase::_debug_mode, cmtool::CMManagerBase::_in_clusters, cmtool::CMManagerBase::_merge_till_converge, cmtool::CMManagerBase::_time_report, cmtool::CMManagerBase::EventBegin(), cmtool::CMManagerBase::EventEnd(), cmtool::CMManagerBase::IterationBegin(), cmtool::CMManagerBase::IterationEnd(), cmtool::CMManagerBase::IterationProcess(), and cmtool::CMManagerBase::kPerIteration.
Referenced by cluster::ClusterMergeHelper::Process(), showerreco::ShowerRecoManager::Reconstruct(), and cmtool::CMManagerBase::SetMinNHits().
|
inlineinherited |
Method to enable timing profile cout.
Definition at line 57 of file CMManagerBase.h.
References cmtool::CMManagerBase::_time_report, and cmtool::CMManagerBase::Reset().
|
virtual |
Method to reset itself.
Definition at line 20 of file CMatchManager.cxx.
References _book_keeper, _match_algo, cmtool::CMManagerBase::_priority_algo, cmtool::CMatchBookKeeper::Reset(), cmtool::CMAlgoBase::Reset(), and cmtool::CMManagerBase::Reset().
Referenced by CMatchManager(), showerreco::ShowerRecoManager::Reset(), and ~CMatchManager().
|
inlineinherited |
A setter for an analysis output file.
Definition at line 86 of file CMManagerBase.h.
References cmtool::CMManagerBase::_fout, and cmtool::CMManagerBase::ComputePriority().
|
inherited |
A simple method to add a cluster.
Definition at line 26 of file CMManagerBase.cxx.
References cmtool::CMManagerBase::_in_clusters, cmtool::CMManagerBase::_min_nhits, cmtool::CMManagerBase::_time_report, Initialize(), cmtool::CMManagerBase::Reset(), cluster::ClusterParamsAlg::SetMinNHits(), and cluster::ClusterParamsAlg::SetVerbose().
Referenced by cmtool::CMManagerBase::MergeTillConverge(), showerreco::ShowerRecoManager::Reconstruct(), and cluster::ClusterMergeHelper::SetClusters().
|
inherited |
A simple method to add a cluster.
Definition at line 70 of file CMManagerBase.cxx.
References cmtool::CMManagerBase::_in_clusters, and cmtool::CMManagerBase::_time_report.
|
inlineinherited |
A setter for minimum # of hits ... passed onto ClusterParamsAlg.
Definition at line 80 of file CMManagerBase.h.
References cmtool::CMManagerBase::_min_nhits, n, and cmtool::CMManagerBase::Process().
|
protected |
Book keeper instance.
Definition at line 77 of file CMatchManager.h.
Referenced by GetBookKeeper(), IterationProcess(), and Reset().
|
protectedinherited |
Debug mode switch.
Definition at line 117 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), cmtool::CMManagerBase::DebugMode(), EventBegin(), cmtool::CMergeManager::EventBegin(), cmtool::CMergeManager::IterationBegin(), cmtool::CMergeManager::IterationEnd(), IterationProcess(), cmtool::CMergeManager::IterationProcess(), cmtool::CMManagerBase::Process(), cmtool::CMergeManager::RunMerge(), and cmtool::CMergeManager::RunSeparate().
|
protectedinherited |
Output analysis plot TFile.
Definition at line 126 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), cmtool::CMergeManager::EventBegin(), and cmtool::CMManagerBase::SetAnaFile().
|
protectedinherited |
Input clusters.
Definition at line 120 of file CMManagerBase.h.
Referenced by EventBegin(), cmtool::CMergeManager::EventBegin(), cmtool::CMManagerBase::GetInputClusters(), IterationBegin(), cmtool::CMergeManager::IterationBegin(), IterationProcess(), cmtool::CMergeManager::IterationProcess(), cmtool::CMManagerBase::Process(), cmtool::CMManagerBase::Reset(), and cmtool::CMManagerBase::SetClusters().
|
protected |
Merging algorithm.
Definition at line 80 of file CMatchManager.h.
Referenced by AddMatchAlgo(), CMatchManager(), EventBegin(), EventEnd(), IterationBegin(), IterationEnd(), IterationProcess(), and Reset().
|
protectedinherited |
Iteration loop switch.
Definition at line 132 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), cmtool::CMergeManager::IterationEnd(), cmtool::CMManagerBase::MergeTillConverge(), and cmtool::CMManagerBase::Process().
|
protectedinherited |
Minimum number of hits: the limit set for ClusterParamsAlg.
Definition at line 114 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), cmtool::CMManagerBase::SetClusters(), and cmtool::CMManagerBase::SetMinNHits().
|
protected |
Number of planes.
Definition at line 83 of file CMatchManager.h.
Referenced by CMatchManager(), and IterationProcess().
|
protectedinherited |
A holder for # of unique planes in the clusters, computed in ComputePriority() function.
Definition at line 135 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::ComputePriority(), IterationProcess(), cmtool::CMergeManager::IterationProcess(), and cmtool::CMManagerBase::Reset().
|
protectedinherited |
Priority record.
Definition at line 129 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::ComputePriority(), IterationProcess(), and cmtool::CMergeManager::RunMerge().
|
protectedinherited |
Priority algorithm.
Definition at line 123 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::AddPriorityAlgo(), cmtool::CMManagerBase::CMManagerBase(), cmtool::CMManagerBase::ComputePriority(), EventBegin(), cmtool::CMergeManager::EventBegin(), EventEnd(), cmtool::CMergeManager::EventEnd(), IterationBegin(), cmtool::CMergeManager::IterationBegin(), IterationEnd(), cmtool::CMergeManager::IterationEnd(), IterationProcess(), Reset(), and cmtool::CMManagerBase::Reset().
|
protectedinherited |
Timing verbosity flag.
Definition at line 111 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), cmtool::CMManagerBase::ComputePriority(), cmtool::CMManagerBase::Process(), cmtool::CMManagerBase::ReportTimings(), and cmtool::CMManagerBase::SetClusters().