DDASToys for NSCLDAQ  6.2-000
functions_template.h
Go to the documentation of this file.
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2017.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Authors:
11  Aaron Chester
12  FRIB
13  Michigan State University
14  East Lansing, MI 48824-1321
15 */
16 
23 #ifndef FUNCTIONS_TEMPLATE_H
24 #define FUNCTIONS_TEMPLATE_H
25 
26 #include <vector>
27 #include <cstdint>
28 
30 namespace ddastoys {
32  namespace templatefit {
33 
48  double singlePulse(
49  double S1, double x1, double C, double x,
50  const std::vector<double>& trace_template
51  );
63  double doublePulse(
64  double S1, double x1, double S2, double x2,
65  double C, double x,
66  const std::vector<double>& trace_template
67  );
80  double chiSquare1(
81  double S1, double x1, double C,
82  const std::vector<std::pair<uint16_t, uint16_t> >& points,
83  const std::vector<double>& trace_template
84  );
99  double chiSquare2(
100  double S1, double x1, double S2, double x2, double C,
101  const std::vector<std::pair<uint16_t, uint16_t> >& points,
102  const std::vector<double>& trace_template
103  );
104 
106  }
107 };
108 
109 #endif
__host__ __device__ float singlePulse(float A1, float k1, float k2, float x1, float C, float x)
Evaluate the value of a single pulse in accordance with our canonical functional form.
Definition: cudafit_analytic.cu:225
__host__ __device__ float doublePulse(float A1, float k1, float k2, float x1, float A2, float k3, float k4, float x2, float C, float x)
Evaluate the canonical form of a double pulse.
Definition: cudafit_analytic.cu:254
double chiSquare1(double S1, double x1, double C, const std::vector< std::pair< uint16_t, uint16_t > > &points, const std::vector< double > &trace_template)
Computes the chi-square goodness of a specific parameterization of a single pulse canonical form with...
Definition: functions_template.cpp:84
double chiSquare2(double S1, double x1, double S2, double x2, double C, const std::vector< std::pair< uint16_t, uint16_t > > &points, const std::vector< double > &trace_template)
Computes the chi-square goodness of a specific parameterization of a double pulse canonical form with...
Definition: functions_template.cpp:110