LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CollectionSplitting_module.cc
Go to the documentation of this file.
1 
10 
11 #include "fhiclcpp/ParameterSet.h"
12 
13 #include <memory>
14 
15 namespace lar_pandora {
16 
17  class CollectionSplitting;
18 
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 
44 
45 } // namespace lar_pandora
46 
47 //------------------------------------------------------------------------------------------------------------------------------------------
48 // implementation follows
49 
59 
61 
62 namespace lar_pandora {
63 
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 
97  if (m_shouldProduceT0s) {
98  produces<std::vector<anab::T0>>();
99  produces<art::Assns<recob::PFParticle, anab::T0>>();
100  }
101  }
102 
103  //------------------------------------------------------------------------------------------------------------------------------------------
104 
106  {
109  const lar_pandora::LArPandoraEvent pandoraEvent(this, &evt, labels, m_shouldProduceT0s);
110 
111  pandoraEvent.WriteToEvent();
112  }
113 
114 } // namespace lar_pandora
std::string m_trackProducerLabel
Label for the track producer using the Pandora instance that produced the collections we want to spli...
LArPandoraEvent class.
Declaration of signal hit object.
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.cc:6
Class to keep data related to recob::Hit associated with recob::Track.
std::string m_showerProducerLabel
Label for the shower producer using the Pandora instance that produced the collections we want to spl...
CollectionSplitting & operator=(CollectionSplitting const &)=delete
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:65
A description of all outputs from an instance of pandora with functionality to filter and merge multi...
std::string m_inputProducerLabel
Label for the Pandora instance that produced the collections we want to split up. ...
bool m_shouldProduceT0s
If we should produce T0s (relevant when stitching over multiple drift volumes)
Provides recob::Track data product.
Declaration of cluster object.
CollectionSplitting(fhicl::ParameterSet const &pset)
Class to handle the required producer labels.
TCEvent evt
Definition: DataStructs.cxx:8
Float_t e
Definition: plot.C:35
std::string m_hitProducerLabel
Label for the hit producer that was used as input to the Pandora instance specified.
void WriteToEvent() const
Write (put) the collections in this LArPandoraEvent to the art::Event.