59 (config.materialEffects >= brokenLinesCoarse) ? 1 : refTsos.localParameters().mixedFormatVector().kSize,
61 (config.materialEffects >= brokenLinesCoarse) ?
63 ( (config.materialEffects == breakPoints) ? 2*((config.
useBeamSpot) ? recHits.
size()+1 : recHits.
size())-2 : 0) ,
64 (config.materialEffects >= brokenLinesCoarse) ?
66 ( (config.materialEffects == breakPoints) ? 2*((config.
useBeamSpot) ? recHits.
size()+1 : recHits.
size())-2 : 0) ),
68 materialEffects_(config.materialEffects),
69 propDir_(config.propDir),
71 includeAPEs_(config.includeAPEs),
72 allowZeroMaterial_(config.allowZeroMaterial)
79 fwdRecHits.reserve(recHits.size());
80 for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it=recHits.rbegin();
81 it != recHits.rend(); ++it) {
82 fwdRecHits.push_back(*it);
120 std::auto_ptr<MaterialEffectsUpdator> aMaterialEffectsUpdator
122 if (!aMaterialEffectsUpdator.get())
return false;
125 std::vector<AlgebraicMatrix> allJacobians;
131 std::vector<AlgebraicSymMatrix> allCurvatureChanges;
136 std::vector<AlgebraicMatrix> allProjections;
138 std::vector<AlgebraicSymMatrix> allDeltaParameterCovs;
142 std::vector<AlgebraicMatrix> allLocalToCurv;
144 std::vector<double> allSteps;
146 std::vector<AlgebraicMatrix> allCurvlinJacobians;
151 unsigned int iRow = 0;
162 if (!tsctbl.isValid()) {
163 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct" 164 <<
"TrajectoryStateClostestToBeamLine invalid. Skip track.";
173 std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
174 propagator.propagateWithPath(pcaFts, refTsos.
surface());
176 if (!tsosWithPath.first.isValid())
return false;
190 allRecHits.push_back(bsRecHit);
195 TransientTrackingRecHit::ConstRecHitContainer::const_iterator itRecHit;
196 for ( itRecHit = recHits.begin(); itRecHit != recHits.end(); ++itRecHit ) {
198 allRecHits.push_back(hitPtr);
201 for ( itRecHit = allRecHits.begin(); itRecHit != allRecHits.end(); ++itRecHit ) {
211 allJacobians.push_back(fullJacobian);
214 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
219 allLocalToCurv.push_back(localToCurvilinear);
220 allSteps.push_back(0.);
221 allCurvlinJacobians.push_back(firstCurvlinJacobian);
227 double nextStep = 0.;
230 if (!this->
propagate(previousHitPtr->det()->surface(), previousTsos,
231 hitPtr->det()->
surface(), nextTsos,
232 nextJacobian, nextCurvlinJacobian, nextStep, magField)) {
236 allJacobians.push_back(nextJacobian);
237 fullJacobian = nextJacobian * previousChangeInCurvature * fullJacobian;
241 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
242 allLocalToCurv.push_back(localToCurvilinear);
243 if (nextStep == 0.) {
244 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct" 245 <<
"step 0. from id " << previousHitPtr->geographicalId()
246 <<
" to " << hitPtr->det()->geographicalId() <<
".";
249 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct" <<
"Skip track.";
253 allSteps.push_back(nextStep);
254 allCurvlinJacobians.push_back(nextCurvlinJacobian);
264 if ( !updatedTsos.isValid() )
return false;
266 if (
theTsosVec.back().localParameters().charge() )
269 /
theTsosVec.back().localParameters().signedInverseMomentum();
273 allDeltaParameterCovs.push_back( asHepMatrix<5>(updatedTsos.localError().matrix()) );
274 allCurvatureChanges.push_back(previousChangeInCurvature);
280 previousHitPtr = hitPtr;
303 allDeltaParameterCovs);
307 allDeltaParameterCovs, allLocalToCurv);
319 allDeltaParameterCovs);
323 allDeltaParameterCovs, allLocalToCurv);
325 if (!msOK)
return false;
348 switch (materialEffects) {
387 const std::pair<TrajectoryStateOnSurface, double> tsosWithPath =
391 if (!tsosWithPath.first.isValid())
return false;
393 nextStep = tsosWithPath.second;
397 tsosWithPath.first.globalPosition(),
398 tsosWithPath.first.globalMomentum(),
399 tsosWithPath.second);
400 const AlgebraicMatrix curvilinearJacobian = asHepMatrix<5,5>(aJacobian.jacobian());
404 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
408 const AlgebraicMatrix curvilinearToLocal = asHepMatrix<5>(endTrafo.jacobian());
412 newCurvlinJacobian = curvilinearJacobian;
413 newJacobian = curvilinearToLocal * curvilinearJacobian * localToCurvilinear;
414 newTsos = tsosWithPath.first;
433 const auto& newHitPtr = hitPtr;
437 const LocalPoint localMeasurement = newHitPtr->localPosition();
438 const LocalError localMeasurementCov = newHitPtr->localPositionError();
450 if (localAPE.valid()) {
467 for (
int j = 0; j < projectedJacobian.num_row(); ++j) {
481 for (
int i = 0;
i < localPosition.num_row(); ++
i) {
489 const std::vector<AlgebraicMatrix> &allProjections,
490 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
491 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
510 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
512 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allJacobians[
k]);
515 deltaMaterialEffectsCov = paramMaterialEffectsCov.similarity(allProjections[k]);
522 paramMaterialEffectsCov += allDeltaParameterCovs[
k];
524 tempParameterCov = paramMaterialEffectsCov;
527 for (
unsigned int l = k+1;
l < allJacobians.size(); ++
l) {
528 tempParameterCov = allJacobians[
l] * allCurvatureChanges[
l] * tempParameterCov;
529 tempMeasurementCov = allProjections[
l] * tempParameterCov * allProjections[
k].T();
546 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allCurvatureChanges[k]);
557 const std::vector<AlgebraicMatrix> &allProjections,
558 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
559 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
560 const std::vector<AlgebraicMatrix> &allLocalToCurv)
564 int offsetMeas =
nMeasPerHit * allJacobians.size();
569 MSprojection[0][1] = 1;
570 MSprojection[1][2] = 1;
575 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
578 tempJacobian = allJacobians[
k] * allCurvatureChanges[
k];
579 tempMSCov = allDeltaParameterCovs[
k-1].similarity(allLocalToCurv[
k-1]);
580 tempMSCovProj = tempMSCov.similarity(MSprojection);
586 tempMSJacProj = (allProjections[
k] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
588 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp" 589 <<
"Inversion 1 for break points failed: " << ierr;
597 for (
unsigned int l =
k+1;
l < allJacobians.size(); ++
l) {
600 tempJacobian = allJacobians[
l] * allCurvatureChanges[
l] * tempJacobian;
601 tempMSJacProj = (allProjections[
l] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
603 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp" 604 <<
"Inversion 2 for break points failed: " << ierr;
622 const std::vector<AlgebraicMatrix> &allProjections,
623 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
624 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
625 const std::vector<AlgebraicMatrix> &allLocalToCurv,
637 int offsetMeas =
nMeasPerHit*allCurvlinJacobians.size();
641 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
645 QbypToCurv[0][0] = 1.;
647 AngleToCurv[1][1] = 1.;
648 AngleToCurv[2][0] = 1./cosLambda;
650 CurvToAngle[1][1] = 1.;
651 CurvToAngle[0][2] = cosLambda;
653 OffsetToCurv[3][0] = 1.;
654 OffsetToCurv[4][1] = 1.;
656 CurvToOffset[0][3] = 1.;
657 CurvToOffset[1][4] = 1.;
661 TrajToQbyp[0][0] = 1.;
663 TrajToOff1[0][1] = 1.;
664 TrajToOff1[1][2] = 1.;
666 TrajToOff2[0][3] = 1.;
667 TrajToOff2[1][4] = 1.;
670 AlgebraicMatrix JacCurvToOffsetL, JacOffsetToOffsetL, JacAngleToOffsetL, JacQbypToOffsetL, JacOffsetToAngleL;
671 AlgebraicMatrix JacCurvToOffsetN, JacOffsetToOffsetN, JacAngleToOffsetN, JacQbypToOffsetN, JacOffsetToAngleN;
675 JacCurvToOffsetN = CurvToOffset * allCurvlinJacobians[1];
676 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
677 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
678 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
679 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
681 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 682 <<
"Inversion 1 for fine broken lines failed: " << ierr;
685 JacOffsetToAngleC = -(JacOffsetToAngleN * JacOffsetToOffsetN);
686 JacQbypToAngleC = -(JacOffsetToAngleN * JacQbypToOffsetN);
688 AlgebraicMatrix JacTrajToAngle = JacQbypToAngleC * TrajToQbyp + JacOffsetToAngleC * TrajToOff1 + JacOffsetToAngleN * TrajToOff2;
693 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 694 <<
"Inversion 2 for fine broken lines failed: " << ierr;
705 for (
unsigned int k = 0;
k < allCurvlinJacobians.size(); ++
k) {
707 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
709 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 710 <<
"Inversion 3 for fine broken lines failed: " << ierr;
720 for (
unsigned int k = 1;
k < allCurvlinJacobians.size()-1; ++
k) {
727 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
728 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
733 tempJacL = allCurvlinJacobians[
k] * tempJacobian;
734 JacCurvToOffsetL = CurvToOffset * tempJacL.inverse(ierr);
737 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 738 <<
"Inversion 4 for fine broken lines failed: " << ierr;
741 JacOffsetToOffsetL = JacCurvToOffsetL * OffsetToCurv;
742 JacAngleToOffsetL = JacCurvToOffsetL * AngleToCurv;
743 JacQbypToOffsetL = JacCurvToOffsetL * QbypToCurv;
744 JacOffsetToAngleL =-JacAngleToOffsetL.inverse(ierr);
746 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 747 <<
"Inversion 5 for fine broken lines failed: " << ierr;
750 tempJacobian = tempJacobian * allCurvatureChanges[
k];
751 tempJacN = allCurvlinJacobians[
n] * tempJacobian;
752 JacCurvToOffsetN = CurvToOffset * tempJacN;
753 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
754 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
755 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
756 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
758 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 759 <<
"Inversion 6 for fine broken lines failed: " << ierr;
762 JacOffsetToAngleC = -(JacOffsetToAngleL * JacOffsetToOffsetL + JacOffsetToAngleN * JacOffsetToOffsetN);
763 JacQbypToAngleC = -(JacOffsetToAngleL * JacQbypToOffsetL + JacOffsetToAngleN * JacQbypToOffsetN);
793 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
794 const std::vector<AlgebraicMatrix> &allLocalToCurv,
795 const std::vector<double> &allSteps,
797 const double minStep)
809 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
813 double delta (1.0/allSteps[1]);
824 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 825 <<
"Inversion 1 for coarse broken lines failed: " << ierr;
830 CurvToAngle[1][1] = 1.;
831 CurvToAngle[0][2] = cosLambda;
833 OffsetToCurv[3][0] = 1.;
834 OffsetToCurv[4][1] = 1.;
841 std::vector<unsigned int>
first(allSteps.size());
842 std::vector<unsigned int>
last (allSteps.size());
843 std::vector<unsigned int> plane(allSteps.size());
844 std::vector<double> sPlane(allSteps.size());
845 unsigned int nPlane = 0;
848 for (
unsigned int k = 1;
k < allSteps.size(); ++
k) {
850 if (fabs(allSteps[
k])>minStep) { nPlane += 1;
first[nPlane] =
k; }
853 sPlane[nPlane] += sTot;
855 if (nPlane < 2)
return false;
859 for (
unsigned int k = 0;
k <= nPlane; ++
k) { sPlane[
k] /= (double) (
last[
k]-
first[
k]+1); }
863 for (
unsigned int k = 0;
k < allSteps.size(); ++
k) {
866 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
868 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl" 869 <<
"Inversion 2 for coarse broken lines failed: " << ierr;
873 unsigned int iPlane = plane[
k];
883 if (fabs(sTot) < fabs(sPlane[iPlane])) { jPlane = (iPlane>0) ? iPlane - 1 : 1; }
884 else { jPlane = (iPlane<nPlane) ? iPlane + 1 : nPlane -1 ;}
886 double sDiff = sPlane[iPlane] - sPlane[jPlane];
887 double iFrac = (sTot - sPlane[jPlane]) / sDiff;
888 double jFrac = 1.0 - iFrac;
903 for (
unsigned int i = 1;
i < nPlane; ++
i) {
911 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
912 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
917 double stepK = sPlane[
i] - sPlane[
l];
918 double stepN = sPlane[
n] - sPlane[
i];
919 double deltaK (1.0/stepK);
920 double deltaN (1.0/stepN);
925 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*l+1] = deltaK;
927 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
i ] = -(deltaK + deltaN);
928 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*
i+1] = -(deltaK + deltaN);
930 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
n ] = deltaN;
931 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*n+1] = deltaN;
940 const std::vector<AlgebraicMatrix> &allProjections,
941 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
942 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
947 const double minPrec = 1.0;
950 OffsetToLocal[3][0] = 1.;
951 OffsetToLocal[4][1] = 1.;
953 SlopeToLocal[1][0] = 1.;
954 SlopeToLocal[2][1] = 1.;
957 Eigen::Matrix2d covariance, scatPrecision, proLocalToMeas;
958 Matrix5d jacPointToPoint;
959 auto identity = Matrix5d::Identity();
960 Eigen::Vector2d measurement, measPrecDiag;
961 auto scatterer = Eigen::Vector2d::Zero();
966 unsigned int numHits = allJacobians.size();
967 std::vector<GblPoint> GblPointList;
968 GblPointList.reserve(numHits);
969 for (
unsigned int k = 0;
k < numHits; ++
k) {
972 clhep2eigen(allJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
975 GblPoint aGblPoint( jacPointToPoint );
978 clhep2eigen(allProjections[k] * OffsetToLocal, proLocalToMeas);
989 for (
unsigned int row = 0; row < 2; ++row) {
990 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
992 aGblPoint.addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
996 aGblPoint.addMeasurement(proLocalToMeas, measurement, covariance.inverse(), minPrec);
1000 clhep2eigen(allDeltaParameterCovs[k].similarityT(SlopeToLocal), scatPrecision);
1001 if (!(scatPrecision.colPivHouseholderQr().isInvertible())) {
1004 <<
"@SUB=ReferenceTrajectory::addMaterialEffectsLocalGbl" 1005 <<
"\nEncountered singular scatter covariance-matrix without allowing " 1006 <<
"for zero material.";
1010 aGblPoint.addScatterer(scatterer, scatPrecision.inverse());
1013 GblPointList.push_back( aGblPoint );
1024 const std::vector<AlgebraicMatrix> &allProjections,
1025 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
1026 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
1027 const std::vector<AlgebraicMatrix> &allLocalToCurv)
1032 const double minPrec = 1.0;
1036 OffsetToCurv[3][0] = 1.;
1037 OffsetToCurv[4][1] = 1.;
1042 Eigen::Matrix2d covariance, proLocalToMeas;
1043 Matrix5d jacPointToPoint, firstLocalToCurv;
1044 Eigen::Vector2d measurement, measPrecDiag, scatPrecDiag;
1045 auto scatterer = Eigen::Vector2d::Zero();
1048 unsigned int numHits = allCurvlinJacobians.size();
1049 std::vector<GblPoint> GblPointList;
1050 GblPointList.reserve(numHits);
1051 for (
unsigned int k = 0;
k < numHits; ++
k) {
1053 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
1055 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsGbl" 1056 <<
"Inversion 1 for general broken lines failed: " << ierr;
1061 clhep2eigen(allCurvlinJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
1064 GblPoint aGblPoint( jacPointToPoint );
1078 for (
unsigned int row = 0; row < 2; ++row) {
1079 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
1081 aGblPoint.addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
1085 aGblPoint.addMeasurement(proLocalToMeas, measurement, covariance.inverse(), minPrec);
1089 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[k]);
1090 for (
unsigned int row = 0; row < 2; ++row) {
1091 scatPrecDiag(row) = 1.0/tempMSCov[row+1][row+1];
1095 bool singularCovariance{
false};
1096 for (
int row = 0; row < scatPrecDiag.rows(); ++row) {
1098 singularCovariance =
true;
1104 <<
"@SUB=ReferenceTrajectory::addMaterialEffectsCurvlinGbl" 1105 <<
"\nEncountered singular scatter covariance-matrix without allowing " 1106 <<
"for zero material.";
1110 aGblPoint.addScatterer(scatterer, scatPrecDiag);
1113 GblPointList.push_back( aGblPoint );
1117 theGblInput.push_back(std::make_pair(GblPointList, firstLocalToCurv));
1123 template <
typename Derived>
1125 Eigen::MatrixBase<Derived>&
out) {
1126 static_assert(Derived::ColsAtCompileTime == 1,
1127 "clhep2eigen: 'out' must be of vector type");
1128 for (
int row = 0; row < in.num_row(); ++row) {
1133 template <
typename Derived>
1135 Eigen::MatrixBase<Derived>&
out) {
1136 for (
int row = 0; row < in.num_row(); ++row) {
1137 for (
int col = 0;
col < in.num_col(); ++
col) {
1143 template <
typename Derived>
1145 Eigen::MatrixBase<Derived>&
out) {
1146 for (
int row = 0; row < in.num_row(); ++row) {
1147 for (
int col = 0;
col < in.num_col(); ++
col) {
1161 switch (hitPtr->dimension()) {
1163 return getHitProjectionMatrixT<1>(hitPtr);
1165 return getHitProjectionMatrixT<2>(hitPtr);
1167 return getHitProjectionMatrixT<3>(hitPtr);
1169 return getHitProjectionMatrixT<4>(hitPtr);
1171 return getHitProjectionMatrixT<5>(hitPtr);
1173 throw cms::Exception(
"ReferenceTrajectory::getHitProjectionMatrix")
1174 <<
"Unexpected hit dimension: " << hitPtr->dimension() <<
"\n";
1183 template<
unsigned int N>
1200 holder.
setup<
N>(&
r, &V, &
pf, &rMeas, &VMeas, dummyPars, dummyErr);
1201 hitPtr->getKfComponents(holder);
void setup(typename AlgebraicROOTObject< D >::Vector *params, typename AlgebraicROOTObject< D, D >::SymMatrix *errors, ProjectMatrix< double, 5, D > *projFunc, typename AlgebraicROOTObject< D >::Vector *measuredParams, typename AlgebraicROOTObject< D, D >::SymMatrix *measuredErrors, const AlgebraicVector5 &tsosLocalParameters, const AlgebraicSymMatrix55 &tsosLocalErrors)
AlgebraicMatrix theInnerTrajectoryToCurvilinear
double z0() const
z coordinate
AlgebraicMatrix getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
virtual bool addMaterialEffectsBrl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv, const GlobalTrajectoryParameters >p)
const LocalTrajectoryParameters & localParameters() const
const bool allowZeroMaterial_
AlgebraicMatrix theInnerLocalToTrajectory
int nominalValue() const
The nominal field value for this map in kGauss.
virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iRow, const TrajectoryStateOnSurface &updatedTsos)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
AlgebraicMatrix theDerivatives
unsigned int theNumberOfVirtualPars
Geom::Phi< T > phi() const
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
unsigned int theNumberOfVirtualMeas
virtual bool addMaterialEffectsLocalGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvatureChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParameterCovs)
MultipleScatteringUpdator
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
SurfaceSide surfaceSide(const PropagationDirection dir) const
void clhep2eigen(const AlgebraicVector &in, Eigen::MatrixBase< Derived > &out)
virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const MagneticField *magField) const
AlgebraicVector theParameters
AlgebraicVector theMeasurements
virtual bool addMaterialEffectsBp(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
const Plane & surface() const
The nominal surface of the GeomDet.
float signedInverseMomentum() const
Signed inverse momentum q/p (zero for neutrals).
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
const PropagationDirection propDir_
AlgebraicSymMatrix theTrajectoryPositionCov
std::vector< std::pair< std::vector< gbl::GblPoint >, Eigen::MatrixXd > > theGblInput
double dydz() const
dydz slope
virtual bool addMaterialEffectsCurvlinGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
const SurfaceType & surface() const
CLHEP::HepMatrix AlgebraicMatrix
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
static PlanePointer build(Args &&...args)
FreeTrajectoryState const * freeState(bool withErrors=true) const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
GlobalVector momentum() const
MaterialEffectsUpdator * createUpdator(MaterialEffects materialEffects, double mass) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Abs< T >::type abs(const T &t)
const AlgebraicSymMatrix55 & matrix() const
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
unsigned int theNumberOfHits
AlgebraicVector theTrajectoryPositions
virtual void fillDerivatives(const AlgebraicMatrix &projection, const AlgebraicMatrix &fullJacobian, unsigned int iRow)
AlgebraicROOTObject< D, 5 >::Matrix projection()
const LocalTrajectoryError & localError() const
const MaterialEffects materialEffects_
GlobalVector momentum() const
double dxdz() const
dxdz slope
TransientTrackingRecHit::ConstRecHitContainer theRecHits
GlobalPoint position() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlgebraicSymMatrix theMeasurementsCov
AlgebraicMatrix getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
const AlgebraicVector & parameters() const
CLHEP::HepVector AlgebraicVector
ROOT::Math::SVector< double, D1 > Vector
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const GlobalTrajectoryParameters & globalParameters() const
static unsigned int nMeasPerHit
AlgebraicVector5 mixedFormatVector() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< TrajectoryStateOnSurface > theTsosVec
double y0() const
y coordinate
virtual bool addMaterialEffectsCov(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs)
virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection, const AlgebraicVector &mixedLocalParams, unsigned int iRow)
unsigned int theNumberOfPars
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
LocalError const & localAlignmentError() const
Return local alligment error.
double x0() const
x coordinate