LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 (util::GeometryUtilities const &gser, 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 (util::GeometryUtilities const &gser) |
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 (util::GeometryUtilities const &gser) |
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 44 of file CMManagerBase.h.
|
private |
Default constructor is private because we need an argument to configure w/ # planes in the detector.
Definition at line 21 of file CMatchManager.cxx.
cmtool::CMatchManager::CMatchManager | ( | size_t | nplanes | ) |
Definition at line 26 of file CMatchManager.cxx.
References _match_algo, _nplanes, and Reset().
|
inlinevirtual |
|
inline |
A simple method to add an algorithm for merging.
Definition at line 46 of file CMatchManager.h.
References _match_algo.
Referenced by ShowerReco3D::ShowerReco3D().
|
inlineinherited |
Setter to add an algorithm for priority determination.
Definition at line 71 of file CMManagerBase.h.
Referenced by ShowerReco3D::ShowerReco3D().
|
protectedinherited |
Function to compute priority.
Definition at line 155 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(), and cmtool::CMergeManager::IterationProcess().
|
inlineinherited |
Method to enable debug mode (lots of couts)
Definition at line 62 of file CMManagerBase.h.
|
protectedvirtual |
FMWK function called @ beginning of Process()
Reimplemented from cmtool::CMManagerBase.
Definition at line 41 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 64 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 49 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 84 of file CMManagerBase.h.
Referenced by showerreco::ShowerRecoManager::Process().
|
protectedvirtual |
FMWK function called @ beginning of iterative loop inside Process()
Reimplemented from cmtool::CMManagerBase.
Definition at line 52 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 58 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 172 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 74 of file CMManagerBase.h.
References lar::dump::vector().
|
inherited |
A method to execute the main action, to be called per event.
Definition at line 89 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(), and showerreco::ShowerRecoManager::Reconstruct().
|
inlineinherited |
Method to enable timing profile cout.
Definition at line 65 of file CMManagerBase.h.
References Reset().
|
virtual |
Method to reset itself.
Definition at line 33 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 93 of file CMManagerBase.h.
|
inherited |
A simple method to add a cluster.
Definition at line 34 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 showerreco::ShowerRecoManager::Reconstruct().
|
inherited |
A simple method to add a cluster.
Definition at line 75 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 87 of file CMManagerBase.h.
References n.
|
protected |
Book keeper instance.
Definition at line 73 of file CMatchManager.h.
Referenced by GetBookKeeper(), IterationProcess(), and Reset().
|
protectedinherited |
Debug mode switch.
Definition at line 122 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), 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 131 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), and cmtool::CMergeManager::EventBegin().
|
protectedinherited |
Input clusters.
Definition at line 125 of file CMManagerBase.h.
Referenced by EventBegin(), cmtool::CMergeManager::EventBegin(), IterationBegin(), cmtool::CMergeManager::IterationBegin(), IterationProcess(), cmtool::CMergeManager::IterationProcess(), cmtool::CMManagerBase::Process(), cmtool::CMManagerBase::Reset(), and cmtool::CMManagerBase::SetClusters().
|
protected |
Merging algorithm.
Definition at line 76 of file CMatchManager.h.
Referenced by AddMatchAlgo(), CMatchManager(), EventBegin(), EventEnd(), IterationBegin(), IterationEnd(), IterationProcess(), and Reset().
|
protectedinherited |
Iteration loop switch.
Definition at line 137 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), cmtool::CMergeManager::IterationEnd(), and cmtool::CMManagerBase::Process().
|
protectedinherited |
Minimum number of hits: the limit set for ClusterParamsAlg.
Definition at line 119 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), and cmtool::CMManagerBase::SetClusters().
|
protected |
Number of planes.
Definition at line 79 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 140 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::ComputePriority(), IterationProcess(), cmtool::CMergeManager::IterationProcess(), and cmtool::CMManagerBase::Reset().
|
protectedinherited |
Priority record.
Definition at line 134 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::ComputePriority(), IterationProcess(), and cmtool::CMergeManager::RunMerge().
|
protectedinherited |
Priority algorithm.
Definition at line 128 of file CMManagerBase.h.
Referenced by 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 116 of file CMManagerBase.h.
Referenced by cmtool::CMManagerBase::CMManagerBase(), cmtool::CMManagerBase::ComputePriority(), cmtool::CMManagerBase::Process(), and cmtool::CMManagerBase::SetClusters().