KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVIDZALine.h
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
33class KVIDZALine: public KVIDLine {
34
35 friend class KVIDZAGrid;
36
37protected:
38
41
42 virtual void SetAsymWidth(Double_t d_l, Double_t d_r);
43
46 virtual void SetName(const char* name)
47 {
49 };
50 virtual void WriteAsciiFile_extras(std::ofstream&, const Char_t* name_prefix = "");
51 virtual void ReadAsciiFile_extras(std::ifstream&);
52
53public:
54
55 KVIDZALine();
56 KVIDZALine(const KVIDZALine&);
57
58 virtual ~ KVIDZALine();
59 void Copy(TObject& obj) const;
60
62 {
63 return fWidth;
64 };
66 {
67 fWidth = w;
68 };
69
71
72 inline virtual Int_t Compare(const TObject*) const;
73
74 virtual void Print(Option_t* opt = "") const;
75
76 void ReadAsciiFile_KVIDZLine(std::ifstream&);
77
79
80 ClassDef(KVIDZALine, 2)//Base class for identification ridge lines corresponding to different nuclear species
81};
82
84
85inline Int_t KVIDZALine::Compare(const TObject* obj) const
86{
90
92
93 int zline1 = GetZ();
94 int zline2 = ((KVIDZALine*)obj)->GetZ();
95 if (zline1 > zline2)
96 return 1;
97 if (zline1 < zline2)
98 return -1;
100 int aline1 = GetA();
101 int aline2 = ((KVIDZALine*)obj)->GetA();
102 if (aline1 > aline2)
103 return 1;
104 if (aline1 < aline2)
105 return -1;
106 return 0;
107}
108
109class KVIDZLine : public KVIDZALine {
110
111public:
112 KVIDZLine();
113 virtual ~KVIDZLine() {};
114
115 ClassDef(KVIDZLine, 3) //FOR BACKWARDS COMPATIBILITY ONLY. OBSOLETE.
116};
117
118#endif
int Int_t
char Char_t
double Double_t
const char Option_t
#define ClassDef(name, id)
winID w
char name[80]
Base class for lines/cuts used for particle identification in 2D data maps.
Definition KVIDLine.h:143
Identification grid with lines corresponding to different nuclear isotopes (KVIDZALine)
Definition KVIDZAGrid.h:66
Base class for identification ridge lines corresponding to different nuclear species.
Definition KVIDZALine.h:33
virtual void Print(Option_t *opt="") const
void Copy(TObject &obj) const
copy 'this' to 'obj'
void ReadAsciiFile_KVIDZLine(std::ifstream &)
virtual void SetName(const char *name)
Definition KVIDZALine.h:46
virtual void SetAsymWidth(Double_t d_l, Double_t d_r)
TGraphErrors * GetLineWithWidth()
void SetWidth(Double_t w)
Definition KVIDZALine.h:65
virtual void ReadAsciiFile_extras(std::ifstream &)
Read Z & A of line.
TGraphErrors * fLineWithWidth
used to display width of line
Definition KVIDZALine.h:40
Double_t GetWidth() const
Definition KVIDZALine.h:61
Double_t fWidth
the "width" of the line
Definition KVIDZALine.h:39
virtual Int_t Compare(const TObject *) const
Definition KVIDZALine.h:85
virtual void WriteAsciiFile_extras(std::ofstream &, const Char_t *name_prefix="")
Write Z & A of line.
virtual ~KVIDZLine()
Definition KVIDZALine.h:113
KVIDZLine()
This class is for backwards compatibility only.
virtual Int_t GetA() const
virtual Int_t GetZ() const
void SetName(const char *name="") override