134 const Waveform& waveform = dataRange.data();
137 fWaveformTool->triangleSmooth(rawDerivativeVec, derivativeVec);
140 size_t plane = wids[0].Plane;
141 size_t cryo = wids[0].Cryostat;
142 size_t tpc = wids[0].TPC;
143 size_t wire = wids[0].Wire;
146 hitCandidateVec.clear();
156 if (hitCandidateVec.empty()) {
158 std::cout <<
"** C/T/P: " << cryo <<
"/" << tpc <<
"/" << plane <<
", wire: " << wire
159 <<
" has not hits with input size: " << waveform.size() << std::endl;
164 for (
auto& hitCandidate : hitCandidateVec) {
165 size_t centerIdx = hitCandidate.hitCenter;
167 hitCandidate.hitHeight = waveform.at(centerIdx);
183 Form(
"HitPlane_%1zu/ev%04zu/c%1zut%1zuwire_%05zu", plane, eventCount, cryo, tpc, wire));
185 size_t waveformSize = waveform.size();
186 int waveStart = roiStartTick;
187 int waveStop = waveStart + waveformSize;
189 TProfile* waveHist = dir.make<TProfile>(
190 Form(
"HWfm_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
197 TProfile* derivHist = dir.make<TProfile>(
198 Form(
"HDer_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
205 TProfile* candHitHist = dir.make<TProfile>(
206 Form(
"HCan_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
213 TProfile* maxDerivHist = dir.make<TProfile>(
214 Form(
"HMax_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
223 for (
size_t idx = 0; idx < waveform.size(); idx++) {
224 waveHist->Fill(roiStartTick + idx, waveform.at(idx));
225 derivHist->Fill(roiStartTick + idx, derivativeVec.at(idx));
229 for (
const auto& hitCandidate : hitCandidateVec) {
230 candHitHist->Fill(hitCandidate.hitCenter, hitCandidate.hitHeight);
231 maxDerivHist->Fill(hitCandidate.maxTick, hitCandidate.maxDerivative);
232 maxDerivHist->Fill(hitCandidate.minTick, hitCandidate.minDerivative);
234 fDStopStartHist->Fill(hitCandidate.stopTick - hitCandidate.startTick, 1.);
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
BEGIN_PROLOG could also be cout