Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2692)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2693)
@@ -29,4 +29,8 @@
    * mtools/MTFillMatrix.[h,cc]:
      - added
+
+   * mfilter/MFEventSelector2.[h,cc]:
+     - removed fUseOrigDistrib --> use a reference histogram with 
+       0 Entries instead.
 
 
Index: /trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc	(revision 2692)
+++ /trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc	(revision 2693)
@@ -136,5 +136,5 @@
 //     would result in redistributing cos(Theta).
 //
-//  If 'fUseOrigDistribution' is set to kTRUE (by SetUseOrigDistribution())
+//  If the reference distribution doesn't contain entries (GetEntries()==0)
 //     the original distribution will be used as the nominal distribution;
 //     note that also in this case a dummy nominal distribution has to be
@@ -150,6 +150,4 @@
     fName  = name  ? (TString)name  : gsDefName;
     fTitle = title ? (TString)title : gsDefTitle;
- 
-    fUseOrigDistribution = kFALSE;
 }
 
@@ -162,19 +160,4 @@
     if (fHistRes)
         delete fHistRes;
-}
-
-// --------------------------------------------------------------------------
-//
-// 
-//
-void MFEventSelector2::SetUseOrigDistribution(Bool_t b)
-{
-    fUseOrigDistribution = b;
-
-    *fLog << inf;
-    *fLog << "MFEventSelector2 set ";
-    if (!b)
-        *fLog << "not ";
-    *fLog << "to use the distribution from the input file as target distribution." << endl;
 }
 
@@ -268,5 +251,6 @@
     // set the nominal distribution equal to the original distribution
 
-    TH1 *hnp = fUseOrigDistribution ? (TH1*)(fHistOrig->GetHist()).Clone() : &fHistNom->GetHist();
+    const Bool_t useorigdist = fHistNom->GetHist().GetEntries()==0;
+    TH1 *hnp =  useorigdist ? (TH1*)(fHistOrig->GetHist()).Clone() : &fHistNom->GetHist();
 
     TH1 &hn = *hnp;
@@ -336,5 +320,5 @@
     }
 
-    if (fUseOrigDistribution)
+    if (useorigdist)
       delete hnp;
 }
Index: /trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h	(revision 2692)
+++ /trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h	(revision 2693)
@@ -41,6 +41,4 @@
     TCanvas   *fCanvas;   //! canvas for online display
 
-    Bool_t fUseOrigDistribution;
-
     Bool_t fResult;
     Int_t  fCounter[2];
@@ -60,6 +58,5 @@
     ~MFEventSelector2();
 
-    void SetUseOrigDistribution(Bool_t b=kTRUE);
-    MH3 *GetHistOrig()                       { return fHistOrig; }
+    MH3 *GetHistOrig() { return fHistOrig; }
 
     void SetNumMax(Long_t max=-1) { fNumMax = max; }
