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