Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2778)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2779)
@@ -1,8 +1,2 @@
-Please  do  not write behind the end of line tag so that it is  possible
-to   send  a   Changelog   file  to  a  line  printer  directly.  Thanks.
-
-
-                                                 -*-*- END OF LINE -*-*-
-
 Please  do  not write behind the end of line tag so that it is  possible
 to   send  a   Changelog   file  to  a  line  printer  directly.  Thanks.
@@ -13,25 +7,19 @@
  2004/01/13: Wolfgang Wittek
 
-   * macros/ONOFFAnalysis.C
-            ONAnalysis.C
+   * macros/ONOFFAnalysis.C, macros/ONAnalysis.C:
      - change macro to handle also MC events with finite sigmabar
 
-   * manalysis/MPadOn.[h,cc]
+   * manalysis/MPadOn.[h,cc]:
      - deleted, is replaced by MPad
 
-   * manalysis/MPadOnOFF.[h,cc]
+   * manalysis/MPadOnOFF.[h,cc]:
      - deleted, is replaced by MPad
 
-   * manalysis/MPad.[h,cc]
+   * manalysis/MPad.[h,cc]:
      - new class, replacing MPadON and MPadONOFF
      - handle also MC events with finite sigmabar
 
-   * manalysis/Makefile
-               AnalysisLinkDef.h
+   * manalysis/Makefile, manalysis/AnalysisLinkDef.h:
      - replace MPadON and MPadONOFF by MPad
-
-
-
- 2003/12/23: Wolfgang Wittek
 
 
@@ -47,4 +35,11 @@
    * Changelog:
      - removed entries of 2003
+
+   * mfilter/MFGeomag.cc:
+     - simplified open/close of input files
+
+   * manalysis/MEventRate.[h,cc], manalysis/MEventRateCalc.cc:
+     - added some comments
+     - added new member function GetError
 
 
@@ -168,31 +163,2 @@
      - added new fType in te enumeration to handle the arrival time
        histos
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/manalysis/MEventRate.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MEventRate.cc	(revision 2778)
+++ trunk/MagicSoft/Mars/manalysis/MEventRate.cc	(revision 2779)
@@ -27,5 +27,19 @@
 // MEventRate
 //
-// Storage Container for the event rate
+// Storage Container for the event rate.
+//
+//    rate = Number of events / time in which the events were recorded
+//       r = N / t
+//       s = t / N  = 1 / r    mean time interval between consecutive events
+//
+//    for an exponential distribution of the time differences d between
+//    consecutive events:
+//
+//       s = <d>
+//       sigma(d)     = <d> = s
+//       delta(s)     = sigma(d) /sqrt(N) = s / sqrt(N)
+//       delta(s) / s = 1 / sqrt(N)
+//
+//       delta(r) / r = delta(s) / s = 1 / sqrt(N)
 //
 /////////////////////////////////////////////////////////////////////////////
Index: trunk/MagicSoft/Mars/manalysis/MEventRate.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MEventRate.h	(revision 2778)
+++ trunk/MagicSoft/Mars/manalysis/MEventRate.h	(revision 2779)
@@ -17,4 +17,5 @@
     void SetRate(Double_t r, UInt_t n) { fRate = r; fNumEvents = n; }
     Double_t GetRate() const { return fRate; }
+    Double_t GetError() const { return TMath::Sqrt(1./fNumEvents); }
     UInt_t GetNumEvents() const { return fNumEvents; }
 
Index: trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc	(revision 2778)
+++ trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc	(revision 2779)
@@ -30,4 +30,20 @@
 //
 //  The algorithm is explained in Process()
+//
+//
+//    rate = Number of events / time in which the events were recorded
+//       r = N / t
+//       s = t / N  = 1 / r    mean time interval between consecutive events
+//
+//    for an exponential distribution of the time differences d between
+//    consecutive events:
+//
+//       s = <d>
+//       sigma(d)     = <d> = s
+//       delta(s)     = sigma(d) /sqrt(N) = s / sqrt(N)
+//       delta(s) / s = 1 / sqrt(N)
+//
+//       delta(r) / r = delta(s) / s = 1 / sqrt(N)
+//
 //
 //  Input Containers:
Index: trunk/MagicSoft/Mars/mfilter/MFGeomag.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFGeomag.cc	(revision 2778)
+++ trunk/MagicSoft/Mars/mfilter/MFGeomag.cc	(revision 2779)
@@ -86,10 +86,9 @@
     Float_t thet  [2*1152];
 
-    ifstream geomagp;
-
     TString filename = gSystem->Getenv("MARSSYS");
     filename += "/mfilter/gcplus.txt";
 
-    geomagp.open(filename);
+    ifstream geomagp(filename);
+
     if (!geomagp) {
         *fLog << err <<" ERROR gcplus.txt file not found by Geomag"<<endl;
@@ -105,13 +104,9 @@
     *fLog << Form ("FRigMin=%8f  fRigMax=%8f  fProb=%8f",
                    fRigMin[0], fRigMax[0], fProb[0]) << endl;
-    geomagp.close();
-    geomagp.clear();
-
-    ifstream geomagm;
 
     filename = gSystem->Getenv("MARSSYS");
     filename += "/mfilter/gcminus.txt";
 
-    geomagm.open(filename);
+    ifstream geomagm(filename);
     if (!geomagm) {
         *fLog << err <<" ERROR gcminus.txt file not found by Geomag"<<endl;
@@ -126,6 +121,5 @@
     *fLog << Form ("fRigMin=%8f  fRigMax=%8f  fProb=%8f",
                    fRigMin[1152], fRigMax[1152], fProb[1152]) << endl;
-    geomagm.close();
-    geomagm.clear();
+
     //
     if (fMcEvt)
@@ -133,9 +127,11 @@
 
     fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
-    if (fMcEvt)
-        return kTRUE;
-
-    *fLog << err << dbginf << "  [MMcEvt] not found... aborting." << endl;
-    return kFALSE;
+    if (!fMcEvt)
+    {
+        *fLog << err << dbginf << "  [MMcEvt] not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    return kTRUE;
 }
 // --------------------------------------------------------------------------
