Skip to content
Snippets Groups Projects
Commit 9d68f513 authored by Olivier Couet's avatar Olivier Couet
Browse files

- Remove IsInside(x,y). It is now inherited from TGraph.

git-svn-id: http://root.cern.ch/svn/root/trunk@36495 27541ba8-7e3a-0410-8455-c3a389f83636
parent e94cfa0e
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,6 @@ public:
const char *GetVarX() const {return fVarX.Data();}
const char *GetVarY() const {return fVarY.Data();}
virtual Double_t IntegralHist(TH2 *h, Option_t *option="") const;
virtual Int_t IsInside(Double_t x, Double_t y) const;
virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void SetObjectX(TObject *obj) {fObjectX = obj;}
virtual void SetObjectY(TObject *obj) {fObjectY = obj;}
......
......@@ -342,27 +342,6 @@ Double_t TCutG::IntegralHist(TH2 *h, Option_t *option) const
}
//______________________________________________________________________________
Int_t TCutG::IsInside(Double_t x, Double_t y) const
{
// Function which returns 1 if point x,y lies inside the polygon defined by
// the graph points 0 otherwise. This function assumes that the first and
// the last point of the TCutG are the same (closed polygon).
//
// Algorithm:
// The loop is executed with the end-point coordinates of a line segment
// (X1,Y1)-(X2,Y2) and the Y-coordinate of a horizontal line.
// The counter inter is incremented if the line (X1,Y1)-(X2,Y2) intersects
// the horizontal line. In this case XINT is set to the X-coordinate of the
// intersection point. If inter is an odd number, then the point x,y is within
// the polygon.
//
// This function is based on an original algorithm developed by R.Nierhaus.
return (Int_t)TMath::IsInside(x,y,fNpoints,fX,fY);
}
//______________________________________________________________________________
void TCutG::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment