Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::CheatingPfoCreationAlgorithm Class Reference

CheatingPfoCreationAlgorithm class. More...

#include "CheatingPfoCreationAlgorithm.h"

Inheritance diagram for lar_content::CheatingPfoCreationAlgorithm:
Collaboration diagram for lar_content::CheatingPfoCreationAlgorithm:

Public Member Functions

 CheatingPfoCreationAlgorithm ()
 Default constructor.
 
const std::string & GetType () const
 Get the type.
 
const std::string & GetInstanceName () const
 Get the instance name.
 
const PandoraGetPandora () const
 Get the associated pandora instance.
 

Protected Member Functions

virtual StatusCode Initialize ()
 Perform any operations that must occur after reading settings, but before running the process.
 
virtual StatusCode Reset ()
 Perform any operations when pandora is reset, typically at the end of each event.
 
StatusCode RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName)
 Register i) the pandora instance that will run the process and ii) the process type.
 

Protected Attributes

const Pandoram_pPandora
 The pandora object that will run the process.
 
std::string m_type
 The process type.
 
std::string m_instanceName
 The process instance name.
 

Private Types

typedef std::unordered_map< const pandora::MCParticle *, pandora::ClusterListMCParticleToClusterListMap
 
typedef std::map< pandora::HitType, unsigned int > HitTypeMap
 
typedef std::set< int > ParticleIdList
 

Private Member Functions

pandora::StatusCode Run ()
 Run the algorithm.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
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.
 
void CreatePfos (const MCParticleToClusterListMap &mcParticleToClusterListMap) const
 Create pfos corresponding to the details in a provided mc particle to cluster list map.
 
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 IsTrack (const pandora::MCParticle *const pMCParticle) const
 Determine whether an input MCParticle is a track-like particle.
 
bool IsShower (const pandora::MCParticle *const pMCParticle) const
 Determine whether an input MCParticle is a shower-like particle.
 

Private Attributes

pandora::StringVector m_inputClusterListNames
 The names of the input cluster lists.
 
std::string m_outputPfoListName
 The output pfo list name.
 
std::string m_outputVertexListName
 The output vertex list name.
 
bool m_collapseToPrimaryMCParticles
 Whether to collapse mc particle hierarchies to primary particles.
 
std::string m_mcParticleListName
 The mc particle list name.
 
bool m_useOnlyAvailableClusters
 Whether to consider unavailable clusters when identifying cheated pfos.
 
bool m_addVertices
 Whether to add the start vertex to the cheated pfo.
 
bool m_replaceCurrentVertexList
 Whether to replace current vertex list.
 
unsigned int m_minGoodHitTypes
 The min number of good hit types in the clusters collected for a given mc particle.
 
unsigned int m_nHitsForGoodHitType
 The min number of hits of a particular hit type in order to declare the hit type is good.
 
ParticleIdList m_particleIdList
 The list of particle ids to consider for pfo creation; will consider all ids if empty.
 

Detailed Description

Member Typedef Documentation

◆ HitTypeMap

Definition at line 82 of file CheatingPfoCreationAlgorithm.h.

◆ MCParticleToClusterListMap

◆ ParticleIdList

Definition at line 83 of file CheatingPfoCreationAlgorithm.h.

Constructor & Destructor Documentation

◆ CheatingPfoCreationAlgorithm()

lar_content::CheatingPfoCreationAlgorithm::CheatingPfoCreationAlgorithm ( )

Default constructor.

Definition at line 20 of file CheatingPfoCreationAlgorithm.cc.

Member Function Documentation

◆ CreatePfos()

void lar_content::CheatingPfoCreationAlgorithm::CreatePfos ( const MCParticleToClusterListMap mcParticleToClusterListMap) const
private

Create pfos corresponding to the details in a provided mc particle to cluster list map.

Parameters
mcParticleToClusterListMapthe mc particle to cluster list map

Definition at line 102 of file CheatingPfoCreationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInstanceName()

const std::string & pandora::Process::GetInstanceName ( ) const
inlineinherited

Get the instance name.

Returns
The instance name

Definition at line 109 of file Process.h.

◆ GetMCParticleToClusterListMap()

void lar_content::CheatingPfoCreationAlgorithm::GetMCParticleToClusterListMap ( const pandora::ClusterList *const  pClusterList,
const LArMCParticleHelper::MCRelationMap mcPrimaryMap,
MCParticleToClusterListMap mcParticleToClusterListMap 
) const
private

Get a map relating mc particles to a list of daughter clusters.

Parameters
pClusterListaddress of a cluster list
mcPrimaryMapthe mapping between mc particles and their parents
mcParticleToClusterListMapto receive the populated mc particle to cluster list map

Definition at line 67 of file CheatingPfoCreationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNHitTypesAboveThreshold()

unsigned int lar_content::CheatingPfoCreationAlgorithm::GetNHitTypesAboveThreshold ( const pandora::ClusterList clusterList,
const unsigned int  nHitsThreshold 
) const
private

Get the number of hit types containing more than a specified number of hits.

Parameters
clusterListthe cluster list, consider all hits in clusters in this list
nHitsThresholdthe threshold number of hits of a specified hit type
Returns
the number of good hit types

Definition at line 179 of file CheatingPfoCreationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPandora()

const Pandora & pandora::Process::GetPandora ( ) const
inlineinherited

Get the associated pandora instance.

Returns
the associated pandora instance

Definition at line 116 of file Process.h.

◆ GetType()

