LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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... | |
bool | IsTrack (const pandora::MCParticle *const pMCParticle) const |
Determine whether an input MCParticle is a track-like particle. More... | |
bool | IsShower (const pandora::MCParticle *const pMCParticle) const |
Determine whether an input MCParticle is a shower-like particle. 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 82 of file CheatingPfoCreationAlgorithm.h.
|
private |
Definition at line 35 of file CheatingPfoCreationAlgorithm.h.
|
private |
Definition at line 83 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 102 of file CheatingPfoCreationAlgorithm.cc.
References GetNHitTypesAboveThreshold(), IsShower(), 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 179 of file CheatingPfoCreationAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType().
Referenced by CreatePfos().
|
private |
Determine whether an input MCParticle is a shower-like particle.
pMCParticle | the input MCParticle |
Definition at line 210 of file CheatingPfoCreationAlgorithm.cc.
References util::abs().
Referenced by CreatePfos().
|
private |
Determine whether an input MCParticle is a track-like particle.
pMCParticle | the input MCParticle |
Definition at line 201 of file CheatingPfoCreationAlgorithm.cc.
References util::abs().
|
private |
Definition at line 219 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 93 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
Whether to collapse mc particle hierarchies to primary particles.
Definition at line 89 of file CheatingPfoCreationAlgorithm.h.
Referenced by GetMCParticleToClusterListMap(), ReadSettings(), and Run().
|
private |
The names of the input cluster lists.
Definition at line 85 of file CheatingPfoCreationAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
The mc particle list name.
Definition at line 90 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 95 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 96 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
The output pfo list name.
Definition at line 86 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
The output vertex list name.
Definition at line 87 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 97 of file CheatingPfoCreationAlgorithm.h.
Referenced by GetMCParticleToClusterListMap(), and ReadSettings().
|
private |
Whether to replace current vertex list.
Definition at line 94 of file CheatingPfoCreationAlgorithm.h.
Referenced by CreatePfos(), and ReadSettings().
|
private |
Whether to consider unavailable clusters when identifying cheated pfos.
Definition at line 92 of file CheatingPfoCreationAlgorithm.h.
Referenced by GetMCParticleToClusterListMap(), and ReadSettings().