LArPandoraEvent class. More...
#include <LArPandoraEvent.h>
Classes | |
class | Labels |
Class to handle the required producer labels. More... | |
Public Member Functions | |
LArPandoraEvent (art::EDProducer *pProducer, art::Event *pEvent, const Labels &inputLabels, const bool shouldProduceT0s=false) | |
Constructor from an art::Event. More... | |
LArPandoraEvent (const LArPandoraEvent &event, const PFParticleVector &selectedPFParticles) | |
Construct by copying an existing LArPandoraEvent, replacing the collections and associations by any objects associated with a PFParticle in the selection supplied. More... | |
void | WriteToEvent () const |
Write (put) the collections in this LArPandoraEvent to the art::Event. More... | |
Private Member Functions | |
void | GetCollections () |
Get the collections and associations from m_pEvent with the required labels. More... | |
template<typename T > | |
void | GetCollection (const Labels::LabelType &inputLabel, Collection< T > &outputCollection) const |
Gets a given collection from m_pEvent with the label supplied. More... | |
template<typename L , typename R , typename D > | |
void | GetAssociationMap (const Collection< L > &collectionL, const Labels::LabelType &inputLabel, Association< L, R, D > &outputAssociationMap) const |
Get the mapping between two collections with metadata using the specified label. More... | |
template<typename L , typename R > | |
void | GetAssociationMap (const Collection< L > &collectionL, const Labels::LabelType &inputLabel, Association< L, R, void * > &outputAssociationMap) const |
Get the mapping between two collections with metadata using the specified label. More... | |
template<typename L , typename R , typename D > | |
void | CollectAssociated (const art::Ptr< L > &anObject, const Association< L, R, D > &associationLtoR, Collection< R > &associatedR) const |
Collects all objects of type R with metadata D associated to a given object of type L. More... | |
template<typename L , typename R , typename D > | |
void | GetFilteredAssociationMap (const Collection< L > &collectionL, const Collection< R > &collectionR, const Association< L, R, D > &inputAssociationLtoR, Association< L, R, D > &outputAssociationLtoR) const |
Gets the filtered mapping from objects in collectionL to objects that also exist in collectionR using a "superset" input association. More... | |
template<typename T > | |
void | WriteCollection (const Collection< T > &collection) const |
Write a given collection to the event. More... | |
template<typename L , typename R , typename D > | |
void | WriteAssociation (const Association< L, R, D > &associationMap, const Collection< L > &collectionL, const Collection< R > &collectionR, const bool thisProducesR=true) const |
Write a given association to the event. More... | |
template<typename L , typename R > | |
void | WriteAssociation (const Association< L, R, void * > &associationMap, const Collection< L > &collectionL, const Collection< R > &collectionR, const bool thisProducesR=true) const |
Write a given association to the event. More... | |
template<typename T > | |
size_t | GetIndex (const art::Ptr< T > object, const Collection< T > &collection) const |
Get the index of an objet in a given collection. More... | |
Private Attributes | |
art::EDProducer * | m_pProducer |
The producer which should write the output collections and associations. More... | |
art::Event * | m_pEvent |
The event to consider. More... | |
Labels | m_labels |
A set of labels describing the producers for each input collection. More... | |
bool | m_shouldProduceT0s |
If T0s should be produced (usually only true for use cases with multiple drift volumes) More... | |
PFParticleCollection | m_pfParticles |
The input collection of PFParticles. More... | |
SpacePointCollection | m_spacePoints |
The input collection of SpacePoints. More... | |
ClusterCollection | m_clusters |
The input collection of Clusters. More... | |
VertexCollection | m_vertices |
The input collection of Vertices. More... | |
SliceCollection | m_slices |
The input collection of Slices. More... | |
TrackCollection | m_tracks |
The input collection of Tracks. More... | |
ShowerCollection | m_showers |
The input collection of Showers. More... | |
T0Collection | m_t0s |
The input collection of T0s. More... | |
PFParticleMetadataCollection | m_metadata |
The input collection of PFParticle metadata. More... | |
PCAxisCollection | m_pcAxes |
The input collection of PCAxes. More... | |
HitCollection | m_hits |
The input collection of Hits. More... | |
PFParticleToSpacePointAssoc | m_pfParticleSpacePointMap |
The input associations: PFParticle -> SpacePoint. More... | |
PFParticleToClusterAssoc | m_pfParticleClusterMap |
The input associations: PFParticle -> Cluster. More... | |
PFParticleToVertexAssoc | m_pfParticleVertexMap |
The input associations: PFParticle -> Vertex. More... | |
PFParticleToSliceAssoc | m_pfParticleSliceMap |
The input associations: PFParticle -> Slice. More... | |
PFParticleToTrackAssoc | m_pfParticleTrackMap |
The input associations: PFParticle -> Track. More... | |
PFParticleToShowerAssoc | m_pfParticleShowerMap |
The input associations: PFParticle -> Shower. More... | |
PFParticleToT0Assoc | m_pfParticleT0Map |
The input associations: PFParticle -> T0. More... | |
PFParticleToPFParticleMetadataAssoc | m_pfParticleMetadataMap |
The input associations: PFParticle -> Metadata. More... | |
PFParticleToPCAxisAssoc | m_pfParticlePCAxisMap |
The input associations: PFParticle -> PCAxis. More... | |
SpacePointToHitAssoc | m_spacePointHitMap |
The input associations: SpacePoint -> Hit. More... | |
ClusterToHitAssoc | m_clusterHitMap |
The input associations: Cluster -> Hit. More... | |
SliceToHitAssoc | m_sliceHitMap |
The input associations: Slice -> Hit. More... | |
TrackToHitAssoc | m_trackHitMap |
The input associations: Track -> Hit. More... | |
ShowerToHitAssoc | m_showerHitMap |
The input associations: Shower -> Hit. More... | |
ShowerToPCAxisAssoc | m_showerPCAxisMap |
The input associations: PCAxis -> Shower. More... | |
LArPandoraEvent class.
Definition at line 46 of file LArPandoraEvent.h.
using lar_pandora::LArPandoraEvent::Association = std::map< art::Ptr<L>, PairVector<R, D> > |
General purpose short-hand with optional D parameter.
Definition at line 62 of file LArPandoraEvent.h.
Definition at line 67 of file LArPandoraEvent.h.
typedef Association<recob::Cluster, recob::Hit, void*> lar_pandora::LArPandoraEvent::ClusterToHitAssoc |
Definition at line 88 of file LArPandoraEvent.h.
using lar_pandora::LArPandoraEvent::Collection = std::vector< art::Ptr<T> > |
Shorthand for a collection of objects of type T.
Definition at line 53 of file LArPandoraEvent.h.
Definition at line 65 of file LArPandoraEvent.h.
using lar_pandora::LArPandoraEvent::PairVector = std::vector< std::pair< art::Ptr<R>, D > > |
Definition at line 56 of file LArPandoraEvent.h.
Definition at line 73 of file LArPandoraEvent.h.
Definition at line 66 of file LArPandoraEvent.h.
typedef Collection<larpandoraobj::PFParticleMetadata> lar_pandora::LArPandoraEvent::PFParticleMetadataCollection |
Definition at line 74 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, recob::Cluster, void*> lar_pandora::LArPandoraEvent::PFParticleToClusterAssoc |
Definition at line 78 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, recob::PCAxis, void*> lar_pandora::LArPandoraEvent::PFParticleToPCAxisAssoc |
Definition at line 84 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, larpandoraobj::PFParticleMetadata, void*> lar_pandora::LArPandoraEvent::PFParticleToPFParticleMetadataAssoc |
Definition at line 85 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, recob::Shower, void*> lar_pandora::LArPandoraEvent::PFParticleToShowerAssoc |
Definition at line 83 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, recob::Slice, void*> lar_pandora::LArPandoraEvent::PFParticleToSliceAssoc |
Definition at line 81 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, recob::SpacePoint, void*> lar_pandora::LArPandoraEvent::PFParticleToSpacePointAssoc |
Definition at line 79 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, anab::T0, void*> lar_pandora::LArPandoraEvent::PFParticleToT0Assoc |
Definition at line 86 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, recob::Track, void*> lar_pandora::LArPandoraEvent::PFParticleToTrackAssoc |
Definition at line 82 of file LArPandoraEvent.h.
typedef Association<recob::PFParticle, recob::Vertex, void*> lar_pandora::LArPandoraEvent::PFParticleToVertexAssoc |
Definition at line 80 of file LArPandoraEvent.h.
Definition at line 72 of file LArPandoraEvent.h.
typedef Association<recob::Shower, recob::Hit, void*> lar_pandora::LArPandoraEvent::ShowerToHitAssoc |
Definition at line 92 of file LArPandoraEvent.h.
typedef Association<recob::Shower, recob::PCAxis, void*> lar_pandora::LArPandoraEvent::ShowerToPCAxisAssoc |
Definition at line 93 of file LArPandoraEvent.h.
Definition at line 70 of file LArPandoraEvent.h.
typedef Association<recob::Slice, recob::Hit, void*> lar_pandora::LArPandoraEvent::SliceToHitAssoc |
Definition at line 90 of file LArPandoraEvent.h.
Definition at line 68 of file LArPandoraEvent.h.
typedef Association<recob::SpacePoint, recob::Hit, void*> lar_pandora::LArPandoraEvent::SpacePointToHitAssoc |
Definition at line 89 of file LArPandoraEvent.h.
Definition at line 75 of file LArPandoraEvent.h.
Definition at line 71 of file LArPandoraEvent.h.
typedef Association<recob::Track, recob::Hit, recob::TrackHitMeta> lar_pandora::LArPandoraEvent::TrackToHitAssoc |
Definition at line 91 of file LArPandoraEvent.h.
Definition at line 69 of file LArPandoraEvent.h.
lar_pandora::LArPandoraEvent::LArPandoraEvent | ( | art::EDProducer * | pProducer, |
art::Event * | pEvent, | ||
const Labels & | inputLabels, | ||
const bool | shouldProduceT0s = false |
||
) |
Constructor from an art::Event.
pProducer | pointer to the producer to write the output |
pEvent | pointer to the event to process |
inputLabel | labels for the producers of the input collections |
shouldProduceT0s | if T0s should be produced (usually only for multiple drift volume use cases) |
Definition at line 12 of file LArPandoraEvent.cxx.
lar_pandora::LArPandoraEvent::LArPandoraEvent | ( | const LArPandoraEvent & | event, |
const PFParticleVector & | selectedPFParticles | ||
) |
Construct by copying an existing LArPandoraEvent, replacing the collections and associations by any objects associated with a PFParticle in the selection supplied.
event | input event to copy and filter |
pfParticleVector | input vector of selected particles |
Definition at line 23 of file LArPandoraEvent.cxx.
|
inlineprivate |
Collects all objects of type R with metadata D associated to a given object of type L.
anObject | an input object of type L with which we want to collect associated objects of type R with metadata D |
associationLtoR | the general input association between objects of type L and R |
associatedR | output vector of objects of type R associated with anObject |
Definition at line 397 of file LArPandoraEvent.h.
|
inlineprivate |
Get the mapping between two collections with metadata using the specified label.
collectionL | the collection from which the associations should be retrieved |
inputLabel | a label for the producer of the association required |
outputAssociationMap | output mapping between the two data types supplied (L -> R + D) |
Definition at line 347 of file LArPandoraEvent.h.
|
inlineprivate |
Get the mapping between two collections with metadata using the specified label.
collectionL | the collection from which the associations should be retrieved |
inputLabel | a label for the producer of the association required |
outputAssociationMap | output mapping between the two data types supplied (L -> R no metadata) |
Definition at line 372 of file LArPandoraEvent.h.
|
inlineprivate |
Gets a given collection from m_pEvent with the label supplied.
inputLabel | a label for the producer of the collection required |
outputCollection | the required collection |
Definition at line 336 of file LArPandoraEvent.h.
|
private |
Get the collections and associations from m_pEvent with the required labels.
Definition at line 106 of file LArPandoraEvent.cxx.
|
inlineprivate |
Gets the filtered mapping from objects in collectionL to objects that also exist in collectionR using a "superset" input association.
collectionL | a first filtered collection |
collectionR | a second filtered collection |
inputAssociationLtoR | mapping between the two unfiltered collections |
outputAssociationLtoR | mapping between the two filtered collections |
Definition at line 414 of file LArPandoraEvent.h.
|
inlineprivate |
Get the index of an objet in a given collection.
object | the object to search for |
collection | the collection to search through |
Definition at line 530 of file LArPandoraEvent.h.
|
inlineprivate |
Write a given association to the event.
associationMap | the association to write from objects of type L -> R + D |
collectionL | the collection of type L that has been written |
collectionR | the collection of type R that has been written |
thisProducesR | will this producer produce collectionR of was it produced by a different module? |
Definition at line 451 of file LArPandoraEvent.h.
|
inlineprivate |
Write a given association to the event.
associationMap | the association to write from objects of type L -> R (no metadata) |
collectionL | the collection of type L that has been written |
collectionR | the collection of type R that has been written |
thisProducesR | will this producer produce collectionR of was it produced by a different module? |
Definition at line 491 of file LArPandoraEvent.h.
|
inlineprivate |
Write a given collection to the event.
collection | the collection to write |
Definition at line 438 of file LArPandoraEvent.h.
void lar_pandora::LArPandoraEvent::WriteToEvent | ( | ) | const |
Write (put) the collections in this LArPandoraEvent to the art::Event.
Definition at line 70 of file LArPandoraEvent.cxx.
|
private |
The input associations: Cluster -> Hit.
Definition at line 326 of file LArPandoraEvent.h.
|
private |
The input collection of Clusters.
Definition at line 305 of file LArPandoraEvent.h.
|
private |
The input collection of Hits.
Definition at line 313 of file LArPandoraEvent.h.
|
private |
A set of labels describing the producers for each input collection.
Definition at line 299 of file LArPandoraEvent.h.
|
private |
The input collection of PFParticle metadata.
Definition at line 311 of file LArPandoraEvent.h.
|
private |
The input collection of PCAxes.
Definition at line 312 of file LArPandoraEvent.h.
|
private |
The event to consider.
Definition at line 298 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> Cluster.
Definition at line 317 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> Metadata.
Definition at line 323 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> PCAxis.
Definition at line 324 of file LArPandoraEvent.h.
|
private |
The input collection of PFParticles.
Definition at line 303 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> Shower.
Definition at line 321 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> Slice.
Definition at line 319 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> SpacePoint.
Definition at line 316 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> T0.
Definition at line 322 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> Track.
Definition at line 320 of file LArPandoraEvent.h.
|
private |
The input associations: PFParticle -> Vertex.
Definition at line 318 of file LArPandoraEvent.h.
|
private |
The producer which should write the output collections and associations.
Definition at line 297 of file LArPandoraEvent.h.
|
private |
If T0s should be produced (usually only true for use cases with multiple drift volumes)
Definition at line 300 of file LArPandoraEvent.h.
|
private |
The input associations: Shower -> Hit.
Definition at line 329 of file LArPandoraEvent.h.
|
private |
The input associations: PCAxis -> Shower.
Definition at line 330 of file LArPandoraEvent.h.
|
private |
The input collection of Showers.
Definition at line 309 of file LArPandoraEvent.h.
|
private |
The input associations: Slice -> Hit.
Definition at line 327 of file LArPandoraEvent.h.
|
private |
The input collection of Slices.
Definition at line 307 of file LArPandoraEvent.h.
|
private |
The input associations: SpacePoint -> Hit.
Definition at line 325 of file LArPandoraEvent.h.
|
private |
The input collection of SpacePoints.
Definition at line 304 of file LArPandoraEvent.h.
|
private |
The input collection of T0s.
Definition at line 310 of file LArPandoraEvent.h.
|
private |
The input associations: Track -> Hit.
Definition at line 328 of file LArPandoraEvent.h.
|
private |
The input collection of Tracks.
Definition at line 308 of file LArPandoraEvent.h.
|
private |
The input collection of Vertices.
Definition at line 306 of file LArPandoraEvent.h.