43 svBuf[
i].isComplete =
true;
44 svBuf[
i].isValid_ =
true;
48 svBuf[
i].r3 =
Point(0,0,0);
50 svBuf[
i].bfGradLoc =
Vector(0,0,0);
92 std::pair<TrajectoryStateOnSurface, double>
94 const Plane& pDest)
const {
106 std::pair<TrajectoryStateOnSurface, double>
121 std::pair<FreeTrajectoryState, double>
137 std::pair<FreeTrajectoryState, double>
141 if ((pDest1-pDest2).
mag() < 1
e-10){
143 edm::LogWarning(
"SteppingHelixPropagator")<<
"Can't propagate: the points should be at a bigger distance" 153 propagate(svBuf[0], pDest1, pDest2,svCurrent);
162 std::pair<FreeTrajectoryState, double>
167 pDest1.y() + beamSpot.
dydz()*1e3,
179 edm::LogWarning(
"SteppingHelixPropagator")<<
"Can't propagate: invalid input state" 186 const Plane* pDest =
dynamic_cast<const Plane*
>(&sDest);
209 edm::LogWarning(
"SteppingHelixPropagator")<<
"Can't propagate: invalid input state" 222 double pars[6] = { rPlane.x(), rPlane.y(), rPlane.z(),
223 nPlane.x(), nPlane.y(), nPlane.z() };
230 if (sStart.
path() < svBuf[
cIndex_(nPoints-1)].path()) lDir = 1.;
231 if (sStart.
path() > svBuf[
cIndex_(nPoints-1)].path()) lDir = -1.;
232 svBuf[
cIndex_(nPoints-1)].dir = lDir;
234 out = svBuf[
cIndex_(nPoints-1)];
245 edm::LogWarning(
"SteppingHelixPropagator")<<
"Can't propagate: invalid input state" 255 double pars[6] = {0,0,0,0,0,0};
264 if (sStart.
path() < svBuf[
cIndex_(nPoints-1)].path()) lDir = 1.;
265 if (sStart.
path() > svBuf[
cIndex_(nPoints-1)].path()) lDir = -1.;
266 svBuf[
cIndex_(nPoints-1)].dir = lDir;
267 out= svBuf[
cIndex_(nPoints-1)];
278 edm::LogWarning(
"SteppingHelixPropagator")<<
"Can't propagate: invalid input state" 288 double pars[6] = {pDest.
x(), pDest.
y(), pDest.
z(), 0, 0, 0};
293 out = svBuf[
cIndex_(nPoints-1)];
302 if ((pDest1-pDest2).
mag() < 1
e-10 || !sStart.
isValid()){
304 if ((pDest1-pDest2).mag() < 1
e-10)
305 edm::LogWarning(
"SteppingHelixPropagator")<<
"Can't propagate: points are too close" 308 edm::LogWarning(
"SteppingHelixPropagator")<<
"Can't propagate: invalid input state" 318 double pars[6] = {pDest1.
x(), pDest1.
y(), pDest1.
z(),
319 pDest2.
x(), pDest2.
y(), pDest2.
z()};
323 out = svBuf[
cIndex_(nPoints-1)];
330 svBuf[
cIndex_(nPoints)] = sStart;
332 svBuf[
cIndex_(nPoints)] = sStart;
345 const double pars[6],
double epsilon)
const{
362 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
" Failed after first refToDest check with status " 370 bool makeNextStep =
true;
377 double distMag = 1e12;
378 double tanDistMag = 1e12;
380 double distMat = 1e12;
381 double tanDistMat = 1e12;
383 double tanDistNextCheck = -0.1;
384 double tanDistMagNextCheck = -0.1;
385 double tanDistMatNextCheck = -0.1;
392 bool isFirstStep =
true;
393 bool expectNewMagVolume =
false;
396 while (makeNextStep){
398 svCurrent = &svBuf[
cIndex_(nPoints-1)];
399 double curZ = svCurrent->
r3.z();
400 double curR = svCurrent->
r3.perp();
401 if ( fabs(curZ) < 440 && curR < 260) dStep =
defaultStep_*2;
407 if (!
useIsYokeFlag_ && fabs(curZ) < 667 && curR > 380 && curR < 850){
408 dStep = 5*(1+0.2*svCurrent->
p3.mag());
414 tanDistNextCheck -= oldDStep;
415 tanDistMagNextCheck -= oldDStep;
416 tanDistMatNextCheck -= oldDStep;
418 if (tanDistNextCheck < 0){
420 if (! isFirstStep)
refToDest(type, (*svCurrent), pars, dist, tanDist, refDirection);
422 if (fabs(tanDist) > 4.*(fabs(dist)) ) tanDist *= tanDist == 0 ? 0 :fabs(dist/tanDist*4.);
424 tanDistNextCheck = fabs(tanDist)*0.5 - 0.5;
427 oldRefDirection = refDirection;
429 tanDist = tanDist > 0. ? tanDist - oldDStep : tanDist + oldDStep;
430 refDirection = oldRefDirection;
431 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Skipped refToDest: guess tanDist = "<<tanDist
432 <<
" next check at "<<tanDistNextCheck<<std::endl;
435 double fastSkipDist = fabs(dist) > fabs(tanDist) ? tanDist : dist;
441 if (fabs(tanDist)<0.1 && refDirection != dir ){
444 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"NOTE: overstepped last time: switch direction (can do it if within 1 mm)"<<std::endl;
449 if (tanDistMagNextCheck < 0){
450 resultToMag =
refToMagVolume((*svCurrent), dir, distMag, tanDistMag, fabs(fastSkipDist), expectNewMagVolume, fabs(tanDist));
452 if (fabs(tanDistMag) > 4.*(fabs(distMag)) ) tanDistMag *= tanDistMag == 0 ? 0 : fabs(distMag/tanDistMag*4.);
454 tanDistMagNextCheck = fabs(tanDistMag)*0.5-0.5;
457 || fabs(dist) < fabs(distMag)
464 tanDistMag = tanDistMag > 0. ? tanDistMag - oldDStep : tanDistMag + oldDStep;
465 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Skipped refToMag: guess tanDistMag = "<<tanDistMag
466 <<
" next check at "<<tanDistMagNextCheck;
471 if (tanDistMatNextCheck < 0){
472 resultToMat =
refToMatVolume((*svCurrent), dir, distMat, tanDistMat, fabs(fastSkipDist));
474 if (fabs(tanDistMat) > 4.*(fabs(distMat)) ) tanDistMat *= tanDistMat == 0 ? 0 : fabs(distMat/tanDistMat*4.);
476 tanDistMatNextCheck = fabs(tanDistMat)*0.5-0.5;
479 || fabs(dist) < fabs(distMat)
486 tanDistMat = tanDistMat > 0. ? tanDistMat - oldDStep : tanDistMat + oldDStep;
487 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Skipped refToMat: guess tanDistMat = "<<tanDistMat
488 <<
" next check at "<<tanDistMatNextCheck;
492 double rDotP = svCurrent->
r3.dot(svCurrent->
p3);
493 if ((fabs(curZ) > 1.5e3 || curR >800.)
497 dStep = fabs(tanDist) -1
e-12;
499 double tanDistMin = fabs(tanDist);
500 if (tanDistMin > fabs(tanDistMag)+0.05 &&
502 tanDistMin = fabs(tanDistMag)+0.05;
503 expectNewMagVolume =
true;
504 }
else expectNewMagVolume =
false;
507 tanDistMin = fabs(tanDistMat)+0.05;
508 if (expectNewMagVolume) expectNewMagVolume =
false;
511 if (tanDistMin*fabs(svCurrent->
dEdx) > 0.5*svCurrent->
p3.mag()){
512 tanDistMin = 0.5*svCurrent->
p3.mag()/fabs(svCurrent->
dEdx);
513 if (expectNewMagVolume) expectNewMagVolume =
false;
518 double tanDistMinLazy = fabs(tanDistMin);
520 && fabs(tanDist) < 2.*fabs(tanDistMin) ){
522 tanDistMinLazy = fabs(tanDistMin)*0.5;
525 if (fabs(tanDistMinLazy) < dStep){
526 dStep = fabs(tanDistMinLazy);
532 if (dStep > 1
e-10 && ! (fabs(dist) < fabs(epsilon))){
547 nPoints++; svCurrent = &svBuf[
cIndex_(nPoints-1)];
550 tanDistNextCheck = -1;
551 tanDistMagNextCheck = -1;
552 tanDistMatNextCheck = -1;
557 if (nOsc>1 && fabs(dStep)>epsilon){
558 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Ooops"<<std::endl;
564 && fabs(dStep) < fabs(epsilon) ){
567 double nextTanDist = 0;
571 nPoints++; svCurrent = &svBuf[
cIndex_(nPoints-1)];
572 refToDest(type, (*svCurrent), pars, nextDist, nextTanDist, nextRefDirection);
573 if ( fabs(nextDist) > fabs(dist)){
574 nPoints--; svCurrent = &svBuf[
cIndex_(nPoints-1)];
577 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Found real local minimum in PCA"<<std::endl;
583 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Found branch point in PCA"<<std::endl;
593 curZ = svCurrent->
r3.z();
594 curR = svCurrent->
r3.perp();
607 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
" Propagation failed with status " 611 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
" Momentum at last point is too low (<0.1) p_last = " 612 <<svCurrent->
p3.mag()
615 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
" Went too far: the last point is at "<<svCurrent->
r3 618 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
" Infinite loop condidtion detected: going in cycles. Break after 6 cycles" 621 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
" Tired to go farther. Made too many steps: more than " 630 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"going to radius "<<pars[
RADIUS_P]<<std::endl;
633 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"going to z "<<pars[
Z_P]<<std::endl;
636 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"going to pathL "<<pars[
PATHL_P]<<std::endl;
640 Point rPlane(pars[0], pars[1], pars[2]);
641 Vector nPlane(pars[3], pars[4], pars[5]);
642 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"going to plane r0:"<<rPlane<<
" n:"<<nPlane<<std::endl;
647 Point rDest(pars[0], pars[1], pars[2]);
648 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"going to PCA to point "<<rDest<<std::endl;
653 Point rDest1(pars[0], pars[1], pars[2]);
654 Point rDest2(pars[3], pars[4], pars[5]);
655 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"going to PCA to line "<<rDest1<<
" - "<<rDest2<<std::endl;
659 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"going to NOT IMPLEMENTED"<<std::endl;
662 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Made "<<nPoints-1<<
" steps and stopped at(cur step) "<<svCurrent->
r3<<
" nOsc "<<nOsc<<std::endl;
685 float gpmag = gPointNorZ.
mag2();
686 float pmag2 = p3.mag2();
687 if (gpmag > 1e20f ) {
688 LogTrace(metname)<<
"Initial point is too far";
692 if (pmag2 < 1
e-18
f ) {
693 LogTrace(metname)<<
"Initial momentum is too low";
697 if (! (gpmag == gpmag) ) {
698 LogTrace(metname)<<
"Initial point is a nan";
699 edm::LogWarning(
"SteppingHelixPropagatorNAN")<<
"Initial point is a nan";
703 if (! (pmag2 == pmag2) ) {
704 LogTrace(metname)<<
"Initial momentum is a nan";
705 edm::LogWarning(
"SteppingHelixPropagatorNAN")<<
"Initial momentum is a nan";
716 double curRad = svCurrent.
r3.perp();
717 if (curRad > 380 && curRad < 850 && fabs(svCurrent.
r3.z()) < 667){
724 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Failed to cast into VolumeBasedMagneticField: fall back to the default behavior"<<std::endl;
728 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Got volume at "<<svCurrent.
magVol<<std::endl;
735 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Loaded bfield float: "<<bf
736 <<
" at global float "<< gPointNorZ<<
" double "<< svCurrent.
r3<<std::endl;
739 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"\t cf in local locF: "<<lbf<<
" at "<<lPoint<<std::endl;
741 svCurrent.
bf.set(bf.
x(), bf.
y(), bf.
z());
745 svCurrent.
bf.set(bf.x(), bf.y(), bf.z());
747 if (svCurrent.
bf.mag2() < 1
e-32) svCurrent.
bf.set(0., 0., 1
e-16);
749 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific
750 <<
"Loaded bfield double: "<<svCurrent.
bf<<
" from float: "<<bf
751 <<
" at float "<< gPointNorZ<<
" double "<< svCurrent.
r3<<std::endl;
756 double dEdXPrime = 0;
760 dEdx =
getDeDx(svCurrent, dEdXPrime, radX0, rzLims);
762 svCurrent.
radX0 = radX0;
763 svCurrent.
rzLims = rzLims;
771 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Loaded at path: "<<svCurrent.
path()<<
" radPath: "<<svCurrent.
radPath()
772 <<
" p3 "<<
" pt: "<<svCurrent.
p3.perp()<<
" phi: "<<svCurrent.
p3.phi()
773 <<
" eta: "<<svCurrent.
p3.eta()
775 <<
" r3: "<<svCurrent.
r3 776 <<
" bField: "<<svCurrent.
bf.mag()
778 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Input Covariance in Curvilinear RF "<<covCurv<<std::endl;
788 svNext.
q = svPrevious.
q;
789 svNext.
dir = dS > 0.0 ? 1.: -1.;
790 svNext.
p3 =
tau; svNext.
p3*=(svPrevious.
p3.mag() - svNext.
dir*fabs(dP));
792 svNext.
r3 = svPrevious.
r3; svNext.
r3 += drVec;
805 double curRad = svNext.
r3.perp();
806 if (curRad > 380 && curRad < 850 && fabs(svNext.
r3.z()) < 667){
813 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Failed to cast into VolumeBasedMagneticField"<<std::endl;
817 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Got volume at "<<svNext.
magVol<<std::endl;
823 svNext.
bf.set(bf.x(), bf.y(), bf.z());
827 svNext.
bf.set(bf.x(), bf.y(), bf.z());
829 if (svNext.
bf.mag2() < 1
e-32) svNext.
bf.set(0., 0., 1
e-16);
832 double dEdXPrime = 0;
836 dEdx =
getDeDx(svNext, dEdXPrime, radX0, rzLims);
838 svNext.
radX0 = radX0;
846 ROOT::Math::AssignSym::Evaluate(svNext.
covCurv, tmp*ROOT::Math::Transpose(dCovCurvTransform));
856 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Now at path: "<<svNext.
path()<<
" radPath: "<<svNext.
radPath()
857 <<
" p3 "<<
" pt: "<<svNext.
p3.perp()<<
" phi: "<<svNext.
p3.phi()
858 <<
" eta: "<<svNext.
p3.eta()
861 <<
" dPhi: "<<acos(svNext.
p3.unit().dot(svPrevious.
p3.unit()))
862 <<
" bField: "<<svNext.
bf.mag()
863 <<
" dedx: "<<svNext.
dEdx 865 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"New Covariance "<<svNext.
covCurv<<std::endl;
866 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Transf by dCovTransform "<<dCovCurvTransform<<std::endl;
874 rep.
lY = zRep.cross(tau); rep.
lY *= 1./tau.perp();
875 rep.
lZ = rep.
lX.cross(rep.
lY);
885 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Make atom step "<<svCurrent.
path()<<
" with step "<<dS<<
" in direction "<<dir<<std::endl;
891 double curP = svCurrent.
p3.mag();
905 double p0Inv = 1./p0;
906 double b0 = svCurrent.
bf.mag();
909 double phi = (2.99792458e-3*svCurrent.
q*b0*p0Inv)*dS/2.;
910 bool phiSmall = fabs(phi) < 1
e-4;
915 double oneLessCosPhi=0;
916 double oneLessCosPhiOPhi=0;
917 double phiLessSinPhiOPhi=0;
920 double phi2 = phi*
phi;
921 double phi3 = phi2*
phi;
922 double phi4 = phi3*
phi;
923 oneLessCosPhi = phi2/2. - phi4/24. + phi2*phi4/720.;
924 oneLessCosPhiOPhi = 0.5*phi - phi3/24. + phi2*phi3/720.;
925 phiLessSinPhiOPhi = phi*phi/6. - phi4/120. + phi4*phi2/5040.;
929 oneLessCosPhi = 1.-cosPhi;
930 oneLessCosPhiOPhi = oneLessCosPhi/
phi;
931 double sinPhiOPhi = sinPhi/
phi;
932 phiLessSinPhiOPhi = 1 - sinPhiOPhi;
935 Vector bHat = svCurrent.
bf; bHat *= 1./b0;
938 Vector btVec(bHat.cross(tau));
939 double tauB = tau.dot(bHat);
940 Vector bbtVec(bHat*tauB - tau);
943 drVec = bbtVec*phiLessSinPhiOPhi; drVec -= btVec*oneLessCosPhiOPhi; drVec +=
tau;
946 double dEdx = svCurrent.
dEdx;
948 radX0 = svCurrent.
radX0;
952 drVec += svCurrent.
r3;
957 bf.set(bfGV.
x(), bfGV.
y(), bfGV.
z());
960 bf.set(bfGV.
x(), bfGV.
y(), bfGV.
z());
966 bf.set(0., 0., 1
e-16);
969 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Improved b "<<b0
970 <<
" at r3 "<<drVec<<std::endl;
973 if (fabs((b0-b0Init)*dS) > 1){
976 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Large bf*dS change "<<fabs((b0-svCurrent.
bf.mag())*dS)
977 <<
" --> recalc dedx"<<std::endl;
981 svNext.
p3 = svCurrent.
p3;
985 dEdx =
getDeDx(svNext, dEdXPrime, radX0, rzTmp);
988 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"New dEdX= "<<dEdx
990 <<
" for p0 "<<p0<<std::endl;
994 p0 += dP/2.;
if (p0 < 1
e-2) p0 = 1
e-2;
997 phi = (2.99792458e-3*svCurrent.
q*b0*p0Inv)*dS;
998 phiSmall = fabs(phi) < 1
e-4;
1001 double phi2 = phi*
phi;
1002 double phi3 = phi2*
phi;
1003 double phi4 = phi3*
phi;
1004 sinPhi = phi - phi3/6. + phi4*phi/120.;
1005 cosPhi = 1. -phi2/2. + phi4/24.;
1006 oneLessCosPhi = phi2/2. - phi4/24. + phi2*phi4/720.;
1007 oneLessCosPhiOPhi = 0.5*phi - phi3/24. + phi2*phi3/720.;
1008 phiLessSinPhiOPhi = phi*phi/6. - phi4/120. + phi4*phi2/5040.;
1012 oneLessCosPhi = 1.-cosPhi;
1013 oneLessCosPhiOPhi = oneLessCosPhi/
phi;
1014 double sinPhiOPhi = sinPhi/
phi;
1015 phiLessSinPhiOPhi = 1. - sinPhiOPhi;
1018 bHat = bf; bHat *= 1./b0;
1020 btVec = bHat.cross(tau);
1021 tauB = tau.dot(bHat);
1022 bbtVec = bHat*tauB -
tau;
1024 tauNext = bbtVec*oneLessCosPhi; tauNext -= btVec*sinPhi; tauNext +=
tau;
1025 double tauNextPerpInv = 1./tauNext.perp();
1026 drVec = bbtVec*phiLessSinPhiOPhi; drVec -= btVec*oneLessCosPhiOPhi; drVec +=
tau;
1032 double dX0 = fabs(dS)/radX0;
1039 double x0 = fabs(svCurrent.
radPath());
1040 double alphaX0 = 13.6e-3*p0Inv; alphaX0 *= alphaX0;
1041 double betaX0 = 0.038;
1042 double logx0p1 =
log(x0+1);
1043 theta02 = dX0*alphaX0*(1+betaX0*logx0p1)*(1 + betaX0*logx0p1 + 2.*betaX0*x0/(x0+1) );
1045 theta02 = 196
e-6* p0Inv * p0Inv * dX0;
1048 double epsilonP0 = 1.+ dP/(p0-0.5*dP);
1052 Vector tbtVec(bHat - tauB*tau);
1067 double qbp = svCurrent.
q*p0Inv;
1072 double t11 = tau.x();
double t12 = tau.y();
double t13 = tau.z();
1073 double t21 = tauNext.x();
double t22 = tauNext.y();
double t23 = tauNext.z();
1074 double cosl0 = tau.perp();
1076 double cosecl1 = tauNextPerpInv;
1086 double sint = -sinPhi;
double cost = cosPhi;
1087 double hn1 = hn.x();
double hn2 = hn.y();
double hn3 = hn.z();
1088 double dx1 = dx.x();
double dx2 = dx.y();
double dx3 = dx.z();
1091 double gamma = hn1*t21 + hn2*t22 + hn3*t23;
1092 double an1 = hn2*t23 - hn3*t22;
1093 double an2 = hn3*t21 - hn1*t23;
1094 double an3 = hn1*t22 - hn2*t21;
1096 double auInv = cosl0;
double au = auInv>0 ? 1./auInv : 1e24;
1098 double u11 = -au*t12;
double u12 = au*t11;
1099 double v11 = -t13*u12;
double v12 = t13*u11;
double v13 = auInv;
1100 auInv =
sqrt(1. - t23*t23); au = auInv>0 ? 1./auInv : 1e24;
1102 double u21 = -au*t22;
double u22 = au*t21;
1103 double v21 = -t23*u22;
double v22 = t23*u21;
double v23 = auInv;
1110 double anv = -(hn1*u21 + hn2*u22 );
1111 double anu = (hn1*v21 + hn2*v22 + hn3*v23);
1112 double omcost = oneLessCosPhi;
double tmsint = -phi*phiLessSinPhiOPhi;
1114 double hu1 = - hn3*u12;
1115 double hu2 = hn3*u11;
1116 double hu3 = hn1*u12 - hn2*u11;
1118 double hv1 = hn2*v13 - hn3*v12;
1119 double hv2 = hn3*v11 - hn1*v13;
1120 double hv3 = hn1*v12 - hn2*v11;
1123 dCCurvTransform(0,0) = 1./(epsilonP0*epsilonP0)*(1. + dS*dEdXPrime);
1127 dCCurvTransform(1,0) = phi*p0/svCurrent.
q*cosecl1*
1128 (sinPhi*bbtVec.z() - cosPhi*btVec.z());
1132 dCCurvTransform(1,1) = cost*(v11*v21 + v12*v22 + v13*v23) +
1133 sint*(hv1*v21 + hv2*v22 + hv3*v23) +
1134 omcost*(hn1*v11 + hn2*v12 + hn3*v13) * (hn1*v21 + hn2*v22 + hn3*v23) +
1135 anv*(-sint*(v11*t21 + v12*t22 + v13*t23) +
1136 omcost*(v11*an1 + v12*an2 + v13*an3) -
1137 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
1139 dCCurvTransform(1,2) = cost*(u11*v21 + u12*v22 ) +
1140 sint*(hu1*v21 + hu2*v22 + hu3*v23) +
1141 omcost*(hn1*u11 + hn2*u12 ) * (hn1*v21 + hn2*v22 + hn3*v23) +
1142 anv*(-sint*(u11*t21 + u12*t22 ) +
1143 omcost*(u11*an1 + u12*an2 ) -
1144 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
1145 dCCurvTransform(1,2) *= cosl0;
1155 dCCurvTransform(2,0) = - phi*p0/svCurrent.
q*cosecl1*cosecl1*
1156 (oneLessCosPhi*bHat.z()*btVec.mag2() + sinPhi*btVec.z() + cosPhi*tbtVec.z()) ;
1159 dCCurvTransform(2,1) = cost*(v11*u21 + v12*u22 ) +
1160 sint*(hv1*u21 + hv2*u22 ) +
1161 omcost*(hn1*v11 + hn2*v12 + hn3*v13) *
1162 (hn1*u21 + hn2*u22 ) +
1163 anu*(-sint*(v11*t21 + v12*t22 + v13*t23) +
1164 omcost*(v11*an1 + v12*an2 + v13*an3) -
1165 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
1166 dCCurvTransform(2,1) *= cosecl1;
1168 dCCurvTransform(2,2) = cost*(u11*u21 + u12*u22 ) +
1169 sint*(hu1*u21 + hu2*u22 ) +
1170 omcost*(hn1*u11 + hn2*u12 ) *
1171 (hn1*u21 + hn2*u22 ) +
1172 anu*(-sint*(u11*t21 + u12*t22 ) +
1173 omcost*(u11*an1 + u12*an2 ) -
1174 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
1175 dCCurvTransform(2,2) *= cosecl1*cosl0;
1187 dCCurvTransform(3,0) = - pp*(u21*dx1 + u22*dx2 );
1188 dCCurvTransform(4,0) = - pp*(v21*dx1 + v22*dx2 + v23*dx3);
1191 dCCurvTransform(3,1) = (sint*(v11*u21 + v12*u22 ) +
1192 omcost*(hv1*u21 + hv2*u22 ) +
1193 tmsint*(hn1*u21 + hn2*u22 ) *
1194 (hn1*v11 + hn2*v12 + hn3*v13))/q;
1196 dCCurvTransform(3,2) = (sint*(u11*u21 + u12*u22 ) +
1197 omcost*(hu1*u21 + hu2*u22 ) +
1198 tmsint*(hn1*u21 + hn2*u22 ) *
1199 (hn1*u11 + hn2*u12 ))*cosl0/q;
1201 dCCurvTransform(3,3) = (u11*u21 + u12*u22 );
1203 dCCurvTransform(3,4) = (v11*u21 + v12*u22 );
1207 dCCurvTransform(4,1) = (sint*(v11*v21 + v12*v22 + v13*v23) +
1208 omcost*(hv1*v21 + hv2*v22 + hv3*v23) +
1209 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
1210 (hn1*v11 + hn2*v12 + hn3*v13))/q;
1212 dCCurvTransform(4,2) = (sint*(u11*v21 + u12*v22 ) +
1213 omcost*(hu1*v21 + hu2*v22 + hu3*v23) +
1214 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
1215 (hn1*u11 + hn2*u12 ))*cosl0/q;
1217 dCCurvTransform(4,3) = (u11*v21 + u12*v22 );
1219 dCCurvTransform(4,4) = (v11*v21 + v12*v22 + v13*v23);
1225 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"rep X: "<<rep.
lX<<
" "<<rep.
lX.mag()
1226 <<
"\t Y: "<<rep.
lY<<
" "<<rep.
lY.mag()
1227 <<
"\t Z: "<<rep.
lZ<<
" "<<rep.
lZ.mag();
1233 double mulRR = theta02*dS*dS/3.;
1234 double mulRP = theta02*fabs(dS)*p0/2.;
1235 double mulPP = theta02*p0*p0;
1236 double losPP = dP*dP*1.6/fabs(dS)*(1.0 + p0*1
e-3);
1243 double sinThetaInv = tauNextPerpInv;
1244 double p0Mat = p0+ 0.5*dP;
1245 double p0Mat2 = p0Mat*p0Mat;
1249 svCurrent.
matDCovCurv(0,0) = losPP/(p0Mat2*p0Mat2);
1263 svCurrent.
matDCovCurv(2,2) = mulPP/p0Mat2*(sinThetaInv*sinThetaInv);
1264 svCurrent.
matDCovCurv(2,3) = mulRP/p0Mat*sinThetaInv;
1269 svCurrent.
matDCovCurv(3,2) = mulRP/p0Mat*sinThetaInv;
1290 dP = -dP > pMag ? -pMag+1
e-5 : dP;
1293 getNextState(svCurrent, svNext, dP, tauNext, drVec, dS, dS/radX0,
1299 double& dEdXPrime,
double& radX0,
1308 double lR = sv.
r3.perp();
1309 double lZ = fabs(sv.
r3.z());
1314 double dEdX_HCal = 0.95;
1315 double dEdX_ECal = 0.45;
1316 double dEdX_coil = 0.35;
1318 double dEdX_MCh = 0.053;
1319 double dEdX_Trk = 0.0114;
1320 double dEdX_Air = 2E-4;
1321 double dEdX_Vac = 0.0;
1323 double radX0_HCal = 1.44/0.8;
1324 double radX0_ECal = 0.89/0.7;
1325 double radX0_coil = 4.;
1326 double radX0_Fe = 1.76;
1327 double radX0_MCh = 1e3;
1328 double radX0_Trk = 320.;
1329 double radX0_Air = 3.e4;
1330 double radX0_Vac = 3.e9;
1334 if (! (lR < 380 && lZ < 785)){
1336 if (lZ < 785 ) rzLims =
MatBounds(380, 1
e4, 0, 785);
1346 dEdx = dEdX_Vac; radX0 = radX0_Vac;
1352 dEdx = dEdX_Trk; radX0 = radX0_Trk;
1356 double lEtaDet = fabs(sv.
r3.eta());
1357 double scaleRadX = lEtaDet > 1.5 ? 0.7724 : 1./cosh(0.5*lEtaDet);
1358 scaleRadX *= scaleRadX;
1359 if (lEtaDet > 2 && lZ > 20) scaleRadX *= (lEtaDet-1.);
1360 if (lEtaDet > 2.5 && lZ > 20) scaleRadX *= (lEtaDet-1.);
1364 else if ( lZ < 294 + ecShift ){
1366 rzLims =
MatBounds(2.9, 129, 294, 294 + ecShift);
1367 dEdx = dEdX_Air; radX0 = radX0_Air;
1369 else if (lZ < 372 + ecShift){
1370 rzLims =
MatBounds(2.9, 129, 294 + ecShift, 372 + ecShift);
1371 dEdx = dEdX_ECal; radX0 = radX0_ECal;
1373 else if (lZ < 398 + ecShift){
1374 rzLims =
MatBounds(2.9, 129, 372 + ecShift, 398 + ecShift);
1375 dEdx = dEdX_HCal*0.05; radX0 = radX0_Air;
1377 else if (lZ < 555 + ecShift){
1378 rzLims =
MatBounds(2.9, 129, 398 + ecShift, 555 + ecShift);
1379 dEdx = dEdX_HCal*0.96; radX0 = radX0_HCal/0.96;
1385 if (lZ < 568 + ecShift) rzLims =
MatBounds(2.9, 129, 555 + ecShift, 568 + ecShift);
1386 else if (lZ < 625 + ecShift){
1387 if (lR < 85 + ecShift) rzLims =
MatBounds(2.9, 85, 568 + ecShift, 625 + ecShift);
1388 else rzLims =
MatBounds(85, 129, 568 + ecShift, 625 + ecShift);
1389 }
else if (lZ < 785 + ecShift) rzLims =
MatBounds(2.9, 129, 625 + ecShift, 785 + ecShift);
1390 else if (lZ < 1500 + ecShift) rzLims =
MatBounds(2.9, 129, 785 + ecShift, 1500 + ecShift);
1391 else rzLims =
MatBounds(2.9, 129, 1500 + ecShift, 1E4);
1394 if (! (lZ > 568 + ecShift && lZ < 625 + ecShift && lR > 85 )
1395 && ! (lZ > 785 + ecShift && lZ < 850 + ecShift && lR > 118)) {dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1396 else { dEdx = dEdX_MCh; radX0 = radX0_MCh; }
1400 if (lZ < 372 + ecShift && lR < 177){
1401 if (lZ < 304) rzLims =
MatBounds(129, 177, 0, 304);
1403 if (lR < 135 ) rzLims =
MatBounds(129, 135, 304, 343);
1404 else if (lR < 172 ){
1405 if (lZ < 311 ) rzLims =
MatBounds(135, 172, 304, 311);
1406 else rzLims =
MatBounds(135, 172, 311, 343);
1408 if (lZ < 328) rzLims =
MatBounds(172, 177, 304, 328);
1409 else rzLims =
MatBounds(172, 177, 328, 343);
1412 else if ( lZ < 343 + ecShift){
1413 rzLims =
MatBounds(129, 177, 343, 343 + ecShift);
1416 if (lR < 156 ) rzLims =
MatBounds(129, 156, 343 + ecShift, 372 + ecShift);
1417 else if ( (lZ - 343 - ecShift) > (lR - 156)*1.38 )
1418 rzLims =
MatBounds(156, 177, 127.72 + ecShift, 372 + ecShift, atan(1.38), 0);
1419 else rzLims =
MatBounds(156, 177, 343 + ecShift, 127.72 + ecShift, 0, atan(1.38));
1422 if (!(lR > 135 && lZ <343 + ecShift && lZ > 304 )
1423 && ! (lR > 156 && lZ < 372 + ecShift && lZ > 343 + ecShift && ((lZ-343. - ecShift )< (lR-156.)*1.38)))
1426 double cosThetaEquiv = 0.8/
sqrt(1.+lZ*lZ/lR/lR) + 0.2;
1427 if (lZ > 343) cosThetaEquiv = 1.;
1428 dEdx = dEdX_ECal*cosThetaEquiv; radX0 = radX0_ECal/cosThetaEquiv;
1431 if ( (lZ > 304 && lZ < 328 && lR < 177 && lR > 135)
1432 && ! (lZ > 311 && lR < 172) ) {dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1433 else if ( lZ > 343 && lZ < 343 + ecShift) { dEdx = dEdX_Air; radX0 = radX0_Air; }
1434 else {dEdx = dEdX_ECal*0.2; radX0 = radX0_Air;}
1437 else if (lZ < 554 + ecShift){
1439 if ( lZ > 372 + ecShift && lZ < 398 + ecShift )rzLims =
MatBounds(129, 177, 372 + ecShift, 398 + ecShift);
1440 else if (lZ < 548 + ecShift) rzLims =
MatBounds(129, 177, 398 + ecShift, 548 + ecShift);
1441 else rzLims =
MatBounds(129, 177, 548 + ecShift, 554 + ecShift);
1444 if ((lZ - 307) < (lR - 177.)*1.739) rzLims =
MatBounds(177, 193, 0, -0.803, 0, atan(1.739));
1445 else if ( lZ < 389) rzLims =
MatBounds(177, 193, -0.803, 389, atan(1.739), 0.);
1446 else if ( lZ < 389 + ecShift) rzLims =
MatBounds(177, 193, 389, 389 + ecShift);
1447 else if ( lZ < 548 + ecShift ) rzLims =
MatBounds(177, 193, 389 + ecShift, 548 + ecShift);
1448 else rzLims =
MatBounds(177, 193, 548 + ecShift, 554 + ecShift);
1451 double anApex = 375.7278 - 193./1.327;
1452 if ( (lZ - 375.7278) < (lR - 193.)/1.327) rzLims =
MatBounds(193, 264, 0, anApex, 0, atan(1./1.327));
1453 else if ( (lZ - 392.7278 ) < (lR - 193.)/1.327)
1454 rzLims =
MatBounds(193, 264, anApex, anApex+17., atan(1./1.327), atan(1./1.327));
1455 else if ( (lZ - 392.7278 - ecShift ) < (lR - 193.)/1.327)
1456 rzLims =
MatBounds(193, 264, anApex+17., anApex+17. + ecShift, atan(1./1.327), atan(1./1.327));
1458 else if ( lZ < 517 + ecShift ) rzLims =
MatBounds(193, 264, anApex+17. + ecShift, 517 + ecShift, atan(1./1.327), 0);
1459 else if (lZ < 548 + ecShift){
1460 if (lR < 246 ) rzLims =
MatBounds(193, 246, 517 + ecShift, 548 + ecShift);
1461 else rzLims =
MatBounds(246, 264, 517 + ecShift, 548 + ecShift);
1463 else rzLims =
MatBounds(193, 264, 548 + ecShift, 554 + ecShift);
1465 else if ( lR < 275){
1466 if (lZ < 433) rzLims =
MatBounds(264, 275, 0, 433);
1467 else if (lZ < 554 ) rzLims =
MatBounds(264, 275, 433, 554);
1468 else rzLims =
MatBounds(264, 275, 554, 554 + ecShift);
1471 if (lZ < 402) rzLims =
MatBounds(275, 287, 0, 402);
1472 else if (lZ < 554) rzLims =
MatBounds(275, 287, 402, 554);
1473 else rzLims =
MatBounds(275, 287, 554, 554 + ecShift);
1476 if ((lZ < 433 || lR < 264) && (lZ < 402 || lR < 275) && (lZ < 517 + ecShift || lR < 246)
1478 && lZ < 548 + ecShift
1479 && ! (lZ < 389 + ecShift && lZ > 335 && lR < 193 )
1480 && ! (lZ > 307 && lZ < 335 && lR < 193 && ((lZ - 307) > (lR - 177.)*1.739))
1481 && ! (lR < 177 && lZ < 398 + ecShift)
1482 && ! (lR < 264 && lR > 193 && fabs(441.5+0.5*ecShift - lZ + (lR - 269.)/1.327) < (8.5 + ecShift*0.5)) )
1483 { dEdx = dEdX_HCal; radX0 = radX0_HCal;
1485 else if( (lR < 193 && lZ > 389 && lZ < 389 + ecShift ) || (lR > 264 && lR < 287 && lZ > 554 && lZ < 554 + ecShift)
1486 ||(lR < 264 && lR > 193 && fabs(441.5+8.5+0.5*ecShift - lZ + (lR - 269.)/1.327) < ecShift*0.5) ) {
1487 dEdx = dEdX_Air; radX0 = radX0_Air;
1489 else {dEdx = dEdX_HCal*0.05; radX0 = radX0_Air; }
1492 else if (lZ < 564 + ecShift){
1494 rzLims =
MatBounds(129, 251, 554 + ecShift, 564 + ecShift);
1495 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1498 rzLims =
MatBounds(251, 287, 554 + ecShift, 564 + ecShift);
1499 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1502 else if (lZ < 625 + ecShift){
1503 rzLims =
MatBounds(129, 287, 564 + ecShift, 625 + ecShift);
1504 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1506 else if (lZ < 785 + ecShift){
1507 if (lR < 275) rzLims =
MatBounds(129, 275, 625 + ecShift, 785 + ecShift);
1509 if (lZ < 720 + ecShift) rzLims =
MatBounds(275, 287, 625 + ecShift, 720 + ecShift);
1510 else rzLims =
MatBounds(275, 287, 720 + ecShift, 785 + ecShift);
1512 if (! (lR > 275 && lZ < 720 + ecShift)) { dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1513 else { dEdx = dEdX_MCh; radX0 = radX0_MCh; }
1515 else if (lZ < 850 + ecShift){
1516 rzLims =
MatBounds(129, 287, 785 + ecShift, 850 + ecShift);
1517 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1519 else if (lZ < 910 + ecShift){
1520 rzLims =
MatBounds(129, 287, 850 + ecShift, 910 + ecShift);
1521 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1523 else if (lZ < 975 + ecShift){
1524 rzLims =
MatBounds(129, 287, 910 + ecShift, 975 + ecShift);
1525 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1527 else if (lZ < 1000 + ecShift){
1528 rzLims =
MatBounds(129, 287, 975 + ecShift, 1000 + ecShift);
1529 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1531 else if (lZ < 1063 + ecShift){
1532 rzLims =
MatBounds(129, 287, 1000 + ecShift, 1063 + ecShift);
1533 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1535 else if ( lZ < 1073 + ecShift){
1536 rzLims =
MatBounds(129, 287, 1063 + ecShift, 1073 + ecShift);
1537 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1539 else if (lZ < 1E4 ) {
1540 rzLims =
MatBounds(129, 287, 1073 + ecShift, 1E4);
1541 dEdx = dEdX_Air; radX0 = radX0_Air;
1545 dEdx = dEdX_Air; radX0 = radX0_Air;
1548 else if (lR <380 && lZ < 667){
1550 if (lR < 315) rzLims =
MatBounds(287, 315, 0, 630);
1551 else if (lR < 341 ) rzLims =
MatBounds(315, 341, 0, 630);
1552 else rzLims =
MatBounds(341, 380, 0, 630);
1553 }
else rzLims =
MatBounds(287, 380, 630, 667);
1555 if (lZ < 630) { dEdx = dEdX_coil; radX0 = radX0_coil; }
1556 else {dEdx = dEdX_Air; radX0 = radX0_Air; }
1561 bool isIron =
false;
1566 double bMag = sv.
bf.mag();
1567 isIron = (bMag > 0.75 && ! (lZ > 500 && lR <500 && bMag < 1.15)
1568 && ! (lZ < 450 && lR > 420 && bMag < 1.15 ) );
1572 if (isIron) { dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1573 else { dEdx = dEdX_MCh; radX0 = radX0_MCh; }
1576 dEdx = dEdX_Air; radX0 = radX0_Air;
1579 else if (lR > 750 ){
1581 dEdx = dEdX_Air; radX0 = radX0_Air;
1583 else if (lZ < 667 + ecShift){
1584 rzLims =
MatBounds(287, 750, 667, 667 + ecShift);
1585 dEdx = dEdX_Air; radX0 = radX0_Air;
1588 else if (lZ < 724 + ecShift){
1589 if (lR < 380 ) rzLims =
MatBounds(287, 380, 667 + ecShift, 724 + ecShift);
1590 else rzLims =
MatBounds(380, 750, 667 + ecShift, 724 + ecShift);
1591 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1593 else if (lZ < 785 + ecShift){
1594 if (lR < 380 ) rzLims =
MatBounds(287, 380, 724 + ecShift, 785 + ecShift);
1595 else rzLims =
MatBounds(380, 750, 724 + ecShift, 785 + ecShift);
1596 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1598 else if (lZ < 850 + ecShift){
1599 rzLims =
MatBounds(287, 750, 785 + ecShift, 850 + ecShift);
1600 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1602 else if (lZ < 910 + ecShift){
1603 rzLims =
MatBounds(287, 750, 850 + ecShift, 910 + ecShift);
1604 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1606 else if (lZ < 975 + ecShift){
1607 rzLims =
MatBounds(287, 750, 910 + ecShift, 975 + ecShift);
1608 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1610 else if (lZ < 1000 + ecShift){
1611 rzLims =
MatBounds(287, 750, 975 + ecShift, 1000 + ecShift);
1612 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1614 else if (lZ < 1063 + ecShift){
1616 rzLims =
MatBounds(287, 360, 1000 + ecShift, 1063 + ecShift);
1617 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1621 rzLims =
MatBounds(360, 750, 1000 + ecShift, 1063 + ecShift);
1622 dEdx = dEdX_Air; radX0 = radX0_Air;
1625 else if ( lZ < 1073 + ecShift){
1626 rzLims =
MatBounds(287, 750, 1063 + ecShift, 1073 + ecShift);
1628 dEdx = dEdX_Air; radX0 = radX0_Air;
1630 else if (lZ < 1E4 ) {
1631 rzLims =
MatBounds(287, 750, 1073 + ecShift, 1E4);
1632 dEdx = dEdX_Air; radX0 = radX0_Air;
1634 else {dEdx = dEdX_Air; radX0 = radX0_Air; }
1640 double p0 = sv.
p3.mag();
1641 double logp0 =
log(p0);
1642 double p0powN33 = 0;
1648 double dEdX_mat = -(11.4 + 0.96*fabs(logp0+
log(2.8)) + 0.033*p0*(1.0 - p0powN33) )*1
e-3;
1651 dEdXPrime = dEdx == 0 ? 0 : -dEdx*(0.96/p0 + 0.033 - 0.022*p0powN33)*1
e-3;
1660 if (ind != 0 && result == 0){
1669 const double pars[6],
1670 double& dist,
double& tanDist,
1672 double fastSkipDist)
const{
1679 double curR = sv.
r3.perp();
1681 if (fabs(dist) > fastSkipDist){
1685 double curP2 = sv.
p3.mag2();
1686 double curPtPos2 = sv.
p3.perp2();
if(curPtPos2< 1
e-16) curPtPos2=1
e-16;
1688 double cosDPhiPR = (sv.
r3.x()*sv.
p3.x()+sv.
r3.y()*sv.
p3.y());
1689 refDirection = dist*cosDPhiPR > 0 ?
1691 tanDist = dist*
sqrt(curP2/curPtPos2);
1697 double curZ = sv.
r3.z();
1698 dist = pars[
Z_P] - curZ;
1699 if (fabs(dist) > fastSkipDist){
1703 double curP = sv.
p3.mag();
1704 refDirection = sv.
p3.z()*dist > 0. ?
1706 tanDist = dist/sv.
p3.z()*curP;
1712 Point rPlane(pars[0], pars[1], pars[2]);
1713 Vector nPlane(pars[3], pars[4], pars[5]);
1719 double dRDotN = (sv.
r3.x()-rPlane.x())*nPlane.x() + (sv.
r3.y()-rPlane.y())*nPlane.y() + (sv.
r3.z()-rPlane.z())*nPlane.z();
1721 dist = fabs(dRDotN);
1722 if (dist > fastSkipDist){
1726 double curP = sv.
p3.mag();
1728 double p0Inv = 1./p0;
1730 double tN = tau.dot(nPlane);
1731 refDirection = tN*dRDotN < 0. ?
1733 double b0 = sv.
bf.mag();
1734 if (fabs(tN)>1
e-24){
1735 tanDist = -dRDotN/tN;
1738 if (fabs(dRDotN)>1
e-24) tanDist = 1e6;
1741 if (fabs(tanDist) > 1
e4) tanDist = 1
e4;
1743 double b0Inv = 1./b0;
1744 double tNInv = 1./tN;
1746 double bHatN = bHat.dot(nPlane);
1747 double cosPB = bHat.dot(tau);
1748 double kVal = 2.99792458e-3*sv.
q*p0Inv*b0;
1749 double aVal = tanDist*kVal;
1750 Vector lVec = bHat.cross(tau);
1751 double bVal = lVec.dot(nPlane)*tNInv;
1752 if (fabs(aVal*bVal)< 0.3){
1753 double cVal = 1. - bHatN*cosPB*tNInv;
1754 double aacVal = cVal*aVal*aVal;
1755 if (fabs(aacVal)<1){
1756 double tanDCorr = bVal/2. + (bVal*bVal/2. + cVal/6)*aVal;
1759 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<tanDist<<
" vs " 1760 <<tanDist*(1.+tanDCorr)<<
" corr "<<tanDist*tanDCorr<<std::endl;
1761 tanDist *= (1.+tanDCorr);
1763 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"AACVal "<< fabs(aacVal)
1764 <<
" = "<<aVal<<
"**2 * "<<cVal<<
" too large:: will not converge"<<std::endl;
1767 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"ABVal "<< fabs(aVal*bVal)
1768 <<
" = "<<aVal<<
" * "<<bVal<<
" too large:: will not converge"<<std::endl;
1776 Point cVertex(pars[0], pars[1], pars[2]);
1777 if (cVertex.perp2() < 1
e-10){
1780 double relV3mag = relV3.mag();
1782 double theta(pars[3]);
1784 double sinTheta =
sin(theta);
1785 double cosTheta =
cos(theta);
1786 double cosV3Theta = relV3.z()/relV3mag;
1787 if (cosV3Theta>1) cosV3Theta=1;
1788 if (cosV3Theta<-1) cosV3Theta=-1;
1789 double sinV3Theta =
sqrt(1.-cosV3Theta*cosV3Theta);
1791 double sinDTheta = sinTheta*cosV3Theta - cosTheta*sinV3Theta;
1792 double cosDTheta = cosTheta*cosV3Theta + sinTheta*sinV3Theta;
1793 bool isInside = sinTheta > sinV3Theta && cosTheta*cosV3Theta > 0;
1794 dist = isInside || cosDTheta > 0 ? relV3mag*sinDTheta : relV3mag;
1795 if (fabs(dist) > fastSkipDist){
1800 double relV3phi=relV3.phi();
1801 double normPhi = isInside ?
1803 double normTheta = theta >
Geom::pi()/2. ?
1807 Vector norm; norm.setRThetaPhi(fabs(dist), normTheta, normPhi);
1808 double curP = sv.
p3.mag();
double cosp3theta = sv.
p3.z()/curP;
1809 if (cosp3theta>1) cosp3theta=1;
1810 if (cosp3theta<-1) cosp3theta=-1;
1811 double sineConeP = sinTheta*cosp3theta - cosTheta*
sqrt(1.-cosp3theta*cosp3theta);
1813 double sinSolid = norm.dot(sv.
p3)/(fabs(dist)*curP);
1814 tanDist = fabs(sinSolid) > fabs(sineConeP) ? dist/fabs(sinSolid) : dist/fabs(sineConeP);
1817 refDirection = sinSolid > 0 ?
1820 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Cone pars: theta "<<theta
1821 <<
" normTheta "<<norm.theta()
1822 <<
" p3Theta "<<sv.
p3.theta()
1823 <<
" sinD: "<< sineConeP
1824 <<
" sinSolid "<<sinSolid;
1827 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"refToDest:toCone the point is " 1828 <<(isInside?
"in" :
"out")<<
"side the cone" 1839 double curS = fabs(sv.
path());
1841 if (fabs(dist) > fastSkipDist){
1845 refDirection = pars[
PATHL_P] > 0 ?
1853 Point pDest(pars[0], pars[1], pars[2]);
1854 double curP = sv.
p3.mag();
1855 dist = (sv.
r3 - pDest).
mag()+ 1
e-24;
1856 tanDist = (sv.
r3.dot(sv.
p3) - pDest.dot(sv.
p3))/curP;
1858 double b0 = sv.
bf.mag();
1861 double kVal = 2.99792458e-3*sv.
q/p0*b0;
1862 double aVal = fabs(dist*kVal);
1863 tanDist *= 1./(1.+ aVal);
1864 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"corrected by aVal "<<aVal<<
" to "<<tanDist;
1866 refDirection = tanDist < 0 ?
1873 Point rLine(pars[0], pars[1], pars[2]);
1874 Vector dLine(pars[3], pars[4], pars[5]);
1875 dLine = (dLine - rLine);
1876 dLine *= 1./dLine.mag();
if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"dLine "<<dLine;
1879 double curP = sv.
p3.mag();
1880 Vector dRPerp = dR - dLine*(dR.dot(dLine));
1881 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"dRperp "<<dRPerp;
1883 dist = dRPerp.mag() + 1
e-24;
1884 tanDist = dRPerp.dot(sv.
p3)/curP;
1886 double cosAlpha2 = dLine.dot(sv.
p3)/curP; cosAlpha2 *= cosAlpha2;
1887 tanDist *= 1./
sqrt(fabs(1.-cosAlpha2)+1
e-96);
1890 double b0 = sv.
bf.mag();
1893 double kVal = 2.99792458e-3*sv.
q/p0*b0;
1894 double aVal = fabs(dist*kVal);
1895 tanDist *= 1./(1.+ aVal);
1896 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"corrected by aVal "<<aVal<<
" to "<<tanDist;
1898 refDirection = tanDist < 0 ?
1914 double tanDistConstrained = tanDist;
1915 if (fabs(tanDist) > 4.*fabs(dist) ) tanDistConstrained *= tanDist == 0 ? 0 : fabs(dist/tanDist*4.);
1918 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"refToDest input: dest"<<dest<<
" pars[]: ";
1919 for (
int i = 0;
i < 6;
i++){
1920 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
", "<<
i<<
" "<<pars[
i];
1922 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<std::endl;
1923 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"refToDest output: " 1925 <<
"\t tanDist "<< tanDist
1926 <<
"\t tanDistConstr "<< tanDistConstrained
1927 <<
"\t refDirection "<< refDirection
1930 tanDist = tanDistConstrained;
1938 double& dist,
double& tanDist,
1939 double fastSkipDist,
bool expectNewMagVolume,
double maxStep)
const{
1945 if (cVol == 0)
return result;
1946 const std::vector<VolumeSide>& cVolFaces(cVol->
faces());
1948 double distToFace[6] = {0,0,0,0,0,0};
1949 double tanDistToFace[6] = {0,0,0,0,0,0};
1955 unsigned int iFDestSorted[6] = {0,0,0,0,0,0};
1957 unsigned int nearParallels = 0;
1959 double curP = sv.
p3.mag();
1963 <<
" with "<<cVolFaces.size()<<
" faces"<<std::endl;
1966 unsigned int nFaces = cVolFaces.size();
1967 for (
unsigned int iFace = 0; iFace < nFaces; ++iFace){
1969 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Too many faces"<<std::endl;
1972 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Start with face "<<iFace<<std::endl;
1979 const Cone* cCone = 0;
1980 if (
typeid(cVolFaces[iFace].surface()) ==
typeid(
const Plane&)){
1981 cPlane = &cVolFaces[iFace].surface();
1982 }
else if (
typeid(cVolFaces[iFace].surface()) ==
typeid(
const Cylinder&)){
1983 cCyl =
dynamic_cast<const Cylinder*
>(&cVolFaces[iFace].surface());
1984 }
else if (
typeid(cVolFaces[iFace].surface()) ==
typeid(
const Cone&)){
1985 cCone =
dynamic_cast<const Cone*
>(&cVolFaces[iFace].surface());
1987 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Could not cast a volume side surface to a known type"<<std::endl;
1991 if (cPlane!=0)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The face is a plane at "<<cPlane<<std::endl;
1992 if (cCyl!=0)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The face is a cylinder at "<<cCyl<<std::endl;
1995 double pars[6] = {0,0,0,0,0,0};
2002 pars[0] = rPlane.x(); pars[1] = rPlane.y(); pars[2] = rPlane.z();
2003 pars[3] = nPlane.x(); pars[4] = nPlane.y(); pars[5] = nPlane.z();
2005 }
else if (cCyl != 0){
2007 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Cylinder at "<<cCyl->
position()
2013 }
else if (cCone != 0){
2015 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Cone at "<<cCone->
position()
2016 <<
" rorated by "<<cCone->
rotation()
2017 <<
" vertex at "<<cCone->
vertex()
2022 pars[2] = cCone->
vertex().
z();
2026 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Unknown surface"<<std::endl;
2030 resultToFace[iFace] =
2032 distToFace[iFace], tanDistToFace[iFace], refDirectionToFace[iFace], fastSkipDist);
2043 double invDTFPosiF = 1./(1
e-32+fabs(tanDistToFace[iFace]));
2044 double dSlope = fabs(distToFace[iFace])*invDTFPosiF;
2045 double maxStepL = maxStep> 100 ? 100 : maxStep;
if (maxStepL < 10) maxStepL = 10.;
2046 bool isNearParallel = fabs(tanDistToFace[iFace]) + 100.*curP*dSlope < maxStepL
2049 if (refDirectionToFace[iFace] == dir || isNearParallel){
2050 if (isNearParallel) nearParallels++;
2051 iFDestSorted[nDestSorted] = iFace;
2057 if (refDirectionToFace[iFace] == dir){
2058 if (iDistMin == -1) iDistMin = iFace;
2059 else if (fabs(distToFace[iFace]) < fabs(distToFace[iDistMin])) iDistMin = iFace;
2062 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<cVol<<
" "<<iFace<<
" " 2063 <<tanDistToFace[iFace]<<
" "<<distToFace[iFace]<<
" "<<refDirectionToFace[iFace]<<
" "<<dir<<std::endl;
2067 for (
int i = 0;
i<nDestSorted; ++
i){
2068 int iMax = nDestSorted-
i-1;
2069 for (
int j=0;j<nDestSorted-
i; ++j){
2070 if (fabs(tanDistToFace[iFDestSorted[j]]) > fabs(tanDistToFace[iFDestSorted[iMax]]) ){
2074 int iTmp = iFDestSorted[nDestSorted-i-1];
2075 iFDestSorted[nDestSorted-i-1] = iFDestSorted[iMax];
2076 iFDestSorted[iMax] = iTmp;
2080 for (
int i=0;
i<nDestSorted;++
i){
2081 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<cVol<<
" "<<
i<<
" "<<iFDestSorted[
i]<<
" "<<tanDistToFace[iFDestSorted[
i]]<<std::endl;
2088 for (
int i=0;
i<nDestSorted;++
i){
2089 iFDest = iFDestSorted[
i];
2093 Vector lDelta(sv.
p3); lDelta *= sign/curP*fabs(distToFace[iFDest]);
2094 gPointEst += lDelta;
2096 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Linear est point "<<gPointEst
2097 <<
" for iFace "<<iFDest<<std::endl;
2099 GlobalPoint gPointEstNorZ(gPointEst.x(), gPointEst.y(), gPointEst.z() );
2100 if ( cVol->
inside(gPointEstNorZ) ){
2102 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is inside the volume"<<std::endl;
2106 dist = distToFace[iFDest];
2107 tanDist = tanDistToFace[iFDest];
2109 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Got a point near closest boundary -- face "<<iFDest<<std::endl;
2123 double lDist = iDistMin == -1 ? fastSkipDist : fabs(distToFace[iDistMin]);
2124 if (lDist > fastSkipDist) lDist = fastSkipDist;
2125 Vector lDelta(sv.
p3); lDelta *= sign/curP*lDist;
2126 gPointEst += lDelta;
2128 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Linear est point to shortest dist "<<gPointEst
2129 <<
" for iFace "<<iDistMin<<
" at distance "<<lDist*sign<<std::endl;
2131 GlobalPoint gPointEstNorZ(gPointEst.x(), gPointEst.y(), gPointEst.z() );
2132 if ( cVol->
inside(gPointEstNorZ) ){
2134 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is inside the volume"<<std::endl;
2144 tanDist = dist*1.01;
2146 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Wrong volume located: return small dist, tandist"<<std::endl;
2152 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"All faces are too far"<<std::endl;
2154 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Appear to be in a wrong volume"<<std::endl;
2156 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Something else went wrong"<<std::endl;
2167 double& dist,
double& tanDist,
2168 double fastSkipDist)
const{
2177 double distToFace[4] = {0,0,0,0};
2178 double tanDistToFace[4] = {0,0,0,0};
2183 double curP = sv.
p3.mag();
2185 for (
unsigned int iFace = 0; iFace < 4; iFace++){
2187 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Start with mat face "<<iFace<<std::endl;
2190 double pars[6] = {0,0,0,0,0,0};
2193 if (fabs(parLim[iFace+2])< 1
e-6){
2195 pars[0] = 0; pars[1] = 0; pars[2] = -parLim[iFace];
2196 pars[3] = 0; pars[4] = 0; pars[5] = 1;
2198 pars[0] = 0; pars[1] = 0; pars[2] = parLim[iFace];
2199 pars[3] = 0; pars[4] = 0; pars[5] = 1;
2204 pars[0] = 0; pars[1] = 0;
2205 pars[2] = parLim[iFace];
2206 pars[3] =
Geom::pi()/2. - parLim[iFace+2];
2208 pars[0] = 0; pars[1] = 0;
2209 pars[2] = - parLim[iFace];
2210 pars[3] =
Geom::pi()/2. + parLim[iFace+2];
2219 resultToFace[iFace] =
2221 distToFace[iFace], tanDistToFace[iFace], refDirectionToFace[iFace], fastSkipDist);
2227 if (refDirectionToFace[iFace] == dir || fabs(distToFace[iFace]) < 2
e-2*fabs(tanDistToFace[iFace]) ){
2230 Vector lDelta(sv.
p3); lDelta *= sign*fabs(distToFace[iFace])/curP;
2231 gPointEst += lDelta;
2233 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Linear est point "<<gPointEst
2236 double lZ = fabs(gPointEst.z());
2237 double lR = gPointEst.perp();
2238 double tan4 = parLim[4] == 0 ? 0 :
tan(parLim[4]);
2239 double tan5 = parLim[5] == 0 ? 0 :
tan(parLim[5]);
2240 if ( (lZ - parLim[2]) > lR*tan4
2241 && (lZ - parLim[3]) < lR*tan5
2242 && lR > parLim[0] && lR < parLim[1]){
2244 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is inside the volume"<<std::endl;
2250 if (fabs(tanDistToFace[iFDest]) > fabs(tanDistToFace[iFace])){
2256 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is NOT inside the volume"<<std::endl;
2264 dist = distToFace[iFDest];
2265 tanDist = tanDistToFace[iFDest];
2267 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Got a point near closest boundary -- face "<<iFDest<<std::endl;
2271 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Failed to find a dest point inside the volume"<<std::endl;
2281 if (vol == 0)
return false;
2305 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Volume is magnetic, located at "<<vol->
position()<<std::endl;
2307 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Volume is not magnetic, located at "<<vol->
position()<<std::endl;
StateInfo StateArray[MAX_POINTS+1]
double z0() const
z coordinate
DDSolidShape shapeType() const
Result refToDest(DestType dest, const SteppingHelixPropagator::StateInfo &sv, const double pars[6], double &dist, double &tanDist, PropagationDirection &refDirection, double fastSkipDist=1e12) const
(Internals) determine distance and direction from the current position to the plane ...
const std::string metname
bool applyRadX0Correction_
void getFreeState(FreeTrajectoryState &fts) const
convert internal structure into the fts
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
bool isYokeVolume(const MagVolume *vol) const
check if it's a yoke/iron based on this MagVol internals
virtual ~SteppingHelixPropagator()
Destructor.
Sin< T >::type sin(const T &t)
static const int MAX_STEPS
Global3DPoint GlobalPoint
SteppingHelixStateInfo::VolumeBounds MatBounds
Geom::Theta< T > theta() const
AlgebraicSymMatrix55 covCurv
const MagVolume * findVolume(const GlobalPoint &gp) const
std::pair< TrajectoryStateOnSurface, double > TsosPP
int cIndex_(int ind) const
(Internals) circular index for array of transients
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
double getDeDx(const SteppingHelixPropagator::StateInfo &sv, double &dEdXPrime, double &radX0, MatBounds &rzLims) const
estimate average (in fact smth. close to MPV and median) energy loss per unit path length ...
std::pair< FreeTrajectoryState, double > FtsPP
Result refToMatVolume(const SteppingHelixPropagator::StateInfo &sv, PropagationDirection dir, double &dist, double &tanDist, double fastSkipDist=1e12) const
virtual const std::vector< VolumeSide > & faces() const =0
Access to volume faces.
bool useInTeslaFromMagField_
void loadState(SteppingHelixPropagator::StateInfo &svCurrent, const SteppingHelixPropagator::Vector &p3, const SteppingHelixPropagator::Point &r3, int charge, PropagationDirection dir, const AlgebraicSymMatrix55 &covCurv) const
virtual ::GlobalVector inTesla(const ::GlobalPoint &gp) const
double dydz() const
dydz slope
GlobalPoint vertex() const
Global position of the cone vertex.
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &ftsStart, const Plane &pDest) const override
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const =0
static const char *const name(DDSolidShape s)
void initStateArraySHPSpecific(StateArray &svBuf, bool flagsOnly) const
(Internals) set defaults needed for states used inside propagate methods
virtual PropagationDirection propagationDirection() const final
Scalar radius() const
Radius of the cylinder.
SteppingHelixPropagator()
Constructors.
TrajectoryStateOnSurface getStateOnSurface(const Surface &surf, bool returnTangentPlane=false) const
LocalPoint toLocal(const GlobalPoint &gp) const
const VolumeBasedMagneticField * vbField_
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
void propagate(const SteppingHelixStateInfo &ftsStart, const Surface &sDest, SteppingHelixStateInfo &out) const
Propagate to Plane given a starting point.
AlgebraicSymMatrix55 matDCovCurv
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
double dxdz() const
dxdz slope
const MagneticField * field
bool isIron() const
Temporary hack to pass information on material. Will eventually be replaced!
static const int MAX_POINTS
bool useTuningForL2Speed_
bool makeAtomStep(SteppingHelixPropagator::StateInfo &svCurrent, SteppingHelixPropagator::StateInfo &svNext, double dS, PropagationDirection dir, SteppingHelixPropagator::Fancy fancy) const
main stepping function: compute next state vector after a step of length dS
Result refToMagVolume(const SteppingHelixPropagator::StateInfo &sv, PropagationDirection dir, double &dist, double &tanDist, double fastSkipDist=1e12, bool expectNewMagVolume=false, double maxStep=1e12) const
const AlgebraicSymMatrix55 unit55_
void setRep(SteppingHelixPropagator::Basis &rep, const SteppingHelixPropagator::Vector &tau) const
Set/compute basis vectors for local coordinates at current step (called by incrementState) ...
LocalVector fieldInTesla(const LocalPoint &lp) const
return(e1-e2)*(e1-e2)+dp *dp
std::vector< std::vector< double > > tmp
double y0() const
y coordinate
void setIState(const SteppingHelixStateInfo &sStart, StateArray &svBuff, int &nPoints) const
(Internals) Init starting point
const RotationType & rotation() const
void getNextState(const SteppingHelixPropagator::StateInfo &svPrevious, SteppingHelixPropagator::StateInfo &svNext, double dP, const SteppingHelixPropagator::Vector &tau, const SteppingHelixPropagator::Vector &drVec, double dS, double dX0, const AlgebraicMatrix55 &dCovCurv) const
const PositionType & position() const
const MagneticField * field_
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
static const std::string ResultName[MAX_RESULT]
Geom::Theta< float > openingAngle() const
Angle of the cone.
double x0() const
x coordinate