LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
reco_tool::PeakFitterGaussElimination Class Reference
Inheritance diagram for reco_tool::PeakFitterGaussElimination:
reco_tool::IPeakFitter

Public Member Functions

 PeakFitterGaussElimination (const fhicl::ParameterSet &pset)
 
void findPeakParameters (const std::vector< float > &, const ICandidateHitFinder::HitCandidateVec &, PeakParamsVec &, double &, int &) const override
 

Private Types

using PeakParamsVec = std::vector< PeakFitParams_t >
 

Private Attributes

float fStepSize
 Step size used by gaussian elim alg. More...
 
float fMax
 Max. More...
 
std::unique_ptr< util::GaussianEliminationAlgfGEAlg
 

Detailed Description

Definition at line 15 of file PeakFitterGaussElimination_tool.cc.

Member Typedef Documentation

Definition at line 34 of file IPeakFitter.h.

Constructor & Destructor Documentation

reco_tool::PeakFitterGaussElimination::PeakFitterGaussElimination ( const fhicl::ParameterSet pset)
explicit

Definition at line 35 of file PeakFitterGaussElimination_tool.cc.

References fMax, fStepSize, and fhicl::ParameterSet::get().

36  {
37  // Start by recovering the parameters
38  fStepSize = pset.get<float>("StepSize", 0.1);
39  fMax = pset.get<float>("Max", 0.5);
40 
41  // fGEAlg = std::make_unique<util::GaussianEliminationAlg>(fStepSize, fMax);
42 
43  return;
44  }
float fStepSize
Step size used by gaussian elim alg.
T get(std::string const &key) const
Definition: ParameterSet.h:314

Member Function Documentation

void reco_tool::PeakFitterGaussElimination::findPeakParameters ( const std::vector< float > &  roiSignalVec,
const ICandidateHitFinder::HitCandidateVec hitCandidateVec,
PeakParamsVec ,
double &  ,
int &   
) const
overridevirtual

Implements reco_tool::IPeakFitter.

Definition at line 47 of file PeakFitterGaussElimination_tool.cc.

References bin, and DEFINE_ART_CLASS_TOOL.

53  {
54  // This module tries to use the method for fitting hits found in the RRFHitFinder
55  // from Wes Ketchum. It uses the gaussian elimation algorithm he set up.
56  //
57  // *** NOTE: this algorithm assumes the reference time for input hit candidates is to
58  // the first tick of the input waveform (ie 0)
59  //
60  if (hitCandidateVec.empty()) return;
61 
62  std::vector<float> meanVec;
63  std::vector<float> sigmaVec;
64  std::vector<float> heightVec;
65 
66  for (const auto& hitCandidate : hitCandidateVec) {
67  float candMean = hitCandidate.hitCenter;
68  float candSigma = hitCandidate.hitSigma;
69  size_t bin = std::floor(candMean);
70 
71  bin = std::min(bin, roiSignalVec.size() - 1);
72 
73  float candHeight =
74  roiSignalVec[bin] - (candMean - (float)bin) * (roiSignalVec[bin] - roiSignalVec[bin + 1]);
75 
76  meanVec.push_back(candMean);
77  sigmaVec.push_back(candSigma);
78  heightVec.push_back(candHeight);
79  }
80 
81  return;
82  }
float bin[41]
Definition: plottest35.C:14

Member Data Documentation

std::unique_ptr<util::GaussianEliminationAlg> reco_tool::PeakFitterGaussElimination::fGEAlg
private

Definition at line 30 of file PeakFitterGaussElimination_tool.cc.

float reco_tool::PeakFitterGaussElimination::fMax
private

Max.

Definition at line 28 of file PeakFitterGaussElimination_tool.cc.

Referenced by PeakFitterGaussElimination().

float reco_tool::PeakFitterGaussElimination::fStepSize
private

Step size used by gaussian elim alg.

Definition at line 27 of file PeakFitterGaussElimination_tool.cc.

Referenced by PeakFitterGaussElimination().


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