Index: trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 1023)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 1032)
@@ -62,7 +62,8 @@
 
     AddToBranchList("fHiGainPixId");
-    //AddToBranchList("fLoGainPixId");
+    AddToBranchList("fLoGainPixId");
     AddToBranchList("fHiGainFadcSamples");
-    //AddToBranchList("fLoGainFadcSamples");
+    AddToBranchList("fLoGainFadcSamples");
+
 }
 
@@ -77,5 +78,5 @@
 //  - MCerPhotEvt
 //
-Bool_t MCerPhotCalc::PreProcess( MParList *pList )
+Bool_t MCerPhotCalc::PreProcess(MParList *pList)
 {
     fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
@@ -107,10 +108,9 @@
 Bool_t MCerPhotCalc::Process()
 {
-    fCerPhotEvt->Clear();
-
     MRawEvtPixelIter pixel(fRawEvt);
 
     while (pixel.Next())
     {
+
         const UInt_t pixid = pixel.GetPixelId();
 
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1023)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1032)
@@ -44,14 +44,13 @@
 MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0)
 {
-
-  fName  = name  ? name  : "MCerPhotEvt";
-  fTitle = title ? title : "(Number of Photon)-Event Information";
-  
-  fPixels = new TClonesArray ("MCerPhotPix", 577) ;
-
-  //
-  // FIXME: is this really necessary?
-  //
-  fPixels->Clear();
+    fName  = name  ? name  : "MCerPhotEvt";
+    fTitle = title ? title : "(Number of Photon)-Event Information";
+
+    fPixels = new TClonesArray ("MCerPhotPix", 577);
+
+    //
+    // FIXME: is this really necessary?
+    //
+    Reset();
 }
 
@@ -82,4 +81,6 @@
 {
     // TClonesArray -> 'operator new with placement' should be used
+
+    fPixels->ExpandCreate(fNumPixels);
     new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err);
 }
@@ -89,8 +90,8 @@
 // reset counter and delete netries in list.
 //
-void MCerPhotEvt::Clear(Option_t *)
+void MCerPhotEvt::Reset()
 {
     fNumPixels = 0;
-    fPixels->Clear();
+//    fPixels->Delete();
 }
 
@@ -108,6 +109,6 @@
         << endl ;
 
-    for (Int_t il=0; il<entries; il++ )
-        (*this)[il].Print();
+    for (Int_t i=0; i<entries; i++ )
+        (*this)[i].Print();
 }
 
@@ -120,7 +121,7 @@
     const Int_t entries = fPixels->GetEntries();
 
-    for (Int_t il=0; il<entries; il++)
-    {
-        if (id == (*this)[il].GetPixId())
+    for (Int_t i=0; i<entries; i++)
+    {
+        if (id == (*this)[i].GetPixId())
             return kTRUE;
     }
@@ -137,7 +138,7 @@
     const Int_t entries = fPixels->GetEntries();
 
-    for (Int_t il=0; il<entries; il++)
-    {
-        MCerPhotPix &pix = (*this)[il];
+    for (Int_t i=0; i<entries; i++)
+    {
+        const MCerPhotPix &pix = (*this)[i];
 
         if (id == pix.GetPixId() && pix.IsPixelUsed())
@@ -156,7 +157,7 @@
     const Int_t entries = fPixels->GetEntries();
 
-    for (Int_t il=0; il<entries; il++)
-    {
-        MCerPhotPix &pix = (*this)[il];
+    for (Int_t i=0; i<entries; i++)
+    {
+        const MCerPhotPix &pix = (*this)[i];
 
         if (id == pix.GetPixId() && pix.IsCorePixel())
@@ -178,8 +179,7 @@
     Float_t minval = (*this)[0].GetNumPhotons();
 
-    Float_t testval;
     for (UInt_t i=1; i<fNumPixels; i++)
     {
-        testval = (*this)[i].GetNumPhotons();
+        const Float_t testval = (*this)[i].GetNumPhotons();
 
         if (testval < minval)
@@ -201,8 +201,7 @@
     Float_t maxval = (*this)[0].GetNumPhotons();
 
-    Float_t testval;
     for (UInt_t i=1; i<fNumPixels; i++)
     {
-        testval = (*this)[i].GetNumPhotons();
+        const Float_t testval = (*this)[i].GetNumPhotons();
 
         if (testval > maxval)
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1023)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1032)
@@ -21,12 +21,6 @@
     ~MCerPhotEvt() { delete fPixels; }
 
-    void Draw(Option_t* option = "");
-
     UInt_t GetNumPixels() const { return fNumPixels; }
-
-    void AddPixel(Int_t id, Float_t nph, Float_t err);
-
-    void Clear(Option_t *opt=NULL);
-    void Print(Option_t *opt=NULL) const;
+    void   AddPixel(Int_t id, Float_t nph, Float_t err);
 
     Bool_t  IsPixelExisting(Int_t id) const;
@@ -40,4 +34,10 @@
     MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->At(i)); }
 
+    void Reset();
+
+    void Draw(Option_t* option = "");
+    void Print(Option_t *opt=NULL) const;
+    void Clear(Option_t *opt=NULL) { Reset(); }
+
     ClassDef(MCerPhotEvt, 1)    // class for an event containing cerenkov photons
 };
