LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "CPAlgoArray.h"
Public Types | |
enum | EvaluationMode_t { kPositiveAddition, kSimpleAddition, kMultiplication, kLastAlgo } |
Public Member Functions | |
CPAlgoArray () | |
Default constructor. More... | |
virtual | ~CPAlgoArray () |
Default destructor. More... | |
void | AddAlgo (CPriorityAlgoBase *algo) |
Setter to add a new algorithm. More... | |
void | SetMode (EvaluationMode_t mode) |
Setter for an evaluation. More... | |
virtual float | Priority (const ::cluster::ClusterParamsAlg &cluster) |
virtual void | Report () |
virtual void | Reset () |
Function to reset the algorithm instance, called together with manager's Reset() 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 float | Priority (const cluster::ClusterParamsAlg &cluster) |
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 | |
std::vector< CPriorityAlgoBase * > | _algo_array |
vector of algorithms More... | |
EvaluationMode_t | _mode |
evaluation mode More... | |
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... | |
User implementation for CPriorityAlgoBase class This is an array of priority algorithms. It has multiple modes to compute combined Priority() return value.
Definition at line 26 of file CPAlgoArray.h.
Enumerator | |
---|---|
kPositiveAddition |
DEFAULT: simply add Priority() return values except negative return. If there is a negative return value, it returns that and stop processing the rest of algorithms |
kSimpleAddition |
Simply add Priority() return values from all algorithms. Note some algorithms are allowed to return negative values. |
kMultiplication |
Multiply Priority() return values from all algorithms except negative return. If there is a negative return, it returns that and stop processing the rest of algorithms |
kLastAlgo |
If all algorithms return positive values, return the last algorithm's Priority() return value. If any algorithm returns negative, it returns that and stop processing the rest of algorithms |
Definition at line 30 of file CPAlgoArray.h.
cmtool::CPAlgoArray::CPAlgoArray | ( | ) |
Default constructor.
Definition at line 9 of file CPAlgoArray.cxx.
References _algo_array, _mode, and kPositiveAddition.
|
inlinevirtual |
|
inline |
Setter to add a new algorithm.
Definition at line 63 of file CPAlgoArray.h.
References _algo_array.
Referenced by ShowerReco3D::ShowerReco3D().
|
inlinevirtual |
Optional function: called at the beginning of 1st iteration. This is called per event.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 86 of file CPAlgoArray.h.
References _algo_array.
|
inlinevirtual |
Optional function: called at the end of event ... after the last merging iteration is over.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 92 of file CPAlgoArray.h.
References _algo_array.
|
inlinevirtual |
Optional function: called at the beggining of each iterative loop. 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 from cmtool::CMAlgoBase.
Definition at line 100 of file CPAlgoArray.h.
References _algo_array.
|
inlinevirtual |
Optional function: called at the end of each iterative loop.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 106 of file CPAlgoArray.h.
References _algo_array.
|
inlinevirtualinherited |
Core function: given the CPAN input, return whether a cluster should be merged or not.
Definition at line 40 of file CPriorityAlgoBase.h.
References cluster::ClusterParamsAlg::GetNHits().
Referenced by cmtool::CMManagerBase::ComputePriority().
|
virtual |
Core function: given a set of CPANs, return a float which indicates the compatibility the cluster combination.
Definition at line 17 of file CPAlgoArray.cxx.
References _algo_array, _mode, kLastAlgo, kMultiplication, kPositiveAddition, and kSimpleAddition.
Referenced by SetMode().
|
inlinevirtual |
Optional function: called after each iterative approach if a manager class is run with verbosity level <= kPerIteration. Maybe useful for debugging.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 78 of file CPAlgoArray.h.
References _algo_array.
|
inlinevirtual |
Function to reset the algorithm instance, called together with manager's Reset()
Reimplemented from cmtool::CMAlgoBase.
Definition at line 81 of file CPAlgoArray.h.
References _algo_array.
|
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 |
Setter for an evaluation.
Definition at line 66 of file CPAlgoArray.h.
References _mode, and Priority().
|
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().
|
protected |
vector of algorithms
Definition at line 112 of file CPAlgoArray.h.
Referenced by AddAlgo(), CPAlgoArray(), EventBegin(), EventEnd(), IterationBegin(), IterationEnd(), Priority(), Report(), and Reset().
|
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 |
evaluation mode
Definition at line 115 of file CPAlgoArray.h.
Referenced by CPAlgoArray(), Priority(), and SetMode().
|
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(), cmtool::CBAlgoCenterOfMass::Bool(), cmtool::CBAlgoStartInPoly::Bool(), cmtool::CBAlgoStartNearEnd::Bool(), cmtool::CBAlgoProhibitAllTracks::Bool(), cmtool::CBAlgoShortestDist::CBAlgoShortestDist(), cmtool::CBAlgoShortestDistSmallCluster::CBAlgoShortestDistSmallCluster(), cmtool::CMAlgoBase::CMAlgoBase(), cmtool::CFAlgoZOverlap::Float(), cmtool::CFAlgoQRatio::Float(), cmtool::CFAlgoStartPointMatch::Float(), cmtool::CMAlgoBase::SetVerbose(), cmtool::CBAlgoShortestDist::ShortestDistanceSquared(), cmtool::CBAlgoShortestDistSmallCluster::ShortestDistanceSquared(), cmtool::CBAlgoCenterOfMass::ShortestDistanceSquared(), and cmtool::CBAlgoCenterOfMassSmall::ShortestDistanceSquared().