Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2258)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2259)
@@ -1,3 +1,13 @@
                                                  -*-*- END OF LINE -*-*-
+
+ 2003/07/01: Thomas Bretz
+
+  * manalysis/MCerPhotAnal2.cc:
+    - fixed some problems with the lo-gains
+  
+  * mraw/MRawEvtPixelIter.cc:
+    - Determin the maximum sample of the lo gains from the end.
+
+
 
  2003/07/01: Abelardo Moralejo
@@ -15,22 +25,17 @@
        degrees.
 
+
+
  2003/07/01: Wolfgang Wittek
 
-   * mhist/MHSigmaTheta.cc
+   * manalysis/MSigmabar.cc, manalysis/MCT1PadSchweizer.cc,
+     manalysis/MCT1PadONOFF.cc, mhist/MHSigmaTheta.cc:
      - change code because GetPixRatio returns area(pixel_zero)/area(pixel)
                                        and not area(pixel)/area(pixel_zero)
 
-   * manalysis/MSigmabar.cc
-               MCT1PadSchweizer.cc
-               MCT1PadONOFF.cc
-     - change code because GetPixRatio returns area(pixel_zero)/area(pixel)
-                                       and not area(pixel)/area(pixel_zero)
-
-   * macros/CT1Analysis.C
-            ONOFFCT1Analysis.C
+   * macros/CT1Analysis.C, macros/ONOFFCT1Analysis.C
      - current versions of CT1 macros
 
-   * macros/unfold.C
-            fluxunfold.C
+   * macros/unfold.C, macros/fluxunfold.C
      - macros for testing the unfolding within root
 
Index: /trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.cc	(revision 2258)
+++ /trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.cc	(revision 2259)
@@ -147,8 +147,8 @@
         for (int i=0; i<num; i++)
         {
-            if (ptr[i]>250)
+            if (ptr[i]==255)
                 sat++;
-            if (sat>1)
-                continue;
+            //if (sat>1)
+            //    continue;
 
             if (i<max-fBefore || i>max+fAfter)
@@ -176,8 +176,8 @@
             sumsb = 0;   // sum signal+background
             sqsb  = 0;   // sum sqares signal+background
-            sumb  = 0;   // sum background
-            sqb   = 0;   // sum sqares background
-
-            nb = 0;
+            //sumb  = 0;   // sum background
+            //sqb   = 0;   // sum sqares background
+
+            //nb = 0;
             nsb = 0;
             for (int i=0; i<num; i++)
@@ -187,7 +187,8 @@
                 if (i<max-fBefore || i>max+fAfter)
                 {
+                    /*
                     sumb += ptr[i];
                     sqb  += ptr[i]*ptr[i];
-                    nb++;
+                    nb++;*/
                 }
                 else
@@ -216,5 +217,5 @@
 
         if (sat>1)
-            s*=9;
+            s*=10; // tgb has measured 9, but Florian said it's 10.
 
         Int_t idx = pixel.GetPixelId();
Index: /trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 2258)
+++ /trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 2259)
@@ -235,5 +235,5 @@
     Byte_t maxi = 0;
 
-    for (int i=0; i<fNumLoGainSamples; i++)
+    for (int i=fNumLoGainSamples-1; i>=0; i--)
         if (fLoGainPos[i]>max)
         {
