9 #include "Pandora/AlgorithmHeaders.h" 24 DlPfoCharacterisationAlgorithm::DlPfoCharacterisationAlgorithm()
30 bool DlPfoCharacterisationAlgorithm::IsClearTrack(
const Cluster *
const pCluster)
const 32 const OrderedCaloHitList &orderedCaloHitList{pCluster->GetOrderedCaloHitList()};
34 orderedCaloHitList.FillCaloHitList(caloHits);
35 const CaloHitList &isolatedHits{pCluster->GetIsolatedCaloHitList()};
36 caloHits.insert(caloHits.end(), isolatedHits.begin(), isolatedHits.end());
37 FloatVector trackLikelihoods;
40 for (
const CaloHit *pCaloHit : caloHits)
44 const float pShower{pLArCaloHit->GetShowerProbability()};
45 if ((pTrack + pShower) > std::numeric_limits<float>::epsilon())
46 trackLikelihoods.emplace_back(pTrack / (pTrack + pShower));
49 const unsigned long N{trackLikelihoods.size()};
59 catch (
const StatusCodeException &)
68 bool DlPfoCharacterisationAlgorithm::IsClearTrack(
const pandora::ParticleFlowObject *
const pPfo)
const 70 ClusterList allClusters;
71 LArPfoHelper::GetTwoDClusterList(pPfo, allClusters);
72 FloatVector trackLikelihoods;
73 for (
const Cluster *pCluster : allClusters)
75 const OrderedCaloHitList &orderedCaloHitList{pCluster->GetOrderedCaloHitList()};
77 orderedCaloHitList.FillCaloHitList(caloHits);
78 const CaloHitList &isolatedHits{pCluster->GetIsolatedCaloHitList()};
79 caloHits.insert(caloHits.end(), isolatedHits.begin(), isolatedHits.end());
82 for (
const CaloHit *pCaloHit : caloHits)
86 const float pShower{pLArCaloHit->GetShowerProbability()};
87 if ((pTrack + pShower) > std::numeric_limits<float>::epsilon())
88 trackLikelihoods.emplace_back(pTrack / (pTrack + pShower));
91 catch (
const StatusCodeException &)
96 const unsigned long N{trackLikelihoods.size()};
111 StatusCode DlPfoCharacterisationAlgorithm::ReadSettings(
const TiXmlHandle xmlHandle)
113 return PfoCharacterisationBaseAlgorithm::ReadSettings(xmlHandle);
Header file for the pfo helper class.
Header file for the cut based pfo characterisation algorithm class.
Header file for the lar calo hit class.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
float GetTrackProbability() const
Get the probability that the hit is track-like.