27int main(
int argc,
char**argv)
39 JParser<> zap(
"Example program of JEllipse2D class.");
48 catch(
const exception &error) {
49 FATAL(error.what() << endl);
52 gRandom->SetSeed(seed);
59 gRandom->Gaus(0.0, 1.0)));
64 const JEllipse2D ellipse(ps.begin(), ps.end());
66 if (
debug >= debug_t) {
68 cout <<
"center: (" << ellipse.
getX() <<
", " << ellipse.
getY() <<
")" << endl;
69 cout <<
"major Semi-Axis: " << ellipse.
getMajorAxis() << endl;
70 cout <<
"minor Semi-Axis: " << ellipse.
getMinorAxis() << endl;
71 cout <<
"rotation (degrees): " << ellipse.
getAngle() * 180.0 / PI << endl;
77 for (
const auto& p : ps) {
78 X.push_back(p.getX());
79 Y.push_back(p.getY());
82 TGraph gs(X.size(), X.data(), Y.data());
86 TEllipse ts(ellipse.
getX(),
104 }
catch (
const exception& error) {
105 cerr <<
"error: " << error.what() << endl;
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for position in two dimensions.
double getY() const
Get y position.
double getX() const
Get x position.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getMajorAxis() const
Get major axis.
double getMinorAxis() const
Get minor axis.
double getAngle() const
Get rotation angle.
size_t numberOfIterations