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

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