Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8202)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8203)
@@ -18,4 +18,21 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2006/11/02 Thomas Bretz
+
+   * datacenter/macros/fillstar.C:
+     - changed such that no muon rates below 0 are entered into the DB
+
+   * mhcalib/MHCalibrationCam.cc:
+     - reformatted and improved output
+     - do not complain about empty lo-gain histograms (BTW:
+       it should complain if the histogram should not be empty!)
+
+   * mranforest/MHRanForestGini.cc, mranforest/MRanForest.cc,
+     mranforest/MRanForestCalc.cc, mranforest/MRanTree.cc:
+     - small changes to output
+     - changes to comments
+
+
 
  2006/11/01 Daniela Dorner
@@ -102,9 +119,4 @@
    * mcalib/MCalibrationRelTimeCalc.cc:
      - reformatted some output
-
-   * mhcalib/MHCalibrationCam.cc:
-     - reformatted and improved output
-     - do not complain about empty lo-gain histograms (BTW:
-       it should complain if the histogram should not be empty!)
 
    * mhcalib/MHCalibrationChargeCam.cc:
Index: trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 8202)
+++ trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 8203)
@@ -185,4 +185,6 @@
     Float_t mrate  = num/effon;
     mrate = TMath::Nint(mrate*100)/100.;
