source: trunk/MagicSoft/Mars/mtemp/meth/MFindStars.h@ 4905

Last change on this file since 4905 was 4525, checked in by stark, 20 years ago
*** empty log message ***
File size: 3.2 KB
Line 
1#ifndef MARS_MFindStars
2#define MARS_MFindStars
3
4#ifndef ROOT_TArrayS
5#include <TArrayS.h>
6#endif
7
8#ifndef ROOT_TArrayC
9#include <TArrayC.h>
10#endif
11
12#ifndef MARS_MTask
13#include "MTask.h"
14#endif
15
16#ifndef MARS_MHCamera
17#include "MHCamera.h"
18#endif
19
20#ifndef MARS_MAstroCamera
21#include "MAstroCamera.h"
22#endif
23
24#ifndef MARS_MAstro
25#include "MAstro.h"
26#endif
27
28class MGeomCam;
29class MGeomPix;
30class MCameraDC;
31class MTime;
32class MReportDrive;
33class MStarLocalCam;
34class MStarLocalPos;
35
36class MFindStars : public MTask
37{
38
39private:
40
41 MGeomCam *fGeomCam;
42 MCameraDC *fCurr;
43 MTime *fTimeCurr;
44 MReportDrive *fDrive;
45 MStarLocalCam *fStars;
46
47 MAstroCamera *fAstroCamera;
48 MAstro fAstro;
49 TArrayC fPixelsUsed;
50 MHCamera fDisplay;
51
52 UInt_t fMaxNumIntegratedEvents;
53 UInt_t fNumIntegratedEvents;
54
55 Float_t fRingInterest; //[mm]
56 Float_t fMinDCForStars; //[uA]
57 Float_t fDCTailCut; //[uA]
58
59 // Source position:
60 Int_t fSrcRaHour;
61 Int_t fSrcRaMin;
62 Float_t fSrcRaSec;
63
64 Int_t fSrcDecDeg;
65 Int_t fSrcDecMin;
66 Float_t fSrcDecSec;
67
68 TVector3 *fRes;
69
70 //Fitting(Minuit) variables
71 const Int_t fNumVar;
72 Float_t fTempChisquare;
73 Int_t fTempDegreesofFreedom;
74 Int_t fMinuitPrintOutLevel;
75
76 TString *fVname;
77 TArrayD fVinit;
78 TArrayD fStep;
79 TArrayD fLimlo;
80 TArrayD fLimup;
81 TArrayI fFix;
82 TObject *fObjectFit;
83 TString fMethod;
84 Bool_t fNulloutput;
85
86 Bool_t DCPedestalCalc();
87 Bool_t FindPixelWithMaxDC(Float_t &maxDC, MGeomPix &maxPix);
88 Bool_t FindStar(MStarLocalPos* star);
89 Bool_t ShadowStar(MStarLocalPos* star);
90 Bool_t CorrSourcePos(TVector3* srcpos);
91 Bool_t DistBetweenStars(TVector2* star1, TVector2* star2, TVector2* source,TVector3* dist);
92
93 public:
94
95 MFindStars(const char *name=NULL, const char *title=NULL);
96
97 Int_t PreProcess(MParList *pList);
98 Int_t Process();
99 Int_t PostProcess();
100
101 // setters
102 void SetNumIntegratedEvents(UInt_t max) {fMaxNumIntegratedEvents=max;}
103 void SetRingInterest(Float_t ring) {fRingInterest=ring;}
104 void SetBlindPixels(TArrayS blindpixels);
105 void SetMinuitPrintOutLevel(Int_t level) {fMinuitPrintOutLevel=level;}
106 void SetDCTailCut(Float_t cut) {fDCTailCut=cut;}
107
108 void SetChisquare(Float_t chi) {fTempChisquare=chi;}
109 void SetDegreesofFreedom(Int_t free) {fTempDegreesofFreedom=free;}
110
111 void SetSourceRaH(Int_t hour) {fSrcRaHour=hour;}
112 void SetSourceRaM(Int_t min) {fSrcRaMin=min;}
113 void SetSourceRaS(Float_t sec) {fSrcRaSec=sec;}
114
115 void SetSourceDecD(Int_t deg) {fSrcDecDeg=deg;}
116 void SetSourceDecM(Int_t min) {fSrcDecMin=min;}
117 void SetSourceDecS(Float_t sec) {fSrcDecSec=sec;}
118
119
120 //Getters
121 MHCamera& GetDisplay() { return fDisplay; }
122
123 Float_t GetChisquare() {return fTempChisquare;}
124 Int_t GetDegreesofFreedom() {return fTempDegreesofFreedom;}
125 UInt_t GetNumIntegratedEvents() {return fMaxNumIntegratedEvents;}
126 Float_t GetRingInterest() {return fRingInterest;}
127 TList *GetCatalogList() { return fAstroCamera->GetCatList(); }
128 TVector3 *GetCorrSrcPos() {return fRes;}
129
130
131 ClassDef(MFindStars, 0) // Tool to find stars from DC Currents
132};
133
134#endif
Note: See TracBrowser for help on using the repository browser.