Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
CheatingPfoCreationAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_CHEATING_PFO_CREATION_ALGORITHM_H
9#define LAR_CHEATING_PFO_CREATION_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
14
15#include <unordered_map>
16
17namespace lar_content
18{
19
24{
25public:
30
31private:
34
35 typedef std::unordered_map<const pandora::MCParticle *, pandora::ClusterList> MCParticleToClusterListMap;
36
44 void GetMCParticleToClusterListMap(const pandora::ClusterList *const pClusterList,
45 const LArMCParticleHelper::MCRelationMap &mcPrimaryMap, MCParticleToClusterListMap &mcParticleToClusterListMap) const;
46
52 void CreatePfos(const MCParticleToClusterListMap &mcParticleToClusterListMap) const;
53
62 unsigned int GetNHitTypesAboveThreshold(const pandora::ClusterList &clusterList, const unsigned int nHitsThreshold) const;
63
71 bool IsTrack(const pandora::MCParticle *const pMCParticle) const;
72
80 bool IsShower(const pandora::MCParticle *const pMCParticle) const;
81
82 typedef std::map<pandora::HitType, unsigned int> HitTypeMap;
83 typedef std::set<int> ParticleIdList;
84
86 std::string m_outputPfoListName;
88
91
95 unsigned int m_minGoodHitTypes;
96 unsigned int m_nHitsForGoodHitType;
98};
99
100} // namespace lar_content
101
102#endif // #ifndef LAR_CHEATING_PFO_CREATION_ALGORITHM_H
Header file for the algorithm class.
Header file for the lar monte carlo particle helper helper class.
std::unordered_map< const pandora::MCParticle *, pandora::ClusterList > MCParticleToClusterListMap
pandora::StatusCode Run()
Run the algorithm.
bool m_useOnlyAvailableClusters
Whether to consider unavailable clusters when identifying cheated pfos.
void CreatePfos(const MCParticleToClusterListMap &mcParticleToClusterListMap) const
Create pfos corresponding to the details in a provided mc particle to cluster list map.
bool IsShower(const pandora::MCParticle *const pMCParticle) const
Determine whether an input MCParticle is a shower-like particle.
std::string m_outputPfoListName
The output pfo list name.
bool m_replaceCurrentVertexList
Whether to replace current vertex list.
bool m_addVertices
Whether to add the start vertex to the cheated pfo.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
unsigned int GetNHitTypesAboveThreshold(const pandora::ClusterList &clusterList, const unsigned int nHitsThreshold) const
Get the number of hit types containing more than a specified number of hits.
bool m_collapseToPrimaryMCParticles
Whether to collapse mc particle hierarchies to primary particles.
void GetMCParticleToClusterListMap(const pandora::ClusterList *const pClusterList, const LArMCParticleHelper::MCRelationMap &mcPrimaryMap, MCParticleToClusterListMap &mcParticleToClusterListMap) const
Get a map relating mc particles to a list of daughter clusters.
bool IsTrack(const pandora::MCParticle *const pMCParticle) const
Determine whether an input MCParticle is a track-like particle.
unsigned int m_nHitsForGoodHitType
The min number of hits of a particular hit type in order to declare the hit type is good.
pandora::StringVector m_inputClusterListNames
The names of the input cluster lists.
ParticleIdList m_particleIdList
The list of particle ids to consider for pfo creation; will consider all ids if empty.
unsigned int m_minGoodHitTypes
The min number of good hit types in the clusters collected for a given mc particle.
std::map< pandora::HitType, unsigned int > HitTypeMap
std::string m_mcParticleListName
The mc particle list name.
std::string m_outputVertexListName
The output vertex list name.
std::unordered_map< const pandora::MCParticle *, const pandora::MCParticle * > MCRelationMap
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
MCParticle class.
Definition MCParticle.h:26
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< std::string > StringVector
StatusCode
The StatusCode enum.