All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
caldata::Decon1DROI Class Reference
Inheritance diagram for caldata::Decon1DROI:

Classes

class  multiThreadDeconvolutionProcessing
 

Public Member Functions

 Decon1DROI (fhicl::ParameterSet const &, art::ProcessingFrame const &)
 
void produce (art::Event &evt, art::ProcessingFrame const &) override
 
void reconfigure (fhicl::ParameterSet const &p)
 

Private Member Functions

float fixTheFreakingWaveform (const std::vector< float > &, raw::ChannelID_t, std::vector< float > &) const
 
float getTruncatedRMS (const std::vector< float > &) const
 
void processChannel (size_t, art::Event &, art::Handle< std::vector< raw::RawDigit >>, std::vector< recob::Wire > &, art::Assns< raw::RawDigit, recob::Wire > &, const std::string &) const
 

Private Attributes

std::vector< art::InputTag > fRawDigitLabelVec
 
unsigned short fNoiseSource
 Used to determine ROI threshold. More...
 
int fSaveWireWF
 Save recob::wire object waveforms. More...
 
size_t fEventCount
 count of event processed More...
 
int fMinAllowedChanStatus
 Don't consider channels with lower status. More...
 
float fTruncRMSThreshold
 Calculate RMS up to this threshold... More...
 
float fTruncRMSMinFraction
 or at least this fraction of time bins More...
 
bool fOutputHistograms
 Output histograms? More...
 
std::vector< std::unique_ptr
< icarus_tool::IROIFinder > > 
fROIFinderVec
 ROI finders per plane. More...
 
std::unique_ptr
< icarus_tool::IDeconvolution
fDeconvolution
 
std::unique_ptr
< icarus_tool::IBaseline
fBaseline
 
icarus_signal_processing::WaveformTools
< float > 
fWaveformTool
 
const geo::GeometryCorefGeometry = lar::providerFrom<geo::Geometry>()
 
const
lariov::ChannelStatusProvider
fChannelFilter = lar::providerFrom<lariov::ChannelStatusService>()
 
const lariov::DetPedestalProviderfPedRetrievalAlg = lar::providerFrom<lariov::DetPedestalService>()
 
std::vector< TH1F * > fPedestalOffsetVec
 
std::vector< TH1F * > fFullRMSVec
 
std::vector< TH1F * > fTruncRMSVec
 
std::vector< TH1F * > fNumTruncBinsVec
 
std::vector< TProfile * > fPedByChanVec
 
std::vector< TProfile * > fTruncRMSByChanVec
 
std::vector< TH1F * > fNumROIsHistVec
 
std::vector< TH1F * > fROILenHistVec
 

Detailed Description

Definition at line 66 of file Decon1DROI_module.cc.

Constructor & Destructor Documentation

caldata::Decon1DROI::Decon1DROI ( fhicl::ParameterSet const &  pset,
art::ProcessingFrame const &  frame 
)
explicit

Definition at line 162 of file Decon1DROI_module.cc.

162  : art::ReplicatedProducer(pset,frame)
163 {
164  this->reconfigure(pset);
165 
166  // We create a separate output instance for each input instance
167  for(const auto& rawDigit : fRawDigitLabelVec)
168  {
169  produces< std::vector<recob::Wire> >(rawDigit.instance());
170  produces<art::Assns<raw::RawDigit, recob::Wire>>(rawDigit.instance());
171  }
172  fEventCount = 0;
173 }
size_t fEventCount
count of event processed
void reconfigure(fhicl::ParameterSet const &p)
std::vector< art::InputTag > fRawDigitLabelVec

Member Function Documentation

float caldata::Decon1DROI::fixTheFreakingWaveform ( const std::vector< float > &  waveform,
raw::ChannelID_t  channel,
std::vector< float > &  fixedWaveform 
) const
private

Definition at line 347 of file Decon1DROI_module.cc.

