Hi ROOTers,
I created via the graphics editor a TCutG object, “backg1”,
now I need to get the area of a closed region included in this object.
I saved the cut as text file
then I run this script as a macro and after I tryed to use
cutg->Area();
in order to obtain the area
root [1] TCutG *cutg = new TCutG(“backg1”,13);
root [2] cutg->SetVarX(“tofp”);
root [3] cutg->SetVarY(“enep”);
root [4] cutg->SetTitle(“Graph”);
root [5] cutg->SetFillColor(1);
root [6] cutg->SetPoint(0,1494.9,1104.17);
root [7] cutg->SetPoint(1,1400.72,1243.06);
root [8] cutg->SetPoint(2,1327.95,1266.2);
root [9] cutg->SetPoint(3,1289.42,1150.46);
root [10] cutg->SetPoint(4,1308.68,953.704);
root [11] cutg->SetPoint(5,1421.07,739.665);
root [12] cutg->SetPoint(6,1469.27,695.374);
root [13] cutg->SetPoint(7,1527.01,652.778);
root [14] cutg->SetPoint(8,1589.08,693.287);
root [15] cutg->SetPoint(9,1619.05,785.222);
root [16] cutg->SetPoint(10,1583.45,934.547);
root [17] cutg->SetPoint(11,1541.99,1023.15);
root [18] cutg->SetPoint(12,1494.9,1104.17);
root [19] cutg->Draw("");
root [20] cutg->Area();
Error: Can’t call TCutG::Area() in current scope (tmpfile):1:
Possible candidates are…
(in TCutG)
(in TGraph)
*** Interpreter error recovered ***
but it doesn’t work…
My question is: does it possible to get the area using the ROOT version 5.18 ???
How?
Thanks and regards
R.