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)];
328 StateArray& svBuf,
int& nPoints)
const {
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;
675 svCurrent.
q = charge;
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;
918 double phiLessSinPhiOPhi=0;
921 double phi2 = phi*
phi;
922 double phi3 = phi2*
phi;
923 double phi4 = phi3*
phi;
924 sinPhi = phi - phi3/6. + phi4*phi/120.;
925 cosPhi = 1. -phi2/2. + phi4/24.;
926 oneLessCosPhi = phi2/2. - phi4/24. + phi2*phi4/720.;
927 oneLessCosPhiOPhi = 0.5*phi - phi3/24. + phi2*phi3/720.;
928 sinPhiOPhi = 1. - phi*phi/6. + phi4/120.;
929 phiLessSinPhiOPhi = phi*phi/6. - phi4/120. + phi4*phi2/5040.;
933 oneLessCosPhi = 1.-cosPhi;
934 oneLessCosPhiOPhi = oneLessCosPhi/
phi;
935 sinPhiOPhi = sinPhi/
phi;
936 phiLessSinPhiOPhi = 1 - sinPhiOPhi;
939 Vector bHat = svCurrent.
bf; bHat *= 1./b0;
942 Vector btVec(bHat.cross(tau));
943 double tauB = tau.dot(bHat);
944 Vector bbtVec(bHat*tauB - tau);
947 drVec = bbtVec*phiLessSinPhiOPhi; drVec -= btVec*oneLessCosPhiOPhi; drVec +=
tau;
950 double dEdx = svCurrent.
dEdx;
952 radX0 = svCurrent.
radX0;
956 drVec += svCurrent.
r3;
961 bf.set(bfGV.
x(), bfGV.
y(), bfGV.
z());
964 bf.set(bfGV.
x(), bfGV.
y(), bfGV.
z());
970 bf.set(0., 0., 1
e-16);
973 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Improved b "<<b0
974 <<
" at r3 "<<drVec<<std::endl;
977 if (fabs((b0-b0Init)*dS) > 1){
980 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Large bf*dS change "<<fabs((b0-svCurrent.
bf.mag())*dS)
981 <<
" --> recalc dedx"<<std::endl;
985 svNext.
p3 = svCurrent.
p3;
989 dEdx =
getDeDx(svNext, dEdXPrime, radX0, rzTmp);
992 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"New dEdX= "<<dEdx
994 <<
" for p0 "<<p0<<std::endl;
998 p0 += dP/2.;
if (p0 < 1
e-2) p0 = 1
e-2;
1001 phi = (2.99792458e-3*svCurrent.
q*b0*p0Inv)*dS;
1002 phiSmall = fabs(phi) < 1
e-4;
1005 double phi2 = phi*
phi;
1006 double phi3 = phi2*
phi;
1007 double phi4 = phi3*
phi;
1008 sinPhi = phi - phi3/6. + phi4*phi/120.;
1009 cosPhi = 1. -phi2/2. + phi4/24.;
1010 oneLessCosPhi = phi2/2. - phi4/24. + phi2*phi4/720.;
1011 oneLessCosPhiOPhi = 0.5*phi - phi3/24. + phi2*phi3/720.;
1012 sinPhiOPhi = 1. - phi*phi/6. + phi4/120.;
1013 phiLessSinPhiOPhi = phi*phi/6. - phi4/120. + phi4*phi2/5040.;
1017 oneLessCosPhi = 1.-cosPhi;
1018 oneLessCosPhiOPhi = oneLessCosPhi/
phi;
1019 sinPhiOPhi = sinPhi/
phi;
1020 phiLessSinPhiOPhi = 1. - sinPhiOPhi;
1023 bHat = bf; bHat *= 1./b0;
1025 btVec = bHat.cross(tau);
1026 tauB = tau.dot(bHat);
1027 bbtVec = bHat*tauB -
tau;
1029 tauNext = bbtVec*oneLessCosPhi; tauNext -= btVec*sinPhi; tauNext +=
tau;
1030 double tauNextPerpInv = 1./tauNext.perp();
1031 drVec = bbtVec*phiLessSinPhiOPhi; drVec -= btVec*oneLessCosPhiOPhi; drVec +=
tau;
1037 double dX0 = fabs(dS)/radX0;
1044 double x0 = fabs(svCurrent.
radPath());
1045 double alphaX0 = 13.6e-3*p0Inv; alphaX0 *= alphaX0;
1046 double betaX0 = 0.038;
1047 double logx0p1 =
log(x0+1);
1048 theta02 = dX0*alphaX0*(1+betaX0*logx0p1)*(1 + betaX0*logx0p1 + 2.*betaX0*x0/(x0+1) );
1050 theta02 = 196
e-6* p0Inv * p0Inv * dX0;
1053 double epsilonP0 = 1.+ dP/(p0-0.5*dP);
1057 Vector tbtVec(bHat - tauB*tau);
1072 double qbp = svCurrent.
q*p0Inv;
1077 double t11 = tau.x();
double t12 = tau.y();
double t13 = tau.z();
1078 double t21 = tauNext.x();
double t22 = tauNext.y();
double t23 = tauNext.z();
1079 double cosl0 = tau.perp();
1081 double cosecl1 = tauNextPerpInv;
1091 double sint = -sinPhi;
double cost = cosPhi;
1092 double hn1 = hn.x();
double hn2 = hn.y();
double hn3 = hn.z();
1093 double dx1 = dx.x();
double dx2 = dx.y();
double dx3 = dx.z();
1096 double gamma = hn1*t21 + hn2*t22 + hn3*t23;
1097 double an1 = hn2*t23 - hn3*t22;
1098 double an2 = hn3*t21 - hn1*t23;
1099 double an3 = hn1*t22 - hn2*t21;
1101 double auInv = cosl0;
double au = auInv>0 ? 1./auInv : 1e24;
1103 double u11 = -au*t12;
double u12 = au*t11;
1104 double v11 = -t13*u12;
double v12 = t13*u11;
double v13 = auInv;
1105 auInv =
sqrt(1. - t23*t23); au = auInv>0 ? 1./auInv : 1e24;
1107 double u21 = -au*t22;
double u22 = au*t21;
1108 double v21 = -t23*u22;
double v22 = t23*u21;
double v23 = auInv;
1115 double anv = -(hn1*u21 + hn2*u22 );
1116 double anu = (hn1*v21 + hn2*v22 + hn3*v23);
1117 double omcost = oneLessCosPhi;
double tmsint = -phi*phiLessSinPhiOPhi;
1119 double hu1 = - hn3*u12;
1120 double hu2 = hn3*u11;
1121 double hu3 = hn1*u12 - hn2*u11;
1123 double hv1 = hn2*v13 - hn3*v12;
1124 double hv2 = hn3*v11 - hn1*v13;
1125 double hv3 = hn1*v12 - hn2*v11;
1128 dCCurvTransform(0,0) = 1./(epsilonP0*epsilonP0)*(1. + dS*dEdXPrime);
1132 dCCurvTransform(1,0) = phi*p0/svCurrent.
q*cosecl1*
1133 (sinPhi*bbtVec.z() - cosPhi*btVec.z());
1137 dCCurvTransform(1,1) = cost*(v11*v21 + v12*v22 + v13*v23) +
1138 sint*(hv1*v21 + hv2*v22 + hv3*v23) +
1139 omcost*(hn1*v11 + hn2*v12 + hn3*v13) * (hn1*v21 + hn2*v22 + hn3*v23) +
1140 anv*(-sint*(v11*t21 + v12*t22 + v13*t23) +
1141 omcost*(v11*an1 + v12*an2 + v13*an3) -
1142 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
1144 dCCurvTransform(1,2) = cost*(u11*v21 + u12*v22 ) +
1145 sint*(hu1*v21 + hu2*v22 + hu3*v23) +
1146 omcost*(hn1*u11 + hn2*u12 ) * (hn1*v21 + hn2*v22 + hn3*v23) +
1147 anv*(-sint*(u11*t21 + u12*t22 ) +
1148 omcost*(u11*an1 + u12*an2 ) -
1149 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
1150 dCCurvTransform(1,2) *= cosl0;
1160 dCCurvTransform(2,0) = - phi*p0/svCurrent.
q*cosecl1*cosecl1*
1161 (oneLessCosPhi*bHat.z()*btVec.mag2() + sinPhi*btVec.z() + cosPhi*tbtVec.z()) ;
1164 dCCurvTransform(2,1) = cost*(v11*u21 + v12*u22 ) +
1165 sint*(hv1*u21 + hv2*u22 ) +
1166 omcost*(hn1*v11 + hn2*v12 + hn3*v13) *
1167 (hn1*u21 + hn2*u22 ) +
1168 anu*(-sint*(v11*t21 + v12*t22 + v13*t23) +
1169 omcost*(v11*an1 + v12*an2 + v13*an3) -
1170 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
1171 dCCurvTransform(2,1) *= cosecl1;
1173 dCCurvTransform(2,2) = cost*(u11*u21 + u12*u22 ) +
1174 sint*(hu1*u21 + hu2*u22 ) +
1175 omcost*(hn1*u11 + hn2*u12 ) *
1176 (hn1*u21 + hn2*u22 ) +
1177 anu*(-sint*(u11*t21 + u12*t22 ) +
1178 omcost*(u11*an1 + u12*an2 ) -
1179 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
1180 dCCurvTransform(2,2) *= cosecl1*cosl0;
1192 dCCurvTransform(3,0) = - pp*(u21*dx1 + u22*dx2 );
1193 dCCurvTransform(4,0) = - pp*(v21*dx1 + v22*dx2 + v23*dx3);
1196 dCCurvTransform(3,1) = (sint*(v11*u21 + v12*u22 ) +
1197 omcost*(hv1*u21 + hv2*u22 ) +
1198 tmsint*(hn1*u21 + hn2*u22 ) *
1199 (hn1*v11 + hn2*v12 + hn3*v13))/q;
1201 dCCurvTransform(3,2) = (sint*(u11*u21 + u12*u22 ) +
1202 omcost*(hu1*u21 + hu2*u22 ) +
1203 tmsint*(hn1*u21 + hn2*u22 ) *
1204 (hn1*u11 + hn2*u12 ))*cosl0/q;
1206 dCCurvTransform(3,3) = (u11*u21 + u12*u22 );
1208 dCCurvTransform(3,4) = (v11*u21 + v12*u22 );
1212 dCCurvTransform(4,1) = (sint*(v11*v21 + v12*v22 + v13*v23) +
1213 omcost*(hv1*v21 + hv2*v22 + hv3*v23) +
1214 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
1215 (hn1*v11 + hn2*v12 + hn3*v13))/q;
1217 dCCurvTransform(4,2) = (sint*(u11*v21 + u12*v22 ) +
1218 omcost*(hu1*v21 + hu2*v22 + hu3*v23) +
1219 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
1220 (hn1*u11 + hn2*u12 ))*cosl0/q;
1222 dCCurvTransform(4,3) = (u11*v21 + u12*v22 );
1224 dCCurvTransform(4,4) = (v11*v21 + v12*v22 + v13*v23);
1230 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"rep X: "<<rep.
lX<<
" "<<rep.
lX.mag()
1231 <<
"\t Y: "<<rep.
lY<<
" "<<rep.
lY.mag()
1232 <<
"\t Z: "<<rep.
lZ<<
" "<<rep.
lZ.mag();
1238 double mulRR = theta02*dS*dS/3.;
1239 double mulRP = theta02*fabs(dS)*p0/2.;
1240 double mulPP = theta02*p0*p0;
1241 double losPP = dP*dP*1.6/fabs(dS)*(1.0 + p0*1
e-3);
1248 double sinThetaInv = tauNextPerpInv;
1249 double p0Mat = p0+ 0.5*dP;
1250 double p0Mat2 = p0Mat*p0Mat;
1254 svCurrent.
matDCovCurv(0,0) = losPP/(p0Mat2*p0Mat2);
1268 svCurrent.
matDCovCurv(2,2) = mulPP/p0Mat2*(sinThetaInv*sinThetaInv);
1269 svCurrent.
matDCovCurv(2,3) = mulRP/p0Mat*sinThetaInv;
1274 svCurrent.
matDCovCurv(3,2) = mulRP/p0Mat*sinThetaInv;
1295 dP = -dP > pMag ? -pMag+1
e-5 : dP;
1298 getNextState(svCurrent, svNext, dP, tauNext, drVec, dS, dS/radX0,
1304 double& dEdXPrime,
double& radX0,
1313 double lR = sv.
r3.perp();
1314 double lZ = fabs(sv.
r3.z());
1319 double dEdX_HCal = 0.95;
1320 double dEdX_ECal = 0.45;
1321 double dEdX_coil = 0.35;
1323 double dEdX_MCh = 0.053;
1324 double dEdX_Trk = 0.0114;
1325 double dEdX_Air = 2E-4;
1326 double dEdX_Vac = 0.0;
1328 double radX0_HCal = 1.44/0.8;
1329 double radX0_ECal = 0.89/0.7;
1330 double radX0_coil = 4.;
1331 double radX0_Fe = 1.76;
1332 double radX0_MCh = 1e3;
1333 double radX0_Trk = 320.;
1334 double radX0_Air = 3.e4;
1335 double radX0_Vac = 3.e9;
1339 if (! (lR < 380 && lZ < 785)){
1340 if (lZ > 785 ) rzLims =
MatBounds(0, 1e4, 785, 1e4);
1341 if (lZ < 785 ) rzLims =
MatBounds(380, 1e4, 0, 785);
1351 dEdx = dEdX_Vac; radX0 = radX0_Vac;
1357 dEdx = dEdX_Trk; radX0 = radX0_Trk;
1361 double lEtaDet = fabs(sv.
r3.eta());
1362 double scaleRadX = lEtaDet > 1.5 ? 0.7724 : 1./cosh(0.5*lEtaDet);
1363 scaleRadX *= scaleRadX;
1364 if (lEtaDet > 2 && lZ > 20) scaleRadX *= (lEtaDet-1.);
1365 if (lEtaDet > 2.5 && lZ > 20) scaleRadX *= (lEtaDet-1.);
1369 else if ( lZ < 294 + ecShift ){
1371 rzLims =
MatBounds(2.9, 129, 294, 294 + ecShift);
1372 dEdx = dEdX_Air; radX0 = radX0_Air;
1374 else if (lZ < 372 + ecShift){
1375 rzLims =
MatBounds(2.9, 129, 294 + ecShift, 372 + ecShift);
1376 dEdx = dEdX_ECal; radX0 = radX0_ECal;
1378 else if (lZ < 398 + ecShift){
1379 rzLims =
MatBounds(2.9, 129, 372 + ecShift, 398 + ecShift);
1380 dEdx = dEdX_HCal*0.05; radX0 = radX0_Air;
1382 else if (lZ < 555 + ecShift){
1383 rzLims =
MatBounds(2.9, 129, 398 + ecShift, 555 + ecShift);
1384 dEdx = dEdX_HCal*0.96; radX0 = radX0_HCal/0.96;
1390 if (lZ < 568 + ecShift) rzLims =
MatBounds(2.9, 129, 555 + ecShift, 568 + ecShift);
1391 else if (lZ < 625 + ecShift){
1392 if (lR < 85 + ecShift) rzLims =
MatBounds(2.9, 85, 568 + ecShift, 625 + ecShift);
1393 else rzLims =
MatBounds(85, 129, 568 + ecShift, 625 + ecShift);
1394 }
else if (lZ < 785 + ecShift) rzLims =
MatBounds(2.9, 129, 625 + ecShift, 785 + ecShift);
1395 else if (lZ < 1500 + ecShift) rzLims =
MatBounds(2.9, 129, 785 + ecShift, 1500 + ecShift);
1396 else rzLims =
MatBounds(2.9, 129, 1500 + ecShift, 1E4);
1399 if (! (lZ > 568 + ecShift && lZ < 625 + ecShift && lR > 85 )
1400 && ! (lZ > 785 + ecShift && lZ < 850 + ecShift && lR > 118)) {dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1401 else { dEdx = dEdX_MCh; radX0 = radX0_MCh; }
1405 if (lZ < 372 + ecShift && lR < 177){
1406 if (lZ < 304) rzLims =
MatBounds(129, 177, 0, 304);
1408 if (lR < 135 ) rzLims =
MatBounds(129, 135, 304, 343);
1409 else if (lR < 172 ){
1410 if (lZ < 311 ) rzLims =
MatBounds(135, 172, 304, 311);
1411 else rzLims =
MatBounds(135, 172, 311, 343);
1413 if (lZ < 328) rzLims =
MatBounds(172, 177, 304, 328);
1414 else rzLims =
MatBounds(172, 177, 328, 343);
1417 else if ( lZ < 343 + ecShift){
1418 rzLims =
MatBounds(129, 177, 343, 343 + ecShift);
1421 if (lR < 156 ) rzLims =
MatBounds(129, 156, 343 + ecShift, 372 + ecShift);
1422 else if ( (lZ - 343 - ecShift) > (lR - 156)*1.38 )
1423 rzLims =
MatBounds(156, 177, 127.72 + ecShift, 372 + ecShift, atan(1.38), 0);
1424 else rzLims =
MatBounds(156, 177, 343 + ecShift, 127.72 + ecShift, 0, atan(1.38));
1427 if (!(lR > 135 && lZ <343 + ecShift && lZ > 304 )
1428 && ! (lR > 156 && lZ < 372 + ecShift && lZ > 343 + ecShift && ((lZ-343. - ecShift )< (lR-156.)*1.38)))
1431 double cosThetaEquiv = 0.8/
sqrt(1.+lZ*lZ/lR/lR) + 0.2;
1432 if (lZ > 343) cosThetaEquiv = 1.;
1433 dEdx = dEdX_ECal*cosThetaEquiv; radX0 = radX0_ECal/cosThetaEquiv;
1436 if ( (lZ > 304 && lZ < 328 && lR < 177 && lR > 135)
1437 && ! (lZ > 311 && lR < 172) ) {dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1438 else if ( lZ > 343 && lZ < 343 + ecShift) { dEdx = dEdX_Air; radX0 = radX0_Air; }
1439 else {dEdx = dEdX_ECal*0.2; radX0 = radX0_Air;}
1442 else if (lZ < 554 + ecShift){
1444 if ( lZ > 372 + ecShift && lZ < 398 + ecShift )rzLims =
MatBounds(129, 177, 372 + ecShift, 398 + ecShift);
1445 else if (lZ < 548 + ecShift) rzLims =
MatBounds(129, 177, 398 + ecShift, 548 + ecShift);
1446 else rzLims =
MatBounds(129, 177, 548 + ecShift, 554 + ecShift);
1449 if ((lZ - 307) < (lR - 177.)*1.739) rzLims =
MatBounds(177, 193, 0, -0.803, 0, atan(1.739));
1450 else if ( lZ < 389) rzLims =
MatBounds(177, 193, -0.803, 389, atan(1.739), 0.);
1451 else if ( lZ < 389 + ecShift) rzLims =
MatBounds(177, 193, 389, 389 + ecShift);
1452 else if ( lZ < 548 + ecShift ) rzLims =
MatBounds(177, 193, 389 + ecShift, 548 + ecShift);
1453 else rzLims =
MatBounds(177, 193, 548 + ecShift, 554 + ecShift);
1456 double anApex = 375.7278 - 193./1.327;
1457 if ( (lZ - 375.7278) < (lR - 193.)/1.327) rzLims =
MatBounds(193, 264, 0, anApex, 0, atan(1./1.327));
1458 else if ( (lZ - 392.7278 ) < (lR - 193.)/1.327)
1459 rzLims =
MatBounds(193, 264, anApex, anApex+17., atan(1./1.327), atan(1./1.327));
1460 else if ( (lZ - 392.7278 - ecShift ) < (lR - 193.)/1.327)
1461 rzLims =
MatBounds(193, 264, anApex+17., anApex+17. + ecShift, atan(1./1.327), atan(1./1.327));
1463 else if ( lZ < 517 + ecShift ) rzLims =
MatBounds(193, 264, anApex+17. + ecShift, 517 + ecShift, atan(1./1.327), 0);
1464 else if (lZ < 548 + ecShift){
1465 if (lR < 246 ) rzLims =
MatBounds(193, 246, 517 + ecShift, 548 + ecShift);
1466 else rzLims =
MatBounds(246, 264, 517 + ecShift, 548 + ecShift);
1468 else rzLims =
MatBounds(193, 264, 548 + ecShift, 554 + ecShift);
1470 else if ( lR < 275){
1471 if (lZ < 433) rzLims =
MatBounds(264, 275, 0, 433);
1472 else if (lZ < 554 ) rzLims =
MatBounds(264, 275, 433, 554);
1473 else rzLims =
MatBounds(264, 275, 554, 554 + ecShift);
1476 if (lZ < 402) rzLims =
MatBounds(275, 287, 0, 402);
1477 else if (lZ < 554) rzLims =
MatBounds(275, 287, 402, 554);
1478 else rzLims =
MatBounds(275, 287, 554, 554 + ecShift);
1481 if ((lZ < 433 || lR < 264) && (lZ < 402 || lR < 275) && (lZ < 517 + ecShift || lR < 246)
1483 && lZ < 548 + ecShift
1484 && ! (lZ < 389 + ecShift && lZ > 335 && lR < 193 )
1485 && ! (lZ > 307 && lZ < 335 && lR < 193 && ((lZ - 307) > (lR - 177.)*1.739))
1486 && ! (lR < 177 && lZ < 398 + ecShift)
1487 && ! (lR < 264 && lR > 193 && fabs(441.5+0.5*ecShift - lZ + (lR - 269.)/1.327) < (8.5 + ecShift*0.5)) )
1488 { dEdx = dEdX_HCal; radX0 = radX0_HCal;
1490 else if( (lR < 193 && lZ > 389 && lZ < 389 + ecShift ) || (lR > 264 && lR < 287 && lZ > 554 && lZ < 554 + ecShift)
1491 ||(lR < 264 && lR > 193 && fabs(441.5+8.5+0.5*ecShift - lZ + (lR - 269.)/1.327) < ecShift*0.5) ) {
1492 dEdx = dEdX_Air; radX0 = radX0_Air;
1494 else {dEdx = dEdX_HCal*0.05; radX0 = radX0_Air; }
1497 else if (lZ < 564 + ecShift){
1499 rzLims =
MatBounds(129, 251, 554 + ecShift, 564 + ecShift);
1500 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1503 rzLims =
MatBounds(251, 287, 554 + ecShift, 564 + ecShift);
1504 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1507 else if (lZ < 625 + ecShift){
1508 rzLims =
MatBounds(129, 287, 564 + ecShift, 625 + ecShift);
1509 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1511 else if (lZ < 785 + ecShift){
1512 if (lR < 275) rzLims =
MatBounds(129, 275, 625 + ecShift, 785 + ecShift);
1514 if (lZ < 720 + ecShift) rzLims =
MatBounds(275, 287, 625 + ecShift, 720 + ecShift);
1515 else rzLims =
MatBounds(275, 287, 720 + ecShift, 785 + ecShift);
1517 if (! (lR > 275 && lZ < 720 + ecShift)) { dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1518 else { dEdx = dEdX_MCh; radX0 = radX0_MCh; }
1520 else if (lZ < 850 + ecShift){
1521 rzLims =
MatBounds(129, 287, 785 + ecShift, 850 + ecShift);
1522 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1524 else if (lZ < 910 + ecShift){
1525 rzLims =
MatBounds(129, 287, 850 + ecShift, 910 + ecShift);
1526 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1528 else if (lZ < 975 + ecShift){
1529 rzLims =
MatBounds(129, 287, 910 + ecShift, 975 + ecShift);
1530 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1532 else if (lZ < 1000 + ecShift){
1533 rzLims =
MatBounds(129, 287, 975 + ecShift, 1000 + ecShift);
1534 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1536 else if (lZ < 1063 + ecShift){
1537 rzLims =
MatBounds(129, 287, 1000 + ecShift, 1063 + ecShift);
1538 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1540 else if ( lZ < 1073 + ecShift){
1541 rzLims =
MatBounds(129, 287, 1063 + ecShift, 1073 + ecShift);
1542 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1544 else if (lZ < 1E4 ) {
1545 rzLims =
MatBounds(129, 287, 1073 + ecShift, 1E4);
1546 dEdx = dEdX_Air; radX0 = radX0_Air;
1550 dEdx = dEdX_Air; radX0 = radX0_Air;
1553 else if (lR <380 && lZ < 667){
1555 if (lR < 315) rzLims =
MatBounds(287, 315, 0, 630);
1556 else if (lR < 341 ) rzLims =
MatBounds(315, 341, 0, 630);
1557 else rzLims =
MatBounds(341, 380, 0, 630);
1558 }
else rzLims =
MatBounds(287, 380, 630, 667);
1560 if (lZ < 630) { dEdx = dEdX_coil; radX0 = radX0_coil; }
1561 else {dEdx = dEdX_Air; radX0 = radX0_Air; }
1566 bool isIron =
false;
1571 double bMag = sv.
bf.mag();
1572 isIron = (bMag > 0.75 && ! (lZ > 500 && lR <500 && bMag < 1.15)
1573 && ! (lZ < 450 && lR > 420 && bMag < 1.15 ) );
1577 if (isIron) { dEdx = dEdX_Fe; radX0 = radX0_Fe; }
1578 else { dEdx = dEdX_MCh; radX0 = radX0_MCh; }
1581 dEdx = dEdX_Air; radX0 = radX0_Air;
1584 else if (lR > 750 ){
1586 dEdx = dEdX_Air; radX0 = radX0_Air;
1588 else if (lZ < 667 + ecShift){
1589 rzLims =
MatBounds(287, 750, 667, 667 + ecShift);
1590 dEdx = dEdX_Air; radX0 = radX0_Air;
1593 else if (lZ < 724 + ecShift){
1594 if (lR < 380 ) rzLims =
MatBounds(287, 380, 667 + ecShift, 724 + ecShift);
1595 else rzLims =
MatBounds(380, 750, 667 + ecShift, 724 + ecShift);
1596 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1598 else if (lZ < 785 + ecShift){
1599 if (lR < 380 ) rzLims =
MatBounds(287, 380, 724 + ecShift, 785 + ecShift);
1600 else rzLims =
MatBounds(380, 750, 724 + ecShift, 785 + ecShift);
1601 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1603 else if (lZ < 850 + ecShift){
1604 rzLims =
MatBounds(287, 750, 785 + ecShift, 850 + ecShift);
1605 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1607 else if (lZ < 910 + ecShift){
1608 rzLims =
MatBounds(287, 750, 850 + ecShift, 910 + ecShift);
1609 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1611 else if (lZ < 975 + ecShift){
1612 rzLims =
MatBounds(287, 750, 910 + ecShift, 975 + ecShift);
1613 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1615 else if (lZ < 1000 + ecShift){
1616 rzLims =
MatBounds(287, 750, 975 + ecShift, 1000 + ecShift);
1617 dEdx = dEdX_Fe; radX0 = radX0_Fe;
1619 else if (lZ < 1063 + ecShift){
1621 rzLims =
MatBounds(287, 360, 1000 + ecShift, 1063 + ecShift);
1622 dEdx = dEdX_MCh; radX0 = radX0_MCh;
1626 rzLims =
MatBounds(360, 750, 1000 + ecShift, 1063 + ecShift);
1627 dEdx = dEdX_Air; radX0 = radX0_Air;
1630 else if ( lZ < 1073 + ecShift){
1631 rzLims =
MatBounds(287, 750, 1063 + ecShift, 1073 + ecShift);
1633 dEdx = dEdX_Air; radX0 = radX0_Air;
1635 else if (lZ < 1E4 ) {
1636 rzLims =
MatBounds(287, 750, 1073 + ecShift, 1E4);
1637 dEdx = dEdX_Air; radX0 = radX0_Air;
1639 else {dEdx = dEdX_Air; radX0 = radX0_Air; }
1645 double p0 = sv.
p3.mag();
1646 double logp0 =
log(p0);
1647 double p0powN33 = 0;
1653 double dEdX_mat = -(11.4 + 0.96*fabs(logp0+
log(2.8)) + 0.033*p0*(1.0 - p0powN33) )*1
e-3;
1656 dEdXPrime = dEdx == 0 ? 0 : -dEdx*(0.96/p0 + 0.033 - 0.022*p0powN33)*1
e-3;
1665 if (ind != 0 && result == 0){
1674 const double pars[6],
1675 double& dist,
double& tanDist,
1677 double fastSkipDist)
const{
1684 double curR = sv.
r3.perp();
1686 if (fabs(dist) > fastSkipDist){
1690 double curP2 = sv.
p3.mag2();
1691 double curPtPos2 = sv.
p3.perp2();
if(curPtPos2< 1
e-16) curPtPos2=1
e-16;
1693 double cosDPhiPR = (sv.
r3.x()*sv.
p3.x()+sv.
r3.y()*sv.
p3.y());
1694 refDirection = dist*cosDPhiPR > 0 ?
1696 tanDist = dist*
sqrt(curP2/curPtPos2);
1702 double curZ = sv.
r3.z();
1703 dist = pars[
Z_P] - curZ;
1704 if (fabs(dist) > fastSkipDist){
1708 double curP = sv.
p3.mag();
1709 refDirection = sv.
p3.z()*dist > 0. ?
1711 tanDist = dist/sv.
p3.z()*curP;
1717 Point rPlane(pars[0], pars[1], pars[2]);
1718 Vector nPlane(pars[3], pars[4], pars[5]);
1724 double dRDotN = (sv.
r3.x()-rPlane.x())*nPlane.x() + (sv.
r3.y()-rPlane.y())*nPlane.y() + (sv.
r3.z()-rPlane.z())*nPlane.z();
1726 dist = fabs(dRDotN);
1727 if (dist > fastSkipDist){
1731 double curP = sv.
p3.mag();
1733 double p0Inv = 1./p0;
1735 double tN = tau.dot(nPlane);
1736 refDirection = tN*dRDotN < 0. ?
1738 double b0 = sv.
bf.mag();
1739 if (fabs(tN)>1
e-24){
1740 tanDist = -dRDotN/tN;
1743 if (fabs(dRDotN)>1
e-24) tanDist = 1e6;
1746 if (fabs(tanDist) > 1e4) tanDist = 1e4;
1748 double b0Inv = 1./b0;
1749 double tNInv = 1./tN;
1751 double bHatN = bHat.dot(nPlane);
1752 double cosPB = bHat.dot(tau);
1753 double kVal = 2.99792458e-3*sv.
q*p0Inv*b0;
1754 double aVal = tanDist*kVal;
1755 Vector lVec = bHat.cross(tau);
1756 double bVal = lVec.dot(nPlane)*tNInv;
1757 if (fabs(aVal*bVal)< 0.3){
1758 double cVal = 1. - bHatN*cosPB*tNInv;
1759 double aacVal = cVal*aVal*aVal;
1760 if (fabs(aacVal)<1){
1761 double tanDCorr = bVal/2. + (bVal*bVal/2. + cVal/6)*aVal;
1764 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<tanDist<<
" vs "
1765 <<tanDist*(1.+tanDCorr)<<
" corr "<<tanDist*tanDCorr<<std::endl;
1766 tanDist *= (1.+tanDCorr);
1768 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"AACVal "<< fabs(aacVal)
1769 <<
" = "<<aVal<<
"**2 * "<<cVal<<
" too large:: will not converge"<<std::endl;
1772 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"ABVal "<< fabs(aVal*bVal)
1773 <<
" = "<<aVal<<
" * "<<bVal<<
" too large:: will not converge"<<std::endl;
1781 Point cVertex(pars[0], pars[1], pars[2]);
1782 if (cVertex.perp2() < 1
e-10){
1785 double relV3mag = relV3.mag();
1787 double theta(pars[3]);
1789 double sinTheta =
sin(theta);
1790 double cosTheta =
cos(theta);
1791 double cosV3Theta = relV3.z()/relV3mag;
1792 if (cosV3Theta>1) cosV3Theta=1;
1793 if (cosV3Theta<-1) cosV3Theta=-1;
1794 double sinV3Theta =
sqrt(1.-cosV3Theta*cosV3Theta);
1796 double sinDTheta = sinTheta*cosV3Theta - cosTheta*sinV3Theta;
1797 double cosDTheta = cosTheta*cosV3Theta + sinTheta*sinV3Theta;
1798 bool isInside = sinTheta > sinV3Theta && cosTheta*cosV3Theta > 0;
1799 dist = isInside || cosDTheta > 0 ? relV3mag*sinDTheta : relV3mag;
1800 if (fabs(dist) > fastSkipDist){
1805 double relV3phi=relV3.phi();
1806 double normPhi = isInside ?
1808 double normTheta = theta >
Geom::pi()/2. ?
1812 Vector norm; norm.setRThetaPhi(fabs(dist), normTheta, normPhi);
1813 double curP = sv.
p3.mag();
double cosp3theta = sv.
p3.z()/curP;
1814 if (cosp3theta>1) cosp3theta=1;
1815 if (cosp3theta<-1) cosp3theta=-1;
1816 double sineConeP = sinTheta*cosp3theta - cosTheta*
sqrt(1.-cosp3theta*cosp3theta);
1818 double sinSolid = norm.dot(sv.
p3)/(fabs(dist)*curP);
1819 tanDist = fabs(sinSolid) > fabs(sineConeP) ? dist/fabs(sinSolid) : dist/fabs(sineConeP);
1822 refDirection = sinSolid > 0 ?
1825 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Cone pars: theta "<<theta
1826 <<
" normTheta "<<norm.theta()
1827 <<
" p3Theta "<<sv.
p3.theta()
1828 <<
" sinD: "<< sineConeP
1829 <<
" sinSolid "<<sinSolid;
1832 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"refToDest:toCone the point is "
1833 <<(isInside?
"in" :
"out")<<
"side the cone"
1844 double curS = fabs(sv.
path());
1846 if (fabs(dist) > fastSkipDist){
1850 refDirection = pars[
PATHL_P] > 0 ?
1858 Point pDest(pars[0], pars[1], pars[2]);
1859 double curP = sv.
p3.mag();
1860 dist = (sv.
r3 - pDest).
mag()+ 1
e-24;
1861 tanDist = (sv.
r3.dot(sv.
p3) - pDest.dot(sv.
p3))/curP;
1863 double b0 = sv.
bf.mag();
1866 double kVal = 2.99792458e-3*sv.
q/p0*b0;
1867 double aVal = fabs(dist*kVal);
1868 tanDist *= 1./(1.+ aVal);
1869 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"corrected by aVal "<<aVal<<
" to "<<tanDist;
1871 refDirection = tanDist < 0 ?
1878 Point rLine(pars[0], pars[1], pars[2]);
1879 Vector dLine(pars[3], pars[4], pars[5]);
1880 dLine = (dLine - rLine);
1881 dLine *= 1./dLine.mag();
if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"dLine "<<dLine;
1884 double curP = sv.
p3.mag();
1885 Vector dRPerp = dR - dLine*(dR.dot(dLine));
1886 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"dRperp "<<dRPerp;
1888 dist = dRPerp.mag() + 1
e-24;
1889 tanDist = dRPerp.dot(sv.
p3)/curP;
1891 double cosAlpha2 = dLine.dot(sv.
p3)/curP; cosAlpha2 *= cosAlpha2;
1892 tanDist *= 1./
sqrt(fabs(1.-cosAlpha2)+1
e-96);
1895 double b0 = sv.
bf.mag();
1898 double kVal = 2.99792458e-3*sv.
q/p0*b0;
1899 double aVal = fabs(dist*kVal);
1900 tanDist *= 1./(1.+ aVal);
1901 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"corrected by aVal "<<aVal<<
" to "<<tanDist;
1903 refDirection = tanDist < 0 ?
1919 double tanDistConstrained = tanDist;
1920 if (fabs(tanDist) > 4.*fabs(dist) ) tanDistConstrained *= tanDist == 0 ? 0 : fabs(dist/tanDist*4.);
1923 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"refToDest input: dest"<<dest<<
" pars[]: ";
1924 for (
int i = 0;
i < 6;
i++){
1925 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
", "<<
i<<
" "<<pars[
i];
1927 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<std::endl;
1928 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"refToDest output: "
1930 <<
"\t tanDist "<< tanDist
1931 <<
"\t tanDistConstr "<< tanDistConstrained
1932 <<
"\t refDirection "<< refDirection
1935 tanDist = tanDistConstrained;
1943 double& dist,
double& tanDist,
1944 double fastSkipDist,
bool expectNewMagVolume,
double maxStep)
const{
1950 if (cVol == 0)
return result;
1951 const std::vector<VolumeSide>& cVolFaces(cVol->
faces());
1953 double distToFace[6] = {0,0,0,0,0,0};
1954 double tanDistToFace[6] = {0,0,0,0,0,0};
1960 unsigned int iFDestSorted[6] = {0,0,0,0,0,0};
1962 unsigned int nearParallels = 0;
1964 double curP = sv.
p3.mag();
1968 <<
" with "<<cVolFaces.size()<<
" faces"<<std::endl;
1971 unsigned int nFaces = cVolFaces.size();
1972 for (
unsigned int iFace = 0; iFace < nFaces; ++iFace){
1974 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Too many faces"<<std::endl;
1977 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Start with face "<<iFace<<std::endl;
1984 const Cone* cCone = 0;
1985 if (
typeid(cVolFaces[iFace].surface()) ==
typeid(
const Plane&)){
1986 cPlane = &cVolFaces[iFace].surface();
1987 }
else if (
typeid(cVolFaces[iFace].surface()) ==
typeid(
const Cylinder&)){
1988 cCyl =
dynamic_cast<const Cylinder*
>(&cVolFaces[iFace].surface());
1989 }
else if (
typeid(cVolFaces[iFace].surface()) ==
typeid(
const Cone&)){
1990 cCone =
dynamic_cast<const Cone*
>(&cVolFaces[iFace].surface());
1992 edm::LogWarning(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Could not cast a volume side surface to a known type"<<std::endl;
1996 if (cPlane!=0)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The face is a plane at "<<cPlane<<std::endl;
1997 if (cCyl!=0)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The face is a cylinder at "<<cCyl<<std::endl;
2000 double pars[6] = {0,0,0,0,0,0};
2007 pars[0] = rPlane.x(); pars[1] = rPlane.y(); pars[2] = rPlane.z();
2008 pars[3] = nPlane.x(); pars[4] = nPlane.y(); pars[5] = nPlane.z();
2010 }
else if (cCyl != 0){
2012 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Cylinder at "<<cCyl->
position()
2018 }
else if (cCone != 0){
2020 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Cone at "<<cCone->
position()
2021 <<
" rorated by "<<cCone->
rotation()
2022 <<
" vertex at "<<cCone->
vertex()
2027 pars[2] = cCone->
vertex().
z();
2031 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Unknown surface"<<std::endl;
2035 resultToFace[iFace] =
2037 distToFace[iFace], tanDistToFace[iFace], refDirectionToFace[iFace], fastSkipDist);
2048 double invDTFPosiF = 1./(1
e-32+fabs(tanDistToFace[iFace]));
2049 double dSlope = fabs(distToFace[iFace])*invDTFPosiF;
2050 double maxStepL = maxStep> 100 ? 100 : maxStep;
if (maxStepL < 10) maxStepL = 10.;
2051 bool isNearParallel = fabs(tanDistToFace[iFace]) + 100.*curP*dSlope < maxStepL
2054 if (refDirectionToFace[iFace] == dir || isNearParallel){
2055 if (isNearParallel) nearParallels++;
2056 iFDestSorted[nDestSorted] = iFace;
2062 if (refDirectionToFace[iFace] == dir){
2063 if (iDistMin == -1) iDistMin = iFace;
2064 else if (fabs(distToFace[iFace]) < fabs(distToFace[iDistMin])) iDistMin = iFace;
2067 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<cVol<<
" "<<iFace<<
" "
2068 <<tanDistToFace[iFace]<<
" "<<distToFace[iFace]<<
" "<<refDirectionToFace[iFace]<<
" "<<dir<<std::endl;
2072 for (
int i = 0;
i<nDestSorted; ++
i){
2073 int iMax = nDestSorted-
i-1;
2074 for (
int j=0;
j<nDestSorted-
i; ++
j){
2075 if (fabs(tanDistToFace[iFDestSorted[
j]]) > fabs(tanDistToFace[iFDestSorted[iMax]]) ){
2079 int iTmp = iFDestSorted[nDestSorted-i-1];
2080 iFDestSorted[nDestSorted-i-1] = iFDestSorted[iMax];
2081 iFDestSorted[iMax] = iTmp;
2085 for (
int i=0;
i<nDestSorted;++
i){
2086 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<cVol<<
" "<<
i<<
" "<<iFDestSorted[
i]<<
" "<<tanDistToFace[iFDestSorted[
i]]<<std::endl;
2093 for (
int i=0;
i<nDestSorted;++
i){
2094 iFDest = iFDestSorted[
i];
2098 Vector lDelta(sv.
p3); lDelta *= sign/curP*fabs(distToFace[iFDest]);
2099 gPointEst += lDelta;
2101 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Linear est point "<<gPointEst
2102 <<
" for iFace "<<iFDest<<std::endl;
2104 GlobalPoint gPointEstNorZ(gPointEst.x(), gPointEst.y(), gPointEst.z() );
2105 if ( cVol->
inside(gPointEstNorZ) ){
2107 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is inside the volume"<<std::endl;
2111 dist = distToFace[iFDest];
2112 tanDist = tanDistToFace[iFDest];
2114 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Got a point near closest boundary -- face "<<iFDest<<std::endl;
2128 double lDist = iDistMin == -1 ? fastSkipDist : fabs(distToFace[iDistMin]);
2129 if (lDist > fastSkipDist) lDist = fastSkipDist;
2130 Vector lDelta(sv.
p3); lDelta *= sign/curP*lDist;
2131 gPointEst += lDelta;
2133 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Linear est point to shortest dist "<<gPointEst
2134 <<
" for iFace "<<iDistMin<<
" at distance "<<lDist*sign<<std::endl;
2136 GlobalPoint gPointEstNorZ(gPointEst.x(), gPointEst.y(), gPointEst.z() );
2137 if ( cVol->
inside(gPointEstNorZ) ){
2139 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is inside the volume"<<std::endl;
2149 tanDist = dist*1.01;
2151 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Wrong volume located: return small dist, tandist"<<std::endl;
2157 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"All faces are too far"<<std::endl;
2159 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Appear to be in a wrong volume"<<std::endl;
2161 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Something else went wrong"<<std::endl;
2172 double& dist,
double& tanDist,
2173 double fastSkipDist)
const{
2182 double distToFace[4] = {0,0,0,0};
2183 double tanDistToFace[4] = {0,0,0,0};
2188 double curP = sv.
p3.mag();
2190 for (
unsigned int iFace = 0; iFace < 4; iFace++){
2192 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Start with mat face "<<iFace<<std::endl;
2195 double pars[6] = {0,0,0,0,0,0};
2198 if (fabs(parLim[iFace+2])< 1
e-6){
2200 pars[0] = 0; pars[1] = 0; pars[2] = -parLim[iFace];
2201 pars[3] = 0; pars[4] = 0; pars[5] = 1;
2203 pars[0] = 0; pars[1] = 0; pars[2] = parLim[iFace];
2204 pars[3] = 0; pars[4] = 0; pars[5] = 1;
2209 pars[0] = 0; pars[1] = 0;
2210 pars[2] = parLim[iFace];
2211 pars[3] =
Geom::pi()/2. - parLim[iFace+2];
2213 pars[0] = 0; pars[1] = 0;
2214 pars[2] = - parLim[iFace];
2215 pars[3] =
Geom::pi()/2. + parLim[iFace+2];
2224 resultToFace[iFace] =
2226 distToFace[iFace], tanDistToFace[iFace], refDirectionToFace[iFace], fastSkipDist);
2232 if (refDirectionToFace[iFace] == dir || fabs(distToFace[iFace]) < 2
e-2*fabs(tanDistToFace[iFace]) ){
2235 Vector lDelta(sv.
p3); lDelta *= sign*fabs(distToFace[iFace])/curP;
2236 gPointEst += lDelta;
2238 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Linear est point "<<gPointEst
2241 double lZ = fabs(gPointEst.z());
2242 double lR = gPointEst.perp();
2243 double tan4 = parLim[4] == 0 ? 0 :
tan(parLim[4]);
2244 double tan5 = parLim[5] == 0 ? 0 :
tan(parLim[5]);
2245 if ( (lZ - parLim[2]) > lR*tan4
2246 && (lZ - parLim[3]) < lR*tan5
2247 && lR > parLim[0] && lR < parLim[1]){
2249 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is inside the volume"<<std::endl;
2255 if (fabs(tanDistToFace[iFDest]) > fabs(tanDistToFace[iFace])){
2261 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"The point is NOT inside the volume"<<std::endl;
2269 dist = distToFace[iFDest];
2270 tanDist = tanDistToFace[iFDest];
2272 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Got a point near closest boundary -- face "<<iFDest<<std::endl;
2276 LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Failed to find a dest point inside the volume"<<std::endl;
2286 if (vol == 0)
return false;
2310 if (
debug_)
LogTrace(metname)<<std::setprecision(17)<<std::setw(20)<<std::scientific<<
"Volume is magnetic, located at "<<vol->
position()<<std::endl;
2312 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
virtual PropagationDirection propagationDirection() 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
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
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
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.
static const char *const name(DDSolidShape s)
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const =0
void initStateArraySHPSpecific(StateArray &svBuf, bool flagsOnly) const
(Internals) set defaults needed for states used inside propagate methods
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
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
virtual const std::vector< VolumeSide > & faces() const =0
Access to volume faces.
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
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
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &ftsStart, const Plane &pDest) const override
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