348 {
349  // do rms calculation - the old fashioned way and over all adc values
350  std::vector<float> locWaveform = waveform;
351 
352  // sort in ascending order so we can truncate the sume
353  std::sort(locWaveform.begin(), locWaveform.end(),[](const auto& left, const auto& right){return std::fabs(left) < std::fabs(right);});
354 
355  // Get the mean of the waveform we're checking...
356  float sumWaveform = std::accumulate(locWaveform.begin(),locWaveform.begin() + locWaveform.size()/2, 0.);
357  float meanWaveform = sumWaveform / float(locWaveform.size()/2);
358 
359  std::vector<float> locWaveformDiff(locWaveform.size()/2);
360 
361  std::transform(locWaveform.begin(),locWaveform.begin() + locWaveform.size()/2,locWaveformDiff.begin(), std::bind(std::minus<float>(),std::placeholders::_1,meanWaveform));
362 
363  float localRMS = std::inner_product(locWaveformDiff.begin(), locWaveformDiff.end(), locWaveformDiff.begin(), 0.);
364 
365  localRMS = std::sqrt(std::max(float(0.),localRMS / float(locWaveformDiff.size())));
366 
367  float threshold = 6. * localRMS;
368 
369  std::vector<float>::iterator threshItr = std::find_if(locWaveform.begin(),locWaveform.end(),[threshold](const auto& val){return std::fabs(val) > threshold;});
370 
371  int minNumBins = std::max(int(fTruncRMSMinFraction * locWaveform.size()),int(std::distance(locWaveform.begin(),threshItr)));
372 
373  // recalculate the mean
374  float aveSum = std::accumulate(locWaveform.begin(), locWaveform.begin() + minNumBins, 0.);
375  float newPedestal = aveSum / minNumBins;
376 
377  // recalculate the rms
378  locWaveformDiff.resize(minNumBins);
379 
380  std::transform(locWaveform.begin(),locWaveform.begin() + minNumBins,locWaveformDiff.begin(), std::bind(std::minus<float>(),std::placeholders::_1,newPedestal));
381 
382  localRMS = std::inner_product(locWaveform.begin(), locWaveform.begin() + minNumBins, locWaveform.begin(), 0.);
383  localRMS = std::sqrt(std::max(float(0.),localRMS / float(minNumBins)));
384 
385  // Set the waveform to the new baseline
386  std::transform(waveform.begin(), waveform.end(), fixedWaveform.begin(), [newPedestal](const auto& val){return val - newPedestal;});
387 
388  // Fill histograms
389  if (fOutputHistograms)
390  {
391  std::vector<geo::WireID> wids;
392  try
393  {
394  wids = fGeometry->ChannelToWire(channel);
395  }
396  catch(...)
397  {
398  std::cout << "Caught exception looking up channel" << std::endl;
399  return localRMS;
400  }
401 
402  // Recover plane and wire in the plane
403  size_t plane = wids[0].Plane;
404  size_t wire = wids[0].Wire;
405 
406 // float fullRMS = std::inner_product(locWaveform.begin(), locWaveform.end(), locWaveform.begin(), 0.);
407 
408 // fullRMS = std::sqrt(std::max(float(0.),fullRMS / float(locWaveform.size())));
409 
410  fPedestalOffsetVec[plane]->Fill(newPedestal,1.);
411 // fFullRMSVec[plane]->Fill(fullRMS, 1.);
412  fTruncRMSVec[plane]->Fill(localRMS, 1.);
413  fNumTruncBinsVec[plane]->Fill(minNumBins, 1.);
414  fPedByChanVec[plane]->Fill(wire, newPedestal, 1.);
415  fTruncRMSByChanVec[plane]->Fill(wire, localRMS, 1.);
416  }
417 
418  return localRMS;
419 }
std::vector< TH1F * > fPedestalOffsetVec
static constexpr Sample_t transform(Sample_t sample)
walls no right
Definition: selectors.fcl:105
float fTruncRMSMinFraction
or at least this fraction of time bins
bool fOutputHistograms
Output histograms?
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
std::vector< TProfile * > fPedByChanVec
std::vector< TProfile * > fTruncRMSByChanVec
std::vector< TH1F * > fNumTruncBinsVec
walls no left
Definition: selectors.fcl:105
const geo::GeometryCore * fGeometry
std::vector< TH1F * > fTruncRMSVec
BEGIN_PROLOG could also be cout
float caldata::Decon1DROI::getTruncatedRMS ( const std::vector< float > &  waveform) const
private

