Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_pandora::LArPandoraOutput Class Reference

#include "LArPandoraOutput.h"

Classes

class  Settings
 Settings class. More...
 

Public Types

typedef std::vector< size_t > IdVector
 
typedef std::map< size_t, IdVectorIdToIdVectorMap
 
typedef std::map< const pandora::CaloHit *, art::Ptr< recob::Hit > > CaloHitToArtHitMap
 
typedef std::unique_ptr< std::vector< recob::PFParticle > > PFParticleCollection
 
typedef std::unique_ptr< std::vector< recob::Vertex > > VertexCollection
 
typedef std::unique_ptr< std::vector< recob::Cluster > > ClusterCollection
 
typedef std::unique_ptr< std::vector< recob::SpacePoint > > SpacePointCollection
 
typedef std::unique_ptr< std::vector< anab::T0 > > T0Collection
 
typedef std::unique_ptr< std::vector< larpandoraobj::PFParticleMetadata > > PFParticleMetadataCollection
 
typedef std::unique_ptr< std::vector< recob::Slice > > SliceCollection
 
typedef std::unique_ptr< art::Assns< recob::PFParticle, larpandoraobj::PFParticleMetadata > > PFParticleToMetadataCollection
 
typedef std::unique_ptr< art::Assns< recob::PFParticle, recob::SpacePoint > > PFParticleToSpacePointCollection
 
typedef std::unique_ptr< art::Assns< recob::PFParticle, recob::Cluster > > PFParticleToClusterCollection
 
typedef std::unique_ptr< art::Assns< recob::PFParticle, recob::Vertex > > PFParticleToVertexCollection
 
typedef std::unique_ptr< art::Assns< recob::PFParticle, anab::T0 > > PFParticleToT0Collection
 
typedef std::unique_ptr< art::Assns< recob::PFParticle, recob::Slice > > PFParticleToSliceCollection
 
typedef std::unique_ptr< art::Assns< recob::Cluster, recob::Hit > > ClusterToHitCollection
 
typedef std::unique_ptr< art::Assns< recob::SpacePoint, recob::Hit > > SpacePointToHitCollection
 
typedef std::unique_ptr< art::Assns< recob::Slice, recob::Hit > > SliceToHitCollection
 

Static Public Member Functions

static void ProduceArtOutput (const Settings &settings, const IdToHitMap &idToHitMap, art::Event &evt)
 Convert the Pandora PFOs into ART clusters and write into ART event.
 
static bool GetPandoraInstance (const pandora::Pandora *const pPrimaryPandora, const std::string &name, const pandora::Pandora *&pPandoraInstance)
 Get the address of a pandora instance with a given name.
 
static void GetPandoraSlices (const pandora::Pandora *const pPrimaryPandora, pandora::PfoVector &slicePfos)
 Get the slice pfos - one pfo per slice.
 
static bool IsClearCosmic (const pandora::ParticleFlowObject *const pPfo)
 Check if the input pfo is an unambiguous cosmic ray.
 
static bool IsFromSlice (const pandora::ParticleFlowObject *const pPfo)
 Check if the input pfo is from a slice.
 
static unsigned int GetSliceIndex (const pandora::ParticleFlowObject *const pPfo)
 Get the index of the slice from which this pfo was produced.
 
static pandora::PfoVector CollectPfos (const pandora::Pandora *const pPrimaryPandora)
 Collect the current pfos (including all downstream pfos) from the master pandora instance.
 
static pandora::PfoVector CollectAllPfoOutcomes (const pandora::Pandora *const pPrimaryPandora)
 Collect the pfos (including all downstream pfos) from the master and daughter pandora instances.
 
static void CollectPfos (const pandora::PfoList &parentPfoList, pandora::PfoVector &pfoVector)
 Collect a sorted list of all downstream pfos of an input list of parent.
 
static pandora::VertexVector CollectVertices (const pandora::PfoVector &pfoVector, IdToIdVectorMap &pfoToVerticesMap, std::function< const pandora::Vertex *const(const pandora::ParticleFlowObject *const)> fCriteria)
 Collect all vertices contained in the input pfo list Order is guaranteed provided pfoVector is ordered.
 
static pandora::ClusterList CollectClusters (const pandora::PfoVector &pfoVector, IdToIdVectorMap &pfoToClustersMap)
 Collect a sorted list of all 2D clusters contained in the input pfo list Order is guaranteed provided pfoVector is ordered.
 
static void Collect3DHits (const pandora::ParticleFlowObject *const pPfo, pandora::CaloHitVector &caloHits)
 Collect a sorted vector of all 3D hits in the input pfo.
 
static pandora::CaloHitList Collect3DHits (const pandora::PfoVector &pfoVector, IdToIdVectorMap &pfoToThreeDHitsMap)
 Collect a sorted list of all 3D hits contained in the input pfo list Order is guaranteed provided pfoVector is ordered.
 
template<typename T >
static size_t GetId (const T *const pT, const std::list< const T * > &tList)
 Find the index of an input object in an input list. Throw an exception if it doesn't exist.
 
