LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
CheatingPfoCreationAlgorithm class. More...
#include "CheatingPfoCreationAlgorithm.h"
Public Member Functions | |
CheatingPfoCreationAlgorithm () | |
Default constructor. More... | |
Private Types | |
typedef std::unordered_map< const pandora::MCParticle *, pandora::ClusterList > | MCParticleToClusterListMap |
typedef std::map< pandora::HitType, unsigned int > | HitTypeMap |
typedef std::set< int > | ParticleIdList |
Private Member Functions | |
pandora::StatusCode | Run () |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
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. More... | |
void | CreatePfos (const MCParticleToClusterListMap &mcParticleToClusterListMap) const |
Create pfos corresponding to the details in a provided mc particle to cluster list map. More... | |
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. More... | |
Private Attributes | |
pandora::StringVector | m_inputClusterListNames |
The names of the input cluster lists. More... | |
std::string | m_outputPfoListName |
The output pfo list name. More... | |
std::string | m_outputVertexListName |
The output vertex list name. More... | |
bool | m_collapseToPrimaryMCParticles |
Whether to collapse mc particle hierarchies to primary particles. More... | |
std::string | m_mcParticleListName |
The mc particle list name. More... | |
bool | m_useOnlyAvailableClusters |
Whether to consider unavailable clusters when identifying cheated pfos. More... | |
bool | m_addVertices |
Whether to add the start vertex to the cheated pfo. More... | |
bool | m_replaceCurrentVertexList |
Whether to replace current vertex list. More... | |
unsigned int | m_minGoodHitTypes |
The min number of good hit types in the clusters collected for a given mc particle. More... | |
unsigned int | m_nHitsForGoodHitType |
The min number of hits of a particular hit type in order to declare the hit type is good. More... | |
ParticleIdList | m_particleIdList |
The list of particle ids to consider for pfo creation; will consider all ids if empty. More... | |
CheatingPfoCreationAlgorithm class.
Definition at line 23 of file CheatingPfoCreationAlgorithm.h.
|
private |
Definition at line 64 of file CheatingPfoCreationAlgorithm.h.
|
private |
Definition at line 35 of file CheatingPfoCreationAlgorithm.h.
|
private |
Definition at line 65 of file CheatingPfoCreationAlgorithm.h.
lar_content::CheatingPfoCreationAlgorithm::CheatingPfoCreationAlgorithm | ( | ) |
Default constructor.
Definition at line 20 of file CheatingPfoCreationAlgorithm.cc.
|
private |
Create pfos corresponding to the details in a provided mc particle to cluster list map.
mcParticleToClusterListMap | the mc particle to cluster list map |
Definition at line 100 of file CheatingPfoCreationAlgorithm.cc.
References GetNHitTypesAboveThreshold(), m_addVertices, m_minGoodHitTypes, m_nHitsForGoodHitType, m_outputPfoListName, m_outputVertexListName, m_replaceCurrentVertexList, and lar_content::LArMCParticleHelper::SortByMomentum().
Referenced by Run().
|
private |
Get a map relating mc particles to a list of daughter clusters.
pClusterList | address of a cluster list |
mcPrimaryMap | the mapping between mc particles and their parents |
mcParticleToClusterListMap | to receive the populated mc particle to cluster list map |
Definition at line 67 of file CheatingPfoCreationAlgorithm.cc.
References m_collapseToPrimaryMCParticles, m_particleIdList, and m_useOnlyAvailableClusters.
Referenced by Run().
|
private |
Get the number of hit types containing more than a specified number of hits.
clusterList | the cluster list, consider all hits in clusters in this list |
nHitsThreshold | the threshold number of hits of a specified hit type |
Definition at line 173 of file CheatingPfoCreationAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType().
Referenced by CreatePfos().
|
private |
Definition at line 195 of file CheatingPfoCreationAlgorithm.cc.
References m_addVertices, m_collapseToPrimaryMCParticles, m_inputClusterListNames, m_mcParticleListName, m_minGoodHitTypes, m_nHitsForGoodHitType, m_outputPfoListName, m_outputVertexListName, m_particleIdList, m_replaceCurrentVertexList, and m_useOnlyAvailableClusters.
|
private |
Definition at line 32 of file CheatingPfoCreationAlgorithm.cc.
References CreatePfos(), GetMCParticleToClusterListMap(), lar_content::LArMCParticleHelper::GetMCPrimaryMap(), m_collapseToPrimaryMCParticles, m_inputClusterListNames, and m_mcParticleListName.
|
private |
Whether to add the start vertex to the cheated pfo.
Definition at line 75 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
Whether to collapse mc particle hierarchies to primary particles.
Definition at line 71 of file CheatingPfoCreationAlgorithm.h.
Referenced by GetMCParticleToClusterListMap(), ReadSettings(), and Run().
|
private |
The names of the input cluster lists.
Definition at line 67 of file CheatingPfoCreationAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
The mc particle list name.
Definition at line 72 of file CheatingPfoCreationAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
The min number of good hit types in the clusters collected for a given mc particle.
Definition at line 77 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
The min number of hits of a particular hit type in order to declare the hit type is good.
Definition at line 78 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
The output pfo list name.
Definition at line 68 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
The output vertex list name.
Definition at line 69 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
The list of particle ids to consider for pfo creation; will consider all ids if empty.
Definition at line 79 of file CheatingPfoCreationAlgorithm.h.
Referenced by GetMCParticleToClusterListMap(), and ReadSettings().
|
private |
Whether to replace current vertex list.
Definition at line 76 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
Whether to consider unavailable clusters when identifying cheated pfos.
Definition at line 74 of file CheatingPfoCreationAlgorithm.h.
Referenced by GetMCParticleToClusterListMap(), and ReadSettings().