Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2042)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2043)
@@ -35,4 +35,8 @@
    * mbase/MEvtLoop.cc:
      - fixed a bug in ProcessGuiEvents
+
+   * mhist/MH*.[h,cc], mhistmc/MH*.[h,cc], mimage/MH*.[h,cc]:
+     - changed "Double_t w" in Fill to "const Stat_t w"
+     - added weight in some classes to TH::Fill
 
 
Index: trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2043)
@@ -98,5 +98,5 @@
 // to your class definition.
 //
-Bool_t MH::Fill(const MParContainer *par, Double_t w)
+Bool_t MH::Fill(const MParContainer *par, const Stat_t w)
 {
     *fLog << warn << GetDescriptor() << ": Fill not overloaded! Can't be used!" << endl;
Index: trunk/MagicSoft/Mars/mhist/MH.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MH.h	(revision 2043)
@@ -24,5 +24,5 @@
 
     virtual Bool_t SetupFill(const MParList *pList) { return kTRUE; }
-    virtual Bool_t Fill(const MParContainer *par, Double_t weight=1);
+    virtual Bool_t Fill(const MParContainer *par, const Stat_t weight=1);
     virtual Bool_t Finalize() { return kTRUE; }
 
Index: trunk/MagicSoft/Mars/mhist/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH3.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MH3.cc	(revision 2043)
@@ -342,5 +342,5 @@
 // Fills the one, two or three data members into our histogram
 //
-Bool_t MH3::Fill(const MParContainer *par)
+Bool_t MH3::Fill(const MParContainer *par, const Stat_t w)
 {
     Double_t x=0;
@@ -361,11 +361,11 @@
     {
     case 3:
-        ((TH3*)fHist)->Fill(x, y, z);
+        ((TH3*)fHist)->Fill(x, y, z, w);
         return kTRUE;
     case 2:
-        ((TH2*)fHist)->Fill(x, y);
+        ((TH2*)fHist)->Fill(x, y, w);
         return kTRUE;
     case 1:
-        fHist->Fill(x);
+        fHist->Fill(x, w);
         return kTRUE;
     }
Index: trunk/MagicSoft/Mars/mhist/MH3.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH3.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MH3.h	(revision 2043)
@@ -49,5 +49,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     TString GetDataMember() const;
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc	(revision 2043)
@@ -110,10 +110,10 @@
 // Fill the histogram
 // 
-Bool_t MHAlphaEnergyTheta::Fill(const MParContainer *par, Double_t w)
+Bool_t MHAlphaEnergyTheta::Fill(const MParContainer *par, const Stat_t w)
 {
     MHillasSrc &hil = *(MHillasSrc*)par;
 
     fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(),
-               fMcEvt->GetTelescopeTheta()*kRad2Deg);
+               fMcEvt->GetTelescopeTheta()*kRad2Deg, w);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h	(revision 2043)
@@ -34,5 +34,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH3D *GetHist()       { return &fHist; }
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc	(revision 2043)
@@ -112,9 +112,9 @@
 // Fill the histogram
 // 
-Bool_t MHAlphaEnergyTime::Fill(const MParContainer *par, Double_t w)
+Bool_t MHAlphaEnergyTime::Fill(const MParContainer *par, const Stat_t w)
 {
     MHillasSrc &hil = *(MHillasSrc*)par;
 
-    fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(), 0.0001*fTime->GetTimeLo());
+    fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(), 0.0001*fTime->GetTimeLo(), w);
     return kTRUE;
 }
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h	(revision 2043)
@@ -33,5 +33,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH3D *GetHist()       { return &fHist; }
Index: trunk/MagicSoft/Mars/mhist/MHArray.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHArray.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHArray.cc	(revision 2043)
@@ -463,5 +463,5 @@
 // successfull filled.
 //
