Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 7094)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 7095)
@@ -450,5 +450,4 @@
   PrintBadPixels(MBadPixelsPix::kPreviouslyExcluded,"Previously excluded");
   PrintBadPixels(MBadPixelsPix::kChargeIsPedestal,"Signal smaller 3 Pedestal RMS");
-  PrintBadPixels(MBadPixelsPix::kChargeSigmaNotValid,"Signal smaller 3 Pedestal RMS");
   PrintBadPixels(MBadPixelsPix::kChargeRelErrNotValid,"Signal Rel. error too large");
   PrintBadPixels(MBadPixelsPix::kLoGainSaturation,"Low Gain Saturation");
Index: trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc	(revision 7094)
+++ trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc	(revision 7095)
@@ -171,4 +171,5 @@
       *fLog << warn << "New run is a pedestal run... need intensity calibration to treat this case!" << endl;
       fColor = MCalibrationCam::kNONE;
+      fPattern->SetPulserColor(fColor);
       fIsValid = kTRUE;      
       return kTRUE;
@@ -177,4 +178,5 @@
   if (fIsExplicitColor)
     {
+      fPattern->SetPulserColor(fColor);
       fIsValid = kTRUE;
       return kTRUE;
@@ -187,4 +189,6 @@
       *fLog << inf << "Run taken before inauguration of IFAE-box... using CT1 pulser." << endl;
       fColor    = MCalibrationCam::kCT1;
+      fPattern->SetPulserColor(fColor);
+      fPattern->SetPulserStrength(fStrength);
       fStrength = 10.;
       fIsValid  = kTRUE;
@@ -371,4 +375,5 @@
       }
       *fLog << endl;
+      fPattern->SetPulserColor(fColor);
       fIsValid  = kTRUE;
       return kTRUE;
@@ -536,4 +541,7 @@
   *fLog << endl;
 
+  fPattern->SetPulserColor(fColor);
+  fPattern->SetPulserStrength(fStrength);
+
   fIsValid = kTRUE;
 
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 7094)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 7095)
@@ -173,4 +173,5 @@
     SetOscillations(kTRUE);
     SetSizeCheck   (kTRUE);
+    SetIsReset     (kTRUE);
 
     SetLowerFitLimitHiGain();
@@ -383,4 +384,5 @@
 void MHCalibrationCam::ResetHists()
 {
+  SetIsReset();
   
   ResetHistTitles();
@@ -396,5 +398,5 @@
         { fAverageHiGainSectors->ForEach(MHCalibrationPix,Reset)();  }
     }
-  
+
   if (!IsLoGain())
     return;
@@ -428,6 +430,6 @@
         MHCalibrationPix &pix = (*this)[i];        
         h = pix.GetHGausHist();
-        h->SetName (Form("%s%s%s%04d","H",fHistName.Data(),"HiGainPix",i));
-        h->SetTitle(Form("%s%s%04d%s",fHistTitle.Data()," High Gain Pixel ",i," Runs: "));  
+        h->SetName (Form("H%sHiGainPix%04d",fHistName.Data(),i));
+        h->SetTitle(Form("%s High Gain Pixel %04d Runs: ",fHistTitle.Data(),i));
         h->SetXTitle(fHistXTitle.Data());
         h->SetYTitle(fHistYTitle.Data());
