source: trunk/MagicSoft/Mars/mtemp/MSkyCamTrans.cc@ 6600

Last change on this file since 6600 was 4545, checked in by wittek, 20 years ago
*** empty log message ***
File size: 3.2 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Wolfgang Wittek , 7/2004 <mailto:wittek@mppmu.mpg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2004
21!
22!
23\* ======================================================================== */
24
25///////////////////////////////////////////////////////////////////////////
26//
27// MSkyCamTrans
28//
29// container holding the parameters of the transformation from
30// sky directions 'a' (projected onto the camera)
31// to positions 'b' in the camera
32//
33// ( cos(fAlfa) -sin(fAlfa) )
34// b = fLambda * fA * a + fD fA = ( )
35// ^ ^ ^ ( sin(fAlfa) cos(fAlfa) )
36// | | |
37// scale rotation shift
38// factor matrix
39//
40// fNumIter number of iterations
41// fNdof number of degrees of freedom
42// fChiSquare chi-square value
43// fChiSquareProb chi-square probability
44//
45// The units are assumed to be
46// [degrees] for fAlfa
47// [mm] for a, b, fD
48// [1] for fLambda
49//
50//
51// The container is filled by the task 'MTelAxisFromStars'
52//
53///////////////////////////////////////////////////////////////////////////
54
55
56#include "MSkyCamTrans.h"
57
58#include "MLog.h"
59#include "MLogManip.h"
60
61ClassImp(MSkyCamTrans);
62
63using namespace std;
64
65// ---------------------------------------------------------------------
66//
67//
68//
69MSkyCamTrans::MSkyCamTrans(const char *name, const char *title)
70{
71 fName = name ? name : "MSkyCamTrans";
72 fTitle = title ? title : "Sky-Cam transformation parameters";
73}
74
75// ---------------------------------------------------------------------
76//
77//
78//
79void MSkyCamTrans::SetParameters(Double_t &lambda, Double_t &alfa,
80 Double_t a[2][2], Double_t d[2], Double_t errd[2][2],
81 Int_t &nstars, Int_t &numiter,
82 Int_t &ndof, Double_t &chisquare, Double_t &chisquareprob)
83{
84 fLambda = lambda;
85 fAlfa = alfa;
86
87 fA[0][0] = a[0][0];
88 fA[0][1] = a[0][1];
89 fA[1][0] = a[1][0];
90 fA[1][1] = a[1][1];
91
92 fD[0] = d[0];
93 fD[1] = d[1];
94
95 fErrD[0][0] = errd[0][0];
96 fErrD[0][1] = errd[0][1];
97 fErrD[1][0] = errd[1][0];
98 fErrD[1][1] = errd[1][1];
99
100 fNStars = nstars;
101 fNumIter = numiter;
102 fNdof = ndof;
103 fChiSquare = chisquare;
104 fChiSquareProb = chisquareprob;
105}
106// ---------------------------------------------------------------------
107
108
109
110
111
112
113
114
115
116
117
118
Note: See TracBrowser for help on using the repository browser.