Public Member Functions | Private Attributes | List of all members
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 19 of file HitFilterAlg.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file HitFilterAlg.cxx.

11  :
12  fMinPulseHeight(p.get< std::vector<float> >("MinPulseHeight")),
13  fMinPulseSigma(p.get< std::vector<float> >("MinPulseSigma"))
14 {
15 }
const std::vector< float > fMinPulseSigma
Definition: HitFilterAlg.h:29
p
Definition: test.py:223
const std::vector< float > fMinPulseHeight
Definition: HitFilterAlg.h:28
virtual hit::HitFilterAlg::~HitFilterAlg ( )
inlinevirtual

Definition at line 22 of file HitFilterAlg.h.

22 {}

Member Function Documentation

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

Definition at line 17 of file HitFilterAlg.cxx.

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 filter hits in unconfigured views!";
27  return true;
28  }
29 
30  if ( hitPH > fMinPulseHeight[view] &&
31  hitSigma > fMinPulseSigma[view] ) {
32  return true;
33  }
34  else return false;
35  }
geo::WireID WireID() const
Definition: Hit.h:233
float RMS() const
RMS of the hit shape, in tick units.
Definition: Hit.h:220
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
const std::vector< float > fMinPulseSigma
Definition: HitFilterAlg.h:29
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:221
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:493
const std::vector< float > fMinPulseHeight
Definition: HitFilterAlg.h:28

Member Data Documentation

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

Definition at line 28 of file HitFilterAlg.h.

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

Definition at line 29 of file HitFilterAlg.h.


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