Make a contour plot and get the first contour in a TPolyMarker. 
This macro generates a color contour plot by selecting entries from an ntuple file. The TGraph object corresponding to the first contour line is accessed and displayed into a separate canvas.
 
void FirstContour()
{
 
   ntuple->
Draw(
"py:px",
"px*px+py*py < 20", 
"contz,list");
 
 
   
   
   
 
 
 
   if (!contours) return;
   if (!lcontour1) return;
   if (!gc1) return;
   if (gc1->
GetN() < 10) 
return;
 
 
   
 
   
   const Int_t npmax = 50000;
 
   while(1) {
      }
   }
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
 
R__EXTERN TRandom * gRandom
 
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
 
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
 
A TGraph is an object made of two arrays X and Y with npoints each.
 
virtual Int_t IsInside(Double_t x, Double_t y) const
Return 1 if the point (x,y) is inside the polygon defined by the graph vertices 0 otherwise.
 
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
 
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
 
TObject * At(Int_t idx) const override
 
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
 
A PolyMarker is defined by an array on N points in a 2-D space.
 
void Draw(Option_t *option="") override
Draw.
 
virtual void SetPoint(Int_t point, Double_t x, Double_t y)
Set point number n.
 
Double_t Rndm() override
Machine independent random number generator.
 
const char * Data() const
 
TString & ReplaceAll(const TString &s1, const TString &s2)
 
TString & Append(const char *cs)
 
A TTree represents a columnar dataset.
 
void Draw(Option_t *opt) override
Default Draw method for all objects.
 
- Author
 - Rene Brun 
 
Definition in file FirstContour.C.