Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 6916)
+++ trunk/MagicSoft/Mars/Changelog	(revision 6917)
@@ -21,4 +21,121 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2005/04/08 Thomas Bretz
+
+   * mhbase/MH3.cc:
+     - replaced all Float-histograms by double histograms. This
+       is backward compatible with I/O and has the advantage, that
+       we are compatible with most other double histograms used in
+       Mars
+
+   * mhflux/MHEnergyEst.cc:
+     - made the energy binning the same than in all other classes
+
+   * mjobs/MJCalibrateSignal.cc:
+     - first replaced contmc by a new filter Markus G. used, but
+       after a discussion with Abelardo it turned out, that the 
+       original filter does a better job, becuase it takes both
+       (level 1 trigger and minimum number of phes) conditions
+       used in the MC into account.
+
+   * mjobs/MJCut.cc:
+     - added a plot: Effective-On-Time versus Theta used to produce
+       a spectrum
+
+
+
+ 2005/04/07 Thomas Bretz
+
+   * mpointing/MSrcPosCalc.cc:
+     - also skip Process if fSourcePos==NULL, this happens in real
+       data, too, if no pointing correction is done.
+
+   * manalysis/AnalysisLinkDef.h, manalysis/Makefile:
+     - removed MParameterI, MParameterD, MParameterDerr
+
+   * mbase/BaseLinkDef.h, mbase/Makefile:
+     - added MParameterI, MParameterD, MParameterDerr
+
+   * mbase/MParList.cc:
+     - if a container is rejected due to wrong inheritance its
+       inheritance is mentioned in the error message
+
+   * mhbase/HBaseLinkDef.h, mhbase/Makefile:
+     - removed MWeight
+
+   * mhbase/MWeight.[h,cc]:
+     - removed, replaced by MParameterD
+
+   * mhbase/MFillH.[h,cc], mmontecarlo/MMcWeightEnergySpecCalc.[h,cc]:
+     - replaced MWeight by MParameterD
+
+   * mjobs/MJStar.cc:
+     - fixed the wrong axis title in the histogram showing the rate
+
+   * manalysis/MParameters.[h,cc]:
+     - moved to mbase
+
+   * mbase/MParameters.[h,cc]:
+     - inherit MParameterDerr from MParameterD
+     - changed class version of MParameterDerr from 1 to 2
+
+   * mfbase/MFEventSelector2.cc:
+     - fixed that in SelectProb the wrong bin was chosen
+
+
+
+ 2005/04/07 Markus Gaug (2005/04/06)
+
+   * mjobs/calibrationref_Dec04.rc
+   * callisto_Dec04Jan05.rc
+     - update the reference lines in the display according to the spline
+       extractor.
+
+   * msignal/MExtractTimeAndChargeSpline.cc
+     - move fgHiGainFirst from 2 to 0. This is important for the Dec. und 
+       January data where the calib. pulse position changes much.
+
+   * mjobs/MJCalib.cc
+   * mjobs/MJCalibration.cc
+     - move fDevice and functions IsUseBlindPixel() and 
+       IsUsePINDiode() into the base class.
+
+   * mjobs/MJCalibrateSignal.cc
+     - do not apply the modified extraction window to the interlaced
+       calibration events. This is a bugfix especially for the 
+       December and January data.
+     - extract and fit blind pixel and pin diode only if flag 
+       IsUseBlindPixel() or IsUsePINDiode() is set.
+
+
+
+ 2005/04/07 Markus Gaug (2005/04/03)
+  
+   * mcalib/MCalibrateData.cc
+     - made one warning more understandable.
+
+   * msignal/MExtractTimeAndChargeDigitalFilter.cc
+     - moved fgOffsetFromLogain from -1.8 to -2.5. This corrects only an 
+       defective extraction of the MC at low-gain signals lower than 90 
+       phes. (IN THE CODE THE CHANGE IS FROM -1.8 to -2.8!!!!)
+
+
+
+ 2005/04/07 Markus Gaug (2005/04/01)
+ 
+   * mpedestal/MExtractPedestal.[h,cc]
+     - use the standard way to define the default for fNumEventsDump
+     - added missing "NumDump" in ReadEnv
+
+   * callisto_*.rc
+     - correct the default of the number of events used in 
+       pedestal calculation (NumEventsDump).
+     - added missing lines for setting of parameters for the 
+       MJCalibrateSignal.PedCalcFromExtractRndm.*
+       (CORRECTED SOME BUGS IN THIS LINES)
+     - Replaced NumEventsDump by NumDump
+
+
 
  2005/04/05 Thomas Bretz
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 6916)
+++ trunk/MagicSoft/Mars/NEWS	(revision 6917)
@@ -38,4 +38,17 @@
    - added all resource files necessary to handle spline extraction
      of signal for the late 2004 and the early 2005 data
+
+   - update the reference lines for the december data
+
+   - changed default for fgHiGainFirst from 2 to 0 in spline extractor
+     This is important for the Dec. and Jan. data where the calibration
+     pulse position changes much.
+
+   - changed default for fgOffsetFromLogain from -1.8 to -2.8 in digital
+     filter. This corrects only an defective extraction of the MC at low-gain
+     signals lower than 90 phes.
+
+   - fixed some slowdown in calibrating data with interleaved events from
+     Jan and Dec.
 
 
Index: trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 6916)
+++ trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 6917)
@@ -32,5 +32,5 @@
 // In the constructor you can give up to three variables which should be
 // filled in the histogram. Dependend on the number of given variables
