ROOT  6.06/09
Reference Guide
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 #ifndef ROOT_TNamed
15 #include "TNamed.h"
16 #endif
17 
18 class TH1;
19 
20 class TSpectrum3 : public TNamed {
21 protected:
22  Int_t fMaxPeaks; //Maximum number of peaks to be found
23  Int_t fNPeaks; //number of peaks found
24  Double_t *fPosition; //[fNPeaks] array of current peak positions
25  Double_t *fPositionX; //[fNPeaks] X positions of peaks
26  Double_t *fPositionY; //[fNPeaks] Y positions of peaks
27  Double_t *fPositionZ; //[fNPeaks] Z positions of peaks
28  Double_t fResolution; //resolution of the neighboring peaks
29  TH1 *fHistogram; //resulting histogram
30 
31 public:
32  enum {
37  };
38 
39  TSpectrum3();
40  TSpectrum3(Int_t maxpositions, Double_t resolution=1);
41  virtual ~TSpectrum3();
42  virtual const char *Background(const TH1 *hist, Int_t niter, Option_t *option="goff");
43  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);
44  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);
45  TH1 *GetHistogram() const {return fHistogram;}
46  Int_t GetNPeaks() const {return fNPeaks;}
47  Double_t *GetPositionX() const {return fPositionX;}
48  Double_t *GetPositionY() const {return fPositionY;}
49  Double_t *GetPositionZ() const {return fPositionZ;}
50  virtual void Print(Option_t *option="") const;
51  virtual Int_t Search(const TH1 *hist, Double_t sigma=2, Option_t *option="goff", Double_t threshold=0.05);
52  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);
53  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);
54  void SetResolution(Double_t resolution=1);
55  const char *SmoothMarkov(Double_t ***source, Int_t ssizex, Int_t ssizey, Int_t ssizez, Int_t averWindow);
56 
57  ClassDef(TSpectrum3,1) //Peak Finder, Background estimator, Markov smoothing and Deconvolution for 3-D histograms
58 };
59 
60 #endif
61 
62 
void SetResolution(Double_t resolution=1)
resolution: determines resolution of the neighboring peaks default value is 1 correspond to 3 sigma d...
Definition: TSpectrum3.cxx:244
Double_t * fPosition
Definition: TSpectrum3.h:24
Double_t * GetPositionX() const
Definition: TSpectrum3.h:47
Int_t fNPeaks
Definition: TSpectrum3.h:23
const char Option_t
Definition: RtypesCore.h:62
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)
const char * SmoothMarkov(Double_t ***source, Int_t ssizex, Int_t ssizey, Int_t ssizez, Int_t averWindow)
THREE-DIMENSIONAL MARKOV SPECTRUM SMOOTHING FUNCTION // // This function calculates smoothed spectrum...
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)
THREE-DIMENSIONAL DECONVOLUTION FUNCTION // This function calculates deconvolution from source spectr...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TH1 * GetHistogram() const
Definition: TSpectrum3.h:45
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
Double_t * fPositionZ
Definition: TSpectrum3.h:27
virtual const char * Background(const TH1 *hist, Int_t niter, Option_t *option="goff")
ONE-DIMENSIONAL BACKGROUND ESTIMATION FUNCTION // This function calculates background spectrum from s...
Definition: TSpectrum3.cxx:131
Double_t * fPositionY
Definition: TSpectrum3.h:26
Double_t fResolution
Definition: TSpectrum3.h:28
LVector boost(const LVector &v, const BoostVector &b)
Boost a generic Lorentz Vector class using a generic 3D Vector class describing the boost The only re...
Definition: VectorUtil.h:329
Advanced 3-dimentional spectra processing functions.
Definition: TSpectrum3.h:20
Int_t fMaxPeaks
Definition: TSpectrum3.h:22
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)
double Double_t
Definition: RtypesCore.h:55
virtual void Print(Option_t *option="") const
Print the array of positions.
Definition: TSpectrum3.cxx:142
The TH1 histogram class.
Definition: TH1.h:80
TH1 * fHistogram
Definition: TSpectrum3.h:29
Double_t * fPositionX
Definition: TSpectrum3.h:25
Double_t * GetPositionY() const
Definition: TSpectrum3.h:48
#define dest(otri, vertexptr)
Definition: triangle.c:1040
Int_t GetNPeaks() const
Definition: TSpectrum3.h:46
Double_t * GetPositionZ() const
Definition: TSpectrum3.h:49
virtual Int_t Search(const TH1 *hist, Double_t sigma=2, Option_t *option="goff", Double_t threshold=0.05)
ONE-DIMENSIONAL PEAK SEARCH FUNCTION // This function searches for peaks in source spectrum in hin //...
Definition: TSpectrum3.cxx:178
virtual ~TSpectrum3()
Destructor.
Definition: TSpectrum3.cxx:109