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

Last change on this file since 1443 was 1393, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 3.5 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 ZdAz Correct(const ZdAz &zdaz) const;
55 AltAz Correct(const AltAz &aaz) const;
56
57 ZdAz operator()(const ZdAz &zdaz) const { return Correct(zdaz); }
58 AltAz operator()(const AltAz &aaz) const { return Correct(aaz); }
59
60 ZdAz operator()(const ZdAz &zdaz, void (*fcn)(ZdAz &zdaz, Double_t *par)) const
61 {
62 Double_t par[14];
63 GetParameters(par);
64 ZdAz za = zdaz;
65 fcn(za, par);
66 return za;
67 }
68
69 AltAz operator()(const AltAz &aaz, void (*fcn)(AltAz &aaz, Double_t *par)) const
70 {
71 Double_t par[14];
72 GetParameters(par);
73 AltAz aa = aaz;
74 fcn(aa, par);
75 return aa;
76 }
77
78
79 void SetParameters(const Double_t *par, Int_t n=14);
80 void GetParameters(Double_t *par, Int_t n=14) const;
81
82 void SetMinuitParameters(TMinuit &m, Int_t n=-1) const;
83 void GetMinuitParameters(TMinuit &m, Int_t n=-1);
84 void PrintMinuitParameters(TMinuit &m, Int_t n=-1) const;
85
86 /*
87 Double_t GetIe() const { return fIe; }
88 Double_t GetIa() const { return fIa; }
89 Double_t GetCa() const { return fCa; }
90 Double_t GetAn() const { return fAn; }
91 Double_t GetAw() const { return fAw; }
92 Double_t GetNrx() const { return fNrx; }
93 Double_t GetNry() const { return fNry; }
94 Double_t GetCrx() const { return fNrx; }
95 Double_t GetCry() const { return fNry; }
96 Double_t GetEces() const { return fEces; }
97 Double_t GetEcec() const { return fEcec; }
98 Double_t GetAces() const { return fAces; }
99 Double_t GetAcec() const { return fAcec; }
100 Double_t GetNpae() const { return fNpae; }
101 */
102
103 ClassDef(MBending, 1)
104};
105
106#endif
Note: See TracBrowser for help on using the repository browser.