+    if (mrate<0)
+        mrate=0;
     TString muonrate = Form("%6.2f", mrate);
     Int_t effontime = TMath::Nint(effon);
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 8202)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 8203)
@@ -1257,11 +1257,20 @@
                                       MBadPixelsPix::UncalibratedType_t osctyp)
 {
-
-  if (hist.IsEmpty() || hist.IsOnlyOverflow() || hist.IsOnlyUnderflow())
-    {
-      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() 
-	    << ": Only over- or underflow in hi-gain." << endl;
+  if (hist.IsEmpty())
+  {
+      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl;
       return;
-    }  
+  }
+  if (hist.IsOnlyOverflow())
+  {
+      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows." << endl;
+      return;
+  }
+  if (hist.IsOnlyUnderflow())
+  {
+      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows." << endl;
+      return;
+  }
+
   //
   // 2) Fit the Hi Gain histograms with a Gaussian
@@ -1350,10 +1359,20 @@
 {
 
-  if (hist.IsEmpty() || hist.IsOnlyOverflow() || hist.IsOnlyUnderflow())
-    {
-      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() 
-	    << ": Only over- or underflow in lo-gain." << endl;
+  if (hist.IsEmpty())
+  {
+      // *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl;
       return;
-    }  
+  }
+  if (hist.IsOnlyOverflow())
+  {
+      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows." << endl;
+      return;
+  }
+  if (hist.IsOnlyUnderflow())
+  {
+      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows." << endl;
+      return;
+  }
+
   //
   // 2) Fit the Hi Gain histograms with a Gaussian
Index: trunk/MagicSoft/Mars/mranforest/MHRanForestGini.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MHRanForestGini.cc	(revision 8202)
+++ trunk/MagicSoft/Mars/mranforest/MHRanForestGini.cc	(revision 8203)
@@ -1,3 +1,5 @@
 /* ======================================================================== *\
+! $Name: not supported by cvs2svn $:$Id: MHRanForestGini.cc,v 1.7 2006-11-02 08:57:00 tbretz Exp $
+! --------------------------------------------------------------------------
 !
 ! *
@@ -17,6 +19,7 @@
 !
 !   Author(s): Thomas Hengstebeck 3/2003 <mailto:hengsteb@alwa02.physik.uni-siegen.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
+!   Author(s): Thomas Bretz <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2006
 !
 !
@@ -134,5 +137,5 @@
     // --- Produce some text information ---
     fRules.AddText("");
-    fRules.AddText(Form("%s w/ %d trees of node size %d trained by %d events",
+    fRules.AddText(Form("%s w/ %d trees of node size %d trained by %d evts",
                         fRanForest->IsClassify()?"Classification":"Regression",
                         fRanForest->GetNumTrees(),
Index: trunk/MagicSoft/Mars/mranforest/MRanForest.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanForest.cc	(revision 8202)
+++ trunk/MagicSoft/Mars/mranforest/MRanForest.cc	(revision 8203)
@@ -1,3 +1,5 @@
 /* ======================================================================== *\
+! $Name: not supported by cvs2svn $:$Id: MRanForest.cc,v 1.26 2006-11-02 08:57:00 tbretz Exp $
+! --------------------------------------------------------------------------
 !
 ! *
@@ -17,6 +19,7 @@
 !
 !   Author(s): Thomas Hengstebeck 3/2003 <mailto:hengsteb@physik.hu-berlin.de>
+!   Author(s): Thomas Bretz <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2005
+!   Copyright: MAGIC Software Development, 2000-2006
 !
 !
@@ -498,11 +501,11 @@
     // error-estimates from out-of-bag data (oob data):
     //
-    // For a single tree the events not(!) contained in the bootstrap sample of
-    // this tree can be used to obtain estimates for the classification error of
-    // this tree.
-    // If you take a certain event, it is contained in the oob-data of 1/3 of
-    // the trees (see comment to ModifyData). This means that the classification error
-    // determined from oob-data is underestimated, but can still be taken as upper limit.
-
+    // For a single tree the events not(!) contained in the bootstrap
+    // sample of this tree can be used to obtain estimates for the
+    // classification error of this tree.
+    // If you take a certain event, it is contained in the oob-data of
+    // 1/3 of the trees (see comment to ModifyData). This means that the
+    // classification error determined from oob-data is underestimated,
+    // but can still be taken as upper limit.
     Int_t ninbag = 0;
     for (Int_t ievt=0;ievt<numdata;ievt++)
@@ -584,7 +587,7 @@
         TMath::Sort(numdata,v.GetArray(),isort.GetArray(),kFALSE);
 
-        // this sorts the v[n] in ascending order. isort[n] is the event number
-        // of that v[n], which is the n-th from the lowest (assume the original
-        // event numbers are 0,1,...).
+        // this sorts the v[n] in ascending order. isort[n] is the
+        // event number of that v[n], which is the n-th from the
+        // lowest (assume the original event numbers are 0,1,...).
 
         // control sorting
@@ -608,5 +611,6 @@
             const Int_t n2=isort[n+1];
 
-            // FIXME: Copying isort[n] to fDataSort[mvar*numdata] can be accelerated!
+            // FIXME: Copying isort[n] to fDataSort[mvar*numdata]
+            // can be accelerated!
             fDataSort[mvar*numdata+n]=n1;
             if(n==0) fDataRang[mvar*numdata+n1]=0;
Index: trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc	(revision 8202)
+++ trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc	(revision 8203)
@@ -1,3 +1,5 @@
-/* ================================q======================================== *\
+/* ======================================================================== *\
+! $Name: not supported by cvs2svn $:$Id: MRanForestCalc.cc,v 1.25 2006-11-02 08:57:00 tbretz Exp $
+! --------------------------------------------------------------------------
 !
 ! *
@@ -19,5 +21,5 @@
 !   Author(s): Thomas Bretz 8/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2005
+!   Copyright: MAGIC Software Development, 2000-2006
 !
 !
Index: trunk/MagicSoft/Mars/mranforest/MRanTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanTree.cc	(revision 8202)
+++ trunk/MagicSoft/Mars/mranforest/MRanTree.cc	(revision 8203)
@@ -83,7 +83,7 @@
 void MRanTree::SetNdSize(Int_t n)
 {
-    // threshold nodesize of terminal nodes, i.e. the training data is splitted
-    // until there is only pure date in the subsets(=terminal nodes) or the
-    // subset size is LE n
+    // threshold nodesize of terminal nodes, i.e. the training data is
+    // splitted until there is only pure date in the subsets(=terminal
+    // nodes) or the subset size is LE n
 
     fNdSize=TMath::Max(1,n);//at least 1 event per node
@@ -163,8 +163,8 @@
     const Int_t mdim = fGiniDec.GetSize();
 
-    // For the best split, msplit is the index of the variable (e.g Hillas par.,
-    // zenith angle ,...)
-    // split on. decsplit is the decreae in impurity measured by Gini-index.
-    // nsplit is the case number of value of msplit split on,
+    // For the best split, msplit is the index of the variable (e.g
+    // Hillas par., zenith angle ,...)
+    // split on. decsplit is the decreae in impurity measured by
+    // Gini-index. nsplit is the case number of value of msplit split on,
     // and nsplitnext is the case number of the next larger value of msplit.
 
@@ -287,8 +287,9 @@
     const Int_t mdim = fGiniDec.GetSize();
 
-    // For the best split, msplit is the index of the variable (e.g Hillas par., zenith angle ,...)
-    // split on. decsplit is the decreae in impurity measured by Gini-index.
-    // nsplit is the case number of value of msplit split on,
-    // and nsplitnext is the case number of the next larger value of msplit.
+    // For the best split, msplit is the index of the variable (e.g
+    // Hillas par., zenith angle ,...) split on. decsplit is the decreae
+    // in impurity measured by Gini-index. nsplit is the case number of
+    // value of msplit split on, and nsplitnext is the case number of
+    // the next larger value of msplit.
 
     Int_t nbestvar=0;
@@ -429,7 +430,8 @@
                         Int_t nbest,Int_t &ndendl)
 {
-    // This is the heart of the BuildTree construction. Based on the best split
-    // the data in the part of datasort corresponding to the current node is moved to the
-    // left if it belongs to the left child and right if it belongs to the right child-node.
+    // This is the heart of the BuildTree construction. Based on the
+    // best split the data in the part of datasort corresponding to
+    // the current node is moved to the left if it belongs to the left
+    // child and right if it belongs to the right child-node.
     const Int_t numdata = ncase.GetSize();
     const Int_t mdim    = fGiniDec.GetSize();
@@ -478,17 +480,20 @@
                          Int_t ninbag, const int nclass)
 {
-    // Buildtree consists of repeated calls to two void functions, FindBestSplit and MoveData.
-    // Findbestsplit does just that--it finds the best split of the current node.
-    // MoveData moves the data in the split node right and left so that the data
-    // corresponding to each child node is contiguous.
+    // Buildtree consists of repeated calls to two void functions,
+    // FindBestSplit and MoveData. Findbestsplit does just that--it finds
+    // the best split of the current node. MoveData moves the data in
+    // the split node right and left so that the data corresponding to
+    // each child node is contiguous.
     //
     // buildtree bookkeeping:
-    // ncur is the total number of nodes to date.  nodestatus(k)=1 if the kth node has been split.
-    // nodestatus(k)=2 if the node exists but has not yet been split, and =-1 if the node is
-    // terminal.  A node is terminal if its size is below a threshold value, or if it is all
-    // one class, or if all the data-values are equal.  If the current node k is split, then its
-    // children are numbered ncur+1 (left), and ncur+2(right), ncur increases to ncur+2 and
-    // the next node to be split is numbered k+1.  When no more nodes can be split, buildtree
-    // returns.
+    // ncur is the total number of nodes to date.  nodestatus(k)=1 if
+    // the kth node has been split. nodestatus(k)=2 if the node exists
+    // but has not yet been split, and =-1 if the node is terminal.
+    // A node is terminal if its size is below a threshold value, or
+    // if it is all one class, or if all the data-values are equal.
+    // If the current node k is split, then its children are numbered
+    // ncur+1 (left), and ncur+2(right), ncur increases to ncur+2 and
+    // the next node to be split is numbered k+1.  When no more nodes
+    // can be split, buildtree returns.
     const Int_t mdim    = fGiniDec.GetSize();
     const Int_t nrnodes = fBestSplit.GetSize();
