Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TSpectrum3.h
Go to the documentation of this file.
1// @(#)root/spectrum:$Id$
2// Author: Miroslav Morhac 25/09/2006
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11#ifndef ROOT_TSpectrum3
12#define ROOT_TSpectrum3
13
14#include "TNamed.h"
15
16class TH1;
17
18class TSpectrum3 : public TNamed {
19protected:
20 Int_t fMaxPeaks; ///< Maximum number of peaks to be found
21 Int_t fNPeaks; ///< number of peaks found
22 Double_t *fPosition; ///< [fNPeaks] array of current peak positions
23 Double_t *fPositionX; ///< [fNPeaks] X positions of peaks
24 Double_t *fPositionY; ///< [fNPeaks] Y positions of peaks
25 Double_t *fPositionZ; ///< [fNPeaks] Z positions of peaks
26 Double_t fResolution; ///< *NOT USED* resolution of the neighboring peaks
27 TH1 *fHistogram; ///< resulting histogram
28
29public:
30 enum {
35 };
36
37 TSpectrum3();
38 TSpectrum3(Int_t maxpositions, Double_t resolution=1); // resolution is *NOT USED*
39 ~TSpectrum3() override;
40 virtual const char *Background(const TH1 *hist, Int_t niter, Option_t *option="goff");
41 const char *Background(Double_t ***spectrum, Int_t ssizex, Int_t ssizey, Int_t ssizez, Int_t numberIterationsX,Int_t numberIterationsY, Int_t numberIterationsZ, Int_t direction,Int_t filterType);
42 const char *Deconvolution(Double_t ***source, const Double_t ***resp, Int_t ssizex, Int_t ssizey, Int_t ssizez,Int_t numberIterations, Int_t numberRepetitions, Double_t boost);
43 TH1 *GetHistogram() const {return fHistogram;}
44 Int_t GetNPeaks() const {return fNPeaks;}
45 Double_t *GetPositionX() const {return fPositionX;}
46 Double_t *GetPositionY() const {return fPositionY;}
47 Double_t *GetPositionZ() const {return fPositionZ;}
48 void Print(Option_t *option="") const override;
49 virtual Int_t Search(const TH1 *hist, Double_t sigma=2, Option_t *option="goff", Double_t threshold=0.05);
50 Int_t SearchFast(const Double_t ***source, Double_t ***dest, Int_t ssizex, Int_t ssizey, Int_t ssizez, Double_t sigma, Double_t threshold, Bool_t markov, Int_t averWindow);
51 Int_t SearchHighRes(const Double_t ***source,Double_t ***dest, Int_t ssizex, Int_t ssizey, Int_t ssizez, Double_t sigma, Double_t threshold, Bool_t backgroundRemove,Int_t deconIterations, Bool_t markov, Int_t averWindow);
52 void SetResolution(Double_t resolution=1); // *NOT USED*
53 const char *SmoothMarkov(Double_t ***source, Int_t ssizex, Int_t ssizey, Int_t ssizez, Int_t averWindow);
54
55 ClassDefOverride(TSpectrum3,1) //Peak Finder, Background estimator, Markov smoothing and Deconvolution for 3-D histograms
56};
57
58#endif
59
60
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Advanced 3-dimensional spectra processing functions.
Definition TSpectrum3.h:18
Int_t GetNPeaks() const
Definition TSpectrum3.h:44
Double_t fResolution
NOT USED resolution of the neighboring peaks
Definition TSpectrum3.h:26
Int_t fMaxPeaks
Maximum number of peaks to be found.
Definition TSpectrum3.h:20
TH1 * GetHistogram() const
Definition TSpectrum3.h:43
Int_t SearchFast(const Double_t ***source, Double_t ***dest, Int_t ssizex, Int_t ssizey, Int_t ssizez, Double_t sigma, Double_t threshold, Bool_t markov, Int_t averWindow)
THREE-DIMENSIONAL CLASSICAL PEAK SEARCH FUNCTION This function searches for peaks in source spectrum ...
virtual const char * Background(const TH1 *hist, Int_t niter, Option_t *option="goff")
This function calculates background spectrum from source in h.
TH1 * fHistogram
resulting histogram
Definition TSpectrum3.h:27
const char * Deconvolution(Double_t ***source, const Double_t ***resp, Int_t ssizex, Int_t ssizey, Int_t ssizez, Int_t numberIterations, Int_t numberRepetitions, Double_t boost)
This function calculates deconvolution from source spectrum according to response spectrum The result...
Double_t * fPositionY
[fNPeaks] Y positions of peaks
Definition TSpectrum3.h:24
Double_t * GetPositionY() const
Definition TSpectrum3.h:46
Double_t * fPosition
[fNPeaks] array of current peak positions
Definition TSpectrum3.h:22
virtual Int_t Search(const TH1 *hist, Double_t sigma=2, Option_t *option="goff", Double_t threshold=0.05)
This function searches for peaks in source spectrum in hin The number of found peaks and their positi...
Int_t SearchHighRes(const Double_t ***source, Double_t ***dest, Int_t ssizex, Int_t ssizey, Int_t ssizez, Double_t sigma, Double_t threshold, Bool_t backgroundRemove, Int_t deconIterations, Bool_t markov, Int_t averWindow)
This function searches for peaks in source spectrum It is based on deconvolution method.
const char * SmoothMarkov(Double_t ***source, Int_t ssizex, Int_t ssizey, Int_t ssizez, Int_t averWindow)
This function calculates smoothed spectrum from source spectrum based on Markov chain method.
@ kBackIncreasingWindow
Definition TSpectrum3.h:31
@ kBackOneStepFiltering
Definition TSpectrum3.h:34
@ kBackSuccessiveFiltering
Definition TSpectrum3.h:33
@ kBackDecreasingWindow
Definition TSpectrum3.h:32
Double_t * fPositionZ
[fNPeaks] Z positions of peaks
Definition TSpectrum3.h:25
Double_t * GetPositionX() const
Definition TSpectrum3.h:45
TSpectrum3()
Constructor.
Double_t * fPositionX
[fNPeaks] X positions of peaks
Definition TSpectrum3.h:23
Int_t fNPeaks
number of peaks found
Definition TSpectrum3.h:21
void Print(Option_t *option="") const override
Print the array of positions.
Double_t * GetPositionZ() const
Definition TSpectrum3.h:47
void SetResolution(Double_t resolution=1)
NOT USED resolution: determines resolution of the neighbouring peaks default value is 1 correspond to...
~TSpectrum3() override
Destructor.
const Double_t sigma