Index: trunk/MagicSoft/Mars/manalysis/AnalysisIncl.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/AnalysisIncl.h	(revision 588)
+++ trunk/MagicSoft/Mars/manalysis/AnalysisIncl.h	(revision 588)
@@ -0,0 +1,6 @@
+#ifndef __CINT__
+
+
+#include <TClonesArray.h>
+
+#endif // __CINT__
Index: trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h	(revision 588)
+++ trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h	(revision 588)
@@ -0,0 +1,11 @@
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class MNphotPix;
+#pragma link C++ class MNphotEvent; 
+
+
+#endif
Index: trunk/MagicSoft/Mars/manalysis/MNphotEvent.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MNphotEvent.cc	(revision 588)
+++ trunk/MagicSoft/Mars/manalysis/MNphotEvent.cc	(revision 588)
@@ -0,0 +1,107 @@
+#include "MNphotEvent.h"
+
+#include <math.h>
+#include <TClonesArray.h>
+#include <TCanvas.h>
+
+#include "MCamGeom.h"
+#include "MCamDisplay.h"
+#include "MHexagon.h"
+
+ClassImp(MNphotPix)
+ClassImp(MNphotEvent)
+
+MNphotPix::MNphotPix(Int_t pix, Float_t phot  , Float_t errphot ) 
+{ 
+  //  default constructor
+  fPixId    = pix ; 
+  fPhot     = phot ; 
+  fErrPhot  = errphot ; 
+} 
+
+void MNphotPix::SetPixelContent(Int_t pix, Float_t phot  , Float_t errphot)
+{
+  fPixId    = pix ; 
+  fPhot     = phot ; 
+  fErrPhot  = errphot ; 
+}
+
+void MNphotPix::Print() 
+{ 
+  //   information about a pixel
+  cout << "MNphotPix: Pixel: "<< fPixId 
+       << "  Nphot= " << fPhot
+       << "  Error(Nphot) = " << fErrPhot
+       << endl ; 
+}
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+MNphotEvent::MNphotEvent(Int_t type ) 
+{
+  fType = type ; 
+  fNbPixels = 0 ; 
+  
+  if (fType == 0 )  // this is MAGIC
+    {
+      fPixels = new TClonesArray ("MNphotPix", 577) ;
+    }
+  else if ( fType == 1 ) // this is CT1
+    {
+      fPixels = new TClonesArray ("MNphotPix", 127) ;
+    }
+
+  fPixels->Clear() ; 
+}
+
+void MNphotEvent::Draw(Option_t* option) 
+{
+  //
+  // 
+  
+  MCamDisplay disp(fType)  ; 
+
+  for (Int_t i=0; i<fNbPixels; i++)
+    {
+      disp.SetPixelColor( ((MNphotPix *) fPixels->At(i))->GetPixId(), 
+			  ((MNphotPix *) fPixels->At(i))->GetPhotons()) ; 
+    } 
+  disp.Draw() ; 
+
+}
+
+
+
+Int_t MNphotEvent::GetNbPixels() 
+{
+  return fNbPixels ; 
+} 
+
+void MNphotEvent::AddPixel(Int_t id, Float_t nph, Float_t err)
+{
+  TClonesArray &caP = *fPixels ;
+  new ( caP[fNbPixels++] ) MNphotPix( id, nph, err ) ;
+}
+
+void MNphotEvent::Clear() 
+{
+  fNbPixels = 0 ; 
+  fPixels->Clear() ; 
+}
+
+void MNphotEvent::Print() 
+{
+  cout << "MNphotEvent::Print()"  
+       << "Number of Pixels: " << fNbPixels
+       << "(" << fPixels->GetEntries() << ")" 
+       << endl ; 
+
+  for (Int_t il=0; il<fPixels->GetEntries(); il++ ) 
+    {
+      ((MNphotPix *) fPixels->At(il))->Print() ; 
+    }
+}
+  
Index: trunk/MagicSoft/Mars/manalysis/MNphotEvent.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MNphotEvent.h	(revision 588)
+++ trunk/MagicSoft/Mars/manalysis/MNphotEvent.h	(revision 588)
@@ -0,0 +1,75 @@
+#ifndef MNPHOTEVENT_H
+#define MNPHOTEVENT_H
+
+#include <iostream>
+#include <TROOT.h>
+class TClonesArray ; 
+class TObjArray ; 
+
+class MNphotPix : public TObject
+{
+ private:
+  
+  Int_t    fPixId     ;  //   the pixel Id
+  Float_t  fPhot      ;  //   The number of Cerenkov photons 
+  Float_t  fErrPhot   ;  //   the error of fPhot
+
+ public:
+  
+  MNphotPix(Int_t pix = -9999, Float_t phot=0. , Float_t errphot=0.) ; 
+
+  void Print() ; 
+  
+  Int_t GetPixId() 
+    {
+      return fPixId ; 
+    }
+  
+  Float_t GetPhotons()
+    {
+      return fPhot ; 
+    }
+  
+  Float_t GetErrorPhot()
+    {
+      return fErrPhot ; 
+    }
+  
+  void SetPixelContent(Int_t pix , Float_t phot , Float_t errphot ) ; 
+
+  ClassDef(MNphotPix, 1)  // Cerenkov Photons class for the pixel
+} ; 
+
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class MNphotEvent : public TObject
+{
+ private: 
+
+  Int_t            fType ;       // 
+  Int_t            fNbPixels ;   // 
+  TClonesArray     *fPixels   ;  //
+  
+ public:
+  
+  MNphotEvent( Int_t type=0 ) ; 
+
+  void Draw(Option_t* option) ; 
+
+  Int_t    GetNbPixels() ; 
+
+  void AddPixel(Int_t id, Float_t nph, Float_t err );
+
+  void Clear() ; 
+
+  void Print() ; 
+
+  ClassDef(MNphotEvent, 1)    // class for CeNphotons Events
+};
+
+#endif
+
+
Index: trunk/MagicSoft/Mars/manalysis/Makefile
===================================================================
--- trunk/MagicSoft/Mars/manalysis/Makefile	(revision 588)
+++ trunk/MagicSoft/Mars/manalysis/Makefile	(revision 588)
@@ -0,0 +1,50 @@
+##################################################################
+#
+#   makefile
+# 
+#   for the MARS software
+#
+##################################################################
+# @maintitle
+
+# @code
+
+#
+#  please change all system depend values in the 
+#  config.mk.${OSTYPE} file 
+#
+#
+include ../Makefile.conf.$(OSTYPE)
+include ../Makefile.conf.general
+
+# @endcode 
+
+INCLUDES = -I. -I../mbase -I../mgui
+
+# @code 
+
+CINT     = Analysis
+LIB      = manalysis.a
+
+#------------------------------------------------------------------------------
+
+.SUFFIXES: .c .cc .cxx .h .hxx .o 
+
+SRCFILES = MNphotEvent.cc
+
+SRCS    = $(SRCFILES)
+HEADERS = $(SRCFILES:.cc=.h)
+OBJS    = $(SRCFILES:.cc=.o) 
+
+############################################################
+
+all: $(LIB)
+
+include ../Makefile.rules
+
+clean:	rmlib rmcint rmobjs rmcore
+
+mrproper:	clean rmbak
+
+# @endcode
+