-Bool_t MHArray::Fill(const MParContainer *par, Double_t w)
+Bool_t MHArray::Fill(const MParContainer *par, const Stat_t w)
 {
     const Int_t n = fArray->GetSize();
@@ -478,5 +478,5 @@
             return kFALSE;
 
-    return GetH()->Fill(par);
+    return GetH()->Fill(par, w);
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHArray.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHArray.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHArray.h	(revision 2043)
@@ -42,5 +42,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Finalize();
 
Index: trunk/MagicSoft/Mars/mhist/MHBlindPixels.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHBlindPixels.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHBlindPixels.cc	(revision 2043)
@@ -74,5 +74,5 @@
 }
 
-Bool_t MHBlindPixels::Fill(const MParContainer *par, Double_t w)
+Bool_t MHBlindPixels::Fill(const MParContainer *par, const Stat_t w)
 {
     if (!par)
@@ -84,5 +84,5 @@
     for (int i=0; i<577; i++)
         if (bp.IsBlind(i))
-            fHist.Fill(i);
+            fHist.Fill(i, w);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHBlindPixels.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHBlindPixels.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHBlindPixels.h	(revision 2043)
@@ -23,5 +23,5 @@
 
     void Draw(Option_t* option = "");
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     ClassDef(MHBlindPixels, 1)  // Histogram of blind pixels
Index: trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc	(revision 2043)
@@ -114,5 +114,5 @@
 // Fill the histograms with data from a MCerPhotEvt-Container.
 //
-Bool_t MHCerPhotEvt::Fill(const MParContainer *par, Double_t w)
+Bool_t MHCerPhotEvt::Fill(const MParContainer *par, const Stat_t w)
 {
     const MCerPhotEvt *evt = par ? (MCerPhotEvt*)par : fEvt;
Index: trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h	(revision 2043)
@@ -30,5 +30,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Finalize();
 
Index: trunk/MagicSoft/Mars/mhist/MHCompProb.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCompProb.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHCompProb.cc	(revision 2043)
@@ -159,5 +159,5 @@
 //
 //
-Bool_t MHCompProb::Fill(const MParContainer *par, Double_t w)
+Bool_t MHCompProb::Fill(const MParContainer *par, const Stat_t w)
 {
     const MMcEvt &mcevt = *(MMcEvt*)par;
Index: trunk/MagicSoft/Mars/mhist/MHCompProb.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCompProb.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHCompProb.h	(revision 2043)
@@ -29,5 +29,5 @@
 
     Bool_t SetupFill(const MParList *plist);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Finalize();
 
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc	(revision 2043)
@@ -91,9 +91,9 @@
 // Fill data into the histogram which contains all showers
 //
-Bool_t MHEnergyTheta::Fill(const MParContainer *par, Double_t w)
+Bool_t MHEnergyTheta::Fill(const MParContainer *par, const Stat_t w)
 {
     const MMcEvt &mcevt = *(MMcEvt*)par;
 
-    fHist.Fill(mcevt.GetEnergy(), mcevt.GetTheta());
+    fHist.Fill(mcevt.GetEnergy(), mcevt.GetTheta(), w);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h	(revision 2043)
@@ -20,5 +20,5 @@
     MHEnergyTheta(const char *name=NULL, const char *title=NULL);
 
-    Bool_t Fill(const MParContainer *cont, Double_t w=1);
+    Bool_t Fill(const MParContainer *cont, const Stat_t w=1);
 
     void Draw(Option_t *option="");
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc	(revision 2043)
@@ -98,9 +98,9 @@
 // Fill data into the histogram which contains all showers
 //
-Bool_t MHEnergyTime::Fill(const MParContainer *par)
+Bool_t MHEnergyTime::Fill(const MParContainer *par, const Stat_t w)
 {
     const MMcEvt &mcevt = *(MMcEvt*)par;
 
-    fHist.Fill(mcevt.GetEnergy(), 0.0001*fTime->GetTimeLo());
+    fHist.Fill(mcevt.GetEnergy(), 0.0001*fTime->GetTimeLo(), w);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTime.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTime.h	(revision 2043)
@@ -21,5 +21,5 @@
     MHEnergyTime(const char *name=NULL, const char *title=NULL);
 
-    Bool_t Fill(const MParContainer *cont);
+    Bool_t Fill(const MParContainer *cont,  const Stat_t w=1);
 
     void Draw(Option_t *option="");
Index: trunk/MagicSoft/Mars/mhist/MHFadcCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHFadcCam.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHFadcCam.cc	(revision 2043)
@@ -91,5 +91,5 @@
 
 // --------------------------------------------------------------------------
-Bool_t MHFadcCam::Fill(const MParContainer *par, Double_t w)
+Bool_t MHFadcCam::Fill(const MParContainer *par, const Stat_t w)
 {
     return Fill((MRawEvtData*)par);
Index: trunk/MagicSoft/Mars/mhist/MHFadcCam.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHFadcCam.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHFadcCam.h	(revision 2043)
@@ -45,5 +45,5 @@
     const TH1F *GetHistLo(UInt_t i) const { return (*this)[i].GetHistLo(); }
 
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Fill(const MRawEvtData *par);
 
Index: trunk/MagicSoft/Mars/mhist/MHHadronness.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 2043)
@@ -183,5 +183,5 @@
 // are skipped at the moment.
 //
-Bool_t MHHadronness::Fill(const MParContainer *par, Double_t w)
+Bool_t MHHadronness::Fill(const MParContainer *par, const Stat_t w)
 {
     // Preliminary Workaround: FIXME!
@@ -200,7 +200,7 @@
 
     if (fMcEvt->GetPartId()==kGAMMA)
-        fGhness->Fill(h);
+        fGhness->Fill(h, w);
     else
-        fPhness->Fill(h);
+        fPhness->Fill(h, w);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHHadronness.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHadronness.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHHadronness.h	(revision 2043)
@@ -45,5 +45,5 @@
 
     Bool_t SetupFill(const MParList *plist);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Finalize();
 
Index: trunk/MagicSoft/Mars/mhist/MHMatrix.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 2043)
@@ -227,5 +227,5 @@
 // Add the values correspoding to the columns to the new row
 //
-Bool_t MHMatrix::Fill(const MParContainer *par, Double_t w)
+Bool_t MHMatrix::Fill(const MParContainer *par, const Stat_t w)
 {
     AddRow();
Index: trunk/MagicSoft/Mars/mhist/MHMatrix.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHMatrix.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHMatrix.h	(revision 2043)
@@ -48,5 +48,5 @@
     Bool_t SetupFill(const MParList *pList);
 
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Finalize();
 
Index: trunk/MagicSoft/Mars/mhist/MHRanForest.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForest.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHRanForest.cc	(revision 2043)
@@ -108,5 +108,5 @@
 //
 //
-Bool_t MHRanForest::Fill(const MParContainer *par, Double_t w)
+Bool_t MHRanForest::Fill(const MParContainer *par, const Stat_t w)
 {
     fNumEvent++;
Index: trunk/MagicSoft/Mars/mhist/MHRanForest.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForest.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHRanForest.h	(revision 2043)
@@ -33,5 +33,5 @@
 
     Bool_t SetupFill(const MParList *plist);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Finalize();
 
Index: trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc	(revision 2043)
@@ -101,5 +101,5 @@
 //
 //
-Bool_t MHRanForestGini::Fill(const MParContainer *par, Double_t w)
+Bool_t MHRanForestGini::Fill(const MParContainer *par, const Stat_t w)
 {
     for (Int_t i=0;i<fRanForest->GetNumDim();i++)
Index: trunk/MagicSoft/Mars/mhist/MHRanForestGini.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForestGini.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHRanForestGini.h	(revision 2043)
@@ -31,5 +31,5 @@
 
     Bool_t SetupFill(const MParList *plist);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     Bool_t Finalize();
 
Index: trunk/MagicSoft/Mars/mhist/MHSigmaPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaPixel.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaPixel.cc	(revision 2043)
@@ -107,5 +107,5 @@
 // Fill the histogram
 // 
-Bool_t MHSigmaPixel::Fill(const MParContainer *par, Double_t w)
+Bool_t MHSigmaPixel::Fill(const MParContainer *par, const Stat_t w)
 {
     const MPedestalCam &ped = *(MPedestalCam*)par;
Index: trunk/MagicSoft/Mars/mhist/MHSigmaPixel.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaPixel.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaPixel.h	(revision 2043)
@@ -27,5 +27,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH2D *GetHist()       { return &fHist; }
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc	(revision 2043)
@@ -177,5 +177,5 @@
 //  Fill the histograms
 //
-Bool_t MHSigmaTheta::Fill(const MParContainer *par, Double_t w)
+Bool_t MHSigmaTheta::Fill(const MParContainer *par, const Stat_t w)
 {
     Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg;
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h	(revision 2043)
@@ -42,5 +42,5 @@
 
     Bool_t SetupFill(const MParList *plist);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH2D *GetSigmaTheta() { return &fSigmaTheta; }
Index: trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.cc	(revision 2043)
@@ -111,7 +111,7 @@
 // Fill the histogram
 // 
-Bool_t MHSigmabarTheta::Fill(const MParContainer *par, Double_t w)
+Bool_t MHSigmabarTheta::Fill(const MParContainer *par, const Stat_t w)
 {
-    fHist.Fill(fMcEvt->GetTheta()*kRad2Deg, fSigmabar->GetSigmabar());  
+    fHist.Fill(fMcEvt->GetTheta()*kRad2Deg, fSigmabar->GetSigmabar(), w);
     return kTRUE;
 }
Index: trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.h	(revision 2043)
@@ -28,5 +28,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH2D *GetHist()       { return &fHist; }
Index: trunk/MagicSoft/Mars/mhist/MHStarMap.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHStarMap.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHStarMap.cc	(revision 2043)
@@ -146,5 +146,5 @@
 // Be careful: Only call this with an object of type MHillas
 //
-Bool_t MHStarMap::Fill(const MParContainer *par, Double_t w)
+Bool_t MHStarMap::Fill(const MParContainer *par, const Stat_t w)
 {
     const MHillas &h = *(MHillas*)par;
@@ -174,5 +174,5 @@
 
         for (float x=xmin+dx/2; x<(xmax-xmin)+dx; x+=dx)
-            fStarMap->Fill(x, m*x+t);
+            fStarMap->Fill(x, m*x+t, w);
     }
     else
@@ -185,5 +185,5 @@
 
         for (float y=ymin+dy/2; y<(ymax-ymin)+dy; y+=dy)
-            fStarMap->Fill((y-t)/m, y);
+            fStarMap->Fill((y-t)/m, y, w);
     }
 
Index: trunk/MagicSoft/Mars/mhist/MHStarMap.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHStarMap.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHStarMap.h	(revision 2043)
@@ -33,5 +33,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     TH1 *GetHistByName(const TString name) { return fStarMap; }
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTheta.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHThetabarTheta.cc	(revision 2043)
@@ -110,9 +110,9 @@
 // Fill the histogram
 //
-Bool_t MHThetabarTheta::Fill(const MParContainer *par, Double_t w)
+Bool_t MHThetabarTheta::Fill(const MParContainer *par, const Stat_t w)
 {
     const Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg;
 
-    fHist.Fill(theta, theta);
+    fHist.Fill(theta, theta, w);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTheta.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHThetabarTheta.h	(revision 2043)
@@ -26,5 +26,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TProfile *GetHist() { return &fHist; }
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc	(revision 2043)
@@ -119,9 +119,9 @@
 // Fill the histogram
 //
-Bool_t MHThetabarTime::Fill(const MParContainer *par, Double_t w)
+Bool_t MHThetabarTime::Fill(const MParContainer *par, const Stat_t w)
 {
     const Int_t time = fTime->GetTimeLo();
 
-    fHist.Fill(0.0001*time, fMcEvt->GetTheta()*kRad2Deg);
+    fHist.Fill(0.0001*time, fMcEvt->GetTheta()*kRad2Deg, w);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTime.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHThetabarTime.h	(revision 2043)
@@ -29,5 +29,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TProfile *GetHist() { return &fHist; }
Index: trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.cc	(revision 2043)
@@ -143,9 +143,9 @@
 //  Fill the histogram
 //
-Bool_t MHTimeDiffTheta::Fill(const MParContainer *par, Double_t w)
+Bool_t MHTimeDiffTheta::Fill(const MParContainer *par, const Stat_t w)
 {
     const Double_t time = 200e-9*fTime->GetTimeLo() + fTime->GetTimeHi();
 
-    fHist.Fill(time-fLastTime, fMcEvt->GetTelescopeTheta()*kRad2Deg);
+    fHist.Fill(time-fLastTime, fMcEvt->GetTelescopeTheta()*kRad2Deg, w);
     fLastTime = time;
 
Index: trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.h	(revision 2043)
@@ -27,5 +27,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH2D *GetHist() { return &fHist; }
Index: trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc	(revision 2043)
@@ -136,9 +136,9 @@
 //  Fill the histogram
 //
-Bool_t MHTimeDiffTime::Fill(const MParContainer *par, Double_t w)
+Bool_t MHTimeDiffTime::Fill(const MParContainer *par, const Stat_t w)
 {
     const Double_t time = 200e-9*fTime->GetTimeLo() + fTime->GetTimeHi();
 
-    fHist.Fill(time-fLastTime, time);
+    fHist.Fill(time-fLastTime, time, w);
     fLastTime = time;
 
Index: trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.h	(revision 2043)
@@ -25,5 +25,5 @@
 
     virtual Bool_t SetupFill(const MParList *pList);
-    virtual Bool_t Fill(const MParContainer *par, Double_t w=1);
+    virtual Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH2D *GetHist() { return &fHist; }
Index: trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 2043)
@@ -137,9 +137,9 @@
 // Fill data into the histogram which contains the selected showers
 //
-Bool_t MHMcCT1CollectionArea::Fill(const MParContainer *par, Double_t w)
+Bool_t MHMcCT1CollectionArea::Fill(const MParContainer *par, const Stat_t w)
 { 
   MMcEvt &mcevt = *(MMcEvt*)par;
 
-  fHistSel->Fill(log10(mcevt.GetEnergy()), kRad2Deg*mcevt.GetTelescopeTheta());
+  fHistSel->Fill(log10(mcevt.GetEnergy()), kRad2Deg*mcevt.GetTelescopeTheta(), w);
   return kTRUE;
 }
Index: trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h	(revision 2043)
@@ -20,5 +20,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     void DrawAll(Option_t *option="");
Index: trunk/MagicSoft/Mars/mhistmc/MHMcEnergyImpact.cc
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcEnergyImpact.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcEnergyImpact.cc	(revision 2043)
@@ -110,5 +110,5 @@
 //  Fill the histogram with the log10 of the energy for triggered events.
 //
-Bool_t MHMcEnergyImpact::Fill(const MParContainer *cont, Double_t w)
+Bool_t MHMcEnergyImpact::Fill(const MParContainer *cont, const Stat_t w)
 {
     const MMcEvt &mcevt = *(MMcEvt*)cont;
Index: trunk/MagicSoft/Mars/mhistmc/MHMcEnergyImpact.h
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcEnergyImpact.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcEnergyImpact.h	(revision 2043)
@@ -23,5 +23,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *pcont=NULL, Double_t w=1);
+    Bool_t Fill(const MParContainer *pcont=NULL, const Stat_t w=1);
 
     const TH2D *GetHist()       { return &fHist; }
Index: trunk/MagicSoft/Mars/mhistmc/MHMcEnergyMigration.cc
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcEnergyMigration.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcEnergyMigration.cc	(revision 2043)
@@ -158,5 +158,5 @@
 // Fill the histogram
 //
-Bool_t MHMcEnergyMigration::Fill(const MParContainer *par, Double_t w)
+Bool_t MHMcEnergyMigration::Fill(const MParContainer *par, const Stat_t w)
 {
     //    MHillasSrc &hil = *(MHillasSrc*)par;
Index: trunk/MagicSoft/Mars/mhistmc/MHMcEnergyMigration.h
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcEnergyMigration.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcEnergyMigration.h	(revision 2043)
@@ -26,5 +26,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     const TH3D *GetHist() { return &fHist; }
Index: trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc	(revision 2043)
@@ -146,5 +146,5 @@
 // Be careful: Only call this with an object of type MMcTriggerLvl2
 //
-Bool_t MHMcTriggerLvl2::Fill(const MParContainer *par, Double_t w)
+Bool_t MHMcTriggerLvl2::Fill(const MParContainer *par, const Stat_t w)
 {
   const MMcTriggerLvl2 &h = *(MMcTriggerLvl2 *)par;
Index: trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.h
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.h	(revision 2043)
@@ -33,5 +33,5 @@
     ~MHMcTriggerLvl2();
 
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     TH1 *GetHistByName(const TString name);
Index: trunk/MagicSoft/Mars/mimage/MHHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillas.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHHillas.cc	(revision 2043)
@@ -240,5 +240,5 @@
 // Be careful: Only call this with an object of type MHillas
 //
-Bool_t MHHillas::Fill(const MParContainer *par, Double_t w)
+Bool_t MHHillas::Fill(const MParContainer *par, const Stat_t w)
 {
     const MHillas &h = *(MHillas*)par;
Index: trunk/MagicSoft/Mars/mimage/MHHillas.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillas.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHHillas.h	(revision 2043)
@@ -38,5 +38,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     TH1 *GetHistByName(const TString name);
Index: trunk/MagicSoft/Mars/mimage/MHHillasExt.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillasExt.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHHillasExt.cc	(revision 2043)
@@ -146,5 +146,5 @@
 // Be careful: Only call this with an object of type MHillas
 //
-Bool_t MHHillasExt::Fill(const MParContainer *par, Double_t w)
+Bool_t MHHillasExt::Fill(const MParContainer *par, const Stat_t w)
 {
     const MHillasSrc *src = (MHillasSrc*)par;
Index: trunk/MagicSoft/Mars/mimage/MHHillasExt.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillasExt.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHHillasExt.h	(revision 2043)
@@ -34,5 +34,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     TH1 *GetHistByName(const TString name);
Index: trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc	(revision 2043)
@@ -128,5 +128,5 @@
 // Be careful: Only call this with an object of type MHillas
 //
-Bool_t MHHillasSrc::Fill(const MParContainer *par, Double_t w)
+Bool_t MHHillasSrc::Fill(const MParContainer *par, const Stat_t w)
 {
     const MHillasSrc &h = *(MHillasSrc*)par;
Index: trunk/MagicSoft/Mars/mimage/MHHillasSrc.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillasSrc.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHHillasSrc.h	(revision 2043)
@@ -27,5 +27,5 @@
 
     Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     TH1 *GetHistByName(const TString name);
Index: trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc	(revision 2043)
@@ -142,5 +142,5 @@
 // Fill the histograms with data from a MNewImagePar container.
 //
-Bool_t MHNewImagePar::Fill(const MParContainer *par, Double_t w)
+Bool_t MHNewImagePar::Fill(const MParContainer *par, const Stat_t w)
 {
     const MNewImagePar &h = *(MNewImagePar*)par;
Index: trunk/MagicSoft/Mars/mimage/MHNewImagePar.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHNewImagePar.h	(revision 2042)
+++ trunk/MagicSoft/Mars/mimage/MHNewImagePar.h	(revision 2043)
@@ -27,5 +27,5 @@
 
     Bool_t SetupFill(const MParList *plist);
-    Bool_t Fill(const MParContainer *par, Double_t w=1);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
 
     TH1 *GetHistByName(const TString name);
