Interface for filling histograms.
261 std::vector<const recob::Wire*> wireVec;
264 for(
size_t idx = 0; idx < wirePtrVec.size(); idx++) wireVec.push_back(wirePtrVec.at(idx).get());
270 for(
const auto& wire : wireVec)
276 size_t cryo = wids[0].Cryostat;
277 size_t tpc = wids[0].TPC;
278 size_t plane = wids[0].Plane;
279 size_t wireNum = wids[0].Wire;
282 art::TFileDirectory
dir =
fHistDirectory->mkdir(Form(
"WavePlane_%1zu/c%1zu/c%1zut%1zuwire_%05zu",plane,
size_t(eventNum),cryo,tpc,wireNum));
285 bool hasSignal = channelMap.find(channel) != channelMap.end();
287 if (!hasSignal)
continue;
291 for(
const auto& range : signalROI.
get_ranges())
293 const Waveform& waveform = range.data();
301 fWaveformTool->getTruncatedMeanRMS(waveform, truncMean, fullRMS, truncRMS, nTrunc);
306 fNumTruncHist.at(plane)->Fill(
float(nTrunc)/
float(waveform.size()),1.);
319 fWaveformTool->triangleSmooth(rawDerivativeVec,derivativeVec);
323 dir.make<TProfile>(Form(
"WWfm_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Waveform", waveform.size(), 0, waveform.size(), -500., 500.);
324 TProfile* derivHist =
325 dir.make<TProfile>(Form(
"WDer_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Derivative", waveform.size(), 0, waveform.size(), -500., 500.);
326 TProfile* candHitHist =
327 dir.make<TProfile>(Form(
"WPeak_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Peaks", waveform.size(), 0, waveform.size(), -500., 500.);
328 TProfile* edgeHitHist =
329 dir.make<TProfile>(Form(
"WEdge_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Edges", waveform.size(), 0, waveform.size(), -500., 500.);
331 for(
size_t idx = 0; idx < waveform.size(); idx++)
333 waveHist->Fill(idx, waveform.at(idx), 1.);
334 derivHist->Fill(idx, derivativeVec.at(idx), 1.);
338 findHitCandidates(derivativeVec.begin(),derivativeVec.end(),0,plane,hitCandidateVec);
341 for(
auto& hitCandidate : hitCandidateVec)
343 size_t centerIdx = hitCandidate.hitCenter;
345 candHitHist->Fill(hitCandidate.maxTick, hitCandidate.maxDerivative, 1.);
346 candHitHist->Fill(hitCandidate.minTick, hitCandidate.minDerivative, 1.);
347 edgeHitHist->Fill(hitCandidate.startTick, 1.);
348 edgeHitHist->Fill(hitCandidate.stopTick, 1.);
350 hitCandidate.hitHeight = waveform.at(centerIdx);
366 dir.make<TProfile>(Form(
"WEro_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Erosion", waveform.size(), 0, waveform.size(), -500., 500.);
368 dir.make<TProfile>(Form(
"WDil_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Dilation", waveform.size(), 0, waveform.size(), -500., 500.);
370 dir.make<TProfile>(Form(
"WAve_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Average", waveform.size(), 0, waveform.size(), -500., 500.);
372 dir.make<TProfile>(Form(
"WDif_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Difference", waveform.size(), 0, waveform.size(), -500., 500.);
374 dir.make<TProfile>(Form(
"WClo_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Closing", waveform.size(), 0, waveform.size(), -500., 500.);
376 dir.make<TProfile>(Form(
"WOpe_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Opening", waveform.size(), 0, waveform.size(), -500., 500.);
378 dir.make<TProfile>(Form(
"WDOC_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Difference", waveform.size(), 0, waveform.size(), -500., 500.);
390 findHitCandidates(openingVec.begin(),openingVec.end(),differenceVec.begin(),differenceVec.end(),0,plane,hitCandidateMorphVec);
392 TProfile* candMorphHist =
393 dir.make<TProfile>(Form(
"MPeak_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Peaks", waveform.size(), 0, waveform.size(), -500., 500.);
394 TProfile* edgeMorphHist =
395 dir.make<TProfile>(Form(
"MEdge_%03zu_ctw%01zu-%01zu-%01zu-%05zu-%05zu",
size_t(eventNum),cryo,tpc,plane,wireNum,
size_t(roiStartTick)),
"Edges", waveform.size(), 0, waveform.size(), -500., 500.);
398 for(
auto& hitCandidate : hitCandidateMorphVec)
400 size_t centerIdx = hitCandidate.hitCenter;
402 candMorphHist->Fill(hitCandidate.maxTick, hitCandidate.maxDerivative, 1.);
403 candMorphHist->Fill(hitCandidate.minTick, hitCandidate.minDerivative, 1.);
404 candMorphHist->Fill(hitCandidate.hitCenter, waveform.at(hitCandidate.hitCenter), 1.);
405 edgeMorphHist->Fill(hitCandidate.startTick, 1.);
406 edgeMorphHist->Fill(hitCandidate.stopTick, 1.);
408 hitCandidate.hitHeight = waveform.at(centerIdx);
std::vector< HitCandidate_t > HitCandidateVec
std::vector< float > Waveform
std::vector< TH1D * > fNumTruncHist
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
const range_list_t & get_ranges() const
Returns the internal list of non-void ranges.
int TDCtick_t
Type representing a TDC tick.
std::vector< TH1D * > fFullRmsHist
raw::ChannelID_t Channel() const
Returns the ID of the channel (or InvalidChannelID)
std::unique_ptr< reco_tool::IWaveformTool > fWaveformTool
art::TFileDirectory * fHistDirectory
std::vector< TH1D * > fTruncMeanHist
Class holding the regions of interest of signal from a channel.
const geo::GeometryCore & fGeometry
pointer to Geometry service
void findHitCandidates(Waveform::const_iterator, Waveform::const_iterator, size_t, size_t, HitCandidateVec &) const
unsigned int ChannelID_t
Type representing the ID of a readout channel.
std::vector< TH1D * > fTruncRmsHist