47 RooEllipse::RooEllipse()
55 RooEllipse::~RooEllipse()
77 RooEllipse::RooEllipse(
const char *name, Double_t x1, Double_t x2, Double_t s1, Double_t s2, Double_t rho, Int_t points)
82 if(s1 <= 0 || s2 <= 0) {
83 coutE(InputArguments) <<
"RooEllipse::RooEllipse: bad parameter s1 or s2 < 0" << endl;
86 Double_t tmp= 1-rho*rho;
88 coutE(InputArguments) <<
"RooEllipse::RooEllipse: bad parameter |rho| > 1" << endl;
94 SetPoint(0,x1-s1,x2-s2);
95 SetPoint(1,x1+s1,x2+s2);
96 setYAxisLimits(x2-s2,x2+s2);
99 Double_t r,psi,phi,u1,u2,xx1,xx2,dphi(2*TMath::Pi()/points);
100 for(Int_t index= 0; index < points; index++) {
103 psi= atan2(s2*sin(phi),s1*cos(phi));
106 r= sqrt(tmp/(u1*u1 - 2*rho*u1*u2 + u2*u2));
109 SetPoint(index, xx1, xx2);
111 setYAxisLimits(xx2,xx2);
113 SetPoint(points, xx1, xx2);
116 updateYAxisLimits(xx2);
127 void RooEllipse::printName(ostream& os)
const
136 void RooEllipse::printTitle(ostream& os)
const
145 void RooEllipse::printClassName(ostream& os)
const
147 os << IsA()->GetName() ;
154 void RooEllipse::printMultiline(ostream& os, Int_t contents, Bool_t verbose, TString indent)
const
156 RooPlotable::printMultiline(os,contents,verbose,indent);
157 for(Int_t index=0; index < fNpoints; index++) {
158 os << indent <<
"Point [" << index <<
"] is at (" << fX[index] <<
"," << fY[index] <<
")" << endl;