29 #ifndef APRILCLUSTER_H
30 #define APRILCLUSTER_H
34 #include "Api/PandoraApi.h"
35 #include "Api/PandoraContentApi.h"
38 #include "Pandora/PandoraInputTypes.h"
45 namespace april_content
54 : m_orderParameter(std::numeric_limits<float>::max())
59 : m_parameters(parameters), m_powers(powers)
61 if(m_parameters.size() != m_powers.size())
63 std::cout <<
"parameters and powers length are not consistent!" << std::endl;
64 throw pandora::StatusCodeException(pandora::STATUS_CODE_FAILURE);
67 m_orderParameter = 1.;
69 for(
int i = 0; i < m_parameters.size(); ++i)
71 m_orderParameter *= std::pow(m_parameters.at(i), m_powers.at(i));
77 return m_orderParameter < a.m_orderParameter;
80 std::vector<float> m_parameters;
81 std::vector<float> m_powers;
83 float m_orderParameter;
92 float GetMergedHadronicEnergy();
94 std::vector<APRILCluster*>& GetMotherCluster();
97 void ResetRelationShip();
98 void ClearMotherCluster();
99 const std::set<APRILCluster*>& GetClustersToMerge()
const;
100 void ClearClustersToMerge();
101 void GetAllClustersToMerge(std::set<APRILCluster*>& allClustersToMerge)
const;
102 const std::vector<APRILCluster*>& GetNearbyClusters()
const;
105 const pandora::CartesianVector& GetAxis()
const;
106 const pandora::CartesianVector& GetIntercept()
const;
107 const pandora::CartesianVector& GetCentroid()
const;
108 const pandora::CartesianVector& GetStartingPoint()
const;
109 const pandora::CartesianVector& GetEndpoint()
const;
111 const pandora::OrderedCaloHitList& GetMainOrderedClusterHits()
const;
112 const pandora::CaloHitList& GetMainClusterHits()
const;
115 bool HasMotherAtSearch();
120 void SetHasMotherAtSearch(
bool hasMotherAtSearch =
true);
122 void ResetMotherAtSearch();
124 void SetClustersToMerge(
const std::vector<APRILCluster*>& clusterVector);
126 void SetNearbyClusters(
const std::vector<APRILCluster*>& clusterVector);
128 void SetAxis(pandora::CartesianVector axis);
129 void SetIntercept(pandora::CartesianVector intercept);
130 void SetCentroid(pandora::CartesianVector centrod);
131 void SetStartingPoint(pandora::CartesianVector startingPoint);
132 void SetEndpoint(pandora::CartesianVector endpoint);
134 void SetMainOrderedClusterHits(pandora::OrderedCaloHitList mainOrderedClusterHits);
135 void SetMainClusterHits(pandora::CaloHitList mainClusterHits);
141 void SetPhoton(
bool isPhoton);
148 APRILCluster(
const PandoraContentApi::Cluster::Parameters ¶meters);
154 std::vector<APRILCluster*> m_motherCluster;
156 std::set<APRILCluster*> m_clustersToMerge;
157 std::vector<APRILCluster*> m_nearbyClusters;
159 pandora::CartesianVector m_axis;
160 pandora::CartesianVector m_intercept;
161 pandora::CartesianVector m_centroid;
162 pandora::CartesianVector m_startingPoint;
163 pandora::CartesianVector m_endpoint;
167 bool m_hasMotherAtSearch;
172 std::map<APRILCluster*, ClustersOrderParameter> m_orderWithMotherClusters;
174 pandora::OrderedCaloHitList m_mainOrderedClusterHits;
175 pandora::CaloHitList m_mainClusterHits;
ClusterFactory class.
Definition: ObjectFactories.h:126
Cluster class.
Definition: Cluster.h:89