|
| void | lineCircleIntersection (const Amg::Vector3D &a, const Amg::Vector3D &b, const double &r, double &u1, double &u2) const |
| void | movePoint1ToZPlaneAndPoint2 (Amg::Vector3D &p1, const Amg::Vector3D &p2, const double &z) const |
| bool | clipSegmentToZInterval (Amg::Vector3D &a, Amg::Vector3D &b, const double &zmin, const double &zmax) const |
| void | movePoint1ToInfiniteCylinderAndPoint2 (Amg::Vector3D &p1, const Amg::Vector3D &p2, const double &r) const |
| bool | clipSegmentToInfiniteHollowCylinder (Amg::Vector3D &a, Amg::Vector3D &b, const double &rmin, const double &rmax, Amg::Vector3D &seg2_a, Amg::Vector3D &seg2_b) const |
| bool | clipSegmentToHollowCylinder (Amg::Vector3D &a, Amg::Vector3D &b, const double &rmin, const double &rmax, const double &zmin, const double &zmax, Amg::Vector3D &seg2_a, Amg::Vector3D &seg2_b) const |
| void | clipPathToHollowCylinder (const std::vector< Amg::Vector3D > &in, Amg::SetVectorVector3D &out, const double &rmin, const double &rmax, const double &zmin, const double &zmax) const |
| bool | touchesHollowCylinder (const std::vector< Amg::Vector3D > &path, const double &rmin, const double &rmax, const double &zmin, const double &zmax) const |
| void | projectPathToInfiniteCylinder (const std::vector< Amg::Vector3D > &in, Amg::SetVectorVector3D &outset, const double &r) const |
| void | projectPathToZPlane (const std::vector< Amg::Vector3D > &in, Amg::SetVectorVector3D &outset, const double &z) const |
| void | projectPathToZPlane_specialZtoR (const std::vector< Amg::Vector3D > &in, Amg::SetVectorVector3D &outset, const double &z) const |
Definition at line 86 of file InDetProjHelper.cxx.
◆ clipPathToHollowCylinder()
| void InDetProjHelper::Imp::clipPathToHollowCylinder |
( |
const std::vector< Amg::Vector3D > & | in, |
|
|
Amg::SetVectorVector3D & | out, |
|
|
const double & | rmin, |
|
|
const double & | rmax, |
|
|
const double & | zmin, |
|
|
const double & | zmax ) const |
Definition at line 667 of file InDetProjHelper.cxx.
672{
673
674
675
676
677
678
679
680
682 if (rmin>=rmax||rmin<0||zmin>=zmax) {
683 theclass->message(
"clipPathToHollowCylinder Error: Non-sensical cylinder parameters!");
684 return;
685 }
686 const unsigned n=in.size();
687 if (n<2)
688 return;
689
692 std::vector<Amg::Vector3D >
v;
693 for (
unsigned i = 1;
i<
n; ++
i) {
694
695
702 if (seg2_a!=seg2_b) {
707 }
708 } else {
709
710
711 if (
v.back() !=
a ) {
712 theclass->messageDebug(
"ERROR: Inconsistency found while building clip part");
716 }
718 if (seg2_a!=seg2_b) {
723 }
724 }
725 } else {
726
727
731 }
732 }
733 }
735
737 }
738}
bool clipSegmentToHollowCylinder(Amg::Vector3D &a, Amg::Vector3D &b, const double &rmin, const double &rmax, const double &zmin, const double &zmax, Amg::Vector3D &seg2_a, Amg::Vector3D &seg2_b) const
InDetProjHelper * theclass
Eigen::Matrix< double, 3, 1 > Vector3D
◆ clipSegmentToHollowCylinder()
Definition at line 614 of file InDetProjHelper.cxx.
618{
619
620
621
622
623
624
625
626
627
628
630
631
632
633 return false;
634 }
635
636
637
638
639
640
641
642
643
645
646
647
648 return false;
649 }
650
651
652
653
654
655
656
657
658
659
660
661
662
663 return true;
664}
bool clipSegmentToInfiniteHollowCylinder(Amg::Vector3D &a, Amg::Vector3D &b, const double &rmin, const double &rmax, Amg::Vector3D &seg2_a, Amg::Vector3D &seg2_b) const
bool clipSegmentToZInterval(Amg::Vector3D &a, Amg::Vector3D &b, const double &zmin, const double &zmax) const
◆ clipSegmentToInfiniteHollowCylinder()
Definition at line 481 of file InDetProjHelper.cxx.
484{
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500 const double ar2 =
a.x()*
a.x()+
a.y()*
a.y();
501 const double br2 =
b.x()*
b.x()+
b.y()*
b.y();
502 const double rmin2 = rmin*rmin;
503
504 if (ar2 <= rmin2 && br2 <= rmin2 ) {
505
506
507
508 return false;
509 }
510
511 if ( (
a.x()<=-rmax&&
b.x()<=-rmax) || (
a.x()>=rmax&&
b.x()>=rmax) || (
a.y()<=-rmax&&
b.y()<=-rmax)|| (
a.y()>=rmax&&
b.y()>=rmax) ) {
512
513
514
515 return false;
516 }
517
518
519 const double dx =
b.x()-
a.x();
520 const double dy =
b.y()-
a.y();
521 const double rmax2 = rmax*rmax;
522 if (dx==0.0&&dy==0.0) {
523
524
525
526 return ar2<=rmax2;
527 }
528
529 const double u = - (
a.y()*dy+
a.x()*dx)/(
dx*
dx+
dy*
dy);
530 const double px = (
u <= 0 ?
a.x() : ( u >= 1 ?
b.x() :
a.x()+u*dx ) );
531 const double py = (
u <= 0 ?
a.y() : ( u >= 1 ?
b.y() :
a.y()+u*dy ) );
533 if (pr2>=rmax2) {
534
535
536
537 return false;
538
539
540 }
541
542 seg2_a=seg2_b;
543
544 if (pr2>=rmin2&&ar2<=rmax2&&br2<=rmax2) {
545
546
547
548
549
550 return true;
551 }
552
553
554 if (ar2>rmax2||br2>rmax2) {
555
556
557 double u1, u2;
559 if (u1==u2) {
560
561 theclass->message(
"This should never happen(1).");
562
563 return false;
564 }
566 if (u1>0&&u1<1) {
567
569
570
571 }
572 if (u2>0&&u2<1) {
573
574 b = asave+u2*(
b-asave);
575
576
577 }
578 }
579
580 if (pr2>=rmin2) {
581
582
583 return true;
584 }
585
586 double u1, u2;
588
589 if (u1>0&&u1<1) {
590 if (u2>0&&u2<1) {
591
592
593
596 seg2_a=
a+u2*(seg2_b-
a);
597
598
599 return true;
600 }
602
603 return true;
604 }
605 if (u2>0&&u2<1)
607
608 return true;
609}
void lineCircleIntersection(const Amg::Vector3D &a, const Amg::Vector3D &b, const double &r, double &u1, double &u2) const
@ u
Enums for curvilinear frames.
◆ clipSegmentToZInterval()
| bool InDetProjHelper::Imp::clipSegmentToZInterval |
( |
Amg::Vector3D & | a, |
|
|
Amg::Vector3D & | b, |
|
|
const double & | zmin, |
|
|
const double & | zmax ) const |
Definition at line 391 of file InDetProjHelper.cxx.
393{
396 return false;
397
401 return true;
402 } else {
404
408 return true;
409 } else {
410
413 return false;
415 return true;
416 } else {
417
420 return true;
421 }
422 }
423 }
424}
void movePoint1ToZPlaneAndPoint2(Amg::Vector3D &p1, const Amg::Vector3D &p2, const double &z) const
◆ lineCircleIntersection()
| void InDetProjHelper::Imp::lineCircleIntersection |
( |
const Amg::Vector3D & | a, |
|
|
const Amg::Vector3D & | b, |
|
|
const double & | r, |
|
|
double & | u1, |
|
|
double & | u2 ) const |
Definition at line 450 of file InDetProjHelper.cxx.
452{
453 const double dx =
b.x()-
a.x();
454 const double dy =
b.y()-
a.y();
456 if (A==0.0) {
457
458 u1 = u2 = (
a.x()*
a.x()+
a.y()*
a.y() ==
r*
r ? 0.0 : 1.0e99 );
459 return;
460 }
461 double B = 2.0*(
a.x()*dx +
a.y()*dy );
462 double C =
a.x()*
a.x()+
a.y()*
a.y() -
r*
r;
463 double D =
B*
B-4*
A*
C;
464
465 if (D>0.0) {
466
467 double sqrtD = sqrt(D);
468 u1 = 0.5 * ( -
B - sqrtD) / A;
469 u2 = 0.5 * ( -
B + sqrtD) / A;
470 } else if (D<0.0) {
471
472 u1 = u2 = -1.0e99;
473 } else {
474
476 }
477
478}
◆ movePoint1ToInfiniteCylinderAndPoint2()
| void InDetProjHelper::Imp::movePoint1ToInfiniteCylinderAndPoint2 |
( |
Amg::Vector3D & | p1, |
|
|
const Amg::Vector3D & | p2, |
|
|
const double & | r ) const |
Definition at line 427 of file InDetProjHelper.cxx.
428{
429
430
431
432
433
434
435
438
439 if (dr==0.0) {
440 theclass->message(
"movePoint1ToInfiniteCylinderAndPoint2 Error: Points have same r!!");
441 return;
442 }
443 double s((
r-p1r)/dr);
446
447}
void setVector3DCartesian(Amg::Vector3D &v1, double x1, double y1, double z1)
Sets components in cartesian coordinate system.
double rVector3D(const Amg::Vector3D &v1)
Gets r-component in spherical coordinate system.
◆ movePoint1ToZPlaneAndPoint2()
Definition at line 378 of file InDetProjHelper.cxx.
379{
381 if (dz==0.0) {
382 theclass->message(
"movePoint1ToZPlaneAndPoint2 Error: Points have same z!!");
383 return;
384 }
385 double s( (
z-
p1.z())/dz );
386
388}
◆ projectPathToInfiniteCylinder()
Definition at line 741 of file InDetProjHelper.cxx.
743{
744 std::vector<Amg::Vector3D >
out(in);
745 std::vector<Amg::Vector3D >::iterator
it(
out.begin()),
itE(
out.end());
748 if (
it->x()==0.0 &&
it->y()==0.0 ) {
749 theclass->message(
"ERROR: Point has x==0 and y==0. Ambiguous projection of point.");
750
751
753 }
754 s =
r / sqrt(
it->x()*
it->x()+
it->y()*
it->y() );
755
756
757
760
761 }
762 outset.insert(out);
763}
◆ projectPathToZPlane()
Definition at line 766 of file InDetProjHelper.cxx.
768{
769 std::vector<Amg::Vector3D >
out(in);
770 std::vector<Amg::Vector3D >::iterator
it(
out.begin()),
itE(
out.end());
772
774 }
775 outset.insert(out);
776}
◆ projectPathToZPlane_specialZtoR()
Definition at line 803 of file InDetProjHelper.cxx.
806{
807 std::vector<Amg::Vector3D >
out(in);
808 std::vector<Amg::Vector3D >::iterator
it(
out.begin()),
itE(
out.end());
815 outset.insert(out);
816}
double endcap_zasr_endcapz_begin
double endcap_zasr_squeezefact
double endcap_zasr_innerradius
static void transformECPointToZPlane_specialZtoR(Amg::Vector3D &p, const double &planeZ, const double &planeRBegin, const double &endcapZBegin, const double &squeezeFactor)
◆ touchesHollowCylinder()
| bool InDetProjHelper::Imp::touchesHollowCylinder |
( |
const std::vector< Amg::Vector3D > & | path, |
|
|
const double & | rmin, |
|
|
const double & | rmax, |
|
|
const double & | zmin, |
|
|
const double & | zmax ) const |
Definition at line 945 of file InDetProjHelper.cxx.
948{
949 const double rmin2(rmin*rmin), rmax2(rmax*rmax);
951 std::vector<Amg::Vector3D >::const_iterator
it(
path.begin()),
itE(
path.end());
954 continue;
956 continue;
958 if (r2<rmin2)
959 continue;
960 if (r2<=rmax2)
961 return true;
962 }
963 return false;
964}
path
python interpreter configuration --------------------------------------—
◆ barrel_inner_radius
| double InDetProjHelper::Imp::barrel_inner_radius = 0.0 |
◆ barrel_outer_radius
| double InDetProjHelper::Imp::barrel_outer_radius = 0.0 |
◆ barrel_posneg_z
| double InDetProjHelper::Imp::barrel_posneg_z = 0.0 |
◆ covercyl_rmax
| double InDetProjHelper::Imp::covercyl_rmax = 0.0 |
◆ covercyl_rmin
| double InDetProjHelper::Imp::covercyl_rmin = 0.0 |
◆ covercyl_zmax
| double InDetProjHelper::Imp::covercyl_zmax = 0.0 |
◆ covercyl_zmin
| double InDetProjHelper::Imp::covercyl_zmin = 0.0 |
◆ data_disttosurface_epsilon
| double InDetProjHelper::Imp::data_disttosurface_epsilon = 0.0 |
◆ endcap_inner_radius
| double InDetProjHelper::Imp::endcap_inner_radius = 0.0 |
◆ endcap_outer_radius
| double InDetProjHelper::Imp::endcap_outer_radius = 0.0 |
◆ endcap_surface_length
| double InDetProjHelper::Imp::endcap_surface_length = 0.0 |
◆ endcap_surface_z
| double InDetProjHelper::Imp::endcap_surface_z = 0.0 |
◆ endcap_zasr_endcapz_begin
| double InDetProjHelper::Imp::endcap_zasr_endcapz_begin = 0.0 |
◆ endcap_zasr_innerradius
| double InDetProjHelper::Imp::endcap_zasr_innerradius = 0.0 |
◆ endcap_zasr_squeezefact
| double InDetProjHelper::Imp::endcap_zasr_squeezefact = 0.0 |
◆ parts
| InDetProjFlags::InDetProjPartsFlags InDetProjHelper::Imp::parts |
◆ surfacethickness
| double InDetProjHelper::Imp::surfacethickness = 0.0 |
◆ theclass
The documentation for this class was generated from the following file: