67 auto& digits_in =*digits_handle;
70 std::vector<std::vector<short>> induction_samples;
71 std::vector<std::vector<short>> collection_samples;
72 std::vector<unsigned int> induction_channel_numbers;
73 std::vector<unsigned int> collection_channel_numbers;
74 std::map<raw::ChannelID_t, const raw::RawDigit*> indChanToDigit;
75 std::map<raw::ChannelID_t, const raw::RawDigit*> colChanToDigit;
76 for(
auto&& digit: digits_in){
80 indChanToDigit[digit.Channel()]=&digit;
81 induction_channel_numbers.push_back(digit.Channel());
82 induction_samples.push_back(digit.ADCs());
85 colChanToDigit[digit.Channel()]=&digit;
86 collection_channel_numbers.push_back(digit.Channel());
87 collection_samples.push_back(digit.ADCs());
92 std::vector<RunningSumTPFinderTool::Hit> hits1=
m_finder1->findHits( induction_channel_numbers, induction_samples);
93 std::vector<RunningSumTPFinderTool::Hit> hits2=
m_finder2->findHits(collection_channel_numbers, collection_samples);
97 for(
auto const&
hit : hits1){
100 std::cout <<
"No digit with channel " <<
hit.channel <<
" found. Did you set the channel correctly?" <<
std::endl;
108 hit.startTime+
hit.timeOverThreshold,
109 hit.timeOverThreshold,
125 for(
auto const&
hit : hits2){
128 std::cout <<
"No digit with channel " <<
hit.channel <<
" found. Did you set the channel correctly?" <<
std::endl;
136 hit.startTime+
hit.timeOverThreshold,
137 hit.timeOverThreshold,
Collection of charge vs time digitized from a single readout channel.
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.
std::unique_ptr< RunningSumTPFinderTool > m_finder1
Class managing the creation of a new recob::Hit object.
A class handling a collection of hits and its associations.
Signal from induction planes.
enum geo::_plane_sigtype SigType_t
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Detector simulation of raw signals on wires.
LArSoft geometry interface.
QTextStream & endl(QTextStream &s)
Signal from collection planes.
std::unique_ptr< RunningSumTPFinderTool > m_finder2