-// (data members) a TH1F, TH2F or TH3F is created.
+// (data members) a TH1D, TH2D or TH3D is created.
 // Specify the data mamber like the following:
 //   "MHillas.fLength"
@@ -108,13 +108,13 @@
     {
     case 1:
-        fHist = new TH1F;
+        fHist = new TH1D;
         fHist->SetYTitle("Counts");
         break;
     case 2:
-        fHist = new TH2F;
+        fHist = new TH2D;
         fHist->SetZTitle("Counts");
         break;
     case 3:
-        fHist = new TH3F;
+        fHist = new TH3D;
         break;
     }
@@ -140,5 +140,5 @@
 // --------------------------------------------------------------------------
 //
-// Creates an TH1F. memberx is filled into the X-bins. For a more detailed
+// Creates an TH1D. memberx is filled into the X-bins. For a more detailed
 // description see the class description above.
 //
@@ -146,5 +146,5 @@
     : fDimension(1)
 {
-    fHist = new TH1F;
+    fHist = new TH1D;
 
     fData[0] = new MDataChain(memberx);
@@ -198,5 +198,5 @@
 // --------------------------------------------------------------------------
 //
-// Creates an TH2F. memberx is filled into the X-bins. membery is filled
+// Creates an TH2D. memberx is filled into the X-bins. membery is filled
 // into the Y-bins. For a more detailed description see the class
 // description above.
@@ -205,5 +205,5 @@
     : fDimension(2)
 {
-    fHist = new TH2F;
+    fHist = new TH2D;
 
     fData[0] = new MDataChain(memberx);
@@ -225,5 +225,5 @@
 // --------------------------------------------------------------------------
 //
-// Creates an TH3F. memberx is filled into the X-bins. membery is filled
+// Creates an TH3D. memberx is filled into the X-bins. membery is filled
 // into the Y-bins. membery is filled into the Z-bins. For a more detailed
 // description see the class description above.
@@ -232,5 +232,5 @@
     : fDimension(3)
 {
-    fHist = new TH3F;
+    fHist = new TH3D;
 
     fData[0] = new MDataChain(memberx);
Index: trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc	(revision 6916)
+++ trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc	(revision 6917)
@@ -94,5 +94,5 @@
 
     MBinning binsi, binse, binst, binsr;
-    binse.SetEdgesLog(25, 10, 10000);
+    binse.SetEdgesLog(15, 10, 1000000);
     binst.SetEdgesCos(50, 0, 60);
     binsi.SetEdges(10, 0, 400);
Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 6916)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 6917)
@@ -92,5 +92,4 @@
 #include "MTriggerPatternDecode.h"
 #include "MFTriggerPattern.h"
-#include "MFTriggerLvl1.h"
 #include "MGeomApply.h"
 //#include "MMcPedestalCopy.h"
@@ -464,8 +463,8 @@
 
     
-    // Skips empty MC events (Not necessary, but faster!)
-    MFTriggerLvl1 trigmc;
-    MContinue contmc(&trigmc, "ContTrigMC");
-    contmc.SetInverted();
+    // Skips MC which have no contents. This are precisely the
+    // events which fullfilled the MC Lvl1 trigger and an
+    // arbitrary cut (typically at 50phe) to speed up simulation
+    MContinue contmc("MRawEvtData.GetNumPixels<0.5", "ContEmptyMC");
 
     MPointingPosInterpolate pextr;
Index: trunk/MagicSoft/Mars/mjobs/MJCut.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 6916)
+++ trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 6917)
@@ -55,6 +55,6 @@
 
 #include "../mhflux/MAlphaFitter.h"
+#include "MH3.h"
 #include "MBinning.h"
-#include "MWeight.h"
 #include "MDataSet.h"
 #include "MParameters.h"
@@ -68,5 +68,7 @@
 // --------------------------------------------------------------------------
 //
-// Default constructor. 
+// Default constructor.  Set defaults for fStoreSummary, fStoreresult,
+// fWriteOnly, fIsWobble and fFullDisplay to kFALSE and initialize
+// fEstimateEnergy and fCalcHadronness with NULL.
 //
 MJCut::MJCut(const char *name, const char *title)
@@ -79,4 +81,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Destructor. Delete fEstimateEnergy and fCalcHadronness if != NULL
+//
 MJCut::~MJCut()
 {
@@ -522,4 +528,18 @@
     fill6b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
     fill7b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
+
+    /*
+     MHVsTime hvs("MEffectiveOnTime.fVal");
+     hvs.SetTitle("Effective On-Time vs. Time;;T_{on}");
+     MFillH fillvs(&hvs, "MTimeEffectiveOnTime", "FillOnTime");
+     fillvs.SetNameTab("OnTime");
+     */
+    MH3 hvs("MPointingPos.fZd");
+    hvs.SetName("Theta");
+    hvs.SetTitle("Effective On-Time vs. Zenith Angle;\\Theta [\\circ];T_{on} [s]");
+    MFillH fillvs(&hvs, "", "FillOnTime");
+    fillvs.SetWeight("MEffectiveOnTime");
+    fillvs.SetNameTab("OnTime");
+
 /*
     MWeight weight;
@@ -554,4 +574,6 @@
         if (!fIsWobble)
             tlist2.Replace(&ffs2);
+
+        tlist.AddToList(&fillvs, "EffectiveOnTime");
     }
 
