diff --git a/hist/hist/inc/TH2Poly.h b/hist/hist/inc/TH2Poly.h
index 97100ee34613f36ab570c8f15d2dc4efe5e0eff7..8b31c1f8d676bd6372017971ac7f70510b385c82 100644
--- a/hist/hist/inc/TH2Poly.h
+++ b/hist/hist/inc/TH2Poly.h
@@ -84,14 +84,14 @@ public:
    void        Draw(Option_t *option="");
    Int_t       Fill(Double_t x,Double_t y);
    Int_t       Fill(Double_t x,Double_t y, Double_t w);
+   Int_t       Fill(const char* name, Double_t w);
    void        FillN(Int_t ntimes, const Double_t* x, const Double_t* y, const Double_t* w, Int_t stride = 1);
-   Int_t       FindBin(Double_t x, Double_t y, Double_t z = 0);
    Int_t       Fill(Double_t){return -1;}                              //MayNotUse
-   Int_t       Fill(const char*, Double_t){return -1;}                 //MayNotUse
    Int_t       Fill(Double_t , const char *, Double_t){return -1;}     //MayNotUse
    Int_t       Fill(const char *, Double_t , Double_t ){return -1;}    //MayNotUse
    Int_t       Fill(const char *, const char *, Double_t ){return -1;} //MayNotUse
    void        FillN(Int_t, const Double_t*, const Double_t*, Int_t){return;}  //MayNotUse
+   Int_t       FindBin(Double_t x, Double_t y, Double_t z = 0);
    TList      *GetBins(){return fBins;}                                // Returns the TList of all bins in the histogram
    Double_t    GetBinContent(Int_t bin) const;
    Double_t    GetBinContent(Int_t, Int_t) const {return 0;}           //MayNotUse
@@ -127,7 +127,7 @@ protected:
    Double_t fOverflow[9];       //Overflow bins
    Int_t    fCellX;             //Number of partition cells in the x-direction of the histogram
    Int_t    fCellY;             //Number of partition cells in the y-direction of the histogram
-   Int_t    fNCells;            //Number of partition cells: fCellX*fCellY 
+   Int_t    fNCells;            //Number of partition cells: fCellX*fCellY
    TList   *fCells;             //[fNCells] The array of TLists that store the bins that intersect with each cell
    Double_t fStepX, fStepY;     //Dimensions of a partition cell
    Bool_t  *fIsEmpty;           //[fNCells] The array that returns true if the cell at the given coordinate is empty
diff --git a/hist/hist/src/TH2Poly.cxx b/hist/hist/src/TH2Poly.cxx
index 1a4c8f8348abb496720c47c899719f7181c95cd0..b656c5a5b7e036498c52520a3496391ab913f217 100644
--- a/hist/hist/src/TH2Poly.cxx
+++ b/hist/hist/src/TH2Poly.cxx
@@ -84,12 +84,12 @@ The following very simple macro shows how to build and fill a <tt>TH2Poly</tt>:
 {
    TH2Poly *h2p = new TH2Poly();
 
-   Double_t x1[] = {0, 5, 5};  
-   Double_t y1[] = {0, 0, 5};  
-   Double_t x2[] = {0, -1, -1, 0}; 
-   Double_t y2[] = {0, 0, -1, -1}; 
-   Double_t x3[] = {4, 3, 0, 1, 2.4}; 
-   Double_t y3[] = {4, 3.7, 1, 4.7, 3.5}; 
+   Double_t x1[] = {0, 5, 5};
+   Double_t y1[] = {0, 0, 5};
+   Double_t x2[] = {0, -1, -1, 0};
+   Double_t y2[] = {0, 0, -1, -1};
+   Double_t x3[] = {4, 3, 0, 1, 2.4};
+   Double_t y3[] = {4, 3.7, 1, 4.7, 3.5};
 
    h2p->AddBin(3, x1, y1);
    h2p->AddBin(3, x2, y2);
@@ -109,20 +109,20 @@ The partitioning algorithm forms an essential part of the <tt>TH2Poly</tt>
 class. It is implemented to speed up the filling of bins.
 <p>
 With the brute force approach, the filling is done in the following way:  An
-iterator loops over all bins in the <tt>TH2Poly</tt> and invokes the 
+iterator loops over all bins in the <tt>TH2Poly</tt> and invokes the
 method <tt>IsInside()</tt> for each of them.
 This method checks if the input location is in that bin. If the filling
 coordinate is inside, the bin is filled. Looping over all the bin is
-very slow. 
+very slow.
 <p>
 The alternative is to divide the histogram into virtual rectangular regions
-called "cells". Each cell stores the pointers of the bins intersecting it. 
+called "cells". Each cell stores the pointers of the bins intersecting it.
 When a coordinate is to be filled, the method finds which cell the coordinate
 falls into. Since the cells are rectangular, this can be done very quickly.
 It then only loops over the bins associated with that cell.
 <p>
 The addition of bins to the appropriate cells is done when the bin is added
-to the histogram. To do this, <tt>AddBin()</tt> calls the 
+to the histogram. To do this, <tt>AddBin()</tt> calls the
 <tt>AddBinToPartition()</tt> method.
 This method adds the input bin to the partitioning matrix.
 <p>
@@ -546,7 +546,7 @@ Int_t TH2Poly::Fill(Double_t x, Double_t y, Double_t w)
 
          SetBinContentChanged(kTRUE);
 
-         return 0;
+         return bin->GetBinNumber();
       }
    }
 
@@ -555,6 +555,31 @@ Int_t TH2Poly::Fill(Double_t x, Double_t y, Double_t w)
 }
 
 
+//______________________________________________________________________________
+Int_t TH2Poly::Fill(const char* name, Double_t w)
+{
+   // Increment the bin named "name" by w.
+
+   TString sname(name);
+
+   TIter    next(fBins);
+   TObject  *obj;
+   TH2PolyBin *bin;
+
+   while ((obj = next())) {
+      bin = (TH2PolyBin*) obj;
+      if (!sname.CompareTo(bin->GetPolygon()->GetName())) {
+         bin->Fill(w);
+         fEntries++;
+         SetBinContentChanged(kTRUE);
+         return bin->GetBinNumber();
+      }
+   }
+
+   return 0;
+}
+
+
 //______________________________________________________________________________
 void TH2Poly::FillN(Int_t ntimes, const Double_t* x, const Double_t* y,
                                const Double_t* w, Int_t stride)