source: trunk/MagicSoft/Cosy/caos/Led.h@ 2278

Last change on this file since 2278 was 2278, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.2 KB
Line 
1#ifndef COSY_Led
2#define COSY_Led
3
4#ifndef ROOT_TObject
5#include <TObject.h>
6#endif
7
8class Ring;
9
10class Led : public TObject
11{
12private:
13 Double_t fX;
14 Double_t fY;
15 Double_t fPhi;
16
17 Double_t fDx;
18 Double_t fDy;
19 Double_t fDphi;
20
21 Double_t fMag;
22
23public:
24 Led(Double_t x=0, Double_t y=0, Double_t dx=0, Double_t dy=0, Double_t mag=0) :
25 fX(x), fY(y), fPhi(0), fDx(dx), fDy(dy), fDphi(-1), fMag(mag)
26 {
27 }
28
29 Int_t Compare(const TObject *obj) const
30 {
31 const Led *const l = (Led*)obj;
32
33 if (fPhi<l->fPhi)
34 return -1;
35
36 if (fPhi>l->fPhi)
37 return 1;
38
39 return 0;
40 }
41
42 Double_t GetX() const { return fX; }
43 Double_t GetY() const { return fY; }
44 Double_t GetDx() const { return fDx; }
45 Double_t GetDy() const { return fDy; }
46 Double_t GetPhi() const { return fPhi; }
47 Double_t GetDphi() const { return fDphi; }
48 Double_t GetMag() const { return fMag; }
49
50 void AddOffset(Double_t dx, Double_t dy) { fX+=dx; fY+=dy; }
51
52 Bool_t IsSortable() const { return kTRUE; }
53
54 void CalcPhi(const Ring &ring);
55
56 void Print(Option_t *o=NULL) const;
57
58 ClassDef(Led, 1)
59};
60
61#endif
Note: See TracBrowser for help on using the repository browser.