Run the slicing tool.
29 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
30 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
35 this->
FillSlices(pAlgorithm, TPC_VIEW_U, caloHitListNames, mcParticleToSliceMap);
36 this->
FillSlices(pAlgorithm, TPC_VIEW_V, caloHitListNames, mcParticleToSliceMap);
37 this->
FillSlices(pAlgorithm, TPC_VIEW_W, caloHitListNames, mcParticleToSliceMap);
40 for (
const auto &mapEntry : mcParticleToSliceMap) mcParticleVector.push_back(mapEntry.first);
43 for (
const MCParticle *
const pMCParticle : mcParticleVector)
45 const Slice &slice(mcParticleToSliceMap.at(pMCParticle));
47 if (!slice.m_caloHitListU.empty() || !slice.m_caloHitListV.empty() || !slice.m_caloHitListW.empty())
48 sliceList.push_back(slice);
SlicingAlgorithm::Slice Slice
void FillSlices(const pandora::Algorithm *const pAlgorithm, const pandora::HitType hitType, const SlicingAlgorithm::HitTypeToNameMap &caloHitListNames, MCParticleToSliceMap &mcParticleToSliceMap) const
Fill slices using hits from a specified view.
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
static bool SortByMomentum(const pandora::MCParticle *const pLhs, const pandora::MCParticle *const pRhs)
Sort mc particles by their momentum.
void InitializeMCParticleToSliceMap(const pandora::Algorithm *const pAlgorithm, const SlicingAlgorithm::HitTypeToNameMap &caloHitListNames, MCParticleToSliceMap &mcParticleToSliceMap) const
Initialize the map from parent mc particles to slice objects.
std::unordered_map< const pandora::MCParticle *, SlicingAlgorithm::Slice > MCParticleToSliceMap