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

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