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