Changeset 2566 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
11/24/03 01:34:31 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2565 r2566  
    2323     - changed bit 14/15 to 15/16. BIT(14) is used in TGMainFrame
    2424       already
     25     - fixed a typo. Must be kTabPrint instead of kFilePrint
    2526     
    2627   * mfilter/MFRealTimePeriod.h:
     
    3536       autoscale is done
    3637     - added 'content' Draw option
     38     - when kNoLegend is set draw the legend showing the size
    3739     
    3840   * mhist/MHEvent.cc:
     
    6365     - added MEventRateCalc
    6466     - added MEventRate
     67
     68   * mgeom/MGeomMirror.h:
     69     - fixed comments in the header - must be in one line!
     70
     71   * mreport/MReport.h:
     72     - adde Getter-function for fState
     73
     74   * mreport/MReportDrive.[h,cc]:
     75     - added GetAbsError() (preliminary!)
    6576
    6677
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r2563 r2566  
    214214    tabmenu->AddEntry("Re&move",             kTabRemove);
    215215    tabmenu->AddSeparator();
    216     tabmenu->AddEntry("Print with &lpr",     kFilePrint);
     216    tabmenu->AddEntry("Print with &lpr",     kTabPrint);
    217217    tabmenu->Associate(this);
    218218
     
    971971    gSystem->Unlink(name);
    972972
    973     SetStatusLine2(Form("Done (%dpages)", pages));
     973    SetStatusLine2(Form("Done (%dpage(s))", pages));
    974974
    975975    return pages;
  • trunk/MagicSoft/Mars/mgeom/MGeomMirror.h

    r1698 r2566  
    1515    Int_t   fMirrorId;    // the Mirror Id
    1616
    17     Float_t fFocalDist;   //  focal distance of that mirror [cm]
    18     Float_t fSX;          // curvilinear coordinate of mirror's center in X[cm]
    19     Float_t fSY;          // curvilinear coordinate of mirror's center in X[cm]
    20     Float_t fX;           // x coordinate of the center of the mirror [cm]
    21     Float_t fY;           // y coordinate of the center of the mirror [cm]
    22     Float_t fZ;           // z coordinate of the center of the mirror [cm]
    23     Float_t fThetaN;      // polar theta angle of the direction
    24                           //  where the mirror points to
    25     Float_t fPhiN;        // polar phi angle of the direction
    26                           // where the mirror points to
    27     Float_t fXN;          // xn coordinate of the normal vector
    28                           // in the center
    29     Float_t fYN;          // yn coordinate of the normal vector
    30                           // in the center
    31     Float_t fZN;          // zn coordinate of the normal vector
    32                           // in the center
     17    Float_t fFocalDist;   // [cm] focal distance of that mirror
     18    Float_t fSX;          // [cm] curvilinear coordinate of mirror's center in X
     19    Float_t fSY;          // [cm] curvilinear coordinate of mirror's center in Y
     20    Float_t fX;           // [cm] x coordinate of the center of the mirror
     21    Float_t fY;           // [cm] y coordinate of the center of the mirror
     22    Float_t fZ;           // [cm] z coordinate of the center of the mirror
     23    Float_t fThetaN;      // polar theta angle of the direction where the mirror points to
     24    Float_t fPhiN;        // polar phi angle of the direction where the mirror points to
     25    Float_t fXN;          // xn coordinate of the normal vector in the center
     26    Float_t fYN;          // yn coordinate of the normal vector in the center
     27    Float_t fZN;          // zn coordinate of the normal vector in the center
    3328                          // Note: fXN^2*fYN^2*fZN^2 = 1
    34     Float_t fDeviationX;  // deviation in x [cm]
    35     Float_t fDeviationY;  // deviation in y [cm]
    36                           // of the spot of a single mirror on the camera plane
     29    Float_t fDeviationX;  // [cm] deviation in x of the spot of a single mirror on the camera plane
     30    Float_t fDeviationY;  // [cm] deviation in y of the spot of a single mirror on the camera plane
     31
    3732    TArrayF fWavelength;  // List of wavelength
    3833    TArrayF fReflectivity;// Mirror reflectivity
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r2563 r2566  
    465465        max += 1;
    466466
    467     if (!TestBit(kNoLegend))
    468         UpdateLegend(min, max, islog);
     467    UpdateLegend(min, max, islog);
    469468
    470469    MHexagon hex;
     
    670669        }
    671670
     671        // FIXME: Should depend on the color of the pixel...
     672        //(GetColor(GetBinContent(i+1), min, max, 0));
     673        txt.SetTextColor(kRed);
    672674        txt.SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05);
    673675        txt.PaintText(h.GetX(), h.GetY(), num);
     
    926928void MHCamera::UpdateLegend(Float_t min, Float_t max, Bool_t islog)
    927929{
     930    const Float_t range = fGeomCam->GetMaxRadius()*1.05;
     931
     932    TArrow arr;
     933    arr.PaintArrow(-range*.9, -range*.9, -range*.6, -range*.9, 0.025);
     934    arr.PaintArrow(-range*.9, -range*.9, -range*.9, -range*.6, 0.025);
     935
     936    TString text;
     937    text += (int)(range*.3);
     938    text += "mm";
     939
     940    TText newtxt2;
     941    newtxt2.SetTextSize(0.04);
     942    newtxt2.PaintText(-range*.85, -range*.85, text);
     943
     944    text = "";
     945    text += (float)((int)(range*.3*fGeomCam->GetConvMm2Deg()*10))/10;
     946    text += "\\circ";
     947    text = text.Strip(TString::kLeading);
     948
     949    TLatex latex;
     950    latex.PaintLatex(-range*.85, -range*.75, 0, 0.04, text);
     951
     952    if (TestBit(kNoLegend))
     953        return;
     954
    928955    TPaveStats *stats = GetStatisticBox();
    929956
    930957    const Float_t hndc   = 0.92 - (stats ? stats->GetY1NDC() : 1);
    931     const Float_t range  = fGeomCam->GetMaxRadius()*1.05;
    932958    const Float_t H      = (0.75-hndc)*range;
    933959    const Float_t offset = hndc*range;
     
    966992        newbox.PaintBox(range, H*(i*h-1)-offset, range+w, H*((i+1)*h-1)-offset);
    967993    }
    968 
    969     TArrow arr;
    970     arr.PaintArrow(-range*.9, -range*.9, -range*.6, -range*.9, 0.025);
    971     arr.PaintArrow(-range*.9, -range*.9, -range*.9, -range*.6, 0.025);
    972 
    973     TString text;
    974     text += (int)(range*.3);
    975     text += "mm";
    976 
    977     TText newtxt2;
    978     newtxt2.SetTextSize(0.04);
    979     newtxt2.PaintText(-range*.85, -range*.85, text);
    980 
    981     text = "";
    982     text += (float)((int)(range*.3*fGeomCam->GetConvMm2Deg()*10))/10;
    983     text += "\\circ";
    984     text = text.Strip(TString::kLeading);
    985 
    986     TLatex latex;
    987     latex.PaintLatex(-range*.85, -range*.75, 0, 0.04, text);
    988994}
    989995
  • trunk/MagicSoft/Mars/mreport/MReport.h

    r2557 r2566  
    4141    const TString &GetIdentifier() const { return fIdentifier; }
    4242
     43    Byte_t GetState() const { return fState; }
     44
    4345    ClassDef(MReport, 1) // Base class for control reports
    4446};
  • trunk/MagicSoft/Mars/mreport/MReportDrive.cc

    r2557 r2566  
    7171    return str.IsNull();
    7272}
     73
     74Double_t MReportDrive::GetAbsError() const
     75{
     76    const Double_t pzd = fNominalZd*TMath::DegToRad();
     77    const Double_t azd = fErrorZd  *TMath::DegToRad();
     78    const Double_t aaz = fErrorAz  *TMath::DegToRad();
     79
     80    const double el = TMath::Pi()/2-pzd;
     81
     82    const double dphi2 = aaz/2.;
     83    const double cos2  = cos(dphi2)*cos(dphi2);
     84    const double sin2  = sin(dphi2)*sin(dphi2);
     85    const double d     = cos(azd)*cos2 - cos(2*el)*sin2;
     86
     87    //
     88    // Original:
     89    //   cos(Zd1)*cos(Zd2)+sin(Zd1)*sin(Zd2)*cos(dAz)
     90    //
     91    // Correct:
     92    //   const double d = cos(azd)*cos2 - cos(el1+el2)*sin2;
     93    //
     94    // Estimated:
     95    //   const double d = cos(azd)*cos2 - cos(2*el)*sin2;
     96    //
     97
     98    return acos(d)*TMath::RadToDeg();
     99}
  • trunk/MagicSoft/Mars/mreport/MReportDrive.h

    r2557 r2566  
    2828    Bool_t InterpreteBody(TString &str);
    2929
    30     Double_t GetMjd() const           { return fMjd;       }
     30    Double_t GetMjd() const       { return fMjd;       }
    3131
    32     Double_t GetRa() const            { return fRa;        }
    33     Double_t GetDec() const           { return fDec;       }
    34     Double_t GetHa() const            { return fHa;        }
     32    Double_t GetRa() const        { return fRa;        }
     33    Double_t GetDec() const       { return fDec;       }
     34    Double_t GetHa() const        { return fHa;        }
    3535
    36         Double_t GetNominalZd() const { return fNominalZd; }
    37     Double_t GetNominalAz() const     { return fNominalAz; }
    38     Double_t GetCurrentZd() const     { return fCurrentZd; }
    39     Double_t GetCurrentAz() const     { return fCurrentAz; }
     36    Double_t GetNominalZd() const { return fNominalZd; }
     37    Double_t GetNominalAz() const { return fNominalAz; }
     38    Double_t GetCurrentZd() const { return fCurrentZd; }
     39    Double_t GetCurrentAz() const { return fCurrentAz; }
    4040
    41     Double_t GetErrorZd() const       { return fErrorZd;   }
    42     Double_t GetErrorAz() const       { return fErrorAz;   }
     41    Double_t GetErrorZd() const   { return fErrorZd;   }
     42    Double_t GetErrorAz() const   { return fErrorAz;   }
     43
     44    Double_t GetAbsError() const;
    4345
    4446    ClassDef(MReportDrive, 1) // Base class for control reports
Note: See TracChangeset for help on using the changeset viewer.