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

Last change on this file since 8875 was 4865, checked in by rwagner, 20 years ago
*** empty log message ***
File size: 1.3 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 void SetX(Double_t x) { fX=x; }
43 void SetY(Double_t y) { fY=y; }
44
45 Double_t GetX() const { return fX; }
46 Double_t GetY() const { return fY; }
47 Double_t GetDx() const { return fDx; }
48 Double_t GetDy() const { return fDy; }
49 Double_t GetPhi() const { return fPhi; }
50 Double_t GetDphi() const { return fDphi; }
51 Double_t GetMag() const { return fMag; }
52
53 void AddOffset(Double_t dx, Double_t dy) { fX+=dx; fY+=dy; }
54
55 Bool_t IsSortable() const { return kTRUE; }
56
57 void CalcPhi(const Ring &ring);
58
59 void Print(Option_t *o=NULL) const;
60
61 ClassDef(Led, 1)
62};
63
64#endif
Note: See TracBrowser for help on using the repository browser.