@@ -441,13 +443,13 @@
             MHCalibrationPix &pix = GetAverageHiGainArea(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%d","H",fHistName.Data(),"HiGainArea",j));
+            h->SetName (Form("H%sHiGainArea%d",fHistName.Data(),j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
             if (fGeom->InheritsFrom("MGeomCamMagic"))
-              h->SetTitle(Form("%s%s%s%s",fHistTitle.Data()," averaged on event-by-event basis ",
-                               j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis %s High Gain Runs: ",
+                                 fHistTitle.Data(), j==0 ? "Inner Pixels" : "Outer Pixels"));
             else
-              h->SetTitle(Form("%s%s%d%s",fHistTitle.Data(),
-                               " averaged on event-by-event basis High Gain Area Idx ",j," Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis High Gain Area Idx %d Runs: ",
+                                 fHistTitle.Data(), j));
           }
       
@@ -457,7 +459,7 @@
             MHCalibrationPix &pix = GetAverageHiGainSector(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%02d","H",fHistName.Data(),"HiGainSector",j));
-            h->SetTitle(Form("%s%s%02d%s",fHistTitle.Data(),
-                             " averaged on event-by-event basis High Gain Sector ",j," Runs: "));
+            h->SetName (Form("H%sHiGainSector%02d",fHistName.Data(),j));
+            h->SetTitle(Form("%s averaged on event-by-event basis High Gain Sector %02d Runs: ",
+                             fHistTitle.Data(), j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
@@ -473,6 +475,6 @@
         MHCalibrationPix &pix = (*this)(i);        
         h = pix.GetHGausHist();
-        h->SetName (Form("%s%s%s%04d","H",fHistName.Data(),"LoGainPix",i));
-        h->SetTitle(Form("%s%s%04d%s",fHistTitle.Data()," Low Gain Pixel ",i," Runs: "));  
+        h->SetName (Form("H%sLoGainPix%04d",fHistName.Data(),i));
+        h->SetTitle(Form("%s Low Gain Pixel %04d Runs: ", fHistTitle.Data(),i));
         h->SetXTitle(fHistXTitle.Data());
         h->SetYTitle(fHistYTitle.Data());
@@ -486,13 +488,13 @@
             MHCalibrationPix &pix = GetAverageLoGainArea(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%d","H",fHistName.Data(),"LoGainArea",j));
+            h->SetName (Form("H%sLoGainArea%d", fHistName.Data(), j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
             if (fGeom->InheritsFrom("MGeomCamMagic"))
-              h->SetTitle(Form("%s%s%s%s",fHistTitle.Data()," averaged on event-by-event basis ",
-                               j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis %s Low Gain Runs: ",
+                                 fHistTitle.Data(), j==0 ? "Inner Pixels" : "Outer Pixels"));
             else
-              h->SetTitle(Form("%s%s%d%s",fHistTitle.Data(),
-                               " averaged on event-by-event basis Low Gain Area Idx ",j," Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis Low Gain Area Idx %d Runs: ",
+                                 fHistTitle.Data(), j));
           }
       
@@ -502,7 +504,7 @@
             MHCalibrationPix &pix = GetAverageLoGainSector(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%02d","H",fHistName.Data(),"LoGainSector",j));
-            h->SetTitle(Form("%s%s%02d%s",fHistTitle.Data(),
-                             " averaged on event-by-event basis Low Gain Sector ",j," Runs: "));
+            h->SetName (Form("H%sLoGainSector%02d",fHistName.Data(),j));
+            h->SetTitle(Form("%s averaged on event-by-event basis Low Gain Sector %02d Runs: ",
+                             fHistTitle.Data(), j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
@@ -872,4 +874,5 @@
 Bool_t MHCalibrationCam::Fill(const MParContainer *par, const Stat_t w)
 {
+  SetIsReset(kFALSE);
 
   if (!IsSizeCheck())
@@ -942,4 +945,6 @@
 Bool_t MHCalibrationCam::Finalize()
 {
+  if (IsReset())
+    return kTRUE;
 
   if (GetNumExecutions() < 2)
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h	(revision 7094)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h	(revision 7095)
@@ -108,6 +108,12 @@
   Int_t  fPulserFrequency;                // Light pulser frequency
 
-  enum { kDebug, kLoGain, kAverageing,
-         kOscillations, kSizeCheck };     // Possible global flags
+  enum {
+      kDebug,
+      kLoGain,
+      kAverageing,
+      kOscillations,
+      kSizeCheck,
+      kIsReset
+  };     // Possible global flags
    
   Byte_t  fFlags;                         // Bit-field to hold the global flags
@@ -159,4 +165,7 @@
   Bool_t IsOscillations() const  { return TESTBIT(fFlags,kOscillations); }
   Bool_t IsSizeCheck   () const  { return TESTBIT(fFlags,kSizeCheck);    }
+  Bool_t IsReset       () const  { return TESTBIT(fFlags,kIsReset);      }
+
+  void ToggleFlag(Bool_t b, Byte_t flag) { b ? SETBIT(fFlags, flag) : CLRBIT(fFlags,flag); }
 
   void   Remove  ( TOrdCollection *col );
@@ -203,20 +212,13 @@
   const MHCalibrationPix  &operator()            (UInt_t i)  const;
  
-  void SetColor                   ( const MCalibrationCam::PulserColor_t color) { fColor = color; }
-  void SetAverageing              ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kAverageing) 
-								: CLRBIT(fFlags,kAverageing); }
-  void SetDebug                   ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kDebug) 
-								: CLRBIT(fFlags,kDebug); }
-  void SetLoGain                  ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kLoGain) 
-								: CLRBIT(fFlags,kLoGain); }
-  void SetOscillations            ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kOscillations) 
-								: CLRBIT(fFlags,kOscillations); }
-  void SetSizeCheck               ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kSizeCheck) 
-								: CLRBIT(fFlags,kSizeCheck); }
+  void SetColor(const MCalibrationCam::PulserColor_t color) { fColor = color; }
+
+  void SetAverageing(const Bool_t b=kTRUE)   { ToggleFlag(b,kAverageing); }
+  void SetDebug(const Bool_t b=kTRUE)        { ToggleFlag(b,kDebug); }
+  void SetLoGain(const Bool_t b=kTRUE)       { ToggleFlag(b,kLoGain); }
+  void SetOscillations(const Bool_t b=kTRUE) { ToggleFlag(b,kOscillations); }
+  void SetSizeCheck(const Bool_t b=kTRUE)    { ToggleFlag(b,kSizeCheck); }
+  void SetIsReset(const Bool_t b=kTRUE)      { ToggleFlag(b,kIsReset); }
+
   void SetHistName  ( const char *name )  { fHistName  = name;  }
   void SetHistTitle ( const char *name )  { fHistTitle = name;  }
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc	(revision 7094)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc	(revision 7095)
@@ -1,2 +1,3 @@
+
 /* ======================================================================== *\
 !
@@ -371,10 +372,16 @@
     {
       MHCalibrationPix &histhi = GetAverageHiGainArea(j);
-      histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
+      if (IsOscillations())
+	histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
+      else
+	histhi.FillHist(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
 
       if (IsLoGain())
 	{
 	  MHCalibrationPix &histlo = GetAverageLoGainArea(j);
-	  histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
+	  if (IsOscillations())
+	    histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
+	  else
+	    histlo.FillHist(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
 	}
     }
@@ -383,10 +390,16 @@
     {
       MHCalibrationPix &hist = GetAverageHiGainSector(j);
-      hist.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
+      if (IsOscillations())
+	hist.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
+      else
+	hist.FillHist(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
 
       if (IsLoGain())
 	{
 	  MHCalibrationPix &histlo = GetAverageLoGainSector(j);
-	  histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
+	  if (IsOscillations())
+	    histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
+	  else
+	    histlo.FillHist(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
 	}
     }
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h	(revision 7094)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h	(revision 7095)
@@ -18,9 +18,8 @@
 class MGeomCam;
 class MArrivalTimeCam;
+
 class MHCalibrationHiLoCam : public MHCalibrationCam
 {
-
 private:
-
   static const Int_t   fgNbins;                      //! Default number of bins        (now set to: 900   )
   static const Axis_t  fgFirst;                      //! Default lower histogram limit (now set to: -13.5 )
@@ -52,7 +51,5 @@
   
 public:
-
   MHCalibrationHiLoCam(const char *name=NULL, const char *title=NULL);
-  ~MHCalibrationHiLoCam() {}
 
   // Clone
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 7094)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 7095)
@@ -1755,4 +1755,9 @@
     if (IsIntensity())
     {
+
+	MCalibrationChargeCam *cam = (MCalibrationChargeCam*)fIntensCalibCam.GetCam();
+	cam->InitSize(fCalibrationCam.GetSize());
+	cam->MergeHiLoConversionFactors(fCalibrationCam);
+
         plist.AddToList(&fIntensQECam);
         plist.AddToList(&fIntensCalibCam);
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 7094)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 7095)
@@ -192,6 +192,5 @@
 
       FindTimeAndChargeHiGain(pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), 
-                              sumhi, deltasumhi, 
-                              timehi, deltatimehi, 
+                              sumhi, deltasumhi, timehi, deltatimehi,
                               sathi, ped, higainabflag);
 
Index: trunk/MagicSoft/Mars/msignal/calibration_weights_blue46.dat
===================================================================
--- trunk/MagicSoft/Mars/msignal/calibration_weights_blue46.dat	(revision 7095)
+++ trunk/MagicSoft/Mars/msignal/calibration_weights_blue46.dat	(revision 7095)
@@ -0,0 +1,104 @@
+# High Gain Weights: 4 10
+# (Amplitude)  (Time)
+-0.902168 -0.585312
+-0.984524 -0.32831
+-1.12036 -0.0157807
+-1.08172 0.756907
+-0.427114 1.56066
+0.186216 1.92954
+0.509304 2.06633
+0.699549 2.27174
+0.776041 2.3434
+0.8686 2.15573
+1.04178 1.93083
+1.17443 1.71284
+1.66255 1.38999
+2.31293 1.00065
+2.53376 0.210701
+2.3316 -0.460552
+2.11661 -0.992708
+1.95813 -1.43769
+1.91826 -1.72912
+1.83121 -1.83277
+1.6757 -1.91204
+1.50581 -1.93994
+0.91874 -1.89528
+-0.086052 -1.81483
+-0.651007 -1.09872
+-0.615758 -0.392913
+-0.393843 0.132625
+-0.284098 0.418838
+-0.258366 0.437323
+-0.262974 0.468126
+0.0180038 0.377062
+0.0449773 0.327324
+0.128299 0.336854
+0.297876 0.323257
+0.402965 0.18143
+0.373367 -0.00201841
+0.315525 -0.13922
+0.279239 -0.242999
+0.275543 -0.242753
+0.279876 -0.233989
+# Low Gain Weights: 6 10
+# (Amplitude)  (Time)
+0.0911607 1.86069
+0.134612 2.42822
+0.11393 2.54774
+0.239782 2.89304
+0.38454 3.39314
+0.506359 4.46877
+0.655883 5.52101
+0.73793 6.57492
+0.626733 5.91162
+0.622878 5.2788
+0.875104 5.70684
+1.0185 4.05712
+1.03351 2.62644
+1.17511 1.6677
+1.25046 1.13376
+1.2901 0.924149
+1.31334 0.437335
+1.31663 0.507458
+1.31277 0.427002
+1.32304 -0.0901286
+1.38784 -0.706265
+1.37487 -0.901873
+1.36665 -0.786355
+1.32075 -0.6806
+1.28396 -0.713758
+1.26222 -1.18985
+1.21343 -1.68063
+1.19453 -2.03872
+1.2299 -2.06586
+1.22115 -1.76823
+1.18887 -2.03884
+1.14439 -1.67582
+1.13325 -1.30011
+1.06283 -1.09575
+1.00479 -1.1072
+0.966371 -1.32491
+0.920684 -1.40639
+0.905236 -1.87588
+0.933327 -1.81847
+0.931535 -1.5951
+0.890207 -1.70808
+0.853004 -0.945718
+0.845928 -0.714034
+0.810665 -0.763716
+0.766765 -0.886576
+0.733744 -0.826087
+0.710135 -0.687648
+0.701588 -1.26231
+0.71366 -1.04794
+0.719342 -0.998027
+0.732828 -1.5976
+0.699252 -1.20079
+0.690217 -0.920725
+0.639485 -0.679626
+0.604624 -0.636375
+0.582796 -0.785263
+0.555253 -0.706474
+0.55048 -0.932222
+0.560973 -0.88078
+0.567122 -0.86762
