LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::LArHierarchyHelper Class Reference

LArHierarchyHelper class. More...

#include "LArHierarchyHelper.h"

Classes

class  FoldingParameters
 FoldingParameters class. More...
 
class  MatchInfo
 MatcheInfo class. More...
 
class  MCHierarchy
 MCHierarchy class. More...
 
class  MCMatches
 MCMatches class. More...
 
class  QualityCuts
 QualityCuts class. More...
 
class  RecoHierarchy
 RecoHierarchy class. More...
 

Public Types

typedef std::vector< MCMatchesMCMatchesVector
 
typedef std::map< const pandora::MCParticle *, MCMatchesVectorInteractionInfo
 

Static Public Member Functions

static void FillMCHierarchy (const pandora::MCParticleList &mcParticleList, const pandora::CaloHitList &caloHitList, const FoldingParameters &foldParameters, MCHierarchy &hierarchy)
 Fill an MC hierarchy based on the specified folding criteria (see MCHierarchy::FillHierarchy for details) More...
 
static void FillRecoHierarchy (const pandora::PfoList &pfoList, const FoldingParameters &foldParameters, RecoHierarchy &hierarchy)
 Fill a reconstructed hierarchy based on the specified folding criteria (see RecoHierarchy::FillHierarchy for details) More...
 
static void MatchHierarchies (MatchInfo &matchInfo)
 Finds the matches between reconstructed and MC hierarchies. More...
 

Private Types

typedef std::set< const pandora::MCParticle * > MCParticleSet
 
typedef std::set< const pandora::ParticleFlowObject * > PfoSet
 

Static Private Member Functions

static void GetMCPrimaries (const pandora::MCParticle *pRoot, MCParticleSet &primaries)
 Retrieves the primary MC particles from a list and returns the root (neutrino) for hierarchy, if it exists. More...
 
static void GetRecoPrimaries (const pandora::ParticleFlowObject *pRoot, PfoSet &primaries)
 Retrieves the primary PFOs from a list and returns the root (neutrino) for hierarchy, if it exists. More...
 

Detailed Description

LArHierarchyHelper class.

Definition at line 24 of file LArHierarchyHelper.h.

Member Typedef Documentation

typedef std::map<const pandora::MCParticle *, MCMatchesVector> lar_content::LArHierarchyHelper::InteractionInfo

Definition at line 732 of file LArHierarchyHelper.h.

Definition at line 731 of file LArHierarchyHelper.h.

typedef std::set<const pandora::MCParticle *> lar_content::LArHierarchyHelper::MCParticleSet
private

Definition at line 885 of file LArHierarchyHelper.h.

typedef std::set<const pandora::ParticleFlowObject *> lar_content::LArHierarchyHelper::PfoSet
private

Definition at line 886 of file LArHierarchyHelper.h.

Member Function Documentation

void lar_content::LArHierarchyHelper::FillMCHierarchy ( const pandora::MCParticleList &  mcParticleList,
const pandora::CaloHitList &  caloHitList,
const FoldingParameters foldParameters,
MCHierarchy hierarchy 
)
static

Fill an MC hierarchy based on the specified folding criteria (see MCHierarchy::FillHierarchy for details)

Parameters
mcParticleListThe MCParticle list to use to fill this hierarchy
caloHitListThe list of CaloHits to use to fill this hierarchy
foldParametersThe folding parameters to use for the hierarchy
hierarchyThe output MC hierarchy

Definition at line 1587 of file LArHierarchyHelper.cc.

References lar_content::LArHierarchyHelper::MCHierarchy::FillHierarchy().

Referenced by lar_content::HierarchyMonitoringAlgorithm::Run(), and lar_content::HierarchyValidationAlgorithm::Run().

1589 {
1590  hierarchy.FillHierarchy(mcParticleList, caloHitList, foldParameters);
1591 }
void lar_content::LArHierarchyHelper::FillRecoHierarchy ( const pandora::PfoList &  pfoList,
const FoldingParameters foldParameters,
RecoHierarchy hierarchy 
)
static

Fill a reconstructed hierarchy based on the specified folding criteria (see RecoHierarchy::FillHierarchy for details)

Parameters
pfoListThe ParticleFlowObject list to use to fill this hierarchy
foldParametersThe folding parameters to use for the hierarchy
hierarchyThe output reconstructed hierarchy

Definition at line 1595 of file LArHierarchyHelper.cc.

References lar_content::LArHierarchyHelper::RecoHierarchy::FillHierarchy().

Referenced by lar_content::HierarchyMonitoringAlgorithm::Run(), and lar_content::HierarchyValidationAlgorithm::Run().

1596 {
1597  hierarchy.FillHierarchy(pfoList, foldParameters);
1598 }
void lar_content::LArHierarchyHelper::GetMCPrimaries ( const pandora::MCParticle *  pRoot,
MCParticleSet primaries 
)
staticprivate

Retrieves the primary MC particles from a list and returns the root (neutrino) for hierarchy, if it exists.

Parameters
pRootThe root MC particle (e.g. neutrino) for which primaries should be collected
primariesThe output set of primary MC particles

Definition at line 1610 of file LArHierarchyHelper.cc.

References lar_content::LArMCParticleHelper::GetFirstVisibleMCParticles().

Referenced by lar_content::LArHierarchyHelper::MCHierarchy::FillHierarchy().

1611 {
1612  try
1613  {
1614  MCParticleList visible;
1616  // Check if we still need to use sets here
1617  for (const MCParticle *const pMCParticle : visible)
1618  primaries.insert(pMCParticle);
1619  }
1620  catch (const StatusCodeException &)
1621  {
1622  if (pRoot->GetParticleId() != 111 && pRoot->GetParticleId() < 1e9)
1623  std::cout << "LArHierarchyHelper::MCHierarchy::FillHierarchy: MC particle with PDG code " << pRoot->GetParticleId()
1624  << " at address " << pRoot << " has no associated primary particle" << std::endl;
1625  }
1626 }
static void GetFirstVisibleMCParticles(const pandora::MCParticle *const pRoot, pandora::MCParticleList &visibleParticleList)
Get the first visible MC particles given a root particle. For example, given a neutrino this would re...
void lar_content::LArHierarchyHelper::GetRecoPrimaries ( const pandora::ParticleFlowObject *  pRoot,
PfoSet primaries 
)
staticprivate

Retrieves the primary PFOs from a list and returns the root (neutrino) for hierarchy, if it exists.

Parameters
pRootThe root particle flow object (e.g. neutrino) for which primaries should be collected
primariesThe output set of primary PFOs

Definition at line 1628 of file LArHierarchyHelper.cc.

References lar_content::LArPfoHelper::IsNeutrino().

Referenced by lar_content::LArHierarchyHelper::RecoHierarchy::FillHierarchy().

1629 {
1630  if (LArPfoHelper::IsNeutrino(pRoot))
1631  {
1632  const PfoList &children{pRoot->GetDaughterPfoList()};
1633  // Check if we still need to use sets here
1634  for (const ParticleFlowObject *const pPfo : children)
1635  primaries.insert(pPfo);
1636  }
1637  else
1638  {
1639  // Might want different handling here for test beam and cosmic ray particles, but for now, just treat
1640  // a non-neutrino root node as something to be stored in the primaries set directly
1641  primaries.insert(pRoot);
1642  }
1643 }
static bool IsNeutrino(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a neutrino or (antineutrino)
void lar_content::LArHierarchyHelper::MatchHierarchies ( MatchInfo matchInfo)
static

Finds the matches between reconstructed and MC hierarchies.

Parameters
matchInfoThe output match information

Definition at line 1602 of file LArHierarchyHelper.cc.

References lar_content::LArHierarchyHelper::MatchInfo::Match().

Referenced by lar_content::HierarchyMonitoringAlgorithm::Run(), and lar_content::HierarchyValidationAlgorithm::Run().

1603 {
1604  matchInfo.Match();
1605 }

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