KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVIDZALine.h
Go to the documentation of this file.
1 /***************************************************************************
2  KVIDZALine.h - description
3  -------------------
4  begin : Nov 10 2004
5  copyright : (C) 2004 by J.D. Frankland
6  email : frankland@ganil.fr
7 
8 $Id: KVIDZALine.h,v 1.6 2009/03/13 13:04:11 franklan Exp $
9 ***************************************************************************/
10 
11 #ifndef KVIDZALine_H
12 #define KVIDZALine_H
13 
14 #include "KVIDLine.h"
15 #include "KVNucleus.h"
16 #include "TGraphErrors.h"
17 
32 class KVIDZALine: public KVIDLine {
33 
34  friend class KVIDZAGrid;
35 
36 protected:
37 
40 
41  virtual void SetAsymWidth(Double_t d_l, Double_t d_r);
42 
45  virtual void SetName(const char* name)
46  {
47  TGraph::SetName(name);
48  };
49  virtual void WriteAsciiFile_extras(std::ofstream&, const Char_t* name_prefix = "");
50  virtual void ReadAsciiFile_extras(std::ifstream&);
51 
52 public:
53 
54  KVIDZALine();
55  KVIDZALine(const KVIDZALine&);
56 
57  virtual ~ KVIDZALine();
58  void Copy(TObject& obj) const;
59 
61  {
62  return fWidth;
63  };
65  {
66  fWidth = w;
67  };
68 
70 
71  inline virtual Int_t Compare(const TObject*) const;
72 
73  virtual void Print(Option_t* opt = "") const;
74 
75  void ReadAsciiFile_KVIDZLine(std::ifstream&);
76 
78 
79  ClassDef(KVIDZALine, 2)//Base class for identification ridge lines corresponding to different nuclear species
80 };
81 
83 
84 inline Int_t KVIDZALine::Compare(const TObject* obj) const
85 {
89 
91 
92  int zline1 = GetZ();
93  int zline2 = ((KVIDZALine*)obj)->GetZ();
94  if (zline1 > zline2)
95  return 1;
96  if (zline1 < zline2)
97  return -1;
99  int aline1 = GetA();
100  int aline2 = ((KVIDZALine*)obj)->GetA();
101  if (aline1 > aline2)
102  return 1;
103  if (aline1 < aline2)
104  return -1;
105  return 0;
106 }
107 
108 class KVIDZLine : public KVIDZALine {
109 
110 public:
111  KVIDZLine();
112  virtual ~KVIDZLine() {};
113 
114  ClassDef(KVIDZLine, 3) //FOR BACKWARDS COMPATIBILITY ONLY. OBSOLETE.
115 };
116 
117 #endif
int Int_t
char Char_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Base class for lines/cuts used for particle identification in 2D data maps.
Definition: KVIDLine.h:142
Identification grid with lines corresponding to different nuclear isotopes (KVIDZALine)
Definition: KVIDZAGrid.h:65
Base class for identification ridge lines corresponding to different nuclear species.
Definition: KVIDZALine.h:32
virtual void Print(Option_t *opt="") const
Definition: KVIDZALine.cpp:159
void Copy(TObject &obj) const
copy 'this' to 'obj'
Definition: KVIDZALine.cpp:61
void ReadAsciiFile_KVIDZLine(std::ifstream &)
Definition: KVIDZALine.cpp:126
virtual void SetName(const char *name)
Definition: KVIDZALine.h:45
virtual void SetAsymWidth(Double_t d_l, Double_t d_r)
Definition: KVIDZALine.cpp:214
TGraphErrors * GetLineWithWidth()
Definition: KVIDZALine.cpp:179
void SetWidth(Double_t w)
Definition: KVIDZALine.h:64
virtual void ReadAsciiFile_extras(std::ifstream &)
Read Z & A of line.
Definition: KVIDZALine.cpp:99
TGraphErrors * fLineWithWidth
used to display width of line
Definition: KVIDZALine.h:39
virtual ~ KVIDZALine()
Double_t GetWidth() const
Definition: KVIDZALine.h:60
Double_t fWidth
the "width" of the line
Definition: KVIDZALine.h:38
virtual Int_t Compare(const TObject *) const
Definition: KVIDZALine.h:84
virtual void WriteAsciiFile_extras(std::ofstream &, const Char_t *name_prefix="")
Write Z & A of line.
Definition: KVIDZALine.cpp:84
virtual ~KVIDZLine()
Definition: KVIDZALine.h:112
KVIDZLine()
This class is for backwards compatibility only.
Definition: KVIDZALine.cpp:272
virtual Int_t GetA() const
Definition: KVIDentifier.h:74
virtual Int_t GetZ() const
Definition: KVIDentifier.h:78
virtual void SetName(const char *name="")