const std::string & pandora::Process::GetType ( ) const
inlineinherited

Get the type.

Returns
The type

Definition at line 102 of file Process.h.

◆ Initialize()

StatusCode pandora::Process::Initialize ( )
inlineprotectedvirtualinherited

Perform any operations that must occur after reading settings, but before running the process.

Reimplemented in lar_content::BdtBeamParticleIdTool, lar_content::BeamParticleIdTool, lar_content::CosmicRayTaggingTool, lar_content::EventReadingAlgorithm, lar_content::EventWritingAlgorithm, lar_content::LArPseudoLayerPlugin, lar_content::LArRotationalTransformationPlugin, EventReadingAlgorithm, and EventWritingAlgorithm.

Definition at line 126 of file Process.h.

Here is the caller graph for this function:

◆ IsShower()

bool lar_content::CheatingPfoCreationAlgorithm::IsShower ( const pandora::MCParticle *const  pMCParticle) const
private

Determine whether an input MCParticle is a shower-like particle.

Parameters
pMCParticlethe input MCParticle
Returns
whether an input MCParticle is a shower-like particle

Definition at line 210 of file CheatingPfoCreationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsTrack()

bool lar_content::CheatingPfoCreationAlgorithm::IsTrack ( const pandora::MCParticle *const  pMCParticle) const
private

Determine whether an input MCParticle is a track-like particle.

Parameters
pMCParticlethe input MCParticle
Returns
whether an input MCParticle is a track-like particle

Definition at line 201 of file CheatingPfoCreationAlgorithm.cc.

Here is the call graph for this function:

◆ ReadSettings()

StatusCode lar_content::CheatingPfoCreationAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

Definition at line 219 of file CheatingPfoCreationAlgorithm.cc.

Here is the call graph for this function:

◆ RegisterDetails()

StatusCode pandora::Process::RegisterDetails ( const Pandora *const  pPandora,
const std::string &  type,
const std::string &  instanceName 
)
inlineprotectedinherited

Register i) the pandora instance that will run the process and ii) the process type.

Parameters
pPandoraaddress of the pandora object that will run the process
typethe process type
instanceNamethe process instance name

Definition at line 146 of file Process.h.

Here is the caller graph for this function:

◆ Reset()

StatusCode pandora::Process::Reset ( )
inlineprotectedvirtualinherited

Perform any operations when pandora is reset, typically at the end of each event.

Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.

Definition at line 133 of file Process.h.

Here is the caller graph for this function:

◆ Run()

StatusCode lar_content::CheatingPfoCreationAlgorithm::Run ( )
privatevirtual

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 32 of file CheatingPfoCreationAlgorithm.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_addVertices

bool lar_content::CheatingPfoCreationAlgorithm::m_addVertices
private

Whether to add the start vertex to the cheated pfo.

Definition at line 93 of file CheatingPfoCreationAlgorithm.h.

◆ m_collapseToPrimaryMCParticles

bool lar_content::CheatingPfoCreationAlgorithm::m_collapseToPrimaryMCParticles
private

Whether to collapse mc particle hierarchies to primary particles.

Definition at line 89 of file CheatingPfoCreationAlgorithm.h.

◆ m_inputClusterListNames

pandora::StringVector lar_content::CheatingPfoCreationAlgorithm::m_inputClusterListNames
private

The names of the input cluster lists.

Definition at line 85 of file CheatingPfoCreationAlgorithm.h.

◆ m_instanceName

std::string pandora::Process::m_instanceName
protectedinherited

The process instance name.

Definition at line 89 of file Process.h.

◆ m_mcParticleListName

std::string lar_content::CheatingPfoCreationAlgorithm::m_mcParticleListName
private

The mc particle list name.

Definition at line 90 of file CheatingPfoCreationAlgorithm.h.

◆ m_minGoodHitTypes

unsigned int lar_content::CheatingPfoCreationAlgorithm::m_minGoodHitTypes
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.

◆ m_nHitsForGoodHitType

unsigned int lar_content::CheatingPfoCreationAlgorithm::m_nHitsForGoodHitType
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.

◆ m_outputPfoListName

std::string lar_content::CheatingPfoCreationAlgorithm::m_outputPfoListName
private

The output pfo list name.

Definition at line 86 of file CheatingPfoCreationAlgorithm.h.

◆ m_outputVertexListName

std::string lar_content::CheatingPfoCreationAlgorithm::m_outputVertexListName
private

The output vertex list name.

Definition at line 87 of file CheatingPfoCreationAlgorithm.h.

◆ m_particleIdList

ParticleIdList lar_content::CheatingPfoCreationAlgorithm::m_particleIdList
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.

◆ m_pPandora

const Pandora* pandora::Process::m_pPandora
protectedinherited

The pandora object that will run the process.

Definition at line 87 of file Process.h.

◆ m_replaceCurrentVertexList

bool lar_content::CheatingPfoCreationAlgorithm::m_replaceCurrentVertexList
private

Whether to replace current vertex list.

Definition at line 94 of file CheatingPfoCreationAlgorithm.h.

◆ m_type

std::string pandora::Process::m_type
protectedinherited

The process type.

Definition at line 88 of file Process.h.

◆ m_useOnlyAvailableClusters

bool lar_content::CheatingPfoCreationAlgorithm::m_useOnlyAvailableClusters
private

Whether to consider unavailable clusters when identifying cheated pfos.

Definition at line 92 of file CheatingPfoCreationAlgorithm.h.


The documentation for this class was generated from the following files: