50 std::unique_ptr<TriggerPrimitiveFinderTool>
m_finder;
58 produces<std::vector<recob::Hit>>();
59 produces<art::Assns<raw::RawDigit, recob::Hit>>();
65 auto& digits_in =*digits_handle;
68 std::vector<std::vector<short>> collection_samples;
69 std::vector<unsigned int> channel_numbers;
70 std::map<raw::ChannelID_t, const raw::RawDigit*> chanToDigit;
71 for(
auto&& digit: digits_in){
75 chanToDigit[digit.Channel()]=&digit;
76 channel_numbers.push_back(digit.Channel());
77 collection_samples.push_back(digit.ADCs());
82 std::vector<TriggerPrimitiveFinderTool::Hit> hits=
m_finder->findHits(channel_numbers, collection_samples);
86 for(
auto const&
hit : hits){
89 std::cout <<
"No digit with channel " <<
hit.channel <<
" found. Did you set the channel correctly?" <<
std::endl;
97 hit.startTime+
hit.timeOverThreshold,
98 hit.timeOverThreshold,
std::unique_ptr< TriggerPrimitiveFinderTool > m_finder
Collection of charge vs time digitized from a single readout channel.
EDProducer(fhicl::ParameterSet const &pset)
void produce(art::Event &e) override
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
art framework interface to geometry description
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.
#define DEFINE_ART_MODULE(klass)
TriggerPrimitiveFinder(fhicl::ParameterSet const &p)
TriggerPrimitiveFinder & operator=(TriggerPrimitiveFinder const &)=delete
enum geo::_plane_sigtype SigType_t
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
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.
Detector simulation of raw signals on wires.
LArSoft geometry interface.
QTextStream & endl(QTextStream &s)
Signal from collection planes.