20 #include "art/Framework/Core/EDProducer.h"
21 #include "art/Framework/Core/ModuleMacros.h"
22 #include "art/Framework/Principal/Event.h"
23 #include "art/Framework/Services/Registry/ServiceHandle.h"
24 #include "canvas/Persistency/Common/FindOneP.h"
45 art::ServiceHandle<geo::Geometry const>
fGeom;
54 : EDProducer{pset}, fDisambigAlg(pset.get<fhicl::ParameterSet>(
"DisambigAlg"))
56 fChanHitLabel = pset.get<std::string>(
"ChanHitLabel");
72 art::Handle<std::vector<recob::Hit>> ChannelHits;
77 art::FindOneP<raw::RawDigit> ChannelHitRawDigits(ChannelHits, evt,
fChanHitLabel);
78 art::FindOneP<recob::Wire> ChannelHitWires(ChannelHits, evt,
fChanHitLabel);
81 std::vector<art::Ptr<recob::Hit>> ChHits;
82 art::fill_ptr_vector(ChHits, ChannelHits);
83 for (
size_t h = 0;
h < ChHits.size();
h++) {
84 if (ChHits[
h]->View() !=
geo::kZ)
continue;
86 art::Ptr<recob::Wire> wire = ChannelHitWires.at(
h);
87 art::Ptr<raw::RawDigit> rawdigits = ChannelHitRawDigits.at(
h);
94 auto const clock_data =
95 art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
97 art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(evt, clock_data);
110 art::Ptr<recob::Hit>::key_type hit_index = hit.key();
111 art::Ptr<recob::Wire> wire = ChannelHitWires.at(hit_index);
112 art::Ptr<raw::RawDigit> rawdigits = ChannelHitRawDigits.at(hit_index);
apa::DisambigAlg fDisambigAlg
Declaration of signal hit object.
std::string fChanHitLabel
Definition of basic raw digits.
Planes which measure Z direction.
void RunDisambig(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, art::Handle< std::vector< recob::Hit >> GausHits)
APAHitFinder(fhicl::ParameterSet const &pset)
static void declare_products(art::ProducesCollector &collector, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Declares the hit products we are going to fill.
Class managing the creation of a new recob::Hit object.
Helper functions to create a hit.
A class handling a collection of hits and its associations.
void emplace_back(recob::Hit &&hit, art::Ptr< recob::Wire > const &wire=art::Ptr< recob::Wire >(), art::Ptr< raw::RawDigit > const &digits=art::Ptr< raw::RawDigit >())
Adds the specified hit to the data collection.
void put_into(art::Event &)
Moves the data into an event.
art::ServiceHandle< geo::Geometry const > fGeom
std::vector< std::pair< art::Ptr< recob::Hit >, geo::WireID > > fDisambigHits
The final list of hits to pass back to be made.
Declaration of basic channel signal object.
recob::Hit && move()
Prepares the constructed hit to be moved away.
void produce(art::Event &evt) override