Definition at line 325 of file Decon1DROI_module.cc.

326 {
327  // do rms calculation - the old fashioned way and over all adc values
328  std::vector<float> locWaveform = waveform;
329 
330  // sort in ascending order so we can truncate the sume
331  std::sort(locWaveform.begin(), locWaveform.end(),[](const auto& left, const auto& right){return std::fabs(left) < std::fabs(right);});
332 
333  float threshold = fTruncRMSThreshold;
334 
335  std::vector<float>::iterator threshItr = std::find_if(locWaveform.begin(),locWaveform.end(),[threshold](const auto& val){return std::fabs(val) > threshold;});
336 
337  int minNumBins = std::max(int(fTruncRMSMinFraction * locWaveform.size()),int(std::distance(locWaveform.begin(),threshItr)));
338 
339  // Get the truncated sum
340  float truncRms = std::inner_product(locWaveform.begin(), locWaveform.begin() + minNumBins, locWaveform.begin(), 0.);
341 
342  truncRms = std::sqrt(std::max(0.,truncRms / double(minNumBins)));
343 
344  return truncRms;
345 }
walls no right
Definition: selectors.fcl:105
float fTruncRMSMinFraction
or at least this fraction of time bins
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
walls no left
Definition: selectors.fcl:105
float fTruncRMSThreshold
Calculate RMS up to this threshold...
void caldata::Decon1DROI::processChannel ( size_t  idx,
art::Event &  event,
art::Handle< std::vector< raw::RawDigit >>  digitVecHandle,
std::vector< recob::Wire > &  wireColVec,
art::Assns< raw::RawDigit, recob::Wire > &  wireAssns,
const std::string &  instance 
) const
private

Definition at line 421 of file Decon1DROI_module.cc.