template<typename T >
static size_t GetId (const T *const pT, const std::vector< const T * > &tVector)
 Find the index of an input object in an input vector. Throw an exception if it doesn't exist.
 
static void GetPandoraToArtHitMap (const pandora::ClusterList &clusterList, const pandora::CaloHitList &threeDHitList, const IdToHitMap &idToHitMap, CaloHitToArtHitMap &pandoraHitToArtHitMap)
 Collect all 2D and 3D hits that were used / produced in the reconstruction and map them to their corresponding ART hit.
 
static art::Ptr< recob::Hit > GetHit (const IdToHitMap &idToHitMap, const pandora::CaloHit *const pCaloHit)
 Look up ART hit from an input Pandora hit.
 
static void BuildVertices (const pandora::VertexVector &vertexVector, VertexCollection &outputVertices)
 Convert pandora vertices to ART vertices and add them to the output vector.
 
static void BuildSpacePoints (const art::Event &event, const std::string &instanceLabel, const pandora::CaloHitList &threeDHitList, const CaloHitToArtHitMap &pandoraHitToArtHitMap, SpacePointCollection &outputSpacePoints, SpacePointToHitCollection &outputSpacePointsToHits)
 Convert pandora 3D hits to ART spacepoints and add them to the output vector Create the associations between spacepoints and hits.
 
static void BuildClusters (const art::Event &event, const std::string &instanceLabel, const pandora::ClusterList &clusterList, const CaloHitToArtHitMap &pandoraHitToArtHitMap, const IdToIdVectorMap &pfoToClustersMap, ClusterCollection &outputClusters, ClusterToHitCollection &outputClustersToHits, IdToIdVectorMap &pfoToArtClustersMap)
 Convert pandora 2D clusters to ART clusters and add them to the output vector Create the associations between clusters and hits. For multiple drift volumes, each pandora cluster can correspond to multiple ART clusters.
 
static void BuildPFParticles (const art::Event &event, const std::string &instanceLabel, const pandora::PfoVector &pfoVector, const IdToIdVectorMap &pfoToVerticesMap, const IdToIdVectorMap &pfoToThreeDHitsMap, const IdToIdVectorMap &pfoToArtClustersMap, PFParticleCollection &outputParticles, PFParticleToVertexCollection &outputParticlesToVertices, PFParticleToSpacePointCollection &outputParticlesToSpacePoints, PFParticleToClusterCollection &outputParticlesToClusters)
 Convert between pfos and PFParticles and add them to the output vector Create the associations between PFParticle and vertices, spacepoints and clusters.
 
static void AssociateAdditionalVertices (const art::Event &event, const std::string &instanceLabel, const pandora::PfoVector &pfoVector, const IdToIdVectorMap &pfoToVerticesMap, PFParticleToVertexCollection &outputParticlesToVertices)
 Convert Create the associations between pre-existing PFParticle and additional vertices.
 
static void BuildParticleMetadata (const art::Event &event, const std::string &instanceLabel, const pandora::PfoVector &pfoVector, PFParticleMetadataCollection &outputParticleMetadata, PFParticleToMetadataCollection &outputParticlesToMetadata)
 Build metadata objects from a list of input pfos.
 
static void BuildSlices (const Settings &settings, const pandora::Pandora *const pPrimaryPandora, const art::Event &event, const std::string &instanceLabel, const pandora::PfoVector &pfoVector, const IdToHitMap &idToHitMap, SliceCollection &outputSlices, PFParticleToSliceCollection &outputParticlesToSlices, SliceToHitCollection &outputSlicesToHits)
 Build slices - collections of hits which each describe a single particle hierarchy.
 
static unsigned int BuildDummySlice (SliceCollection &outputSlices)
 Build a new slice object with dummy information.
 
static void CopyAllHitsToSingleSlice (const Settings &settings, const art::Event &event, const std::string &instanceLabel, const pandora::PfoVector &pfoVector, const IdToHitMap &idToHitMap, SliceCollection &outputSlices, PFParticleToSliceCollection &outputParticlesToSlices, SliceToHitCollection &outputSlicesToHits)
 Ouput a single slice containing all of the input hits.
 
static unsigned int BuildSlice (const pandora::ParticleFlowObject *const pParentPfo, const art::Event &event, const std::string &instanceLabel, const IdToHitMap &idToHitMap, SliceCollection &outputSlices, SliceToHitCollection &outputSlicesToHits)
 Build a new slice object from a PFO, this can be a top-level parent in a hierarchy or a "slice PFO" from the slicing instance.
 
static void BuildT0s (const art::Event &event, const std::string &instanceLabel, const pandora::PfoVector &pfoVector, T0Collection &outputT0s, PFParticleToT0Collection &outputParticlesToT0s)
 Calculate the T0 of each pfos and add them to the output vector Create the associations between PFParticle and T0s.
 
static recob::Vertex BuildVertex (const pandora::Vertex *const pVertex, const size_t vertexId)
 Convert from a pandora vertex to an ART vertex.
 
