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

Last change on this file since 3552 was 3531, 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
56
57 Double_t fDecSource; // sky coordinates of source
58 Double_t fRaSource;
59 Double_t fxSource; // estimated position of source in camera
60 Double_t fySource;
61 Double_t fdxSource;
62 Double_t fdySource;
63
64 TArrayI fRunNr; // list of run numbers
65 TArrayD fThetaTel; // for each run : theta, phi, ...
66 TArrayD fPhiTel;
67 TArrayD fdThetaTel;
68 TArrayD fdPhiTel;
69
70 TArrayD fDecStar; // sky coordinates of stars
71 TArrayD fRaStar;
72 TMatrixD fxStar; // for each run : positions of stars in camera (from DC currents)
73 TMatrixD fyStar;
74 TMatrixD fdxStar;
75 TMatrixD fdyStar;
76
77 Double_t fxSourceold;
78 Double_t fySourceold;
79 Double_t fThetaradold;
80 Double_t fPhiradold;
81
82 Bool_t OpenNextFile();
83 void ReadData();
84 void FixSize();
85
86 Int_t PreProcess(MParList *pList);
87 Bool_t ReInit(MParList *pList);
88 Int_t Process();
89 Int_t PostProcess();
90
91public:
92 MSourcePosfromStarPos(const char *name=NULL, const char *title=NULL);
93 ~MSourcePosfromStarPos();
94
95 void SetSourceAndStarPosition(
96 TString nameSource,
97 Double_t decSourceDeg, Double_t decSourceMin, Double_t decSourceSec,
98 Double_t raSourceHour, Double_t raSourceMin, Double_t raSourceSec,
99 TString nameStar,
100 Double_t decStarDeg, Double_t decStarMin, Double_t decStarSec,
101 Double_t raStarHour, Double_t raStarMin, Double_t raStarSec );
102
103 Int_t AddFile(const char *fname, Int_t dummy=-1);
104
105 void AddStar(
106 TString nameStar,
107 Double_t decStarDeg, Double_t decStarMin, Double_t decStarSec,
108 Double_t raStarHour, Double_t raStarMin, Double_t raStarSec );
109
110 void SourcefromStar(Double_t &,
111 TArrayD &, TArrayD &, Double_t &, Double_t &, Double_t &, Double_t &,
112 TArrayD &, TArrayD &, TArrayD &, TArrayD &, Double_t &, Double_t &,
113 Double_t &, Double_t & );
114
115 ClassDef(MSourcePosfromStarPos, 0) // Task to calculate the source position from a star position
116};
117
118#endif
119
120
121
122
123
124
125
126
Note: See TracBrowser for help on using the repository browser.