Changeset 7214
- Timestamp:
- 07/22/05 18:47:21 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7213 r7214 86 86 starguider reports 87 87 - removed displaying nominal Az 88 89 * mjobs/MJCut.cc: 90 - implemented pointing correction by starguider 91 92 * mpointing/MPointingDevCalc.cc: 93 - some minor updates 94 95 * mpointing/MSrcPosCalc.[h,cc]: 96 - implemented usage of pointing deviation -- still in progress! 97 98 * mpointing/MSrcPosCorrect.[h,cc]: 99 - inverted sign of pointing correction for anti-source 100 - write telescope axis to parlist 88 101 89 102 -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r7196 r7214 32 32 #include "MJCut.h" 33 33 34 // Root 34 35 #include <TEnv.h> 35 36 #include <TFile.h> 36 37 38 // Environment 37 39 #include "MLog.h" 38 40 #include "MLogManip.h" 39 41 42 // Eventloop 40 43 #include "MParList.h" 41 44 #include "MTaskList.h" 42 45 #include "MEvtLoop.h" 43 46 47 // Display 44 48 #include "MStatusDisplay.h" 45 49 50 // Tasks 46 51 #include "MReadReports.h" 47 52 #include "MReadMarsFile.h" 48 53 #include "MPrint.h" 49 54 #include "MContinue.h" 50 //#include "MEnergyEstimate.h"51 55 #include "MTaskEnv.h" 56 #include "MPointingDevCalc.h" 52 57 #include "MSrcPosCalc.h" 53 58 #include "MSrcPosCorrect.h" … … 56 61 #include "MWriteRootFile.h" 57 62 63 // Fit signal environment 58 64 #include "../mhflux/MAlphaFitter.h" 59 65 #include "../mhflux/MHAlpha.h" 60 66 67 // Containers 61 68 #include "MH3.h" 62 69 #include "MBinning.h" … … 498 505 MReadReports readoffdata; 499 506 readoffdata.AddTree("Events", "MTime.", MReadReports::kMaster); 500 readoffdata.AddTree("Drive", MReadReports::kRequired); 507 readoffdata.AddTree("Drive", MReadReports::kRequired); 508 readoffdata.AddTree("Starguider", MReadReports::kRequired); 501 509 readoffdata.AddTree("EffectiveOnTime"); 502 510 … … 596 604 tlist2.AddToList(write1); 597 605 606 MPointingDevCalc devcalc; 607 598 608 tlist.AddToList(&readoff); 599 609 if (gLog.GetDebugLevel()>4) 600 610 tlist.AddToList(&print2, "EffectiveOnTime"); 601 tlist.AddToList(&tlist2, "Events"); 611 tlist.AddToList(&devcalc, "Starguider"); 612 tlist.AddToList(&tlist2, "Events"); 602 613 603 614 par.SetVal(0); … … 645 656 MReadReports readondata; 646 657 readondata.AddTree("Events", "MTime.", MReadReports::kMaster); 647 readondata.AddTree("Drive", MReadReports::kRequired); 658 readondata.AddTree("Drive", MReadReports::kRequired); 659 readondata.AddTree("Starguider", MReadReports::kRequired); 648 660 readondata.AddTree("EffectiveOnTime"); 649 661 -
trunk/MagicSoft/Mars/mpointing/MPointing.h
r4966 r7214 16 16 // --------------------------------------------------- 17 17 // FIXME: Replace coord.h completely with this! 18 #ifndef __MARS__19 #include "coord.h"20 #else18 //#ifndef __MARS__ 19 //#include "coord.h" 20 //#else 21 21 #include <TVector2.h> 22 22 class AltAz : public TVector2 … … 26 26 { 27 27 } 28 AltAz(const AltAz &aa) : TVector2(aa) { } 28 29 Double_t Alt() const { return fX; } 29 30 Double_t Az() const { return fY; } … … 37 38 { 38 39 } 40 ZdAz(const ZdAz &aa) : TVector2(aa) { } 39 41 Double_t Zd() const { return fX; } 40 42 Double_t Az() const { return fY; } 41 43 ClassDef(ZdAz, 1) 42 44 }; 43 #endif45 //#endif 44 46 // --------------------------------------------------- 45 47 -
trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
r7207 r7214 92 92 switch (fRunType) 93 93 { 94 /***/ case MRawRunHeader::kRTData: 95 /* 94 case MRawRunHeader::kRTData: 96 95 if (!fReport) 97 { 98 *fLog << err << "MReportStarguider not found... aborting." << endl; 99 return kFALSE; 100 }*/ 101 /***/ return kTRUE; 96 *fLog << warn << "MReportStarguider not found... skipped." << endl; 97 return kTRUE; 102 98 103 99 case MRawRunHeader::kRTMonteCarlo: … … 182 178 // Linear starguider calibration taken from April/May data 183 179 // For calibration add MDriveReport::GetErrorZd/Az ! 184 devzd -= 2.686/60; 180 devzd -= 2.686/60; // 1arcmin ~ 5mm 185 181 devaz -= 2.840/60; 186 182 … … 195 191 } 196 192 193 fDeviation->SetDevZdAz(devzd, devaz); 197 194 fSkip[0]++; 198 //fDeviation->SetDevZdAz(devzd, devaz);199 fDeviation->SetDevZdAz(0, 0);200 201 cout << "SETTING: " << devzd << " " << devaz << endl;202 195 203 196 return kTRUE; … … 214 207 case MRawRunHeader::kRTNone: 215 208 case MRawRunHeader::kRTData: 216 /***/return fReport ? ProcessStarguiderReport() : kTRUE;209 return fReport ? ProcessStarguiderReport() : kTRUE; 217 210 218 211 case MRawRunHeader::kRTMonteCarlo: -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
r7181 r7214 75 75 #include "MObservatory.h" 76 76 #include "MPointingPos.h" 77 #include "MPointingDev.h" 77 78 #include "MSrcPosCam.h" 78 79 #include "MRawRunHeader.h" … … 92 93 // 93 94 MSrcPosCalc::MSrcPosCalc(const char *name, const char *title) 94 : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), f SrcPosCam(NULL),95 fSrcPos Anti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault)95 : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fDeviation(NULL), 96 fSrcPosCam(NULL), fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault) 96 97 { 97 98 fName = name ? name : "MSrcPosCalc"; … … 189 190 return kFALSE; 190 191 } 192 193 fDeviation = (MPointingDev*)pList->FindObject("MPointingDev"); 191 194 192 195 *fLog << inf; … … 313 316 */ 314 317 315 /* --- NEW --- */318 /* --- NEW --- Same as MSrcPosCorrect::CalcXYinCamera */ 316 319 const Double_t XC0 = TMath::Sin(theta)*TMath::Sin(phi-phi0); 317 320 const Double_t XC1 = TMath::Cos(theta0)*TMath::Cos(theta); … … 365 368 pos0 *= conv; 366 369 370 TVector2 vx; 371 if (fDeviation) 372 { 373 vx = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000; 374 pos0.SetZdAz(pos0.Theta()-fDeviation->GetDevZdRad(), 375 pos0.Phi() -fDeviation->GetDevAzRad()); 376 } 377 367 378 // Calculate source position in camera, and convert to mm: 368 379 TVector2 v = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000; 369 380 SetSrcPos(v); 381 382 if (fDeviation) 383 cout << fPointPos->GetZd() << ": " << vx.X() << "/" <<v.X() << " " << vx.Y() << "/" <<v.Y() << endl; 370 384 371 385 return kTRUE; … … 391 405 if (str.First(':')<0) 392 406 { 393 ret = atof(str);407 ret = str.Atof(); 394 408 return kTRUE; 395 409 } -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h
r7181 r7214 12 12 class MObservatory; 13 13 class MPointingPos; 14 class MPointingDev; 14 15 class MSrcPosCam; 15 16 class MGeomCam; … … 33 34 MPointingPos *fPointPos; 34 35 MPointingPos *fSourcePos; 36 MPointingDev *fDeviation; 35 37 MSrcPosCam *fSrcPosCam; 36 38 MSrcPosCam *fSrcPosAnti; -
trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc
r7200 r7214 39 39 #include "MLogManip.h" 40 40 41 #include "MGeomCam.h" 41 42 #include "MSrcPosCam.h" 42 43 #include "MRawRunHeader.h" 44 #include "MReportStarguider.h" 43 45 44 46 ClassImp(MSrcPosCorrect); … … 49 51 // 50 52 MSrcPosCorrect::MSrcPosCorrect(const char *name, const char *title) 51 : fSrcPosCam(NULL), fSrcPosAnti(NULL), fAxis(NULL) 53 : fSrcPosCam(NULL), fSrcPosAnti(NULL), fAxis(NULL), fGeom(NULL) 52 54 { 53 55 fName = name ? name : "MSrcPosCorrect"; … … 139 141 // Good night 140 142 // 143 // Believing the Database the following data is affected: 144 // 1ES1426+428 Off1ES1426-1 145 // 1ES1959+650 Off1ES1959-1 146 // 2E-1415+2557 Off2E1415-1 147 // Arp-220 OffArp-220-1 148 // GC-W1 OffHB1553-1 149 // HB89-1553+11 OffM87-1 150 // M87 OffW-Comae-1 151 // W-Comae 152 // 141 153 Int_t MSrcPosCorrect::Process() 142 154 { … … 144 156 return kTRUE; 145 157 146 // FIXME: Implement Culmination correction 147 158 TVector2 d; 148 159 if (fRunNumber<56161 && fRunNumber>53832) 149 160 { 150 161 // dx=-0.048deg, dy=0.034deg, d=0.059deg 151 162 static const TVector2 dxy(-14.24, -9.495); 152 fAxis->SetXY(dxy); 153 fSrcPosCam->Add(dxy); 154 if (fSrcPosAnti) 155 fSrcPosAnti->Add(dxy); 163 164 d -= dxy; 165 } 166 167 fAxis->SetXY(d); 168 fSrcPosCam->Add(d); 169 if (fSrcPosAnti) 170 { 171 d *= -1; // Anti-Source position should always be symetric 172 fSrcPosAnti->Add(d); 156 173 } 157 174 -
trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.h
r7199 r7214 6 6 #endif 7 7 8 class MGeomCam; 9 class TVector2; 8 10 class MSrcPosCam; 11 class MReportStarguider; 9 12 10 13 class MSrcPosCorrect : public MTask 11 14 { 12 15 private: 13 MSrcPosCam *fSrcPosCam;14 MSrcPosCam *fSrcPosAnti;15 MSrcPosCam *fAxis;16 MSrcPosCam *fSrcPosCam; //! 17 MSrcPosCam *fSrcPosAnti; //! 18 MSrcPosCam *fAxis; //! 16 19 17 UShort_t fRunType; //! Run Type to decide where to get pointing position from 20 MGeomCam *fGeom; //! 21 22 UShort_t fRunType; //! Run Type to decide where to get pointing position from 18 23 UInt_t fRunNumber; 19 24
Note:
See TracChangeset
for help on using the changeset viewer.