132 const Waveform& waveform = dataRange.data();
135 fWaveformTool->triangleSmooth(rawDerivativeVec, derivativeVec);
138 size_t plane = wids[0].Plane;
139 size_t cryo = wids[0].Cryostat;
140 size_t tpc = wids[0].TPC;
141 size_t wire = wids[0].Wire;
144 hitCandidateVec.clear();
154 if (hitCandidateVec.empty()) {
156 std::cout <<
"** C/T/P: " << cryo <<
"/" << tpc <<
"/" << plane <<
", wire: " << wire
157 <<
" has not hits with input size: " << waveform.size() <<
std::endl;
162 for (
auto& hitCandidate : hitCandidateVec) {
163 size_t centerIdx = hitCandidate.hitCenter;
165 hitCandidate.hitHeight = waveform.at(centerIdx);
181 Form(
"HitPlane_%1zu/ev%04zu/c%1zut%1zuwire_%05zu", plane, eventCount, cryo, tpc, wire));
183 size_t waveformSize = waveform.size();
184 int waveStart = roiStartTick;
185 int waveStop = waveStart + waveformSize;
187 TProfile* waveHist = dir.make<TProfile>(
188 Form(
"HWfm_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
195 TProfile* derivHist = dir.make<TProfile>(
196 Form(
"HDer_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
203 TProfile* candHitHist = dir.make<TProfile>(
204 Form(
"HCan_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
211 TProfile* maxDerivHist = dir.make<TProfile>(
212 Form(
"HMax_%03zu_ctw%01zu-%01zu-%01zu-%05zu", channelCnt, cryo, tpc, plane, wire),
221 for (
size_t idx = 0; idx < waveform.size(); idx++) {
222 waveHist->Fill(roiStartTick + idx, waveform.at(idx));
223 derivHist->Fill(roiStartTick + idx, derivativeVec.at(idx));
227 for (
const auto& hitCandidate : hitCandidateVec) {
228 candHitHist->Fill(hitCandidate.hitCenter, hitCandidate.hitHeight);
229 maxDerivHist->Fill(hitCandidate.maxTick, hitCandidate.maxDerivative);
230 maxDerivHist->Fill(hitCandidate.minTick, hitCandidate.minDerivative);
232 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.
QTextStream & endl(QTextStream &s)