59 (materialEffects >= brokenLinesCoarse) ? 1 : refTsos.localParameters().mixedFormatVector().kSize,
60 (useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size(),
61 (materialEffects >= brokenLinesCoarse) ?
62 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size()) :
63 ( (materialEffects == breakPoints) ? 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size())-2 : 0) ,
64 (materialEffects >= brokenLinesCoarse) ?
65 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size())-4 :
66 ( (materialEffects == breakPoints) ? 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size())-2 : 0) )
73 fwdRecHits.reserve(recHits.size());
74 for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it=recHits.rbegin();
75 it != recHits.rend(); ++it) {
76 fwdRecHits.push_back(*it);
80 useBeamSpot, beamSpot);
84 useBeamSpot, beamSpot);
94 (materialEffects >= brokenLinesCoarse) ? 1 : nPar,
96 (materialEffects >= brokenLinesCoarse) ? 2*nHits : ( (materialEffects == breakPoints) ? 2*nHits-2 : 0 ),
97 (materialEffects >= brokenLinesCoarse) ? 2*nHits-4 : ( (materialEffects == breakPoints) ? 2*nHits-2 : 0 ) )
115 std::auto_ptr<MaterialEffectsUpdator> aMaterialEffectsUpdator
117 if (!aMaterialEffectsUpdator.get())
return false;
120 std::vector<AlgebraicMatrix> allJacobians;
126 std::vector<AlgebraicSymMatrix> allCurvatureChanges;
131 std::vector<AlgebraicMatrix> allProjections;
133 std::vector<AlgebraicSymMatrix> allDeltaParameterCovs;
137 std::vector<AlgebraicMatrix> allLocalToCurv;
139 std::vector<double> allSteps;
141 std::vector<AlgebraicMatrix> allCurvlinJacobians;
146 unsigned int iRow = 0;
157 if (!tsctbl.isValid()) {
158 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct"
159 <<
"TrajectoryStateClostestToBeamLine invalid. Skip track.";
168 std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
169 propagator.propagateWithPath(pcaFts, refTsos.
surface());
171 if (!tsosWithPath.first.isValid())
return false;
185 allRecHits.push_back(bsRecHit);
190 TransientTrackingRecHit::ConstRecHitContainer::const_iterator itRecHit;
191 for ( itRecHit = recHits.begin(); itRecHit != recHits.end(); ++itRecHit ) {
193 allRecHits.push_back(hitPtr);
196 for ( itRecHit = allRecHits.begin(); itRecHit != allRecHits.end(); ++itRecHit ) {
206 allJacobians.push_back(fullJacobian);
209 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
214 allLocalToCurv.push_back(localToCurvilinear);
215 allSteps.push_back(0.);
216 allCurvlinJacobians.push_back(firstCurvlinJacobian);
222 double nextStep = 0.;
225 if (!this->
propagate(previousHitPtr->det()->surface(), previousTsos,
226 hitPtr->det()->
surface(), nextTsos,
227 nextJacobian, nextCurvlinJacobian, nextStep, propDir, magField)) {
231 allJacobians.push_back(nextJacobian);
232 fullJacobian = nextJacobian * previousChangeInCurvature * fullJacobian;
236 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
237 allLocalToCurv.push_back(localToCurvilinear);
238 if (nextStep == 0.) {
239 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct"
240 <<
"step 0. from id " << previousHitPtr->geographicalId()
241 <<
" to " << hitPtr->det()->geographicalId() <<
".";
244 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct" <<
"Skip track.";
248 allSteps.push_back(nextStep);
249 allCurvlinJacobians.push_back(nextCurvlinJacobian);
259 if ( !updatedTsos.isValid() )
return false;
261 if (
theTsosVec.back().localParameters().charge() )
264 /
theTsosVec.back().localParameters().signedInverseMomentum();
268 allDeltaParameterCovs.push_back( asHepMatrix<5>(updatedTsos.localError().matrix()) );
269 allCurvatureChanges.push_back(previousChangeInCurvature);
275 previousHitPtr = hitPtr;
291 switch (materialEffects) {
298 allDeltaParameterCovs);
302 allDeltaParameterCovs, allLocalToCurv);
314 allDeltaParameterCovs);
318 allDeltaParameterCovs, allLocalToCurv);
320 if (!msOK)
return false;
343 switch (materialEffects) {
382 const std::pair<TrajectoryStateOnSurface, double> tsosWithPath =
386 if (!tsosWithPath.first.isValid())
return false;
388 nextStep = tsosWithPath.second;
392 tsosWithPath.first.globalPosition(),
393 tsosWithPath.first.globalMomentum(),
394 tsosWithPath.second);
395 const AlgebraicMatrix curvilinearJacobian = asHepMatrix<5,5>(aJacobian.jacobian());
399 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
403 const AlgebraicMatrix curvilinearToLocal = asHepMatrix<5>(endTrafo.jacobian());
407 newCurvlinJacobian = curvilinearJacobian;
408 newJacobian = curvilinearToLocal * curvilinearJacobian * localToCurvilinear;
409 newTsos = tsosWithPath.first;
428 auto newHitPtr = hitPtr;
432 const LocalPoint localMeasurement = newHitPtr->localPosition();
433 const LocalError localMeasurementCov = newHitPtr->localPositionError();
486 const std::vector<AlgebraicMatrix> &allProjections,
487 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
488 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
507 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
509 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allJacobians[
k]);
512 deltaMaterialEffectsCov = paramMaterialEffectsCov.similarity(allProjections[k]);
519 paramMaterialEffectsCov += allDeltaParameterCovs[
k];
521 tempParameterCov = paramMaterialEffectsCov;
524 for (
unsigned int l = k+1;
l < allJacobians.size(); ++
l) {
525 tempParameterCov = allJacobians[
l] * allCurvatureChanges[
l] * tempParameterCov;
526 tempMeasurementCov = allProjections[
l] * tempParameterCov * allProjections[
k].T();
543 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allCurvatureChanges[k]);
554 const std::vector<AlgebraicMatrix> &allProjections,
555 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
556 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
557 const std::vector<AlgebraicMatrix> &allLocalToCurv)
561 int offsetMeas =
nMeasPerHit * allJacobians.size();
566 MSprojection[0][1] = 1;
567 MSprojection[1][2] = 1;
572 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
575 tempJacobian = allJacobians[
k] * allCurvatureChanges[
k];
576 tempMSCov = allDeltaParameterCovs[
k-1].similarity(allLocalToCurv[
k-1]);
577 tempMSCovProj = tempMSCov.similarity(MSprojection);
583 tempMSJacProj = (allProjections[
k] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
585 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp"
586 <<
"Inversion 1 for break points failed: " << ierr;
594 for (
unsigned int l =
k+1;
l < allJacobians.size(); ++
l) {
597 tempJacobian = allJacobians[
l] * allCurvatureChanges[
l] * tempJacobian;
598 tempMSJacProj = (allProjections[
l] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
600 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp"
601 <<
"Inversion 2 for break points failed: " << ierr;
619 const std::vector<AlgebraicMatrix> &allProjections,
620 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
621 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
622 const std::vector<AlgebraicMatrix> &allLocalToCurv,
634 int offsetMeas =
nMeasPerHit*allCurvlinJacobians.size();
638 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
642 QbypToCurv[0][0] = 1.;
644 AngleToCurv[1][1] = 1.;
645 AngleToCurv[2][0] = 1./cosLambda;
647 CurvToAngle[1][1] = 1.;
648 CurvToAngle[0][2] = cosLambda;
650 OffsetToCurv[3][0] = 1.;
651 OffsetToCurv[4][1] = 1.;
653 CurvToOffset[0][3] = 1.;
654 CurvToOffset[1][4] = 1.;
658 TrajToQbyp[0][0] = 1.;
660 TrajToOff1[0][1] = 1.;
661 TrajToOff1[1][2] = 1.;
663 TrajToOff2[0][3] = 1.;
664 TrajToOff2[1][4] = 1.;
667 AlgebraicMatrix JacCurvToOffsetL, JacOffsetToOffsetL, JacAngleToOffsetL, JacQbypToOffsetL, JacOffsetToAngleL;
668 AlgebraicMatrix JacCurvToOffsetN, JacOffsetToOffsetN, JacAngleToOffsetN, JacQbypToOffsetN, JacOffsetToAngleN;
672 JacCurvToOffsetN = CurvToOffset * allCurvlinJacobians[1];
673 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
674 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
675 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
676 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
678 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
679 <<
"Inversion 1 for fine broken lines failed: " << ierr;
682 JacOffsetToAngleC = -(JacOffsetToAngleN * JacOffsetToOffsetN);
683 JacQbypToAngleC = -(JacOffsetToAngleN * JacQbypToOffsetN);
685 AlgebraicMatrix JacTrajToAngle = JacQbypToAngleC * TrajToQbyp + JacOffsetToAngleC * TrajToOff1 + JacOffsetToAngleN * TrajToOff2;
690 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
691 <<
"Inversion 2 for fine broken lines failed: " << ierr;
702 for (
unsigned int k = 0;
k < allCurvlinJacobians.size(); ++
k) {
704 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
706 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
707 <<
"Inversion 3 for fine broken lines failed: " << ierr;
717 for (
unsigned int k = 1;
k < allCurvlinJacobians.size()-1; ++
k) {
724 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
725 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
730 tempJacL = allCurvlinJacobians[
k] * tempJacobian;
731 JacCurvToOffsetL = CurvToOffset * tempJacL.inverse(ierr);
734 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
735 <<
"Inversion 4 for fine broken lines failed: " << ierr;
738 JacOffsetToOffsetL = JacCurvToOffsetL * OffsetToCurv;
739 JacAngleToOffsetL = JacCurvToOffsetL * AngleToCurv;
740 JacQbypToOffsetL = JacCurvToOffsetL * QbypToCurv;
741 JacOffsetToAngleL =-JacAngleToOffsetL.inverse(ierr);
743 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
744 <<
"Inversion 5 for fine broken lines failed: " << ierr;
747 tempJacobian = tempJacobian * allCurvatureChanges[
k];
748 tempJacN = allCurvlinJacobians[
n] * tempJacobian;
749 JacCurvToOffsetN = CurvToOffset * tempJacN;
750 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
751 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
752 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
753 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
755 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
756 <<
"Inversion 6 for fine broken lines failed: " << ierr;
759 JacOffsetToAngleC = -(JacOffsetToAngleL * JacOffsetToOffsetL + JacOffsetToAngleN * JacOffsetToOffsetN);
760 JacQbypToAngleC = -(JacOffsetToAngleL * JacQbypToOffsetL + JacOffsetToAngleN * JacQbypToOffsetN);
790 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
791 const std::vector<AlgebraicMatrix> &allLocalToCurv,
792 const std::vector<double> &allSteps,
794 const double minStep)
806 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
810 double delta (1.0/allSteps[1]);
821 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
822 <<
"Inversion 1 for coarse broken lines failed: " << ierr;
827 CurvToAngle[1][1] = 1.;
828 CurvToAngle[0][2] = cosLambda;
830 OffsetToCurv[3][0] = 1.;
831 OffsetToCurv[4][1] = 1.;
838 std::vector<unsigned int>
first(allSteps.size());
839 std::vector<unsigned int>
last (allSteps.size());
840 std::vector<unsigned int> plane(allSteps.size());
841 std::vector<double> sPlane(allSteps.size());
842 unsigned int nPlane = 0;
845 for (
unsigned int k = 1;
k < allSteps.size(); ++
k) {
847 if (fabs(allSteps[
k])>minStep) { nPlane += 1;
first[nPlane] =
k; }
850 sPlane[nPlane] += sTot;
852 if (nPlane < 2)
return false;
856 for (
unsigned int k = 0;
k <= nPlane; ++
k) { sPlane[
k] /= (double) (
last[
k]-
first[
k]+1); }
860 for (
unsigned int k = 0;
k < allSteps.size(); ++
k) {
863 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
865 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
866 <<
"Inversion 2 for coarse broken lines failed: " << ierr;
870 unsigned int iPlane = plane[
k];
880 if (fabs(sTot) < fabs(sPlane[iPlane])) { jPlane = (iPlane>0) ? iPlane - 1 : 1; }
881 else { jPlane = (iPlane<nPlane) ? iPlane + 1 : nPlane -1 ;}
883 double sDiff = sPlane[iPlane] - sPlane[jPlane];
884 double iFrac = (sTot - sPlane[jPlane]) / sDiff;
885 double jFrac = 1.0 - iFrac;
900 for (
unsigned int i = 1;
i < nPlane; ++
i) {
908 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
909 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
914 double stepK = sPlane[
i] - sPlane[
l];
915 double stepN = sPlane[
n] - sPlane[
i];
916 double deltaK (1.0/stepK);
917 double deltaN (1.0/stepN);
922 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*l+1] = deltaK;
924 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
i ] = -(deltaK + deltaN);
925 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*
i+1] = -(deltaK + deltaN);
927 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
n ] = deltaN;
928 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*n+1] = deltaN;
937 const std::vector<AlgebraicMatrix> &allProjections,
938 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
939 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
944 const double minPrec = 1.0;
947 OffsetToLocal[3][0] = 1.;
948 OffsetToLocal[4][1] = 1.;
950 SlopeToLocal[1][0] = 1.;
951 SlopeToLocal[2][1] = 1.;
954 TMatrixDSym covariance(2), measPrecision(2), scatPrecision(2);
955 TMatrixD jacPointToPoint(5,5), identity(5,5), proLocalToMeas(2,2);
956 identity.UnitMatrix();
957 TVectorD measurement(2), scatterer(2), measPrecDiag(2);
962 unsigned int numHits = allJacobians.size();
963 std::vector<GblPoint> GblPointList;
964 GblPointList.reserve(numHits);
965 for (
unsigned int k = 0;
k < numHits; ++
k) {
968 clhep2root(allJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
971 GblPoint aGblPoint( jacPointToPoint );
974 clhep2root(allProjections[k] * OffsetToLocal, proLocalToMeas);
983 if (covariance(0,1) == 0.) {
985 for (
unsigned int row = 0; row < 2; ++row) {
986 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
988 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
992 measPrecision = covariance; measPrecision.InvertFast();
993 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecision, minPrec);
997 clhep2root(allDeltaParameterCovs[k].similarityT(SlopeToLocal), scatPrecision);
998 scatPrecision.InvertFast();
1004 GblPointList.push_back( aGblPoint );
1007 theGblInput.push_back(std::make_pair(GblPointList, identity));
1015 const std::vector<AlgebraicMatrix> &allProjections,
1016 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
1017 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
1018 const std::vector<AlgebraicMatrix> &allLocalToCurv)
1023 const double minPrec = 1.0;
1027 OffsetToCurv[3][0] = 1.;
1028 OffsetToCurv[4][1] = 1.;
1033 TMatrixDSym covariance(2), measPrecision(2);
1034 TMatrixD jacPointToPoint(5,5), firstLocalToCurv(5,5), proLocalToMeas(2,2);
1035 TVectorD measurement(2), scatterer(2), measPrecDiag(2), scatPrecDiag(2);
1039 unsigned int numHits = allCurvlinJacobians.size();
1040 std::vector<GblPoint> GblPointList;
1041 GblPointList.reserve(numHits);
1042 for (
unsigned int k = 0;
k < numHits; ++
k) {
1044 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
1046 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsGbl"
1047 <<
"Inversion 1 for general broken lines failed: " << ierr;
1052 clhep2root(allCurvlinJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
1055 GblPoint aGblPoint( jacPointToPoint );
1067 if (covariance(0,1) == 0.) {
1069 for (
unsigned int row = 0; row < 2; ++row) {
1070 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
1072 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
1076 measPrecision = covariance; measPrecision.InvertFast();
1077 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecision, minPrec);
1081 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[k]);
1082 for (
unsigned int row = 0; row < 2; ++row) {
1083 scatPrecDiag(row) = 1.0/tempMSCov[row+1][row+1];
1090 GblPointList.push_back( aGblPoint );
1093 clhep2root(allLocalToCurv[0], firstLocalToCurv);
1094 theGblInput.push_back(std::make_pair(GblPointList, firstLocalToCurv));
1103 for (
int row = 0; row < in.num_row(); ++row) {
1110 for (
int row = 0; row < in.num_row(); ++row) {
1111 for (
int col = 0;
col < in.num_col(); ++
col) {
1112 out[row][
col] = in[row][
col];
1119 for (
int row = 0; row < in.num_row(); ++row) {
1120 for (
int col = 0;
col < in.num_col(); ++
col) {
1121 out[row][
col] = in[row][
col];
1132 if (this->useRecHit(hitPtr)) {
1134 switch (hitPtr->dimension()) {
1136 return getHitProjectionMatrixT<1>(hitPtr);
1138 return getHitProjectionMatrixT<2>(hitPtr);
1140 return getHitProjectionMatrixT<3>(hitPtr);
1142 return getHitProjectionMatrixT<4>(hitPtr);
1144 return getHitProjectionMatrixT<5>(hitPtr);
1146 throw cms::Exception(
"ReferenceTrajectory::getHitProjectionMatrix")
1147 <<
"Unexpected hit dimension: " << hitPtr->dimension() <<
"\n";
1156 template<
unsigned int N>
1173 holder.
setup<
N>(&
r, &V, &pf, &rMeas, &VMeas, dummyPars, dummyErr);
1174 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
void addMeasurement(const TMatrixD &aProjection, const TVectorD &aResiduals, const TVectorD &aPrecision, double minPrecision=0.)
Add a measurement to a point.
AlgebraicMatrix getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
tuple MultipleScatteringUpdator
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
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, double mass, MaterialEffects materialEffects, const PropagationDirection propDir, const MagneticField *magField, bool useBeamSpot, const reco::BeamSpot &beamSpot)
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)
static const unsigned int nMeasPerHit
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
AlgebraicMatrix theDerivatives
unsigned int theNumberOfVirtualPars
Geom::Phi< T > phi() 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)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
SurfaceSide surfaceSide(const PropagationDirection dir) 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)
tuple TSCBLBuilderNoMaterial
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 propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const PropagationDirection propDir, const MagneticField *magField) const
AlgebraicSymMatrix theTrajectoryPositionCov
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
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, bool hitsAreReverse, const MagneticField *magField, MaterialEffects materialEffects, PropagationDirection propDir, double mass, bool useBeamSpot, const reco::BeamSpot &beamSpot)
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
void addScatterer(const TVectorD &aResiduals, const TVectorD &aPrecision)
Add a (thin) scatterer to a point.
MaterialEffectsUpdator * createUpdator(MaterialEffects materialEffects, double mass) const
const AlgebraicSymMatrix55 & matrix() const
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
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
GlobalVector momentum() const
double dxdz() const
dxdz slope
TransientTrackingRecHit::ConstRecHitContainer theRecHits
std::vector< std::pair< std::vector< gbl::GblPoint >, TMatrixD > > theGblInput
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
void clhep2root(const AlgebraicVector &in, TVectorD &out)
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
tuple size
Write out results.
tuple AnalyticalPropagator
double x0() const
x coordinate