LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
hit::HitFilterAlg Class Reference

#include "HitFilterAlg.h"

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 18 of file HitFilterAlg.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file HitFilterAlg.cxx.

References reconfigure().

6  {
7  this->reconfigure(p);
8  }
void reconfigure(fhicl::ParameterSet const &p)
virtual hit::HitFilterAlg::~HitFilterAlg ( )
inlinevirtual

Definition at line 21 of file HitFilterAlg.h.

References IsGoodHit(), and reconfigure().

21 {}

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().

Referenced by ~HitFilterAlg().

16  {
17 
18  float hitPH = hit.PeakAmplitude();
19  float hitSigma = hit.RMS();
20 
21  const geo::WireID& wireID = hit.WireID();
22  size_t view = wireID.Plane;
23 
24  if (view >= fMinPulseSigma.size() || view >= fMinPulseHeight.size()) {
25  mf::LogError("HitFilterAlg") << "Filtering settings not configured for all views! Will not filter hits in unconfigured views!";
26  return true;
27  }
28 
29  if ( hitPH > fMinPulseHeight[view] &&
30  hitSigma > fMinPulseSigma[view] ) {
31  return true;
32  }
33  else return false;
34  }
geo::WireID WireID() const
Initial tdc tick for hit.
Definition: Hit.h:234
float RMS() const
RMS of the hit shape, in tick units.
Definition: Hit.h:221
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:222
std::vector< float > fMinPulseHeight
Definition: HitFilterAlg.h:28
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
std::vector< float > fMinPulseSigma
Definition: HitFilterAlg.h:29
void hit::HitFilterAlg::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 10 of file HitFilterAlg.cxx.

References fMinPulseHeight, fMinPulseSigma, and fhicl::ParameterSet::get().

Referenced by HitFilterAlg(), and ~HitFilterAlg().

10  {
11  // Implementation of optional member function here.
12  fMinPulseHeight = p.get< std::vector<float> >("MinPulseHeight");
13  fMinPulseSigma = p.get< std::vector<float> >("MinPulseSigma");
14  }
std::vector< float > fMinPulseHeight
Definition: HitFilterAlg.h:28
std::vector< float > fMinPulseSigma
Definition: HitFilterAlg.h:29

Member Data Documentation

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

Definition at line 28 of file HitFilterAlg.h.

Referenced by IsGoodHit(), and reconfigure().

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

Definition at line 29 of file HitFilterAlg.h.

Referenced by IsGoodHit(), and reconfigure().


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