Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
16 class TH1;
17 
18 class TSpectrum3 : public TNamed {
19 protected:
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 
29 public:
30  enum {
31  kBackIncreasingWindow =0,
32  kBackDecreasingWindow =1,
33  kBackSuccessiveFiltering =0,
34  kBackOneStepFiltering =1
35  };
36 
37  TSpectrum3();
38  TSpectrum3(Int_t maxpositions, Double_t resolution=1); // resolution is *NOT USED*
39  virtual ~TSpectrum3();
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  virtual void Print(Option_t *option="") const;
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  ClassDef(TSpectrum3,1) //Peak Finder, Background estimator, Markov smoothing and Deconvolution for 3-D histograms
56 };
57 
58 #endif
59 
60