411 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
412 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
414 ClusterList clusterListW;
419 if (!clusterListW.empty())
421 CaloHitList clusterCaloHitList;
422 clusterListW.front()->GetOrderedCaloHitList().FillCaloHitList(clusterCaloHitList);
424 const CartesianVector &pfoStart(clusterCaloHitList.front()->GetPositionVector());
425 CartesianVector centroid(0.f, 0.f, 0.f);
430 float chargeCore(0.f), chargeHalo(0.f), chargeCon(0.f);
432 haloTotalRatio = (chargeCore + chargeHalo > std::numeric_limits<float>::epsilon()) ? chargeHalo / (chargeCore + chargeHalo) : -1.f;
433 concentration = (chargeCore + chargeHalo > std::numeric_limits<float>::epsilon()) ? chargeCon / (chargeCore + chargeHalo) : -1.f;
435 conicalness = (pfoLength > std::numeric_limits<float>::epsilon())
440 featureVector.push_back(haloTotalRatio);
441 featureVector.push_back(concentration);
442 featureVector.push_back(conicalness);
static void GetClusters(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::ClusterList &clusterList)
Get a list of clusters of a particular hit type from a list of pfos.
pandora::CartesianVector EigenValues
static float GetThreeDLengthSquared(const pandora::ParticleFlowObject *const pPfo)
Calculate length of Pfo using 3D clusters.
MvaTypes::MvaFeature MvaFeature
static void RunPca(const T &t, pandora::CartesianVector ¢roid, EigenValues &outputEigenValues, EigenVectors &outputEigenVectors)
Run principal component analysis using input calo hits (TPC_VIEW_U,V,W or TPC_3D; all treated as 3D p...
std::vector< pandora::CartesianVector > EigenVectors
float CalculateConicalness(const pandora::CaloHitList &caloHitList, const pandora::CartesianVector &pfoStart, const pandora::CartesianVector &pfoDir, const float pfoLength)
Calculate conicalness as a ratio of charge distribution at the end and start of pfo.
void CalculateChargeDistribution(const pandora::CaloHitList &caloHitList, const pandora::CartesianVector &pfoStart, const pandora::CartesianVector &pfoDir, float &chargeCore, float &chargeHalo, float &chargeCon)
Calculate charge distribution in relation to the Moeliere radius.
BEGIN_PROLOG could also be cout