![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
MvaLowEClusterMergingAlgorithm class. More...
#include "MvaLowEClusterMergingAlgorithm.h"
Public Member Functions | |
MvaLowEClusterMergingAlgorithm () | |
Default constructor. More... | |
virtual | ~MvaLowEClusterMergingAlgorithm () |
Destructor. More... | |
Protected Member Functions | |
pandora::StatusCode | Run () |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
const pandora::MCParticle * | GetMCForCluster (const pandora::Cluster *const cluster, std::map< const pandora::Cluster *, const pandora::MCParticle * > &clusterToMCMap) const |
Get the MC particle for a given cluster, caching to a map. More... | |
bool | IsValidToUse (const pandora::Cluster *const cluster, std::map< const pandora::Cluster *, bool > &clusterIsUsed) const |
double | Angle (const pandora::CartesianVector vector1, const pandora::CartesianVector vector2) const |
const pandora::CaloHitList | EdgeHitFinder (const pandora::Cluster *const cluster, pandora::CaloHitList &clusterEdgeHits) const |
bool | ClusterTool (std::vector< std::string > featureOrder, LArMvaHelper::MvaFeatureMap featureMap) const |
pandora::StatusCode | EdgeHitComparer (const pandora::ClusterList *const pClusterList, const std::string &listName) const |
Protected Attributes | |
pandora::StringVector | m_inputClusterListNames |
The names of the input cluster lists. More... | |
std::string | m_mcParticleListName |
Input MC particle list name. More... | |
bool | m_trainingSetMode |
Whether to train. More... | |
bool | m_enableProbability |
Whether to use probabilities instead of binary classification. More... | |
float | m_minProbabilityCut |
The minimum probability to label a cluster as track-like. More... | |
std::string | m_treeName |
Input tree name for ROOT. More... | |
std::string | m_fileName |
Input file name for ROOT. More... | |
int | m_event |
Event Number Counter. More... | |
float | m_maxClusterFraction |
The maximum fraction a cluster can be contaminated by to be considered clean. More... | |
float | m_minNCaloHits |
The minimum number of hits for a cluster to be deemed true for IsAvailableToUse. More... | |
bool | m_writeTree |
Whether a tree should be output with recorded parameters. More... | |
float | m_upperHitThreshold |
Max number of hits for cluster to be considered. More... | |
std::string | m_trainingOutputFile |
The training output file. More... | |
std::string | m_filePathEnvironmentVariable |
The environment variable providing a list of paths to mva files. More... | |
std::string | m_mvaFileName |
The mva input file. More... | |
std::string | m_mvaName |
The name of the mva to find. More... | |
T | m_mva |
The mva. More... | |
float | m_countHitsThreshold |
A cut on whether cluster merges will occur depending on total event hits. More... | |
std::string | m_vertexListName |
Input Vertex List name for vertex based calculation. More... | |
float | m_contactThreshold |
Distance value for hits to be considered in contact. More... | |
float | m_proximityThreshold |
Distance value for hits to be considered in proximity. More... | |
float | m_divisions |
Number of sectors to search in with Edge Hit Finder Function. More... | |
float | m_sectorTolerance |
Tolerance in radians for dot product between sector and centroid to CaloHit vector. More... | |
bool | m_printOut |
Whether the algorithm outputs cluster size information. More... | |
MvaLowEClusterMergingAlgorithm class.
Definition at line 26 of file MvaLowEClusterMergingAlgorithm.h.
lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm | ( | ) |
Default constructor.
Definition at line 35 of file MvaLowEClusterMergingAlgorithm.cc.
References lar_content::MvaLowEClusterMergingAlgorithm< T >::m_contactThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_countHitsThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_divisions, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_enableProbability, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_event, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_filePathEnvironmentVariable, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_maxClusterFraction, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_minNCaloHits, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_minProbabilityCut, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_printOut, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_proximityThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_sectorTolerance, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_upperHitThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_vertexListName, and lar_content::MvaLowEClusterMergingAlgorithm< T >::m_writeTree.
|
virtual |
Destructor.
Definition at line 57 of file MvaLowEClusterMergingAlgorithm.cc.
References lar_content::MvaLowEClusterMergingAlgorithm< T >::m_fileName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_treeName, and lar_content::MvaLowEClusterMergingAlgorithm< T >::m_writeTree.
|
protected |
Definition at line 568 of file MvaLowEClusterMergingAlgorithm.cc.
|
protected |
Definition at line 464 of file MvaLowEClusterMergingAlgorithm.cc.
References lar_content::LArMvaHelper::CalculateProbability(), lar_content::LArMvaHelper::Classify(), lar_content::MvaLowEClusterMergingAlgorithm< T >::m_enableProbability, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_minProbabilityCut, and lar_content::MvaLowEClusterMergingAlgorithm< T >::m_mva.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer().
|
protected |
Definition at line 156 of file MvaLowEClusterMergingAlgorithm.cc.
References util::abs(), lar_content::MvaLowEClusterMergingAlgorithm< T >::ClusterTool(), lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitFinder(), f, lar_content::LArClusterHelper::GetClusterHitType(), lar_content::MvaLowEClusterMergingAlgorithm< T >::GetMCForCluster(), hits(), lar_content::MvaLowEClusterMergingAlgorithm< T >::IsValidToUse(), lar_content::MvaLowEClusterMergingAlgorithm< T >::m_contactThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_countHitsThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_event, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_printOut, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_proximityThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_trainingOutputFile, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_trainingSetMode, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_treeName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_vertexListName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_writeTree, lar_content::LArMvaHelper::ProduceTrainingExample(), and lar_content::LArGeometryHelper::ProjectPosition().
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::Run().
|
protected |
Definition at line 479 of file MvaLowEClusterMergingAlgorithm.cc.
References util::abs(), f, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_divisions, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_printOut, and lar_content::MvaLowEClusterMergingAlgorithm< T >::m_sectorTolerance.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer().
|
protected |
Get the MC particle for a given cluster, caching to a map.
cluster | The current cluster to lookup |
clusterToMCMap | Map from Cluster to MC to cache results. |
Definition at line 109 of file MvaLowEClusterMergingAlgorithm.cc.
References e.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer().
|
protected |
Definition at line 137 of file MvaLowEClusterMergingAlgorithm.cc.
References lar_content::MvaLowEClusterMergingAlgorithm< T >::m_minNCaloHits, and lar_content::MvaLowEClusterMergingAlgorithm< T >::m_upperHitThreshold.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer().
|
protected |
Definition at line 579 of file MvaLowEClusterMergingAlgorithm.cc.
References lar_content::LArFileHelper::FindFileInPath(), lar_content::MvaLowEClusterMergingAlgorithm< T >::m_contactThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_countHitsThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_divisions, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_enableProbability, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_fileName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_filePathEnvironmentVariable, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_inputClusterListNames, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_mcParticleListName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_minNCaloHits, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_minProbabilityCut, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_mva, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_mvaFileName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_mvaName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_printOut, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_proximityThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_sectorTolerance, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_trainingOutputFile, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_trainingSetMode, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_treeName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_upperHitThreshold, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_vertexListName, and lar_content::MvaLowEClusterMergingAlgorithm< T >::m_writeTree.
|
protected |
Definition at line 67 of file MvaLowEClusterMergingAlgorithm.cc.
References lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::m_event, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_fileName, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_inputClusterListNames, lar_content::MvaLowEClusterMergingAlgorithm< T >::m_treeName, and lar_content::MvaLowEClusterMergingAlgorithm< T >::m_writeTree.
|
protected |
Distance value for hits to be considered in contact.
Definition at line 81 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
A cut on whether cluster merges will occur depending on total event hits.
Definition at line 79 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Number of sectors to search in with Edge Hit Finder Function.
Definition at line 83 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitFinder(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Whether to use probabilities instead of binary classification.
Definition at line 65 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ClusterTool(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Event Number Counter.
Definition at line 69 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::Run().
|
protected |
Input file name for ROOT.
Definition at line 68 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings(), lar_content::MvaLowEClusterMergingAlgorithm< T >::Run(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::~MvaLowEClusterMergingAlgorithm().
|
protected |
The environment variable providing a list of paths to mva files.
Definition at line 75 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
The names of the input cluster lists.
Definition at line 62 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::Run().
|
protected |
The maximum fraction a cluster can be contaminated by to be considered clean.
Definition at line 70 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm().
|
protected |
Input MC particle list name.
Definition at line 63 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
The minimum number of hits for a cluster to be deemed true for IsAvailableToUse.
Definition at line 71 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::IsValidToUse(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
The minimum probability to label a cluster as track-like.
Definition at line 66 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ClusterTool(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
The mva.
Definition at line 78 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ClusterTool(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
The mva input file.
Definition at line 76 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
The name of the mva to find.
Definition at line 77 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Whether the algorithm outputs cluster size information.
Definition at line 85 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitFinder(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Distance value for hits to be considered in proximity.
Definition at line 82 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Tolerance in radians for dot product between sector and centroid to CaloHit vector.
Definition at line 84 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitFinder(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
The training output file.
Definition at line 74 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Whether to train.
Definition at line 64 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Input tree name for ROOT.
Definition at line 67 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings(), lar_content::MvaLowEClusterMergingAlgorithm< T >::Run(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::~MvaLowEClusterMergingAlgorithm().
|
protected |
Max number of hits for cluster to be considered.
Definition at line 73 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::IsValidToUse(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Input Vertex List name for vertex based calculation.
Definition at line 80 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings().
|
protected |
Whether a tree should be output with recorded parameters.
Definition at line 72 of file MvaLowEClusterMergingAlgorithm.h.
Referenced by lar_content::MvaLowEClusterMergingAlgorithm< T >::EdgeHitComparer(), lar_content::MvaLowEClusterMergingAlgorithm< T >::MvaLowEClusterMergingAlgorithm(), lar_content::MvaLowEClusterMergingAlgorithm< T >::ReadSettings(), lar_content::MvaLowEClusterMergingAlgorithm< T >::Run(), and lar_content::MvaLowEClusterMergingAlgorithm< T >::~MvaLowEClusterMergingAlgorithm().