50 &recHits,
bool hitsAreReverse,
57 (materialEffects >= brokenLinesCoarse) ? 1 : refTsos.localParameters().mixedFormatVector().kSize,
58 (useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size(),
59 (materialEffects >= brokenLinesCoarse) ?
60 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size()) :
61 ( (materialEffects == breakPoints) ? 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size())-2 : 0) ,
62 (materialEffects >= brokenLinesCoarse) ?
63 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size())-4 :
64 ( (materialEffects == breakPoints) ? 2*((useBeamSpot ==
true) ? recHits.
size()+1 : recHits.
size())-2 : 0) )
71 fwdRecHits.reserve(recHits.size());
72 for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it=recHits.rbegin();
73 it != recHits.rend(); ++it) {
74 fwdRecHits.push_back(*it);
78 useBeamSpot, beamSpot);
82 useBeamSpot, beamSpot);
92 (materialEffects >= brokenLinesCoarse) ? 1 : nPar,
94 (materialEffects >= brokenLinesCoarse) ? 2*nHits : ( (materialEffects == breakPoints) ? 2*nHits-2 : 0 ),
95 (materialEffects >= brokenLinesCoarse) ? 2*nHits-4 : ( (materialEffects == breakPoints) ? 2*nHits-2 : 0 ) )
113 std::auto_ptr<MaterialEffectsUpdator> aMaterialEffectsUpdator
115 if (!aMaterialEffectsUpdator.get())
return false;
118 std::vector<AlgebraicMatrix> allJacobians;
124 std::vector<AlgebraicSymMatrix> allCurvatureChanges;
129 std::vector<AlgebraicMatrix> allProjections;
131 std::vector<AlgebraicSymMatrix> allDeltaParameterCovs;
135 std::vector<AlgebraicMatrix> allLocalToCurv;
137 std::vector<double> allSteps;
139 std::vector<AlgebraicMatrix> allCurvlinJacobians;
144 unsigned int iRow = 0;
155 if (!tsctbl.isValid()) {
156 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct"
157 <<
"TrajectoryStateClostestToBeamLine invalid. Skip track.";
166 std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
167 propagator.propagateWithPath(pcaFts, refTsos.
surface());
169 if (!tsosWithPath.first.isValid())
return false;
183 allRecHits.push_back(bsRecHit);
188 TransientTrackingRecHit::ConstRecHitContainer::const_iterator itRecHit;
189 for ( itRecHit = recHits.begin(); itRecHit != recHits.end(); ++itRecHit ) {
191 allRecHits.push_back(hitPtr);
194 for ( itRecHit = allRecHits.begin(); itRecHit != allRecHits.end(); ++itRecHit ) {
204 allJacobians.push_back(fullJacobian);
207 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
212 allLocalToCurv.push_back(localToCurvilinear);
213 allSteps.push_back(0.);
214 allCurvlinJacobians.push_back(firstCurvlinJacobian);
220 double nextStep = 0.;
223 if (!this->
propagate(previousHitPtr->det()->surface(), previousTsos,
224 hitPtr->det()->
surface(), nextTsos,
225 nextJacobian, nextCurvlinJacobian, nextStep, propDir, magField)) {
229 allJacobians.push_back(nextJacobian);
230 fullJacobian = nextJacobian * previousChangeInCurvature * fullJacobian;
234 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
235 allLocalToCurv.push_back(localToCurvilinear);
236 if (nextStep == 0.) {
237 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct"
238 <<
"step 0. from id " << previousHitPtr->geographicalId()
239 <<
" to " << hitPtr->det()->geographicalId() <<
".";
242 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct" <<
"Skip track.";
246 allSteps.push_back(nextStep);
247 allCurvlinJacobians.push_back(nextCurvlinJacobian);
257 if ( !updatedTsos.isValid() )
return false;
259 if (
theTsosVec.back().localParameters().charge() )
262 /
theTsosVec.back().localParameters().signedInverseMomentum();
266 allDeltaParameterCovs.push_back( asHepMatrix<5>(updatedTsos.localError().matrix()) );
267 allCurvatureChanges.push_back(previousChangeInCurvature);
273 previousHitPtr = hitPtr;
289 switch (materialEffects) {
296 allDeltaParameterCovs);
300 allDeltaParameterCovs, allLocalToCurv);
312 allDeltaParameterCovs);
316 allDeltaParameterCovs, allLocalToCurv);
318 if (!msOK)
return false;
341 switch (materialEffects) {
380 const std::pair<TrajectoryStateOnSurface, double> tsosWithPath =
384 if (!tsosWithPath.first.isValid())
return false;
386 nextStep = tsosWithPath.second;
390 tsosWithPath.first.globalPosition(),
391 tsosWithPath.first.globalMomentum(),
392 tsosWithPath.second);
393 const AlgebraicMatrix curvilinearJacobian = asHepMatrix<5,5>(aJacobian.jacobian());
397 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
401 const AlgebraicMatrix curvilinearToLocal = asHepMatrix<5>(endTrafo.jacobian());
405 newCurvlinJacobian = curvilinearJacobian;
406 newJacobian = curvilinearToLocal * curvilinearJacobian * localToCurvilinear;
407 newTsos = tsosWithPath.first;
426 auto newHitPtr = hitPtr;
430 const LocalPoint localMeasurement = newHitPtr->localPosition();
431 const LocalError localMeasurementCov = newHitPtr->localPositionError();
484 const std::vector<AlgebraicMatrix> &allProjections,
485 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
486 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
505 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
507 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allJacobians[
k]);
510 deltaMaterialEffectsCov = paramMaterialEffectsCov.similarity(allProjections[k]);
517 paramMaterialEffectsCov += allDeltaParameterCovs[
k];
519 tempParameterCov = paramMaterialEffectsCov;
522 for (
unsigned int l = k+1;
l < allJacobians.size(); ++
l) {
523 tempParameterCov = allJacobians[
l] * allCurvatureChanges[
l] * tempParameterCov;
524 tempMeasurementCov = allProjections[
l] * tempParameterCov * allProjections[
k].T();
541 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allCurvatureChanges[k]);
552 const std::vector<AlgebraicMatrix> &allProjections,
553 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
554 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
555 const std::vector<AlgebraicMatrix> &allLocalToCurv)
559 int offsetMeas =
nMeasPerHit * allJacobians.size();
564 MSprojection[0][1] = 1;
565 MSprojection[1][2] = 1;
570 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
573 tempJacobian = allJacobians[
k] * allCurvatureChanges[
k];
574 tempMSCov = allDeltaParameterCovs[
k-1].similarity(allLocalToCurv[
k-1]);
575 tempMSCovProj = tempMSCov.similarity(MSprojection);
581 tempMSJacProj = (allProjections[
k] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
583 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp"
584 <<
"Inversion 1 for break points failed: " << ierr;
592 for (
unsigned int l =
k+1;
l < allJacobians.size(); ++
l) {
595 tempJacobian = allJacobians[
l] * allCurvatureChanges[
l] * tempJacobian;
596 tempMSJacProj = (allProjections[
l] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
598 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp"
599 <<
"Inversion 2 for break points failed: " << ierr;
617 const std::vector<AlgebraicMatrix> &allProjections,
618 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
619 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
620 const std::vector<AlgebraicMatrix> &allLocalToCurv,
632 int offsetMeas =
nMeasPerHit*allCurvlinJacobians.size();
636 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
640 QbypToCurv[0][0] = 1.;
642 AngleToCurv[1][1] = 1.;
643 AngleToCurv[2][0] = 1./cosLambda;
645 CurvToAngle[1][1] = 1.;
646 CurvToAngle[0][2] = cosLambda;
648 OffsetToCurv[3][0] = 1.;
649 OffsetToCurv[4][1] = 1.;
651 CurvToOffset[0][3] = 1.;
652 CurvToOffset[1][4] = 1.;
656 TrajToQbyp[0][0] = 1.;
658 TrajToOff1[0][1] = 1.;
659 TrajToOff1[1][2] = 1.;
661 TrajToOff2[0][3] = 1.;
662 TrajToOff2[1][4] = 1.;
665 AlgebraicMatrix JacCurvToOffsetL, JacOffsetToOffsetL, JacAngleToOffsetL, JacQbypToOffsetL, JacOffsetToAngleL;
666 AlgebraicMatrix JacCurvToOffsetN, JacOffsetToOffsetN, JacAngleToOffsetN, JacQbypToOffsetN, JacOffsetToAngleN;
670 JacCurvToOffsetN = CurvToOffset * allCurvlinJacobians[1];
671 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
672 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
673 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
674 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
676 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
677 <<
"Inversion 1 for fine broken lines failed: " << ierr;
680 JacOffsetToAngleC = -(JacOffsetToAngleN * JacOffsetToOffsetN);
681 JacQbypToAngleC = -(JacOffsetToAngleN * JacQbypToOffsetN);
683 AlgebraicMatrix JacTrajToAngle = JacQbypToAngleC * TrajToQbyp + JacOffsetToAngleC * TrajToOff1 + JacOffsetToAngleN * TrajToOff2;
688 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
689 <<
"Inversion 2 for fine broken lines failed: " << ierr;
700 for (
unsigned int k = 0;
k < allCurvlinJacobians.size(); ++
k) {
702 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
704 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
705 <<
"Inversion 3 for fine broken lines failed: " << ierr;
715 for (
unsigned int k = 1;
k < allCurvlinJacobians.size()-1; ++
k) {
722 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
723 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
728 tempJacL = allCurvlinJacobians[
k] * tempJacobian;
729 JacCurvToOffsetL = CurvToOffset * tempJacL.inverse(ierr);
732 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
733 <<
"Inversion 4 for fine broken lines failed: " << ierr;
736 JacOffsetToOffsetL = JacCurvToOffsetL * OffsetToCurv;
737 JacAngleToOffsetL = JacCurvToOffsetL * AngleToCurv;
738 JacQbypToOffsetL = JacCurvToOffsetL * QbypToCurv;
739 JacOffsetToAngleL =-JacAngleToOffsetL.inverse(ierr);
741 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
742 <<
"Inversion 5 for fine broken lines failed: " << ierr;
745 tempJacobian = tempJacobian * allCurvatureChanges[
k];
746 tempJacN = allCurvlinJacobians[
n] * tempJacobian;
747 JacCurvToOffsetN = CurvToOffset * tempJacN;
748 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
749 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
750 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
751 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
753 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
754 <<
"Inversion 6 for fine broken lines failed: " << ierr;
757 JacOffsetToAngleC = -(JacOffsetToAngleL * JacOffsetToOffsetL + JacOffsetToAngleN * JacOffsetToOffsetN);
758 JacQbypToAngleC = -(JacOffsetToAngleL * JacQbypToOffsetL + JacOffsetToAngleN * JacQbypToOffsetN);
788 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
789 const std::vector<AlgebraicMatrix> &allLocalToCurv,
790 const std::vector<double> &allSteps,
792 const double minStep)
804 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
808 double delta (1.0/allSteps[1]);
819 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
820 <<
"Inversion 1 for coarse broken lines failed: " << ierr;
825 CurvToAngle[1][1] = 1.;
826 CurvToAngle[0][2] = cosLambda;
828 OffsetToCurv[3][0] = 1.;
829 OffsetToCurv[4][1] = 1.;
836 std::vector<unsigned int>
first(allSteps.size());
837 std::vector<unsigned int>
last (allSteps.size());
838 std::vector<unsigned int> plane(allSteps.size());
839 std::vector<double> sPlane(allSteps.size());
840 unsigned int nPlane = 0;
843 for (
unsigned int k = 1;
k < allSteps.size(); ++
k) {
845 if (fabs(allSteps[
k])>minStep) { nPlane += 1;
first[nPlane] =
k; }
848 sPlane[nPlane] += sTot;
850 if (nPlane < 2)
return false;
854 for (
unsigned int k = 0;
k <= nPlane; ++
k) { sPlane[
k] /= (double) (
last[
k]-
first[
k]+1); }
858 for (
unsigned int k = 0;
k < allSteps.size(); ++
k) {
861 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
863 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
864 <<
"Inversion 2 for coarse broken lines failed: " << ierr;
868 unsigned int iPlane = plane[
k];
878 if (fabs(sTot) < fabs(sPlane[iPlane])) { jPlane = (iPlane>0) ? iPlane - 1 : 1; }
879 else { jPlane = (iPlane<nPlane) ? iPlane + 1 : nPlane -1 ;}
881 double sDiff = sPlane[iPlane] - sPlane[jPlane];
882 double iFrac = (sTot - sPlane[jPlane]) / sDiff;
883 double jFrac = 1.0 - iFrac;
898 for (
unsigned int i = 1;
i < nPlane; ++
i) {
906 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
907 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
912 double stepK = sPlane[
i] - sPlane[
l];
913 double stepN = sPlane[
n] - sPlane[
i];
914 double deltaK (1.0/stepK);
915 double deltaN (1.0/stepN);
920 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*l+1] = deltaK;
922 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
i ] = -(deltaK + deltaN);
923 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*
i+1] = -(deltaK + deltaN);
925 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
n ] = deltaN;
926 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*n+1] = deltaN;
935 const std::vector<AlgebraicMatrix> &allProjections,
936 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
937 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
942 const double minPrec = 1.0;
945 OffsetToLocal[3][0] = 1.;
946 OffsetToLocal[4][1] = 1.;
948 SlopeToLocal[1][0] = 1.;
949 SlopeToLocal[2][1] = 1.;
952 TMatrixDSym covariance(2), measPrecision(2), scatPrecision(2);
953 TMatrixD jacPointToPoint(5,5), identity(5,5), proLocalToMeas(2,2);
954 identity.UnitMatrix();
955 TVectorD measurement(2), scatterer(2), measPrecDiag(2);
960 unsigned int numHits = allJacobians.size();
961 std::vector<GblPoint> GblPointList;
962 GblPointList.reserve(numHits);
963 for (
unsigned int k = 0;
k < numHits; ++
k) {
966 clhep2root(allJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
969 GblPoint aGblPoint( jacPointToPoint );
972 clhep2root(allProjections[k] * OffsetToLocal, proLocalToMeas);
981 if (covariance(0,1) == 0.) {
983 for (
unsigned int row = 0; row < 2; ++row) {
984 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
986 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
990 measPrecision = covariance; measPrecision.InvertFast();
991 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecision, minPrec);
995 clhep2root(allDeltaParameterCovs[k].similarityT(SlopeToLocal), scatPrecision);
996 scatPrecision.InvertFast();
1002 GblPointList.push_back( aGblPoint );
1005 theGblInput.push_back(std::make_pair(GblPointList, identity));
1013 const std::vector<AlgebraicMatrix> &allProjections,
1014 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
1015 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
1016 const std::vector<AlgebraicMatrix> &allLocalToCurv)
1021 const double minPrec = 1.0;
1025 OffsetToCurv[3][0] = 1.;
1026 OffsetToCurv[4][1] = 1.;
1031 TMatrixDSym covariance(2), measPrecision(2);
1032 TMatrixD jacPointToPoint(5,5), firstLocalToCurv(5,5), proLocalToMeas(2,2);
1033 TVectorD measurement(2), scatterer(2), measPrecDiag(2), scatPrecDiag(2);
1037 unsigned int numHits = allCurvlinJacobians.size();
1038 std::vector<GblPoint> GblPointList;
1039 GblPointList.reserve(numHits);
1040 for (
unsigned int k = 0;
k < numHits; ++
k) {
1042 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
1044 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsGbl"
1045 <<
"Inversion 1 for general broken lines failed: " << ierr;
1050 clhep2root(allCurvlinJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
1053 GblPoint aGblPoint( jacPointToPoint );
1065 if (covariance(0,1) == 0.) {
1067 for (
unsigned int row = 0; row < 2; ++row) {
1068 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
1070 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
1074 measPrecision = covariance; measPrecision.InvertFast();
1075 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecision, minPrec);
1079 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[k]);
1080 for (
unsigned int row = 0; row < 2; ++row) {
1081 scatPrecDiag(row) = 1.0/tempMSCov[row+1][row+1];
1088 GblPointList.push_back( aGblPoint );
1091 clhep2root(allLocalToCurv[0], firstLocalToCurv);
1092 theGblInput.push_back(std::make_pair(GblPointList, firstLocalToCurv));
1101 for (
int row = 0; row < in.num_row(); ++row) {
1108 for (
int row = 0; row < in.num_row(); ++row) {
1109 for (
int col = 0;
col < in.num_col(); ++
col) {
1110 out[row][
col] = in[row][
col];
1117 for (
int row = 0; row < in.num_row(); ++row) {
1118 for (
int col = 0;
col < in.num_col(); ++
col) {
1119 out[row][
col] = in[row][
col];
1130 if (this->useRecHit(hitPtr)) {
1132 switch (hitPtr->dimension()) {
1134 return getHitProjectionMatrixT<1>(hitPtr);
1136 return getHitProjectionMatrixT<2>(hitPtr);
1138 return getHitProjectionMatrixT<3>(hitPtr);
1140 return getHitProjectionMatrixT<4>(hitPtr);
1142 return getHitProjectionMatrixT<5>(hitPtr);
1144 throw cms::Exception(
"ReferenceTrajectory::getHitProjectionMatrix")
1145 <<
"Unexpected hit dimension: " << hitPtr->dimension() <<
"\n";
1154 template<
unsigned int N>
1171 holder.
setup<
N>(&
r, &V, &pf, &rMeas, &VMeas, dummyPars, dummyErr);
1172 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
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
std::vector< std::pair< std::vector< GblPoint >, TMatrixD > > theGblInput
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)
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
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
tuple MultipleScatteringUpdator
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