LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
hit::HitFilterAlg Class Reference

#include "HitFilterAlg.h"

Public Member Functions

 HitFilterAlg (fhicl::ParameterSet const &p)
 
virtual ~HitFilterAlg ()
 
bool IsGoodHit (const recob::Hit &hit) const
 

Private Attributes

const std::vector< float > fMinPulseHeight
 
const std::vector< float > fMinPulseSigma
 

Detailed Description

Definition at line 23 of file HitFilterAlg.h.

Constructor & Destructor Documentation

hit::HitFilterAlg::HitFilterAlg ( fhicl::ParameterSet const &  p)
explicit

Definition at line 11 of file HitFilterAlg.cxx.

12  : fMinPulseHeight(p.get<std::vector<float>>("MinPulseHeight"))
13  , fMinPulseSigma(p.get<std::vector<float>>("MinPulseSigma"))
14  {}
const std::vector< float > fMinPulseSigma
Definition: HitFilterAlg.h:32
const std::vector< float > fMinPulseHeight
Definition: HitFilterAlg.h:31
virtual hit::HitFilterAlg::~HitFilterAlg ( )
inlinevirtual

Definition at line 26 of file HitFilterAlg.h.

26 {}

Member Function Documentation

bool hit::HitFilterAlg::IsGoodHit ( const recob::Hit hit) const

Definition at line 16 of file HitFilterAlg.cxx.

References fMinPulseHeight, fMinPulseSigma, recob::Hit::PeakAmplitude(), geo::PlaneID::Plane, recob::Hit::RMS(), and recob::Hit::WireID().

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  }
float RMS() const
RMS of the hit shape, in tick units.
Definition: Hit.h:228
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
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
const std::vector< float > fMinPulseHeight
Definition: HitFilterAlg.h:31

Member Data Documentation

const std::vector<float> hit::HitFilterAlg::fMinPulseHeight
private

Definition at line 31 of file HitFilterAlg.h.

Referenced by IsGoodHit().

const std::vector<float> hit::HitFilterAlg::fMinPulseSigma
private

Definition at line 32 of file HitFilterAlg.h.

Referenced by IsGoodHit().


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