Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7882)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7883)
@@ -26,4 +26,7 @@
      - small update to output
 
+   * msignal/MExtractTimeAndCharge.cc:
+     - mark the lo-gains only as valid if they are really extracted
+
 
 
@@ -33,22 +36,22 @@
      - fixed usage of substitutions
 
-   * MMcConfigRunHeader.[h,cc]:
+   * mmc/MMcConfigRunHeader.[h,cc]:
      - added fParaboloidFocal
      - increased class version by 1
      - updated comments
 
-   * MMcEvt.[hxx,cxx]:
+   * mmc/MMcEvt.[hxx,cxx]:
      - added fEventReuse
      - increased class version by 1
      - updates to comments
 
-   * MMcEvtBasic.h:
+   * mmc/MMcEvtBasic.h:
      - replaced private by protected
 
-   * MMcFadcHeader.hxx:
+   * mmc/MMcFadcHeader.hxx:
      - updates to comments
      - update to global ifdef
 
-   * MMcRunHeader.[hxx,cxx]:
+   * mmc/MMcRunHeader.[hxx,cxx]:
      - added fRandomPointingConeSemiAngle
      - increased class version by 1
@@ -56,13 +59,13 @@
      - removed empty destructor
 
-   * MMcTrig.hxx:
+   * mmc/MMcTrig.hxx:
      - updated preprocessor directives
 
-   * MMcTrigHeader.[hxx,cxx]:
+   * mmc/MMcTrigHeader.[hxx,cxx]:
      - updated comments
      - removed empty destructor
      - updated preprocessor directives
 
-   * MTriggerDefine.h, Mdefine.h:
+   * mmc/MTriggerDefine.h, mmc/Mdefine.h:
      - updated preprocessor directives
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 7882)
+++ trunk/MagicSoft/Mars/NEWS	(revision 7883)
@@ -30,4 +30,10 @@
    - callisto: Callisto now raises an error if one of the input files could
      not be opened.
+
+   - callisto: The lo-gains have been marked as valid in some cases 
+     when they got not extracted at all (deltsumlo=deltatimelo=0) because
+     the allowed extraction range (fLoGainLast-fLoGainFirst) was
+     smaller than the number of slices (fLoGainWindowSize) needed
+     by the lo-gain extractor
 
    - callisto: Updated absolute calibration constants (muon calibration)
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 7882)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 7883)
@@ -270,7 +270,4 @@
       if (pixel.HasLoGain() && (fMaxBinContent > fLoGainSwitch /*|| sathi>0*/) )
       {
-          deltasumlo  = 0; // make logain of MExtractedSignalPix valid
-          deltatimelo = 0; // make logain of MArrivalTimePix valid
-
           fLoGainFirstSave = fLoGainFirst;
 
@@ -281,5 +278,5 @@
           const Float_t pos = sathi==0 ? timehi : (int)(sathi)-3;
 
-          if (pos>-fLoGainStartShift)
+          if (pos+fLoGainStartShift>0)
               fLoGainFirst = (Byte_t)(pos + fLoGainStartShift);
 
@@ -289,4 +286,7 @@
           if (fLoGainFirst <= fLoGainLast-fWindowSizeLoGain)
           {
+              deltasumlo  = 0; // make logain of MExtractedSignalPix valid
+              deltatimelo = 0; // make logain of MArrivalTimePix valid
+
               const Bool_t logainabflag = (higainabflag + pixel.GetNumHiGainSamples()) & 0x1;
               FindTimeAndChargeLoGain(pixel.GetLoGainSamples()+fLoGainFirst,
