346 static const double crustNe = 2.6*0.5;
359 Lnu = rdet*(sqrt(
util::sqr(rnu/rdet)+cosQ*cosQ-1.0)-cosQ);
363 x1 = x2+sqrt(1.0-cosQ*cosQ)*Lnu;
386 &xouta, &youta, &xoutb, &youtb);
387 L = util::pythag(x1-xoutb, y1-youtb);
391 L = util::pythag(x2-xoutb, y2-youtb);
393 Ns.push_back(crustNe);
402 for (i=0; i<
fRhi.size()-1; ++
i) {
404 &xouta, &youta, &xoutb, &youtb);
407 &xina, &yina, &xinb, &yinb);
416 L = util::pythag(xouta-xoutb, youta-youtb);
419 Ns.push_back(
fNe[i]);
421 else if (n1==2 && n2==2) {
426 L = util::pythag(xouta-xina, youta-yina);
428 Ns.push_front(
fNe[i]);
430 L = util::pythag(xoutb-xinb, youtb-yinb);
432 Ns.push_back(
fNe[i]);
441 &xouta, &youta, &xoutb, &youtb);
443 &xina, &yina, &xinb, &yinb);
453 L = util::pythag(xouta-x2, youta-y2);
456 L = util::pythag(xouta-xoutb, youta-youtb);
459 Ns.push_back(
fNe[i]);
461 else if (n1==2 && n2==2) {
466 L = util::pythag(xouta-xina, youta-yina);
468 Ns.push_front(
fNe[i]);
474 L = util::pythag(x2-xinb, y2-yinb);
477 L = util::pythag(xoutb-xinb, youtb-yinb);
480 Ns.push_back(
fNe[i]);
485 L = util::pythag(xouta-x1, youta-y1);
494 L = util::pythag(xoutb-x2, youtb-y2);
496 Ns.push_back(crustNe);
507 for (; itr!=itrEnd; ++itr) {
510 std::cout << ltot <<
" " << Lnu <<
std::endl;
511 if (fabs(ltot-Lnu)>1e-6) abort();
std::vector< double > fNe
int IntersectLineAndCircle(double x1, double y1, double x2, double y2, double r, double *xa, double *ya, double *xb, double *yb)
std::vector< double > fRlo
std::vector< double > fRhi
QTextStream & endl(QTextStream &s)