KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVSpiderLine.h
Go to the documentation of this file.
1 
2 #ifndef __KVSPIDERLINE_H
3 #define __KVSPIDERLINE_H
4 
5 #include <TGraph.h>
6 #include <TF1.h>
7 #include <TLatex.h>
8 #include <TNamed.h>
9 
10 #include <Riostream.h>
11 
18 class KVSpiderLine : public TNamed {
19 protected:
20 
23  TF1* _ff;
24  int _z;
25  int _a;
26  bool _filled;
27  double _pow;
31 
33 
34 public:
35 
36  KVSpiderLine();
37  KVSpiderLine(int z_, Double_t pdy_ = 0.);
38  KVSpiderLine(int z_, int a_);
39  virtual ~KVSpiderLine() {}
40 
41  bool AddPoint(double x_, double y_, bool test_ = false, int n_ = -1);
42  bool AddInterpolatePoint(double x_, double y_, bool test_ = false, int n_ = -1);
43  void Apply(TF1* f);
44 
45  bool ReplaceLastPoint(double x_, double y_);
46  void Sort(bool ascending_ = true);
47  void SetZ(int z_);
48  void SetA(int a_);
49  void SetPower(double pow_)
50  {
51  _pow = pow_;
52  }
53 
55  {
57  }
58  void ResetCounter()
59  {
60  _pointsCounter = 0;
61  }
62 
63  double GetX(int n_)const;
64  double GetX()const;
65  double GetInterpolateX(int n_)const;
66  double GetInterpolateX()const;
67 
68  double GetY(int n_)const;
69  double GetY()const;
70  double GetInterpolateY(int n_)const;
71  double GetInterpolateY()const;
72 
73  int GetN()const;
74  int GetInterpolateN()const;
75 
77  {
78  return _line;
79  }
81  {
82  return _iline;
83  }
84  virtual TF1* GetFunction(double min_ = -1., double max_ = -1.);
85  int GetZ()
86  {
87  return _z;
88  }
89  int GetA()
90  {
91  return _a;
92  }
93 
94  bool GetStatus();
95  void SetStatus(bool filled_ = true);
96 
97  virtual bool TestPoint(double x_, double y_, double dy_ = -1., bool fit = true);
98  double GetDistance(double x_, double y_);
99  bool CheckStatus()const;
100  void Draw(Option_t* opt_ = "");
101 
103 };
104 
105 
106 #endif
107 
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Part of Spider Identification.
Definition: KVSpiderLine.h:18
void SetPower(double pow_)
Definition: KVSpiderLine.h:49
void Sort(bool ascending_=true)
double GetY() const
bool ReplaceLastPoint(double x_, double y_)
void Draw(Option_t *opt_="")
double GetInterpolateX() const
TGraph * GetLine()
Definition: KVSpiderLine.h:76
void ResetCounter()
Definition: KVSpiderLine.h:58
virtual bool TestPoint(double x_, double y_, double dy_=-1., bool fit=true)
int GetInterpolateN() const
TGraph * GetInterpolateLine()
Definition: KVSpiderLine.h:80
Int_t _fitStatus
Definition: KVSpiderLine.h:28
Int_t _pointsCounter
Definition: KVSpiderLine.h:30
void SetZ(int z_)
void SetA(int a_)
TGraph * _iline
Definition: KVSpiderLine.h:22
int GetN() const
double GetDistance(double x_, double y_)
Double_t _pdy
Definition: KVSpiderLine.h:32
void SetAcceptedPoints(Int_t n)
Definition: KVSpiderLine.h:54
bool CheckStatus() const
double GetX() const
virtual ~KVSpiderLine()
Definition: KVSpiderLine.h:39
bool AddInterpolatePoint(double x_, double y_, bool test_=false, int n_=-1)
bool AddPoint(double x_, double y_, bool test_=false, int n_=-1)
virtual TF1 * GetFunction(double min_=-1., double max_=-1.)
void SetStatus(bool filled_=true)
Int_t _nAcceptedPoints
Definition: KVSpiderLine.h:29
TGraph * _line
Definition: KVSpiderLine.h:21
void Apply(TF1 *f)
double GetInterpolateY() const
const Int_t n