Index: trunk/MagicSoft/Mars/mgui/GuiLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mgui/GuiLinkDef.h	(revision 669)
+++ trunk/MagicSoft/Mars/mgui/GuiLinkDef.h	(revision 695)
@@ -13,7 +13,10 @@
 
 #pragma link C++ class MHexagon;
+#pragma link C++ class MCamNeighbor;
+
 #pragma link C++ class MGeomPix;
 #pragma link C++ class MGeomCam;
-#pragma link C++ class MCamNeighbor;
+#pragma link C++ class MGeomCamCT1;
+#pragma link C++ class MGeomCamMagic;
 
 #pragma link C++ class MCamDisplay;
Index: trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MCamDisplay.cc	(revision 669)
+++ trunk/MagicSoft/Mars/mgui/MCamDisplay.cc	(revision 695)
@@ -18,14 +18,9 @@
 ClassImp(MCamDisplay)
 
-    MCamDisplay::MCamDisplay (Int_t type ) : fAutoScale(kTRUE)
+MCamDisplay::MCamDisplay (MGeomCam *geom) : fAutoScale(kTRUE)
 { 
     // default constructor
 
     //
-    // create a object which contains the camera geometry
-    //
-    MGeomCam geom(type) ;
-
-    //
     //    set the color palette
     //
@@ -35,11 +30,9 @@
     //  create the hexagons of the display
     //
-    fNbPixels = geom.GetNbPixels() ;
-    fPixels   = new TClonesArray("MHexagon", fNbPixels ) ;
-
-    for (Int_t i=0; i< fNbPixels; i++ )
-    {
-        (*fPixels)[i] = new MHexagon(geom[i]) ;
-    }
+    fNumPixels = geom->GetNumPixels() ;
+    fPixels    = new TClonesArray("MHexagon", fNumPixels ) ;
+
+    for (UInt_t i=0; i< fNumPixels; i++ )
+        (*fPixels)[i] = new MHexagon((*geom)[i]) ;
 
     //
@@ -98,5 +91,5 @@
     // draw all pixels of the camera
     //
-    for (Int_t i=0; i< fNbPixels; i++)
+    for (UInt_t i=0; i< fNumPixels; i++)
         (*this)[i].Draw();
 
@@ -149,6 +142,6 @@
     if ( fAutoScale )
     {
-        fMinPhe = event->GetMinNumPhotons() ;
-        fMaxPhe = event->GetMaxNumPhotons() ;
+        fMinPhe = event->GetNumPhotonsMin() ;
+        fMaxPhe = event->GetNumPhotonsMax() ;
 
         if (fMaxPhe < 20.)
@@ -161,5 +154,5 @@
     //   update the colors in the picture
     //
-    const Int_t entries = event->GetNbPixels();
+    const Int_t entries = event->GetNumPixels();
 
     for (Int_t i=0 ; i<entries; i++ )
@@ -190,5 +183,5 @@
     // determine the Pixel Id and the content
     //
-    const Int_t entries = event->GetNbPixels() ;
+    const Int_t entries = event->GetNumPixels() ;
 
     for (Int_t i=0 ; i<entries; i++ )
@@ -211,5 +204,5 @@
     // reset the all pixel colors to a default value
     //
-    for ( Int_t i=0 ; i< fNbPixels ; i++ )
+    for ( UInt_t i=0 ; i< fNumPixels ; i++ )
         (*this)[i].SetFillColor(10) ;
 } 
Index: trunk/MagicSoft/Mars/mgui/MCamDisplay.h
===================================================================
--- trunk/MagicSoft/Mars/mgui/MCamDisplay.h	(revision 669)
+++ trunk/MagicSoft/Mars/mgui/MCamDisplay.h	(revision 695)
@@ -18,22 +18,24 @@
 #endif
 
-class TClonesArray ;
-class MCerPhotEvt  ;
 class TBox;
 class TText;
+class TClonesArray ;
+
+class MCerPhotEvt  ;
+class MGeomCam;
 
 class MCamDisplay : public TObject
 {
  private: 
-  Bool_t        fAutoScale ;   //!  indicating the autoscale function
+  Bool_t         fAutoScale ;   //!  indicating the autoscale function
   
-  Int_t         fNbPixels ;    //!
-  TClonesArray  *fPixels   ;   //!
+  UInt_t         fNumPixels ;   //!
+  TClonesArray  *fPixels   ;    //!
 
-  Float_t       fMinPhe ;      //!  The minimal number of Phe
-  Float_t       fMaxPhe ;      //!  The maximum number of Phe
+  Float_t        fMinPhe ;      //!  The minimal number of Phe
+  Float_t        fMaxPhe ;      //!  The maximum number of Phe
 
-  TClonesArray  *fLegend  ;    //! 
-  TClonesArray  *fLegText ;    //! 
+  TClonesArray  *fLegend  ;     //!
+  TClonesArray  *fLegText ;     //!
 
   TBox *GetBox(Int_t i)   { return (TBox*) fLegend->At(i); }
@@ -47,5 +49,5 @@
  public:
   
-  MCamDisplay ( Int_t type=0 ) ; 
+  MCamDisplay (MGeomCam *geom);
 
   ~MCamDisplay () ; 
Index: trunk/MagicSoft/Mars/mgui/MGeomCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MGeomCam.cc	(revision 669)
+++ trunk/MagicSoft/Mars/mgui/MGeomCam.cc	(revision 695)
@@ -1,7 +1,3 @@
 #include "MGeomCam.h"
-
-
-#include <math.h>     // floor
-#include "TCanvas.h"
 
 #include "MLog.h"
@@ -10,354 +6,45 @@
 ClassImp(MGeomCam)
 
-MGeomCam::MGeomCam(Int_t type )
-{ 
-  //    default constructor
+MGeomCam::MGeomCam(UInt_t npix, const char *name, const char *title)
+{
+    *fName  = name  ? name  : "MGeomCam";
+    *fTitle = title ? title : "Storage container for  a camera geometry";
 
-  if ( type == 1 ) {
-    // set up the Geometry of CT1 
-    
-    fNbPixels = 127 ; 
-    fPixels = new TObjArray ( fNbPixels ) ; 
-    
-    CreateCT1() ; 
-  } 
-  else { 
-    // set up the standard Geometry MAGIC
-    fNbPixels = 577 ; 
-    fPixels = new TObjArray ( fNbPixels ) ; 
+    fNumPixels = npix;
+    fPixels    = new TObjArray(npix);
 
-    CreateMagic() ; 
-  } 
-} 
+    //
+    // make sure that the destructor delete all contained objects
+    //
+    fPixels->SetOwner();
+
+    for (UInt_t i=0; i<npix; i++)
+        (*fPixels)[i] = new MGeomPix;
+}
 
 void MGeomCam::Draw( Option_t * )
-{ 
-  TCanvas *can = new TCanvas("can", "Camera Geometry", 4 ) ; 
-  
-  //   set the range of the canvas
-  if ( fNbPixels == 127 )        // case of CT1
-    can->Range(-175, -175, 175, 175 ) ; 
-  else
-    can->Range(-600, -600, 600, 600 ) ; 
-
-  //   draw all pixels
-  
-  for ( Int_t i=0; i < fNbPixels ; i++ ) {
-      MHexagon *el = new MHexagon ( (*this)[i] )    ;
-
-      el->Draw() ;
-  } 
-  
-} 
-
-void MGeomCam::Print(Option_t *)
-{ 
-  //   Print Information about the Geometry of the camera
-  gLog << " Number of Pixels: " << fNbPixels << endl ;
-
-  for ( Int_t i=0; i<fNbPixels; i++ ) { 
-    gLog << " Pixel: " << i << "  " ;
-    (*this)[i].Print() ;
-  } 
-} 
-
-Int_t MGeomCam::GetNbPixels ()
-{ 
-  //   return the Number of pixels in the MCamGeom class
-  return fNbPixels ; 
-
-} 
-
-
-void MGeomCam::CreateMagic()
-{ 
-  //   fill the geometry class with the coordinates of the MAGIC camera
-  gLog << " Create Magic geometry " << endl ;
-
-  //   here define the hardwire things of the magic telescope
-  //
-  Float_t xtemp[577] = { 
-    0.000,   30.000,   15.000,  -15.000,  -30.000,  -15.000,   15.000,   60.000,
-   45.000,   30.000,    0.000,  -30.000,  -45.000,  -60.000,  -45.000,  -30.000,
-    0.000,   30.000,   45.000,   90.000,   75.000,   60.000,   45.000,   15.000,
-  -15.000,  -45.000,  -60.000,  -75.000,  -90.000,  -75.000,  -60.000,  -45.000,
-  -15.000,   15.000,   45.000,   60.000,   75.000,  120.000,  105.000,   90.000,
-   75.000,   60.000,   30.000,    0.000,  -30.000,  -60.000,  -75.000,  -90.000,
- -105.000, -120.000, -105.000,  -90.000,  -75.000,  -60.000,  -30.000,    0.000,
-   30.000,   60.000,   75.000,   90.000,  105.000,  150.000,  135.000,  120.000,
-  105.000,   90.000,   75.000,   45.000,   15.000,  -15.000,  -45.000,  -75.000,
-  -90.000, -105.000, -120.000, -135.000, -150.000, -135.000, -120.000, -105.000,
-  -90.000,  -75.000,  -45.000,  -15.000,   15.000,   45.000,   75.000,   90.000,
-  105.000,  120.000,  135.000,  180.000,  165.000,  150.000,  135.000,  120.000,
-  105.000,   90.000,   60.000,   30.000,    0.000,  -30.000,  -60.000,  -90.000,
- -105.000, -120.000, -135.000, -150.000, -165.000, -180.000, -165.000, -150.000,
- -135.000, -120.000, -105.000,  -90.000,  -60.000,  -30.000,    0.000,   30.000,
-   60.000,   90.000,  105.000,  120.000,  135.000,  150.000,  165.000,  210.000,
-  195.000,  180.000,  165.000,  150.000,  135.000,  120.000,  105.000,   75.000,
-   45.000,   15.000,  -15.000,  -45.000,  -75.000, -105.000, -120.000, -135.000,
- -150.000, -165.000, -180.000, -195.000, -210.000, -195.000, -180.000, -165.000,
- -150.000, -135.000, -120.000, -105.000,  -75.000,  -45.000,  -15.000,   15.000,
-   45.000,   75.000,  105.000,  120.000,  135.000,  150.000,  165.000,  180.000,
-  195.000,  240.000,  225.000,  210.000,  195.000,  180.000,  165.000,  150.000,
-  135.000,  120.000,   90.000,   60.000,   30.000,    0.000,  -30.000,  -60.000,
-  -90.000, -120.000, -135.000, -150.000, -165.000, -180.000, -195.000, -210.000,
- -225.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000,
- -135.000, -120.000,  -90.000,  -60.000,  -30.000,    0.000,   30.000,   60.000,
-   90.000,  120.000,  135.000,  150.000,  165.000,  180.000,  195.000,  210.000,
-  225.000,  270.000,  255.000,  240.000,  225.000,  210.000,  195.000,  180.000,
-  165.000,  150.000,  135.000,  105.000,   75.000,   45.000,   15.000,  -15.000,
-  -45.000,  -75.000, -105.000, -135.000, -150.000, -165.000, -180.000, -195.000,
- -210.000, -225.000, -240.000, -255.000, -270.000, -255.000, -240.000, -225.000,
- -210.000, -195.000, -180.000, -165.000, -150.000, -135.000, -105.000,  -75.000,
-  -45.000,  -15.000,   15.000,   45.000,   75.000,  105.000,  135.000,  150.000,
-  165.000,  180.000,  195.000,  210.000,  225.000,  240.000,  255.000,  300.000,
-  285.000,  270.000,  255.000,  240.000,  225.000,  210.000,  195.000,  180.000,
-  165.000,  150.000,  120.000,   90.000,   60.000,   30.000,    0.000,  -30.000,
-  -60.000,  -90.000, -120.000, -150.000, -165.000, -180.000, -195.000, -210.000,
- -225.000, -240.000, -255.000, -270.000, -285.000, -300.000, -285.000, -270.000,
- -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000,
- -120.000,  -90.000,  -60.000,  -30.000,    0.000,   30.000,   60.000,   90.000,
-  120.000,  150.000,  165.000,  180.000,  195.000,  210.000,  225.000,  240.000,
-  255.000,  270.000,  285.000,  330.000,  315.000,  300.000,  285.000,  270.000,
-  255.000,  240.000,  225.000,  210.000,  195.000,  180.000,  165.000,  135.000,
-  105.000,   75.000,   45.000,   15.000,  -15.000,  -45.000,  -75.000, -105.000,
- -135.000, -165.000, -180.000, -195.000, -210.000, -225.000, -240.000, -255.000,
- -270.000, -285.000, -300.000, -315.000, -330.000, -315.000, -300.000, -285.000,
- -270.000, -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000,
- -135.000, -105.000,  -75.000,  -45.000,  -15.000,   15.000,   45.000,   75.000,
-  105.000,  135.000,  165.000,  180.000,  195.000,  210.000,  225.000,  240.000,
-  255.000,  270.000,  285.000,  300.000,  315.000,  360.000,  330.000,  300.000,
-  270.000,  240.000,  210.000,  150.000,   90.000,   30.000,  -30.000,  -90.000,
- -150.000, -210.000, -240.000, -270.000, -300.000, -330.000, -360.000, -360.000,
- -330.000, -300.000, -270.000, -240.000, -210.000, -150.000,  -90.000,  -30.000,
-   30.000,   90.000,  150.000,  210.000,  240.000,  270.000,  300.000,  330.000,
-  360.000,  420.000,  390.000,  360.000,  330.000,  300.000,  270.000,  240.000,
-  180.000,  120.000,   60.000,    0.000,  -60.000, -120.000, -180.000, -240.000,
- -270.000, -300.000, -330.000, -360.000, -390.000, -420.000, -420.000, -390.000,
- -360.000, -330.000, -300.000, -270.000, -240.000, -180.000, -120.000,  -60.000,
-    0.000,   60.000,  120.000,  180.000,  240.000,  270.000,  300.000,  330.000,
-  360.000,  390.000,  420.000,  480.000,  450.000,  420.000,  390.000,  360.000,
-  330.000,  300.000,  270.000,  210.000,  150.000,   90.000,   30.000,  -30.000,
-  -90.000, -150.000, -210.000, -270.000, -300.000, -330.000, -360.000, -390.000,
- -420.000, -450.000, -480.000, -480.000, -450.000, -420.000, -390.000, -360.000,
- -330.000, -300.000, -270.000, -210.000, -150.000,  -90.000,  -30.000,   30.000,
-   90.000,  150.000,  210.000,  270.000,  300.000,  330.000,  360.000,  390.000,
-  420.000,  450.000,  480.000,  540.000,  510.000,  480.000,  450.000,  420.000,
-  390.000,  360.000,  330.000,  300.000,  240.000,  180.000,  120.000,   60.000,
-    0.000,  -60.000, -120.000, -180.000, -240.000, -300.000, -330.000, -360.000,
- -390.000, -420.000, -450.000, -480.000, -510.000, -540.000, -540.000, -510.000,
- -480.000, -450.000, -420.000, -390.000, -360.000, -330.000, -300.000, -240.000,
- -180.000, -120.000,  -60.000,    0.000,   60.000,  120.000,  180.000,  240.000,
-  300.000,  330.000,  360.000,  390.000,  420.000,  450.000,  480.000,  510.000,
-  540.000 
-  } ; 
-
-  Float_t ytemp[577] = { 
-    0.000,    0.000,   25.981,   25.981,    0.000,  -25.981,  -25.981,    0.000,
-   25.981,   51.961,   51.961,   51.961,   25.981,    0.000,  -25.981,  -51.961,
-  -51.961,  -51.961,  -25.981,    0.000,   25.981,   51.961,   77.942,   77.942,
-   77.942,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
-  -77.942,  -77.942,  -77.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,
-   77.942,  103.923,  103.923,  103.923,  103.923,  103.923,   77.942,   51.961,
-   25.981,    0.000,  -25.981,  -51.961,  -77.942, -103.923, -103.923, -103.923,
- -103.923, -103.923,  -77.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,
-   77.942,  103.923,  129.904,  129.904,  129.904,  129.904,  129.904,  129.904,
-  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
- -103.923, -129.904, -129.904, -129.904, -129.904, -129.904, -129.904, -103.923,
-  -77.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,   77.942,  103.923,
-  129.904,  155.885,  155.885,  155.885,  155.885,  155.885,  155.885,  155.885,
-  129.904,  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,
-  -77.942, -103.923, -129.904, -155.885, -155.885, -155.885, -155.885, -155.885,
- -155.885, -155.885, -129.904, -103.923,  -77.942,  -51.961,  -25.981,    0.000,
-   25.981,   51.961,   77.942,  103.923,  129.904,  155.885,  181.865,  181.865,
-  181.865,  181.865,  181.865,  181.865,  181.865,  181.865,  155.885,  129.904,
-  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
- -103.923, -129.904, -155.885, -181.865, -181.865, -181.865, -181.865, -181.865,
- -181.865, -181.865, -181.865, -155.885, -129.904, -103.923,  -77.942,  -51.961,
-  -25.981,    0.000,   25.981,   51.961,   77.942,  103.923,  129.904,  155.885,
-  181.865,  207.846,  207.846,  207.846,  207.846,  207.846,  207.846,  207.846,
-  207.846,  207.846,  181.865,  155.885,  129.904,  103.923,   77.942,   51.961,
-   25.981,    0.000,  -25.981,  -51.961,  -77.942, -103.923, -129.904, -155.885,
- -181.865, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846,
- -207.846, -207.846, -181.865, -155.885, -129.904, -103.923,  -77.942,  -51.961,
-  -25.981,    0.000,   25.981,   51.961,   77.942,  103.923,  129.904,  155.885,
-  181.865,  207.846,  233.827,  233.827,  233.827,  233.827,  233.827,  233.827,
-  233.827,  233.827,  233.827,  233.827,  207.846,  181.865,  155.885,  129.904,
-  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
- -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -233.827, -233.827,
- -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -207.846,
- -181.865, -155.885, -129.904, -103.923,  -77.942,  -51.961,  -25.981,    0.000,
-   25.981,   51.961,   77.942,  103.923,  129.904,  155.885,  181.865,  207.846,
-  233.827,  259.808,  259.808,  259.808,  259.808,  259.808,  259.808,  259.808,
-  259.808,  259.808,  259.808,  259.808,  233.827,  207.846,  181.865,  155.885,
-  129.904,  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,
-  -77.942, -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808,
- -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808,
- -259.808, -259.808, -233.827, -207.846, -181.865, -155.885, -129.904, -103.923,
-  -77.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,   77.942,  103.923,
-  129.904,  155.885,  181.865,  207.846,  233.827,  259.808,  285.788,  285.788,
-  285.788,  285.788,  285.788,  285.788,  285.788,  285.788,  285.788,  285.788,
-  285.788,  285.788,  259.808,  233.827,  207.846,  181.865,  155.885,  129.904,
-  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
- -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808, -285.788,
- -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788,
- -285.788, -285.788, -285.788, -259.808, -233.827, -207.846, -181.865, -155.885,
- -129.904, -103.923,  -77.942,  -51.961,  -25.981,   34.641,   86.603,  138.564,
-  190.526,  242.487,  294.449,  329.090,  329.090,  329.090,  329.090,  329.090,
-  329.090,  294.449,  242.487,  190.526,  138.564,   86.603,   34.641,  -34.641,
-  -86.603, -138.564, -190.526, -242.487, -294.449, -329.090, -329.090, -329.090,
- -329.090, -329.090, -329.090, -294.449, -242.487, -190.526, -138.564,  -86.603,
-  -34.641,   34.641,   86.603,  138.564,  190.526,  242.487,  294.449,  346.410,
-  381.051,  381.051,  381.051,  381.051,  381.051,  381.051,  381.051,  346.410,
-  294.449,  242.487,  190.526,  138.564,   86.603,   34.641,  -34.641,  -86.603,
- -138.564, -190.526, -242.487, -294.449, -346.410, -381.051, -381.051, -381.051,
- -381.051, -381.051, -381.051, -381.051, -346.410, -294.449, -242.487, -190.526,
- -138.564,  -86.603,  -34.641,   34.641,   86.603,  138.564,  190.526,  242.487,
-  294.449,  346.410,  398.372,  433.013,  433.013,  433.013,  433.013,  433.013,
-  433.013,  433.013,  433.013,  398.372,  346.410,  294.449,  242.487,  190.526,
-  138.564,   86.603,   34.641,  -34.641,  -86.603, -138.564, -190.526, -242.487,
- -294.449, -346.410, -398.372, -433.013, -433.013, -433.013, -433.013, -433.013,
- -433.013, -433.013, -433.013, -398.372, -346.410, -294.449, -242.487, -190.526,
- -138.564,  -86.603,  -34.641,   34.641,   86.603,  138.564,  190.526,  242.487,
-  294.449,  346.410,  398.372,  450.333,  484.974,  484.974,  484.974,  484.974,
-  484.974,  484.974,  484.974,  484.974,  484.974,  450.333,  398.372,  346.410,
-  294.449,  242.487,  190.526,  138.564,   86.603,   34.641,  -34.641,  -86.603,
- -138.564, -190.526, -242.487, -294.449, -346.410, -398.372, -450.333, -484.974,
- -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974,
- -450.333, -398.372, -346.410, -294.449, -242.487, -190.526, -138.564,  -86.603,
- -34.641
-  } ; 
-
-  Float_t rtemp[577] = { 
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
-    30.00,30.00,30.00,30.00,30.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
-    60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,  
-    60.00  } ; 
-  
-  //   fill the pixels list with this data
-  
-  for ( Int_t i = 0 ; i< fNbPixels ; i++ ) {     
-    fPixels->Add( new MGeomPix(xtemp[i], ytemp[i], rtemp[i]) ) ;
-  }   
-} 
-
-void MGeomCam::CreateCT1()
 {
     //
-    // fill the geometry class with the coordinates of the CT1 camera
+    // Draw the Camera
     //
-    gLog << " Create CT1 geometry " << endl ;
-
-    //
-    // this algorithm is from Martin Kestel originally
-    // it was punt into a root/C++ context by Harald Kornmayer and Thomas Bretz
-   
-    const Float_t pixdiameter = 21 ;    // units are cm
-
-    //
-    //  add the first pixel to the list
-    //
-    fPixels->Add( new MGeomPix( 0, 0, pixdiameter ) ) ;
-
-    const Float_t kS32  = sqrt(3)/2;
-    const Float_t kPI23 = kPI*2/3;
-
-    for (Int_t ringcounter=1; ringcounter<7; ringcounter++) {
-        //
-        // calc. numofpix in ring number i first
-        //
-        const Int_t numpixthisring = ringcounter*6;
-
-        //
-        // calc. coords for this ring counting from the
-        // starting number to the ending number
-        //
-        for (Int_t ipix = 0; ipix < numpixthisring; ipix++) {
-
-            Float_t ang     = 60.0/ringcounter * ipix;
-            Float_t fracang = ang - 60*(int)floor(ang/60);
-
-            ang     /= kRad2Deg;
-            fracang /= kRad2Deg;
-
-            Float_t rad  = pixdiameter * ringcounter;
-                    rad *= sin(kPI23-fracang) * kS32;
-
-            //   fill the ObjArray with the pixels data ;
-
-            fPixels->Add( new MGeomPix(rad * cos(ang),
-                                       rad * sin(ang),
-                                       pixdiameter ) ) ;
-        }
+    for (UInt_t i=0; i<fNumPixels; i++)
+    {
+        MHexagon *el = new MHexagon((*this)[i]);
+        el->Draw();
     }
 }
 
+void MGeomCam::Print(Option_t *)
+{
+    //
+    //   Print Information about the Geometry of the camera
+    //
+    *fLog << " Number of Pixels: " << fNumPixels << endl ;
+
+    for (UInt_t i=0; i<fNumPixels; i++ )
+    {
+        *fLog << " Pixel: " << i << "  ";
+        (*this)[i].Print() ;
+    }
+} 
+
Index: trunk/MagicSoft/Mars/mgui/MGeomCam.h
===================================================================
--- trunk/MagicSoft/Mars/mgui/MGeomCam.h	(revision 669)
+++ trunk/MagicSoft/Mars/mgui/MGeomCam.h	(revision 695)
@@ -8,31 +8,32 @@
 #include <TObjArray.h>
 #endif
+#ifndef MPARCONTAINER_H
+#include "MParContainer.h"
+#endif
 #ifndef MGEOMPIX_H
 #include "MGeomPix.h"
 #endif
 
-class MGeomCam
+class MGeomCam : public MParContainer
 {
 private:
-    Int_t          fNbPixels ;  //!
-    TObjArray     *fPixels   ;  //!
-  
-    void CreateMagic() ;
-    void CreateCT1() ;
+    UInt_t     fNumPixels;  // Number of pixels in this camera
+    TObjArray *fPixels;     // Array of singel pixels storing the geometry
 
 public:
 
-    MGeomCam( Int_t type=0 ) ;
+    MGeomCam(UInt_t npix, const char *name=NULL, const char *title=NULL);
+
     virtual ~MGeomCam() { delete fPixels; }
 
-    void Draw(Option_t *option = "" ) ;
+    virtual void Draw(Option_t *option = "" );
 
-    Int_t    GetNbPixels() ;
+    UInt_t GetNumPixels() const { return fNumPixels; }
 
     MGeomPix &operator[](Int_t i) { return *(MGeomPix*)fPixels->At(i); }
 
-    void Print(Option_t *opt=NULL) ;
+    virtual void Print(Option_t *opt=NULL);
 
-    ClassDef(MGeomCam, 1)		// Geometry class for the camera
+    ClassDef(MGeomCam, 1)		// Geometry base class for the camera
 };
 
Index: trunk/MagicSoft/Mars/mgui/MGeomCamCT1.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MGeomCamCT1.cc	(revision 695)
+++ trunk/MagicSoft/Mars/mgui/MGeomCamCT1.cc	(revision 695)
@@ -0,0 +1,81 @@
+#include "MGeomCamCT1.h"
+
+
+#include <math.h>     // floor
+#include "TCanvas.h"
+
+#include "MLog.h"
+
+ClassImp(MGeomCamCT1)
+
+MGeomCamCT1::MGeomCamCT1(const char *name) : MGeomCam(127, name, "Geometry information of CT1 camera")
+{
+    CreateCam();
+} 
+
+void MGeomCamCT1::Draw( Option_t * )
+{ 
+    TCanvas *can = new TCanvas("can", "Camera Geometry", 4 ) ;
+
+    can->Range(-175, -175, 175, 175 ) ;
+
+    MGeomCam::Draw();
+} 
+
+void MGeomCamCT1::CreateCam()
+{
+    //
+    // fill the geometry class with the coordinates of the CT1 camera
+    //
+    *fLog << " Create CT1 geometry " << endl;
+
+    //
+    // this algorithm is from Martin Kestel originally
+    // it was punt into a root/C++ context by Harald Kornmayer and Thomas Bretz
+   
+    const Float_t pixdiameter = 21 ;    // units are cm
+
+    //
+    //  add the first pixel to the list
+    //
+    (*this)[0].Set(0, 0, pixdiameter);
+    //fPixels->Add( new MGeomPix( ) ;
+
+    const Float_t kS32  = sqrt(3)/2;
+    const Float_t kPI23 = kPI*2/3;
+
+    Int_t pixnum = 1;
+
+    for (Int_t ringcounter=1; ringcounter<7; ringcounter++) {
+        //
+        // calc. numofpix in ring number i first
+        //
+        const Int_t numpixthisring = ringcounter*6;
+
+        //
+        // calc. coords for this ring counting from the
+        // starting number to the ending number
+        //
+        for (Int_t ipix = 0; ipix < numpixthisring; ipix++) {
+
+            Float_t ang     = 60.0/ringcounter * ipix;
+            Float_t fracang = ang - 60*(int)floor(ang/60);
+
+            ang     /= kRad2Deg;
+            fracang /= kRad2Deg;
+
+            Float_t rad  = pixdiameter * ringcounter;
+                    rad *= sin(kPI23-fracang) * kS32;
+
+            //
+            //   fill the Data into the array
+            //
+
+            (*this)[pixnum++].Set(rad * cos(ang),
+                                  rad * sin(ang),
+                                  pixdiameter);
+            // fPixels->Add( new MGeomPix( ) ;
+        }
+    }
+}
+
Index: trunk/MagicSoft/Mars/mgui/MGeomCamCT1.h
===================================================================
--- trunk/MagicSoft/Mars/mgui/MGeomCamCT1.h	(revision 695)
+++ trunk/MagicSoft/Mars/mgui/MGeomCamCT1.h	(revision 695)
@@ -0,0 +1,27 @@
+#ifndef MGEOMCAMCT1_H
+#define MGEOMCAMCT1_H
+
+#ifndef MAGIC_H
+#include "MAGIC.h"
+#endif
+#ifndef MGEOMCAM_H
+#include "MGeomCam.h"
+#endif
+
+class MGeomCamCT1 : public MGeomCam
+{
+private:
+
+    void CreateCam();
+
+public:
+
+    MGeomCamCT1(const char *name=NULL);
+
+    void Draw(Option_t *option = "" ) ;
+
+    ClassDef(MGeomCamCT1, 1)		// Geometry class for the camera
+};
+
+#endif
+
Index: trunk/MagicSoft/Mars/mgui/MGeomCamMagic.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MGeomCamMagic.cc	(revision 695)
+++ trunk/MagicSoft/Mars/mgui/MGeomCamMagic.cc	(revision 695)
@@ -0,0 +1,270 @@
+#include "MGeomCamMagic.h"
+
+#include "TCanvas.h"
+
+#include "MLog.h"
+
+ClassImp(MGeomCamMagic)
+
+MGeomCamMagic::MGeomCamMagic(const char *name) : MGeomCam(577, name, "Geometry information of Magic Camera")
+{
+    CreateCam();
+}
+
+void MGeomCamMagic::Draw(Option_t *)
+{ 
+    TCanvas *can = new TCanvas("can", "Camera Geometry", 4 ) ;
+
+    can->Range(-600, -600, 600, 600 ) ;
+
+    MGeomCam::Draw();
+}
+
+void MGeomCamMagic::CreateCam()
+{
+    //
+    //   fill the geometry class with the coordinates of the MAGIC camera
+    //
+    *fLog << " Creating Magic geometry " << endl ;
+
+    //
+    //   here define the hardwire things of the magic telescope
+    //
+    const Float_t xtemp[577] = {
+        +000.000,   30.000,   15.000,  -15.000,  -30.000,  -15.000,   15.000,   60.000,
+        +045.000,   30.000,    0.000,  -30.000,  -45.000,  -60.000,  -45.000,  -30.000,
+        +000.000,   30.000,   45.000,   90.000,   75.000,   60.000,   45.000,   15.000,
+        -015.000,  -45.000,  -60.000,  -75.000,  -90.000,  -75.000,  -60.000,  -45.000,
+        -015.000,   15.000,   45.000,   60.000,   75.000,  120.000,  105.000,   90.000,
+        +075.000,   60.000,   30.000,    0.000,  -30.000,  -60.000,  -75.000,  -90.000,
+        -105.000, -120.000, -105.000,  -90.000,  -75.000,  -60.000,  -30.000,    0.000,
+        +030.000,   60.000,   75.000,   90.000,  105.000,  150.000,  135.000,  120.000,
+        +105.000,   90.000,   75.000,   45.000,   15.000,  -15.000,  -45.000,  -75.000,
+        -090.000, -105.000, -120.000, -135.000, -150.000, -135.000, -120.000, -105.000,
+        -090.000,  -75.000,  -45.000,  -15.000,   15.000,   45.000,   75.000,   90.000,
+        +105.000,  120.000,  135.000,  180.000,  165.000,  150.000,  135.000,  120.000,
+        +105.000,   90.000,   60.000,   30.000,    0.000,  -30.000,  -60.000,  -90.000,
+        -105.000, -120.000, -135.000, -150.000, -165.000, -180.000, -165.000, -150.000,
+        -135.000, -120.000, -105.000,  -90.000,  -60.000,  -30.000,    0.000,   30.000,
+        +060.000,   90.000,  105.000,  120.000,  135.000,  150.000,  165.000,  210.000,
+        +195.000,  180.000,  165.000,  150.000,  135.000,  120.000,  105.000,   75.000,
+        +045.000,   15.000,  -15.000,  -45.000,  -75.000, -105.000, -120.000, -135.000,
+        -150.000, -165.000, -180.000, -195.000, -210.000, -195.000, -180.000, -165.000,
+        -150.000, -135.000, -120.000, -105.000,  -75.000,  -45.000,  -15.000,   15.000,
+        +045.000,   75.000,  105.000,  120.000,  135.000,  150.000,  165.000,  180.000,
+        +195.000,  240.000,  225.000,  210.000,  195.000,  180.000,  165.000,  150.000,
+        +135.000,  120.000,   90.000,   60.000,   30.000,    0.000,  -30.000,  -60.000,
+        -090.000, -120.000, -135.000, -150.000, -165.000, -180.000, -195.000, -210.000,
+        -225.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000,
+        -135.000, -120.000,  -90.000,  -60.000,  -30.000,    0.000,   30.000,   60.000,
+        +090.000,  120.000,  135.000,  150.000,  165.000,  180.000,  195.000,  210.000,
+        +225.000,  270.000,  255.000,  240.000,  225.000,  210.000,  195.000,  180.000,
+        +165.000,  150.000,  135.000,  105.000,   75.000,   45.000,   15.000,  -15.000,
+        -045.000,  -75.000, -105.000, -135.000, -150.000, -165.000, -180.000, -195.000,
+        -210.000, -225.000, -240.000, -255.000, -270.000, -255.000, -240.000, -225.000,
+        -210.000, -195.000, -180.000, -165.000, -150.000, -135.000, -105.000,  -75.000,
+        -045.000,  -15.000,   15.000,   45.000,   75.000,  105.000,  135.000,  150.000,
+        +165.000,  180.000,  195.000,  210.000,  225.000,  240.000,  255.000,  300.000,
+        +285.000,  270.000,  255.000,  240.000,  225.000,  210.000,  195.000,  180.000,
+        +165.000,  150.000,  120.000,   90.000,   60.000,   30.000,    0.000,  -30.000,
+        -060.000,  -90.000, -120.000, -150.000, -165.000, -180.000, -195.000, -210.000,
+        -225.000, -240.000, -255.000, -270.000, -285.000, -300.000, -285.000, -270.000,
+        -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000,
+        -120.000,  -90.000,  -60.000,  -30.000,    0.000,   30.000,   60.000,   90.000,
+        +120.000,  150.000,  165.000,  180.000,  195.000,  210.000,  225.000,  240.000,
+        +255.000,  270.000,  285.000,  330.000,  315.000,  300.000,  285.000,  270.000,
+        +255.000,  240.000,  225.000,  210.000,  195.000,  180.000,  165.000,  135.000,
+        +105.000,   75.000,   45.000,   15.000,  -15.000,  -45.000,  -75.000, -105.000,
+        -135.000, -165.000, -180.000, -195.000, -210.000, -225.000, -240.000, -255.000,
+        -270.000, -285.000, -300.000, -315.000, -330.000, -315.000, -300.000, -285.000,
+        -270.000, -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000,
+        -135.000, -105.000,  -75.000,  -45.000,  -15.000,   15.000,   45.000,   75.000,
+        +105.000,  135.000,  165.000,  180.000,  195.000,  210.000,  225.000,  240.000,
+        +255.000,  270.000,  285.000,  300.000,  315.000,  360.000,  330.000,  300.000,
+        +270.000,  240.000,  210.000,  150.000,   90.000,   30.000,  -30.000,  -90.000,
+        -150.000, -210.000, -240.000, -270.000, -300.000, -330.000, -360.000, -360.000,
+        -330.000, -300.000, -270.000, -240.000, -210.000, -150.000,  -90.000,  -30.000,
+        +030.000,   90.000,  150.000,  210.000,  240.000,  270.000,  300.000,  330.000,
+        +360.000,  420.000,  390.000,  360.000,  330.000,  300.000,  270.000,  240.000,
+        +180.000,  120.000,   60.000,    0.000,  -60.000, -120.000, -180.000, -240.000,
+        -270.000, -300.000, -330.000, -360.000, -390.000, -420.000, -420.000, -390.000,
+        -360.000, -330.000, -300.000, -270.000, -240.000, -180.000, -120.000,  -60.000,
+        +000.000,   60.000,  120.000,  180.000,  240.000,  270.000,  300.000,  330.000,
+        +360.000,  390.000,  420.000,  480.000,  450.000,  420.000,  390.000,  360.000,
+        +330.000,  300.000,  270.000,  210.000,  150.000,   90.000,   30.000,  -30.000,
+        -090.000, -150.000, -210.000, -270.000, -300.000, -330.000, -360.000, -390.000,
+        -420.000, -450.000, -480.000, -480.000, -450.000, -420.000, -390.000, -360.000,
+        -330.000, -300.000, -270.000, -210.000, -150.000,  -90.000,  -30.000,   30.000,
+        +090.000,  150.000,  210.000,  270.000,  300.000,  330.000,  360.000,  390.000,
+        +420.000,  450.000,  480.000,  540.000,  510.000,  480.000,  450.000,  420.000,
+        +390.000,  360.000,  330.000,  300.000,  240.000,  180.000,  120.000,   60.000,
+        +000.000,  -60.000, -120.000, -180.000, -240.000, -300.000, -330.000, -360.000,
+        -390.000, -420.000, -450.000, -480.000, -510.000, -540.000, -540.000, -510.000,
+        -480.000, -450.000, -420.000, -390.000, -360.000, -330.000, -300.000, -240.000,
+        -180.000, -120.000,  -60.000,    0.000,   60.000,  120.000,  180.000,  240.000,
+        +300.000,  330.000,  360.000,  390.000,  420.000,  450.000,  480.000,  510.000,
+        +540.000
+    };
+
+    const Float_t ytemp[577] = {
+        +000.000,    0.000,   25.981,   25.981,    0.000,  -25.981,  -25.981,    0.000,
+        +025.981,   51.961,   51.961,   51.961,   25.981,    0.000,  -25.981,  -51.961,
+        -051.961,  -51.961,  -25.981,    0.000,   25.981,   51.961,   77.942,   77.942,
+        +077.942,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
+        -077.942,  -77.942,  -77.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,
+        +077.942,  103.923,  103.923,  103.923,  103.923,  103.923,   77.942,   51.961,
+        +025.981,    0.000,  -25.981,  -51.961,  -77.942, -103.923, -103.923, -103.923,
+        -103.923, -103.923,  -77.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,
+        +077.942,  103.923,  129.904,  129.904,  129.904,  129.904,  129.904,  129.904,
+        +103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
+        -103.923, -129.904, -129.904, -129.904, -129.904, -129.904, -129.904, -103.923,
+        -077.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,   77.942,  103.923,
+        +129.904,  155.885,  155.885,  155.885,  155.885,  155.885,  155.885,  155.885,
+        +129.904,  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,
+        -077.942, -103.923, -129.904, -155.885, -155.885, -155.885, -155.885, -155.885,
+        -155.885, -155.885, -129.904, -103.923,  -77.942,  -51.961,  -25.981,    0.000,
+        +025.981,   51.961,   77.942,  103.923,  129.904,  155.885,  181.865,  181.865,
+        +181.865,  181.865,  181.865,  181.865,  181.865,  181.865,  155.885,  129.904,
+        +103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
+        -103.923, -129.904, -155.885, -181.865, -181.865, -181.865, -181.865, -181.865,
+        -181.865, -181.865, -181.865, -155.885, -129.904, -103.923,  -77.942,  -51.961,
+        -025.981,    0.000,   25.981,   51.961,   77.942,  103.923,  129.904,  155.885,
+        +181.865,  207.846,  207.846,  207.846,  207.846,  207.846,  207.846,  207.846,
+        +207.846,  207.846,  181.865,  155.885,  129.904,  103.923,   77.942,   51.961,
+        +025.981,    0.000,  -25.981,  -51.961,  -77.942, -103.923, -129.904, -155.885,
+        -181.865, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846,
+        -207.846, -207.846, -181.865, -155.885, -129.904, -103.923,  -77.942,  -51.961,
+        -025.981,    0.000,   25.981,   51.961,   77.942,  103.923,  129.904,  155.885,
+        +181.865,  207.846,  233.827,  233.827,  233.827,  233.827,  233.827,  233.827,
+        +233.827,  233.827,  233.827,  233.827,  207.846,  181.865,  155.885,  129.904,
+        +103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
+        -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -233.827, -233.827,
+        -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -207.846,
+        -181.865, -155.885, -129.904, -103.923,  -77.942,  -51.961,  -25.981,    0.000,
+        +025.981,   51.961,   77.942,  103.923,  129.904,  155.885,  181.865,  207.846,
+        +233.827,  259.808,  259.808,  259.808,  259.808,  259.808,  259.808,  259.808,
+        +259.808,  259.808,  259.808,  259.808,  233.827,  207.846,  181.865,  155.885,
+        +129.904,  103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,
+        -077.942, -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808,
+        -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808,
+        -259.808, -259.808, -233.827, -207.846, -181.865, -155.885, -129.904, -103.923,
+        -077.942,  -51.961,  -25.981,    0.000,   25.981,   51.961,   77.942,  103.923,
+        +129.904,  155.885,  181.865,  207.846,  233.827,  259.808,  285.788,  285.788,
+        +285.788,  285.788,  285.788,  285.788,  285.788,  285.788,  285.788,  285.788,
+        +285.788,  285.788,  259.808,  233.827,  207.846,  181.865,  155.885,  129.904,
+        +103.923,   77.942,   51.961,   25.981,    0.000,  -25.981,  -51.961,  -77.942,
+        -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808, -285.788,
+        -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788,
+        -285.788, -285.788, -285.788, -259.808, -233.827, -207.846, -181.865, -155.885,
+        -129.904, -103.923,  -77.942,  -51.961,  -25.981,   34.641,   86.603,  138.564,
+        +190.526,  242.487,  294.449,  329.090,  329.090,  329.090,  329.090,  329.090,
+        +329.090,  294.449,  242.487,  190.526,  138.564,   86.603,   34.641,  -34.641,
+        -086.603, -138.564, -190.526, -242.487, -294.449, -329.090, -329.090, -329.090,
+        -329.090, -329.090, -329.090, -294.449, -242.487, -190.526, -138.564,  -86.603,
+        -034.641,   34.641,   86.603,  138.564,  190.526,  242.487,  294.449,  346.410,
+        +381.051,  381.051,  381.051,  381.051,  381.051,  381.051,  381.051,  346.410,
+        +294.449,  242.487,  190.526,  138.564,   86.603,   34.641,  -34.641,  -86.603,
+        -138.564, -190.526, -242.487, -294.449, -346.410, -381.051, -381.051, -381.051,
+        -381.051, -381.051, -381.051, -381.051, -346.410, -294.449, -242.487, -190.526,
+        -138.564,  -86.603,  -34.641,   34.641,   86.603,  138.564,  190.526,  242.487,
+        +294.449,  346.410,  398.372,  433.013,  433.013,  433.013,  433.013,  433.013,
+        +433.013,  433.013,  433.013,  398.372,  346.410,  294.449,  242.487,  190.526,
+        +138.564,   86.603,   34.641,  -34.641,  -86.603, -138.564, -190.526, -242.487,
+        -294.449, -346.410, -398.372, -433.013, -433.013, -433.013, -433.013, -433.013,
+        -433.013, -433.013, -433.013, -398.372, -346.410, -294.449, -242.487, -190.526,
+        -138.564,  -86.603,  -34.641,   34.641,   86.603,  138.564,  190.526,  242.487,
+        +294.449,  346.410,  398.372,  450.333,  484.974,  484.974,  484.974,  484.974,
+        +484.974,  484.974,  484.974,  484.974,  484.974,  450.333,  398.372,  346.410,
+        +294.449,  242.487,  190.526,  138.564,   86.603,   34.641,  -34.641,  -86.603,
+        -138.564, -190.526, -242.487, -294.449, -346.410, -398.372, -450.333, -484.974,
+        -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974,
+        -450.333, -398.372, -346.410, -294.449, -242.487, -190.526, -138.564,  -86.603,
+        -034.641
+    };
+
+    const Float_t rtemp[577] = {
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,30.00,30.00,30.00,
+        30.00,30.00,30.00,30.00,30.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00,60.00,60.00,60.00,60.00,60.00,60.00,60.00,
+        60.00  } ;
+
+    //
+    //   fill the pixels list with this data
+    //
+
+    for (UInt_t i = 0; i<GetNumPixels(); i++)
+    {
+        (*this)[i].Set(xtemp[i], ytemp[i], rtemp[i]) ;
+        //fPixels->Add( new MGeomPix() ;
+    }
+}
+
Index: trunk/MagicSoft/Mars/mgui/MGeomCamMagic.h
===================================================================
--- trunk/MagicSoft/Mars/mgui/MGeomCamMagic.h	(revision 695)
+++ trunk/MagicSoft/Mars/mgui/MGeomCamMagic.h	(revision 695)
@@ -0,0 +1,26 @@
+#ifndef MGEOMCAMMAGIC_H
+#define MGEOMCAMMAGIC_H
+
+#ifndef MAGIC_H
+#include "MAGIC.h"
+#endif
+#ifndef MGEOMCAM_H
+#include "MGeomCam.h"
+#endif
+
+class MGeomCamMagic : public MGeomCam
+{
+private:
+    void CreateCam();
+
+public:
+
+    MGeomCamMagic(const char *name=NULL);
+
+    void Draw(Option_t *option = "");
+
+    ClassDef(MGeomCamMagic, 1)		// Geometry class for the camera
+};
+
+#endif
+
Index: trunk/MagicSoft/Mars/mgui/MGeomPix.h
===================================================================
--- trunk/MagicSoft/Mars/mgui/MGeomPix.h	(revision 669)
+++ trunk/MagicSoft/Mars/mgui/MGeomPix.h	(revision 695)
@@ -11,5 +11,5 @@
   Float_t  fX ;  //   the x coordinate 
   Float_t  fY ;  //   the y coordinate
-  Float_t  fR ;  //   the y coordinate
+  Float_t  fR ;  //   the r coordinate
 
  public:
@@ -18,11 +18,14 @@
   
   void Print(Option_t *opt=NULL) ;
+
+  void Set (Float_t x, Float_t y, Float_t r) { fX=x; fY=y; fR=r; }
   
-  void SetX ( Float_t x )     {      fX = x ;    }
-  void SetY ( Float_t y )     {      fY = y ;    }
-  void SetR ( Float_t r )     {      fR = r ;    }
-  Float_t GetX()              {      return fX ;    }
-  Float_t GetY()              {      return fY ;    }
-  Float_t GetR()              {      return fR ;    }
+  void SetX (Float_t x) { fX = x; }
+  void SetY (Float_t y) { fY = y; }
+  void SetR (Float_t r) { fR = r; }
+
+  Float_t GetX() const  { return fX; }
+  Float_t GetY() const  { return fY; }
+  Float_t GetR() const  { return fR; }
 
   ClassDef(MGeomPix, 1)		// Geometric class for one pixel
Index: trunk/MagicSoft/Mars/mgui/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mgui/Makefile	(revision 669)
+++ trunk/MagicSoft/Mars/mgui/Makefile	(revision 695)
@@ -35,4 +35,6 @@
 	   MGMonteCarloMain.cc \
            MGPrototyp.cc \
+           MGeomCamCT1.cc \
+           MGeomCamMagic.cc \
            MGeomCam.cc \
            MGeomPix.cc \