427 {
428  // vector that will be moved into the Wire object
431 
432  // get the reference to the current raw::RawDigit
433  art::Ptr<raw::RawDigit> digitVec(digitVecHandle, idx);
434 
435  raw::ChannelID_t channel = digitVec->Channel();
436 
437  // The following test is meant to be temporary until the "correct" solution is implemented
438  if (!fChannelFilter->IsPresent(channel)) return;
439 
440  // The waveforms should have been set to a 0. pedestal...
441  float pedestal = 0.;
442 
443  // Recover the plane info
444  std::vector<geo::WireID> wids = fGeometry->ChannelToWire(channel);
445 
446  // skip bad channels
447  if( fChannelFilter->Status(channel) < fMinAllowedChanStatus) return;
448 
449  size_t dataSize = digitVec->Samples();
450 
451  const geo::PlaneID& planeID = wids[0].planeID();
452 
453  // vector holding uncompressed adc values
454  std::vector<short> rawadc(dataSize);
455 
456  // uncompress the data
457  raw::Uncompress(digitVec->ADCs(), rawadc, digitVec->Compression());
458 
459  // loop over all adc values and subtract the pedestal
460  // When we have a pedestal database, can provide the digit timestamp as the third argument of GetPedestalMean
461  try
462  {
463  pedestal = fPedRetrievalAlg->PedMean(channel);
464  }
465  catch(...)
466  {
467  mf::LogDebug("Decon1DROI_module") << "Pedestal lookup fails with channel: " << channel << std::endl;
468  return;
469  }
470 
471 
472  // Get the pedestal subtracted data, centered in the deconvolution vector
473  std::vector<float> rawAdcLessPedVec(dataSize);
474 
475  std::transform(rawadc.begin(),rawadc.end(),rawAdcLessPedVec.begin(),std::bind(std::minus<short>(),std::placeholders::_1,pedestal));
476 
477  // It seems there are deviations from the pedestal when using wirecell for noise filtering
478  //float raw_noise = fixTheFreakingWaveform(rawAdcLessPedVec, channel, rawAdcLessPedVec);
479  float raw_noise = digitVec->GetSigma();
480 
481  // Recover a measure of the noise on the channel for use in the ROI finder
482  //float raw_noise = getTruncatedRMS(rawAdcLessPedVec);
483 
484  // Try smoothing the input waveform
485 // std::vector<float> rawAdcSmoothVec;
486 // fWaveformTool->medianSmooth(rawAdcLessPedVec,rawAdcSmoothVec);
487 
488  // Make a dummy candidate roi vec
490 
491  deconROIVec.push_back(icarus_tool::IROIFinder::CandidateROI(0,rawAdcLessPedVec.size() - 1));
492 
493  // Do the deconvolution on the full waveform
494  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(event);
495  fDeconvolution->Deconvolve(rawAdcLessPedVec, sampling_rate(clockData), channel, deconROIVec, deconVec);
496 
497  // Recover the deconvolved waveform
498  const std::vector<float>& deconvolvedWaveform = deconVec.get_ranges().front().data();
499 
500  // vector of candidate ROI begin and end bins
502 
503  // Now find the candidate ROI's
504  fROIFinderVec.at(planeID.Plane)->FindROIs(deconvolvedWaveform, channel, fEventCount, raw_noise, candRoiVec);
505 
506  std::vector<float> holder;
507 
508  // We need to copy the deconvolved (and corrected) waveform ROI's
509  for(const auto& candROI : candRoiVec)
510  {
511  // First up: copy out the relevent ADC bins into the ROI holder
512  size_t roiLen = candROI.second - candROI.first + 1;
513 
514  holder.resize(roiLen);
515 
516  std::copy(deconvolvedWaveform.begin()+candROI.first, deconvolvedWaveform.begin()+candROI.second, holder.begin());
517 
518  // Now we do the baseline determination and correct the ROI
519  //float base = fBaseline->GetBaseline(holder, channel, roiStart, roiLen);
520  float base = fBaseline->GetBaseline(holder, channel, 0, roiLen);
521 
522  std::transform(holder.begin(),holder.end(),holder.begin(),[base](auto& adcVal){return adcVal - base;});
523 
524  // add the range into ROIVec
525  ROIVec.add_range(candROI.first, std::move(holder));
526  }
527 
528  // Make some histograms?
529  if (fOutputHistograms)
530  {
531  fNumROIsHistVec.at(planeID.Plane)->Fill(candRoiVec.size(), 1.);
532 
533  for(const auto& pair : candRoiVec)
534  fROILenHistVec.at(planeID.Plane)->Fill(pair.second-pair.first, 1.);
535 
536  float fullRMS = std::inner_product(deconvolvedWaveform.begin(), deconvolvedWaveform.end(), deconvolvedWaveform.begin(), 0.);
537 
538  fullRMS = std::sqrt(std::max(float(0.),fullRMS / float(deconvolvedWaveform.size())));
539 
540  fFullRMSVec[planeID.Plane]->Fill(fullRMS, 1.);
541  }
542 
543  // Don't save empty wires
544  if (ROIVec.empty()) return;
545 
546  // First get a lock to make sure we are clear to run
547  tbb::spin_mutex::scoped_lock lock(deconvolutionSpinMutex);
548 
549  // create the new wire directly in wirecol
550  wireColVec.push_back(recob::WireCreator(std::move(ROIVec),*digitVec).move());
551 
552  // add an association between the last object in wirecol
553  // (that we just inserted) and digitVec
554  if (!util::CreateAssn(event, wireColVec, digitVec, wireAssns, instance))
555  {
556  throw art::Exception(art::errors::ProductRegistrationFailure)
557  << "Can't associate wire #" << (wireColVec.size() - 1)
558  << " with raw digit #" << digitVec.key();
559  } // if failed to add association
560 
561  return;
562 }
static constexpr Sample_t transform(Sample_t sample)
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
bool fOutputHistograms
Output histograms?
const std::string instance
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
const datarange_t & add_range(size_type offset, ITER first, ITER last)
Adds a sequence of elements as a range with specified offset.
const range_list_t & get_ranges() const
Returns the internal list of non-void ranges.
Class managing the creation of a new recob::Wire object.
Definition: WireCreator.h:53
size_t fEventCount
count of event processed
std::unique_ptr< icarus_tool::IBaseline > fBaseline
std::vector< TH1F * > fROILenHistVec
virtual bool IsPresent(raw::ChannelID_t channel) const =0
Returns whether the specified channel is physical and connected to wire.
std::vector< TH1F * > fFullRMSVec
std::unique_ptr< icarus_tool::IDeconvolution > fDeconvolution
virtual Status_t Status(raw::ChannelID_t channel) const
Returns a status integer with arbitrary meaning.
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:493
std::vector< TH1F * > fNumROIsHistVec
virtual float PedMean(raw::ChannelID_t ch) const =0
Retrieve pedestal information.
const geo::GeometryCore * fGeometry
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
bool empty() const
Returns whether the vector is empty.
const lariov::DetPedestalProvider * fPedRetrievalAlg
T copy(T const &v)
const lariov::ChannelStatusProvider * fChannelFilter
int fMinAllowedChanStatus
Don&#39;t consider channels with lower status.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
std::vector< std::unique_ptr< icarus_tool::IROIFinder > > fROIFinderVec
ROI finders per plane.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
Definition: raw.cxx:776
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
tbb::spin_mutex deconvolutionSpinMutex
void caldata::Decon1DROI::produce ( art::Event &  evt,
art::ProcessingFrame const &  frame 
)
override

