Index: /trunk/MagicSoft/Mars/mhist/MHEffectiveOnTime.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHEffectiveOnTime.cc	(revision 4924)
+++ /trunk/MagicSoft/Mars/mhist/MHEffectiveOnTime.cc	(revision 4925)
@@ -28,5 +28,6 @@
 //  MHEffectiveOnTime
 //
-//  Fills a 2-D histogram Time-difference vs. Theta
+//  Filling this you will get the effective on-time versus theta and
+//  observation time.
 //
 //  From this histogram the effective on-time is determined by a fit.
@@ -34,6 +35,45 @@
 //  are stored in corresponding histograms
 //
+//  To determin the efective on time a poisson fit is done. For more details
+//  please have a look into the source code of FitH() it should be simple
+//  to understand. In this function a Delta-T distribution is fitted, while
+//  Delta-T is the time between two consecutive events.
+//
+//  The fit is done for projections of a 2D histogram in Theta and Delta T.
+//  So you get the effective on time versus theta.
+//
+//  To get the effective on-time versus time a histogram is filled with
+//  the Delta-T distribution of a number of events set by SetNumEvents().
+//  The default is 12000 (roughly 1min at 200Hz)
+//
+//  For each "time-bin" the histogram is fitted and the resulting effective
+//  on-time is stored in the fHEffOnTime histogram. Each entry in this
+//  histogram is the effective observation time between the upper and
+//  lower edges of the bins.
+//
+//  In addition the calculated effective on time is stored in a
+//  "MEffectiveOnTime [MParameterDerr]" and the corresponding time-stamp
+//  (the upper edge of the bin) "MTimeEffectiveOnTime [MTime]"
+//
+//  The class takes two binnings from the Parameter list; if these binnings
+//  are not available the defaultbinning is used:
+//      MBinning("BinningDeltaT"); // Units of seconds
+//      MBinning("BinningTheta");  // Units of degrees
+//
+//
+//  Usage:
+//  ------
+//    MFillH fill("MHEffectiveOnTime", "MTime");
+//    tlist.AddToList(&fill);
+//
+//
+//  Input Container:
+//    MPointingPos
+//
+//  Output Container:
+//    MEffectiveOnTime [MParameterDerr]
+//    MTimeEffectiveOnTime [MTime]
+//
 //////////////////////////////////////////////////////////////////////////////
-
 #include "MHEffectiveOnTime.h"
 
@@ -73,5 +113,5 @@
     //
     fName  = name  ? name  : "MHEffectiveOnTime";
-    fTitle = title ? title : "2-D histogram in Theta and time difference";
+    fTitle = title ? title : "Histogram to determin effective On-Time vs Time and Zenith Angle";
 
     // Main histogram
@@ -264,6 +304,6 @@
     h->Fit(&func, "0IRQ");
 
-    const Double_t chi2   = func.GetChisquare();
-    const Int_t    NDF    = func.GetNDF();
+    const Double_t chi2 = func.GetChisquare();
+    const Int_t    NDF  = func.GetNDF();
 
     // was fit successful ?
@@ -293,11 +333,10 @@
     gMinuit->mnemat((Double_t*)emat, 2);
 
-    const Double_t dldl   = emat[0][0];
+    const Double_t dldl  = emat[0][0];
     //const Double_t dN0dN0 = emat[1][1];
 
-    const Double_t teff   = Nm/lambda;
-    const Double_t dteff  = teff * TMath::Sqrt(dldl/(lambda*lambda) + 1.0/Nm);
-
-    const Double_t dl     = TMath::Sqrt(dldl);
+    const Double_t teff  = Nm/lambda;
+    const Double_t dteff = teff * TMath::Sqrt(dldl/(lambda*lambda) + 1.0/Nm);
+    const Double_t dl    = TMath::Sqrt(dldl);
 
     //const Double_t kappa  = Nm/N0;
Index: /trunk/MagicSoft/Mars/mhist/MHEffectiveOnTime.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHEffectiveOnTime.h	(revision 4924)
+++ /trunk/MagicSoft/Mars/mhist/MHEffectiveOnTime.h	(revision 4925)
@@ -24,28 +24,28 @@
 {
 private:
-    MPointingPos   *fPointPos;   //!
-    MTime           fLastTime;   //!
+    MPointingPos   *fPointPos; //! Container to get the zenith angle from
+    MTime           fLastTime; //! Time-Stamp of last event
 
-    MTime          *fTime;       //!
-    MParameterDerr *fParam;      //!
+    MTime          *fTime;     //! Time-Stamp of "effective on-time" event
+    MParameterDerr *fParam;    //! Output container for effective on-time
 
-    TH2D fH2DeltaT;              // Counts vs Delta T and Theta
-    TH1D fH1DeltaT;              //! Counts vs Delta T (for a time interval)
+    TH2D fH2DeltaT;      // Counts vs Delta T and Theta
+    TH1D fH1DeltaT;      //! Counts vs Delta T (for a time interval)
 
-    TH1D fHEffOnTheta;           // Effective On time versus Theta
-    TH1D fHEffOnTime;            // Effective On time versus Time
+    TH1D fHEffOnTheta;   // Effective On time versus Theta
+    TH1D fHEffOnTime;    // Effective On time versus Time
 
-    TH1D fHProbTheta;            // Chisq prob fit of Effective On time versus Theta
-    TH1D fHProbTime;             // Chisq prob fit of Effective On time versus Time
+    TH1D fHProbTheta;    // Chisq prob fit of Effective On time versus Theta
+    TH1D fHProbTime;     // Chisq prob fit of Effective On time versus Time
 
     TH1D fHN0;
     TH1D fHLambda;
 
-    Bool_t fIsFinalized;
+    Bool_t fIsFinalized; // Flag telling you whether fHEffOnTheta is the final result
 
-    Int_t fNumEvents;
+    Int_t fNumEvents;    // Number of events to be used for a bin in time
 
-    const TString fNameProjDeltaT;  //! This should make sure, that gROOT doen't confuse the projection with something else
-    const TString fNameProjTheta;   //! This should make sure, that gROOT doen't confuse the projection with something else
+    const TString fNameProjDeltaT; //! This should make sure, that gROOT doen't confuse the projection with something else
+    const TString fNameProjTheta;  //! This should make sure, that gROOT doen't confuse the projection with something else
 
     Bool_t FitH(TH1D *h, Double_t *res, Bool_t paint=kFALSE) const;
@@ -63,8 +63,11 @@
     Bool_t Finalize();
 
+    const TH1D &GetHEffOnTheta() const { return fHEffOnTheta; }
+    const TH1D &GetHEffOnTime() const { return fHEffOnTime; }
+
     void Draw(Option_t *option="");
     void Paint(Option_t *opt="");
 
-    ClassDef(MHEffectiveOnTime, 1) // 2D-histogram to determin effective on-time vs. theta
+    ClassDef(MHEffectiveOnTime, 1) // Histogram to determin effective On-Time vs Time and Zenith Angle
 };
 
