1 | #ifndef COSY_MBending
|
---|
2 | #define COSY_MBending
|
---|
3 |
|
---|
4 | #include "coord.h"
|
---|
5 |
|
---|
6 | class TMinuit;
|
---|
7 |
|
---|
8 | class MBending
|
---|
9 | {
|
---|
10 | private:
|
---|
11 | Double_t fIe ; // [rad] Index Error in Elevation
|
---|
12 | Double_t fIa ; // [rad] Index Error in Azimuth
|
---|
13 | Double_t fCa ; // [rad] Left-Right Collimation Error
|
---|
14 | Double_t fAn ; // [rad] Azimuth Axis Misalignment (N-S)
|
---|
15 | Double_t fAw ; // [rad] Azimuth Axis Misalignment (E-W)
|
---|
16 | Double_t fNpae ; // [rad] Az-El Nonperpendicularity
|
---|
17 | Double_t fNrx ; // [rad] Nasmyth rotator displacement, horizontan
|
---|
18 | Double_t fNry ; // [rad] Nasmyth rotator displacement, vertical
|
---|
19 | Double_t fCrx ; // [rad] Alt/Az Coude Displacement (N-S)
|
---|
20 | Double_t fCry ; // [rad] Alt/Az Coude Displacement (E-W)
|
---|
21 | Double_t fEces ; // [rad] Elevation Centering Error (sin)
|
---|
22 | Double_t fAces ; // [rad] Azimuth Centering Error (sin)
|
---|
23 | Double_t fEcec ; // [rad] Elevation Centering Error (cos)
|
---|
24 | Double_t fAcec ; // [rad] Azimuth Centering Error (cos)
|
---|
25 | Double_t fMagic1; // [rad] Magic Term (what is it?)
|
---|
26 | Double_t fMagic2; // [rad] Magic Term (what is it?)
|
---|
27 |
|
---|
28 |
|
---|
29 | void Clear()
|
---|
30 | {
|
---|
31 | fIe =0 ; // Index Error in Elevation
|
---|
32 | fIa =0 ; // Index Error in Azimuth
|
---|
33 | fCa =0 ; // Left-Right Collimation Error
|
---|
34 | fAn =0 ; // Azimuth Axis Misalignment (N-S)
|
---|
35 | fAw =0 ; // Azimuth Axis Misalignment (E-W)
|
---|
36 | fNpae=0 ; // Az-El Nonperpendicularity
|
---|
37 | fNrx =0 ; // Nasmyth rotator displacement, horizontan
|
---|
38 | fNry =0 ; // Nasmyth rotator displacement, vertical
|
---|
39 | fCrx =0 ; // Alt/Az Coude Displacement (N-S)
|
---|
40 | fCry =0 ; // Alt/Az Coude Displacement (E-W)
|
---|
41 | fEces=0 ; // Elevation Centering Error (sin)
|
---|
42 | fAces=0 ; // Azimuth Centering Error (sin)
|
---|
43 | fEcec=0 ; // Elevation Centering Error (cos)
|
---|
44 | fAcec=0 ; // Azimuth Centering Error (cos)
|
---|
45 | fMagic1=0; // Azimuth Centering Error (cos)
|
---|
46 | fMagic2=0; // Azimuth Centering Error (cos)
|
---|
47 | }
|
---|
48 |
|
---|
49 | public:
|
---|
50 | MBending() { Clear(); }
|
---|
51 | MBending(const char *name) { Clear(); Load(name); }
|
---|
52 |
|
---|
53 | void Load(const char *name);
|
---|
54 | void Save(const char *name);
|
---|
55 |
|
---|
56 | void Reset();
|
---|
57 |
|
---|
58 | ZdAz Correct(const ZdAz &zdaz) const;
|
---|
59 | AltAz Correct(const AltAz &aaz) const;
|
---|
60 |
|
---|
61 | ZdAz CorrectBack(const ZdAz &zdaz) const;
|
---|
62 | AltAz CorrectBack(const AltAz &aaz) const;
|
---|
63 |
|
---|
64 | ZdAz operator()(const ZdAz &zdaz) const { return Correct(zdaz); }
|
---|
65 | AltAz operator()(const AltAz &aaz) const { return Correct(aaz); }
|
---|
66 |
|
---|
67 | ZdAz operator()(const ZdAz &zdaz, void (*fcn)(ZdAz &zdaz, Double_t *par)) const
|
---|
68 | {
|
---|
69 | Double_t par[16];
|
---|
70 | GetParameters(par);
|
---|
71 | ZdAz za = zdaz;
|
---|
72 | fcn(za, par);
|
---|
73 | return za;
|
---|
74 | }
|
---|
75 |
|
---|
76 | AltAz operator()(const AltAz &aaz, void (*fcn)(AltAz &aaz, Double_t *par)) const
|
---|
77 | {
|
---|
78 | Double_t par[16];
|
---|
79 | GetParameters(par);
|
---|
80 | AltAz aa = aaz;
|
---|
81 | fcn(aa, par);
|
---|
82 | return aa;
|
---|
83 | }
|
---|
84 |
|
---|
85 | void SetParameters(const Double_t *par, Int_t n=16);
|
---|
86 | void GetParameters(Double_t *par, Int_t n=16) const;
|
---|
87 |
|
---|
88 | void SetMinuitParameters(TMinuit &m, Int_t n=-1) const;
|
---|
89 | void GetMinuitParameters(TMinuit &m, Int_t n=-1);
|
---|
90 | void PrintMinuitParameters(TMinuit &m, Int_t n=-1) const;
|
---|
91 |
|
---|
92 | /*
|
---|
93 | Double_t GetIe() const { return fIe; }
|
---|
94 | Double_t GetIa() const { return fIa; }
|
---|
95 | Double_t GetCa() const { return fCa; }
|
---|
96 | Double_t GetAn() const { return fAn; }
|
---|
97 | Double_t GetAw() const { return fAw; }
|
---|
98 | Double_t GetNrx() const { return fNrx; }
|
---|
99 | Double_t GetNry() const { return fNry; }
|
---|
100 | Double_t GetCrx() const { return fNrx; }
|
---|
101 | Double_t GetCry() const { return fNry; }
|
---|
102 | Double_t GetEces() const { return fEces; }
|
---|
103 | Double_t GetEcec() const { return fEcec; }
|
---|
104 | Double_t GetAces() const { return fAces; }
|
---|
105 | Double_t GetAcec() const { return fAcec; }
|
---|
106 | Double_t GetNpae() const { return fNpae; }
|
---|
107 | */
|
---|
108 |
|
---|
109 | ClassDef(MBending, 1)
|
---|
110 | };
|
---|
111 |
|
---|
112 | #endif
|
---|