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

Last change on this file since 1805 was 1805, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 3.8 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 Double_t fMagic1; // [rad] Magic Term (what is it?)
30 Double_t fMagic2; // [rad] Magic Term (what is it?)
31
32
33 void Clear()
34 {
35 fIe =0 ; // Index Error in Elevation
36 fIa =0 ; // Index Error in Azimuth
37 fCa =0 ; // Left-Right Collimation Error
38 fAn =0 ; // Azimuth Axis Misalignment (N-S)
39 fAw =0 ; // Azimuth Axis Misalignment (E-W)
40 fNpae=0 ; // Az-El Nonperpendicularity
41 fNrx =0 ; // Nasmyth rotator displacement, horizontan
42 fNry =0 ; // Nasmyth rotator displacement, vertical
43 fCrx =0 ; // Alt/Az Coude Displacement (N-S)
44 fCry =0 ; // Alt/Az Coude Displacement (E-W)
45 fEces=0 ; // Elevation Centering Error (sin)
46 fAces=0 ; // Azimuth Centering Error (sin)
47 fEcec=0 ; // Elevation Centering Error (cos)
48 fAcec=0 ; // Azimuth Centering Error (cos)
49 fMagic1=0; // Azimuth Centering Error (cos)
50 fMagic2=0; // Azimuth Centering Error (cos)
51 }
52
53public:
54 MBending() { Clear(); }
55
56 void Load(const char *name);
57 void Save(const char *name);
58
59 void Reset();
60
61 ZdAz Correct(const ZdAz &zdaz) const;
62 AltAz Correct(const AltAz &aaz) const;
63
64 ZdAz CorrectBack(const ZdAz &zdaz) const;
65 AltAz CorrectBack(const AltAz &aaz) const;
66
67 ZdAz operator()(const ZdAz &zdaz) const { return Correct(zdaz); }
68 AltAz operator()(const AltAz &aaz) const { return Correct(aaz); }
69
70 ZdAz operator()(const ZdAz &zdaz, void (*fcn)(ZdAz &zdaz, Double_t *par)) const
71 {
72 Double_t par[16];
73 GetParameters(par);
74 ZdAz za = zdaz;
75 fcn(za, par);
76 return za;
77 }
78
79 AltAz operator()(const AltAz &aaz, void (*fcn)(AltAz &aaz, Double_t *par)) const
80 {
81 Double_t par[16];
82 GetParameters(par);
83 AltAz aa = aaz;
84 fcn(aa, par);
85 return aa;
86 }
87
88 void SetParameters(const Double_t *par, Int_t n=16);
89 void GetParameters(Double_t *par, Int_t n=16) const;
90
91 void SetMinuitParameters(TMinuit &m, Int_t n=-1) const;
92 void GetMinuitParameters(TMinuit &m, Int_t n=-1);
93 void PrintMinuitParameters(TMinuit &m, Int_t n=-1) const;
94
95 /*
96 Double_t GetIe() const { return fIe; }
97 Double_t GetIa() const { return fIa; }
98 Double_t GetCa() const { return fCa; }
99 Double_t GetAn() const { return fAn; }
100 Double_t GetAw() const { return fAw; }
101 Double_t GetNrx() const { return fNrx; }
102 Double_t GetNry() const { return fNry; }
103 Double_t GetCrx() const { return fNrx; }
104 Double_t GetCry() const { return fNry; }
105 Double_t GetEces() const { return fEces; }
106 Double_t GetEcec() const { return fEcec; }
107 Double_t GetAces() const { return fAces; }
108 Double_t GetAcec() const { return fAcec; }
109 Double_t GetNpae() const { return fNpae; }
110 */
111
112 ClassDef(MBending, 1)
113};
114
115#endif
Note: See TracBrowser for help on using the repository browser.