261 TMatrixDEigen eig(xxx);
262 TVectorD xxxEig ( eig.GetEigenValuesRe());
265 TEveVector v1(0, eig.GetEigenVectors()(1, 2), eig.GetEigenVectors()(2, 2));
268 TEveVector v2(0, eig.GetEigenVectors()(1, 1), eig.GetEigenVectors()(2, 1));
270 if (v1[1]*v2[2] > v1[2]*v2[1])
274 TEveProjection *proj =
fM->GetManager()->GetProjection();
277 bool splitted =
false;
283 if (proj->GetDisplaceOrigin())
284 bs = proj->RefCenter()[1];
286 float da = v2[1]*v2[1] + v1[1]*v1[1];
287 float db = 2 * v1[1] * (v0[1]-bs);
288 float dc = (v0[1]-bs)*(v0[1]-bs) - v2[1]*v2[1];
289 float disc = (db*db -4*da*dc);
293 float cosS1 = ( -db + disc)/(2 * da);
294 float cosS2 = ( -db - disc)/(2 * da);
299 double phi1 = acos(cosS1);
300 double phi2 = acos(cosS2);
301 TEveVector ps1 = v0 + v1*((float)
cos(phi1)) + v2*((
float)
sin(phi1));
302 TEveVector ps2 = v0 + v1*((
float)
cos(phi2)) + v2*((
float)
sin(phi2));
307 if (TMath::
Abs(ps1[1] - bs) > 1
e-5)
308 phi1 = TMath::
TwoPi() -phi1;
310 if (TMath::
Abs(ps2[1] - bs) > 1
e-5)
311 phi2 = TMath::
TwoPi() -phi2;
314 double phiStep = TMath::
TwoPi()/N;
315 double phiOffset = phiStep*0.1;
316 double phiMin = TMath::
Min(phi1, phi2);
317 double phiMax = TMath::
Max(phi1, phi2);
323 drawArch(phiMin + phiOffset, phiMax - phiOffset, phiStep, v0, v1, v2);
327 drawArch(phiMax + phiOffset, phiMax + TMath::
TwoPi() - (phiMax -phiMin) - phiOffset, phiStep, v0, v1, v2);
331 TGLUtil::LineWidth(
fE->fLineWidth);
332 TGLUtil::Color(
fE->fLineColor);
334 glBegin(GL_LINE_LOOP);
335 drawArch(phiMin + phiOffset, phiMax - phiOffset, phiStep, v0, v1, v2);
338 glBegin(GL_LINE_LOOP);
339 drawArch(phiMax + phiOffset, phiMax + TMath::
TwoPi() - (phiMax -phiMin) - phiOffset, phiStep, v0, v1, v2);
350 TGLUtil::LineWidth(
fE->fLineWidth);
351 TGLUtil::Color(
fE->fLineColor);
352 glBegin(GL_LINE_LOOP);
void drawArch(float pStart, float pEnd, float phiStep, TEveVector &v0, TEveVector &v1, TEveVector &v2) const
Sin< T >::type sin(const T &t)
void drawRhoZAxis(TEveVector &v, TEveVector &) const
Cos< T >::type cos(const T &t)
TEveEllipsoidProjected * fM