source: trunk/Cosy/caos/Ring.h@ 13311

Last change on this file since 13311 was 7763, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 979 bytes
Line 
1#ifndef COSY_Ring
2#define COSY_Ring
3
4#ifndef ROOT_TObject
5#include <TObject.h>
6#endif
7
8class Leds;
9class Rings;
10
11class Ring : public TObject
12{
13private:
14 Double_t fX;
15 Double_t fY;
16 Double_t fR;
17 Double_t fPhi;
18
19 Double_t fDx;
20 Double_t fDy;
21 Double_t fDr;
22 Double_t fDphi;
23
24 Double_t fMag;
25
26 Double_t sqr(Double_t x) { return x*x; }
27
28 void Swap(int &m, int &n)
29 {
30 int dummy = m;
31 m = n;
32 n = dummy;
33 }
34
35public:
36 Ring(Double_t x=0, Double_t y=0);
37
38 void SetXY(Double_t x=0, Double_t y=0) { fX=x; fY=y; }
39
40 Double_t GetX() const { return fX; }
41 Double_t GetY() const { return fY; }
42 Double_t GetR() const { return fR; }
43 Double_t GetPhi() const { return fPhi; }
44
45 Double_t GetMag() const { return fMag; }
46
47 bool CalcCenter(const Leds &leds, Int_t i, Int_t j, Int_t k);
48 void InterpolCenters(const Rings &rings);
49
50 void Print(Option_t *o=NULL) const;
51
52 ClassDef(Ring, 1)
53};
54
55#endif
Note: See TracBrowser for help on using the repository browser.