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

Public Member Functions

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

Private Types

using PeakFitParams_t = struct PeakFitParams{float peakCenter
 
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
 
float peakCenterError
 
float peakSigma
 
float peakSigmaError
 
float peakAmplitude
 
float peakAmplitudeError
 

Detailed Description

Definition at line 20 of file PeakFitterGaussElimination_tool.cc.

Member Typedef Documentation

using reco_tool::IPeakFitter::PeakFitParams_t = struct PeakFitParams { float peakCenter
inherited

Definition at line 31 of file IPeakFitter.h.

Definition at line 39 of file IPeakFitter.h.

Constructor & Destructor Documentation

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

Definition at line 45 of file PeakFitterGaussElimination_tool.cc.

References configure().

46 {
47  configure(pset);
48 }
void configure(const fhicl::ParameterSet &pset) override
reco_tool::PeakFitterGaussElimination::~PeakFitterGaussElimination ( )

Definition at line 50 of file PeakFitterGaussElimination_tool.cc.

51 {
52 }

Member Function Documentation

void reco_tool::PeakFitterGaussElimination::configure ( const fhicl::ParameterSet pset)
overridevirtual

Implements reco_tool::IPeakFitter.

Definition at line 54 of file PeakFitterGaussElimination_tool.cc.

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

Referenced by PeakFitterGaussElimination().

55 {
56  // Start by recovering the parameters
57  fStepSize = pset.get<float>("StepSize", 0.1);
58  fMax = pset.get<float>("Max", 0.5);
59 
60 // fGEAlg = std::make_unique<util::GaussianEliminationAlg>(fStepSize, fMax);
61 
62  return;
63 }
float fStepSize
Step size used by gaussian elim alg.
T get(std::string const &key) const
Definition: ParameterSet.h:231
void reco_tool::PeakFitterGaussElimination::findPeakParameters ( const std::vector< float > &  roiSignalVec,
const ICandidateHitFinder::HitCandidateVec hitCandidateVec,
PeakParamsVec peakParamsVec,
double &  chi2PerNDF,
int &  NDF 
) const
overridevirtual

Implements reco_tool::IPeakFitter.

Definition at line 66 of file PeakFitterGaussElimination_tool.cc.

References bin, DEFINE_ART_CLASS_TOOL, and min.

71 {
72  // This module tries to use the method for fitting hits found in the RRFHitFinder
73  // from Wes Ketchum. It uses the gaussian elimation algorithm he set up.
74  //
75  // *** NOTE: this algorithm assumes the reference time for input hit candidates is to
76  // the first tick of the input waveform (ie 0)
77  //
78  if (hitCandidateVec.empty()) return;
79 
80  std::vector<float> meanVec;
81  std::vector<float> sigmaVec;
82  std::vector<float> heightVec;
83 
84  for(const auto& hitCandidate : hitCandidateVec)
85  {
86  float candMean = hitCandidate.hitCenter;
87  float candSigma = hitCandidate.hitSigma;
88  size_t bin = std::floor(candMean);
89 
90  bin = std::min(bin, roiSignalVec.size() - 1);
91 
92  float candHeight = roiSignalVec[bin] - (candMean-(float)bin)*(roiSignalVec[bin]-roiSignalVec[bin+1]);
93 
94  meanVec.push_back(candMean);
95  sigmaVec.push_back(candSigma);
96  heightVec.push_back(candHeight);
97  }
98 
99  return;
100 }
float bin[41]
Definition: plottest35.C:14
Int_t min
Definition: plot.C:26

Member Data Documentation

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

Definition at line 40 of file PeakFitterGaussElimination_tool.cc.

float reco_tool::PeakFitterGaussElimination::fMax
private

Max.

Definition at line 38 of file PeakFitterGaussElimination_tool.cc.

Referenced by configure().

float reco_tool::PeakFitterGaussElimination::fStepSize
private

Step size used by gaussian elim alg.

Definition at line 37 of file PeakFitterGaussElimination_tool.cc.

Referenced by configure().

float reco_tool::IPeakFitter::peakAmplitude
inherited

Definition at line 35 of file IPeakFitter.h.

float reco_tool::IPeakFitter::peakAmplitudeError
inherited

Definition at line 36 of file IPeakFitter.h.

float reco_tool::IPeakFitter::peakCenterError
inherited

Definition at line 32 of file IPeakFitter.h.

float reco_tool::IPeakFitter::peakSigma
inherited

Definition at line 33 of file IPeakFitter.h.

float reco_tool::IPeakFitter::peakSigmaError
inherited

Definition at line 34 of file IPeakFitter.h.


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