GamR  0.0.0
GammaROOT
Loading...
Searching...
No Matches
Peak.hh
Go to the documentation of this file.
1#ifndef GAMR_TOOLKIT_PEAK_HH
2#define GAMR_TOOLKIT_PEAK_HH
3
4#include <algorithm>
5#include <vector>
6#include <map>
7#include <sstream>
8#include <string>
9
10/* ROOT */
11#include <Rtypes.h>
12#include <TBrowser.h>
13#include <TCanvas.h>
14#include <TH1.h>
15#include <TH2.h>
16#include <TNamed.h>
17
18#include <TF1.h>
19#include <TMath.h>
20
21#include "Gate.hh"
22
23namespace GamR {
28
31 namespace TK {
32
34
35 //Peak: something with area, amplitude, a centroid, and a width.
36 class Peak {
37 public:
38 virtual double GetArea() { return 0; }
39 virtual double GetAreaError() { return 0; }
40 virtual double GetAmp() { return 0; }
41 virtual double GetAmpError() { return 0; }
42 virtual double GetCent() { return 0; }
43 virtual double GetCentError() { return 0; }
44 virtual double GetWidth() { return 0; }
45 virtual double GetWidthError() { return 0; }
46
47 virtual void SetAmp(double amp) {}
48 virtual void SetAmpError(double error) {}
49 virtual void SetCent(double cent) {}
50 virtual void SetCentError(double error) {}
51 virtual void SetWidth(double width) {}
52 virtual void SetWidthError(double error) {}
53 };
54
55 //Basic peak : no functional form
56 class BPeak : public Peak, public TNamed, public TAttLine {
57 private:
58 double Area;
59 double AreaError;
60 double Counts;
61 double CountsError;
62 double Amp;
63 double AmpError;
64 double Cent;
65 double CentError;
66 double Width;
67 double WidthError;
68
69 GamR::TK::Gate mPeak;
70 std::vector<GamR::TK::Gate > mBackgrounds;
71
72 TF1 *linear;
73 TF1 *backlow;
74 TF1 *backhigh;
75
76 double Lowest;
77 double Highest;
78
79 void Set(TH1 *hist, GamR::TK::Gate peak, TF1 *background); //actually calculates area
80
81 void Paint(Option_t *option = "same");
82 Int_t DistancetoPrimitive(Int_t px, Int_t py);
83 void ExecuteEvent(Int_t event, Int_t px, Int_t py);
84
85 //helper class
86 class LFit {
87 TH1D *back;
88 public:
89 LFit(TH1D *background) { back = background; }
90 double operator() (double *x, double *p) { return back->GetBinContent(back->FindBin(x[0])) + p[0] + x[0]*p[1]; }
91 };
92
93 public :
94 BPeak();
95 ~BPeak();
96 double GetArea() { return Area; }
97 double GetAreaError() { return AreaError; }
98 double GetCounts() { return Counts; }
99 double GetCountsError() { return CountsError; }
100 double GetAmp() { return Amp; }
101 double GetAmpError() { return AmpError; }
102 double GetCent() { return Cent; }
103 double GetCentError() { return CentError; }
104 double GetWidth() { return Width; }
105 double GetWidthError() { return WidthError; }
106 void Set(TH1 *hist, double x1, double y1, double x2, double y2);
107 void Set(TH1 *hist, GamR::TK::Gate peak, std::vector<GamR::TK::Gate > background, Option_t *foption="", Option_t *option="sl");
108 void Set(TH1 *hist, GamR::TK::Gate peak, GamR::TK::Gate background, Option_t *foption="", Option_t *option="sl");
109
110 void SetCont(TH1 *hist, GamR::TK::Gate peak, std::vector<GamR::TK::Gate > background, Option_t *foption="", Option_t *option=""); //for continuous
111 void SetPoint(TH1 *hist, GamR::TK::Gate peak, std::vector<GamR::TK::Gate > background, Option_t *foption="", Option_t *option=""); //for point
112 void SetStep(TH1 *hist, GamR::TK::Gate peak, std::vector<GamR::TK::Gate > background, Option_t *foption="", Option_t *option=""); //for step
113
114
115 void Set(TH1 *hist, Option_t *foption="", Option_t *option="sl");
116 void Set(TH2 *hist, Option_t *foption="", Option_t *option="sl");
117 void Print();
118
119 void Delete(Option_t *option) { this->~BPeak(); } // *MENU*
120
122 };
123
124 //"Function Peak" - a peak with a pre-defined shape
125 class FPeak : public Peak {
126 protected :
127 //int iTails1;
128 //int iTails2;
129 //int iStep;
130
132 double fLow;
133 double fHigh;
135 //double fArea;
136 //double fAreaError;
137
138 public :
139 FPeak() {}
140 FPeak(double Low, double High, PeakType Type) : fLow(Low), fHigh(High), fPeakType(Type) {}
141 virtual ~FPeak() {};
142 //Peak(int Tails1, int Tails2, int Step) { iTails1 = Tails1; iTails2 = Tails2; iStep = Step; }
143 TF1 *GetFunc() { return fPeakFunc; }
145
146 virtual TF1 *GetStepFunc() { return NULL; }
147 virtual TF1 *GetGaussFunc() { return NULL; }
148 virtual void SetParameters(std::vector<double> params) {}
149 virtual void SetParErrors(std::vector<double> errors) {}
150
151 //void SetFunc(TF1 *func) { fPeakFunc = func; }
152 //void SetArea(double area) { fArea = area; }
153 //void SetAreaError(double area_error) { fAreaError = area_error; }
154 };
155
156 class GaussianPeak : public FPeak {
157 public :
159 GaussianPeak (double Low, double High);
161 double GetArea() { return sqrt(2 * TMath::Pi()) * fPeakFunc->GetParameter(0) *
162 fabs(fPeakFunc->GetParameter(2)); }
163 double GetAreaError() { return sqrt(2 * TMath::Pi() *
164 (pow(fPeakFunc->GetParError(0) * fPeakFunc->GetParameter(2), 2) +
165 pow(fPeakFunc->GetParError(2) * fPeakFunc->GetParameter(0), 2))); }
166 double GetAmp() { return fPeakFunc->GetParameter(0); }
167 double GetAmpError() { return fPeakFunc->GetParError(0); }
168 double GetCent() { return fPeakFunc->GetParameter(1); }
169 double GetCentError() { return fPeakFunc->GetParError(1); }
170 double GetWidth() { return 2.3548*fPeakFunc->GetParameter(2); }
171 double GetWidthError() { return 2.3548*fPeakFunc->GetParError(2); }
172
173 void SetParameters(std::vector<double> params) { for (int i=0; i<(int)params.size(); ++i) { fPeakFunc->SetParameter(i, params[i]); } }
174 void SetParErrors(std::vector<double> errors) { for (int i=0; i<(int)errors.size(); ++i) { fPeakFunc->SetParError(i, errors[i]); } }
175 void SetAmp(double amp) { fPeakFunc->SetParameter(0, amp); }
176 void SetAmpError(double error) { fPeakFunc->SetParError(0, error); }
177 void SetCent(double cent) { fPeakFunc->SetParameter(1, cent); }
178 void SetCentError(double error) { fPeakFunc->SetParError(1, error); }
179 void SetWidth(double width) { fPeakFunc->SetParameter(2, width/2.3548); }
180 void SetWidthError(double error) { fPeakFunc->SetParError(2, error/2.3548); }
181
182 TF1 *GetStepFunc() { return NULL; }
183 TF1 *GetGaussFunc() { TF1 *gaussfunc = new TF1("GaussFunc", "[0]*exp(-pow(x-[1],2)/(2*pow([2],2)))", fLow, fHigh);
184 gaussfunc->SetParameter(0, fPeakFunc->GetParameter(0));
185 gaussfunc->SetParameter(1, fPeakFunc->GetParameter(1));
186 gaussfunc->SetParameter(2, fPeakFunc->GetParameter(2));
187 return gaussfunc;
188 }
189 };
190
191 class StepGaussianPeak : public FPeak {
192 public:
194 StepGaussianPeak (double Low, double High);
196 double GetArea() { return sqrt(2 * TMath::Pi()) * fPeakFunc->GetParameter(0) *
197 fabs(fPeakFunc->GetParameter(2)); }
198 double GetAreaError() { return sqrt(2 * TMath::Pi() *
199 (pow(fPeakFunc->GetParError(0) * fPeakFunc->GetParameter(2), 2) +
200 pow(fPeakFunc->GetParError(2) * fPeakFunc->GetParameter(0), 2))); }
201 double GetAmp() { return fPeakFunc->GetParameter(0); }
202 double GetAmpError() { return fPeakFunc->GetParError(0); }
203 double GetCent() { return fPeakFunc->GetParameter(1); }
204 double GetCentError() { return fPeakFunc->GetParError(1); }
205 double GetWidth() { return 2.3548*fPeakFunc->GetParameter(2); }
206 double GetWidthError() { return 2.3548*fPeakFunc->GetParError(2); }
207
208 void SetParameters(std::vector<double> params) { for (int i=0; i<(int)params.size(); ++i) { fPeakFunc->SetParameter(i, params[i]); } }
209 void SetParErrors(std::vector<double> errors) { for (int i=0; i<(int)errors.size(); ++i) { fPeakFunc->SetParError(i, errors[i]); } }
210 void SetAmp(double amp) { fPeakFunc->SetParameter(0, amp); }
211 void SetAmpError(double error) { fPeakFunc->SetParError(0, error); }
212 void SetCent(double cent) { fPeakFunc->SetParameter(1, cent); }
213 void SetCentError(double error) { fPeakFunc->SetParError(1, error); }
214 void SetWidth(double width) { fPeakFunc->SetParameter(2, width/2.3548); }
215 void SetWidthError(double error) { fPeakFunc->SetParError(2, error/2.3548); }
216
217 TF1 *GetStepFunc() { TF1 *stepfunc = new TF1("StepFunc", "[0]*([3]/100)*std::erfc((x-[1])/(sqrt(2)*[2]))", fLow, fHigh);
218 stepfunc->SetParameter(0, fPeakFunc->GetParameter(0));
219 stepfunc->SetParameter(1, fPeakFunc->GetParameter(1));
220 stepfunc->SetParameter(2, fPeakFunc->GetParameter(2));
221 stepfunc->SetParameter(3, fPeakFunc->GetParameter(3));
222 return stepfunc;
223 }
224
225 TF1 *GetGaussFunc() { TF1 *gaussfunc = new TF1("GaussFunc", "[0]*exp(-pow(x-[1],2)/(2*pow([2],2)))", fLow, fHigh);
226 gaussfunc->SetParameter(0, fPeakFunc->GetParameter(0));
227 gaussfunc->SetParameter(1, fPeakFunc->GetParameter(1));
228 gaussfunc->SetParameter(2, fPeakFunc->GetParameter(2));
229 return gaussfunc;
230 }
231
232 };
233
234 class OneTailGaussianPeak : public FPeak {
235 public:
237 OneTailGaussianPeak (double Low, double High);
239 double GetArea() { return fPeakFunc->Integral(fLow, fHigh); }
240 double GetAreaError();
241 double GetAmp() { return fPeakFunc->GetParameter(0); }
242 double GetAmpError() { return fPeakFunc->GetParError(0); }
243 double GetCent() { return fPeakFunc->GetParameter(1); }
244 double GetCentError() { return fPeakFunc->GetParError(1); }
245 double GetWidth() { return 2.3548*fPeakFunc->GetParameter(2); }
246 double GetWidthError() { return 2.3548*fPeakFunc->GetParError(2); }
247
248 void SetParameters(std::vector<double> params) { for (int i=0; i<(int)params.size(); ++i) { fPeakFunc->SetParameter(i, params[i]); } }
249 void SetParErrors(std::vector<double> errors) { for (int i=0; i<(int)errors.size(); ++i) { fPeakFunc->SetParError(i, errors[i]); } }
250 void SetAmp(double amp) { fPeakFunc->SetParameter(0, amp); }
251 void SetAmpError(double error) { fPeakFunc->SetParError(0, error); }
252 void SetCent(double cent) { fPeakFunc->SetParameter(1, cent); }
253 void SetCentError(double error) { fPeakFunc->SetParError(1, error); }
254 void SetWidth(double width) { fPeakFunc->SetParameter(2, width/2.3548); }
255 void SetWidthError(double error) { fPeakFunc->SetParError(2, error/2.3548); }
256
257 TF1 *GetStepFunc() { return NULL; }
258 TF1 *GetGaussFunc() { TF1 *gaussfunc = new TF1("GaussFunc", "[0]*(1-[3]/100)*exp(-pow(x-[1],2)/(2*pow([2],2)))", fLow, fHigh);
259 gaussfunc->SetParameter(0, fPeakFunc->GetParameter(0));
260 gaussfunc->SetParameter(1, fPeakFunc->GetParameter(1));
261 gaussfunc->SetParameter(2, fPeakFunc->GetParameter(2));
262 gaussfunc->SetParameter(3, fPeakFunc->GetParameter(3));
263 return gaussfunc;
264 }
265 };
266
268 public:
270 OneTailStepGaussianPeak (double Low, double High);
272 double GetArea();
273 double GetAreaError();
274 double GetAmp() { return fPeakFunc->GetParameter(0); }
275 double GetAmpError() { return fPeakFunc->GetParError(0); }
276 double GetCent() { return fPeakFunc->GetParameter(1); }
277 double GetCentError() { return fPeakFunc->GetParError(1); }
278 double GetWidth() { return 2.3548*fPeakFunc->GetParameter(2); }
279 double GetWidthError() { return 2.3548*fPeakFunc->GetParError(2); }
280
281 void SetParameters(std::vector<double> params) { for (int i=0; i<(int)params.size(); ++i) { fPeakFunc->SetParameter(i, params[i]); } }
282 void SetParErrors(std::vector<double> errors) { for (int i=0; i<(int)errors.size(); ++i) { fPeakFunc->SetParError(i, errors[i]); } }
283 void SetAmp(double amp) { fPeakFunc->SetParameter(0, amp); }
284 void SetAmpError(double error) { fPeakFunc->SetParError(0, error); }
285 void SetCent(double cent) { fPeakFunc->SetParameter(1, cent); }
286 void SetCentError(double error) { fPeakFunc->SetParError(1, error); }
287 void SetWidth(double width) { fPeakFunc->SetParameter(2, width/2.3548); }
288 void SetWidthError(double error) { fPeakFunc->SetParError(2, error/2.3548); }
289
290 TF1 *GetStepFunc() { TF1 *stepfunc = new TF1("StepFunc", "[0]*([3]/100)*std::erfc((x-[1])/(sqrt(2)*[2]))", fLow, fHigh);
291 stepfunc->SetParameter(0, fPeakFunc->GetParameter(0));
292 stepfunc->SetParameter(1, fPeakFunc->GetParameter(1));
293 stepfunc->SetParameter(2, fPeakFunc->GetParameter(2));
294 stepfunc->SetParameter(3, fPeakFunc->GetParameter(5));
295 return stepfunc;
296 }
297 TF1 *GetGaussFunc() { TF1 *gaussfunc = new TF1("GaussFunc", "[0]*(1-[3]/100)*exp(-pow(x-[1],2)/(2*pow([2],2)))", fLow, fHigh);
298 gaussfunc->SetParameter(0, fPeakFunc->GetParameter(0));
299 gaussfunc->SetParameter(1, fPeakFunc->GetParameter(1));
300 gaussfunc->SetParameter(2, fPeakFunc->GetParameter(2));
301 gaussfunc->SetParameter(3, fPeakFunc->GetParameter(3));
302 return gaussfunc;
303 }
304 };
305
306 class TwoTailGaussianPeak : public FPeak {
307 public:
309 TwoTailGaussianPeak (double Low, double High);
311 double GetArea() { return fPeakFunc->Integral(fLow, fHigh); }
312 double GetAreaError();
313 double GetAmp() { return fPeakFunc->GetParameter(0); }
314 double GetAmpError() { return fPeakFunc->GetParError(0); }
315 double GetCent() { return fPeakFunc->GetParameter(1); }
316 double GetCentError() { return fPeakFunc->GetParError(1); }
317 double GetWidth() { return 2.3548*fPeakFunc->GetParameter(2); }
318 double GetWidthError() { return 2.3548*fPeakFunc->GetParError(2); }
319
320 void SetParameters(std::vector<double> params) { for (int i=0; i<(int)params.size(); ++i) { fPeakFunc->SetParameter(i, params[i]); } }
321 void SetParErrors(std::vector<double> errors) { for (int i=0; i<(int)errors.size(); ++i) { fPeakFunc->SetParError(i, errors[i]); } }
322 void SetAmp(double amp) { fPeakFunc->SetParameter(0, amp); }
323 void SetAmpError(double error) { fPeakFunc->SetParError(0, error); }
324 void SetCent(double cent) { fPeakFunc->SetParameter(1, cent); }
325 void SetCentError(double error) { fPeakFunc->SetParError(1, error); }
326 void SetWidth(double width) { fPeakFunc->SetParameter(2, width/2.3548); }
327 void SetWidthError(double error) { fPeakFunc->SetParError(2, error/2.3548); }
328
329 TF1 *GetStepFunc() { return NULL; }
330 TF1 *GetGaussFunc() { TF1 *gaussfunc = new TF1("GaussFunc", "[0]*(1 - [3]/100 - [4]/100)*exp(-pow(x-[1],2)/(2*pow([2],2)))", fLow, fHigh);
331 gaussfunc->SetParameter(0, fPeakFunc->GetParameter(0));
332 gaussfunc->SetParameter(1, fPeakFunc->GetParameter(1));
333 gaussfunc->SetParameter(2, fPeakFunc->GetParameter(2));
334 gaussfunc->SetParameter(3, fPeakFunc->GetParameter(3));
335 gaussfunc->SetParameter(4, fPeakFunc->GetParameter(5));
336 return gaussfunc;
337 }
338 };
339
341 public:
343 TwoTailStepGaussianPeak (double Low, double High);
345 double GetArea();
346 double GetAreaError();
347 double GetAmp() { return fPeakFunc->GetParameter(0); }
348 double GetAmpError() { return fPeakFunc->GetParError(0); }
349 double GetCent() { return fPeakFunc->GetParameter(1); }
350 double GetCentError() { return fPeakFunc->GetParError(1); }
351 double GetWidth() { return 2.3548*fPeakFunc->GetParameter(2); }
352 double GetWidthError() { return 2.3548*fPeakFunc->GetParError(2); }
353
354 void SetParameters(std::vector<double> params) { for (int i=0; i<(int)params.size(); ++i) { fPeakFunc->SetParameter(i, params[i]); } }
355 void SetParErrors(std::vector<double> errors) { for (int i=0; i<(int)errors.size(); ++i) { fPeakFunc->SetParError(i, errors[i]); } }
356 void SetAmp(double amp) { fPeakFunc->SetParameter(0, amp); }
357 void SetAmpError(double error) { fPeakFunc->SetParError(0, error); }
358 void SetCent(double cent) { fPeakFunc->SetParameter(1, cent); }
359 void SetCentError(double error) { fPeakFunc->SetParError(1, error); }
360 void SetWidth(double width) { fPeakFunc->SetParameter(2, width/2.3548); }
361 void SetWidthError(double error) { fPeakFunc->SetParError(2, error/2.3548); }
362
363 TF1 *GetStepFunc() { TF1 *stepfunc = new TF1("StepFunc", "[0]*([3]/100)*std::erfc((x-[1])/(sqrt(2)*[2]))", fLow, fHigh);
364 stepfunc->SetParameter(0, fPeakFunc->GetParameter(0));
365 stepfunc->SetParameter(1, fPeakFunc->GetParameter(1));
366 stepfunc->SetParameter(2, fPeakFunc->GetParameter(2));
367 stepfunc->SetParameter(3, fPeakFunc->GetParameter(7));
368 return stepfunc;
369 }
370 TF1 *GetGaussFunc() { TF1 *gaussfunc = new TF1("GaussFunc", "[0]*(1 - [3]/100 - [4]/100)*exp(-pow(x-[1],2)/(2*pow([2],2)))", fLow, fHigh);
371 gaussfunc->SetParameter(0, fPeakFunc->GetParameter(0));
372 gaussfunc->SetParameter(1, fPeakFunc->GetParameter(1));
373 gaussfunc->SetParameter(2, fPeakFunc->GetParameter(2));
374 gaussfunc->SetParameter(3, fPeakFunc->GetParameter(3));
375 gaussfunc->SetParameter(4, fPeakFunc->GetParameter(5));
376 return gaussfunc;
377 }
378 };
379
380 BPeak* FitBPeak(TCanvas *canvas = gPad->GetCanvas(), Option_t *foption="", Option_t *option="sl");
381 BPeak* ClickBPeak(TCanvas *canvas = gPad->GetCanvas());
382 }
383}
384
385#endif
386
void py(TVirtualPad *canvas)
void px(TVirtualPad *canvas)
double GetAmp()
Definition Peak.hh:100
virtual double GetWidth()
Definition Peak.hh:44
void SetParameters(std::vector< double > params)
Definition Peak.hh:320
void SetWidthError(double error)
Definition Peak.hh:180
void SetCent(double cent)
Definition Peak.hh:252
virtual double GetAmpError()
Definition Peak.hh:41
virtual ~FPeak()
Definition Peak.hh:141
TF1 * fPeakFunc
Definition Peak.hh:131
void SetParErrors(std::vector< double > errors)
Definition Peak.hh:282
double GetCentError()
Definition Peak.hh:169
void SetCentError(double error)
Definition Peak.hh:178
void SetParameters(std::vector< double > params)
Definition Peak.hh:248
void SetCent(double cent)
Definition Peak.hh:212
void SetParErrors(std::vector< double > errors)
Definition Peak.hh:321
virtual TF1 * GetStepFunc()
Definition Peak.hh:146
double GetAreaError()
Definition Peak.hh:163
virtual double GetCentError()
Definition Peak.hh:43
virtual double GetWidthError()
Definition Peak.hh:45
void SetAmp(double amp)
Definition Peak.hh:210
double GetCent()
Definition Peak.hh:102
PeakType
Definition Peak.hh:33
double GetCentError()
Definition Peak.hh:103
virtual void SetAmp(double amp)
Definition Peak.hh:47
void SetCentError(double error)
Definition Peak.hh:325
void SetWidthError(double error)
Definition Peak.hh:361
void SetParameters(std::vector< double > params)
Definition Peak.hh:281
double fHigh
Definition Peak.hh:133
void SetAmp(double amp)
Definition Peak.hh:322
virtual double GetAreaError()
Definition Peak.hh:39
void SetParErrors(std::vector< double > errors)
Definition Peak.hh:355
virtual double GetArea()
Definition Peak.hh:38
double GetAreaError()
Definition Peak.hh:97
virtual double GetCent()
Definition Peak.hh:42
void SetAmpError(double error)
Definition Peak.hh:357
void SetWidth(double width)
Definition Peak.hh:179
void SetCent(double cent)
Definition Peak.hh:285
void SetCont(TH1 *hist, GamR::TK::Gate peak, std::vector< GamR::TK::Gate > background, Option_t *foption="", Option_t *option="")
Definition Peak.cc:146
void SetWidthError(double error)
Definition Peak.hh:327
void SetCent(double cent)
Definition Peak.hh:177
void SetWidth(double width)
Definition Peak.hh:214
double GetAmpError()
Definition Peak.hh:167
void SetAmpError(double error)
Definition Peak.hh:284
void SetWidthError(double error)
Definition Peak.hh:215
void SetAmp(double amp)
Definition Peak.hh:250
void SetStep(TH1 *hist, GamR::TK::Gate peak, std::vector< GamR::TK::Gate > background, Option_t *foption="", Option_t *option="")
Definition Peak.cc:372
double GetWidthError()
Definition Peak.hh:171
void SetAmpError(double error)
Definition Peak.hh:176
void SetAmp(double amp)
Definition Peak.hh:175
double GetWidthError()
Definition Peak.hh:105
void SetParErrors(std::vector< double > errors)
Definition Peak.hh:249
virtual void SetWidth(double width)
Definition Peak.hh:51
double GetCounts()
Definition Peak.hh:98
ClassDef(BPeak, 1)
void SetCentError(double error)
Definition Peak.hh:213
void SetWidth(double width)
Definition Peak.hh:326
LFit(TH1D *background)
Definition Peak.hh:89
void Delete(Option_t *option)
Definition Peak.hh:119
void SetCentError(double error)
Definition Peak.hh:253
virtual void SetAmpError(double error)
Definition Peak.hh:48
void SetAmpError(double error)
Definition Peak.hh:251
virtual void SetCentError(double error)
Definition Peak.hh:50
void SetParameters(std::vector< double > params)
Definition Peak.hh:173
double GetAmpError()
Definition Peak.hh:101
void SetWidth(double width)
Definition Peak.hh:360
double GetWidth()
Definition Peak.hh:104
void SetCentError(double error)
Definition Peak.hh:286
void Print()
Definition Peak.cc:672
void SetParErrors(std::vector< double > errors)
Definition Peak.hh:174
void SetWidth(double width)
Definition Peak.hh:254
double operator()(double *x, double *p)
Definition Peak.hh:90
virtual void SetWidthError(double error)
Definition Peak.hh:52
PeakType fPeakType
Definition Peak.hh:134
void SetAmpError(double error)
Definition Peak.hh:323
void SetParErrors(std::vector< double > errors)
Definition Peak.hh:209
BPeak * ClickBPeak(TCanvas *canvas)
Definition Peak.cc:870
virtual double GetAmp()
Definition Peak.hh:40
double GetCountsError()
Definition Peak.hh:99
virtual void SetCent(double cent)
Definition Peak.hh:49
virtual TF1 * GetGaussFunc()
Definition Peak.hh:147
void SetParameters(std::vector< double > params)
Definition Peak.hh:354
void SetAmpError(double error)
Definition Peak.hh:211
PeakType GetPeakType()
Definition Peak.hh:144
void SetPoint(TH1 *hist, GamR::TK::Gate peak, std::vector< GamR::TK::Gate > background, Option_t *foption="", Option_t *option="")
Definition Peak.cc:227
void SetWidthError(double error)
Definition Peak.hh:255
double GetArea()
Definition Peak.hh:96
virtual void SetParErrors(std::vector< double > errors)
Definition Peak.hh:149
FPeak(double Low, double High, PeakType Type)
Definition Peak.hh:140
virtual void SetParameters(std::vector< double > params)
Definition Peak.hh:148
void SetCent(double cent)
Definition Peak.hh:358
void SetParameters(std::vector< double > params)
Definition Peak.hh:208
void SetCentError(double error)
Definition Peak.hh:359
TF1 * GetFunc()
Definition Peak.hh:143
double fLow
Definition Peak.hh:132
BPeak * FitBPeak(TCanvas *canvas, Option_t *foption, Option_t *option)
Definition Peak.cc:859
void SetWidthError(double error)
Definition Peak.hh:288
void SetWidth(double width)
Definition Peak.hh:287
void SetCent(double cent)
Definition Peak.hh:324
@ OneTailStepGaussian
Definition Peak.hh:33
@ StepGaussian
Definition Peak.hh:33
@ Gaussian
Definition Peak.hh:33
@ TwoTailGaussian
Definition Peak.hh:33
@ OneTailGaussian
Definition Peak.hh:33
@ TwoTailStepGaussian
Definition Peak.hh:33
Definition Gain.cc:19