NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
functions.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  Ron Fox
12  Jeromy Tompkins
13  NSCL
14  Michigan State University
15  East Lansing, MI 48824-1321
16 */
17 
21 #ifndef FUNCTIONS_H
22 #define FUNCTIONS_H
23 #include <vector>
24 #include <stdint.h>
25 
26 namespace DDAS {
27 double logistic(double A, double k, double x1, double x);
28 double decay(double A, double k, double x1, double x);
29 double switchOn(double x1, double x);
30 
31 double singlePulse(
32  double A1, double k1, double k2, double x1, double C, double x
33 );
34 double doublePulse(
35  double A1, double k1, double k2, double x1,
36  double A2, double k3, double k4, double x2,
37  double C, double x
38 );
39 
40 double pulseAmplitude(double A, double k1, double k2, double x0);
41 
42 double chiSquare1(
43  double A1, double k1, double k2, double x1, double C,
44  const std::vector<uint16_t>& trace, int low = 0 , int high = -1
45 );
46 
47 double chiSquare1(
48  double A1, double k1, double k2, double x1, double C,
49  const std::vector<std::pair<uint16_t, uint16_t> >& points
50 );
51 
52 double chiSquare2(
53  double A1, double k1, double k2, double x1,
54  double A2, double k3, double k4, double x2,
55  double C,
56  const std::vector<uint16_t>& trace, int low = 0, int high = -1
57 );
58 double chiSquare2(
59  double A1, double k1, double k2, double x1,
60  double A2, double k3, double k4, double x2,
61  double C,
62  const std::vector<std::pair<uint16_t, uint16_t> >& points
63 );
64 void writeTrace(
65  const char* filename, const char* title,
66  const std::vector<uint16_t>& trace
67 );
68 void writeTrace2(
69  const char* filename, const char* title,
70  const std::vector<uint16_t>& trace1, const std::vector<uint16_t>& trace2
71 );
72 
73 
74 };
75 #endif
Definition: functions.h:26