source: trunk/Mars/mpointing/MPointingDevCalc.h@ 19844

Last change on this file since 19844 was 8732, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 3.5 KB
Line 
1#ifndef MARS_MPointingPositionCalc
2#define MARS_MPointingPositionCalc
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8#ifndef ROOT_TArrayI
9#include <TArrayI.h>
10#endif
11
12class MPointing;
13class MPointingDev;
14class MRawRunHeader;
15class MReportStarguider;
16
17class MPointingDevCalc : public MTask
18{
19private:
20 static const TString fgFilePrefix; //! default file name of pointing model
21
22 MReportStarguider *fReport; //! MReportStarguider to get mispointing
23 MPointingDev *fDeviation; //! Output container to store pointing deviation
24 MPointing *fPointing; //! MPointing, pointing model for the calibration
25
26 UShort_t fRunType; //! Run Type to decide where to get pointing position from
27
28 Double_t fNsbSum; //! Sum of Nsb from Starguider
29 Double_t fNsbSq; //! Sum of Sq of Nsb from Starguider
30 Int_t fNsbCount; //! Counter of Nsb entries from Starguider
31
32 TArrayI fSkip; //! Counter for execution statistics
33 Double_t fLastMjd; //! Time of last processed report
34
35 TString fFilePrefix; // File name of pointing model
36 TArrayI fPointingModels; // List with pointing models
37
38 UInt_t fNumMinStars; // [num] Minimum number of identified stars
39 Float_t fNsbLevel; // Minimum deviation from mean in sigma
40 Float_t fNsbMin; // [au] Minimum NSB to calc mean and rms
41 Float_t fNsbMax; // [au] Maximum NSB to calc mean and rms
42 Float_t fMaxAbsDev; // [arcmin] Maximum considered absolute deviation
43 Float_t fMaxAge; // [min] Maximum age of reports to be used without an update
44
45 Float_t fDx; // [deg] Starguider calibration dx
46 Float_t fDy; // [deg] Starguider calibration dy
47
48 // MPointingDevCalc
49 void DoCalibration(Double_t devzd, Double_t devaz) const;
50
51 Bool_t ReadPointingModel(const MRawRunHeader &run);
52 UInt_t FindPointingModel(UInt_t num);
53 void SortPointingModels();
54
55 Int_t ProcessStarguiderReport();
56 void Skip(Int_t i);
57
58 // MParContainer
59 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
60
61 // MTask
62 Bool_t ReInit(MParList *plist);
63 Int_t PreProcess(MParList *plist);
64 Int_t Process();
65 Int_t PostProcess();
66
67public:
68 MPointingDevCalc() : fReport(0), fDeviation(0), fPointing(0),
69 fSkip(7), fFilePrefix(fgFilePrefix), fNumMinStars(8),
70 fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15),
71 fMaxAge(1), fDx(0), fDy(0)
72 {
73 fName = "MPointingDevCalc";
74 fTitle = "Task calculating the starguider correction";
75
76 AddToBranchList("MReportStarguider.*");
77 }
78 ~MPointingDevCalc();
79
80 // Tobject
81 void Clear(Option_t *o="");
82
83 // Setter
84 void SetNumMinStars(UInt_t n) { fNumMinStars=n; }
85 void SetNsbLevel(Float_t lvl) { fNsbLevel=lvl; }
86 void SetNsbMin(Float_t nsb) { fNsbMin=nsb; }
87 void SetNsbMax(Float_t nsb) { fNsbMax=nsb; }
88 void SetMaxAbsDev(Float_t max) { fMaxAbsDev=max; }
89 void SetDx(Float_t dx) { fDx=dx; }
90 void SetDy(Float_t dy) { fDy=dy; }
91 void SetMaxAge(Float_t age) { fMaxAge=age; }
92
93 void SetFilePrefix(const char *n) { fFilePrefix=n; }
94
95 // Handle pointing models
96 void SetPointingModels(const TString &models);
97 void AddPointingModel(UInt_t runnum);
98 TString GetPointingModels() const;
99
100 ClassDef(MPointingDevCalc, 0) //Task calculating the starguider correction
101};
102
103#endif
Note: See TracBrowser for help on using the repository browser.