9 #include "Pandora/AlgorithmHeaders.h" 26 StatusCode DlTrackShowerStreamSelectionAlgorithm::AllocateToStreams(
const Cluster *
const pCluster)
28 const OrderedCaloHitList &orderedCaloHitList{pCluster->GetOrderedCaloHitList()};
30 orderedCaloHitList.FillCaloHitList(caloHits);
31 const CaloHitList &isolatedHits{pCluster->GetIsolatedCaloHitList()};
32 caloHits.insert(caloHits.end(), isolatedHits.begin(), isolatedHits.end());
33 FloatVector trackLikelihoods;
36 for (
const CaloHit *pCaloHit : caloHits)
40 const float pShower{pLArCaloHit->GetShowerProbability()};
41 if ((pTrack + pShower) > std::numeric_limits<float>::epsilon())
42 trackLikelihoods.emplace_back(pTrack / (pTrack + pShower));
45 const unsigned long N{trackLikelihoods.size()};
50 m_clusterListMap.at(m_trackListName).emplace_back(pCluster);
52 m_clusterListMap.at(m_showerListName).emplace_back(pCluster);
55 catch (
const StatusCodeException &)
59 return STATUS_CODE_SUCCESS;
63 StatusCode DlTrackShowerStreamSelectionAlgorithm::ReadSettings(
const TiXmlHandle xmlHandle)
65 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, StreamSelectionAlgorithm::ReadSettings(xmlHandle));
66 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle,
"TrackListName", m_trackListName));
67 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle,
"ShowerListName", m_showerListName));
69 m_listNames.emplace_back(m_trackListName);
70 m_listNames.emplace_back(m_showerListName);
72 return STATUS_CODE_SUCCESS;
Header file for the lar calo hit class.
Header file for the lar monitoring helper helper class.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Header file for the lar monte carlo particle helper helper class.
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.
Header file for the deep learning track shower cluster streaming algorithm.
float GetTrackProbability() const
Get the probability that the hit is track-like.