Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2228)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2229)
@@ -19,4 +19,31 @@
    * mevtdisp/MGCamDisplay.cc:
      - display ellipse in all canvas'
+
+   * macros/readrfl.C:
+     - adapted
+
+   * manalysis/MMcTriggerLvl2.cc, meventdisp/MGEvtDisplay.cc,
+     mraw/MRawEvtPixelIter.cc:
+     - adapted
+   
+   * mgui/MCamEvent.[h,cc], mhist/MHCamEvent.[h,cc]:
+     - more comments
+     
+   * mgui/MHexagon.[h,cc]:
+     - removed obsolete destructor
+
+   * mhist/MHCamera.[h,cc]:
+     - removed fPhotons
+     - removed ShowRflEvent
+     - added comments
+     
+   * mhist/MHTriggerLvl0.cc:
+     - fixed comments
+     
+   * mraw/MRawEvtData.cc:
+     - some small changes
+     
+   * mreflector/MRflEvtData.[h,cc]:
+     - implemented Paint function
 
 
@@ -155,5 +182,5 @@
      
    * manalysis/MCerPhotEvt.h:
-     - added -> to fPixels
+     - added //-> to fPixels
 
    * meventdisp/Makefile:
Index: /trunk/MagicSoft/Mars/macros/readrfl.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/readrfl.C	(revision 2228)
+++ /trunk/MagicSoft/Mars/macros/readrfl.C	(revision 2229)
@@ -80,4 +80,5 @@
     MHCamera display(geomcam);
     display.Draw();
+    event.Draw();
 
     cout << "Runno: " << runno << "  Eventno: " << evtno << endl;
@@ -91,5 +92,4 @@
 
         display.SetCamContent(event);
-        display.ShowRflEvent(&event);
         gPad->Modified();
         gPad->Update();
Index: /trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc	(revision 2229)
@@ -293,5 +293,5 @@
       fCam = new MHCamera(*fGeomCam);
       fCam->Draw();
-      fCam->DrawPixelNumbers();
+      fCam->DrawPixelIndices();
     }
 
@@ -337,5 +337,5 @@
       fCam = new MHCamera(*fGeomCam);
       fCam->Draw();  
-      fCam->DrawPixelNumbers();
+      fCam->DrawPixelIndices();
     }
 
Index: /trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc
===================================================================
--- /trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc	(revision 2229)
@@ -281,5 +281,5 @@
     MHCamera *display = new MHCamera(geom);
     display->Draw();
-    display->DrawPixelNumbers();
+    display->DrawPixelIndices();
     fList->Add(display);
 
Index: /trunk/MagicSoft/Mars/mgui/MCamEvent.cc
===================================================================
--- /trunk/MagicSoft/Mars/mgui/MCamEvent.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mgui/MCamEvent.cc	(revision 2229)
@@ -24,7 +24,9 @@
 
 //////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-// MCamEvent                                                                //
-//                                                                          //
+//
+// MCamEvent
+//
+// A base class describing an event in the camera.
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MCamEvent.h"
Index: /trunk/MagicSoft/Mars/mgui/MCamEvent.h
===================================================================
--- /trunk/MagicSoft/Mars/mgui/MCamEvent.h	(revision 2228)
+++ /trunk/MagicSoft/Mars/mgui/MCamEvent.h	(revision 2229)
@@ -2,11 +2,4 @@
 #define MARS_MCamEvent
 
-//////////////////////////////////////////////////////////////
-//
-//   MCamEvent
-//
-//   A Hexagon for the MAGIC event display
-//
-//////////////////////////////////////////////////////////////
 #ifndef MARS_MParContainer
 #include "MParContainer.h"
Index: /trunk/MagicSoft/Mars/mgui/MHexagon.cc
===================================================================
--- /trunk/MagicSoft/Mars/mgui/MHexagon.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mgui/MHexagon.cc	(revision 2229)
@@ -83,12 +83,4 @@
 // ------------------------------------------------------------------------
 //
