Dear ROOTers,
I have a possible addition to the TGraph class. I needed a method to estimate where a line intersected another line or a TCutG region. Assuming these lines are straight lines between points, the added methods [GetIntersections(TGraph &b) and GetIntersections(TCutG &b)] find all the intersections and return them as a TGraph object. It is then up to the user to extract the points from this instance if they want the values (I have attached an example in linetest.C).
I don’t know if this method is redundant, I haven’t found anything like it in ROOT, but I would gladly “donate” it for inclusion in any case
Cheers,
Morten
linetest.C (3.57 KB)
TGraph.cxx (81.4 KB)
TGraph.h (9.54 KB)