Definition at line 259 of file Decon1DROI_module.cc.

260 {
261  // We loop over the collection of RawDigits in our input list
262  // This is not done multi threaded as a way to cut down on overall job memory usage...
263  for(const auto& rawDigitLabel : fRawDigitLabelVec)
264  {
265  // make a collection of Wires
266  std::unique_ptr<std::vector<recob::Wire>> wireCol(new std::vector<recob::Wire>);
267 
268  // ... and an association set
269  std::unique_ptr<art::Assns<raw::RawDigit,recob::Wire>> wireDigitAssn(new art::Assns<raw::RawDigit,recob::Wire>);
270 
271  // Read in the digit List object(s).
272  art::Handle< std::vector<raw::RawDigit>> digitVecHandle;
273 
274  evt.getByLabel(rawDigitLabel, digitVecHandle);
275 
276  if (!digitVecHandle->size())
277  {
278  std::cout << "Decon1DROI found zero length RawDigits so exiting" << std::endl;
279 
280  evt.put(std::move(wireCol), rawDigitLabel.instance());
281  evt.put(std::move(wireDigitAssn), rawDigitLabel.instance());
282  fEventCount++;
283 
284  return;
285  }
286 
287  // Reserve the room for the output
288  wireCol->reserve(digitVecHandle->size());
289 
290  // ... Launch multiple threads with TBB to do the deconvolution and find ROIs in parallel
291  multiThreadDeconvolutionProcessing deconvolutionProcessing(*this, evt, digitVecHandle, *wireCol, *wireDigitAssn, rawDigitLabel.instance());
292 
293  tbb::parallel_for(tbb::blocked_range<size_t>(0, digitVecHandle->size()), deconvolutionProcessing);
294 
295  // Time to stroe everything
296  if(wireCol->size() == 0)
297  mf::LogWarning("Decon1DROI") << "No wires made for this event.";
298 
299  //Make Histogram of recob::wire objects from Signal() vector
300  // get access to the TFile service
301  if ( fSaveWireWF ){
302  art::ServiceHandle<art::TFileService> tfs;
303  for (size_t wireN = 0; wireN < wireCol->size(); wireN++){
304  std::vector<float> sigTMP = wireCol->at(wireN).Signal();
305  TH1D* fWire = tfs->make<TH1D>(Form("Noise_Evt%04zu_N%04zu",fEventCount,wireN), ";Noise (ADC);",
306  sigTMP.size(),-0.5,sigTMP.size()-0.5);
307  for (size_t tick = 0; tick < sigTMP.size(); tick++){
308  fWire->SetBinContent(tick+1, sigTMP.at(tick) );
309  }
310  }
311  }
312 
313  // Make sure the collection is sorted
314  std::sort(wireCol->begin(), wireCol->end(), [](const auto& left, const auto& right){return left.Channel() < right.Channel();});
315 
316  evt.put(std::move(wireCol), rawDigitLabel.instance());
317  evt.put(std::move(wireDigitAssn), rawDigitLabel.instance());
318  }
319 
320  fEventCount++;
321 
322  return;
323 } // produce
walls no right
Definition: selectors.fcl:105
int fSaveWireWF
Save recob::wire object waveforms.
size_t fEventCount
count of event processed
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75
walls no left
Definition: selectors.fcl:105
std::vector< art::InputTag > fRawDigitLabelVec
art::ServiceHandle< art::TFileService > tfs
TCEvent evt
Definition: DataStructs.cxx:8
BEGIN_PROLOG could also be cout
void caldata::Decon1DROI::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 176 of file Decon1DROI_module.cc.

177 {
178  // Recover the parameters
179  fRawDigitLabelVec = pset.get< std::vector<art::InputTag>> ("RawDigitLabelVec", {"daqTPC"});
180  fNoiseSource = pset.get< unsigned short > ("NoiseSource", 3);
181  fSaveWireWF = pset.get< int > ("SaveWireWF" );
182  fMinAllowedChanStatus = pset.get< int > ("MinAllowedChannelStatus" );
183  fTruncRMSThreshold = pset.get< float > ("TruncRMSThreshold", 6.);
184  fTruncRMSMinFraction = pset.get< float > ("TruncRMSMinFraction", 0.6);
185  fOutputHistograms = pset.get< bool > ("OutputHistograms", true);
186 
187  // Recover the vector of fhicl parameters for the ROI tools
188  const fhicl::ParameterSet& roiFinderTools = pset.get<fhicl::ParameterSet>("ROIFinderToolVec");
189 
190  fROIFinderVec.resize(roiFinderTools.get_pset_names().size());
191 
192  unsigned short roiPadding(std::numeric_limits<unsigned short>::max());
193 
194  for(const std::string& roiFinderTool : roiFinderTools.get_pset_names())
195  {
196  const fhicl::ParameterSet& roiFinderToolParamSet = roiFinderTools.get<fhicl::ParameterSet>(roiFinderTool);
197  size_t planeIdx = roiFinderToolParamSet.get<size_t>("Plane");
198 
199  roiPadding = std::min(roiPadding,roiFinderToolParamSet.get< std::vector<unsigned short>>("roiLeadTrailPad")[0]);
200 
201  fROIFinderVec.at(planeIdx) = art::make_tool<icarus_tool::IROIFinder>(roiFinderToolParamSet);
202  }
203 
204  std::sort(fROIFinderVec.begin(),fROIFinderVec.end(),[](const auto& left,const auto& right){return left->plane() < right->plane();});
205 
206  fDeconvolution = art::make_tool<icarus_tool::IDeconvolution>(pset.get<fhicl::ParameterSet>("Deconvolution"));
207 
208  // Recover the baseline tool
209  fhicl::ParameterSet baselineParams = pset.get<fhicl::ParameterSet>("Baseline");
210 
211  // Check if we need to set the length for setting the baseline
212  if (baselineParams.has_key("MaxROILength")) baselineParams.put_or_replace("MaxROILength",size_t(roiPadding));
213 
214  fBaseline = art::make_tool<icarus_tool::IBaseline> (baselineParams);
215 
216  if (fOutputHistograms)
217  {
218  // Access ART's TFileService, which will handle creating and writing
219  // histograms and n-tuples for us.
220  art::ServiceHandle<art::TFileService> tfs;
221 
222  fPedestalOffsetVec.resize(3);
223  fFullRMSVec.resize(3);
224  fTruncRMSVec.resize(3);
225  fNumTruncBinsVec.resize(3);
226  fPedByChanVec.resize(3);
227  fTruncRMSByChanVec.resize(3);
228  fNumROIsHistVec.resize(3);
229  fROILenHistVec.resize(3);
230 
231  for(size_t planeIdx = 0; planeIdx < 3; planeIdx++)
232  {
233  fPedestalOffsetVec[planeIdx] = tfs->make<TH1F>( Form("PedPlane_%02zu",planeIdx), ";Pedestal Offset (ADC);", 100, -5., 5.);
234  fFullRMSVec[planeIdx] = tfs->make<TH1F>( Form("RMSFPlane_%02zu",planeIdx), "Full RMS;RMS (ADC);", 400, 0., 40.);
235  fTruncRMSVec[planeIdx] = tfs->make<TH1F>( Form("RMSTPlane_%02zu",planeIdx), "Truncated RMS;RMS (ADC);", 100, 0., 10.);
236  fNumTruncBinsVec[planeIdx] = tfs->make<TH1F>( Form("NTruncBins_%02zu",planeIdx), ";# bins", 640, 0., 6400.);
237  fPedByChanVec[planeIdx] = tfs->make<TProfile>(Form("PedByWirePlane_%02zu",planeIdx), ";Wire#", fGeometry->Nwires(planeIdx), 0., fGeometry->Nwires(planeIdx), -5., 5.);
238  fTruncRMSByChanVec[planeIdx] = tfs->make<TProfile>(Form("TruncRMSByWirePlane_%02zu",planeIdx), ";Wire#", fGeometry->Nwires(planeIdx), 0., fGeometry->Nwires(planeIdx), 0., 10.);
239  fNumROIsHistVec[planeIdx] = tfs->make<TH1F>( Form("NROISplane_%02zu",planeIdx), ";# ROIs;", 100, 0, 100);
240  fROILenHistVec[planeIdx] = tfs->make<TH1F>( Form("ROISIZEplane_%02zu",planeIdx), ";ROI size;", 500, 0, 500);
241  }
242  }
243 
244  return;
245 }
std::vector< TH1F * > fPedestalOffsetVec
unsigned short fNoiseSource
Used to determine ROI threshold.
walls no right
Definition: selectors.fcl:105
float fTruncRMSMinFraction
or at least this fraction of time bins
bool fOutputHistograms
Output histograms?
int fSaveWireWF
Save recob::wire object waveforms.
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
std::unique_ptr< icarus_tool::IBaseline > fBaseline
std::vector< TH1F * > fROILenHistVec
std::vector< TH1F * > fFullRMSVec
std::vector< TProfile * > fPedByChanVec
std::vector< TProfile * > fTruncRMSByChanVec
std::unique_ptr< icarus_tool::IDeconvolution > fDeconvolution
std::vector< TH1F * > fNumTruncBinsVec
walls no left
Definition: selectors.fcl:105
std::vector< TH1F * > fNumROIsHistVec
const geo::GeometryCore * fGeometry
float fTruncRMSThreshold
Calculate RMS up to this threshold...
std::vector< art::InputTag > fRawDigitLabelVec
int fMinAllowedChanStatus
Don&#39;t consider channels with lower status.
std::vector< TH1F * > fTruncRMSVec
art::ServiceHandle< art::TFileService > tfs
std::vector< std::unique_ptr< icarus_tool::IROIFinder > > fROIFinderVec
ROI finders per plane.

