#include <string>
#include "TF1.h"
Go to the source code of this file.
|
double | offsetLineShifted (double *px, double *ppar) |
|
double | offsetLineFull (double *px, double *ppar) |
|
double | offsetLine (double *px, double *ppar) |
|
double | offsetLinePed (double *px, double *ppar) |
|
TF1 * | offsetLineTF1 (double off=0.0, double slope=1.0, double xmin=-10.0, double xmax=10.0, std::string fname="offsetLine") |
|
TF1 * | offsetLinePedTF1 (double off=0.0, double slope=1.0, double ped=0.0, double xmin=-10.0, double xmax=10.0, std::string fname="offsetLinePed") |
|
TF1 * | offsetLineFullTF1 (double off=0.0, double slope=1.0, double ped=0.0, double sneg=1.0, double xmin=-10.0, double xmax=10.0, std::string fname="offsetLinePed") |
|
TF1 * | offsetLineShiftedTF1 (double off=0.0, double slope=1.0, double ped=0.0, double sneg=1.0, double shif=0.0, double xmin=-10.0, double xmax=10.0, std::string fname="offsetLineShifted") |
|
double offsetLine |
( |
double * |
px, |
|
|
double * |
ppar |
|
) |
| |
|
inline |
Definition at line 69 of file offsetLine.h.
70 double xoff = ppar[0];
71 double gain = ppar[1];
74 if ( x > xoff )
return gain*(x-xoff);
75 if ( x < -xoff )
return gain*(x+xoff);
77 double y0 = -gain*xoff;
78 if ( x > 0.0 )
return y0 + gain*
x;
79 else if ( x < 0.0 )
return -y0 + gain*
x;
double offsetLineFull |
( |
double * |
px, |
|
|
double * |
ppar |
|
) |
| |
|
inline |
Definition at line 49 of file offsetLine.h.
50 double xoff = ppar[0];
51 double scal = ppar[1];
52 double yped = ppar[2];
53 double sneg = ppar[3];
56 if ( x < 0.0 ) gain *= sneg;
58 if ( x > xoff )
return yped + gain*(x-xoff);
59 if ( x < -xoff )
return yped + gain*(x+xoff);
61 double y0 = -gain*xoff;
62 if ( x > 0.0 )
return yped + y0 + gain*
x;
63 else if ( x < 0.0 )
return yped - y0 + gain*
x;
TF1* offsetLineFullTF1 |
( |
double |
off = 0.0 , |
|
|
double |
slope = 1.0 , |
|
|
double |
ped = 0.0 , |
|
|
double |
sneg = 1.0 , |
|
|
double |
xmin = -10.0 , |
|
|
double |
xmax = 10.0 , |
|
|
std::string |
fname = "offsetLinePed" |
|
) |
| |
|
inline |
Definition at line 117 of file offsetLine.h.
122 pf->SetParName(0,
"Offset");
123 pf->SetParName(1,
"Slope");
124 pf->SetParName(2,
"Pedestal");
125 pf->SetParName(3,
"NegScale");
126 pf->SetParameter(0, off);
127 pf->SetParameter(1, slope);
128 pf->SetParameter(2, ped);
129 pf->SetParameter(3, sneg);
double offsetLineFull(double *px, double *ppar)
double offsetLinePed |
( |
double * |
px, |
|
|
double * |
ppar |
|
) |
| |
|
inline |
Definition at line 85 of file offsetLine.h.
86 double yped = ppar[2];
double offsetLine(double *px, double *ppar)
TF1* offsetLinePedTF1 |
( |
double |
off = 0.0 , |
|
|
double |
slope = 1.0 , |
|
|
double |
ped = 0.0 , |
|
|
double |
xmin = -10.0 , |
|
|
double |
xmax = 10.0 , |
|
|
std::string |
fname = "offsetLinePed" |
|
) |
| |
|
inline |
Definition at line 103 of file offsetLine.h.
107 pf->SetParName(0,
"Offset");
108 pf->SetParName(1,
"Slope");
109 pf->SetParName(2,
"Pedestal");
110 pf->SetParameter(0, off);
111 pf->SetParameter(1, slope);
112 pf->SetParameter(2, ped);
double offsetLinePed(double *px, double *ppar)
double offsetLineShifted |
( |
double * |
px, |
|
|
double * |
ppar |
|
) |
| |
|
inline |
Definition at line 26 of file offsetLine.h.
27 double xoff = ppar[0];
28 double scal = ppar[1];
29 double yped = ppar[2];
30 double sneg = ppar[3];
31 double shif = ppar[4];
34 if ( x > 0.0 ) yped += shif;
35 if ( x < 0.0 ) yped -= shif;
36 if ( x < 0.0 ) gain *= sneg;
38 if ( x > xoff )
return yped + gain*(x-xoff);
39 if ( x < -xoff )
return yped + gain*(x+xoff);
41 double y0 = -gain*xoff;
42 if ( x > 0.0 )
return yped + y0 + gain*
x;
43 else if ( x < 0.0 )
return yped - y0 + gain*
x;
TF1* offsetLineShiftedTF1 |
( |
double |
off = 0.0 , |
|
|
double |
slope = 1.0 , |
|
|
double |
ped = 0.0 , |
|
|
double |
sneg = 1.0 , |
|
|
double |
shif = 0.0 , |
|
|
double |
xmin = -10.0 , |
|
|
double |
xmax = 10.0 , |
|
|
std::string |
fname = "offsetLineShifted" |
|
) |
| |
|
inline |
Definition at line 134 of file offsetLine.h.
139 pf->SetParName(0,
"Offset");
140 pf->SetParName(1,
"Slope");
141 pf->SetParName(2,
"Pedestal");
142 pf->SetParName(3,
"NegScale");
143 pf->SetParName(4,
"Shift");
144 pf->SetParameter(0, off);
145 pf->SetParameter(1, slope);
146 pf->SetParameter(2, ped);
147 pf->SetParameter(3, sneg);
148 pf->SetParameter(4, shif);
double offsetLineShifted(double *px, double *ppar)
TF1* offsetLineTF1 |
( |
double |
off = 0.0 , |
|
|
double |
slope = 1.0 , |
|
|
double |
xmin = -10.0 , |
|
|
double |
xmax = 10.0 , |
|
|
std::string |
fname = "offsetLine" |
|
) |
| |
|
inline |
Definition at line 91 of file offsetLine.h.
95 pf->SetParName(0,
"Offset");
96 pf->SetParName(1,
"Slope");
97 pf->SetParameter(0, off);
98 pf->SetParameter(1, slope);
double offsetLine(double *px, double *ppar)