LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
HitFilterAlg.cxx
Go to the documentation of this file.
1 #include "HitFilterAlg.h"
2 
5 
8 
9 namespace hit {
10 
12  : fMinPulseHeight(p.get<std::vector<float>>("MinPulseHeight"))
13  , fMinPulseSigma(p.get<std::vector<float>>("MinPulseSigma"))
14  {}
15 
17  {
18 
19  const float hitPH = hit.PeakAmplitude();
20  const float hitSigma = hit.RMS();
21 
22  const geo::WireID& wireID = hit.WireID();
23  const size_t view = wireID.Plane;
24 
25  if (view >= fMinPulseSigma.size() || view >= fMinPulseHeight.size()) {
26  mf::LogError("HitFilterAlg") << "Filtering settings not configured for all views! Will not "
27  "filter hits in unconfigured views!";
28  return true;
29  }
30 
31  if (hitPH > fMinPulseHeight[view] && hitSigma > fMinPulseSigma[view]) { return true; }
32  else
33  return false;
34  }
35 } //end namespace hit
bool IsGoodHit(const recob::Hit &hit) const
float RMS() const
RMS of the hit shape, in tick units.
Definition: Hit.h:228
Declaration of signal hit object.
STL namespace.
geo::WireID const & WireID() const
Initial tdc tick for hit.
Definition: Hit.h:280
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
const std::vector< float > fMinPulseSigma
Definition: HitFilterAlg.h:32
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:232
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
Definition of data types for geometry description.
Detector simulation of raw signals on wires.
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
Definition: StdUtils.h:120
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:46
HitFilterAlg(fhicl::ParameterSet const &p)
const std::vector< float > fMinPulseHeight
Definition: HitFilterAlg.h:31