Member Data Documentation

std::unique_ptr<icarus_tool::IBaseline> caldata::Decon1DROI::fBaseline
private

Definition at line 139 of file Decon1DROI_module.cc.

const lariov::ChannelStatusProvider* caldata::Decon1DROI::fChannelFilter = lar::providerFrom<lariov::ChannelStatusService>()
private

Definition at line 144 of file Decon1DROI_module.cc.

std::unique_ptr<icarus_tool::IDeconvolution> caldata::Decon1DROI::fDeconvolution
private

Definition at line 138 of file Decon1DROI_module.cc.

size_t caldata::Decon1DROI::fEventCount
private

count of event processed

Definition at line 130 of file Decon1DROI_module.cc.

std::vector<TH1F*> caldata::Decon1DROI::fFullRMSVec
private

Definition at line 149 of file Decon1DROI_module.cc.

const geo::GeometryCore* caldata::Decon1DROI::fGeometry = lar::providerFrom<geo::Geometry>()
private

Definition at line 143 of file Decon1DROI_module.cc.

int caldata::Decon1DROI::fMinAllowedChanStatus
private

Don't consider channels with lower status.

Definition at line 131 of file Decon1DROI_module.cc.

unsigned short caldata::Decon1DROI::fNoiseSource
private

Used to determine ROI threshold.

