14 const bool shouldProduceT0s)
15 : m_pProducer(pProducer)
17 , m_labels(inputLabels)
18 , m_shouldProduceT0s(shouldProduceT0s)
27 : m_pProducer(event.m_pProducer)
28 , m_pEvent(event.m_pEvent)
29 , m_labels(event.m_labels)
30 , m_shouldProduceT0s(event.m_shouldProduceT0s)
31 , m_hits(event.m_hits)
36 for (
const auto& part : selectedPFParticles) {
159 const std::string& hitProducerLabel)
193 const std::string& trackProducerLabel,
194 const std::string& showerProducerLabel,
195 const std::string& hitProducerLabel)
197 m_labels.emplace(PFParticleLabel, pfParticleProducerLabel);
198 m_labels.emplace(SpacePointLabel, pfParticleProducerLabel);
199 m_labels.emplace(ClusterLabel, pfParticleProducerLabel);
200 m_labels.emplace(VertexLabel, pfParticleProducerLabel);
201 m_labels.emplace(SliceLabel, pfParticleProducerLabel);
202 m_labels.emplace(TrackLabel, trackProducerLabel);
203 m_labels.emplace(ShowerLabel, showerProducerLabel);
204 m_labels.emplace(T0Label, pfParticleProducerLabel);
205 m_labels.emplace(PFParticleMetadataLabel, pfParticleProducerLabel);
206 m_labels.emplace(PCAxisLabel, showerProducerLabel);
207 m_labels.emplace(HitLabel, hitProducerLabel);
209 m_labels.emplace(PFParticleToSpacePointLabel, pfParticleProducerLabel);
210 m_labels.emplace(PFParticleToClusterLabel, pfParticleProducerLabel);
211 m_labels.emplace(PFParticleToVertexLabel, pfParticleProducerLabel);
212 m_labels.emplace(PFParticleToSliceLabel, pfParticleProducerLabel);
213 m_labels.emplace(PFParticleToTrackLabel, trackProducerLabel);
214 m_labels.emplace(PFParticleToShowerLabel, showerProducerLabel);
215 m_labels.emplace(PFParticleToT0Label, pfParticleProducerLabel);
216 m_labels.emplace(PFParticleToMetadataLabel, pfParticleProducerLabel);
217 m_labels.emplace(PFParticleToPCAxisLabel, showerProducerLabel);
218 m_labels.emplace(SpacePointToHitLabel, pfParticleProducerLabel);
219 m_labels.emplace(ClusterToHitLabel, pfParticleProducerLabel);
220 m_labels.emplace(SliceToHitLabel, pfParticleProducerLabel);
221 m_labels.emplace(TrackToHitLabel, trackProducerLabel);
222 m_labels.emplace(ShowerToHitLabel, showerProducerLabel);
223 m_labels.emplace(ShowerToPCAxisLabel, showerProducerLabel);
231 throw cet::exception(
"LArPandora")
232 <<
" LArPandoraEvent::GetLabel -- Label map doesn't contain label of requested type"
A description of all outputs from an instance of pandora with functionality to filter and merge multi...
Class to handle the required producer labels.
LabelType
Label type enumeration.
@ PFParticleToSpacePointLabel
@ PFParticleToClusterLabel
@ PFParticleToShowerLabel
@ PFParticleToVertexLabel
@ PFParticleToMetadataLabel
@ PFParticleMetadataLabel
@ PFParticleToPCAxisLabel
const std::string & GetLabel(const LabelType type) const
Get the label of a given type.
std::map< LabelType, std::string > m_labels
Map holding the labels.
Labels(const std::string &pfParticleProducerLabel, const std::string &hitProducerLabel)
Minimal parametrised constructor. Sets all collection labels to be the same as the PFParticle produce...
void SetLabel(const LabelType type, const std::string &label)
Set the label of a given type.
SliceToHitAssoc m_sliceHitMap
The input associations: Slice -> Hit.
PFParticleToVertexAssoc m_pfParticleVertexMap
The input associations: PFParticle -> Vertex.
PFParticleToPFParticleMetadataAssoc m_pfParticleMetadataMap
The input associations: PFParticle -> Metadata.
PFParticleToSliceAssoc m_pfParticleSliceMap
The input associations: PFParticle -> Slice.
PFParticleToPCAxisAssoc m_pfParticlePCAxisMap
The input associations: PFParticle -> PCAxis.
void WriteToEvent() const
Write (put) the collections in this LArPandoraEvent to the art::Event.
TrackToHitAssoc m_trackHitMap
The input associations: Track -> Hit.
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...
VertexCollection m_vertices
The input collection of Vertices.
PFParticleToT0Assoc m_pfParticleT0Map
The input associations: PFParticle -> T0.
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.
void WriteCollection(const Collection< T > &collection) const
Write a given collection to the event.
PFParticleToTrackAssoc m_pfParticleTrackMap
The input associations: PFParticle -> Track.
SpacePointCollection m_spacePoints
The input collection of SpacePoints.
ShowerToPCAxisAssoc m_showerPCAxisMap
The input associations: PCAxis -> Shower.
PFParticleToShowerAssoc m_pfParticleShowerMap
The input associations: PFParticle -> Shower.
T0Collection m_t0s
The input collection of T0s.
PFParticleMetadataCollection m_metadata
The input collection of PFParticle metadata.
PFParticleCollection m_pfParticles
The input collection of PFParticles.
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.
ClusterToHitAssoc m_clusterHitMap
The input associations: Cluster -> Hit.
TrackCollection m_tracks
The input collection of Tracks.
ShowerToHitAssoc m_showerHitMap
The input associations: Shower -> Hit.
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.
ShowerCollection m_showers
The input collection of Showers.
PCAxisCollection m_pcAxes
The input collection of PCAxes.
LArPandoraEvent(art::EDProducer *pProducer, art::Event *pEvent, const Labels &inputLabels, const bool shouldProduceT0s=false)
Constructor from an art::Event.
PFParticleToClusterAssoc m_pfParticleClusterMap
The input associations: PFParticle -> Cluster.
Labels m_labels
A set of labels describing the producers for each input collection.
PFParticleToSpacePointAssoc m_pfParticleSpacePointMap
The input associations: PFParticle -> SpacePoint.
HitCollection m_hits
The input collection of Hits.
void GetCollection(const Labels::LabelType &inputLabel, Collection< T > &outputCollection) const
Gets a given collection from m_pEvent with the label supplied.
bool m_shouldProduceT0s
If T0s should be produced (usually only true for use cases with multiple drift volumes)
ClusterCollection m_clusters
The input collection of Clusters.
void GetCollections()
Get the collections and associations from m_pEvent with the required labels.
SliceCollection m_slices
The input collection of Slices.
SpacePointToHitAssoc m_spacePointHitMap
The input associations: SpacePoint -> Hit.
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector