Changeset 4966 for trunk/MagicSoft/Mars/mpointing/MPointing.h
- Timestamp:
- 09/13/04 08:57:58 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MPointing.h
r4804 r4966 4 4 #ifndef ROOT_TArrayD 5 5 #include <TArrayD.h> 6 #endif 7 8 #ifndef ROOT_TVector3 9 #include <TVector3.h> 6 10 #endif 7 11 … … 24 28 Double_t Alt() const { return fX; } 25 29 Double_t Az() const { return fY; } 30 ClassDef(AltAz, 1) 26 31 }; 27 32 … … 34 39 Double_t Zd() const { return fX; } 35 40 Double_t Az() const { return fY; } 41 ClassDef(ZdAz, 1) 36 42 }; 37 43 #endif … … 95 101 void Reset(); 96 102 97 ZdAz Correct(const ZdAz &zdaz) const; 98 AltAz Correct(const AltAz &aaz) const; 99 100 ZdAz CorrectBack(const ZdAz &zdaz) const; 101 AltAz CorrectBack(const AltAz &aaz) const; 102 103 ZdAz operator()(const ZdAz &zdaz) const { return Correct(zdaz); } 104 AltAz operator()(const AltAz &aaz) const { return Correct(aaz); } 103 ZdAz Correct(const ZdAz &zdaz) const; 104 AltAz Correct(const AltAz &aaz) const; 105 TVector3 Correct(const TVector3 &v) const; 106 107 ZdAz CorrectBack(const ZdAz &zdaz) const; 108 AltAz CorrectBack(const AltAz &aaz) const; 109 TVector3 CorrectBack(const TVector3 &v) const; 110 111 ZdAz operator()(const ZdAz &zdaz) const { return Correct(zdaz); } 112 AltAz operator()(const AltAz &aaz) const { return Correct(aaz); } 113 TVector3 operator()(const TVector3 &v) const { return Correct(v); } 105 114 106 115 ZdAz operator()(const ZdAz &zdaz, void (*fcn)(ZdAz &zdaz, Double_t *par)) const … … 122 131 } 123 132 133 TVector3 operator()(const TVector3 &aaz, void (*fcn)(TVector3 &aaz, Double_t *par)) const 134 { 135 Double_t par[fNumPar]; 136 GetParameters(par); 137 TVector3 v = aaz; 138 fcn(v, par); 139 return v; 140 } 141 124 142 AltAz AddOffsets(const AltAz &aa) const; 125 143 ZdAz AddOffsets(const ZdAz &zdaz) const … … 129 147 return ZdAz(TMath::Pi()/2-c.Alt(), c.Az()); 130 148 } 149 TVector3 AddOffsets(const TVector3 &v) const 150 { 151 AltAz p(TMath::Pi()/2-v.Theta(), v.Phi()); 152 AltAz c = AddOffsets(p); 153 TVector3 rc; 154 rc.SetMagThetaPhi(1, TMath::Pi()/2-c.Alt(), c.Az()); 155 return rc; 156 } 131 157 132 158 AltAz SubtractOffsets(const AltAz &aa) const; … … 136 162 AltAz c = SubtractOffsets(p); 137 163 return ZdAz(TMath::Pi()/2-c.Alt(), c.Az()); 164 } 165 TVector3 SubtractOffsets(const TVector3 &v) const 166 { 167 AltAz p(TMath::Pi()/2-v.Theta(), v.Phi()); 168 AltAz c = SubtractOffsets(p); 169 TVector3 rc; 170 rc.SetMagThetaPhi(1, TMath::Pi()/2-c.Alt(), c.Az()); 171 return rc; 138 172 } 139 173
Note:
See TracChangeset
for help on using the changeset viewer.