source: trunk/MagicSoft/Mars/manalysis/MSourcePosfromStarPos.h@ 3624

Last change on this file since 3624 was 3598, checked in by wittek, 21 years ago
*** empty log message ***
File size: 3.6 KB
Line 
1#ifndef MARS_MSourcePosfromStarPos
2#define MARS_MSourcePosfromStarPos
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MSourcePosfromStarPos //
7// //
8// Task to calculate the position of the source in the camera from
9// the position of a known star in the camera
10// //
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef MARS_MTask
14#include "MTask.h"
15#endif
16
17#ifndef ROOT_TArrayI
18#include <TArrayI.h>
19#endif
20
21#ifndef ROOT_TArrayD
22#include <TArrayD.h>
23#endif
24
25#ifndef ROOT_TMatrixD
26#include <TMatrixD.h>
27#endif
28
29class TList;
30class MRawRunHeader;
31class MMcEvt;
32class MGeomCam;
33class MSrcPosCam;
34class MObservatory;
35
36
37class MSourcePosfromStarPos : public MTask
38{
39 private:
40 const MRawRunHeader *fRun; //!
41 const MGeomCam *fGeomCam; //! Camera Geometry used to calculate Hillas
42 MMcEvt *fMcEvt; //!
43 MSrcPosCam *fSrcPos; //!
44 MObservatory *fObservatory; //!
45
46 ifstream *fIn; // input file
47 TList *fFileNames; // array which contains the \0-terminated file names
48
49 Double_t fMm2Deg;
50 Double_t fDistCameraReflector;
51
52 Int_t fRuns; // current number of runs
53 Int_t fSize; // final number of runs
54 Int_t fStars; // number of stars
55 Int_t fStarsRead; // number of (x,y) pairs to be read
56
57
58 Double_t fDecSource; // sky coordinates of source
59 Double_t fRaSource;
60 Double_t fxSource; // estimated position of source in camera
61 Double_t fySource;
62 Double_t fdxSource;
63 Double_t fdySource;
64
65 TArrayI fRunNr; // list of run numbers
66 TArrayD fThetaTel; // for each run : theta, phi, ...
67 TArrayD fPhiTel;
68 TArrayD fdThetaTel;
69 TArrayD fdPhiTel;
70
71 TArrayD fDecStar; // sky coordinates of stars
72 TArrayD fRaStar;
73 TMatrixD fxStar; // for each run : positions of stars in camera (from DC currents)
74 TMatrixD fyStar;
75 TMatrixD fdxStar;
76 TMatrixD fdyStar;
77
78 Double_t fxSourceold;
79 Double_t fySourceold;
80 Double_t fThetaradold;
81 Double_t fPhiradold;
82
83 Bool_t OpenNextFile();
84 void ReadData();
85 void FixSize();
86
87 Int_t PreProcess(MParList *pList);
88 Bool_t ReInit(MParList *pList);
89 Int_t Process();
90 Int_t PostProcess();
91
92public:
93 MSourcePosfromStarPos(const char *name=NULL, const char *title=NULL);
94 ~MSourcePosfromStarPos();
95
96 void SetSourceAndStarPosition(
97 TString nameSource,
98 Double_t decSourceDeg, Double_t decSourceMin, Double_t decSourceSec,
99 Double_t raSourceHour, Double_t raSourceMin, Double_t raSourceSec,
100 TString nameStar,
101 Double_t decStarDeg, Double_t decStarMin, Double_t decStarSec,
102 Double_t raStarHour, Double_t raStarMin, Double_t raStarSec );
103
104 Int_t AddFile(const char *fname, Int_t dummy=-1);
105
106 void AddStar(
107 TString nameStar,
108 Double_t decStarDeg, Double_t decStarMin, Double_t decStarSec,
109 Double_t raStarHour, Double_t raStarMin, Double_t raStarSec );
110
111 void SourcefromStar(Double_t &,
112 TArrayD &, TArrayD &, Double_t &, Double_t &, Double_t &, Double_t &,
113 TArrayD &, TArrayD &, TArrayD &, TArrayD &, Double_t &, Double_t &,
114 Double_t &, Double_t & );
115
116 ClassDef(MSourcePosfromStarPos, 0) // Task to calculate the source position from a star position
117};
118
119#endif
120
121
122
123
124
125
126
127
Note: See TracBrowser for help on using the repository browser.