Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
CollectionSplitting_module.cc
Go to the documentation of this file.
1
7#include "art/Framework/Core/EDProducer.h"
8#include "art/Framework/Core/ModuleMacros.h"
9#include "art/Framework/Principal/Event.h"
10
11#include "fhiclcpp/ParameterSet.h"
12
13#include <memory>
14
15namespace lar_pandora {
16
17 class CollectionSplitting;
18
19 class CollectionSplitting : public art::EDProducer {
20 public:
21 explicit CollectionSplitting(fhicl::ParameterSet const& pset);
22
27
28 void produce(art::Event& e) override;
29
30 private:
31 std::string
33 std::string
35 std::string
37 std::string
39 bool
41 };
42
43 DEFINE_ART_MODULE(CollectionSplitting)
44
45} // namespace lar_pandora
46
47//------------------------------------------------------------------------------------------------------------------------------------------
48// implementation follows
49
50#include "lardataobj/RecoBase/Cluster.h"
51#include "lardataobj/RecoBase/Hit.h"
52#include "lardataobj/RecoBase/PCAxis.h"
53#include "lardataobj/RecoBase/Shower.h"
54#include "lardataobj/RecoBase/Slice.h"
55#include "lardataobj/RecoBase/SpacePoint.h"
56#include "lardataobj/RecoBase/Track.h"
57#include "lardataobj/RecoBase/TrackHitMeta.h"
58#include "lardataobj/RecoBase/Vertex.h"
59
61
62namespace lar_pandora {
63
64 CollectionSplitting::CollectionSplitting(fhicl::ParameterSet const& pset)
65 : EDProducer{pset}
66 , m_inputProducerLabel(pset.get<std::string>("InputProducerLabel"))
67 , m_trackProducerLabel(pset.get<std::string>("TrackProducerLabel"))
68 , m_showerProducerLabel(pset.get<std::string>("ShowerProducerLabel"))
69 , m_hitProducerLabel(pset.get<std::string>("HitProducerLabel"))
70 , m_shouldProduceT0s(pset.get<bool>("ShouldProduceT0s", false))
71 {
72 produces<std::vector<recob::PFParticle>>();
73 produces<std::vector<recob::SpacePoint>>();
74 produces<std::vector<recob::Cluster>>();
75 produces<std::vector<recob::Vertex>>();
76 produces<std::vector<recob::Slice>>();
77 produces<std::vector<recob::Track>>();
78 produces<std::vector<recob::Shower>>();
79 produces<std::vector<recob::PCAxis>>();
80 produces<std::vector<larpandoraobj::PFParticleMetadata>>();
81
82 produces<art::Assns<recob::PFParticle, recob::SpacePoint>>();
83 produces<art::Assns<recob::PFParticle, recob::Cluster>>();
84 produces<art::Assns<recob::PFParticle, recob::Vertex>>();
85 produces<art::Assns<recob::PFParticle, recob::Slice>>();
86 produces<art::Assns<recob::PFParticle, recob::Track>>();
87 produces<art::Assns<recob::PFParticle, recob::Shower>>();
88 produces<art::Assns<recob::PFParticle, recob::PCAxis>>();
89 produces<art::Assns<recob::PFParticle, larpandoraobj::PFParticleMetadata>>();
90 produces<art::Assns<recob::Track, recob::Hit, recob::TrackHitMeta>>();
91 produces<art::Assns<recob::Shower, recob::Hit>>();
92 produces<art::Assns<recob::Shower, recob::PCAxis>>();
93 produces<art::Assns<recob::SpacePoint, recob::Hit>>();
94 produces<art::Assns<recob::Cluster, recob::Hit>>();
95 produces<art::Assns<recob::Slice, recob::Hit>>();
96
98 produces<std::vector<anab::T0>>();
99 produces<art::Assns<recob::PFParticle, anab::T0>>();
100 }
101 }
102
103 //------------------------------------------------------------------------------------------------------------------------------------------
104
105 void CollectionSplitting::produce(art::Event& evt)
106 {
109 const lar_pandora::LArPandoraEvent pandoraEvent(this, &evt, labels, m_shouldProduceT0s);
110
111 pandoraEvent.WriteToEvent();
112 }
113
114} // namespace lar_pandora
A description of all outputs from an instance of pandora with functionality to filter and merge multi...
CollectionSplitting & operator=(CollectionSplitting const &)=delete
CollectionSplitting(CollectionSplitting const &)=delete
std::string m_trackProducerLabel
Label for the track producer using the Pandora instance that produced the collections we want to spli...
std::string m_hitProducerLabel
Label for the hit producer that was used as input to the Pandora instance specified.
bool m_shouldProduceT0s
If we should produce T0s (relevant when stitching over multiple drift volumes)
CollectionSplitting(fhicl::ParameterSet const &pset)
std::string m_inputProducerLabel
Label for the Pandora instance that produced the collections we want to split up.
CollectionSplitting & operator=(CollectionSplitting &&)=delete
std::string m_showerProducerLabel
Label for the shower producer using the Pandora instance that produced the collections we want to spl...
CollectionSplitting(CollectionSplitting &&)=delete
Class to handle the required producer labels.
LArPandoraEvent class.
void WriteToEvent() const
Write (put) the collections in this LArPandoraEvent to the art::Event.