static recob::SpacePoint BuildSpacePoint (const pandora::CaloHit *const pCaloHit, const size_t spacePointId)
 Convert from a pandora 3D hit to an ART spacepoint.
 
static void GetHitsInCluster (const pandora::Cluster *const pCluster, pandora::CaloHitVector &sortedHits)
 Collect a sorted list of all 2D hits in a cluster.
 
static std::vector< recob::Cluster > BuildClusters (util::GeometryUtilities const &gser, const pandora::Cluster *const pCluster, const pandora::ClusterList &clusterList, const CaloHitToArtHitMap &pandoraHitToArtHitMap, IdToIdVectorMap &pandoraClusterToArtClustersMap, std::vector< HitVector > &hitVectors, size_t &nextId, cluster::ClusterParamsAlgBase &algo)
 Convert from a pandora 2D cluster to a vector of ART clusters (produce multiple if the cluster is split over drift volumes)
 
static recob::Cluster BuildCluster (util::GeometryUtilities const &gser, const size_t id, const HitVector &hitVector, const HitList &isolatedHits, cluster::ClusterParamsAlgBase &algo)
 Build an ART cluster from an input vector of ART hits.
 
static recob::PFParticle BuildPFParticle (const pandora::ParticleFlowObject *const pPfo, const size_t pfoId, const pandora::PfoVector &pfoVector)
 Convert from a pfo to and ART PFParticle.
 
static bool BuildT0 (const art::Event &event, const pandora::ParticleFlowObject *const pPfo, const pandora::PfoVector &pfoVector, size_t &nextId, anab::T0 &t0)
 If required, build a T0 for the input pfo.
 
template<typename A , typename B >
static void AddAssociation (const art::Event &event, const std::string &instanceLabel, const size_t idA, const size_t idB, std::unique_ptr< art::Assns< A, B > > &association)
 Add an association between objects with two given ids.
 
template<typename A , typename B >
static void AddAssociation (const art::Event &event, const std::string &instanceLabel, const size_t idA, const IdToIdVectorMap &aToBMap, std::unique_ptr< art::Assns< A, B > > &association)
 Add associations between input objects.
 
template<typename A , typename B >
static void AddAssociation (const art::Event &event, const std::string &instanceLabel, const size_t idA, const std::vector< art::Ptr< B > > &bVector, std::unique_ptr< art::Assns< A, B > > &association)
 Add associations between input objects.
 

Detailed Description

Definition at line 46 of file LArPandoraOutput.h.

Member Typedef Documentation

◆ CaloHitToArtHitMap

typedef std::map<const pandora::CaloHit*, art::Ptr<recob::Hit> > lar_pandora::LArPandoraOutput::CaloHitToArtHitMap

Definition at line 50 of file LArPandoraOutput.h.

◆ ClusterCollection

typedef std::unique_ptr<std::vector<recob::Cluster> > lar_pandora::LArPandoraOutput::ClusterCollection

Definition at line 54 of file LArPandoraOutput.h.

◆ ClusterToHitCollection

typedef std::unique_ptr<art::Assns<recob::Cluster, recob::Hit> > lar_pandora::LArPandoraOutput::ClusterToHitCollection

Definition at line 73 of file LArPandoraOutput.h.

◆ IdToIdVectorMap

Definition at line 49 of file LArPandoraOutput.h.

◆ IdVector

typedef std::vector<size_t> lar_pandora::LArPandoraOutput::IdVector

Definition at line 48 of file LArPandoraOutput.h.

◆ PFParticleCollection

typedef std::unique_ptr<std::vector<recob::PFParticle> > lar_pandora::LArPandoraOutput::PFParticleCollection

Definition at line 52 of file LArPandoraOutput.h.

◆ PFParticleMetadataCollection

typedef std::unique_ptr<std::vector<larpandoraobj::PFParticleMetadata> > lar_pandora::LArPandoraOutput::PFParticleMetadataCollection

Definition at line 58 of file LArPandoraOutput.h.

◆ PFParticleToClusterCollection

typedef std::unique_ptr<art::Assns<recob::PFParticle, recob::Cluster> > lar_pandora::LArPandoraOutput::PFParticleToClusterCollection

Definition at line 66 of file LArPandoraOutput.h.

◆ PFParticleToMetadataCollection

typedef std::unique_ptr<art::Assns<recob::PFParticle, larpandoraobj::PFParticleMetadata> > lar_pandora::LArPandoraOutput::PFParticleToMetadataCollection

Definition at line 62 of file LArPandoraOutput.h.

◆ PFParticleToSliceCollection

typedef std::unique_ptr<art::Assns<recob::PFParticle, recob::Slice> > lar_pandora::LArPandoraOutput::PFParticleToSliceCollection

Definition at line 71 of file LArPandoraOutput.h.

◆ PFParticleToSpacePointCollection

typedef std::unique_ptr<art::Assns<recob::PFParticle, recob::SpacePoint> > lar_pandora::LArPandoraOutput::PFParticleToSpacePointCollection

Definition at line 64 of file LArPandoraOutput.h.

◆ PFParticleToT0Collection

typedef std::unique_ptr<art::Assns<recob::PFParticle, anab::T0> > lar_pandora::LArPandoraOutput::PFParticleToT0Collection

Definition at line 69 of file LArPandoraOutput.h.

◆ PFParticleToVertexCollection

typedef std::unique_ptr<art::Assns<recob::PFParticle, recob::Vertex> > lar_pandora::LArPandoraOutput::PFParticleToVertexCollection

Definition at line 68 of file LArPandoraOutput.h.

◆ SliceCollection

typedef std::unique_ptr<std::vector<recob::Slice> > lar_pandora::LArPandoraOutput::SliceCollection

Definition at line 59 of file LArPandoraOutput.h.

◆ SliceToHitCollection

typedef std::unique_ptr<art::Assns<recob::Slice, recob::Hit> > lar_pandora::LArPandoraOutput::SliceToHitCollection

Definition at line 75 of file LArPandoraOutput.h.

◆ SpacePointCollection

typedef std::unique_ptr<std::vector<recob::SpacePoint> > lar_pandora::LArPandoraOutput::SpacePointCollection

Definition at line 55 of file LArPandoraOutput.h.

◆ SpacePointToHitCollection

typedef std::unique_ptr<art::Assns<recob::SpacePoint, recob::Hit> > lar_pandora::LArPandoraOutput::SpacePointToHitCollection

Definition at line 74 of file LArPandoraOutput.h.

◆ T0Collection

typedef std::unique_ptr<std::vector<anab::T0> > lar_pandora::LArPandoraOutput::T0Collection

Definition at line 56 of file LArPandoraOutput.h.

◆ VertexCollection

typedef std::unique_ptr<std::vector<recob::Vertex> > lar_pandora::LArPandoraOutput::VertexCollection

Definition at line 53 of file LArPandoraOutput.h.

Member Function Documentation

◆ AddAssociation() [1/3]

template<typename A , typename B >
void lar_pandora::LArPandoraOutput::AddAssociation ( const art::Event &  event,
const std::string &  instanceLabel,
const size_t  idA,
const IdToIdVectorMap aToBMap,
std::unique_ptr< art::Assns< A, B > > &  association 
)
inlinestatic

Add associations between input objects.

Parameters
eventthe ART event
idAthe id of an object of type A
aToBMapthe input mapping from IDs of objects of type A to IDs of objects of type B to associate
associationthe output association to update

Definition at line 671 of file LArPandoraOutput.h.

◆ AddAssociation() [2/3]

template<typename A , typename B >
void lar_pandora::LArPandoraOutput::AddAssociation ( const art::Event &  event,
const std::string &  instanceLabel,
const size_t  idA,
const size_t  idB,
std::unique_ptr< art::Assns< A, B > > &  association 
)
inlinestatic

Add an association between objects with two given ids.

Parameters
eventthe ART event
idAthe id of an object of type A
idBthe id of an object of type B to associate to the first object
associationthe output association to update

Definition at line 653 of file LArPandoraOutput.h.

Here is the caller graph for this function:

◆ AddAssociation() [3/3]

template<typename A , typename B >
void lar_pandora::LArPandoraOutput::AddAssociation ( const art::Event &  event,
const std::string &  instanceLabel,
const size_t  idA,
const std::vector< art::Ptr< B > > &  bVector,
std::unique_ptr< art::Assns< A, B > > &  association 
)
inlinestatic

Add associations between input objects.

Parameters
eventthe ART event
idAthe id of an object of type A
bVectorthe input vector of IDs of objects of type B to associate
associationthe output association to update

Definition at line 695 of file LArPandoraOutput.h.

◆ AssociateAdditionalVertices()

void lar_pandora::LArPandoraOutput::AssociateAdditionalVertices ( const art::Event &  event,
const std::string &  instanceLabel,
const pandora::PfoVector pfoVector,
const IdToIdVectorMap pfoToVerticesMap,
PFParticleToVertexCollection outputParticlesToVertices 
)
static

Convert Create the associations between pre-existing PFParticle and additional vertices.

Parameters
eventthe art event
instanceLabelinstance label
pfoVectorthe input list of pfos to convert
pfoToVerticesMapthe input mapping from pfo ID to vertex IDs
outputParticlesToVerticesthe output associations between PFParticles and vertices

Definition at line 713 of file LArPandoraOutput.cxx.

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

◆ BuildCluster()

recob::Cluster lar_pandora::LArPandoraOutput::BuildCluster ( util::GeometryUtilities const &  gser,
const size_t  id,
const HitVector hitVector,
const HitList isolatedHits,
cluster::ClusterParamsAlgBase &  algo 
)
static

Build an ART cluster from an input vector of ART hits.

Parameters
idthe id code for the cluster
hitVectorthe input vector of hits
isolatedHitsthe input list of isolated hits
algoalgorithm set to fill cluster members
Returns
the ART cluster

If you don't know which algorithm to pick, StandardClusterParamsAlg is a good default. The hits that are isolated (that is, present in isolatedHits) are not fed to the cluster parameter algorithms.

Definition at line 1049 of file LArPandoraOutput.cxx.

Here is the caller graph for this function:

◆ BuildClusters() [1/2]

void lar_pandora::LArPandoraOutput::BuildClusters ( const art::Event &  event,
const std::string &  instanceLabel,
const pandora::ClusterList clusterList,
const CaloHitToArtHitMap pandoraHitToArtHitMap,
const IdToIdVectorMap pfoToClustersMap,
ClusterCollection outputClusters,
ClusterToHitCollection outputClustersToHits,
IdToIdVectorMap pfoToArtClustersMap 
)
static

Convert pandora 2D clusters to ART clusters and add them to the output vector Create the associations between clusters and hits. For multiple drift volumes, each pandora cluster can correspond to multiple ART clusters.

Parameters
eventthe art event
clusterListthe input list of 2D pandora clusters to convert
pandoraHitToArtHitMapthe input mapping from pandora hits to ART hits
pfoToClustersMapthe input mapping from pfo ID to cluster IDs
outputClustersthe output vector of clusters
outputClustersToHitsthe output associations between clusters and hits
pfoToArtClustersMapthe output mapping from pfo ID to art cluster ID

Definition at line 612 of file LArPandoraOutput.cxx.

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

◆ BuildClusters() [2/2]

std::vector< recob::Cluster > lar_pandora::LArPandoraOutput::BuildClusters ( util::GeometryUtilities const &  gser,
const pandora::Cluster *const  pCluster,
const pandora::ClusterList clusterList,
const CaloHitToArtHitMap pandoraHitToArtHitMap,
IdToIdVectorMap pandoraClusterToArtClustersMap,
std::vector< HitVector > &  hitVectors,
size_t &  nextId,
cluster::ClusterParamsAlgBase &  algo 
)
static

Convert from a pandora 2D cluster to a vector of ART clusters (produce multiple if the cluster is split over drift volumes)

Parameters
pClusterthe input cluster
clusterListthe input list of clusters
pandoraHitToArtHitMapthe input mapping from pandora hits to ART hits
pandoraClusterToArtClustersMapoutput mapping from pandora cluster ID to art cluster IDs
hitVectorsthe output vectors of hits for each cluster produced used to produce associations
algoalgorithm set to fill cluster members
thevector of ART clusters

Definition at line 990 of file LArPandoraOutput.cxx.

Here is the call graph for this function:

◆ BuildDummySlice()

unsigned int lar_pandora::LArPandoraOutput::BuildDummySlice ( SliceCollection outputSlices)
static

Build a new slice object with dummy information.

Parameters
outputSlicesthe output collection of slices to populate

Definition at line 829 of file LArPandoraOutput.cxx.

Here is the caller graph for this function:

◆ BuildParticleMetadata()

void lar_pandora::LArPandoraOutput::BuildParticleMetadata ( const art::Event &  event,
const std::string &  instanceLabel,
const pandora::PfoVector pfoVector,
PFParticleMetadataCollection outputParticleMetadata,
PFParticleToMetadataCollection outputParticlesToMetadata 
)
static

Build metadata objects from a list of input pfos.

Parameters
eventthe art event
pfoVectorthe input list of pfos
outputParticleMetadatathe output vector of PFParticleMetadata
outputParticlesToMetadatathe output associations between PFParticles and metadata

Definition at line 729 of file LArPandoraOutput.cxx.

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

◆ BuildPFParticle()

recob::PFParticle lar_pandora::LArPandoraOutput::BuildPFParticle ( const pandora::ParticleFlowObject *const  pPfo,
const size_t  pfoId,
const pandora::PfoVector pfoVector 
)
static

Convert from a pfo to and ART PFParticle.

Parameters
pPfothe input pfo to convert
pfoIdthe id of the pfo to produce
pfoVectorthe input list of pfos
theART PFParticle

Definition at line 934 of file LArPandoraOutput.cxx.

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

◆ BuildPFParticles()

void lar_pandora::LArPandoraOutput::BuildPFParticles ( const art::Event &  event,
const std::string &  instanceLabel,
const pandora::PfoVector pfoVector,
const IdToIdVectorMap pfoToVerticesMap,
const IdToIdVectorMap pfoToThreeDHitsMap,
const IdToIdVectorMap pfoToArtClustersMap,
PFParticleCollection outputParticles,
PFParticleToVertexCollection outputParticlesToVertices,
PFParticleToSpacePointCollection outputParticlesToSpacePoints,
PFParticleToClusterCollection outputParticlesToClusters 
)
static

Convert between pfos and PFParticles and add them to the output vector Create the associations between PFParticle and vertices, spacepoints and clusters.

Parameters
eventthe art event
pfoVectorthe input list of pfos to convert
pfoToVerticesMapthe input mapping from pfo ID to vertex IDs
pfoToThreeDHitsMapthe input mapping from pfo ID to 3D hit IDs
pfoToArtClustersMapthe input mapping from pfo ID to ART cluster IDs
outputParticlethe output vector of PFParticles
outputParticlesToVerticesthe output associations between PFParticles and vertices
outputParticlesToSpacePointsthe output associations between PFParticles and spacepoints
outputParticlesToClustersthe output associations between PFParticles and clusters

Definition at line 679 of file LArPandoraOutput.cxx.

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

◆ BuildSlice()

unsigned int lar_pandora::LArPandoraOutput::BuildSlice ( const pandora::ParticleFlowObject *const  pParentPfo,
const art::Event &  event,
const std::string &  instanceLabel,
const IdToHitMap idToHitMap,
SliceCollection outputSlices,
SliceToHitCollection outputSlicesToHits 
)
static

Build a new slice object from a PFO, this can be a top-level parent in a hierarchy or a "slice PFO" from the slicing instance.

Parameters
pParentPfothe parent pfo from which to build the slice
eventthe art event
instanceLabelthe label for the collections to be produced
idToHitMapinput mapping from pandora hit ID to ART hit
outputSlicesthe output collection of slices to populate
outputSlicesToHitsthe output association from slices to hits

Definition at line 876 of file LArPandoraOutput.cxx.

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

◆ BuildSlices()

void lar_pandora::LArPandoraOutput::BuildSlices ( const Settings settings,
const pandora::Pandora *const  pPrimaryPandora,
const art::Event &  event,
const std::string &  instanceLabel,
const pandora::PfoVector pfoVector,
const IdToHitMap idToHitMap,
SliceCollection outputSlices,
PFParticleToSliceCollection outputParticlesToSlices,
SliceToHitCollection outputSlicesToHits 
)
static

Build slices - collections of hits which each describe a single particle hierarchy.

Parameters
settingsthe settings
pPrimaryPandorathe primary pandora instance
eventthe art event
instanceLabelthe label for the collections to be produced
pfoVectorthe input vector of all pfos to be output
idToHitMapinput mapping from pandora hit ID to ART hit
outputSlicesthe output collection of slices to populate
outputParticlesToSlicesthe output association from particles to slices
outputSlicesToHitsthe output association from slices to hits

Definition at line 749 of file LArPandoraOutput.cxx.

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

◆ BuildSpacePoint()

recob::SpacePoint lar_pandora::LArPandoraOutput::BuildSpacePoint ( const pandora::CaloHit *const  pCaloHit,
const size_t  spacePointId 
)
static

Convert from a pandora 3D hit to an ART spacepoint.

Parameters
pCaloHitthe input hit
spacePointIdthe id of the space-point to produce
theART spacepoint

Definition at line 1132 of file LArPandoraOutput.cxx.

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

◆ BuildSpacePoints()

void lar_pandora::LArPandoraOutput::BuildSpacePoints ( const art::Event &  event,
const std::string &  instanceLabel,
const pandora::CaloHitList threeDHitList,
const CaloHitToArtHitMap pandoraHitToArtHitMap,
SpacePointCollection outputSpacePoints,
SpacePointToHitCollection outputSpacePointsToHits 
)
static

Convert pandora 3D hits to ART spacepoints and add them to the output vector Create the associations between spacepoints and hits.

Parameters
eventthe art event
threeDHitListthe input list of 3D hits to convert
pandoraHitToArtHitMapthe input mapping from pandora hits to ART hits
outputSpacePointsthe output vector of spacepoints
outputSpacePointsToHitsthe output associations between spacepoints and hits

Definition at line 586 of file LArPandoraOutput.cxx.

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

◆ BuildT0()

bool lar_pandora::LArPandoraOutput::BuildT0 ( const art::Event &  event,
const pandora::ParticleFlowObject *const  pPfo,
const pandora::PfoVector pfoVector,
size_t &  nextId,
anab::T0 &  t0 
)
static

If required, build a T0 for the input pfo.

Parameters
eventthe ART event
pPfothe input pfo
pfoVectorthe input list of pfos
nextIdthe ID of the T0 - will be incremented if the t0 was produced
t0the output T0
Returns
if a T0 was produced (calculated from the stitching hit shift distance)

Definition at line 1151 of file LArPandoraOutput.cxx.

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

◆ BuildT0s()

void lar_pandora::LArPandoraOutput::BuildT0s ( const art::Event &  event,
const std::string &  instanceLabel,
const pandora::PfoVector pfoVector,
T0Collection outputT0s,
PFParticleToT0Collection outputParticlesToT0s 
)
static

Calculate the T0 of each pfos and add them to the output vector Create the associations between PFParticle and T0s.

Parameters
eventthe art event
instanceLabelthe label for the collections to be produced
pfoVectorthe input list of pfos
outputT0sthe output vector of T0s
outputParticlesToT0sthe output associations between PFParticles and T0s

Definition at line 913 of file LArPandoraOutput.cxx.

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

◆ BuildVertex()

recob::Vertex lar_pandora::LArPandoraOutput::BuildVertex ( const pandora::Vertex *const  pVertex,
const size_t  vertexId 
)
static

Convert from a pandora vertex to an ART vertex.

Parameters
pVertexthe input vertex
vertexIdthe id of the vertex to produce
theART vertex

Definition at line 960 of file LArPandoraOutput.cxx.

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

◆ BuildVertices()

void lar_pandora::LArPandoraOutput::BuildVertices ( const pandora::VertexVector vertexVector,
VertexCollection outputVertices 
)
static

Convert pandora vertices to ART vertices and add them to the output vector.

Parameters
vertexVectorthe input list of pandora vertices
outputVerticesthe output vector of ART vertices

Definition at line 577 of file LArPandoraOutput.cxx.

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

◆ Collect3DHits() [1/2]

void lar_pandora::LArPandoraOutput::Collect3DHits ( const pandora::ParticleFlowObject *const  pPfo,
pandora::CaloHitVector caloHits 
)
static

Collect a sorted vector of all 3D hits in the input pfo.

Parameters
pPfothe input pfo
caloHitsthe sorted output vector of 3D hits

Definition at line 489 of file LArPandoraOutput.cxx.

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

◆ Collect3DHits() [2/2]

pandora::CaloHitList lar_pandora::LArPandoraOutput::Collect3DHits ( const pandora::PfoVector pfoVector,
IdToIdVectorMap pfoToThreeDHitsMap 
)
static

Collect a sorted list of all 3D hits contained in the input pfo list Order is guaranteed provided pfoVector is ordered.

Parameters
pfoVectorthe input list of pfos
pfoToThreeDHitsMapthe output mapping from pfo ID to 3D hit IDs
Returns
the list of 3D hits collected

Definition at line 457 of file LArPandoraOutput.cxx.

Here is the call graph for this function:

◆ CollectAllPfoOutcomes()

pandora::PfoVector lar_pandora::LArPandoraOutput::CollectAllPfoOutcomes ( const pandora::Pandora *const  pPrimaryPandora)
static

Collect the pfos (including all downstream pfos) from the master and daughter pandora instances.

Parameters
pPrimaryPandoraaddress of master pandora instance
Returns
a sorted list of all pfos to convert to ART PFParticles

Definition at line 265 of file LArPandoraOutput.cxx.

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

◆ CollectClusters()

pandora::ClusterList lar_pandora::LArPandoraOutput::CollectClusters ( const pandora::PfoVector pfoVector,
IdToIdVectorMap pfoToClustersMap 
)
static

Collect a sorted list of all 2D clusters contained in the input pfo list Order is guaranteed provided pfoVector is ordered.

Parameters
pfoVectorthe input list of pfos
pfoToClustersMapthe output mapping from pfo ID to cluster IDs
Returns
the list of clusters collected

Definition at line 428 of file LArPandoraOutput.cxx.

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

◆ CollectPfos() [1/2]

pandora::PfoVector lar_pandora::LArPandoraOutput::CollectPfos ( const pandora::Pandora *const  pPrimaryPandora)
static

Collect the current pfos (including all downstream pfos) from the master pandora instance.

Parameters
pPrimaryPandoraaddress of master pandora instance
Returns
a sorted list of all pfos to convert to ART PFParticles

Definition at line 360 of file LArPandoraOutput.cxx.

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

◆ CollectPfos() [2/2]

void lar_pandora::LArPandoraOutput::CollectPfos ( const pandora::PfoList parentPfoList,
pandora::PfoVector pfoVector 
)
static

Collect a sorted list of all downstream pfos of an input list of parent.

Parameters
parentPfoListthe input list of parent pfos
pfoVectorthe sorted output list of all downstream pfos

Definition at line 375 of file LArPandoraOutput.cxx.

Here is the call graph for this function:

◆ CollectVertices()

pandora::VertexVector lar_pandora::LArPandoraOutput::CollectVertices ( const pandora::PfoVector pfoVector,
IdToIdVectorMap pfoToVerticesMap,
std::function< const pandora::Vertex *const(const pandora::ParticleFlowObject *const)>  fCriteria 
)
static

Collect all vertices contained in the input pfo list Order is guaranteed provided pfoVector is ordered.

Parameters
pfoVectorthe input list of pfos
pfoToVerticesMapthe output mapping from pfo ID to vertex IDs (zero or one)
fCriteriafunction to extract vertex from pfo
Returns
the list of vertices collected

Definition at line 391 of file LArPandoraOutput.cxx.

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

◆ CopyAllHitsToSingleSlice()

void lar_pandora::LArPandoraOutput::CopyAllHitsToSingleSlice ( const Settings settings,
const art::Event &  event,
const std::string &  instanceLabel,
const pandora::PfoVector pfoVector,
const IdToHitMap idToHitMap,
SliceCollection outputSlices,
PFParticleToSliceCollection outputParticlesToSlices,
SliceToHitCollection outputSlicesToHits 
)
static

Ouput a single slice containing all of the input hits.

Parameters
settingsthe settings
eventthe art event
instanceLabelthe label for the collections to be produced
pfoVectorthe input vector of all pfos to be output
idToHitMapinput mapping from pandora hit ID to ART hit
outputSlicesthe output collection of slices to populate
outputParticlesToSlicesthe output association from particles to slices
outputSlicesToHitsthe output association from slices to hits

Definition at line 845 of file LArPandoraOutput.cxx.

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

◆ GetHit()

art::Ptr< recob::Hit > lar_pandora::LArPandoraOutput::GetHit ( const IdToHitMap idToHitMap,
const pandora::CaloHit *const  pCaloHit 
)
static

Look up ART hit from an input Pandora hit.

Parameters
idToHitMapthe mapping between Pandora and ART hits
pCaloHitthe input Pandora hit (2D)

Definition at line 545 of file LArPandoraOutput.cxx.

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

◆ GetHitsInCluster()

void lar_pandora::LArPandoraOutput::GetHitsInCluster ( const pandora::Cluster *const  pCluster,
pandora::CaloHitVector sortedHits 
)
static

Collect a sorted list of all 2D hits in a cluster.

Parameters
pClusterthe input cluster
sortedHitsthe output vector of sorted 2D hits

Definition at line 970 of file LArPandoraOutput.cxx.

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

◆ GetId() [1/2]

template<typename T >
size_t lar_pandora::LArPandoraOutput::GetId ( const T *const  pT,
const std::list< const T * > &  tList 
)
inlinestatic

Find the index of an input object in an input list. Throw an exception if it doesn't exist.

Parameters
pTthe input object for which the ID should be found
tLista list of objects of type pT to query
Returns
the ID of the input object

Definition at line 624 of file LArPandoraOutput.h.

Here is the caller graph for this function:

◆ GetId() [2/2]

template<typename T >
size_t lar_pandora::LArPandoraOutput::GetId ( const T *const  pT,
const std::vector< const T * > &  tVector 
)
inlinestatic

Find the index of an input object in an input vector. Throw an exception if it doesn't exist.

Parameters
pTthe input object for which the ID should be found
tVectora list of objects of type pT to query
Returns
the ID of the input object

Definition at line 638 of file LArPandoraOutput.h.

◆ GetPandoraInstance()

bool lar_pandora::LArPandoraOutput::GetPandoraInstance ( const pandora::Pandora *const  pPrimaryPandora,
const std::string &  name,
const pandora::Pandora *&  pPandoraInstance 
)
static

Get the address of a pandora instance with a given name.

Parameters
pPrimaryPandorathe primary pandora instance
namethe name of the instance to collect
pPandoraInstancethe output address of the pandora instance requested
Returns
if the pandora instance could be found

Definition at line 213 of file LArPandoraOutput.cxx.

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

◆ GetPandoraSlices()

void lar_pandora::LArPandoraOutput::GetPandoraSlices ( const pandora::Pandora *const  pPrimaryPandora,
pandora::PfoVector slicePfos 
)
static

Get the slice pfos - one pfo per slice.

Parameters
pPrimaryPandorathe primary pandora instance
slicePfosthe output vector of slice pfos

Definition at line 242 of file LArPandoraOutput.cxx.

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

◆ GetPandoraToArtHitMap()

void lar_pandora::LArPandoraOutput::GetPandoraToArtHitMap ( const pandora::ClusterList clusterList,
const pandora::CaloHitList threeDHitList,
const IdToHitMap idToHitMap,
CaloHitToArtHitMap pandoraHitToArtHitMap 
)
static

Collect all 2D and 3D hits that were used / produced in the reconstruction and map them to their corresponding ART hit.

Parameters
clusterListinput list of all 2D clusters to be output
threeDHitListinput list of all 3D hits to be output (as spacepoints)
idToHitMapinput mapping from pandora hit ID to ART hit
pandoraHitToArtHitMapoutput mapping from pandora hit to ART hit

Definition at line 502 of file LArPandoraOutput.cxx.

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

◆ GetSliceIndex()

unsigned int lar_pandora::LArPandoraOutput::GetSliceIndex ( const pandora::ParticleFlowObject *const  pPfo)
static

Get the index of the slice from which this pfo was produced.

Parameters
pPfothe input pfo
Returns
the slice index

Definition at line 344 of file LArPandoraOutput.cxx.

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

◆ IsClearCosmic()

bool lar_pandora::LArPandoraOutput::IsClearCosmic ( const pandora::ParticleFlowObject *const  pPfo)
static

Check if the input pfo is an unambiguous cosmic ray.

Parameters
pPfothe input pfo
Returns
if the input pfo is a clear cosmic ray

Definition at line 320 of file LArPandoraOutput.cxx.

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

◆ IsFromSlice()

bool lar_pandora::LArPandoraOutput::IsFromSlice ( const pandora::ParticleFlowObject *const  pPfo)
static

Check if the input pfo is from a slice.

Parameters
pPfothe input pfo
Returns
if the input pfo is from a slice

Definition at line 334 of file LArPandoraOutput.cxx.

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

◆ ProduceArtOutput()

void lar_pandora::LArPandoraOutput::ProduceArtOutput ( const Settings settings,
const IdToHitMap idToHitMap,
art::Event &  evt 
)
static

Convert the Pandora PFOs into ART clusters and write into ART event.

Parameters
settingsthe settings
idToHitMapthe mapping from Pandora hit ID to ART hit
evtthe ART event

Definition at line 41 of file LArPandoraOutput.cxx.

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

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