-//     default destructor for MHexagon
-//
-MHexagon::~MHexagon()
-{
-}
-
-// ------------------------------------------------------------------------
-//
 //     copy this hexagon to hexagon
 //
Index: /trunk/MagicSoft/Mars/mgui/MHexagon.h
===================================================================
--- /trunk/MagicSoft/Mars/mgui/MHexagon.h	(revision 2228)
+++ /trunk/MagicSoft/Mars/mgui/MHexagon.h	(revision 2229)
@@ -42,5 +42,4 @@
     MHexagon(MGeomPix &pix);
     MHexagon(const MHexagon &hexagon);
-    virtual ~MHexagon();
 
     virtual void  Copy(TObject &hexagon)
Index: /trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 2229)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
+!   Author(s): Thomas Bretz, 12/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2003
@@ -26,4 +26,7 @@
 //
 // MHCamEvent
+//
+// A histogram to store the sum of camera events. This can be photons,
+// currents or enything else derived from MCamEvent
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -131,4 +134,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Return fSum.
+//
 TH1 *MHCamEvent::GetHistByName(const TString name)
 {
Index: /trunk/MagicSoft/Mars/mhist/MHCamEvent.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamEvent.h	(revision 2228)
+++ /trunk/MagicSoft/Mars/mhist/MHCamEvent.h	(revision 2229)
@@ -12,6 +12,6 @@
 {
 private:
-    MHCamera *fSum;      // storing the sum
-    MCamEvent   *fEvt;      //! the current event
+    MHCamera  *fSum; // storing the sum
+    MCamEvent *fEvt; //! the current event
 
     TString fNameEvt;
Index: /trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2229)
@@ -28,9 +28,8 @@
 // MHCamera
 //
-// Camera Display. The Pixels are displayed in
-// contents/area [somthing/mm^2]
-//
-// To change the scale to a logarithmic scale SetLogz() of the Pad.
-//
+// Camera Display, based on a TH1D. Pleas be carefull using the
+// underlaying TH1D.
+//
+// To change the scale to a logarithmic scale SetLogy() of the Pad.
 //
 ////////////////////////////////////////////////////////////////////////////
@@ -44,5 +43,4 @@
 #include <TLatex.h>
 #include <TStyle.h>
-#include <TMarker.h>
 #include <TCanvas.h>
 #include <TArrayF.h>
@@ -57,7 +55,4 @@
 #include "MGeomCam.h"
 
-#include "MRflEvtData.h"
-#include "MRflSinglePhoton.h"
-
 #include "MCerPhotPix.h"
 #include "MCerPhotEvt.h"
@@ -85,5 +80,4 @@
     SetDirectory(NULL);
 
-    fPhotons   = NULL;
     fNotify  = NULL;
 
@@ -97,5 +91,7 @@
 // ------------------------------------------------------------------------
 //
-//  Constructor. Makes a clone of MGeomCam.
+//  Constructor. Makes a clone of MGeomCam. Removed the TH1D from the
+// current directory. Calls Sumw2(). Set the histogram line color
+// (for error bars) to Green and the marker style to kFullDotMedium.
 //
 MHCamera::MHCamera(const MGeomCam &geom, const char *name, const char *title)
@@ -121,6 +117,4 @@
     //    register BIT(8) as kNoContextMenu. If an object has this bit set it will
     //    not get an automatic context menu when clicked with the right mouse button.
-
-    fPhotons = new TClonesArray("TMarker", 0);
 
     //
@@ -139,13 +133,8 @@
 // ------------------------------------------------------------------------
 //
-// Destructor. Deletes TClonesArrays for hexagons and legend elements.
+// Destructor. Deletes the cloned fGeomCam and the notification list.
 //
 MHCamera::~MHCamera()
 {
-    if (fPhotons)
-    {
-        fPhotons->Delete();
-        delete fPhotons;
-    }
     if (fGeomCam)
         delete fGeomCam;
@@ -154,6 +143,9 @@
 }
 
-Int_t MHCamera::Fill(Axis_t x)
-{
+// ------------------------------------------------------------------------
+//
+// Taken from TH1D::Fill(). Uses the argument directly as bin index.
+// Doesn't increment the number of entries.
+//
 //   -*-*-*-*-*-*-*-*Increment bin with abscissa X by 1*-*-*-*-*-*-*-*-*-*-*
 //                   ==================================
@@ -167,4 +159,6 @@
 //
 //   -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+Int_t MHCamera::Fill(Axis_t x)
+{
 
 #if ROOT_VERSION_CODE > ROOT_VERSION(3,05,00)
@@ -186,7 +180,9 @@
 }
 
-//______________________________________________________________________________
-Int_t MHCamera::Fill(Axis_t x, Stat_t w)
-{
+// ------------------------------------------------------------------------
+//
+// Taken from TH1D::Fill(). Uses the argument directly as bin index.
+// Doesn't increment the number of entries.
+//
 //   -*-*-*-*-*-*Increment bin with abscissa X with a weight w*-*-*-*-*-*-*-*
 //               =============================================
@@ -200,5 +196,6 @@
 //
 //   -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-
+Int_t MHCamera::Fill(Axis_t x, Stat_t w)
+{
 #if ROOT_VERSION_CODE > ROOT_VERSION(3,05,00)
    if (fBuffer) return BufferFill(x,w);
@@ -310,5 +307,9 @@
 }
 
-
+// ------------------------------------------------------------------------
+//
+// Resizes the current pad so that the camera is displayed in its
+// correct aspect ratio
+//
 void MHCamera::SetRange()
 {
@@ -349,4 +350,8 @@
 }
 
+// ------------------------------------------------------------------------
+//
+// Updates the pixel colors and paints the pixels
+//
 void MHCamera::Update(Bool_t islog, Bool_t isbox, Bool_t iscol)
 {
@@ -383,4 +388,8 @@
 }
 
+// ------------------------------------------------------------------------
+//
+// Print minimum and maximum
+//
 void MHCamera::Print(Option_t *) const
 {
@@ -395,4 +404,8 @@
 }
 
+// ------------------------------------------------------------------------
+//
+// Paint the y-axis title
+//
 void MHCamera::PaintAxisTitle()
 {
@@ -412,4 +425,8 @@
 }
 
+// ------------------------------------------------------------------------
+//
+// Paint the histogram title
+//
 void MHCamera::PaintTitle()
 {
@@ -485,7 +502,5 @@
 // ------------------------------------------------------------------------
 //
-// This is called at any time the canvas should get repainted.
-// Here we maintain an aspect ratio of 1.15. This makes sure,
-// that the camera image doesn't get distorted by resizing the canvas.
+// Paints the camera.
 //
 void MHCamera::Paint(Option_t *o)
@@ -517,6 +532,4 @@
 
     // Paint primitives (pixels, color legend, photons, ...)
-    { fPhotons->ForEach(TObject, Paint)(); }
-
     PaintTitle();
     PaintAxisTitle();
@@ -525,5 +538,5 @@
 // ------------------------------------------------------------------------
 //
-//  With this function you can change the color palette. For more
+// With this function you can change the color palette. For more
 // information see TStyle::SetPalette. Only palettes with 50 colors
 // are allowed.
@@ -580,5 +593,5 @@
 }
 
-void MHCamera::DrawPixelNumbers()
+void MHCamera::DrawPixelIndices()
 {
     for (int i=0; i<kItemsLegend; i++)
@@ -605,5 +618,6 @@
 // ------------------------------------------------------------------------
 //
-// Call this function to fill the currents
+// Call this function to add a MCamEvent on top of the present contents.
+// Only 'used' pixels are added.
 //
 void MHCamera::AddCamContent(const MCamEvent &event, Int_t type)
@@ -617,5 +631,4 @@
 
         Fill(idx, val); // FIXME: Slow!
-        //fArray[idx+1]+=val;
     }
     fEntries++;
@@ -624,5 +637,10 @@
 // ------------------------------------------------------------------------
 //
-// Call this function to fill the currents
+// Call this function to add a MHCamera on top of the present contents.
+// Only 'used' pixels are added.
+// Type:
+//  0) bin content
+//  1) errors
+//  2) rel. errors
 //
 void MHCamera::AddCamContent(const MHCamera &d, Int_t type)
@@ -657,12 +675,15 @@
 // ------------------------------------------------------------------------
 //
-// Call this function to fill the currents
+// Call this function to add a TArrayD on top of the present contents.
+// Only 'used' pixels are added.
 //
 void MHCamera::AddCamContent(const TArrayD &event, Bool_t ispos)
 {
+    if (event.GetSize()!=fNcells-2)
+        return;
+
     for (Int_t idx=0; idx<fNcells-2; idx++)
     {
         Fill(idx, const_cast<TArrayD&>(event)[idx]); // FIXME: Slow!
-        //fArray[idx+1]+=val;
 
         if (!ispos || fArray[idx+1]>0)
@@ -674,5 +695,6 @@
 // ------------------------------------------------------------------------
 //
-// Call this function to fill the currents
+// Call this function to add a MCamEvent on top of the present contents.
+// 1 is added to each pixel if the contents of MCamEvent>threshold
 //
 void MHCamera::CntCamContent(const MCamEvent &event, Double_t threshold, Int_t type)
@@ -693,8 +715,12 @@
 // ------------------------------------------------------------------------
 //
-// Call this function to fill the currents
+// Call this function to add a TArrayD on top of the present contents.
+// 1 is added to each pixel if the contents of MCamEvent>threshold
 //
 void MHCamera::CntCamContent(const TArrayD &event, Double_t threshold, Bool_t ispos)
 {
+    if (event.GetSize()!=fNcells-2)
+        return;
+
     for (Int_t idx=0; idx<fNcells-2; idx++)
     {
@@ -708,4 +734,8 @@
 }
 
+// ------------------------------------------------------------------------
+//
+// Fill the pixels with random contents.
+//
 void MHCamera::FillRandom()
 {
@@ -752,28 +782,4 @@
 {
     FillLevels(event, clean.GetCleanLvl1(), clean.GetCleanLvl2());
-}
-
-// ------------------------------------------------------------------------
-//
-// Show a reflector event. EMarkerStyle is defined in root/include/Gtypes.h
-// To remove the photons from the display call FillRflEvent(NULL)
-//
-void MHCamera::ShowRflEvent(const MRflEvtData *event, EMarkerStyle ms)
-{
-    const Int_t num = event ? event->GetNumPhotons() : 0;
-
-    fPhotons->ExpandCreate(num);
-    if (num < 1)
-        return;
-
-    Int_t i=num-1;
-    do
-    {
-        const MRflSinglePhoton &ph = event->GetPhoton(i);
-        TMarker &m = *static_cast<TMarker*>(fPhotons->UncheckedAt(i));
-        m.SetX(ph.GetX());
-        m.SetY(ph.GetY());
-        m.SetMarkerStyle(ms);
-    } while (i--);
 }
 
@@ -917,5 +923,5 @@
 // with the graphical primitive with the mouse!!!
 //
-// All calcutations are running in pixel coordinates
+// All calcutations are done in pixel coordinates
 //
 Int_t MHCamera::DistancetoPrimitive(Int_t px, Int_t py)
@@ -939,16 +945,4 @@
 // ------------------------------------------------------------------------
 //
-// Execute a mouse event on the camera
-//
-/*
- void MHCamera::ExecuteEvent(Int_t event, Int_t px, Int_t py)
- {
- cout << "Execute Event Camera " << event << " @ " << px << " " << py << endl;
- }
- */
-
-
-// ------------------------------------------------------------------------
-//
 // Function introduced  (31-01-03)  WILL BE REMOVED IN THE FUTURE! DON'T
 // USE IT!
@@ -960,4 +954,9 @@
 }
 
+// ------------------------------------------------------------------------
+//
+// Function introduced  (31-01-03)  WILL BE REMOVED IN THE FUTURE! DON'T
+// USE IT!
+//
 Int_t MHCamera::GetPixelIndex(Int_t px, Int_t py) const
 {
@@ -1019,5 +1018,5 @@
     cout << "Contents:             " << fArray[idx+1] << "  <";
     cout << (IsUsed(idx)?"on":"off");
-    cout << ">" << endl << endl;
+    cout << ">" << endl;
 
     if (fNotify && fNotify->GetSize()>0)
Index: /trunk/MagicSoft/Mars/mhist/MHCamera.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2228)
+++ /trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2229)
@@ -5,7 +5,4 @@
 #include "MAGIC.h"
 #endif
-#ifndef ROOT_Gtypes
-#include <Gtypes.h>
-#endif
 #ifndef ROOT_TArrayC
 #include <TArrayC.h>
@@ -21,30 +18,15 @@
 #endif
 
-#include "MGeomCam.h"
-#include "MGeomPix.h"
-class TBox;
-class TText;
-class TArrow;
-class TGStatusBar;
-
 class MGeomCam;
-class MHexagon;
-class MCurrents;
 class MCamEvent;
 class MRflEvtData;
 class MCerPhotEvt;
-class MCerPhotPix;
 class MImgCleanStd;
-class MPedestalPix;
-class MPedestalCam;
 
 class MHCamera : public TH1D
 {
 private:
-    MGeomCam      *fGeomCam;     // pointer to camera geometry
-
-    TArrayC        fUsed;
-
-    TClonesArray  *fPhotons;     // array of reflector photons
+    MGeomCam      *fGeomCam;     // pointer to camera geometry (y-axis)
+    TArrayC        fUsed;        // array containing flags
 
     TArrayI        fColors;      //! Color conversion table
@@ -121,5 +103,4 @@
     Double_t GetMaximum() const { return GetMaximum(0/*kTRUE*/); }
 
-    void  ShowRflEvent(const MRflEvtData *event=NULL, EMarkerStyle m=kFullDotMedium);
     void  FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2);
     void  FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean);
@@ -129,5 +110,5 @@
     void  FillRandom();
 
-    void  DrawPixelNumbers();
+    void  DrawPixelIndices();
 
     void  PrintInfo() const { Print(""); } // *MENU*
Index: /trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2229)
@@ -28,16 +28,10 @@
 // MHTriggerLvl0
 //
-// This is intended to be a sort of "level 0 trigger display". What it really
-// does is to store the number of events of a data file in which each pixel 
-// has gone above a given threshold (fPixelThreshold) which is chosen when
-// calling the constructor. Displaying a camera view with these values can
-// help identify noisy pixels. See the macro pixfixrate.C to see an example
-// of its use. Many things are to be fixed. Only inner pixels are shown now
-// (which are anyhow those involved in the trigger), and the camera geometry
-// (number of pixels, and how many inner ones) is not yet read from the input 
-// file. 
-// The "pedestal" we are using is just the signal in the first ADC slice 
-// (seems reasonable from the inspection of the available test data files).
-//
+// This is intended to be a sort of "level 0 trigger display". What it
+// really does is to store the number of events of a data file in which
+// each pixel has gone above a given threshold (fPixelThreshold) which
+// is chosen when calling the constructor. Displaying a camera view with
+// these values can help identify noisy pixels. See the macro pixfixrate.C
+// to see an example of its use.
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -118,5 +112,5 @@
 // --------------------------------------------------------------------------
 //
-// Fill the histograms with data from a MCerPhotEvt-Container.
+// Fill the histograms with data from a MCamEvent-Container.
 //
 Bool_t MHTriggerLvl0::Fill(const MParContainer *par, const Stat_t w)
@@ -136,5 +130,5 @@
 // --------------------------------------------------------------------------
 //
-// Set to Unused outer pixels.
+// Scale by the number of events
 //
 Bool_t MHTriggerLvl0::Finalize()
Index: /trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h	(revision 2228)
+++ /trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h	(revision 2229)
@@ -12,6 +12,6 @@
 {
 private:
-    MHCamera *fSum;      // storing the sum
-    MCamEvent   *fEvt;      //! the current event
+    MHCamera  *fSum;  // storing the sum
+    MCamEvent *fEvt;  //! the current event
 
     TString fNameEvt;
@@ -36,5 +36,5 @@
     void Draw(Option_t * ="");
 
-    ClassDef(MHTriggerLvl0, 1) // Histogram to sum level 0 triggers in all pixels
+    ClassDef(MHTriggerLvl0, 1) // Histogram to count how often a pixel is above threshold
 };
 
Index: /trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 2229)
@@ -213,5 +213,5 @@
 //     "GRAPH"      A graph is drawn
 //     "HIST"       A histogram is drawn
-//     number       The pixel with the given number is drawn
+//     <index>      The pixel with the given index is drawn
 //
 void MRawEvtData::Draw(Option_t *opt)
@@ -279,7 +279,7 @@
     {
         // FIXME: Add Legend
-        *fLog << "Drawing Histogram of Pixel with Idx " << pix.GetPixelId() << endl;
-
-        TH1F *histh = new TH1F(name, "FADC Samples",      nh, -0.5, nh-.5);
+        *fLog << "Drawing Histogram of Pixel with Idx #" << pix.GetPixelId() << endl;
+
+        TH1F *histh = new TH1F(name, "FADC Samples", nh, -0.5, nh-.5);
         histh->SetXTitle("Time [FADC Slices]");
         histh->SetYTitle("Signal [FADC Units]");
Index: /trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 2229)
@@ -187,4 +187,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Returns the variance (sigma^2) of the HiGainSamples
+//
 Float_t MRawEvtPixelIter::GetVarHiGainSamples() const
 {
@@ -203,4 +207,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Returns the index of the FADC slice the maximum signal in
+//
 Byte_t MRawEvtPixelIter::GetNumMaxHiGainSample() const
 {
Index: /trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc	(revision 2228)
+++ /trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc	(revision 2229)
@@ -38,4 +38,6 @@
 /////////////////////////////////////////////////////////////////////////////
 #include "MRflEvtData.h"
+
+#include <TMarker.h>
 
 #include "MLog.h"
@@ -98,5 +100,5 @@
         return;
 
-    fList.ExpandCreateFast(fPos);
+    fList.ExpandCreate(fPos);
 }
 
@@ -119,17 +121,39 @@
     // sum the photons content in each pixel
     //
-    const Int_t entries = GetNumPhotons();
-
     val = 0;
 
     MHexagon hex(cam[idx]);
-    for (Int_t i=0; i<entries; i++)
-    {
-        const MRflSinglePhoton &ph = GetPhoton(i);
 
-        if (hex.DistanceToPrimitive(ph.GetX(), ph.GetY())<=0)
+    MRflSinglePhoton *ph=NULL;
+
+    TIter Next(&fList);
+    while ((ph=(MRflSinglePhoton*)Next()))
+        if (hex.DistanceToPrimitive(ph->GetX(), ph->GetY())<=0)
             val += cam.GetPixRatio(idx);
-    }
 
     return val>0;
 }
+
+// ------------------------------------------------------------------------
+//
+// You can call Draw() to add the photons to the current pad.
+// The photons are painted each tim ethe pad is updated.
+// Make sure that you use the right (world) coordinate system,
+// like created, eg. by the MHCamera histogram.
+//
+void MRflEvtData::Paint(Option_t *)
+{
+    MRflSinglePhoton *ph=NULL;
+
+    TMarker m;
+    m.SetMarkerStyle(kFullDotMedium); // Gtypes.h
+
+    TIter Next(&fList);
+    while ((ph=(MRflSinglePhoton*)Next()))
+    {
+        m.SetX(ph->GetX());
+        m.SetY(ph->GetY());
+        m.Paint();
+    }
+}
+
Index: /trunk/MagicSoft/Mars/mreflector/MRflEvtData.h
===================================================================
--- /trunk/MagicSoft/Mars/mreflector/MRflEvtData.h	(revision 2228)
+++ /trunk/MagicSoft/Mars/mreflector/MRflEvtData.h	(revision 2229)
@@ -30,4 +30,5 @@
 
     void Print(Option_t *o="") const;
+    void Paint(Option_t *o="");
 
     Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
