Ignore:
Timestamp:
03/15/04 19:51:13 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r3513 r3514  
    12621262        return TH1D::DistancetoPrimitive(px, py);
    12631263
    1264     if (GetPixelIndex(px, py)>=0)
     1264    const Bool_t issame = TString(GetDrawOption()).Contains("same", TString::kIgnoreCase);
     1265
     1266    const Float_t maxr = (1-fGeomCam->GetConvMm2Deg())*fGeomCam->GetMaxRadius()/2;
     1267    const Float_t conv = !issame ||
     1268        gPad->GetX1()<-maxr || gPad->GetY1()<-maxr ||
     1269        gPad->GetX2()> maxr || gPad->GetY2()>maxr ? 1 : fGeomCam->GetConvMm2Deg();
     1270
     1271    cout << conv << endl;
     1272
     1273    if (GetPixelIndex(px, py, conv)>=0)
    12651274        return 0;
    12661275
     
    12791288//
    12801289//
    1281 Int_t MHCamera::GetPixelIndex(Int_t px, Int_t py) const
     1290Int_t MHCamera::GetPixelIndex(Int_t px, Int_t py, Float_t conv) const
    12821291{
    12831292    if (fNcells<=1)
     
    12881297    {
    12891298        MHexagon hex((*fGeomCam)[i]);
    1290         if (hex.DistancetoPrimitive(px, py)>0)
     1299        if (hex.DistancetoPrimitive(px, py, conv)>0)
    12911300            continue;
    12921301
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r3487 r3514  
    6666    TPaveStats *GetStatisticBox();
    6767
    68     Int_t GetPixelIndex(Int_t px, Int_t py) const;
     68    Int_t GetPixelIndex(Int_t px, Int_t py, Float_t conv=1) const;
    6969
    7070    void PaintAxisTitle();
Note: See TracChangeset for help on using the changeset viewer.