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 |
|
---|
12 | class MPointing;
|
---|
13 | class MPointingDev;
|
---|
14 | class MRawRunHeader;
|
---|
15 | class MReportStarguider;
|
---|
16 |
|
---|
17 | class MPointingDevCalc : public MTask
|
---|
18 | {
|
---|
19 | private:
|
---|
20 | static const TString fgFileName; //! 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 fFileName; // File name of pointing model
|
---|
36 |
|
---|
37 | UInt_t fNumMinStars; // Minimum number of identified stars
|
---|
38 | Float_t fNsbLevel; // Minimum deviation from mean in sigma
|
---|
39 | Float_t fNsbMin; // Minimum NSB to calc mean and rms
|
---|
40 | Float_t fNsbMax; // Maximum NSB to calc mean and rms
|
---|
41 | Float_t fMaxAbsDev; // [arcmin] Maximum considered absolute deviation
|
---|
42 | Float_t fMaxAge; // [min] Maximum age of reports to be used without an update
|
---|
43 |
|
---|
44 | Float_t fDx; // Starguider calibration dx
|
---|
45 | Float_t fDy; // Starguider calibration dy
|
---|
46 |
|
---|
47 | // MPointingDevCalc
|
---|
48 | void DoCalibration(Double_t devzd, Double_t devaz) const;
|
---|
49 |
|
---|
50 | Bool_t ReadPointingModel(const MRawRunHeader &run);
|
---|
51 |
|
---|
52 | Int_t ProcessStarguiderReport();
|
---|
53 | void Skip(Int_t i);
|
---|
54 |
|
---|
55 | // MParContainer
|
---|
56 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
57 |
|
---|
58 | // MTask
|
---|
59 | Bool_t ReInit(MParList *plist);
|
---|
60 | Int_t PreProcess(MParList *plist);
|
---|
61 | Int_t Process();
|
---|
62 | Int_t PostProcess();
|
---|
63 |
|
---|
64 | public:
|
---|
65 | MPointingDevCalc() : fReport(0), fDeviation(0), fPointing(0),
|
---|
66 | fSkip(7), fFileName(fgFileName), fNumMinStars(8),
|
---|
67 | fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15),
|
---|
68 | fMaxAge(1), fDx(-7), fDy(16)
|
---|
69 | {
|
---|
70 | fName = "MPointingDevCalc";
|
---|
71 | fTitle = "Task calculating the pointing deviation";
|
---|
72 |
|
---|
73 | AddToBranchList("MReportStarguider.*");
|
---|
74 | }
|
---|
75 | ~MPointingDevCalc()
|
---|
76 | {
|
---|
77 | Clear();
|
---|
78 | }
|
---|
79 |
|
---|
80 | void Clear(Option_t *o="");
|
---|
81 |
|
---|
82 | void SetNumMinStars(UInt_t n) { fNumMinStars=n; }
|
---|
83 | void SetNsbLevel(Float_t lvl) { fNsbLevel=lvl; }
|
---|
84 | void SetNsbMin(Float_t nsb) { fNsbMin=nsb; }
|
---|
85 | void SetNsbMax(Float_t nsb) { fNsbMax=nsb; }
|
---|
86 | void SetMaxAbsDev(Float_t max) { fMaxAbsDev=max; }
|
---|
87 | void SetDx(Float_t dx) { fDx=dx; }
|
---|
88 | void SetDy(Float_t dy) { fDy=dy; }
|
---|
89 | void SetMaxAge(Float_t age) { fMaxAge=age; }
|
---|
90 |
|
---|
91 | ClassDef(MPointingDevCalc, 0) //Task calculating the pointing deviation
|
---|
92 | };
|
---|
93 |
|
---|
94 | #endif
|
---|