Ignore:
Timestamp:
01/21/02 20:52:12 (23 years ago)
Author:
rkb
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.cc

    r1082 r1203  
    1111
    1212#include "MHexagon.h"
     13
     14#include "MGeomPix.h"
    1315#include "MGeomCam.h"
    1416
     
    2729    : fAutoScale(kTRUE), fMinPhe(-2), fMaxPhe(50), fW(0), fH(0), fDrawingPad(NULL)
    2830{
     31    fGeomCam = geom; // FIXME: Clone doesn't work! (MGeomCam*)geom->Clone();
     32
    2933    //
    3034    //  create the hexagons of the display
     
    8084    delete fLegend;
    8185    delete fLegText;
    82 }
    83 
    84 inline void MCamDisplay::SetPixColor(const MCerPhotPix &pix)
    85 {
    86     (*this)[pix.GetPixId()].SetFillColor(GetColor(pix.GetNumPhotons()));
     86
     87    delete fGeomCam;
     88}
     89
     90inline void MCamDisplay::SetPixColor(const MCerPhotPix &pix, const Int_t i)
     91{
     92    //
     93    // Fixme: Divide pnum by the (real) area of the pixel
     94    //
     95
     96    const Float_t ratio = (*fGeomCam)[0].GetA()/(*fGeomCam)[i].GetA();
     97    const Float_t pnum  = ratio*pix.GetNumPhotons();
     98
     99    (*this)[pix.GetPixId()].SetFillColor(GetColor(pnum));
    87100}
    88101
     
    221234    if (fAutoScale)
    222235    {
    223         fMinPhe = event->GetNumPhotonsMin();
    224         fMaxPhe = event->GetNumPhotonsMax();
     236        fMinPhe = event->GetNumPhotonsMin(fGeomCam);
     237        fMaxPhe = event->GetNumPhotonsMax(fGeomCam);
    225238
    226239        if (fMaxPhe < 20.)
     
    242255            continue;
    243256
    244         SetPixColor(pix);
     257        SetPixColor(pix, i);
    245258    }
    246259
Note: See TracChangeset for help on using the changeset viewer.