StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PeakAna.h
1 /*
2 Author: David Kapukchyan
3 @[October 20, 2022]
4 > Added doxygen style comments
5 
6 @[September 29, 2022]
7 > Got rid of the virtual painter as it is no longer needed
8 
9 @[August 15, 2022]
10 > Small fix to GetPossiblePeaks() so that it does not stop at slope==0 on the decreasing part of the peak
11 
12 @[June 27, 2022]
13 > Correctly sets x value of the end point of the found peak. This can result in overlaps when drawing the peak lines.
14 
15 @[June 26, 2022]
16 > Changed GetPossiblePeaks() to check if dealing with last point. If there is an active start time and loop reaches last graph point, last graph point becomes the end of that peak window.
17 
18 @[June 23, 2022]
19 > Added MergeByProbability() which can be used to merge peaks by probability after GetPossiblePeaks() has been called.
20 
21 @[June 12, 2022]
22 > Implemented TObject's "Clone" and "Copy" functions so that "DrawClone" will correctly create a clone of this object for drawing purposes. Also removed setting the found peak line color from 'AnalyzeForPeak()' to *PeakAnaPainter*
23 
24 @[June 8, 2022]
25 > Implemented a Gaussian Filter.
26 
27 @[May 10, 2022]
28 > Implemented the ability to color and style the graph and peak lines. Changed 'GetPossiblePeaks' to use swap rather than return a vector. 'GetPeak' returns a reference to the PeakWindow since not returning a reference actually returned a copy
29 
30 @[May 9, 2022]
31 > Implemented the "Mean" filter from Rtools into this class, and made "filter" variables. Also got rid of 'scale' in 'AnalyzeForPeak' and made it its own variable 'BaselineSigmaScale'
32 
33 @[March 9, 2022]
34 > Moved the draw functions to their own separate painter class
35 
36 @[February 25, 2022]
37 > Added methods for using the peak "chirality" from peak window
38 
39 @[February 18, 2022]
40 > Moved *PeakWindow* to it's own implementation file
41 
42 @[February 7, 2022]
43 > Added ConvertToGraph/Ana functions that is useful for super noisy data where each PeakWindow can be thought of as a point in some graph. This graph essentially captures the shape of the data without the noise.
44 
45 @[February 2, 2022]
46 > Changed the probability function for peak window from Exp[-x]*Erfc[y] to 1/(x^2+1)*Erfc[y]. This was done as Exp[-x] was going to zero too quickly and thus made it difficult to find good parameters with reasonable probabilites. Also made some modifications to how things are drawn
47 
48 @[January 29, 2022]
49 > Changes to how drawing functions work and a compare for PeakWindow
50 
51 @[January 28, 2022]
52 > Fixes to peak tunnel method includng adding a tunnel sigma variable since using baseline sigma did not work as expected
53 
54 @[January 24, 2022]
55 > Added draw methods
56 
57 @[January 23, 2022]
58 > Added the peak tunneling method for skipping over noise data
59 
60 @[January 19, 2022]
61 > First instance of this class that is adopted from work on *StFcsPulseFit*
62 
63 @[January 21, 2022]>Inherit PeakAna from TGraph??
64 */
72 #ifndef PEAKANA_H
73 #define PEAKANA_H
74 
75 //C++ Headers
76 #include <iostream>
77 #include <vector>
78 #include <utility> //std::move (Needs C++ 11) and std::pair
79 #include <iterator>
80 
81 //ROOT Headers
82 #include "TObject.h"
83 #include "TAttLine.h"
84 #include "TKey.h"
85 #include "TH1.h"
86 #include "TPaveText.h"
87 
88 #include "St_base/StMessMgr.h"
89 
90 //Custom Headers
91 #include "PeakWindow.h"
92 class PeakAnaPainter;
93 
94 class PeakAna : public TObject
95 {
96 public:
97  PeakAna();
98  PeakAna( int size, double* xvals, double* yvals );
99  PeakAna( TGraph* Sig );
100  PeakAna( TH1* hist);
101  PeakAna(const PeakAna &OldAna,TGraph* graph=0);
102  PeakAna& operator=(const PeakAna& rhs);
103  virtual ~PeakAna();
104 
105  virtual void Copy(TObject& obj) const;
106  virtual TObject* Clone(const char* newname) const;
107 
117  virtual void AddPeakStats(TPaveText* pave, const char* opt="");
118 
127  static TGraph* ConvertHistToGraph(TH1* graph, UInt_t numavgs=1);
128 
135  static TGraph* ConvertPeaksToGraph(const std::vector<PeakWindow> &Peaks);
136  void ConvertPeaksToGraph();
137  static PeakAna ConvertPeaksToAna(const PeakAna &Ana);
139 
145  virtual void GetPossiblePeaks();
146 
155  virtual Int_t SearchForPeak(const std::vector<PeakWindow> &PossiblePeaks );
156  Int_t SearchForPeak(const std::vector<PeakWindow> &PossiblePeaks, const PeakWindow& search);
157  Int_t SearchForPeak(const std::vector<PeakWindow> &PossiblePeaks, Double_t peak, Double_t width);
158 
159  //Class methods can be used to store data and preserve found peaks for fitting
165  virtual Int_t AnalyzeForPeak();
166  virtual Int_t AnalyzeForPeak(Double_t peak, Double_t width);//<! same as #AnalyzeForPeak() but also sets search parameters for peak
167  virtual Int_t AnalyzeForNoisyPeak();//<! First calls #ConvertToAna() function and then #AnalyzeForPeak() on the converted data
168 
174  virtual void MergeByProbability(std::vector<PeakWindow>& newpeaks) const;
175  virtual void MergeByChirality(std::vector<PeakWindow>& newpeaks) const;
176  virtual short MergeLeftOrRight(UInt_t index) const;
177 
178  Double_t Baseline()const{return mBaseline;}
179  Double_t BaselineSigma()const{return fabs(mBaselineSigma); }
180  Double_t BaselineSigmaScale()const{return mBaselineSigmaScale;}
181  Double_t MinX()const{ return mXRangeMin; }
182  Double_t MinY()const{ return mYRangeMin; }
183  Double_t MaxX()const{ return mXRangeMax; }
184  Double_t MaxY()const{ return mYRangeMax; }
185  Double_t SearchPeak()const{ return mSearch.mStartX; }
186  Double_t SearchWidth()const{ return mSearch.mEndX; }
187  Double_t TunnelScale()const{ return mTunnelScale; }
188  Double_t TunnelSigma()const{ return mTunnelSigma; }
189  Double_t TunnelThreshold()const{ return mTunnelThreshold; }
190 
212  virtual void Draw(Option_t *opt="");
213  virtual void Paint(Option_t *opt=""); //<! see #Draw() for options
214  PeakAnaPainter* GetPainter(Option_t *opt=""); //<! Creates a #PeakAnaPainter if one doesn't exist @return #mPainter
215 
216  void ForceInternal(){ mInternalSignal=true; } //<! Call this when you need to tell this class to delete the internal TGraph object
224  PeakAna* GausFilter(Int_t sizeavgs=0, bool copy=true);
225  bool GoodWindow();
226  virtual TGraph* GetData()const{return mG_Data;}
227  UInt_t GetDebug()const{return mDEBUG;}
228  const PeakWindow& GetPeak(UInt_t peakidx)const{return mPeaks.at(peakidx);}
229  PeakWindow& GetPeak(UInt_t peakidx){return mPeaks.at(peakidx);}
230  UInt_t GetFilter()const{ return mFilter; }
231  Int_t GetFilterScale()const{ return mFilterScale; }
232 
233  Int_t FoundPeakIndex()const{return mComputedIndex;}
234  virtual void GetXYMax(Double_t xmin, Double_t xmax);
235  Double_t MaxXval(){if( mMaxX<mXRangeMax ){GetXYMax(mXRangeMin,mXRangeMax); } return mMaxX; }
236  Double_t MaxYval(){if( mMaxY<mYRangeMin ){GetXYMax(mXRangeMin,mXRangeMax);} return mMaxY; }
237 
245  PeakAna* MeanFilter(Int_t sizeavgs=0, bool copy=true);
246  int NPeaks()const{return mPeaks.size();}
247  bool ValidPeakIdx() const;
248 
249  Double_t PeakStart(){if( mComputedIndex<0 ){this->AnalyzeForPeak();} return mFoundPeak.mStartX;}
250  Double_t PeakEnd(){ if( mComputedIndex<0 ){this->AnalyzeForPeak();} return mFoundPeak.mEndX;}
251  Double_t PeakX();
252  Double_t PeakY();
253  void PeakXY(Double_t &xval, Double_t &yval);
254 
260  bool PeakTunnel(const PeakWindow &window) const;
261 
270  Double_t PeakProb(const PeakWindow& window, Double_t scale, Double_t sigma ) const;
271 
272  virtual void Print(Option_t* opt="") const;
273  void ResetPeak();
274 
275  void SetDebug(UInt_t level){ mDEBUG=level; }
276 
281  virtual void SetData(TGraph* graph);
282 
289  virtual void SetData(TH1* hist, UInt_t numavgs=1);
290 
291  void SetBaseline(Double_t base, Double_t sigma);
292  void SetBaselineSigmaScale(Double_t scale);
293  void SetContinuity(Double_t val){ mDeltaX = val; }
294 
302  void SetFilter( UInt_t filter, Int_t scale, Double_t sigma=0 );
303 
312  void SetRange( Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax);
313 
320  void SetSearchWindow(Double_t peak, Double_t width);
321 
322  void SetTunnelScale(Double_t value);
323  void SetTunnelSigma(Double_t value);
324  void SetTunnelPars(Double_t scale, Double_t sigma);
325  void SetTunnelThreshold(Double_t value);
326 
327  Double_t ChiralityPeakScale() const { return mChiralityPeakScale; }
328  Double_t ChiralityScale() const { return mChiralityScale; }
329  Double_t ChiralityProbScale() const { return mChiralityProbScale; }
330  Double_t ChiralityThreshold() const { return mChiralityThreshold; }
331  void SetChiralityPeakScale(Double_t v) { mChiralityPeakScale=v; }
332  void SetChiralityScale(Double_t v) { mChiralityScale=v;}
333  void SetChiralityProbScale(Double_t v){ mChiralityProbScale=v;}
334  void SetChiralityThreshold(Double_t v){ if(v<1){mChiralityThreshold=v;} }
335 
336  void SetPeak(const Int_t peakpoint, const Double_t peakx );
337  void SetWindow(const Int_t start, const Int_t end );
338  void SetWindow(PeakWindow window);
339 
340  //Styling for graph
341  Color_t GetLineColor() const;
342  Style_t GetLineStyle() const;
343  Width_t GetLineWidth() const;
344 
345  Color_t GetFillColor() const;
346  Style_t GetFillStyle() const;
347 
348  Color_t GetMarkerColor() const;
349  Size_t GetMarkerSize() const;
350  Style_t GetMarkerStyle() const;
351 
352  void SetLineColor(Color_t color);
353  void SetLineColorAlpha(Color_t color, Float_t alpha);
354  void SetLineStyle(Style_t style);
355  void SetLineWidth(Width_t width);
356 
357  void SetFillColor(Color_t color);
358  void SetFillColorAlpha(Color_t color, Float_t alpha);
359  void SetFillStyle(Style_t style);
360 
361  void SetMarkerColor(Color_t color=1);
362  void SetMarkerColorAlpha(Color_t color, Float_t alpha);
363  void SetMarkerSize(Size_t size=1);
364  void SetMarkerStyle(Style_t style=1);
365 
366  //Styling for peak painter
367  Color_t GetBaseLineColor() const;
368  Style_t GetBaseLineStyle() const;
369  Width_t GetBaseLineWidth() const;
370 
371  Color_t GetHitLineColor() const;
372  Style_t GetHitLineStyle() const;
373  Width_t GetHitLineWidth() const;
374 
375  void SetBaseLineColor(Color_t color);
376  void SetBaseLineColorAlpha(Color_t color,Float_t alpha);
377  void SetBaseLineStyle(Style_t style);
378  void SetBaseLineWidth(Width_t width);
379 
380  void SetHitLineColor(Color_t color);
381  void SetHitLineColorAlpha(Color_t color,Float_t alpha);
382  void SetHitLineStyle(Style_t style);
383  void SetHitLineWidth(Width_t width);
384 
385  Color_t GetPeakLineColorS(UInt_t peakidx) const;
386  Color_t GetPeakLineColorE(UInt_t peakidx) const;
387  Style_t GetPeakStyleS(UInt_t peakidx) const;
388  Style_t GetPeakStyleE(UInt_t peakidx) const;
389  Width_t GetPeakWidthS(UInt_t peakidx) const;
390  Width_t GetPeakWidthE(UInt_t peakidx) const;
391 
392  Color_t GetFoundPeakLineColorS() const;
393  Color_t GetFoundPeakLineColorE() const;
394  Style_t GetFoundPeakStyleS() const;
395  Style_t GetFoundPeakStyleE() const;
396  Width_t GetFoundPeakWidthS() const;
397  Width_t GetFoundPeakWidthE() const;
398 
399  void SetFoundPeakLineColorS(Color_t s_color);
400  void SetFoundPeakLineColorE(Color_t e_color);
401  void SetFoundPeakLineColor(Color_t s_color, Color_t e_color);
402  void SetFoundPeakStyleS(Style_t s_style);
403  void SetFoundPeakStyleE(Style_t e_style);
404  void SetFoundPeakStyle(Style_t s_style,Style_t e_style);
405  void SetFoundPeakWidthS(Width_t s_width);
406  void SetFoundPeakWidthE(Width_t e_width);
407  void SetFoundPeakWidth(Width_t s_width, Width_t e_width);
408 
409  void SetPeakLineColorS(UInt_t peakidx, Color_t s_color);
410  void SetPeakLineColorE(UInt_t peakidx, Color_t e_color);
411  void SetPeakLineColor(UInt_t peakidx, Color_t s_color, Color_t e_color);
412  void SetPeakLineColorAlphaS(UInt_t peakidx, Color_t s_color,Float_t s_alpha);
413  void SetPeakLineColorAlphaE(UInt_t peakidx, Color_t e_color,Float_t e_alpha);
414  void SetPeakLineColorAlpha(UInt_t peakidx, Color_t s_color,Float_t s_alpha, Color_t e_color, Float_t e_alpha);
415  void SetPeakLineStyleS(UInt_t peakidx, Style_t s_style);
416  void SetPeakLineStyleE(UInt_t peakidx, Style_t e_style);
417  void SetPeakLineStyle(UInt_t peakidx, Style_t s_style, Style_t e_style);
418  void SetPeakLineWidthS(UInt_t peakidx, Width_t s_width);
419  void SetPeakLineWidthE(UInt_t peakidx, Width_t e_width);
420  void SetPeakLineWidth(UInt_t peakidx, Width_t s_width, Width_t e_width);
421 
422  void SetAllPeakLineColor(Color_t s_color, Color_t e_color);
423  void SetAllPeakLineStyle(Style_t s_style, Color_t e_style);
424  void SetAllPeakLineWidth(Width_t s_width, Width_t e_width);
425 
426 protected:
427  void Init();
428 
437 
438  std::vector<PeakWindow> mPeaks;
439 
445 
451 
456  Double_t mBaseline;
457 
463  Double_t mBaselineSigma;
464 
470 
471  Double_t mMaxX;
472  Double_t mMaxY;
473 
478  Double_t mDeltaX;
479 
485  TGraph* mG_Data;
486 
487  //A bit redundant but used for internal checks
488  Double_t mXRangeMin;
489  Double_t mXRangeMax;
490  Double_t mYRangeMin;
491  Double_t mYRangeMax;
492 
493  Double_t mTunnelScale;
494  Double_t mTunnelSigma;
495  Double_t mTunnelThreshold;
496 
497  Double_t mChiralityPeakScale; //how much to scale the slope of the line formed by the start and end points of the window
498  Double_t mChiralityScale; //modify whether peak position should be near start or end of peak window (see PeakWindow)
499  Double_t mChiralityProbScale; //Scale for probablity
500  Double_t mChiralityThreshold; //Threshold chirality for peaks (if abs(chirality)>mChiralityThreshold merge +,- chirality)
501 
509  UInt_t mFilter;
510  Double_t* mFilterWeights;
511  Int_t mFilterScale;
512 
514 
525  static double* GaussianMatrix2D(int rx, double sx=0, int ry=0, double sy=0, bool kNorm=true);
526 
527  virtual bool MergeLeft(Double_t leftchir, Double_t thischir, Double_t rightchir) const;
528  virtual std::vector< std::pair<int,int> > MergeIndices(std::vector<short>& vec) const;
529 
530  TString mOption;
531 
532 private:
533  UInt_t mDEBUG;
534  bool mInternalSignal;
535 
536  ClassDef(PeakAna,3);
537 };
538 
539 #endif
540 
virtual Int_t SearchForPeak(const std::vector< PeakWindow > &PossiblePeaks)
searches a vector of PeakWindow&#39;s for a specific peak based on input search criteria ...
Definition: PeakAna.cxx:741
Double_t TunnelThreshold() const
Definition: PeakAna.h:189
void SetTunnelPars(Double_t scale, Double_t sigma)
Definition: PeakAna.cxx:371
Int_t mComputedIndex
Index in mPeaks where a peak was found.
Definition: PeakAna.h:436
void SetWindow(const Int_t start, const Int_t end)
Overwrite peak start and end values in mFoundPeak. WARNING doesn&#39;t set peak values nor overwrite mCom...
Definition: PeakAna.cxx:357
virtual ~PeakAna()
Destructor.
Definition: PeakAna.cxx:146
UInt_t GetDebug() const
Definition: PeakAna.h:227
Double_t MaxXval()
Definition: PeakAna.h:235
static double * GaussianMatrix2D(int rx, double sx=0, int ry=0, double sy=0, bool kNorm=true)
Generates up to a 2D matrix of Gaussian weights.
Definition: PeakAna.cxx:1248
Double_t SearchPeak() const
Definition: PeakAna.h:185
virtual void MergeByProbability(std::vector< PeakWindow > &newpeaks) const
Merges peaks in mPeaks using peak probability parameters.
Definition: PeakAna.cxx:792
Double_t MinY() const
Definition: PeakAna.h:182
virtual TObject * Clone(const char *newname) const
Clones internal graph as opposed to just copying the pointer.
Definition: PeakAna.cxx:129
Double_t mBaselineSigma
Error on PeakAna::mBaseline.
Definition: PeakAna.h:463
const PeakWindow & GetPeak(UInt_t peakidx) const
Definition: PeakAna.h:228
static TGraph * ConvertHistToGraph(TH1 *graph, UInt_t numavgs=1)
Converts a histogram to a graph.
Definition: PeakAna.cxx:382
Int_t FoundPeakIndex() const
Definition: PeakAna.h:233
void SetSearchWindow(Double_t peak, Double_t width)
Sets peak search parameters.
Definition: PeakAna.cxx:349
Double_t PeakY()
y-value of found signal peak
Definition: PeakAna.cxx:245
void SetTunnelThreshold(Double_t value)
Definition: PeakAna.cxx:376
virtual void SetData(TGraph *graph)
sets new data for PeakAna
Definition: PeakAna.cxx:302
TGraph * mG_Data
TGraph that stores the x,y data.
Definition: PeakAna.h:485
Double_t PeakX()
x-value of found signal peak
Definition: PeakAna.cxx:238
virtual TGraph * GetData() const
Definition: PeakAna.h:226
PeakAna * MeanFilter(Int_t sizeavgs=0, bool copy=true)
Apply a Mean filter to the data.
Definition: PeakAna.cxx:435
UInt_t GetFilter() const
Definition: PeakAna.h:230
Double_t mXRangeMax
Absolute possible x-value maximum of data.
Definition: PeakAna.h:489
void PeakXY(Double_t &xval, Double_t &yval)
get peak x, and y value directly by reference
Definition: PeakAna.cxx:252
PeakAna ConvertPeaksToAna()
same as ConvertPeaksToAna() but returns new PeakAna with same settings without modifying current one ...
Definition: PeakAna.cxx:614
Double_t PeakEnd()
Found Signal ending x-value.
Definition: PeakAna.h:250
virtual void Draw(Option_t *opt="")
Draw method for PeakAna.
Definition: PeakAna.cxx:984
TString mOption
Drawing option.
Definition: PeakAna.h:530
Double_t MaxYval()
Definition: PeakAna.h:236
virtual void GetPossiblePeaks()
Finds all possible Peaks in signal with some criteria.
Definition: PeakAna.cxx:640
PeakWindow mFoundPeak
Copy of found peak in mPeaks.
Definition: PeakAna.h:444
Int_t GetFilterScale() const
Definition: PeakAna.h:231
virtual void Copy(TObject &obj) const
Internal method use Clone instead.
Definition: PeakAna.cxx:97
virtual void GetXYMax(Double_t xmin, Double_t xmax)
Finds and sets mMaxX and mMaxY.
Definition: PeakAna.cxx:222
void SetBaseline(Double_t base, Double_t sigma)
Definition: PeakAna.cxx:330
void SetRange(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Sets the absolute range of the data.
Definition: PeakAna.cxx:342
Double_t mYRangeMin
Absolute possible y-value minimum of data.
Definition: PeakAna.h:490
void SetDebug(UInt_t level)
Definition: PeakAna.h:275
Double_t mTunnelSigma
Sigma for Gaussian for determining tunneling probability (default is 1) see #PeakWindow::PeakTunelPro...
Definition: PeakAna.h:494
Double_t MinX() const
Definition: PeakAna.h:181
void ResetPeak()
Resets values associated with peak finding.
Definition: PeakAna.cxx:292
virtual Int_t AnalyzeForPeak()
Main analysis method for finding peaks.
Definition: PeakAna.cxx:153
Double_t mMaxX
x-value where global maximum occurs
Definition: PeakAna.h:471
Double_t MaxX() const
Definition: PeakAna.h:183
void SetTunnelScale(Double_t value)
Definition: PeakAna.cxx:363
Double_t PeakStart()
Found Signal starting x-value.
Definition: PeakAna.h:249
Double_t SearchWidth() const
Definition: PeakAna.h:186
void SetBaselineSigmaScale(Double_t scale)
Definition: PeakAna.cxx:337
virtual void AddPeakStats(TPaveText *pave, const char *opt="")
Add peak information to a &quot;statistics&quot; box.
Definition: PeakAna.cxx:1010
PeakAnaPainter * mPainter
Painter for this class.
Definition: PeakAna.h:513
virtual void Print(Option_t *opt="") const
Print peak information.
Definition: PeakAna.cxx:259
Double_t BaselineSigma() const
Definition: PeakAna.h:179
PeakAna * GausFilter(Int_t sizeavgs=0, bool copy=true)
Apply a Gaussian filter to the data.
Definition: PeakAna.cxx:518
Double_t MaxY() const
Definition: PeakAna.h:184
void SetContinuity(Double_t val)
Definition: PeakAna.h:293
PeakWindow & GetPeak(UInt_t peakidx)
Definition: PeakAna.h:229
Double_t * mFilterWeights
Array of weights to use in filtering, size is 2*mFilterScale+1.
Definition: PeakAna.h:510
Double_t TunnelScale() const
Definition: PeakAna.h:187
Double_t mMaxY
y-value of global maximum
Definition: PeakAna.h:472
Double_t mBaselineSigmaScale
scale on PeakAna::mBaselineSigma to determine final threshold
Definition: PeakAna.h:469
PeakAna()
Default constructor that always creates a new TGraph.
Definition: PeakAna.cxx:6
void SetFilter(UInt_t filter, Int_t scale, Double_t sigma=0)
Set the filter to use when peak finding.
Definition: PeakAna.cxx:320
Double_t PeakProb(const PeakWindow &window, Double_t scale, Double_t sigma) const
compute a given PeakWindow probability using internal graph
Definition: PeakAna.cxx:635
std::vector< PeakWindow > mPeaks
vector that stores all the found peaks in the data
Definition: PeakAna.h:438
Double_t mStartX
x value for start of the peak window
Definition: PeakWindow.h:71
bool PeakTunnel(const PeakWindow &window) const
test whether a given peak satisifies peak tunnel parameters
Definition: PeakAna.cxx:619
bool ValidPeakIdx() const
Definition: PeakAna.cxx:204
Double_t Baseline() const
Definition: PeakAna.h:178
Double_t mTunnelScale
Scale on exponential for determining tunneling probability (default is 1) see #PeakWindow::PeakTunelP...
Definition: PeakAna.h:493
UInt_t mFilter
Filter to use in AnalyzeForPeak()
Definition: PeakAna.h:509
void Init()
Initialize internal varaibles.
Definition: PeakAna.cxx:31
int NPeaks() const
Definition: PeakAna.h:246
Int_t mFilterScale
How many points to group together when applying filter.
Definition: PeakAna.h:511
Double_t mYRangeMax
Absolute possible y-value maximum of data.
Definition: PeakAna.h:491
Double_t mEndX
x value for end of the peak window
Definition: PeakWindow.h:72
Double_t mBaseline
Minimum threshold to search for a peak.
Definition: PeakAna.h:456
Double_t BaselineSigmaScale() const
Definition: PeakAna.h:180
Double_t mTunnelThreshold
Cutoff probability for peak tunneling method. If threshold less than 0 (default) then skip peak tunne...
Definition: PeakAna.h:495
Double_t mDeltaX
graph known delta-x
Definition: PeakAna.h:478
PeakAna & operator=(const PeakAna &rhs)
Assignment operator doesn&#39;t clone graph.
Definition: PeakAna.cxx:83
void ConvertPeaksToGraph()
same as ConvertPeaksToGraph() but creates a new graph that replaces old one
Definition: PeakAna.cxx:412
Double_t TunnelSigma() const
Definition: PeakAna.h:188
Double_t mXRangeMin
Absolute possible x-value minimum of data.
Definition: PeakAna.h:488
PeakWindow mSearch
Variable that defines peak search parameters.
Definition: PeakAna.h:450
void SetTunnelSigma(Double_t value)
Definition: PeakAna.cxx:367
void SetPeak(const Int_t peakpoint, const Double_t peakx)
Overwrite peak location in #mFoundpeak. WARNING doesn&#39;t set start and end values nor overwrite mCompu...
Definition: PeakAna.cxx:355
bool GoodWindow()
Check if found peak is inside mXRangeMin, mYRangeMin, mXRangeMax, mYRangeMax and has logical values...
Definition: PeakAna.cxx:210