Changeset 7202
- Timestamp:
- 07/21/05 11:44:05 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7200 r7202 20 20 21 21 -*-*- END OF LINE -*-*- 22 2005/07/21 Thomas Bretz 23 24 * mastro/MAstro.[h,cc]: 25 - added new member function GetDevAbs 26 27 * mcamera/MCameraAUX.[h,cc]: 28 - added new data members for counting house temperatures 29 - increased class version number to 2 30 31 * mcamera/MCameraHV.[h,cc]: 32 - added new data members for HV settings file name 33 - increased class version number to 2 34 35 * mhflux/MHDisp.cc: 36 - fixed handling of non-smearing 37 - fixed calculation of number of entries for the two wobble 38 histograms 39 40 * mjobs/MJStar.cc: 41 - gave a new name to the task writing the Muon-tree 42 43 * mpointing/MHPointing.cc: 44 - do not check the abs deviation but check both deviations 45 independantly whether they make sense. 46 - Plot only hour and minutes 47 48 * mpointing/MPointingPosCalc.h: 49 - fixed wrong #ifndef 50 51 * mpointing/Makefile, mpointing/PointingLinkDef.h: 52 - new class MPointingDev 53 - new class MPointingDevCalc 54 55 * mpointing/PointingIncl.h: 56 - removed TVector2 57 58 * mreport/MReportCamera.[h,cc]: 59 - added interpretation CHTEMP and HVFIl valid since 60 arehcas version 200507190 (incl) 61 62 * mreport/MReportDrive.cc: 63 - moved code from GetErrorAbs to MAstro 64 65 * mreport/MReportStarguider.[h,cc]: 66 - moved code from GetDevAbs to MAstro 67 - added new getter returning a TVector2 68 69 70 22 71 2005/07/19 Thomas Bretz 23 72 … … 40 89 - replaced Rate historams by new histogram MHRate 41 90 - added new histogram MHPointing 42 - gave a new name to writem43 91 44 92 * mpointing/MSrcPosCorrect.cc: -
trunk/MagicSoft/Mars/NEWS
r7196 r7202 30 30 31 31 - mars: now displays the event time MTime if available 32 33 - merpp: Added support for new arehucas version >= 200507190 34 implementing values for three temperature sensors in the 35 counting house (MCameraAUX) and the name of the HV settings file 36 (MCameraHV). 32 37 33 38 - callisto: MCalibrationHiLoCam can now be printed from its context -
trunk/MagicSoft/Mars/mastro/MAstro.cc
r7179 r7202 601 601 return v1.XYvector(); //TVector2(v1.Y(), -v1.X());//v1.XYvector(); 602 602 } 603 604 // -------------------------------------------------------------------------- 605 // 606 // Calculate the absolute misspointing from the nominal zenith angle nomzd 607 // and the deviations in zd (devzd) and az (devaz). 608 // All values given in deg, the return value, too. 609 // 610 Double_t MAstro::GetDevAbs(Double_t nomzd, Double_t devzd, Double_t devaz) 611 { 612 const Double_t pzd = nomzd * TMath::DegToRad(); 613 const Double_t azd = devzd * TMath::DegToRad(); 614 const Double_t aaz = devaz * TMath::DegToRad(); 615 616 const double el = TMath::Pi()/2-pzd; 617 618 const double dphi2 = aaz/2.; 619 const double cos2 = TMath::Cos(dphi2)*TMath::Cos(dphi2); 620 const double sin2 = TMath::Sin(dphi2)*TMath::Sin(dphi2); 621 const double d = TMath::Cos(azd)*cos2 - TMath::Cos(2*el)*sin2; 622 623 return TMath::ACos(d)*TMath::RadToDeg(); 624 } -
trunk/MagicSoft/Mars/mastro/MAstro.h
r7179 r7202 70 70 static Int_t GetMagicPeriod(Double_t mjd); 71 71 72 // Get distance between v1 and v0 in a plain perpendicular to v0 in distance dist 72 73 static TVector2 GetDistOnPlain(const TVector3 &v0, TVector3 v1, Double_t dist=1); 74 75 // Calculate absolute misspointing from error in zd and error in az 76 static Double_t GetDevAbs(Double_t nomzd, Double_t devzd, Double_t devaz); 73 77 74 78 ClassDef(MAstro, 0) -
trunk/MagicSoft/Mars/mcamera/MCameraAUX.cc
r2535 r7202 18 18 ! Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 320 ! Copyright: MAGIC Software Development, 2000-2005 21 21 ! 22 22 ! … … 27 27 // MCameraAUX 28 28 // 29 // Class Version 2: 30 // + Float_t fTempCountingHouse1; // [deg C] Temperature sensor in the counting house 1 31 // + Float_t fTempCountingHouse2; // [deg C] Temperature sensor in the counting house 2 32 // + Float_t fTempCountingHouse3; // [deg C] Temperature sensor in the counting house 3 33 // 29 34 ///////////////////////////////////////////////////////////////////////////// 30 35 #include "MCameraAUX.h" -
trunk/MagicSoft/Mars/mcamera/MCameraAUX.h
r3666 r7202 10 10 friend class MReportCamera; 11 11 private: 12 Bool_t fRequestCaosLEDs; // Requested status: o=off, 1=on, bAux_CaOsLEDs_Off/On 13 Bool_t fRequestFansFADC; // Requested status: o=off, 1=on, bAux_FADC_FANs_Off/On 14 Bool_t fStatusCaosLEDs; // Monitored status: o=off, 1=on, Cam.CaOs.LED_state 15 Bool_t fStatusFansFADC; // Monitored status: o=off, 1=on, Cam.FADC.Fans_state 12 Bool_t fRequestCaosLEDs; // Requested status: o=off, 1=on, bAux_CaOsLEDs_Off/On 13 Bool_t fRequestFansFADC; // Requested status: o=off, 1=on, bAux_FADC_FANs_Off/On 14 15 Bool_t fStatusCaosLEDs; // Monitored status: o=off, 1=on, Cam.CaOs.LED_state 16 Bool_t fStatusFansFADC; // Monitored status: o=off, 1=on, Cam.FADC.Fans_state 17 18 Float_t fTempCountingHouse1; // [deg C] Temperature sensor in the counting house 1 19 Float_t fTempCountingHouse2; // [deg C] Temperature sensor in the counting house 2 20 Float_t fTempCountingHouse3; // [deg C] Temperature sensor in the counting house 3 16 21 17 22 public: … … 22 27 } 23 28 24 Bool_t GetRequestCaosLEDs() const { return fRequestCaosLEDs; } 25 Bool_t GetRequestFansFADC() const { return fRequestFansFADC; } 26 Bool_t GetStatusCaosLEDs() const { return fStatusCaosLEDs; } 27 Bool_t GetStatusFansFADC() const { return fStatusFansFADC; } 29 Bool_t GetRequestCaosLEDs() const { return fRequestCaosLEDs; } 30 Bool_t GetRequestFansFADC() const { return fRequestFansFADC; } 28 31 29 ClassDef(MCameraAUX, 1) // Container storing information about the Camera auxiliary system 32 Bool_t GetStatusCaosLEDs() const { return fStatusCaosLEDs; } 33 Bool_t GetStatusFansFADC() const { return fStatusFansFADC; } 34 35 Float_t GetTempCountingHouse1() const { return fTempCountingHouse1; } 36 Float_t GetTempCountingHouse2() const { return fTempCountingHouse2; } 37 Float_t GetTempCountingHouse3() const { return fTempCountingHouse3; } 38 39 ClassDef(MCameraAUX, 2) // Container storing information about the Camera auxiliary system 30 40 }; 31 41 -
trunk/MagicSoft/Mars/mcamera/MCameraHV.cc
r2535 r7202 18 18 ! Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 320 ! Copyright: MAGIC Software Development, 2000-2005 21 21 ! 22 22 ! … … 27 27 // MCameraHV 28 28 // 29 // 30 // Class Version 2: 31 // + TString fFileName; // Filename for the HV settings 32 // 33 // 29 34 ///////////////////////////////////////////////////////////////////////////// 30 35 #include "MCameraHV.h" -
trunk/MagicSoft/Mars/mcamera/MCameraHV.h
r3985 r7202 23 23 Short_t fVoltageB; // [V] Measured voltage of power supply B, hvps2 24 24 25 Byte_t fCurrentA;// [mA] Measured current of power supply A, curr126 Byte_t fCurrentB;// [mA] Measured current of power supply B, curr225 Byte_t fCurrentA; // [mA] Measured current of power supply A, curr1 26 Byte_t fCurrentB; // [mA] Measured current of power supply B, curr2 27 27 28 28 TArrayS fHV; // [V] Measured high Voltages for all PMTs 29 30 TString fFileName; // Filename for the HV settings 29 31 30 32 public: … … 58 60 } 59 61 60 ClassDef(MCameraHV, 1) // Container storing information about the Camera HV62 ClassDef(MCameraHV, 2) // Container storing information about the Camera HV 61 63 }; 62 64 -
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7193 r7202 213 213 } 214 214 215 if (fSmearing<=0)216 {217 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*w0);218 return kTRUE;219 }220 221 215 // ------------------------------------------------- 222 216 // The following algorithm may look complicated... … … 241 235 const Int_t bz = fHist.GetZaxis()->FindFixBin(0); 242 236 243 TH1 &bg = fHalf ? fHistBg1 : fHistBg2; 237 TH2 &bg = fHalf ? fHistBg1 : fHistBg2; 238 239 const Bool_t smear = fSmearing>0; 240 if (!smear) 241 { 242 if (!fHistOff) 243 bg.Fill(pos1.X(), pos1.Y(), w*w0); 244 else 245 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*w0); 246 } 244 247 245 248 // To calculate significance map smear with 2*theta-cut and … … 254 257 const Double_t cy = axey.GetBinCenter(y); 255 258 const Double_t sp = Sq(px, cy-pos1.Y()); 256 const Double_t dp = sp/psf; 257 258 // Values below 1e-3 (>3.5sigma) are not filled into the histogram 259 if (dp<4) 259 if (smear) 260 260 { 261 const Double_t rc = TMath::Exp(-dp)/normg; 262 if (!fHistOff) 263 bg.AddBinContent(bg.GetBin(x, y), rc); 264 else 265 fHist.AddBinContent(fHist.GetBin(x, y, bz), rc); 261 const Double_t dp = sp/psf; 262 263 // Values below 1e-3 (>3.5sigma) are not filled into the histogram 264 if (dp<4) 265 { 266 const Double_t rc = TMath::Exp(-dp)/normg; 267 if (!fHistOff) 268 bg.AddBinContent(bg.GetBin(x, y), rc); 269 else 270 fHist.AddBinContent(fHist.GetBin(x, y, bz), rc); 271 } 266 272 } 267 273 … … 285 291 } 286 292 } 287 fHist.SetEntries(fHist.GetEntries()+1); 293 294 if (fHistOff) 295 fHistBg.SetEntries(fHistBg.GetEntries()+1); 296 297 if (!smear) 298 return kTRUE; 288 299 289 300 if (!fHistOff) 290 bg.SetEntries(fHistBg1.GetEntries()+1); 301 bg.SetEntries(bg.GetEntries()+1); 302 else 303 fHist.SetEntries(fHist.GetEntries()+1); 291 304 292 305 return kTRUE; -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r7196 r7202 255 255 MWriteRootFile writet(2, rule, fOverwrite?"RECREATE":"NEW"); // EffectiveOnTime 256 256 MWriteRootFile writem(2, rule, fOverwrite?"RECREATE":"NEW"); // Muons 257 writem.SetName("WriteMuons"); 257 258 258 259 // Data -
trunk/MagicSoft/Mars/mpointing/MHPointing.cc
r7201 r7202 42 42 43 43 #include "MTime.h" 44 #include "MAstro.h" 44 45 45 46 #include "MReportDrive.h" … … 165 166 if (t->GetName()==(TString)"MTimeStarguider") 166 167 { 167 const Double_t max = 30; // [arcsec] maximum starguider deviation which makes sense168 169 168 AddPoint(fBrightness, tm, fReportSG->GetSkyBrightness()); 170 169 AddPoint(fNumStars, tm, fReportSG->GetNumIdentifiedStars()); 171 if (fReportSG->GetDevAbs()<max) 170 171 const Bool_t zdok = TMath::Abs(fReportSG->GetDevZd())<30; 172 const Bool_t azok = TMath::Abs(fReportSG->GetDevAz())<90; 173 174 const Double_t devzd = fReportSG->GetDevZd(); 175 const Double_t devaz = fReportSG->GetDevAz(); 176 177 if (zdok && azok) 172 178 AddPoint(fDevTimeSG, tm, fReportSG->GetDevAbs()); 173 if ( TMath::Abs(fReportSG->GetDevZd())<max)174 AddPoint(fDevZd, tm, fReportSG->GetDevZd());175 if ( TMath::Abs(fReportSG->GetDevAz())<max)176 AddPoint(fDevAz, tm, fReportSG->GetDevAz());179 if (zdok) 180 AddPoint(fDevZd, tm, devzd); 181 if (azok) 182 AddPoint(fDevAz, tm, devaz); 177 183 return kTRUE; 178 184 } … … 198 204 TAxis *axe = h->GetXaxis(); 199 205 axe->SetLabelSize(0.033); 200 axe->SetTimeFormat("%H:%M :%S%F1995-01-01 00:00:00 GMT");206 axe->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT"); 201 207 axe->SetTimeDisplay(1); 202 208 axe->SetTitle("Time"); -
trunk/MagicSoft/Mars/mpointing/Makefile
r7199 r7202 23 23 24 24 SRCFILES = MPointing.cc \ 25 MPointingDev.cc \ 26 MPointingDevCalc.cc \ 25 27 MPointingPos.cc \ 26 28 MPointingPosCalc.cc \ -
trunk/MagicSoft/Mars/mpointing/PointingIncl.h
r3570 r7202 1 1 #ifndef __CINT__ 2 2 3 #include <TVector2.h>4 5 3 #endif // __CINT__ -
trunk/MagicSoft/Mars/mpointing/PointingLinkDef.h
r7199 r7202 6 6 7 7 #pragma link C++ class MPointing+; 8 9 #pragma link C++ class MPointingDev+; 10 #pragma link C++ class MPointingDevCalc+; 8 11 9 12 #pragma link C++ class MPointingPos+; -
trunk/MagicSoft/Mars/mreport/MReportCamera.cc
r7188 r7202 477 477 return kTRUE; 478 478 } 479 480 // -------------------------------------------------------------------------- 481 // 482 // Interprete the CHTEMP part 483 // 484 Bool_t MReportCamera::InterpreteCHTEMP(TString &str) 485 { 486 if (!CheckTag(str, "CHTEMP ")) 487 return kFALSE; 488 489 Int_t len, temp1, temp2, temp3; 490 Int_t n=sscanf(str.Data(), " %d %d %d %n", &temp1, &temp2, &temp3, &len); 491 if (n!=3) 492 { 493 *fLog << warn << "WARNING - Reading information of 'CHTEMP' section." << endl; 494 return kFALSE; 495 } 496 497 fAUX->fTempCountingHouse1 = temp1*0.01; 498 fAUX->fTempCountingHouse2 = temp2*0.01; 499 fAUX->fTempCountingHouse3 = temp3*0.01; 500 501 str.Remove(0, len); 502 str=str.Strip(TString::kBoth); 503 504 return kTRUE; 505 } 506 507 // -------------------------------------------------------------------------- 508 // 509 // Interprete the HVFIL part 510 // 511 Bool_t MReportCamera::InterpreteHVFIL(TString &str) 512 { 513 if (!CheckTag(str, "HVFIL ")) 514 return kFALSE; 515 516 str=str.Strip(TString::kBoth); 517 518 const Ssiz_t pos = str.First(' '); 519 if (pos<0) 520 { 521 *fLog << warn << "WARNING - Reading information of 'HVFIL' section." << endl; 522 return kFALSE; 523 } 524 525 fHV->fFileName = str(0, pos); 526 527 str.Remove(0, pos); 528 str=str.Strip(TString::kBoth); 529 530 return kTRUE; 531 } 532 479 533 // -------------------------------------------------------------------------- 480 534 // … … 576 630 } 577 631 632 if (ver >= 200507190) 633 { 634 if (!InterpreteCHTEMP(str)) 635 return kCONTINUE; 636 if (!InterpreteHVFIL(str)) 637 return kCONTINUE; 638 } 639 578 640 if (str!="OVER") 579 641 { -
trunk/MagicSoft/Mars/mreport/MReportCamera.h
r6963 r7202 48 48 Bool_t InterpreteActiveLoad(TString &str); 49 49 Bool_t InterpreteCentralPix(TString &str); 50 Bool_t InterpreteCHTEMP(TString &str); 51 Bool_t InterpreteHVFIL(TString &str); 50 52 51 53 Int_t InterpreteBody(TString &str, Int_t ver); -
trunk/MagicSoft/Mars/mreport/MReportDrive.cc
r7197 r7202 135 135 Double_t MReportDrive::GetAbsError() const 136 136 { 137 return MAstro::GetDevAbs(fNominalZd, fErrorZd, fErrorAz); 138 /* 137 139 // For the algorithm see also MReportStarguider 138 140 const Double_t pzd = fNominalZd*TMath::DegToRad(); … … 158 160 // 159 161 160 return acos(d)*TMath::RadToDeg(); 162 return acos(d)*TMath::RadToDeg();*/ 161 163 } 162 164 -
trunk/MagicSoft/Mars/mreport/MReportStarguider.cc
r7197 r7202 32 32 // This is the place to get the azimuth-/zenith mispointing of the telescope 33 33 // given by the starguider-camera. 34 // 35 // 36 // Starguider reports are available since 2004/11/17. 37 // The nomnial pointing position is available since 2005/03/22 38 // The sky brightness and the number of identified stars since 2005/03/17 34 39 // 35 40 // … … 129 134 Double_t MReportStarguider::GetDevAbs() const 130 135 { 131 // For the algorithm see also MReportDrive 132 const Double_t pzd = fNominalZd * TMath::DegToRad(); 133 const Double_t azd = fDevZd/60 * TMath::DegToRad(); 134 const Double_t aaz = fDevAz/60 * TMath::DegToRad(); 136 return MAstro::GetDevAbs(fNominalZd, fDevZd/60, fDevAz/60)*60; 137 /* 138 // For the algorithm see also MReportDrive 139 const Double_t pzd = fNominalZd * TMath::DegToRad(); 140 const Double_t azd = fDevZd/60 * TMath::DegToRad(); 141 const Double_t aaz = fDevAz/60 * TMath::DegToRad(); 135 142 136 const double el = TMath::Pi()/2-pzd;143 const double el = TMath::Pi()/2-pzd; 137 144 138 const double dphi2 = aaz/2.;139 const double cos2 = cos(dphi2)*cos(dphi2);140 const double sin2 = sin(dphi2)*sin(dphi2);141 const double d = cos(azd)*cos2 - cos(2*el)*sin2;145 const double dphi2 = aaz/2.; 146 const double cos2 = cos(dphi2)*cos(dphi2); 147 const double sin2 = sin(dphi2)*sin(dphi2); 148 const double d = cos(azd)*cos2 - cos(2*el)*sin2; 142 149 143 return acos(d)*TMath::RadToDeg()*60; 150 return acos(d)*TMath::RadToDeg()*60; 151 */ 144 152 } 145 153 -
trunk/MagicSoft/Mars/mreport/MReportStarguider.h
r7197 r7202 4 4 #ifndef MARS_MReport 5 5 #include "MReport.h" 6 #endif 7 8 #ifndef ROOT_TVector2 9 #include <TVector2.h> 6 10 #endif 7 11 … … 31 35 Double_t GetDevZd() const { return fDevZd; } 32 36 Double_t GetDevAbs() const; 37 TVector2 GetDev() const { return TVector2(fDevZd, fDevAz); } 33 38 34 39 Double_t GetNominalZd() const { return fNominalZd; } 35 40 Double_t GetNominalAz() const { return fNominalAz; } 41 TVector2 GetNominalPos() const { return TVector2(fNominalZd, fNominalAz); } 36 42 37 43 Float_t GetCameraCenterX() const { return fCameraCenterX; } 38 44 Float_t GetCameraCenterY() const { return fCameraCenterY; } 45 TVector2 GetCameraCenter() const { return TVector2(fCameraCenterX, fCameraCenterY); } 39 46 40 47 UInt_t GetNumIdentifiedStars() const { return fNumIdentifiedStars; }
Note:
See TracChangeset
for help on using the changeset viewer.