LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
MvaLowEClusterMergingAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_MVA_LOW_E_CLUSTER_MERGING_ALGORITHM_H
9 #define LAR_MVA_LOW_E_CLUSTER_MERGING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
13 
16 
17 #include "Pandora/PandoraInternal.h"
18 
19 namespace lar_content
20 {
21 
25 template <typename T>
26 class MvaLowEClusterMergingAlgorithm : public pandora::Algorithm
27 {
28 public:
33 
38 
39 protected:
40  pandora::StatusCode Run();
41  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
42 
49  const pandora::MCParticle *GetMCForCluster(
50  const pandora::Cluster *const cluster, std::map<const pandora::Cluster *, const pandora::MCParticle *> &clusterToMCMap) const;
51 
52  bool IsValidToUse(const pandora::Cluster *const cluster, std::map<const pandora::Cluster *, bool> &clusterIsUsed) const;
53 
54  double Angle(const pandora::CartesianVector vector1, const pandora::CartesianVector vector2) const;
55 
56  const pandora::CaloHitList EdgeHitFinder(const pandora::Cluster *const cluster, pandora::CaloHitList &clusterEdgeHits) const;
57 
58  bool ClusterTool(std::vector<std::string> featureOrder, LArMvaHelper::MvaFeatureMap featureMap) const;
59 
60  pandora::StatusCode EdgeHitComparer(const pandora::ClusterList *const pClusterList, const std::string &listName) const;
61 
62  pandora::StringVector m_inputClusterListNames;
63  std::string m_mcParticleListName;
67  std::string m_treeName;
68  std::string m_fileName;
69  int m_event;
72  bool m_writeTree;
74  std::string m_trainingOutputFile;
76  std::string m_mvaFileName;
77  std::string m_mvaName;
78  T m_mva;
80  std::string m_vertexListName;
83  float m_divisions;
85  bool m_printOut;
86 };
87 
89 
90 } // namespace lar_content
91 
92 #endif // #ifndef LAR_MVA_LOW_E_CLUSTER_MERGING_ALGORITHM_H
bool m_printOut
Whether the algorithm outputs cluster size information.
float m_contactThreshold
Distance value for hits to be considered in contact.
std::string m_fileName
Input file name for ROOT.
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.
const pandora::CaloHitList EdgeHitFinder(const pandora::Cluster *const cluster, pandora::CaloHitList &clusterEdgeHits) const
float m_minProbabilityCut
The minimum probability to label a cluster as track-like.
bool IsValidToUse(const pandora::Cluster *const cluster, std::map< const pandora::Cluster *, bool > &clusterIsUsed) const
std::string m_mvaName
The name of the mva to find.
Cluster finding and building.
MvaTypes::MvaFeatureMap MvaFeatureMap
Definition: LArMvaHelper.h:78
pandora::StatusCode EdgeHitComparer(const pandora::ClusterList *const pClusterList, const std::string &listName) const
float m_maxClusterFraction
The maximum fraction a cluster can be contaminated by to be considered clean.
double Angle(const pandora::CartesianVector vector1, const pandora::CartesianVector vector2) const
bool m_enableProbability
Whether to use probabilities instead of binary classification.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Header file for the lar adaptive boosted decision tree class.
Header file for the lar monte carlo particle helper helper class.
Header file for the lar support vector machine class.
std::string m_mcParticleListName
Input MC particle list name.
float m_minNCaloHits
The minimum number of hits for a cluster to be deemed true for IsAvailableToUse.
float m_proximityThreshold
Distance value for hits to be considered in proximity.
bool ClusterTool(std::vector< std::string > featureOrder, LArMvaHelper::MvaFeatureMap featureMap) const
float m_countHitsThreshold
A cut on whether cluster merges will occur depending on total event hits.
std::string m_vertexListName
Input Vertex List name for vertex based calculation.
MvaLowEClusterMergingAlgorithm< AdaBoostDecisionTree > BdtLowEClusterMergingAlgorithm
float m_sectorTolerance
Tolerance in radians for dot product between sector and centroid to CaloHit vector.
std::string m_filePathEnvironmentVariable
The environment variable providing a list of paths to mva files.
std::string m_treeName
Input tree name for ROOT.
pandora::StringVector m_inputClusterListNames
The names of the input cluster lists.
std::string m_trainingOutputFile
The training output file.
float m_divisions
Number of sectors to search in with Edge Hit Finder Function.
bool m_writeTree
Whether a tree should be output with recorded parameters.
float m_upperHitThreshold
Max number of hits for cluster to be considered.