Definition at line 128 of file Decon1DROI_module.cc.

std::vector<TH1F*> caldata::Decon1DROI::fNumROIsHistVec
private

Definition at line 154 of file Decon1DROI_module.cc.

std::vector<TH1F*> caldata::Decon1DROI::fNumTruncBinsVec
private

Definition at line 151 of file Decon1DROI_module.cc.

bool caldata::Decon1DROI::fOutputHistograms
private

Output histograms?

Definition at line 135 of file Decon1DROI_module.cc.

std::vector<TProfile*> caldata::Decon1DROI::fPedByChanVec
private

Definition at line 152 of file Decon1DROI_module.cc.

std::vector<TH1F*> caldata::Decon1DROI::fPedestalOffsetVec
private

Definition at line 148 of file Decon1DROI_module.cc.

const lariov::DetPedestalProvider* caldata::Decon1DROI::fPedRetrievalAlg = lar::providerFrom<lariov::DetPedestalService>()
private

Definition at line 145 of file Decon1DROI_module.cc.

std::vector<art::InputTag> caldata::Decon1DROI::fRawDigitLabelVec
private

Contains the input tags for finding RawDigits it is set by the DigitModuleLabel ex.: "daq:preSpill" for prespill data

Definition at line 125 of file Decon1DROI_module.cc.

std::vector<std::unique_ptr<icarus_tool::IROIFinder> > caldata::Decon1DROI::fROIFinderVec
private

ROI finders per plane.

Definition at line 137 of file Decon1DROI_module.cc.

std::vector<TH1F*> caldata::Decon1DROI::fROILenHistVec
private

Definition at line 155 of file Decon1DROI_module.cc.

int caldata::Decon1DROI::fSaveWireWF
private

Save recob::wire object waveforms.

Definition at line 129 of file Decon1DROI_module.cc.

std::vector<TProfile*> caldata::Decon1DROI::fTruncRMSByChanVec
private

Definition at line 153 of file Decon1DROI_module.cc.

float caldata::Decon1DROI::fTruncRMSMinFraction
private

or at least this fraction of time bins

Definition at line 134 of file Decon1DROI_module.cc.

float caldata::Decon1DROI::fTruncRMSThreshold
private

Calculate RMS up to this threshold...

Definition at line 133 of file Decon1DROI_module.cc.

std::vector<TH1F*> caldata::Decon1DROI::fTruncRMSVec
private

Definition at line 150 of file Decon1DROI_module.cc.

icarus_signal_processing::WaveformTools<float> caldata::Decon1DROI::fWaveformTool
private

Definition at line 141 of file Decon1DROI_module.cc.


The documentation for this class was generated from the following file: