Split cluster into two fragments.
80 PandoraContentApi::Cluster::Parameters firstParameters, secondParameters;
82 if (STATUS_CODE_SUCCESS != this->
DivideCaloHits(pCluster, firstParameters.m_caloHitList, secondParameters.m_caloHitList))
83 return STATUS_CODE_NOT_FOUND;
85 if (firstParameters.m_caloHitList.empty() || secondParameters.m_caloHitList.empty())
86 return STATUS_CODE_NOT_ALLOWED;
89 const ClusterList clusterList(1, pCluster);
90 std::string clusterListToSaveName, clusterListToDeleteName;
92 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=,
93 PandoraContentApi::InitializeFragmentation(*
this, clusterList, clusterListToDeleteName, clusterListToSaveName));
96 const Cluster *pFirstCluster(NULL), *pSecondCluster(NULL);
97 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Cluster::Create(*
this, firstParameters, pFirstCluster));
98 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Cluster::Create(*
this, secondParameters, pSecondCluster));
100 clusterSplittingList.push_back(pFirstCluster);
101 clusterSplittingList.push_back(pSecondCluster);
104 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::EndFragmentation(*
this, clusterListToSaveName, clusterListToDeleteName));
106 return STATUS_CODE_SUCCESS;
virtual pandora::StatusCode DivideCaloHits(const pandora::Cluster *const pCluster, pandora::CaloHitList &firstCaloHitList, pandora::CaloHitList &secondCaloHitList) const =0
Divide calo hits in a cluster into two lists, each associated with a separate fragment cluster...