source: trunk/MagicSoft/Cosy/main/MBending.h@ 1767

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