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)
41 mcParticleVector.push_back(mapEntry.first);
44 for (
const MCParticle *
const pMCParticle : mcParticleVector)
46 const Slice &slice(mcParticleToSliceMap.at(pMCParticle));
48 if (!slice.m_caloHitListU.empty() || !slice.m_caloHitListV.empty() || !slice.m_caloHitListW.empty())
49 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::unordered_map< const pandora::MCParticle *, SlicingAlgorithm::Slice > MCParticleToSliceMap
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::vector< art::Ptr< simb::MCParticle > > MCParticleVector
BEGIN_PROLOG could also be cout