Ignore:
Timestamp:
06/24/03 15:01:48 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mreflector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc

    r2224 r2229  
    3838/////////////////////////////////////////////////////////////////////////////
    3939#include "MRflEvtData.h"
     40
     41#include <TMarker.h>
    4042
    4143#include "MLog.h"
     
    98100        return;
    99101
    100     fList.ExpandCreateFast(fPos);
     102    fList.ExpandCreate(fPos);
    101103}
    102104
     
    119121    // sum the photons content in each pixel
    120122    //
    121     const Int_t entries = GetNumPhotons();
    122 
    123123    val = 0;
    124124
    125125    MHexagon hex(cam[idx]);
    126     for (Int_t i=0; i<entries; i++)
    127     {
    128         const MRflSinglePhoton &ph = GetPhoton(i);
    129126
    130         if (hex.DistanceToPrimitive(ph.GetX(), ph.GetY())<=0)
     127    MRflSinglePhoton *ph=NULL;
     128
     129    TIter Next(&fList);
     130    while ((ph=(MRflSinglePhoton*)Next()))
     131        if (hex.DistanceToPrimitive(ph->GetX(), ph->GetY())<=0)
    131132            val += cam.GetPixRatio(idx);
    132     }
    133133
    134134    return val>0;
    135135}
     136
     137// ------------------------------------------------------------------------
     138//
     139// You can call Draw() to add the photons to the current pad.
     140// The photons are painted each tim ethe pad is updated.
     141// Make sure that you use the right (world) coordinate system,
     142// like created, eg. by the MHCamera histogram.
     143//
     144void MRflEvtData::Paint(Option_t *)
     145{
     146    MRflSinglePhoton *ph=NULL;
     147
     148    TMarker m;
     149    m.SetMarkerStyle(kFullDotMedium); // Gtypes.h
     150
     151    TIter Next(&fList);
     152    while ((ph=(MRflSinglePhoton*)Next()))
     153    {
     154        m.SetX(ph->GetX());
     155        m.SetY(ph->GetY());
     156        m.Paint();
     157    }
     158}
     159
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.h

    r2208 r2229  
    3030
    3131    void Print(Option_t *o="") const;
     32    void Paint(Option_t *o="");
    3233
    3334    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
Note: See TracChangeset for help on using the changeset viewer.