16 #ifndef MARS_MParContainer 17 #include "MParContainer.h" 24 inline TVector2
Div(
const TVector2 &v1,
const TVector2 &v2)
26 return TVector2(v1.X()/v2.X(), v1.Y()/v2.Y());
28 inline TVector2
Mul(
const TVector2 &v1,
const TVector2 &v2)
30 return TVector2(v1.X()*v2.X(), v1.Y()*v2.Y());
33 inline TVector2
operator-(
const TVector2 &v) {
return TVector2(-v.X(), -v.Y()); }
38 AltAz(
double alt=0,
double az=0) :
XY(alt, az) {}
40 double Alt()
const {
return fX; }
41 double Az()
const {
return fY; }
46 void Alt(
double d) { fX=d; }
47 void Az(
double d) { fY=d; }
67 ZdAz(
double zd=0,
double az=0) :
XY(zd, az) {}
73 double Zd()
const {
return fX; }
74 double Az()
const {
return fY; }
76 void Zd(
double d) { fX=d; }
77 void Az(
double d) { fY=d; }
92 double Ratio()
const {
return fX/fY; }
102 RaDec(
double ra=0,
double dec=0) :
XY(ra, dec) {}
104 double Ra()
const {
return fX; }
105 double Dec()
const {
return fY; }
110 void Ra(
double x) { fX = x; }
111 void Dec(
double y) { fY = y; }
189 void Init(
const char *name=0,
const char *title=0);
193 for (
int i=0;
i<kNumPar;
i++)
200 static Double_t Sign(Double_t val, Double_t alt);
201 AltAz CalcAnAw(
const AltAz &p, Int_t sign)
const;
205 MPointing(
const char *name) : fError(kNumPar) { Init(); Clear(); Load(name); }
206 virtual ~MPointing() {
delete [] fNames;
delete [] fCoeff;
delete [] fDescr; }
208 Bool_t Load(
const char *name);
209 Bool_t Save(
const char *name);
213 ZdAz Correct(
const ZdAz &zdaz)
const;
215 TVector3 Correct(
const TVector3 &v)
const;
217 ZdAz CorrectBack(
const ZdAz &zdaz)
const;
219 TVector3 CorrectBack(
const TVector3 &v)
const;
223 TVector3
operator()(
const TVector3 &v)
const {
return Correct(v); }
227 Double_t par[kNumPar];
236 Double_t par[kNumPar];
243 TVector3
operator()(
const TVector3 &aaz,
void (*fcn)(TVector3 &aaz, Double_t *par))
const 245 Double_t par[kNumPar];
253 ZdAz AddOffsets(
const ZdAz &zdaz)
const;
254 TVector3 AddOffsets(
const TVector3 &v)
const;
257 ZdAz SubtractOffsets(
const ZdAz &zdaz)
const;
258 TVector3 SubtractOffsets(
const TVector3 &v)
const;
260 void SetParameters(
const Double_t *par, Int_t n=kNumPar);
261 void GetParameters(Double_t *par, Int_t n=kNumPar)
const;
265 SetParameters(par.GetArray(), par.GetSize());
270 GetParameters(par.GetArray());
272 void GetError(TArrayD &par)
const;
276 void SetMinuitParameters(TMinuit &m, Int_t n=-1)
const;
277 void GetMinuitParameters(TMinuit &m, Int_t n=-1);
278 void PrintMinuitParameters(TMinuit &m, Int_t n=-1)
const;
300 TVector2 GetDxy()
const;
302 Double_t GetPx()
const;
303 Double_t GetPy()
const;
AltAz operator*(const XY &c) const
ZdAz operator*(double c) const
void operator+=(const ZdAz &c)
Double_t & operator[](UInt_t i)
const TString & GetDescription(int i) const
RaDec(double ra=0, double dec=0)
MPointing(const char *name)
void operator*=(const XY &c)
ZdAz operator*(const XY &c) const
ZdAz operator+(const ZdAz &c) const
ZdAz operator/(const XY &c) const
void operator*=(const XY &c)
AltAz operator()(const AltAz &aaz) const
static const Int_t GetNumPar()
void operator*=(double c)
AltAz operator+(const AltAz &c) const
void operator*=(double c)
void operator*=(double c)
AltAz(double alt=0, double az=0)
void GetParameters(TArrayD &par) const
ZdAz operator()(const ZdAz &zdaz) const
TVector3 operator()(const TVector3 &aaz, void(*fcn)(TVector3 &aaz, Double_t *par)) const
void Clear(Option_t *o="")
AltAz operator/(double c) const
RaDec operator*(double c) const
void SetParameters(const TArrayD &par)
void operator-=(const ZdAz &c)
AltAz operator-(const AltAz &c) const
void operator/=(const XY &c)
RaDec operator*(const XY &c) const
void operator/=(double c)
ZdAz operator/(double c) const
void operator-=(const AltAz &c)
RaDec operator/(double c) const
AltAz operator/(const XY &c) const
void operator+=(const AltAz &c)
ZdAz operator()(const ZdAz &zdaz, void(*fcn)(ZdAz &zdaz, Double_t *par)) const
AltAz operator*(double c) const
ZdAz operator-(const ZdAz &c) const
RaDec operator+(const RaDec &c) const
AltAz operator()(const AltAz &aaz, void(*fcn)(AltAz &aaz, Double_t *par)) const
void operator/=(double c)
const TString & GetVarName(int i) const
ZdAz(double zd=0, double az=0)
TVector2 operator-(const TVector2 &v)
TVector2 Div(const TVector2 &v1, const TVector2 &v2)
void operator/=(const XY &c)
void operator/=(double c)
TVector2 Mul(const TVector2 &v1, const TVector2 &v2)
RaDec operator-(const RaDec &c) const
TVector3 operator()(const TVector3 &v) const